summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format1
-rw-r--r--.gitignore7
-rw-r--r--.mailmap60
-rw-r--r--.travis.yml32
-rw-r--r--AUTHORS.md11
-rw-r--r--CHANGELOG.md260
-rw-r--r--CODEOWNERS1
-rw-r--r--COPYRIGHT.txt53
-rw-r--r--DONORS.md94
-rw-r--r--SConstruct56
-rw-r--r--core/allocators.h195
-rw-r--r--core/bind/core_bind.cpp26
-rw-r--r--core/bind/core_bind.h17
-rw-r--r--core/command_queue_mt.cpp4
-rw-r--r--core/command_queue_mt.h19
-rw-r--r--core/core_string_names.h2
-rw-r--r--core/engine.cpp1
-rw-r--r--core/error_macros.h34
-rw-r--r--core/global_constants.h2
-rw-r--r--core/hashfuncs.h2
-rw-r--r--core/image.cpp16
-rw-r--r--core/image.h3
-rw-r--r--core/io/file_access_buffered.h2
-rw-r--r--core/io/file_access_buffered_fa.h2
-rw-r--r--core/io/file_access_zip.cpp6
-rw-r--r--core/io/http_client.cpp98
-rw-r--r--core/io/http_client.h1
-rw-r--r--core/io/logger.h12
-rw-r--r--core/io/marshalls.cpp6
-rw-r--r--core/io/packet_peer.cpp2
-rw-r--r--core/io/resource_format_binary.cpp51
-rw-r--r--core/io/resource_format_binary.h9
-rw-r--r--core/io/resource_importer.cpp (renamed from core/io/resource_import.cpp)61
-rw-r--r--core/io/resource_importer.h (renamed from core/io/resource_import.h)28
-rw-r--r--core/io/resource_loader.cpp75
-rw-r--r--core/io/resource_loader.h22
-rw-r--r--core/io/resource_saver.cpp8
-rw-r--r--core/list.h2
-rw-r--r--core/math/a_star.cpp27
-rw-r--r--core/math/basis.cpp (renamed from core/math/matrix3.cpp)76
-rw-r--r--core/math/basis.h (renamed from core/math/matrix3.h)8
-rw-r--r--core/math/bsp_tree.h2
-rw-r--r--core/math/expression.cpp62
-rw-r--r--core/math/face3.h10
-rw-r--r--core/math/geometry.cpp35
-rw-r--r--core/math/geometry.h4
-rw-r--r--core/math/math_defs.h9
-rw-r--r--core/math/math_funcs.h30
-rw-r--r--core/math/octree.h20
-rw-r--r--core/math/quat.cpp4
-rw-r--r--core/math/quick_hull.cpp14
-rw-r--r--core/math/quick_hull.h2
-rw-r--r--core/math/random_pcg.cpp17
-rw-r--r--core/math/random_pcg.h22
-rw-r--r--core/math/transform.h2
-rw-r--r--core/math/transform_2d.cpp12
-rw-r--r--core/math/transform_2d.h1
-rw-r--r--core/math/triangle_mesh.cpp2
-rw-r--r--core/math/vector2.cpp2
-rw-r--r--core/math/vector3.cpp2
-rw-r--r--core/math/vector3.h4
-rw-r--r--core/node_path.h2
-rw-r--r--core/object.cpp79
-rw-r--r--core/object.h3
-rw-r--r--core/os/file_access.cpp17
-rw-r--r--core/os/file_access.h1
-rw-r--r--core/os/input.cpp1
-rw-r--r--core/os/input.h3
-rw-r--r--core/os/input_event.cpp57
-rw-r--r--core/os/input_event.h7
-rw-r--r--core/os/os.cpp19
-rw-r--r--core/os/os.h33
-rw-r--r--core/os/shell.cpp46
-rw-r--r--core/pair.h6
-rw-r--r--core/pool_vector.cpp (renamed from core/dvector.cpp)6
-rw-r--r--core/pool_vector.h (renamed from core/dvector.h)24
-rw-r--r--core/project_settings.cpp9
-rw-r--r--core/register_core_types.cpp2
-rw-r--r--core/script_debugger_remote.cpp10
-rw-r--r--core/script_debugger_remote.h4
-rw-r--r--core/script_language.cpp36
-rw-r--r--core/script_language.h5
-rw-r--r--core/sort_array.h (renamed from core/sort.h)8
-rw-r--r--core/string_name.cpp (renamed from core/string_db.cpp)4
-rw-r--r--core/string_name.h (renamed from core/string_db.h)8
-rw-r--r--core/translation.cpp2
-rw-r--r--core/typedefs.h25
-rw-r--r--core/undo_redo.cpp22
-rw-r--r--core/undo_redo.h3
-rw-r--r--core/ustring.cpp21
-rw-r--r--core/ustring.h8
-rw-r--r--core/variant.cpp77
-rw-r--r--core/variant.h14
-rw-r--r--core/variant_call.cpp36
-rw-r--r--core/variant_construct_string.cpp438
-rw-r--r--core/variant_op.cpp88
-rw-r--r--core/variant_parser.cpp34
-rw-r--r--core/vector.h2
-rw-r--r--core/version.h5
-rw-r--r--doc/classes/@GDScript.xml15
-rw-r--r--doc/classes/AnimatedTexture.xml16
-rw-r--r--doc/classes/Animation.xml6
-rw-r--r--doc/classes/AnimationPlayer.xml9
-rw-r--r--doc/classes/AnimationTreePlayer.xml2
-rw-r--r--doc/classes/Array.xml64
-rw-r--r--doc/classes/ArrayMesh.xml7
-rw-r--r--doc/classes/AudioBusLayout.xml2
-rw-r--r--doc/classes/AudioEffectLimiter.xml2
-rw-r--r--doc/classes/AudioServer.xml6
-rw-r--r--doc/classes/AudioStreamSample.xml4
-rw-r--r--doc/classes/CPUParticles.xml1
-rw-r--r--doc/classes/Camera.xml6
-rw-r--r--doc/classes/CollisionPolygon.xml2
-rw-r--r--doc/classes/CollisionPolygon2D.xml2
-rw-r--r--doc/classes/Control.xml8
-rw-r--r--doc/classes/Dictionary.xml13
-rw-r--r--doc/classes/EditorSpatialGizmo.xml2
-rw-r--r--doc/classes/EditorSpatialGizmoPlugin.xml8
-rw-r--r--doc/classes/Engine.xml8
-rw-r--r--doc/classes/Expression.xml2
-rw-r--r--doc/classes/File.xml2
-rw-r--r--doc/classes/Font.xml2
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/Input.xml9
-rw-r--r--doc/classes/InputEvent.xml8
-rw-r--r--doc/classes/KinematicBody.xml6
-rw-r--r--doc/classes/KinematicBody2D.xml12
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/Light2D.xml1
-rw-r--r--doc/classes/LightOccluder2D.xml1
-rw-r--r--doc/classes/MeshInstance2D.xml1
-rw-r--r--doc/classes/MultiMesh.xml39
-rw-r--r--doc/classes/MultiMeshInstance.xml2
-rw-r--r--doc/classes/Node.xml9
-rw-r--r--doc/classes/OS.xml26
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/OptionButton.xml15
-rw-r--r--doc/classes/Particles.xml1
-rw-r--r--doc/classes/Particles2D.xml1
-rw-r--r--doc/classes/Physics2DServer.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState.xml2
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml2
-rw-r--r--doc/classes/PhysicsServer.xml2
-rw-r--r--doc/classes/Polygon2D.xml2
-rw-r--r--doc/classes/PopupMenu.xml2
-rw-r--r--doc/classes/ProjectSettings.xml24
-rw-r--r--doc/classes/RandomNumberGenerator.xml3
-rw-r--r--doc/classes/RayCast.xml4
-rw-r--r--doc/classes/Rect2.xml2
-rw-r--r--doc/classes/Resource.xml10
-rw-r--r--doc/classes/ResourcePreloader.xml13
-rw-r--r--doc/classes/RigidBody.xml2
-rw-r--r--doc/classes/RigidBody2D.xml2
-rw-r--r--doc/classes/SceneTree.xml7
-rw-r--r--doc/classes/SceneTreeTimer.xml11
-rw-r--r--doc/classes/ScrollContainer.xml2
-rw-r--r--doc/classes/ShaderMaterial.xml1
-rw-r--r--doc/classes/Skeleton.xml4
-rw-r--r--doc/classes/Skeleton2D.xml7
-rw-r--r--doc/classes/SpotLight.xml2
-rw-r--r--doc/classes/StyleBox.xml13
-rw-r--r--doc/classes/StyleBoxTexture.xml21
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TabContainer.xml2
-rw-r--r--doc/classes/Tabs.xml2
-rw-r--r--doc/classes/TileMap.xml4
-rw-r--r--doc/classes/Tween.xml2
-rw-r--r--doc/classes/UndoRedo.xml28
-rw-r--r--doc/classes/Viewport.xml6
-rw-r--r--doc/classes/int.xml16
-rwxr-xr-xdoc/tools/makerst.py6
-rw-r--r--drivers/SCsub1
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.cpp (renamed from drivers/alsamidi/alsa_midi.cpp)6
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.h (renamed from drivers/alsamidi/alsa_midi.h)10
-rw-r--r--drivers/coremidi/midi_driver_coremidi.cpp (renamed from drivers/coremidi/core_midi.cpp)6
-rw-r--r--drivers/coremidi/midi_driver_coremidi.h (renamed from drivers/coremidi/core_midi.h)10
-rw-r--r--drivers/dummy/rasterizer_dummy.h1
-rw-r--r--drivers/gles2/rasterizer_canvas_gles2.cpp128
-rw-r--r--drivers/gles2/rasterizer_canvas_gles2.h2
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp287
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.h10
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp696
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.h31
-rw-r--r--drivers/gles2/shader_compiler_gles2.cpp11
-rw-r--r--drivers/gles2/shader_gles2.cpp654
-rw-r--r--drivers/gles2/shader_gles2.h275
-rw-r--r--drivers/gles2/shaders/canvas.glsl62
-rw-r--r--drivers/gles2/shaders/canvas_shadow.glsl2
-rw-r--r--drivers/gles2/shaders/cubemap_filter.glsl21
-rw-r--r--drivers/gles2/shaders/scene.glsl99
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp40
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp103
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h4
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp98
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.h10
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp6
-rw-r--r--drivers/gles3/shader_gles3.cpp9
-rw-r--r--drivers/gles3/shaders/canvas.glsl12
-rw-r--r--drivers/gles3/shaders/canvas_shadow.glsl2
-rw-r--r--drivers/gles3/shaders/scene.glsl61
-rw-r--r--drivers/gles3/shaders/screen_space_reflection.glsl2
-rw-r--r--drivers/gles3/shaders/tonemap.glsl2
-rw-r--r--drivers/png/SCsub1
-rw-r--r--drivers/png/image_loader_png.cpp6
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp2
-rw-r--r--drivers/rtaudio/SCsub23
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.cpp205
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.h65
-rw-r--r--drivers/unix/file_access_unix.cpp2
-rw-r--r--drivers/unix/ip_unix.cpp2
-rw-r--r--drivers/unix/net_socket_posix.cpp2
-rw-r--r--drivers/unix/os_unix.cpp7
-rw-r--r--drivers/unix/os_unix.h1
-rw-r--r--drivers/unix/syslog_logger.h2
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp27
-rw-r--r--drivers/windows/dir_access_windows.cpp3
-rw-r--r--drivers/windows/shell_windows.cpp67
-rw-r--r--drivers/windows/shell_windows.h52
-rw-r--r--drivers/winmidi/midi_driver_winmidi.cpp (renamed from drivers/winmidi/win_midi.cpp)6
-rw-r--r--drivers/winmidi/midi_driver_winmidi.h (renamed from drivers/winmidi/win_midi.h)10
-rw-r--r--editor/animation_bezier_editor.cpp8
-rw-r--r--editor/animation_track_editor.cpp175
-rw-r--r--editor/animation_track_editor.h14
-rw-r--r--editor/animation_track_editor_plugins.cpp26
-rw-r--r--editor/array_property_edit.cpp5
-rw-r--r--editor/array_property_edit.h2
-rw-r--r--editor/audio_stream_preview.cpp2
-rw-r--r--editor/code_editor.cpp332
-rw-r--r--editor/code_editor.h26
-rw-r--r--editor/collada/collada.cpp15
-rw-r--r--editor/connections_dialog.cpp12
-rw-r--r--editor/create_dialog.cpp22
-rw-r--r--editor/dependency_editor.cpp8
-rw-r--r--editor/dictionary_property_edit.cpp5
-rw-r--r--editor/dictionary_property_edit.h2
-rw-r--r--editor/doc/doc_data.cpp110
-rw-r--r--editor/editor_audio_buses.cpp10
-rw-r--r--editor/editor_autoload_settings.cpp10
-rw-r--r--editor/editor_data.cpp2
-rw-r--r--editor/editor_export.cpp32
-rw-r--r--editor/editor_export.h1
-rw-r--r--editor/editor_file_dialog.cpp26
-rw-r--r--editor/editor_file_system.cpp88
-rw-r--r--editor/editor_file_system.h3
-rw-r--r--editor/editor_folding.cpp14
-rw-r--r--editor/editor_help.cpp43
-rw-r--r--editor/editor_help.h5
-rw-r--r--editor/editor_help_search.cpp18
-rw-r--r--editor/editor_help_search.h1
-rw-r--r--editor/editor_inspector.cpp69
-rw-r--r--editor/editor_log.cpp4
-rw-r--r--editor/editor_node.cpp263
-rw-r--r--editor/editor_node.h7
-rw-r--r--editor/editor_plugin_settings.cpp10
-rw-r--r--editor/editor_properties.cpp96
-rw-r--r--editor/editor_properties.h3
-rw-r--r--editor/editor_properties_array_dict.cpp14
-rw-r--r--editor/editor_resource_preview.cpp18
-rw-r--r--editor/editor_resource_preview.h22
-rw-r--r--editor/editor_run_native.cpp3
-rw-r--r--editor/editor_sectioned_inspector.cpp4
-rw-r--r--editor/editor_settings.cpp34
-rw-r--r--editor/editor_spin_slider.cpp8
-rw-r--r--editor/editor_sub_scene.cpp4
-rw-r--r--editor/editor_themes.cpp42
-rw-r--r--editor/export_template_manager.cpp23
-rw-r--r--editor/fileserver/editor_file_server.cpp26
-rw-r--r--editor/filesystem_dock.cpp118
-rw-r--r--editor/filesystem_dock.h22
-rw-r--r--editor/find_in_files.cpp8
-rw-r--r--editor/import/editor_import_collada.cpp62
-rw-r--r--editor/import/editor_import_plugin.cpp2
-rw-r--r--editor/import/editor_import_plugin.h4
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp41
-rw-r--r--editor/import/resource_importer_bitmask.cpp4
-rw-r--r--editor/import/resource_importer_bitmask.h4
-rw-r--r--editor/import/resource_importer_csv_translation.cpp4
-rw-r--r--editor/import/resource_importer_csv_translation.h4
-rw-r--r--editor/import/resource_importer_image.cpp2
-rw-r--r--editor/import/resource_importer_image.h4
-rw-r--r--editor/import/resource_importer_layered_texture.cpp83
-rw-r--r--editor/import/resource_importer_layered_texture.h8
-rw-r--r--editor/import/resource_importer_obj.cpp2
-rw-r--r--editor/import/resource_importer_obj.h2
-rw-r--r--editor/import/resource_importer_scene.cpp18
-rw-r--r--editor/import/resource_importer_scene.h4
-rw-r--r--editor/import/resource_importer_texture.cpp110
-rw-r--r--editor/import/resource_importer_texture.h10
-rw-r--r--editor/import/resource_importer_wav.cpp2
-rw-r--r--editor/import/resource_importer_wav.h4
-rw-r--r--editor/import_dock.cpp2
-rw-r--r--editor/import_dock.h2
-rw-r--r--editor/plugin_config_dialog.cpp10
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp40
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.h4
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp14
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp20
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp25
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp22
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp28
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp3
-rw-r--r--editor/plugins/audio_stream_editor_plugin.h2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp33
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/editor_preview_plugins.cpp18
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp2
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp1
-rw-r--r--editor/plugins/material_editor_plugin.cpp204
-rw-r--r--editor/plugins/material_editor_plugin.h65
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp77
-rw-r--r--editor/plugins/mesh_editor_plugin.h15
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp14
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp5
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp6
-rw-r--r--editor/plugins/particles_editor_plugin.cpp6
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/path_editor_plugin.cpp4
-rw-r--r--editor/plugins/path_editor_plugin.h1
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp82
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h1
-rw-r--r--editor/plugins/script_editor_plugin.cpp3
-rw-r--r--editor/plugins/script_text_editor.cpp135
-rw-r--r--editor/plugins/script_text_editor.h5
-rw-r--r--editor/plugins/shader_editor_plugin.cpp69
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp197
-rw-r--r--editor/plugins/spatial_editor_plugin.h9
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp64
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h28
-rw-r--r--editor/plugins/texture_editor_plugin.cpp44
-rw-r--r--editor/plugins/texture_editor_plugin.h16
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp24
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp669
-rw-r--r--editor/plugins/tile_set_editor_plugin.h30
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp28
-rw-r--r--editor/project_export.cpp15
-rw-r--r--editor/project_manager.cpp35
-rw-r--r--editor/project_manager.h1
-rw-r--r--editor/project_settings_editor.cpp40
-rw-r--r--editor/property_editor.cpp16
-rw-r--r--editor/scene_tree_dock.cpp53
-rw-r--r--editor/scene_tree_editor.cpp54
-rw-r--r--editor/scene_tree_editor.h2
-rw-r--r--editor/script_create_dialog.cpp4
-rw-r--r--editor/script_editor_debugger.cpp69
-rw-r--r--editor/script_editor_debugger.h2
-rw-r--r--editor/settings_config_dialog.cpp6
-rw-r--r--editor/spatial_editor_gizmos.cpp200
-rw-r--r--editor/spatial_editor_gizmos.h21
-rw-r--r--editor/translations/af.po680
-rw-r--r--editor/translations/ar.po751
-rw-r--r--editor/translations/bg.po710
-rw-r--r--editor/translations/bn.po749
-rw-r--r--editor/translations/ca.po743
-rw-r--r--editor/translations/cs.po1049
-rw-r--r--editor/translations/da.po712
-rw-r--r--editor/translations/de.po823
-rw-r--r--editor/translations/de_CH.po672
-rw-r--r--editor/translations/editor.pot606
-rw-r--r--editor/translations/el.po757
-rw-r--r--editor/translations/es.po950
-rw-r--r--editor/translations/es_AR.po780
-rw-r--r--editor/translations/et.po606
-rw-r--r--editor/translations/fa.po695
-rw-r--r--editor/translations/fi.po762
-rw-r--r--editor/translations/fr.po1079
-rw-r--r--editor/translations/he.po709
-rw-r--r--editor/translations/hi.po649
-rw-r--r--editor/translations/hr.po606
-rw-r--r--editor/translations/hu.po731
-rw-r--r--editor/translations/id.po992
-rw-r--r--editor/translations/is.po636
-rw-r--r--editor/translations/it.po777
-rw-r--r--editor/translations/ja.po1114
-rw-r--r--editor/translations/ka.po757
-rw-r--r--editor/translations/ko.po980
-rw-r--r--editor/translations/lt.po657
-rw-r--r--editor/translations/lv.po653
-rw-r--r--editor/translations/ml.po606
-rw-r--r--editor/translations/ms.po621
-rw-r--r--editor/translations/nb.po871
-rw-r--r--editor/translations/nl.po742
-rw-r--r--editor/translations/pl.po822
-rw-r--r--editor/translations/pr.po650
-rw-r--r--editor/translations/pt_BR.po865
-rw-r--r--editor/translations/pt_PT.po754
-rw-r--r--editor/translations/ro.po727
-rw-r--r--editor/translations/ru.po769
-rw-r--r--editor/translations/si.po628
-rw-r--r--editor/translations/sk.po911
-rw-r--r--editor/translations/sl.po719
-rw-r--r--editor/translations/sq.po623
-rw-r--r--editor/translations/sr_Cyrl.po734
-rw-r--r--editor/translations/sr_Latn.po640
-rw-r--r--editor/translations/sv.po725
-rw-r--r--editor/translations/ta.po629
-rw-r--r--editor/translations/te.po606
-rw-r--r--editor/translations/th.po746
-rw-r--r--editor/translations/tr.po882
-rw-r--r--editor/translations/uk.po744
-rw-r--r--editor/translations/ur_PK.po633
-rw-r--r--editor/translations/vi.po690
-rw-r--r--editor/translations/zh_CN.po933
-rw-r--r--editor/translations/zh_HK.po706
-rw-r--r--editor/translations/zh_TW.po1026
-rw-r--r--main/gamecontrollerdb.txt17
-rw-r--r--main/input_default.cpp30
-rw-r--r--main/input_default.h8
-rw-r--r--main/main.cpp51
-rw-r--r--main/main_timer_sync.cpp (renamed from main/timer_sync.cpp)4
-rw-r--r--main/main_timer_sync.h (renamed from main/timer_sync.h)8
-rw-r--r--main/tests/test_gdscript.cpp14
-rw-r--r--main/tests/test_image.cpp69
-rw-r--r--main/tests/test_main.cpp8
-rw-r--r--main/tests/test_math.cpp2
-rw-r--r--main/tests/test_shader_lang.cpp16
-rw-r--r--main/tests/test_string.cpp10
-rw-r--r--methods.py26
-rw-r--r--misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj84
-rw-r--r--misc/dist/ios_xcode/godot_ios/godot_ios-Info.plist19
-rw-r--r--misc/dist/linux/godot.68
-rwxr-xr-xmisc/dist/osx_tools.app/Contents/Info.plist4
-rw-r--r--modules/bullet/SCsub4
-rw-r--r--modules/bullet/btRayShape.cpp6
-rw-r--r--modules/bullet/bullet_types_converter.h2
-rw-r--r--modules/bullet/collision_object_bullet.cpp4
-rw-r--r--modules/bullet/godot_ray_world_algorithm.cpp4
-rw-r--r--modules/bullet/godot_result_callbacks.cpp10
-rw-r--r--modules/bullet/rigid_body_bullet.h2
-rw-r--r--modules/bullet/space_bullet.cpp68
-rw-r--r--modules/bullet/space_bullet.h1
-rw-r--r--modules/csg/csg.cpp20
-rw-r--r--modules/csg/csg.h2
-rw-r--r--modules/csg/csg_gizmos.cpp4
-rw-r--r--modules/csg/csg_gizmos.h1
-rw-r--r--modules/csg/csg_shape.cpp7
-rw-r--r--modules/csg/doc_classes/CSGShape.xml6
-rw-r--r--modules/dds/texture_loader_dds.cpp10
-rw-r--r--modules/enet/doc_classes/NetworkedMultiplayerENet.xml2
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp8
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.cpp4
-rw-r--r--modules/gdnative/gdnative.cpp1
-rw-r--r--modules/gdnative/gdnative/array.cpp2
-rw-r--r--modules/gdnative/gdnative/basis.cpp2
-rw-r--r--modules/gdnative/gdnative/dictionary.cpp14
-rw-r--r--modules/gdnative/gdnative/pool_arrays.cpp2
-rw-r--r--modules/gdnative/gdnative/string.cpp2
-rw-r--r--modules/gdnative/gdnative/string_name.cpp2
-rw-r--r--modules/gdnative/gdnative_api.json60
-rw-r--r--modules/gdnative/gdnative_builders.py3
-rw-r--r--modules/gdnative/include/gdnative/dictionary.h4
-rw-r--r--modules/gdnative/include/net/godot_net.h10
-rw-r--r--modules/gdnative/include/videodecoder/godot_videodecoder.h4
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp49
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.cpp2
-rw-r--r--modules/gdnative/net/packet_peer_gdnative.cpp2
-rw-r--r--modules/gdnative/net/stream_peer_gdnative.cpp8
-rw-r--r--modules/gdnative/net/stream_peer_gdnative.h4
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp3
-rw-r--r--modules/gdnative/register_types.cpp4
-rw-r--r--modules/gdnative/videodecoder/register_types.cpp4
-rw-r--r--modules/gdnative/videodecoder/register_types.h4
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.cpp30
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.h4
-rw-r--r--modules/gdscript/gdscript.cpp154
-rw-r--r--modules/gdscript/gdscript.h1
-rw-r--r--modules/gdscript/gdscript_compiler.cpp62
-rw-r--r--modules/gdscript/gdscript_editor.cpp58
-rw-r--r--modules/gdscript/gdscript_function.cpp15
-rw-r--r--modules/gdscript/gdscript_function.h13
-rw-r--r--modules/gdscript/gdscript_parser.cpp224
-rw-r--r--modules/gdscript/gdscript_parser.h10
-rw-r--r--modules/gdscript/gdscript_tokenizer.cpp19
-rw-r--r--modules/gdscript/gdscript_tokenizer.h13
-rw-r--r--modules/gridmap/grid_map.cpp2
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp69
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h7
-rwxr-xr-xmodules/mbedtls/stream_peer_mbed_tls.cpp7
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp2
-rw-r--r--modules/mono/csharp_script.cpp363
-rw-r--r--modules/mono/csharp_script.h48
-rw-r--r--modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs41
-rw-r--r--modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj2
-rw-r--r--modules/mono/editor/GodotSharpTools/Project/IdentifierUtils.cs199
-rw-r--r--modules/mono/editor/GodotSharpTools/Project/ProjectGenerator.cs5
-rw-r--r--modules/mono/editor/bindings_generator.cpp38
-rw-r--r--modules/mono/editor/godotsharp_builds.cpp61
-rw-r--r--modules/mono/editor/godotsharp_builds.h3
-rw-r--r--modules/mono/editor/godotsharp_editor.cpp104
-rw-r--r--modules/mono/editor/godotsharp_editor.h2
-rw-r--r--modules/mono/editor/godotsharp_export.cpp6
-rw-r--r--modules/mono/editor/mono_bottom_panel.cpp25
-rw-r--r--modules/mono/editor/mono_bottom_panel.h4
-rw-r--r--modules/mono/editor/script_class_parser.cpp29
-rw-r--r--modules/mono/glue/Managed/Files/Array.cs16
-rw-r--r--modules/mono/glue/Managed/Files/Basis.cs435
-rw-r--r--modules/mono/glue/Managed/Files/DebuggingUtils.cs6
-rw-r--r--modules/mono/glue/Managed/Files/Dictionary.cs3
-rw-r--r--modules/mono/glue/Managed/Files/GD.cs101
-rw-r--r--modules/mono/glue/Managed/Files/GodotTraceListener.cs37
-rw-r--r--modules/mono/glue/Managed/Files/Mathf.cs4
-rw-r--r--modules/mono/glue/Managed/Files/MathfEx.cs5
-rw-r--r--modules/mono/glue/Managed/Files/NodePath.cs14
-rw-r--r--modules/mono/glue/Managed/Files/Object.base.cs8
-rw-r--r--modules/mono/glue/Managed/Files/Quat.cs31
-rw-r--r--modules/mono/glue/Managed/Files/RID.cs12
-rw-r--r--modules/mono/glue/Managed/Files/Transform.cs38
-rw-r--r--modules/mono/glue/Managed/Files/Transform2D.cs176
-rw-r--r--modules/mono/glue/Managed/Files/Vector2.cs2
-rw-r--r--modules/mono/glue/Managed/Managed.csproj2
-rw-r--r--modules/mono/glue/base_object_glue.cpp35
-rw-r--r--modules/mono/glue/collections_glue.cpp9
-rw-r--r--modules/mono/glue/collections_glue.h2
-rw-r--r--modules/mono/glue/gd_glue.cpp33
-rw-r--r--modules/mono/glue/gd_glue.h16
-rw-r--r--modules/mono/godotsharp_dirs.cpp25
-rw-r--r--modules/mono/godotsharp_dirs.h5
-rw-r--r--modules/mono/mono_gc_handle.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp200
-rw-r--r--modules/mono/mono_gd/gd_mono.h26
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp20
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.h4
-rw-r--r--modules/mono/mono_gd/gd_mono_class.cpp10
-rw-r--r--modules/mono/mono_gd/gd_mono_class.h3
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp16
-rw-r--r--modules/mono/mono_gd/gd_mono_field.h16
-rw-r--r--modules/mono/mono_gd/gd_mono_header.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp48
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_log.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp84
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h7
-rw-r--r--modules/mono/mono_gd/gd_mono_method.cpp14
-rw-r--r--modules/mono/mono_gd/gd_mono_method.h18
-rw-r--r--modules/mono/mono_gd/gd_mono_property.cpp14
-rw-r--r--modules/mono/mono_gd/gd_mono_property.h16
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp95
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.h4
-rw-r--r--modules/mono/mono_gd/i_mono_class_member.h (renamed from modules/mono/mono_gd/gd_mono_class_member.h)12
-rw-r--r--modules/mono/utils/macros.h48
-rw-r--r--modules/mono/utils/mono_reg_utils.cpp2
-rw-r--r--modules/mono/utils/osx_utils.cpp4
-rw-r--r--modules/opensimplex/doc_classes/NoiseTexture.xml2
-rw-r--r--modules/opensimplex/noise_texture.cpp30
-rw-r--r--modules/opensimplex/noise_texture.h5
-rw-r--r--modules/opus/SCsub307
-rw-r--r--modules/pvr/texture_loader_pvr.cpp2
-rw-r--r--modules/recast/navigation_mesh_generator.cpp28
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.cpp2
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.h4
-rw-r--r--modules/theora/video_stream_theora.cpp4
-rw-r--r--modules/upnp/register_types.cpp2
-rw-r--r--modules/upnp/upnp.h2
-rw-r--r--modules/upnp/upnp_device.cpp (renamed from modules/upnp/upnpdevice.cpp)4
-rw-r--r--modules/upnp/upnp_device.h (renamed from modules/upnp/upnpdevice.h)8
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCondition.xml2
-rw-r--r--modules/visual_script/visual_script.cpp25
-rw-r--r--modules/visual_script/visual_script.h1
-rw-r--r--modules/visual_script/visual_script_editor.cpp2
-rw-r--r--modules/visual_script/visual_script_expression.cpp48
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp5
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp22
-rw-r--r--modules/webp/SCsub7
-rw-r--r--modules/websocket/SCsub117
-rw-r--r--modules/websocket/lws_client.cpp12
-rw-r--r--modules/websocket/lws_peer.cpp2
-rw-r--r--modules/websocket/lws_server.cpp4
-rw-r--r--modules/websocket/packet_buffer.h6
-rw-r--r--modules/websocket/websocket_client.h2
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp (renamed from modules/websocket/websocket_multiplayer.cpp)11
-rw-r--r--modules/websocket/websocket_multiplayer_peer.h (renamed from modules/websocket/websocket_multiplayer.h)2
-rw-r--r--modules/websocket/websocket_server.h2
-rw-r--r--modules/xatlas_unwrap/register_types.cpp4
-rw-r--r--platform/android/AndroidManifest.xml.template5
-rw-r--r--platform/android/audio_driver_opensl.cpp113
-rw-r--r--platform/android/audio_driver_opensl.h17
-rw-r--r--platform/android/detect.py6
-rw-r--r--platform/android/dir_access_jandroid.cpp3
-rw-r--r--platform/android/export/export.cpp46
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java52
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotIO.java13
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotInstrumentation.java (renamed from main/tests/test_image.h)27
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotLib.java5
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotView.java10
-rw-r--r--platform/android/java_class_wrapper.cpp11
-rw-r--r--platform/android/java_glue.cpp105
-rw-r--r--platform/android/java_glue.h5
-rw-r--r--platform/android/os_android.cpp29
-rw-r--r--platform/android/os_android.h10
-rw-r--r--platform/android/power_android.cpp12
-rw-r--r--platform/android/power_android.h13
-rw-r--r--platform/android/string_android.h (renamed from core/os/shell.h)44
-rw-r--r--platform/haiku/os_haiku.cpp2
-rw-r--r--platform/iphone/SCsub2
-rw-r--r--platform/iphone/app_delegate.mm24
-rw-r--r--platform/iphone/detect.py8
-rw-r--r--platform/iphone/export/export.cpp102
-rw-r--r--platform/iphone/gl_view.mm32
-rw-r--r--platform/iphone/os_iphone.cpp7
-rw-r--r--platform/iphone/power_iphone.h6
-rw-r--r--platform/iphone/semaphore_iphone.cpp (renamed from platform/iphone/sem_iphone.cpp)5
-rw-r--r--platform/iphone/semaphore_iphone.h (renamed from platform/iphone/sem_iphone.h)8
-rw-r--r--platform/javascript/audio_driver_javascript.cpp2
-rw-r--r--platform/javascript/detect.py8
-rw-r--r--platform/javascript/engine.js3
-rw-r--r--platform/javascript/export/export.cpp40
-rw-r--r--platform/javascript/http_request.js6
-rw-r--r--platform/javascript/javascript_eval.cpp4
-rw-r--r--platform/javascript/os_javascript.cpp16
-rw-r--r--platform/osx/SCsub2
-rw-r--r--platform/osx/crash_handler_osx.h2
-rw-r--r--platform/osx/crash_handler_osx.mm4
-rw-r--r--platform/osx/export/export.cpp4
-rw-r--r--platform/osx/os_osx.h5
-rw-r--r--platform/osx/os_osx.mm102
-rw-r--r--platform/osx/power_osx.cpp16
-rw-r--r--platform/osx/power_osx.h13
-rw-r--r--platform/osx/semaphore_osx.cpp (renamed from platform/osx/sem_osx.cpp)5
-rw-r--r--platform/osx/semaphore_osx.h (renamed from platform/osx/sem_osx.h)8
-rw-r--r--platform/server/SCsub2
-rw-r--r--platform/server/detect.py74
-rw-r--r--platform/server/os_server.cpp2
-rw-r--r--platform/server/os_server.h5
-rw-r--r--platform/uwp/SCsub4
-rw-r--r--platform/uwp/app.cpp10
-rw-r--r--platform/uwp/app.h2
-rw-r--r--platform/uwp/context_egl_uwp.cpp (renamed from platform/uwp/gl_context_egl.cpp)24
-rw-r--r--platform/uwp/context_egl_uwp.h (renamed from platform/uwp/gl_context_egl.h)17
-rw-r--r--platform/uwp/detect.py1
-rw-r--r--platform/uwp/export/export.cpp24
-rw-r--r--platform/uwp/os_uwp.cpp183
-rw-r--r--platform/uwp/os_uwp.h17
-rw-r--r--platform/uwp/power_uwp.h6
-rw-r--r--platform/windows/SCsub11
-rw-r--r--platform/windows/context_gl_windows.cpp (renamed from platform/windows/context_gl_win.cpp)24
-rw-r--r--platform/windows/context_gl_windows.h (renamed from platform/windows/context_gl_win.h)8
-rw-r--r--platform/windows/crash_handler_windows.cpp (renamed from platform/windows/crash_handler_win.cpp)7
-rw-r--r--platform/windows/crash_handler_windows.h (renamed from platform/windows/crash_handler_win.h)8
-rw-r--r--platform/windows/ctxgl_procaddr.cpp188
-rw-r--r--platform/windows/ctxgl_procaddr.h39
-rw-r--r--platform/windows/detect.py10
-rw-r--r--platform/windows/export/export.cpp4
-rw-r--r--platform/windows/godot.natvis147
-rw-r--r--platform/windows/godot_windows.cpp (renamed from platform/windows/godot_win.cpp)3
-rw-r--r--platform/windows/joypad_windows.cpp (renamed from platform/windows/joypad.cpp)4
-rw-r--r--platform/windows/joypad_windows.h (renamed from platform/windows/joypad.h)9
-rw-r--r--platform/windows/key_mapping_windows.cpp (renamed from platform/windows/key_mapping_win.cpp)4
-rw-r--r--platform/windows/key_mapping_windows.h (renamed from platform/windows/key_mapping_win.h)4
-rw-r--r--platform/windows/os_windows.cpp84
-rw-r--r--platform/windows/os_windows.h24
-rw-r--r--platform/windows/power_windows.h6
-rw-r--r--platform/x11/crash_handler_x11.cpp9
-rw-r--r--platform/x11/crash_handler_x11.h2
-rw-r--r--platform/x11/detect.py18
-rw-r--r--platform/x11/detect_prime.cpp4
-rw-r--r--platform/x11/joypad_linux.cpp10
-rw-r--r--platform/x11/os_x11.cpp73
-rw-r--r--platform/x11/os_x11.h2
-rw-r--r--platform/x11/power_x11.h6
-rw-r--r--scene/2d/animated_sprite.cpp6
-rw-r--r--scene/2d/area_2d.cpp4
-rw-r--r--scene/2d/audio_stream_player_2d.cpp35
-rw-r--r--scene/2d/audio_stream_player_2d.h5
-rw-r--r--scene/2d/canvas_item.cpp20
-rw-r--r--scene/2d/collision_polygon_2d.cpp35
-rw-r--r--scene/2d/collision_shape_2d.cpp2
-rw-r--r--scene/2d/cpu_particles_2d.cpp89
-rw-r--r--scene/2d/cpu_particles_2d.h3
-rw-r--r--scene/2d/line_builder.h2
-rw-r--r--scene/2d/navigation_2d.cpp (renamed from scene/2d/navigation2d.cpp)4
-rw-r--r--scene/2d/navigation_2d.h (renamed from scene/2d/navigation2d.h)4
-rw-r--r--scene/2d/navigation_polygon.cpp2
-rw-r--r--scene/2d/node_2d.cpp2
-rw-r--r--scene/2d/particles_2d.cpp5
-rw-r--r--scene/2d/path_2d.cpp3
-rw-r--r--scene/2d/physics_body_2d.cpp34
-rw-r--r--scene/2d/polygon_2d.cpp32
-rw-r--r--scene/2d/polygon_2d.h3
-rw-r--r--scene/2d/skeleton_2d.cpp3
-rw-r--r--scene/2d/sprite.cpp2
-rw-r--r--scene/2d/tile_map.cpp80
-rw-r--r--scene/2d/tile_map.h2
-rw-r--r--scene/2d/touch_screen_button.cpp (renamed from scene/2d/screen_button.cpp)5
-rw-r--r--scene/2d/touch_screen_button.h (renamed from scene/2d/screen_button.h)10
-rw-r--r--scene/3d/SCsub2
-rw-r--r--scene/3d/area.cpp4
-rw-r--r--scene/3d/audio_stream_player_3d.cpp97
-rw-r--r--scene/3d/audio_stream_player_3d.h5
-rw-r--r--scene/3d/camera.cpp4
-rw-r--r--scene/3d/collision_shape.cpp4
-rw-r--r--scene/3d/cpu_particles.cpp84
-rw-r--r--scene/3d/cpu_particles.h3
-rw-r--r--scene/3d/gi_probe.cpp10
-rw-r--r--scene/3d/gi_probe.h2
-rw-r--r--scene/3d/light.cpp7
-rw-r--r--scene/3d/light.h1
-rw-r--r--scene/3d/navigation_mesh.cpp6
-rw-r--r--scene/3d/particles.cpp8
-rw-r--r--scene/3d/path.cpp6
-rw-r--r--scene/3d/physics_body.cpp40
-rw-r--r--scene/3d/physics_body.h4
-rw-r--r--scene/3d/reflection_probe.h2
-rw-r--r--scene/3d/skeleton.cpp58
-rw-r--r--scene/3d/skeleton.h4
-rw-r--r--scene/3d/spatial.cpp2
-rw-r--r--scene/3d/sprite_3d.cpp34
-rw-r--r--scene/3d/voxel_light_baker.cpp34
-rw-r--r--scene/3d/world_environment.cpp (renamed from scene/3d/scenario_fx.cpp)4
-rw-r--r--scene/3d/world_environment.h (renamed from scene/3d/scenario_fx.h)2
-rw-r--r--scene/animation/animation_blend_space_2d.cpp8
-rw-r--r--scene/animation/animation_cache.cpp10
-rw-r--r--scene/animation/animation_node_state_machine.cpp3
-rw-r--r--scene/animation/animation_player.cpp47
-rw-r--r--scene/animation/animation_player.h45
-rw-r--r--scene/animation/animation_tree.cpp30
-rw-r--r--scene/animation/animation_tree_player.cpp30
-rw-r--r--scene/animation/animation_tree_player.h8
-rw-r--r--scene/audio/audio_stream_player.cpp (renamed from scene/audio/audio_player.cpp)31
-rw-r--r--scene/audio/audio_stream_player.h (renamed from scene/audio/audio_player.h)12
-rw-r--r--scene/gui/button.cpp4
-rw-r--r--scene/gui/color_picker.cpp2
-rw-r--r--scene/gui/container.cpp13
-rw-r--r--scene/gui/container.h2
-rw-r--r--scene/gui/control.cpp86
-rw-r--r--scene/gui/control.h5
-rw-r--r--scene/gui/file_dialog.cpp3
-rw-r--r--scene/gui/gradient_edit.h2
-rw-r--r--scene/gui/graph_edit.cpp27
-rw-r--r--scene/gui/graph_node.cpp6
-rw-r--r--scene/gui/item_list.cpp12
-rw-r--r--scene/gui/line_edit.cpp4
-rw-r--r--scene/gui/link_button.h2
-rw-r--r--scene/gui/option_button.cpp7
-rw-r--r--scene/gui/option_button.h1
-rw-r--r--scene/gui/popup.cpp35
-rw-r--r--scene/gui/popup_menu.cpp6
-rw-r--r--scene/gui/progress_bar.cpp9
-rw-r--r--scene/gui/rich_text_label.cpp33
-rw-r--r--scene/gui/rich_text_label.h2
-rw-r--r--scene/gui/scroll_container.cpp6
-rw-r--r--scene/gui/split_container.cpp41
-rw-r--r--scene/gui/text_edit.cpp104
-rw-r--r--scene/gui/texture_button.cpp10
-rw-r--r--scene/gui/texture_button.h2
-rw-r--r--scene/gui/texture_progress.cpp17
-rw-r--r--scene/gui/tree.cpp30
-rw-r--r--scene/main/node.cpp7
-rw-r--r--scene/main/node.h2
-rw-r--r--scene/main/scene_tree.cpp7
-rw-r--r--scene/main/scene_tree.h1
-rw-r--r--scene/main/viewport.cpp203
-rw-r--r--scene/main/viewport.h4
-rw-r--r--scene/register_scene_types.cpp22
-rw-r--r--scene/resources/animation.cpp38
-rw-r--r--scene/resources/audio_stream_sample.cpp11
-rw-r--r--scene/resources/audio_stream_sample.h2
-rw-r--r--scene/resources/bit_map.cpp (renamed from scene/resources/bit_mask.cpp)6
-rw-r--r--scene/resources/bit_map.h (renamed from scene/resources/bit_mask.h)8
-rw-r--r--scene/resources/bounds.cpp52
-rw-r--r--scene/resources/bounds.h52
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
-rw-r--r--scene/resources/default_theme/tab_disabled.pngbin0 -> 1233 bytes
-rw-r--r--scene/resources/default_theme/theme_data.h6
-rw-r--r--scene/resources/dynamic_font.h5
-rw-r--r--scene/resources/environment.cpp11
-rw-r--r--scene/resources/environment.h2
-rw-r--r--scene/resources/gradient.cpp (renamed from scene/resources/color_ramp.cpp)5
-rw-r--r--scene/resources/gradient.h (renamed from scene/resources/color_ramp.h)8
-rw-r--r--scene/resources/line_shape_2d.cpp (renamed from scene/resources/shape_line_2d.cpp)5
-rw-r--r--scene/resources/line_shape_2d.h (renamed from scene/resources/shape_line_2d.h)8
-rw-r--r--scene/resources/material.cpp39
-rw-r--r--scene/resources/mesh.cpp44
-rw-r--r--scene/resources/mesh.h1
-rw-r--r--scene/resources/mesh_library.cpp26
-rw-r--r--scene/resources/mesh_library.h3
-rw-r--r--scene/resources/multimesh.cpp13
-rw-r--r--scene/resources/multimesh.h2
-rw-r--r--scene/resources/packed_scene.cpp26
-rw-r--r--scene/resources/particles_material.cpp6
-rw-r--r--scene/resources/polygon_path_finder.cpp4
-rw-r--r--scene/resources/primitive_meshes.cpp10
-rw-r--r--scene/resources/resource_format_text.cpp (renamed from scene/resources/scene_format_text.cpp)50
-rw-r--r--scene/resources/resource_format_text.h (renamed from scene/resources/scene_format_text.h)17
-rw-r--r--scene/resources/sky.cpp (renamed from scene/resources/sky_box.cpp)24
-rw-r--r--scene/resources/sky.h (renamed from scene/resources/sky_box.h)11
-rw-r--r--scene/resources/style_box.cpp1
-rw-r--r--scene/resources/surface_tool.cpp10
-rw-r--r--scene/resources/surface_tool.h2
-rw-r--r--scene/resources/texture.cpp68
-rw-r--r--scene/resources/texture.h11
-rw-r--r--scene/resources/theme.cpp4
-rw-r--r--scene/resources/tile_set.cpp32
-rw-r--r--scene/resources/tile_set.h2
-rw-r--r--scene/resources/visual_shader.cpp4
-rw-r--r--scene/resources/visual_shader_nodes.cpp6
-rw-r--r--scene/scene_string_names.cpp2
-rw-r--r--scene/scene_string_names.h4
-rw-r--r--servers/audio/audio_stream.cpp32
-rw-r--r--servers/audio/reverb_sw.cpp3
-rw-r--r--servers/audio_server.cpp28
-rw-r--r--servers/physics/body_sw.cpp2
-rw-r--r--servers/physics/collision_object_sw.h2
-rw-r--r--servers/physics/collision_solver_sat.cpp8
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.cpp4
-rw-r--r--servers/physics/physics_server_sw.cpp18
-rw-r--r--servers/physics/shape_sw.cpp2
-rw-r--r--servers/physics/space_sw.cpp39
-rw-r--r--servers/physics/space_sw.h1
-rw-r--r--servers/physics_2d/body_pair_2d_sw.cpp4
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp21
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp33
-rw-r--r--servers/physics_2d/space_2d_sw.cpp68
-rw-r--r--servers/physics_2d/space_2d_sw.h1
-rw-r--r--servers/physics_2d_server.cpp1
-rw-r--r--servers/physics_2d_server.h7
-rw-r--r--servers/physics_server.cpp8
-rw-r--r--servers/physics_server.h6
-rw-r--r--servers/register_server_types.cpp19
-rw-r--r--servers/visual/rasterizer.h13
-rw-r--r--servers/visual/shader_language.cpp114
-rw-r--r--servers/visual/shader_language.h144
-rw-r--r--servers/visual/visual_server_canvas.cpp39
-rw-r--r--servers/visual/visual_server_globals.cpp (renamed from servers/visual/visual_server_global.cpp)4
-rw-r--r--servers/visual/visual_server_globals.h (renamed from servers/visual/visual_server_global.h)8
-rw-r--r--servers/visual/visual_server_raster.cpp5
-rw-r--r--servers/visual/visual_server_raster.h4
-rw-r--r--servers/visual/visual_server_scene.cpp17
-rw-r--r--servers/visual/visual_server_scene.h2
-rw-r--r--servers/visual/visual_server_viewport.cpp4
-rw-r--r--servers/visual/visual_server_viewport.h3
-rw-r--r--servers/visual/visual_server_wrap_mt.h1
-rw-r--r--servers/visual_server.cpp18
-rw-r--r--servers/visual_server.h1
-rw-r--r--thirdparty/README.md64
-rw-r--r--thirdparty/glad/LICENSE20
-rw-r--r--thirdparty/glad/glad.c8
-rw-r--r--thirdparty/glad/glad/glad.h2
-rw-r--r--thirdparty/libpng/LICENSE175
-rw-r--r--thirdparty/libpng/arm/arm_init.c3
-rw-r--r--thirdparty/libpng/arm/filter_neon.S2
-rw-r--r--thirdparty/libpng/arm/filter_neon_intrinsics.c27
-rw-r--r--thirdparty/libpng/arm/palette_neon_intrinsics.c149
-rw-r--r--thirdparty/libpng/png.c50
-rw-r--r--thirdparty/libpng/png.h303
-rw-r--r--thirdparty/libpng/pngconf.h16
-rw-r--r--thirdparty/libpng/pngdebug.h6
-rw-r--r--thirdparty/libpng/pngerror.c12
-rw-r--r--thirdparty/libpng/pngget.c6
-rw-r--r--thirdparty/libpng/pnginfo.h6
-rw-r--r--thirdparty/libpng/pnglibconf.h11
-rw-r--r--thirdparty/libpng/pngmem.c6
-rw-r--r--thirdparty/libpng/pngpread.c16
-rw-r--r--thirdparty/libpng/pngpriv.h38
-rw-r--r--thirdparty/libpng/pngread.c32
-rw-r--r--thirdparty/libpng/pngrio.c6
-rw-r--r--thirdparty/libpng/pngrtran.c88
-rw-r--r--thirdparty/libpng/pngrutil.c39
-rw-r--r--thirdparty/libpng/pngset.c12
-rw-r--r--thirdparty/libpng/pngstruct.h10
-rw-r--r--thirdparty/libpng/pngtrans.c12
-rw-r--r--thirdparty/libpng/pngwio.c6
-rw-r--r--thirdparty/libpng/pngwrite.c38
-rw-r--r--thirdparty/libpng/pngwtran.c11
-rw-r--r--thirdparty/libpng/pngwutil.c38
-rw-r--r--thirdparty/libvpx/rtcd/vpx_dsp_rtcd_x86.h10
-rw-r--r--thirdparty/libvpx/vpx_config.h4
-rw-r--r--thirdparty/libwebp/AUTHORS5
-rw-r--r--thirdparty/libwebp/src/dec/vp8i_dec.h2
-rw-r--r--thirdparty/libwebp/src/demux/demux.c2
-rw-r--r--thirdparty/libwebp/src/dsp/cost.c6
-rw-r--r--thirdparty/libwebp/src/dsp/cost_neon.c122
-rw-r--r--thirdparty/libwebp/src/dsp/quant.h70
-rw-r--r--thirdparty/libwebp/src/enc/histogram_enc.c368
-rw-r--r--thirdparty/libwebp/src/enc/predictor_enc.c14
-rw-r--r--thirdparty/libwebp/src/enc/quant_enc.c14
-rw-r--r--thirdparty/libwebp/src/enc/vp8i_enc.h2
-rw-r--r--thirdparty/libwebp/src/enc/vp8l_enc.c1
-rw-r--r--thirdparty/libwebp/src/mux/muxi.h2
-rw-r--r--thirdparty/libwebp/src/utils/bit_writer_utils.c1
-rw-r--r--thirdparty/libwebp/src/utils/utils.h26
-rw-r--r--thirdparty/libwebp/src/webp/decode.h12
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets.h435
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-adopt.h185
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-callbacks.h807
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-cgi.h103
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-client.h231
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-context-vhost.h927
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-dbus.h90
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-diskcache.h185
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-esp32.h226
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-fts.h214
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-genhash.h171
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-genrsa.h190
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-http.h685
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-jwk.h110
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-jws.h101
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-lejp.h262
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-logs.h224
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-lwsac.h191
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-misc.h836
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-network-helper.h105
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-plugin-generic-sessions.h74
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-protocols-plugins.h229
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-purify.h81
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-ring.h305
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-service.h215
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-sha1-base64.h93
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-spa.h140
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-stats.h75
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-threadpool.h231
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-timeout-timer.h164
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-tokenize.h136
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-vfs.h269
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-write.h235
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-writeable.h225
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-ws-close.h124
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-ws-ext.h197
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-ws-state.h92
-rw-r--r--thirdparty/libwebsockets/include/libwebsockets/lws-x509.h177
-rw-r--r--thirdparty/libwebsockets/include/lws_config.h (renamed from thirdparty/libwebsockets/lws_config.h)5
-rw-r--r--thirdparty/libwebsockets/ipv6_fixes.diff32
-rw-r--r--thirdparty/libwebsockets/lib/core/adopt.c414
-rw-r--r--thirdparty/libwebsockets/lib/core/alloc.c (renamed from thirdparty/libwebsockets/core/alloc.c)0
-rw-r--r--thirdparty/libwebsockets/lib/core/connect.c287
-rw-r--r--thirdparty/libwebsockets/lib/core/context.c (renamed from thirdparty/libwebsockets/core/context.c)549
-rw-r--r--thirdparty/libwebsockets/lib/core/dummy-callback.c611
-rw-r--r--thirdparty/libwebsockets/lib/core/libwebsockets.c (renamed from thirdparty/libwebsockets/core/libwebsockets.c)941
-rw-r--r--thirdparty/libwebsockets/lib/core/output.c (renamed from thirdparty/libwebsockets/core/output.c)183
-rw-r--r--thirdparty/libwebsockets/lib/core/pollfd.c (renamed from thirdparty/libwebsockets/core/pollfd.c)120
-rw-r--r--thirdparty/libwebsockets/lib/core/private.h (renamed from thirdparty/libwebsockets/core/private.h)565
-rw-r--r--thirdparty/libwebsockets/lib/core/service.c (renamed from thirdparty/libwebsockets/core/service.c)247
-rw-r--r--thirdparty/libwebsockets/lib/event-libs/poll/poll.c (renamed from thirdparty/libwebsockets/event-libs/poll/poll.c)0
-rw-r--r--thirdparty/libwebsockets/lib/event-libs/poll/private.h (renamed from thirdparty/libwebsockets/event-libs/poll/private.h)0
-rw-r--r--thirdparty/libwebsockets/lib/event-libs/private.h (renamed from thirdparty/libwebsockets/event-libs/private.h)2
-rw-r--r--thirdparty/libwebsockets/lib/lws_config_private.h (renamed from thirdparty/libwebsockets/lws_config_private.h)0
-rw-r--r--thirdparty/libwebsockets/lib/misc/base64-decode.c (renamed from thirdparty/libwebsockets/misc/base64-decode.c)3
-rw-r--r--thirdparty/libwebsockets/lib/misc/getifaddrs.c (renamed from thirdparty/libwebsockets/misc/getifaddrs.c)0
-rw-r--r--thirdparty/libwebsockets/lib/misc/getifaddrs.h (renamed from thirdparty/libwebsockets/misc/getifaddrs.h)0
-rw-r--r--thirdparty/libwebsockets/lib/misc/lejp.c (renamed from thirdparty/libwebsockets/misc/lejp.c)2
-rw-r--r--thirdparty/libwebsockets/lib/misc/sha-1.c (renamed from thirdparty/libwebsockets/misc/sha-1.c)8
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/private.h169
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-caps.c85
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-fds.c54
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-file.c172
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-init.c97
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-misc.c83
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-pipe.c62
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-service.c204
-rw-r--r--thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c263
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/private.h148
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/windows-fds.c76
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/windows-file.c185
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/windows-init.c110
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/windows-misc.c108
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/windows-pipe.c46
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/windows-service.c194
-rw-r--r--thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c288
-rw-r--r--thirdparty/libwebsockets/lib/roles/h1/ops-h1.c (renamed from thirdparty/libwebsockets/roles/h1/ops-h1.c)391
-rw-r--r--thirdparty/libwebsockets/lib/roles/h1/private.h (renamed from thirdparty/libwebsockets/roles/h1/private.h)0
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/client/client-handshake.c (renamed from thirdparty/libwebsockets/roles/http/client/client-handshake.c)432
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/client/client.c (renamed from thirdparty/libwebsockets/roles/http/client/client.c)133
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/header.c (renamed from thirdparty/libwebsockets/roles/http/header.c)172
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/lextable-strings.h (renamed from thirdparty/libwebsockets/roles/http/lextable-strings.h)6
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/lextable.h (renamed from thirdparty/libwebsockets/roles/http/lextable.h)0
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/private.h (renamed from thirdparty/libwebsockets/roles/http/private.h)27
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/server/fops-zip.c (renamed from thirdparty/libwebsockets/roles/http/server/fops-zip.c)0
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/server/lejp-conf.c (renamed from thirdparty/libwebsockets/roles/http/server/lejp-conf.c)91
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/server/parsers.c (renamed from thirdparty/libwebsockets/roles/http/server/parsers.c)69
-rw-r--r--thirdparty/libwebsockets/lib/roles/http/server/server.c (renamed from thirdparty/libwebsockets/roles/http/server/server.c)1152
-rw-r--r--thirdparty/libwebsockets/lib/roles/listen/ops-listen.c (renamed from thirdparty/libwebsockets/roles/listen/ops-listen.c)25
-rw-r--r--thirdparty/libwebsockets/lib/roles/pipe/ops-pipe.c (renamed from thirdparty/libwebsockets/roles/pipe/ops-pipe.c)16
-rw-r--r--thirdparty/libwebsockets/lib/roles/private.h (renamed from thirdparty/libwebsockets/roles/private.h)37
-rw-r--r--thirdparty/libwebsockets/lib/roles/raw-file/ops-raw-file.c108
-rw-r--r--thirdparty/libwebsockets/lib/roles/raw-skt/ops-raw-skt.c (renamed from thirdparty/libwebsockets/roles/raw/ops-raw.c)120
-rw-r--r--thirdparty/libwebsockets/lib/roles/ws/client-parser-ws.c (renamed from thirdparty/libwebsockets/roles/ws/client-parser-ws.c)10
-rw-r--r--thirdparty/libwebsockets/lib/roles/ws/client-ws.c (renamed from thirdparty/libwebsockets/roles/ws/client-ws.c)85
-rw-r--r--thirdparty/libwebsockets/lib/roles/ws/ops-ws.c (renamed from thirdparty/libwebsockets/roles/ws/ops-ws.c)99
-rw-r--r--thirdparty/libwebsockets/lib/roles/ws/private.h (renamed from thirdparty/libwebsockets/roles/ws/private.h)0
-rw-r--r--thirdparty/libwebsockets/lib/roles/ws/server-ws.c (renamed from thirdparty/libwebsockets/roles/ws/server-ws.c)230
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/lws-genhash.c (renamed from thirdparty/libwebsockets/tls/mbedtls/lws-genhash.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/lws-genrsa.c (renamed from thirdparty/libwebsockets/tls/mbedtls/lws-genrsa.c)12
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/mbedtls-client.c (renamed from thirdparty/libwebsockets/tls/mbedtls/mbedtls-client.c)21
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/mbedtls-server.c (renamed from thirdparty/libwebsockets/tls/mbedtls/mbedtls-server.c)19
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/ssl.c (renamed from thirdparty/libwebsockets/tls/mbedtls/ssl.c)33
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl3.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl3.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_cert.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_cert.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_code.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_code.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_dbg.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_dbg.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_lib.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_lib.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_methods.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_methods.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_pkey.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_pkey.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_stack.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_stack.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_types.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_types.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_x509.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_x509.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/tls1.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/tls1.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/x509_vfy.h)0
-rwxr-xr-xthirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/openssl/ssl.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/openssl/ssl.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/platform/ssl_pm.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/platform/ssl_pm.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/platform/ssl_port.h (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/include/platform/ssl_port.h)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_cert.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_cert.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_lib.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_lib.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_methods.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_methods.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_pkey.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_pkey.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_stack.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_stack.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_x509.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_x509.c)0
-rwxr-xr-xthirdparty/libwebsockets/lib/tls/mbedtls/wrapper/platform/ssl_pm.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/platform/ssl_pm.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/platform/ssl_port.c (renamed from thirdparty/libwebsockets/tls/mbedtls/wrapper/platform/ssl_port.c)0
-rw-r--r--thirdparty/libwebsockets/lib/tls/private.h (renamed from thirdparty/libwebsockets/tls/private.h)19
-rw-r--r--thirdparty/libwebsockets/lib/tls/tls-client.c (renamed from thirdparty/libwebsockets/tls/tls-client.c)15
-rw-r--r--thirdparty/libwebsockets/lib/tls/tls-server.c (renamed from thirdparty/libwebsockets/tls/tls-server.c)28
-rw-r--r--thirdparty/libwebsockets/lib/tls/tls.c (renamed from thirdparty/libwebsockets/tls/tls.c)53
-rw-r--r--thirdparty/libwebsockets/libwebsockets.h7346
-rw-r--r--thirdparty/libwebsockets/plat/lws-plat-unix.c977
-rw-r--r--thirdparty/libwebsockets/plat/lws-plat-win.c847
-rw-r--r--thirdparty/libwebsockets/roles/http/server/access-log.c182
-rw-r--r--thirdparty/libwebsockets/uwp_fixes.diff14
-rw-r--r--thirdparty/libwebsockets/win32helpers/getopt.c306
-rw-r--r--thirdparty/libwebsockets/win32helpers/getopt_long.c480
-rw-r--r--thirdparty/libwebsockets/win32helpers/gettimeofday.c70
-rw-r--r--thirdparty/mbedtls/1453.diff22
-rw-r--r--thirdparty/mbedtls/include/mbedtls/aes.h76
-rw-r--r--thirdparty/mbedtls/include/mbedtls/aesni.h46
-rw-r--r--thirdparty/mbedtls/include/mbedtls/arc4.h3
-rw-r--r--thirdparty/mbedtls/include/mbedtls/aria.h105
-rw-r--r--thirdparty/mbedtls/include/mbedtls/asn1write.h310
-rw-r--r--thirdparty/mbedtls/include/mbedtls/bignum.h807
-rw-r--r--thirdparty/mbedtls/include/mbedtls/blowfish.h143
-rw-r--r--thirdparty/mbedtls/include/mbedtls/bn_mul.h44
-rw-r--r--thirdparty/mbedtls/include/mbedtls/camellia.h219
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ccm.h115
-rw-r--r--thirdparty/mbedtls/include/mbedtls/chacha20.h56
-rw-r--r--thirdparty/mbedtls/include/mbedtls/chachapoly.h85
-rw-r--r--thirdparty/mbedtls/include/mbedtls/check_config.h15
-rw-r--r--thirdparty/mbedtls/include/mbedtls/cipher.h237
-rw-r--r--thirdparty/mbedtls/include/mbedtls/cmac.h1
-rw-r--r--thirdparty/mbedtls/include/mbedtls/config.h252
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ctr_drbg.h66
-rw-r--r--thirdparty/mbedtls/include/mbedtls/debug.h36
-rw-r--r--thirdparty/mbedtls/include/mbedtls/des.h6
-rw-r--r--thirdparty/mbedtls/include/mbedtls/dhm.h172
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ecdh.h288
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ecdsa.h326
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ecjpake.h145
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ecp.h590
-rw-r--r--thirdparty/mbedtls/include/mbedtls/entropy.h4
-rw-r--r--thirdparty/mbedtls/include/mbedtls/error.h13
-rw-r--r--thirdparty/mbedtls/include/mbedtls/gcm.h100
-rw-r--r--thirdparty/mbedtls/include/mbedtls/havege.h2
-rw-r--r--thirdparty/mbedtls/include/mbedtls/hkdf.h14
-rw-r--r--thirdparty/mbedtls/include/mbedtls/hmac_drbg.h32
-rw-r--r--thirdparty/mbedtls/include/mbedtls/md.h5
-rw-r--r--thirdparty/mbedtls/include/mbedtls/md2.h3
-rw-r--r--thirdparty/mbedtls/include/mbedtls/md4.h3
-rw-r--r--thirdparty/mbedtls/include/mbedtls/md5.h3
-rw-r--r--thirdparty/mbedtls/include/mbedtls/net_sockets.h2
-rw-r--r--thirdparty/mbedtls/include/mbedtls/oid.h3
-rw-r--r--thirdparty/mbedtls/include/mbedtls/padlock.h34
-rw-r--r--thirdparty/mbedtls/include/mbedtls/pem.h2
-rw-r--r--thirdparty/mbedtls/include/mbedtls/pk.h221
-rw-r--r--thirdparty/mbedtls/include/mbedtls/pk_internal.h23
-rw-r--r--thirdparty/mbedtls/include/mbedtls/pkcs11.h3
-rw-r--r--thirdparty/mbedtls/include/mbedtls/pkcs12.h4
-rw-r--r--thirdparty/mbedtls/include/mbedtls/pkcs5.h4
-rw-r--r--thirdparty/mbedtls/include/mbedtls/platform.h6
-rw-r--r--thirdparty/mbedtls/include/mbedtls/platform_util.h123
-rw-r--r--thirdparty/mbedtls/include/mbedtls/poly1305.h55
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ripemd160.h4
-rw-r--r--thirdparty/mbedtls/include/mbedtls/rsa.h596
-rw-r--r--thirdparty/mbedtls/include/mbedtls/sha1.h64
-rw-r--r--thirdparty/mbedtls/include/mbedtls/sha256.h91
-rw-r--r--thirdparty/mbedtls/include/mbedtls/sha512.h91
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ssl.h380
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ssl_cookie.h2
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ssl_internal.h74
-rw-r--r--thirdparty/mbedtls/include/mbedtls/ssl_ticket.h4
-rw-r--r--thirdparty/mbedtls/include/mbedtls/threading.h16
-rw-r--r--thirdparty/mbedtls/include/mbedtls/timing.h2
-rw-r--r--thirdparty/mbedtls/include/mbedtls/version.h8
-rw-r--r--thirdparty/mbedtls/include/mbedtls/x509_crt.h139
-rw-r--r--thirdparty/mbedtls/include/mbedtls/xtea.h4
-rw-r--r--thirdparty/mbedtls/library/aes.c134
-rw-r--r--thirdparty/mbedtls/library/aria.c85
-rw-r--r--thirdparty/mbedtls/library/asn1write.c57
-rw-r--r--thirdparty/mbedtls/library/bignum.c265
-rw-r--r--thirdparty/mbedtls/library/blowfish.c58
-rw-r--r--thirdparty/mbedtls/library/camellia.c70
-rw-r--r--thirdparty/mbedtls/library/ccm.c73
-rw-r--r--thirdparty/mbedtls/library/certs.c43
-rw-r--r--thirdparty/mbedtls/library/chacha20.c48
-rw-r--r--thirdparty/mbedtls/library/chachapoly.c111
-rw-r--r--thirdparty/mbedtls/library/cipher.c140
-rw-r--r--thirdparty/mbedtls/library/cipher_wrap.c6
-rw-r--r--thirdparty/mbedtls/library/ctr_drbg.c175
-rw-r--r--thirdparty/mbedtls/library/debug.c50
-rw-r--r--thirdparty/mbedtls/library/dhm.c58
-rw-r--r--thirdparty/mbedtls/library/ecdh.c535
-rw-r--r--thirdparty/mbedtls/library/ecdsa.c563
-rw-r--r--thirdparty/mbedtls/library/ecjpake.c38
-rw-r--r--thirdparty/mbedtls/library/ecp.c1204
-rw-r--r--thirdparty/mbedtls/library/ecp_curves.c8
-rw-r--r--thirdparty/mbedtls/library/entropy_poll.c57
-rw-r--r--thirdparty/mbedtls/library/entropy_poll.c.orig275
-rw-r--r--thirdparty/mbedtls/library/error.c39
-rw-r--r--thirdparty/mbedtls/library/gcm.c50
-rw-r--r--thirdparty/mbedtls/library/hmac_drbg.c124
-rw-r--r--thirdparty/mbedtls/library/nist_kw.c4
-rw-r--r--thirdparty/mbedtls/library/pem.c6
-rw-r--r--thirdparty/mbedtls/library/pk.c209
-rw-r--r--thirdparty/mbedtls/library/pk_wrap.c200
-rw-r--r--thirdparty/mbedtls/library/pkcs12.c4
-rw-r--r--thirdparty/mbedtls/library/pkcs5.c17
-rw-r--r--thirdparty/mbedtls/library/pkparse.c89
-rw-r--r--thirdparty/mbedtls/library/pkwrite.c32
-rw-r--r--thirdparty/mbedtls/library/platform.c13
-rw-r--r--thirdparty/mbedtls/library/platform_util.c69
-rw-r--r--thirdparty/mbedtls/library/poly1305.c48
-rw-r--r--thirdparty/mbedtls/library/rsa.c490
-rw-r--r--thirdparty/mbedtls/library/rsa_internal.c9
-rw-r--r--thirdparty/mbedtls/library/sha1.c24
-rw-r--r--thirdparty/mbedtls/library/sha256.c25
-rw-r--r--thirdparty/mbedtls/library/sha512.c25
-rw-r--r--thirdparty/mbedtls/library/ssl_ciphersuites.c6
-rw-r--r--thirdparty/mbedtls/library/ssl_cli.c196
-rw-r--r--thirdparty/mbedtls/library/ssl_srv.c89
-rw-r--r--thirdparty/mbedtls/library/ssl_ticket.c16
-rw-r--r--thirdparty/mbedtls/library/ssl_tls.c2077
-rw-r--r--thirdparty/mbedtls/library/threading.c47
-rw-r--r--thirdparty/mbedtls/library/timing.c12
-rw-r--r--thirdparty/mbedtls/library/version_features.c6
-rw-r--r--thirdparty/mbedtls/library/x509.c11
-rw-r--r--thirdparty/mbedtls/library/x509_create.c171
-rw-r--r--thirdparty/mbedtls/library/x509_crt.c706
-rw-r--r--thirdparty/mbedtls/padlock.diff13
-rw-r--r--thirdparty/misc/stb_truetype.h87
-rw-r--r--thirdparty/misc/stb_vorbis.c31
-rw-r--r--thirdparty/nanosvg/nanosvg.h80
-rw-r--r--thirdparty/nanosvg/nanosvgrast.h7
-rw-r--r--thirdparty/opus/http.c3465
-rw-r--r--thirdparty/opus/wincerts.c171
-rw-r--r--thirdparty/opus/winerrno.h90
-rw-r--r--thirdparty/pcre2/LICENCE14
-rw-r--r--thirdparty/pcre2/src/config.h32
-rw-r--r--thirdparty/pcre2/src/pcre2.h30
-rw-r--r--thirdparty/pcre2/src/pcre2_auto_possess.c7
-rw-r--r--thirdparty/pcre2/src/pcre2_chartables.c50
-rw-r--r--thirdparty/pcre2/src/pcre2_compile.c336
-rw-r--r--thirdparty/pcre2/src/pcre2_convert.c12
-rw-r--r--thirdparty/pcre2/src/pcre2_dfa_match.c271
-rw-r--r--thirdparty/pcre2/src/pcre2_error.c15
-rw-r--r--thirdparty/pcre2/src/pcre2_extuni.c8
-rw-r--r--thirdparty/pcre2/src/pcre2_find_bracket.c3
-rw-r--r--thirdparty/pcre2/src/pcre2_internal.h131
-rw-r--r--thirdparty/pcre2/src/pcre2_intmodedep.h17
-rw-r--r--thirdparty/pcre2/src/pcre2_jit_compile.c37
-rw-r--r--thirdparty/pcre2/src/pcre2_maketables.c9
-rw-r--r--thirdparty/pcre2/src/pcre2_match.c54
-rw-r--r--thirdparty/pcre2/src/pcre2_pattern_info.c3
-rw-r--r--thirdparty/pcre2/src/pcre2_serialize.c22
-rw-r--r--thirdparty/pcre2/src/pcre2_string_utils.c38
-rw-r--r--thirdparty/pcre2/src/pcre2_study.c6
-rw-r--r--thirdparty/pcre2/src/pcre2_substitute.c47
-rw-r--r--thirdparty/pcre2/src/pcre2_tables.c378
-rw-r--r--thirdparty/pcre2/src/pcre2_ucd.c6727
-rw-r--r--thirdparty/pcre2/src/pcre2_ucp.h48
-rw-r--r--thirdparty/pcre2/src/sljit/sljitConfigInternal.h29
-rw-r--r--thirdparty/pcre2/src/sljit/sljitExecAllocator.c9
-rw-r--r--thirdparty/pcre2/src/sljit/sljitLir.c10
-rw-r--r--thirdparty/pcre2/src/sljit/sljitLir.h20
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeARM_64.c250
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c112
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c4
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c4
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c48
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeX86_32.c79
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeX86_64.c120
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeX86_common.c17
-rw-r--r--thirdparty/rtaudio/RtAudio.cpp10232
-rw-r--r--thirdparty/rtaudio/RtAudio.h1183
-rw-r--r--thirdparty/tinyexr/tinyexr.h222
-rw-r--r--version.py5
1181 files changed, 81732 insertions, 52633 deletions
diff --git a/.clang-format b/.clang-format
index 3a2c39a174..237fd9ce30 100644
--- a/.clang-format
+++ b/.clang-format
@@ -116,6 +116,7 @@ Standard: Cpp03
---
### ObjC specific config ###
Language: ObjC
+Standard: Cpp03
ObjCBlockIndentWidth: 4
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
diff --git a/.gitignore b/.gitignore
index fe504482b3..6acab19251 100644
--- a/.gitignore
+++ b/.gitignore
@@ -316,3 +316,10 @@ platform/windows/godot_res.res
# Scons progress indicator
.scons_node_count
+
+# ccls cache (https://github.com/MaskRay/ccls)
+.ccls-cache/
+
+# compile commands (https://clang.llvm.org/docs/JSONCompilationDatabase.html)
+compile_commands.json
+
diff --git a/.mailmap b/.mailmap
index aa2e0911ec..1669494cb5 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,29 +1,69 @@
+Alexander Holland <alexander.holland@live.de>
+Alexander Holland <alexander.holland@live.de> <alexander.holland@haw-hamburg.de>
+Alexander Holland <alexander.holland@live.de> <AlexHolly>
Andrea Catania <info@andreacatania.com>
Andreas Haas <liu.gam3@gmail.com>
-Andreas Haas <Hinsbart@users.noreply.github.com>
-Andreas Haas <entenflugstuhl@gmail.com>
+Andreas Haas <liu.gam3@gmail.com> <hinsbart@gmail.com>
+Andreas Haas <liu.gam3@gmail.com> <hinsbart@users.noreply.github.com>
+Andreas Haas <liu.gam3@gmail.com> <entenflugstuhl@gmail.com>
Ariel Manzur <ariel@godotengine.org>
-Ariel Manzur <ariel@okamstudio.com>
+Ariel Manzur <ariel@godotengine.org> <punto@godotengine.org>
+Ariel Manzur <ariel@godotengine.org> <ariel@okamstudio.com>
+Ariel Manzur <ariel@godotengine.org> <punto@Ariels-Mac-mini.local>
+Ariel Manzur <ariel@godotengine.org> <punto@Ariels-Mac-mini-2.local>
Bastiaan Olij <mux213@gmail.com>
-Bernhard Liebl <poke1024@gmx.de>
-Bernhard Liebl <poke1024@gmx.org>
+Bernhard Liebl <Bernhard.Liebl@gmx.org> <poke1024@gmx.de>
+Bernhard Liebl <Bernhard.Liebl@gmx.org> <poke1024@gmx.org>
+Chris Bradfield <chris@kidscancode.org> <cb@scribe.net>
+Clay John <claynjohn@gmail.com>
+Clay John <claynjohn@gmail.com> <clayjohn@shaw.ca>
+Dana Olson <dana@shineuponthee.com> <adolson@gmail.com>
+Daniel J. Ramirez <djrmuv@gmail.com>
+Ferenc Arn <tagcup@yahoo.com>
+Ferenc Arn <tagcup@yahoo.com> <tagcup@users.noreply.github.com>
Geequlim <geequlim@gmail.com>
-Hugo Locurcio <hugo.locurcio@hugo.pro>
+Gilles Roudiere <gilles.roudiere@gmail.com>
+Gilles Roudiere <gilles.roudiere@gmail.com> <gilles.roudiere@laas.fr>
+Guilherme Felipe <guilhermefelipecgs@gmail.com>
Hugo Locurcio <hugo.locurcio@hugo.pro> <hugo.l@openmailbox.org>
Hugo Locurcio <hugo.locurcio@hugo.pro> <Calinou@users.noreply.github.com>
+Hugo Locurcio <hugo.locurcio@hugo.pro> Calinou <calinou@opmbx.org>
+Ian Bishop <ianb96@gmail.com>
Ignacio Etcheverry <ignalfonsore@gmail.com>
+Ignacio Etcheverry <ignalfonsore@gmail.com> <neikeq@users.noreply.github.com>
Indah Sylvia <ISylvox@yahoo.com>
+J08nY <johny@neuromancer.sk> <jancar.jj@gmail.com>
+J08nY <johny@neuromancer.sk> <J08nY@users.noreply.github.com>
Jakub Grzesik <kubecz3k@gmail.com>
+Jérôme Gully <jerome.gully0@gmail.com>
Juan Linietsky <reduzio@gmail.com>
-Juan Linietsky <juan@okamstudio.com>
-Juan Linietsky <reduz@Juans-MBP.fibertel.com.ar>
+Juan Linietsky <reduzio@gmail.com> <juan@godotengine.org>
+Juan Linietsky <reduzio@gmail.com> <juan@okamstudio.com>
+Juan Linietsky <reduzio@gmail.com> <reduz@Juans-MBP.fibertel.com.ar>
+Juan Linietsky <reduzio@gmail.com> <red@kyoko>
Julian Murgia <the.straton@gmail.com>
-Leon Krause <eska@eska.me>
-Leon Krause <eska@eska.me> <eska014@users.noreply.github.com>
+Kelly Thomas <kelly.thomas@hotmail.com.au>
+Leon Krause <lk@leonkrause.com> <eska@eska.me>
+Leon Krause <lk@leonkrause.com> <eska014@users.noreply.github.com>
Marcelo Fernandez <marcelofg55@gmail.com>
+Marcin Zawiejski <dragmz@gmail.com>
Mariano Javier Suligoy <marianognu.easyrpg@gmail.com>
+Mario Schlack <m4r10.5ch14ck@gmail.com>
+Max Hilbrunner <m.hilbrunner@gmail.com>
+Max Hilbrunner <m.hilbrunner@gmail.com> <mhilbrunner@users.noreply.github.com>
+Nathan Warden <nathan@nathanwarden.com> <nathanwardenlee@icloud.com>
+Nuno Donato <nunodonato@gmail.com> <n.donato@estrelasustentavel.pt>
+Pedro J. Estébanez <pedrojrulez@gmail.com> <RandomShaper@users.noreply.github.com>
Paul Batty <p_batty@hotmail.co.uk>
+Paul Batty <p_batty@hotmail.co.uk> <Paulb23@users.noreply.github.com>
+Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
+Pieter-Jan Briers <pieterjan.briers+git@gmail.com> <pieterjan.briers@gmail.com>
Poommetee Ketson <poommetee@protonmail.com>
+Rémi Verschelde <rverschelde@gmail.com> <remi@verschelde.fr>
+Ruslan Mustakov <r.mustakov@gmail.com> <ruslan.mustakov@xored.com>
Saracen <SaracenOne@gmail.com>
+Theo Hallenius <redsymbzone@hotmail.com>
Thomas Herzog <therzog@mail.de>
+Thomas Herzog <therzog@mail.de> <thomas.herzog@mail.com>
+Thomas Herzog <therzog@mail.de> <thomas.herzog@simedis.com>
Zher Huei Lee <lee.zh.92@gmail.com>
diff --git a/.travis.yml b/.travis.yml
index c3302cf806..65565db6f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,14 @@
language: cpp
# OS config, depends on actual 'os' in build matrix
-dist: trusty
+dist: xenial
sudo: false
env:
global:
- SCONS_CACHE=$HOME/.scons_cache
- SCONS_CACHE_LIMIT=1024
- - OPTIONS="debug_symbols=no verbose=yes progress=no gdnative_wrapper=yes"
+ - OPTIONS="debug_symbols=no verbose=yes progress=no"
- secure: "uch9QszCgsl1qVbuzY41P7S2hWL2IiNFV4SbAYRCdi0oJ9MIu+pVyrQdpf3+jG4rH6j4Rffl+sN17Zz4dIDDioFL1JwqyCqyCyswR8uACC0Rr8gr4Mi3+HIRbv+2s2P4cIQq41JM8FJe84k9jLEMGCGh69w+ibCWoWs74CokYVA="
cache:
@@ -23,20 +23,20 @@ matrix:
addons:
apt:
sources:
- - llvm-toolchain-trusty-6.0
- - ubuntu-toolchain-r-test
+ - llvm-toolchain-xenial-6.0
packages:
- clang-format-6.0
- - libstdc++6 # >= 4.9 needed for clang-format-6.0
- - env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc EXTRA_ARGS="module_mono_enabled=yes mono_glue=no werror=yes"
+ - env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-8 MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no werror=yes"
os: linux
- compiler: gcc
+ compiler: gcc-8
addons:
apt:
sources:
- mono
+ - ubuntu-toolchain-r-test
packages:
+ - &gcc8_deps [gcc-8, g++-8]
- &linux_deps [libasound2-dev, libfreetype6-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
- &linux_mono_deps [mono-devel, msbuild, nuget]
@@ -69,7 +69,18 @@ matrix:
os: osx
compiler: clang
- - env: PLATFORM=server TOOLS=yes TARGET=release_debug CACHE_NAME=${PLATFORM}-tools-gcc
+ - env: PLATFORM=server TOOLS=yes TARGET=release_debug CACHE_NAME=${PLATFORM}-tools-gcc-8 MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" EXTRA_ARGS="werror=yes"
+ os: linux
+ compiler: gcc-8
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - *gcc8_deps
+ - *linux_deps
+
+ - env: PLATFORM=x11 TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-5
os: linux
compiler: gcc
addons:
@@ -78,16 +89,17 @@ matrix:
- *linux_deps
before_install:
+ - eval "${MATRIX_EVAL}"
- if [ "$STATIC_CHECKS" = "yes" ]; then
unset SCONS_CACHE;
fi
install:
+ - pip install --user scons;
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$PLATFORM" = "android" ]; then
misc/travis/android-tools-linux.sh;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
- pip install --user scons;
export PATH=${PATH}:/Users/travis/Library/Python/2.7/bin;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$PLATFORM" = "android" ]; then
@@ -104,5 +116,5 @@ script:
- if [ "$STATIC_CHECKS" = "yes" ]; then
sh ./misc/travis/clang-format.sh;
else
- scons -j2 CC=$CC CXX=$CXX platform=$PLATFORM tools=$TOOLS target=$TARGET $EXTRA_ARGS $OPTIONS;
+ scons -j2 CC=$CC CXX=$CXX platform=$PLATFORM tools=$TOOLS target=$TARGET $OPTIONS $EXTRA_ARGS;
fi
diff --git a/AUTHORS.md b/AUTHORS.md
index 7859a3cd37..b7eca2d9b1 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -25,16 +25,16 @@ name is available.
## Developers
-(in alphabetical order, with 10 commits or more excluding merges)
+(in alphabetical order, with over 10 commits excluding merges)
Aaron Franke (aaronfranke)
Alexander Holland (AlexHolly)
- Alexey Velikiy (jonyrock)
Alket Rexhepi (alketii)
Andrea Catania (AndreaCatania)
Andreas Haas (Hinsbart)
Andrii Doroshenko (Xrayez)
Andy Moss (MillionOstrich)
+ Anish Bhobe (KidRigger)
Anton Yabchinskiy (a12n)
Aren Villanueva (kurikaesu)
Ariel Manzur (punto-)
@@ -46,6 +46,7 @@ name is available.
Bojidar Marinov (bojidar-bg)
bruvzg
Carl Olsson (not-surt)
+ Carter Anderson (cart)
Chris Bradfield (cbscribe)
Clay John (clayjohn)
Dana Olson (adolson)
@@ -61,13 +62,13 @@ name is available.
Ferenc Arn (tagcup)
Franklin Sobrinho (TheHX)
Geequlim
- Gen (dbsGen)
George Marques (vnen)
Gerrit Großkopf (Grosskopf)
Gilles Roudiere (groud)
Guilherme Felipe de C. G. da Silva (guilhermefelipecgs)
Hein-Pieter van Braam (hpvb)
Hiroshi Ogawa (hi-ogawa)
+ homer666
Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ian Bishop (ianb96)
@@ -76,7 +77,7 @@ name is available.
Indah Sylvia (ISylvox)
J08nY
Jakub Grzesik (kubecz3k)
- Jérôme GULLY (Nutriz)
+ Jérôme Gully (Nutriz)
Joan Fons Sanchez (JFonS)
Johan Manuel (29jm)
Joshua Grams (JoshuaGrams)
@@ -94,6 +95,7 @@ name is available.
Mariano Javier Suligoy (MarianoGnu)
Mario Schlack (hurikhan)
Martin Capitanio (capnm)
+ Martin Liška (marxin)
Martin Sjursen (binbitten)
marynate
Masoud BH (masoudbh3)
@@ -124,6 +126,7 @@ name is available.
Saniko (sanikoyes)
SaracenOne
sersoong
+ Simon Wenner (swenner)
Theo Hallenius (TheoXD)
Thomas Herzog (karroffel)
Timo (toger5)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6a0310f904..060a270426 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,265 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
+## [3.1] - 2019-03-13
+
+### Added
+
+- OpenGL ES 2.0 renderer.
+- [Visual shader editor.](https://godotengine.org/article/visual-shader-editor-back)
+ - New PBR output nodes.
+ - Conversion between Vector3 and scalar types is now automatic.
+ - Ability to create custom nodes via scripting.
+ - Ports can now be previewed.
+- [3D soft body physics.](https://godotengine.org/article/soft-body)
+- [3D ragdoll system.](https://godotengine.org/article/godot-ragdoll-system)
+- [Constructive solid geometry in 3D.](https://godotengine.org/article/godot-gets-csg-support)
+- [2D meshes and skeletal deformation.](https://godotengine.org/article/godot-gets-2d-skeletal-deform)
+- [Various improvements to KinematicBody2D.](https://godotengine.org/article/godot-31-will-get-many-improvements-kinematicbody)
+ - Support for snapping the body to the floor.
+ - Support for RayCast shapes in kinematic bodies.
+ - Support for synchronizing kinematic movement to physics, avoiding an one-frame delay.
+- WebSockets support using [libwebsockets](https://libwebsockets.org/).
+- UPnP support using [MiniUPnP](http://miniupnp.free.fr).
+- [Revamped inspector.](https://godotengine.org/article/godot-gets-new-inspector)
+ - Improved visualization and editing of numeric properties.
+ - Vector and matrix types can now be edited directly (no pop-ups).
+ - Subresources can now be edited directly within the same inspector.
+ - Layer names can now be displayed in the inspector.
+ - Proper editing of arrays and dictionaries.
+ - Ability to reset any property to its default value.
+- [Improved animation editor.](https://godotengine.org/article/godot-gets-brand-new-animation-editor-cinematic-support)
+ - Simpler, less cluttered layout.
+ - New Bezier, Audio and Animation tracks.
+ - Several key types can be previewed directly in the track editor.
+ - Tracks can now be grouped and filtered on a per-node basis.
+ - Copying and pasting tracks between animations is now possible.
+ - New Capture mode to blend from a node's current value to the first key in a track.
+- [Improved animation tree and new state machine.](https://godotengine.org/article/godot-gets-new-animation-tree-state-machine)
+ - More visual feedback in the blend tree editor.
+ - 1D and 2D blend spaces are now supported.
+ - Ability to write custom blending logic.
+ - Support for root motion.
+- [New FileSystem dock.](https://godotengine.org/article/godot-gets-new-filesystem-dock-3-1)
+ - Unified view of folders and files in the same panel.
+ - Files can now be marked as favorites, not only folders.
+ - Files now have icons representing their type, or thumbnail previews when relevant.
+ - New search field to filter entries in the tree.
+- [OpenSimplexNoise and NoiseTexture resources.](https://godotengine.org/article/simplex-noise-lands-godot-31)
+- [Optional static typing in GDScript.](https://godotengine.org/article/optional-typing-gdscript)
+ - Does not currently improve performance, but helps write more robust code.
+- Warning system in GDScript.
+ - Reports potential code issues such as:
+ - unused variables,
+ - standalone expressions,
+ - discarded return values from functions,
+ - unreachable code after a `return` statement,
+ - …
+ - Warnings can be disabled in the Project Settings or by writing special comments.
+- [GDScript keyword `class_name` to register scripts as classes.](http://docs.godotengine.org/en/latest/getting_started/step_by_step/scripting_continued.html#register-scripts-as-classes)
+- Simple expression language independent from GDScript, used by inspector boxes that accept numeric values.
+ - Can also be used in projects.
+- C# projects can now be exported for Windows, Linux, and macOS targets.
+- The `server` platform is back as it was in Godot 2.1.
+ - It is now again possible to run a headless Godot instance on Linux.
+- Support for BPTC texture compression on desktop platforms.
+- New properties for SpatialMaterial.
+ - Dithering-based distance fade, for fading materials without making them transparent.
+ - Disable ambient light on a per-material basis.
+- Option to link Mono statically on Windows.
+- Unified class and reference search in the editor.
+- Revamped TileSet editor with support for undo/redo operations.
+- Various quality-of-life improvements to the Polygon2D and TextureRegion editors.
+- RandomNumberGenerator class that allows for multiple instances at once.
+- Array methods `min()` and `max()` to return the smallest and largest value respectively.
+- Dictionary method `get(key[, default])` where `default` is returned if the key does not exist.
+- Node method `print_tree_pretty()` to print a graphical view of the scene tree.
+- String methods `trim_prefix()`, `trim_suffix()`, `lstrip()`, `rstrip()`.
+- OS methods:
+ - `get_system_time_msecs()`: Return the system time with milliseconds.
+ - `get_audio_driver_name()` and `get_audio_driver_count()` to query audio driver information.
+ - `get_video_driver_count()` and `get_video_driver_name()` to query renderer information.
+ - `center_window()`: Center the window on the screen.
+ - `move_window_to_foreground()`: Move the window to the foreground.
+- StreamPeerTCP method `set_no_delay()` to enable the `TCP_NODELAY` option.
+- EditorPlugin method `remove_control_from_container()`.
+- Ability to set Godot windows as "always on top".
+- Ability to create windows with per-pixel transparency.
+- New GLSL built-in functions in the shader language:
+ - `radians()`
+ - `degrees()`
+ - `asinh()`
+ - `acosh()`
+ - `atanh()`
+ - `exp2()`
+ - `log2()`
+ - `roundEven()`
+- New command-line options:
+ - `--build-solutions`: Build C# solutions without starting the editor.
+ - `--print-fps`: Display frames per second to standard output.
+ - `--quit`: Quit the engine after the first main loop iteration.
+- Debugger button to copy error messages.
+- Support for `.escn` scenes has been added for use with the new Blender exporter.
+- It is now possible to scale an OBJ mesh when importing.
+- `popup_closed` signal for `ColorPickerButton`.
+- Methods that are deprecated can now print warnings.
+- Input actions can now provide an analog value.
+- Input actions can now be mapped to either a specific device or all devices.
+- DNS resolution for high-level networking.
+- Servers can now kick/disconnect peers in high-level networking.
+- Servers can now access IP and port information of peers in high-level networking.
+- High-level multiplayer API decoupled from SceneTree (see `SceneTree.multiplayer_api`/`SceneTree.custom_multiplayer_api`), can now be extended.
+- `Input.set_default_cursor_shape()` to change the default shape in the viewport.
+- Custom cursors can now be as large as 256×256 (needed to be exactly 32×32 before).
+- Support for radio-looking items with icon in `PopupMenu`s.
+- Drag and drop to rearrange Editor docks.
+- TileSet's `TileMode` is now exposed to GDScript.
+- `OS.get_ticks_usec()` is now exposed to GDScript.
+- Normals can now be flipped when generated via `SurfaceTool`.
+- TextureProgress bars can now be bilinear (extending in both directions).
+- The character used for masking secrets in LineEdit can now be changed.
+- Improved DynamicFont:
+ - DynamicFonts can now use high-quality outlines generated by FreeType.
+ - DynamicFonts can now have their anti-aliasing disabled.
+ - DynamicFonts can now have their hinting tweaked ("Normal", "Light" or "None").
+ - Colored glyphs such as emoji are now supported.
+- Universal translation of touch input to mouse input.
+- AudioStreamPlayer, AudioStreamPlayer2D, and AudioStreamPlayer3D now have a pitch scale property.
+- Support for MIDI input.
+- Support for audio capture from microphones.
+- `GROW_DIRECTION_BOTH` for Controls.
+- Selected tiles can be moved in the tile map editor.
+- The editor can now be configured to display the project window on the previous or next monitor (relative to the editor).
+ - If either end is reached, then the project will start on the last or first monitor (respectively).
+- Signal in VideoPlayer to notify when the video finished playing.
+- `Image.bumpmap_to_normalmap()` to convert bump maps to normal maps.
+- `File.get_path()` and `File.get_path_absolute()`.
+- Unselected tabs in the editor now have a subtle background for easier identification.
+- The depth fog's end distance is now configurable independently of the far plane distance.
+- The alpha component of the fog color can now be used to control fog density.
+- The 3D editor's information panel now displays the camera's coordinates.
+- New options to hide the origin and viewport in the 2D editor.
+- Improved 3D editor grid:
+ - The grid size and number of subdivisions can now be configured.
+ - Its primary and secondary colors can now also be changed.
+- <kbd>Ctrl</kbd> now toggles snapping in the 3D viewport.
+- Find & replace in files (<kbd>Ctrl + Shift + F</kbd> by default).
+- Batch node renaming tool (<kbd>Ctrl + F2</kbd> by default).
+- More editor scaling options to support HiDPI displays.
+- Type icons can now be enabled in the editor again.
+- Buttons in the editor to open common directories in the OS file manager:
+ - project data directory,
+ - user data directory,
+ - user settings directory.
+- Projects can now be sorted by name or modification date in the project manager.
+- Projects can now be imported from ZIP archives in the project manager.
+- Improved autocompletion.
+ - Keywords are now present in autocompletion results.
+- `editor` and `standalone` feature tags to check whether the project is running from an editor or non-editor binary.
+- `android_add_asset_dir("...")` method to Android module Gradle build configuration.
+- **iOS:** Support for exporting to the iPhone X.
+- **iOS:** Readded support for in-app purchases.
+
+### Changed
+
+- [Built-in vector types now use copy-on-write mode as originally intended](https://godotengine.org/article/why-we-broke-your-pr), resulting in increased engine performance.
+- The [mbedtls](https://tls.mbed.org/) library is now used instead of OpenSSL.
+- [Renamed several core files](https://github.com/godotengine/godot/pull/25821).
+ - Third-party modules may have to be updated to reflect this.
+- SSL certificates are now bundled in exported projects unless a custom bundle is specified.
+- Improved buffer writing performance on Windows and Linux.
+- Removed many debugging prints in the console.
+- Export templates now display an error dialog if no project was found when starting.
+- DynamicFont oversampling is now enabled by default.
+- Nodes' internal logic now consistently use internal physics processing.
+- Allow attaching and clearing scripts on multiple nodes at once.
+- Default values are no longer saved in scene and resource files.
+- The selection rectangle of 2D nodes is now hidden when not pertinent (no more rectangle for collision shapes).
+- SSE2 is now enabled in libsquish, resulting in improved S3TC encoding performance.
+- Tangent and binormal coordinates are now more consistent across mesh types (primitive/imported), resulting in more predictable normal map and depth map appearance.
+- Better defaults for 3D scenes.
+ - The default procedural sky now has a more neutral blue tone.
+ - The default SpatialMaterial now has a roughness value of 1 and metallic value of 0.
+ - The fallback material now uses the same values as the default SpatialMaterial.
+- Text editor themes are now sorted alphabetically in the selection dropdown.
+- The 3D manipulator gizmo now has a smoother, more detailed appearance.
+- The 3D viewport menu button now has a background to make it easier to read.
+- QuadMeshes are now built using two triangles (6 vertices) instead of one quad (4 vertices).
+ - This was done because quads are deprecated in OpenGL.
+- Controls inside containers are no longer movable or resizable but can still be selected.
+- The `is` GDScript keyword can now be used to compare a value against built-in types.
+- Exported variables with type hints are now always initialized.
+ - For example, `export(int) var a` will be initialized to `0`.
+- Named enums in GDScript no longer create script constants.
+ - This means `enum Name { VALUE }` must now be accessed with `Name.VALUE` instead of `VALUE`.
+- Cyclic references to other scripts with `preload()` are no longer allowed.
+ - `load()` should be used in at least one of the scripts instead.
+- `switch`, `case` and `do` are no longer reserved identifiers in GDScript.
+- Shadowing variables from parent scopes is no longer allowed in GDScript.
+- Function parameters' default values can no longer depend on other parameters in GDScript.
+- Indentation guides are now displayed in a more subtle way in the script editor.
+ - Indentation guides are now displayed when indenting using spaces.
+- Multi-line strings are now highlighted as strings rather than as comments in the script editor.
+ - This is because GDScript does not officially support multiline comments.
+- Increased the script editor's line spacing (4 pixels → 6 pixels).
+- Increased the caret width in the script editor (1 pixel → 2 pixels).
+- The project manager window is now resized to match the editor scale.
+- The asset library now makes use of threading, making loading more responsive.
+- Line spacing in the script editor, underlines and caret widths are now resized to match the editor scale.
+- Replaced editor icons for checkboxes and radio buttons with simpler designs.
+- Tweaked the editor's success, error, and warning text colors for better readability and consistency.
+- **Android:** Custom permissions are now stored in an array and their amount is no longer limited to 20.
+ - Custom permissions will have to be redefined in projects imported from older versions.
+- **Android:** Provide error details when an in-app purchase fails.
+- **Linux:** `OS.alert()` now uses Zenity or KDialog if available instead of xmessage.
+- **Mono:** Display stack traces for inner exceptions.
+- **Mono:** Bundle `mscorlib.dll` with Godot to improve portability.
+
+### Removed
+
+- Removed the RtAudio backend on Windows in favor of WASAPI, which is the default since 3.0.
+- **macOS:** Support for 32-bit and fat binaries.
+
+### Fixed
+
+- [`move_and_slide()` now behaves differently at low velocities](https://github.com/godotengine/godot/issues/21683), which makes it function as originally intended.
+- AnimatedSprite2D's `animation_finished` signal is now triggered at the end of the animation, instead of as soon as the last frame displays.
+- Audio buses can now be removed in the editor while they are used by AudioStreamPlayer2D/3D nodes.
+- Do not show the project manager unless no project was found at all.
+- The animation editor time offset indicator no longer "walks" when resizing the editor.
+- Allow creation of a built-in GDScript file even if the filename suggested already exists.
+- Show tooltips in the editor when physics object picking is disabled.
+- Button shortcuts can now be triggered by gamepad buttons.
+- Fix a serialization bug that could cause TSCN files to grow very large.
+- Gizmos are now properly hidden on scene load if the object they control is hidden.
+- Camera gizmos in the 3D viewport no longer look twice as wide as they actually are.
+- Copy/pasting from the editor on X11 will now work more reliably.
+- `libgcc_s` and `libstdc++` are now linked statically for better Linux binary portability.
+- The FPS cap set by `force_fps` in the Project Settings is no longer applied to the editor.
+ - Low FPS caps no longer cause the editor to feel sluggish.
+- hiDPI is now detected and used if needed in the project manager.
+- The Visual Studio Code external editor option now recognizes more binary names such as `code-oss`, making detection more reliable.
+- The `-ffast-math` flag is no longer used when compiling Godot, resulting in increased floating-point determinism.
+- Fix spelling of `apply_torque_impulse()` and deprecate the misspelled method.
+- Escape sequences like `\n` and `\t` are now recognized in CSV translation files.
+- Remove spurious errors when using a PanoramaSky without textures.
+- The lightmap baker will now use all available cores on Windows.
+- Bullet physics now correctly calculates effective gravity on KinematicBodies.
+- Setting the color `v` member now correctly sets the `s` member.
+- RichTextLabels now correctly determine the baseline for all fonts.
+- SpinBoxes now correctly calculate their initial size.
+- OGG streams now correctly signal the end of playback.
+- Android exporter no longer writes unnecessary permissions to the exported APK.
+- Debugger "focus stealing" now works more reliably.
+- Subresources are now always saved when saving a scene.
+- Many fixes related to importers (glTF, Collada, audio), physics (Bullet), Mono/C#, GDNative, Android/iOS.
+- **Mono:** Many fixes and improvements to C# support (including a `[Signal]` attribute).
+- **WebAssembly:** Supply proper CORS headers.
+
+### Security
+
+- Fixed a security issue relating to deserializing Variants.
+
## [3.0] - 2018-01-29
### Added
@@ -137,4 +396,5 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- HTML5 export using asm.js.
- Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly.
+[Unreleased]: https://github.com/godotengine/godot/compare/3.0-stable...HEAD
[3.0]: https://github.com/godotengine/godot/compare/2.1-stable...3.0-stable
diff --git a/CODEOWNERS b/CODEOWNERS
index 3a973a100a..e25eefb1dd 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -18,7 +18,6 @@ doc_classes/* @godotengine/documentation
/drivers/coreaudio/ @marcelofg55
/drivers/coremidi/ @marcelofg55
/drivers/pulseaudio/ @marcelofg55
-/drivers/rtaudio/ @marcelofg55
/drivers/wasapi/ @marcelofg55
/drivers/winmidi/ @marcelofg55
/drivers/xaudio2/ @marcelofg55
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index 17141df66f..8b263a2d2c 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -44,7 +44,7 @@ Source: https://github.com/godotengine/godot
Files: *
Comment: Godot Engine
Copyright: 2007-2019, Juan Linietsky, Ariel Manzur.
- 2014-2019, Godot Engine contributors.
+ 2014-2019, Godot Engine contributors.
License: Expat
Files: ./icon.png
@@ -77,8 +77,8 @@ Files: ./platform/android/power_android.cpp
./platform/x11/power_x11.cpp
Comment: Simple DirectMedia Layer
Copyright: 1997-2017, Sam Lantinga
- 2007-2019, Juan Linietsky, Ariel Manzur.
- 2014-2019, Godot Engine contributors.
+ 2007-2019, Juan Linietsky, Ariel Manzur.
+ 2014-2019, Godot Engine contributors.
License: Expat and Zlib
Files: ./scene/animation/tween_interpolaters.cpp
@@ -98,27 +98,27 @@ Files: ./servers/physics/gjk_epa.cpp
./servers/physics/joints/slider_joint_sw.h
Comment: Bullet Continuous Collision Detection and Physics Library
Copyright: 2003-2008, Erwin Coumans
- 2007-2019, Juan Linietsky, Ariel Manzur.
- 2014-2019, Godot Engine contributors.
+ 2007-2019, Juan Linietsky, Ariel Manzur.
+ 2014-2019, Godot Engine contributors.
License: Expat and Zlib
Files: ./servers/physics/joints/cone_twist_joint_sw.cpp
./servers/physics/joints/cone_twist_joint_sw.h
Comment: Bullet Continuous Collision Detection and Physics Library
Copyright: 2007, Starbreeze Studios
- 2007-2019, Juan Linietsky, Ariel Manzur.
- 2014-2019, Godot Engine contributors.
+ 2007-2019, Juan Linietsky, Ariel Manzur.
+ 2014-2019, Godot Engine contributors.
License: Expat and Zlib
Files: ./thirdparty/b2d_convexdecomp/
Comment: Box2D (ConvexDecomp)
Copyright: 2007, Eric Jordan
- 2006-2009, Erin Catto
+ 2006-2009, Erin Catto
License: Zlib
Files: ./thirdparty/bullet/
Comment: Bullet Continuous Collision Detection and Physics Library
-Copyright: 2003-2008, Erwin Coumans
+Copyright: 2003-2013, Erwin Coumans
License: Zlib
Files: ./thirdparty/certs/ca-certificates.crt
@@ -129,7 +129,7 @@ License: MPL-2.0
Files: ./thirdparty/cvtt/
Comment: Convection Texture Tools Stand-Alone Kernels
Copyright: 2018, Eric Lasota
- 2018, Microsoft Corp.
+ 2018, Microsoft Corp.
License: Expat
Files: ./thirdparty/enet/
@@ -160,12 +160,12 @@ License: Expat and Bitstream Vera Fonts Copyright
Files: ./thirdparty/freetype/
Comment: The FreeType Project
-Copyright: 1996-2017, David Turner, Robert Wilhelm, and Werner Lemberg.
+Copyright: 1996-2018, David Turner, Robert Wilhelm, and Werner Lemberg.
License: FTL
Files: ./thirdparty/glad/
Comment: glad
-Copyright: 2013, David Herberth
+Copyright: 2013-2018, David Herberth
License: Expat
Files: ./thirdparty/jpeg_compressor/
@@ -180,9 +180,11 @@ License: BSD-3-clause
Files: ./thirdparty/libpng/
Comment: libpng
-Copyright: 1995-1996, Guy Eric Schalnat, Group 42, Inc.
- 1996-1997, Andreas Dilger
- 1998-2018, Glenn Randers-Pehrson
+Copyright: 1995-2018, The PNG Reference Library Authors.
+ 2018, Cosmin Truta.
+ 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ 1996-1997, Andreas Dilger.
+ 1995-1996, Guy Eric Schalnat, Group 42, Inc.
License: Zlib
Files: ./thirdparty/libsimplewebm/
@@ -223,24 +225,24 @@ License: BSD-3-clause
Files: ./thirdparty/libwebsockets/
Comment: libwebsockets
-Copyright: 2010-2017, Andy Green
+Copyright: 2010-2018, Andy Green
License: LGPL-2.1+SLE (libwebsockets)
Files: ./thirdparty/mbedtls/
Comment: Mbed TLS
-Copyright: 2006-2015, ARM Limited
+Copyright: 2006-2018, Arm Limited (or its affiliates)
License: Apache-2.0
Files: ./thirdparty/miniupnpc/
Comment: MiniUPnPc
-Copyright: 2005-2016, Thomas Bernard
+Copyright: 2005-2018, Thomas Bernard
License: BSD-3-clause
Files: ./thirdparty/minizip/
Comment: MiniZip
Copyright: 1998-2010, Gilles Vollant
- 2007-2008, Even Rouault
- 2009-2010, Mathias Svensson
+ 2007-2008, Even Rouault
+ 2009-2010, Mathias Svensson
License: Zlib
Files: ./thirdparty/misc/aes256.cpp
@@ -348,8 +350,8 @@ License: BSD-3-clause
Files: ./thirdparty/pcre2/
Comment: PCRE2
-Copyright: 1997-2017, University of Cambridge,
- 2009-2017, Zoltan Herczeg
+Copyright: 1997-2018, University of Cambridge,
+ 2009-2018, Zoltan Herczeg
License: BSD-3-clause
Files: ./thirdparty/pvrtccompressor/
@@ -362,11 +364,6 @@ Comment: Recast
Copyright: 2009, Mikko Mononen
License: Zlib
-Files: ./thirdparty/rtaudio/
-Comment: RtAudio
-Copyright: 2001-2016, Gary P. Scavone
-License: Expat
-
Files: ./thirdparty/squish/
Comment: libSquish
Copyright: 2006, Simon Brown
@@ -390,7 +387,7 @@ License: Zlib
Files: ./thirdparty/zstd/
Comment: Zstandard
-Copyright: 2016-2018, Facebook, Inc.
+Copyright: 2016-2019, Facebook, Inc.
License: BSD-3-clause
diff --git a/DONORS.md b/DONORS.md
index fc7ece5e7a..05d7f3b7c1 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -17,12 +17,13 @@ generous deed immortalized in the next stable release of Godot Engine.
## Gold sponsors
Gamblify <https://www.gamblify.com>
- GameDev.TV <https://gdev.tv/godot>
Image Campus <https://www.imagecampus.edu.ar>
+ Yakaz.com <https://yakaz.com>
## Mini sponsors
Alan Beauchamp
+ Anandarup Mallik
Andrew Dunai
Arda Erol
Brandon Lamb
@@ -30,20 +31,21 @@ generous deed immortalized in the next stable release of Godot Engine.
Christoph Woinke
Edward Flick
GameDev.net
+ GameDev.tv
Hein-Pieter van Braam
Jamal Alyafei
Javary Games
Jay Sistar
Justin Arnold
Kyle Szklenski
- Leona Eden
+ Leonard Meagher
+ Ludosity AB
Matthieu Huvé
Maxim Karsten
Mike King
Nathan Warden
Neal Gompa (Conan Kudo)
Patrick Aarstad
- Pers
"Rainway "
Ruslan Mustakov
Slobodan Milnovic
@@ -52,34 +54,38 @@ generous deed immortalized in the next stable release of Godot Engine.
Stoney Meyerhoeffer
thechris
VilliHaukka
+ Zashi
## Gold donors
Asdf
+ Brandon Waite
cheese65536
David Gehrig
- Edward E
+ Florian Krick
+ Jakub Grzesik
K9Kraken
Manuele Finocchiaro
Nathanael Beisiegel
Officine Pixel S.n.c.
Retro Village
- Valorware
- Zashi
Zaven Muradyan
- 13MHz
Allen Schade
Andreas Schüle
+ Asher Glick
Austen McRae
+ Daniel James
Daniel Lynn
David Giardi
+ Edward E
Florian Breisch
Gary Oberbrunner
Gero
Jay Horton
- Johannes Wuensch
+ Jon Smith
Jon Woodward
+ Jorge Bernal
Joshua Lesperance
Justo Delgado Baudí
Krzysztof Dluzniewski
@@ -89,8 +95,10 @@ generous deed immortalized in the next stable release of Godot Engine.
paul gruenbacher
Paul LaMotte
Rob Messick
+ Scott Wadden
Sergey
Svenne Krap
+ Tom Langwaldt
William Wold
Wyatt Goodin
Xananax
@@ -105,12 +113,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Dean Harmon
Ivan Trombley
Joan Fons
- John
Krzysztof Jankowski
- Laurence Bannister
+ Lord Bloodhound
Lucas Ferreira Franca
- Markus Wiesner
Nathan Lundquist
+ Pascal Grüter
+ Petr Malac
Rami
Robert Willes
Robin Arys
@@ -119,14 +127,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Thomas Bjarnelöf
Wojciech Chojnacki
Xavier PATRICELLI
- Zaq Poi
Alessandra Pereyra
Alexey Dyadchenko
- Amanda Haldy
+ Andrew Bowen
Benjamin W Flint
Chau Siu Hung
- Chris Brown
Chris Goddard
Chris Petrich
Christian Leth Jeppesen
@@ -139,80 +145,96 @@ generous deed immortalized in the next stable release of Godot Engine.
Eric Monson
Ethan Bennis
Eugenio Hugo Salgüero Jáñez
- Eulogio Enamorado Pallares
flesk
+ gavlig
GGGames.org
+ Giles Montgomery
Giovanni Solimeno
Guilherme Felipe de C. G. da Silva
Heath Hayes
Hysteria
+ Jalal Chaabane
Jeppe Zapp
Jose Malheiro
Juan T Chen
Juraj Móza
+ Kasper Jeppesen
Klavdij Voncina
Leandro Voltolino
Lukáš Rendvanský
Marius Kamm
+ Markus Wiesner
Martin Eigel
Marvin
+ Matt Eunson
Max R.R. Collada
Nick Nikitin
Oliver Dick
oziatek
+ Paul Hocker
+ Paul Von Zimmerman
Pete Goodwin
Ranoller
ray-tracer
Ruben Soares Luis
Samuel Judd
Sofox
+ spilldata
Stoned Xander
Tobias Bocanegra
WytRabbit
Xavier Fumado Beltran
- Zachariah Gibbons
## Silver donors
1D_Inc
- 2drealms
Adam Brunnmeier
Adam Carr
+ Adam Nakonieczny
Adam Smeltzer
Adisibio
Alder Stefano
Alessandro Senese
Alexander Gillberg
Alexander Koppe
+ Alice Robinson
Andreas Krampitz
Anthony Bongiovanni
+ Arbor Interactive
Arthur S. Muszynski
- Artur Barichello
Aubrey Falconer
Avencherus
Bailey
+ Balázs Batári
Bastian Böhm
Benedikt
Ben Vercammen
Bernd Jänichen
Blair Allen
Brandon
+ Brandon Schaffer
Bryan Stevenson
Carl Winder
Carwyn Edwards
+ Chris Brown
Chris Chapin
Christian Baune
Christian Winter
+ Christoffer Sundbom
+ Chris Wilson
Collin Shooltz
+ Connor Hill
Daniel Johnson
- Daniel Kaplan
DanielMaximiano
+ Daniel Reed
David Cravens
David May
Dominik Wetzel
- DOXA
+ Duobix
Edward Herbert
+ Egon Elbre
Elmeri '- Duy Kevin Nguyen
+ Emanuel Kotzayan
Eric Martini
Eric McCarthy
Eric Williams
@@ -220,27 +242,27 @@ generous deed immortalized in the next stable release of Godot Engine.
fengjiongmax
Foomf
G3Dev sàrl
- George Lesica
Gerrit Großkopf
Grant Clarke
Greg Olson
Guldoman
Haley Aycock
Heribert Hirth
+ Hiroshi Naruo
Hunter Jones
ialex32x
Igor Buzatovic
Jaime Ruiz-Borau Vizárraga
Jako Danar
+ James A F Manley
Jeff Hungerford
Jeremy Kahn
- Joao Senerchia
+ Jesse Dubay
Joel Fivat
- Johan Lindberg
+ Johannes Wuensch
Jonas Rudlang
Jonas Yamazaki
Jonathan G
- Jonathan Martin
Jonathan Nieto
Jonathon
Jon Bonazza
@@ -250,14 +272,16 @@ generous deed immortalized in the next stable release of Godot Engine.
Juan Negrier
Judd
Julian Murgia
- Justin Luk
+ Kajornthep Piyanun
KC Chan
Kevin Boyer
- Kevin van Rooijen
+ Kiyohiro Kawamura (kyorohiro)
Klagsam
+ KR McGinley
KsyTek Games
Kuan Cheang
kycho
+ Levi Lindsey
Linus Lind Lundgren
Luis Moraes
Macil
@@ -268,25 +292,27 @@ generous deed immortalized in the next stable release of Godot Engine.
Matthias Grandis
Matt Welke
Maxwell
+ medecau
Mertcan Mermerkaya
mhilbrunner
Michael Dürwald
Michael Gringauz
Michael Labbe
Mikael Olsson
+ Mikayla Hutchinson
MoM
Moritz Laass
Moritz Weissenberger
Natrim
nee
Neil Blakey-Milner
+ Nerdforge
Nick Pavlica
Niclas Eriksen
Nicolás Montaña
Nicolas SAN AGUSTIN
- nitenook
+ Oscar Norlander
Pan Ip
- Pascal Grüter
Patrick Nafarrete
Paul Gieske
Paul Mason
@@ -298,37 +324,41 @@ generous deed immortalized in the next stable release of Godot Engine.
Prokhorenko Leonid
Psyagnostic
Rafael
- rayos
Rémi Verschelde
Ricardo Alcantara
Richman Stewart
+ Robert Farr (Larington)
Roger Burgess
Roger Smith
Roland RzÄ…sa
Roman Tinkov
+ Ryan Cheung
+ Ryan Hentz
Sasori Olkof
Sebastian Michailidis
Shane Spoor
+ Simon Wenner
Sootstone
Theo Cranmore
- Théo Hay
Thibault Barbaroux
Thomas Bell
Thomas Holmes
+ Thomas Kelly
Thomas Kurz
tiansheng li
Tim
Tim Drumheller
Tom Larrow
- Troy Austin
+ Torsten Crass
Tryggve Sollid
Tyler Stafos
UltyX
Vaiktorg
Victor
Viktor Ferenczi
- Vladimir Soukup
waka nya
+ Wayne Haak
+ werner mendizabal
William Gervasio
William Hogben
Wout Standaert
diff --git a/SConstruct b/SConstruct
index 57fa305a15..55b061a6f7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2,11 +2,13 @@
EnsureSConsVersion(0, 98, 1)
-import string
-import os
-import os.path
+# System
import glob
+import os
+import string
import sys
+
+# Local
import methods
import gles_builders
from platform_methods import run_in_subprocess
@@ -27,7 +29,7 @@ for x in sorted(glob.glob("platform/*")):
continue
tmppath = "./" + x
- sys.path.append(tmppath)
+ sys.path.insert(0, tmppath)
import detect
if (os.path.exists(x + "/export/export.cpp")):
@@ -86,13 +88,6 @@ env_base.split_modules = False
env_base.module_version_string = ""
env_base.msvc = False
-# To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
-# http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
-env_base.Decider('MD5-timestamp')
-# Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line.
-# http://scons.org/doc/production/HTML/scons-user/ch06s04.html
-env_base.SetOption('implicit_cache', 1)
-
env_base.__class__.android_add_maven_repository = methods.android_add_maven_repository
env_base.__class__.android_add_flat_dir = methods.android_add_flat_dir
env_base.__class__.android_add_dependency = methods.android_add_dependency
@@ -130,7 +125,6 @@ customs = ['custom.py']
profile = ARGUMENTS.get("profile", False)
if profile:
- import os.path
if os.path.isfile(profile):
customs.append(profile)
elif os.path.isfile(profile + ".py"):
@@ -147,6 +141,7 @@ opts.Add(EnumVariable('target', "Compilation target", 'debug', ('debug', 'releas
opts.Add(EnumVariable('optimize', "Optimization type", 'speed', ('speed', 'size')))
opts.Add(BoolVariable('tools', "Build the tools (a.k.a. the Godot editor)", True))
opts.Add(BoolVariable('use_lto', 'Use link-time optimization', False))
+opts.Add(BoolVariable('use_precise_math_checks', 'Math checks use very precise epsilon (useful to debug the engine)', False))
# Components
opts.Add(BoolVariable('deprecated', "Enable deprecated features", True))
@@ -210,7 +205,7 @@ for k in platform_opts.keys():
for x in module_list:
module_enabled = True
tmppath = "./modules/" + x
- sys.path.append(tmppath)
+ sys.path.insert(0, tmppath)
import config
enabled_attr = getattr(config, "is_enabled", None)
if (callable(enabled_attr) and not config.is_enabled()):
@@ -230,9 +225,22 @@ env_base.Append(CPPPATH=['#editor', '#'])
env_base.platform_exporters = platform_exporters
env_base.platform_apis = platform_apis
+if (env_base["use_precise_math_checks"]):
+ env_base.Append(CPPDEFINES=['PRECISE_MATH_CHECKS'])
+
if (env_base['target'] == 'debug'):
env_base.Append(CPPDEFINES=['DEBUG_MEMORY_ALLOC','DISABLE_FORCED_INLINE'])
+ # The two options below speed up incremental builds, but reduce the certainty that all files
+ # will properly be rebuilt. As such, we only enable them for debug (dev) builds, not release.
+
+ # To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
+ # http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
+ env_base.Decider('MD5-timestamp')
+ # Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line.
+ # http://scons.org/doc/production/HTML/scons-user/ch06s04.html
+ env_base.SetOption('implicit_cache', 1)
+
if (env_base['no_editor_splash']):
env_base.Append(CPPDEFINES=['NO_EDITOR_SPLASH'])
@@ -250,8 +258,8 @@ elif env_base['p'] != "":
env_base["platform"] = selected_platform
if selected_platform in platform_list:
-
- sys.path.append("./platform/" + selected_platform)
+ tmppath = "./platform/" + selected_platform
+ sys.path.insert(0, tmppath)
import detect
if "create" in dir(detect):
env = detect.create(env_base)
@@ -331,13 +339,19 @@ if selected_platform in platform_list:
if (env["werror"]):
env.Append(CCFLAGS=['/WX'])
else: # Rest of the world
- disable_nonessential_warnings = ['-Wno-sign-compare']
+ shadow_local_warning = []
+ all_plus_warnings = ['-Wwrite-strings']
+
+ if methods.use_gcc(env):
+ version = methods.get_compiler_version(env)
+ if version != None and version[0] >= '7':
+ shadow_local_warning = ['-Wshadow-local']
if (env["warnings"] == 'extra'):
- env.Append(CCFLAGS=['-Wall', '-Wextra'])
+ env.Append(CCFLAGS=['-Wall', '-Wextra'] + all_plus_warnings + shadow_local_warning)
elif (env["warnings"] == 'all'):
- env.Append(CCFLAGS=['-Wall'] + disable_nonessential_warnings)
+ env.Append(CCFLAGS=['-Wall'] + shadow_local_warning)
elif (env["warnings"] == 'moderate'):
- env.Append(CCFLAGS=['-Wall', '-Wno-unused'] + disable_nonessential_warnings)
+ env.Append(CCFLAGS=['-Wall', '-Wno-unused'] + shadow_local_warning)
else: # 'no'
env.Append(CCFLAGS=['-w'])
if (env["werror"]):
@@ -377,7 +391,7 @@ if selected_platform in platform_list:
suffix += env.extra_suffix
- sys.path.remove("./platform/" + selected_platform)
+ sys.path.remove(tmppath)
sys.modules.pop('detect')
env.module_list = []
@@ -387,7 +401,7 @@ if selected_platform in platform_list:
if not env['module_' + x + '_enabled']:
continue
tmppath = "./modules/" + x
- sys.path.append(tmppath)
+ sys.path.insert(0, tmppath)
env.current_module = x
import config
# can_build changed number of arguments between 3.0 (1) and 3.1 (2),
diff --git a/core/allocators.h b/core/allocators.h
deleted file mode 100644
index 8d4af7a9fb..0000000000
--- a/core/allocators.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*************************************************************************/
-/* allocators.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef ALLOCATORS_H
-#define ALLOCATORS_H
-
-#include "core/os/memory.h"
-
-template <int PREALLOC_COUNT = 64, int MAX_HANDS = 8>
-class BalloonAllocator {
-
- enum {
-
- USED_FLAG = (1 << 30),
- USED_MASK = USED_FLAG - 1
- };
-
- struct Balloon {
-
- Balloon *next;
- Balloon *prev;
- uint32_t hand;
- };
-
- struct Hand {
-
- int used;
- int allocated;
- Balloon *first;
- Balloon *last;
- };
-
- Hand hands[MAX_HANDS];
-
-public:
- void *alloc(size_t p_size) {
-
- size_t max = (1 << MAX_HANDS);
- ERR_FAIL_COND_V(p_size > max, NULL);
-
- unsigned int hand = 0;
-
- while (p_size > (size_t)(1 << hand))
- ++hand;
-
- Hand &h = hands[hand];
-
- if (h.used == h.allocated) {
-
- for (int i = 0; i < PREALLOC_COUNT; i++) {
-
- Balloon *b = (Balloon *)memalloc(sizeof(Balloon) + (1 << hand));
- b->hand = hand;
- if (h.last) {
-
- b->prev = h.last;
- h.last->next = b;
- h.last = b;
- } else {
-
- b->prev = NULL;
- h.last = b;
- h.first = b;
- }
- }
-
- h.last->next = NULL;
- h.allocated += PREALLOC_COUNT;
- }
-
- Balloon *pick = h.last;
-
- ERR_FAIL_COND_V((pick->hand & USED_FLAG), NULL);
-
- // remove last
- h.last = h.last->prev;
- h.last->next = NULL;
-
- pick->next = h.first;
- h.first->prev = pick;
- pick->prev = NULL;
- h.first = pick;
- h.used++;
- pick->hand |= USED_FLAG;
-
- return (void *)(pick + 1);
- }
-
- void free(void *p_ptr) {
-
- Balloon *b = (Balloon *)p_ptr;
- b -= 1;
-
- ERR_FAIL_COND(!(b->hand & USED_FLAG));
-
- b->hand = b->hand & USED_MASK; // not used
- int hand = b->hand;
-
- Hand &h = hands[hand];
-
- if (b == h.first)
- h.first = b->next;
-
- if (b->prev)
- b->prev->next = b->next;
- if (b->next)
- b->next->prev = b->prev;
-
- if (h.last != b) {
- h.last->next = b;
- b->prev = h.last;
- b->next = NULL;
- h.last = b;
- }
-
- h.used--;
-
- if (h.used <= (h.allocated - (PREALLOC_COUNT * 2))) { // this is done to ensure no alloc/free is done constantly
-
- for (int i = 0; i < PREALLOC_COUNT; i++) {
- ERR_CONTINUE(h.last->hand & USED_FLAG);
-
- Balloon *new_last = h.last->prev;
- if (new_last)
- new_last->next = NULL;
- memfree(h.last);
- h.last = new_last;
- }
- h.allocated -= PREALLOC_COUNT;
- }
- }
-
- BalloonAllocator() {
-
- for (int i = 0; i < MAX_HANDS; i++) {
-
- hands[i].allocated = 0;
- hands[i].used = 0;
- hands[i].first = NULL;
- hands[i].last = NULL;
- }
- }
-
- void clear() {
-
- for (int i = 0; i < MAX_HANDS; i++) {
-
- while (hands[i].first) {
-
- Balloon *b = hands[i].first;
- hands[i].first = b->next;
- memfree(b);
- }
-
- hands[i].allocated = 0;
- hands[i].used = 0;
- hands[i].first = NULL;
- hands[i].last = NULL;
- }
- }
-
- ~BalloonAllocator() {
-
- clear();
- }
-};
-
-#endif // ALLOCATORS_H
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index e81468e888..f5dbacd62d 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -225,8 +225,12 @@ int _OS::get_video_driver_count() const {
return OS::get_singleton()->get_video_driver_count();
}
-String _OS::get_video_driver_name(int p_driver) const {
- return OS::get_singleton()->get_video_driver_name(p_driver);
+String _OS::get_video_driver_name(VideoDriver p_driver) const {
+ return OS::get_singleton()->get_video_driver_name((int)p_driver);
+}
+
+_OS::VideoDriver _OS::get_current_video_driver() const {
+ return (VideoDriver)OS::get_singleton()->get_current_video_driver();
}
int _OS::get_audio_driver_count() const {
@@ -592,17 +596,17 @@ struct Time {
};
*/
-int _OS::get_static_memory_usage() const {
+uint64_t _OS::get_static_memory_usage() const {
return OS::get_singleton()->get_static_memory_usage();
}
-int _OS::get_static_memory_peak_usage() const {
+uint64_t _OS::get_static_memory_peak_usage() const {
return OS::get_singleton()->get_static_memory_peak_usage();
}
-int _OS::get_dynamic_memory_usage() const {
+uint64_t _OS::get_dynamic_memory_usage() const {
return OS::get_singleton()->get_dynamic_memory_usage();
}
@@ -1089,6 +1093,11 @@ void _OS::alert(const String &p_alert, const String &p_title) {
OS::get_singleton()->alert(p_alert, p_title);
}
+bool _OS::request_permission(const String &p_name) {
+
+ return OS::get_singleton()->request_permission(p_name);
+}
+
_OS *_OS::singleton = NULL;
void _OS::_bind_methods() {
@@ -1108,6 +1117,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_video_driver_count"), &_OS::get_video_driver_count);
ClassDB::bind_method(D_METHOD("get_video_driver_name", "driver"), &_OS::get_video_driver_name);
+ ClassDB::bind_method(D_METHOD("get_current_video_driver"), &_OS::get_current_video_driver);
+
ClassDB::bind_method(D_METHOD("get_audio_driver_count"), &_OS::get_audio_driver_count);
ClassDB::bind_method(D_METHOD("get_audio_driver_name", "driver"), &_OS::get_audio_driver_name);
ClassDB::bind_method(D_METHOD("get_connected_midi_inputs"), &_OS::get_connected_midi_inputs);
@@ -1259,6 +1270,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left);
ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left);
+ ClassDB::bind_method(D_METHOD("request_permission", "name"), &_OS::request_permission);
+
ADD_PROPERTY(PropertyInfo(Variant::STRING, "clipboard"), "set_clipboard", "get_clipboard");
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_screen"), "set_current_screen", "get_current_screen");
ADD_PROPERTY(PropertyInfo(Variant::INT, "exit_code"), "set_exit_code", "get_exit_code");
@@ -1276,6 +1289,9 @@ void _OS::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_position"), "set_window_position", "get_window_position");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_size"), "set_window_size", "get_window_size");
+ BIND_ENUM_CONSTANT(VIDEO_DRIVER_GLES2);
+ BIND_ENUM_CONSTANT(VIDEO_DRIVER_GLES3);
+
BIND_ENUM_CONSTANT(DAY_SUNDAY);
BIND_ENUM_CONSTANT(DAY_MONDAY);
BIND_ENUM_CONSTANT(DAY_TUESDAY);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index a4b4629037..803743bc93 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -103,6 +103,11 @@ protected:
static _OS *singleton;
public:
+ enum VideoDriver {
+ VIDEO_DRIVER_GLES3,
+ VIDEO_DRIVER_GLES2,
+ };
+
enum PowerState {
POWERSTATE_UNKNOWN, /**< cannot determine power status */
POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
@@ -152,7 +157,8 @@ public:
Array get_fullscreen_mode_list(int p_screen = 0) const;
virtual int get_video_driver_count() const;
- virtual String get_video_driver_name(int p_driver) const;
+ virtual String get_video_driver_name(VideoDriver p_driver) const;
+ virtual VideoDriver get_current_video_driver() const;
virtual int get_audio_driver_count() const;
virtual String get_audio_driver_name(int p_driver) const;
@@ -283,9 +289,9 @@ public:
uint64_t get_system_time_secs() const;
uint64_t get_system_time_msecs() const;
- int get_static_memory_usage() const;
- int get_static_memory_peak_usage() const;
- int get_dynamic_memory_usage() const;
+ uint64_t get_static_memory_usage() const;
+ uint64_t get_static_memory_peak_usage() const;
+ uint64_t get_dynamic_memory_usage() const;
void delay_usec(uint32_t p_usec) const;
void delay_msec(uint32_t p_msec) const;
@@ -350,11 +356,14 @@ public:
bool has_feature(const String &p_feature) const;
+ bool request_permission(const String &p_name);
+
static _OS *get_singleton() { return singleton; }
_OS();
};
+VARIANT_ENUM_CAST(_OS::VideoDriver);
VARIANT_ENUM_CAST(_OS::PowerState);
VARIANT_ENUM_CAST(_OS::Weekday);
VARIANT_ENUM_CAST(_OS::Month);
diff --git a/core/command_queue_mt.cpp b/core/command_queue_mt.cpp
index 36d4b0a32f..2bdf02295c 100644
--- a/core/command_queue_mt.cpp
+++ b/core/command_queue_mt.cpp
@@ -97,7 +97,7 @@ tryagain:
return false;
}
- dealloc_ptr += (size >> 1) + sizeof(uint32_t);
+ dealloc_ptr += (size >> 1) + 8;
return true;
}
@@ -107,6 +107,7 @@ CommandQueueMT::CommandQueueMT(bool p_sync) {
write_ptr = 0;
dealloc_ptr = 0;
mutex = Mutex::create();
+ command_mem = (uint8_t *)memalloc(COMMAND_MEM_SIZE);
for (int i = 0; i < SYNC_SEMAPHORES; i++) {
@@ -128,4 +129,5 @@ CommandQueueMT::~CommandQueueMT() {
memdelete(sync_sems[i].sem);
}
+ memfree(command_mem);
}
diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h
index 3fd660a3db..59eabd8786 100644
--- a/core/command_queue_mt.h
+++ b/core/command_queue_mt.h
@@ -36,6 +36,7 @@
#include "core/os/semaphore.h"
#include "core/simple_type.h"
#include "core/typedefs.h"
+
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -254,6 +255,7 @@
unlock(); \
if (sync) sync->post(); \
ss->sem->wait(); \
+ ss->in_use = false; \
}
#define CMD_SYNC_TYPE(N) CommandSync##N<T, M COMMA(N) COMMA_SEP_LIST(TYPE_ARG, N)>
@@ -270,6 +272,7 @@
unlock(); \
if (sync) sync->post(); \
ss->sem->wait(); \
+ ss->in_use = false; \
}
#define MAX_CMD_PARAMS 13
@@ -295,7 +298,6 @@ class CommandQueueMT {
virtual void post() {
sync_sem->sem->post();
- sync_sem->in_use = false;
}
};
@@ -318,7 +320,7 @@ class CommandQueueMT {
SYNC_SEMAPHORES = 8
};
- uint8_t command_mem[COMMAND_MEM_SIZE];
+ uint8_t *command_mem;
uint32_t read_ptr;
uint32_t write_ptr;
uint32_t dealloc_ptr;
@@ -330,7 +332,7 @@ class CommandQueueMT {
T *allocate() {
// alloc size is size+T+safeguard
- uint32_t alloc_size = sizeof(T) + sizeof(uint32_t);
+ uint32_t alloc_size = ((sizeof(T) + 8 - 1) & ~(8 - 1)) + 8;
tryagain:
@@ -360,7 +362,7 @@ class CommandQueueMT {
}
// if this happens, it's a bug
- ERR_FAIL_COND_V((COMMAND_MEM_SIZE - write_ptr) < sizeof(uint32_t), NULL);
+ ERR_FAIL_COND_V((COMMAND_MEM_SIZE - write_ptr) < 8, NULL);
// zero means, wrap to beginning
uint32_t *p = (uint32_t *)&command_mem[write_ptr];
@@ -372,12 +374,13 @@ class CommandQueueMT {
// Allocate the size and the 'in use' bit.
// First bit used to mark if command is still in use (1)
// or if it has been destroyed and can be deallocated (0).
+ uint32_t size = (sizeof(T) + 8 - 1) & ~(8 - 1);
uint32_t *p = (uint32_t *)&command_mem[write_ptr];
- *p = (sizeof(T) << 1) | 1;
- write_ptr += sizeof(uint32_t);
+ *p = (size << 1) | 1;
+ write_ptr += 8;
// allocate the command
T *cmd = memnew_placement(&command_mem[write_ptr], T);
- write_ptr += sizeof(T);
+ write_ptr += size;
return cmd;
}
@@ -415,7 +418,7 @@ class CommandQueueMT {
goto tryagain;
}
- read_ptr += sizeof(uint32_t);
+ read_ptr += 8;
CommandBase *cmd = reinterpret_cast<CommandBase *>(&command_mem[read_ptr]);
diff --git a/core/core_string_names.h b/core/core_string_names.h
index 1a837cdc2e..6fea40e1b2 100644
--- a/core/core_string_names.h
+++ b/core/core_string_names.h
@@ -31,7 +31,7 @@
#ifndef CORE_STRING_NAMES_H
#define CORE_STRING_NAMES_H
-#include "core/string_db.h"
+#include "core/string_name.h"
class CoreStringNames {
diff --git a/core/engine.cpp b/core/engine.cpp
index 4dba41853d..9607dedb3c 100644
--- a/core/engine.cpp
+++ b/core/engine.cpp
@@ -98,6 +98,7 @@ Dictionary Engine::get_version_info() const {
#else
dict["patch"] = 0;
#endif
+ dict["hex"] = VERSION_HEX;
dict["status"] = VERSION_STATUS;
dict["build"] = VERSION_BUILD;
dict["year"] = VERSION_YEAR;
diff --git a/core/error_macros.h b/core/error_macros.h
index 60a0e8a7dc..ca5ccd24cf 100644
--- a/core/error_macros.h
+++ b/core/error_macros.h
@@ -154,6 +154,20 @@ extern bool _err_error_exists;
_err_error_exists = false; \
} while (0); // (*)
+/** An index has failed if m_index >=m_size, the function exists.
+* This function returns an error value, if returning Error, please select the most
+* appropriate error condition from error_macros.h
+*/
+
+#define ERR_FAIL_UNSIGNED_INDEX_V(m_index, m_size, m_retval) \
+ do { \
+ if (unlikely((m_index) >= (m_size))) { \
+ _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \
+ return m_retval; \
+ } else \
+ _err_error_exists = false; \
+ } while (0); // (*)
+
/** Use this one if there is no sensible fallback, that is, the error is unrecoverable.
* We'll return a null reference and try to keep running.
*/
@@ -296,6 +310,16 @@ extern bool _err_error_exists;
_err_error_exists = false; \
}
+#define ERR_PRINT_ONCE(m_string) \
+ { \
+ static bool first_print = true; \
+ if (first_print) { \
+ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, m_string); \
+ _err_error_exists = false; \
+ first_print = false; \
+ } \
+ }
+
/** Print a warning string.
*/
@@ -311,6 +335,16 @@ extern bool _err_error_exists;
_err_error_exists = false; \
}
+#define WARN_PRINT_ONCE(m_string) \
+ { \
+ static bool first_print = true; \
+ if (first_print) { \
+ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, m_string, ERR_HANDLER_WARNING); \
+ _err_error_exists = false; \
+ first_print = false; \
+ } \
+ }
+
#define WARN_DEPRECATED \
{ \
static volatile bool warning_shown = false; \
diff --git a/core/global_constants.h b/core/global_constants.h
index 47c1a4dafc..c798a3b9bc 100644
--- a/core/global_constants.h
+++ b/core/global_constants.h
@@ -31,7 +31,7 @@
#ifndef GLOBAL_CONSTANTS_H
#define GLOBAL_CONSTANTS_H
-#include "core/string_db.h"
+#include "core/string_name.h"
class GlobalConstants {
public:
diff --git a/core/hashfuncs.h b/core/hashfuncs.h
index 811ce6264e..07d78dcbde 100644
--- a/core/hashfuncs.h
+++ b/core/hashfuncs.h
@@ -34,7 +34,7 @@
#include "core/math/math_defs.h"
#include "core/math/math_funcs.h"
#include "core/node_path.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/typedefs.h"
#include "core/ustring.h"
diff --git a/core/image.cpp b/core/image.cpp
index 91c3d05a29..f547d7e973 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -735,6 +735,10 @@ static void _overlay(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst,
}
}
+bool Image::is_size_po2() const {
+ return uint32_t(width) == next_power_of_2(width) && uint32_t(height) == next_power_of_2(height);
+}
+
void Image::resize_to_po2(bool p_square) {
if (!_can_modify(format)) {
@@ -1789,7 +1793,7 @@ Error Image::decompress() {
_image_decompress_pvrtc(this);
else if (format == FORMAT_ETC && _image_decompress_etc1)
_image_decompress_etc1(this);
- else if (format >= FORMAT_ETC2_R11 && format <= FORMAT_ETC2_RGB8A1 && _image_decompress_etc1)
+ else if (format >= FORMAT_ETC2_R11 && format <= FORMAT_ETC2_RGB8A1 && _image_decompress_etc2)
_image_decompress_etc2(this);
else
return ERR_UNAVAILABLE;
@@ -2901,15 +2905,15 @@ void Image::fix_alpha_edges() {
if (dist >= closest_dist)
continue;
- const uint8_t *rp = &srcptr[(k * width + l) << 2];
+ const uint8_t *rp2 = &srcptr[(k * width + l) << 2];
- if (rp[3] < alpha_threshold)
+ if (rp2[3] < alpha_threshold)
continue;
closest_dist = dist;
- closest_color[0] = rp[0];
- closest_color[1] = rp[1];
- closest_color[2] = rp[2];
+ closest_color[0] = rp2[0];
+ closest_color[1] = rp2[1];
+ closest_color[2] = rp2[2];
}
}
diff --git a/core/image.h b/core/image.h
index b23f8cac46..69a42f169a 100644
--- a/core/image.h
+++ b/core/image.h
@@ -32,8 +32,8 @@
#define IMAGE_H
#include "core/color.h"
-#include "core/dvector.h"
#include "core/math/rect2.h"
+#include "core/pool_vector.h"
#include "core/resource.h"
/**
@@ -223,6 +223,7 @@ public:
void resize(int p_width, int p_height, Interpolation p_interpolation = INTERPOLATE_BILINEAR);
void shrink_x2();
void expand_x2_hq2x();
+ bool is_size_po2() const;
/**
* Crop the image to a specific size, if larger, then the image is filled by black
*/
diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h
index 756045a674..4065d77c58 100644
--- a/core/io/file_access_buffered.h
+++ b/core/io/file_access_buffered.h
@@ -31,8 +31,8 @@
#ifndef FILE_ACCESS_BUFFERED_H
#define FILE_ACCESS_BUFFERED_H
-#include "core/dvector.h"
#include "core/os/file_access.h"
+#include "core/pool_vector.h"
#include "core/ustring.h"
class FileAccessBuffered : public FileAccess {
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h
index 5180f2344f..be960fbc25 100644
--- a/core/io/file_access_buffered_fa.h
+++ b/core/io/file_access_buffered_fa.h
@@ -54,7 +54,7 @@ class FileAccessBufferedFA : public FileAccessBuffered {
cache.offset = p_offset;
cache.buffer.resize(p_size);
- // on dvector
+ // on PoolVector
//PoolVector<uint8_t>::Write write = cache.buffer.write();
//f.get_buffer(write.ptrw(), p_size);
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index 66b911e83c..be28c9a877 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -168,10 +168,10 @@ bool ZipArchive::try_open_pack(const String &p_path) {
zlib_filefunc_def io;
- FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
- if (!f)
+ FileAccess *fa = FileAccess::open(p_path, FileAccess::READ);
+ if (!fa)
return false;
- io.opaque = f;
+ io.opaque = fa;
io.zopen_file = godot_open;
io.zread_file = godot_read;
io.zwrite_file = godot_write;
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index b3fd814870..e5c6d2a4f2 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -278,6 +278,7 @@ void HTTPClient::close() {
body_size = -1;
body_left = 0;
chunk_left = 0;
+ chunk_trailer_part = 0;
read_until_eof = false;
response_num = 0;
handshaking = false;
@@ -421,16 +422,16 @@ Error HTTPClient::poll() {
chunked = false;
body_left = 0;
chunk_left = 0;
+ chunk_trailer_part = false;
read_until_eof = false;
response_str.clear();
response_headers.clear();
response_num = RESPONSE_OK;
- // Per the HTTP 1.1 spec, keep-alive is the default, but in practice
- // it's safe to assume it only if the explicit header is found, allowing
- // to handle body-up-to-EOF responses on naive servers; that's what Curl
- // and browsers do
- bool keep_alive = false;
+ // Per the HTTP 1.1 spec, keep-alive is the default.
+ // Not following that specification breaks standard implemetations.
+ // Broken web servers should be fixed.
+ bool keep_alive = true;
for (int i = 0; i < responses.size(); i++) {
@@ -447,8 +448,8 @@ Error HTTPClient::poll() {
if (encoding == "chunked") {
chunked = true;
}
- } else if (s.begins_with("connection: keep-alive")) {
- keep_alive = true;
+ } else if (s.begins_with("connection: close")) {
+ keep_alive = false;
}
if (i == 0 && responses[i].begins_with("HTTP")) {
@@ -505,13 +506,37 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
ERR_FAIL_COND_V(status != STATUS_BODY, PoolByteArray());
+ PoolByteArray ret;
Error err = OK;
if (chunked) {
while (true) {
- if (chunk_left == 0) {
+ if (chunk_trailer_part) {
+ // We need to consume the trailer part too or keep-alive will break
+ uint8_t b;
+ int rec = 0;
+ err = _get_http_data(&b, 1, rec);
+
+ if (rec == 0)
+ break;
+
+ chunk.push_back(b);
+ int cs = chunk.size();
+ if ((cs >= 2 && chunk[cs - 2] == '\r' && chunk[cs - 1] == '\n')) {
+ if (cs == 2) {
+ // Finally over
+ chunk_trailer_part = false;
+ status = STATUS_CONNECTED;
+ chunk.clear();
+ break;
+ } else {
+ // We do not process nor return the trailer data
+ chunk.clear();
+ }
+ }
+ } else if (chunk_left == 0) {
// Reading length
uint8_t b;
int rec = 0;
@@ -525,7 +550,7 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
if (chunk.size() > 32) {
ERR_PRINT("HTTP Invalid chunk hex len");
status = STATUS_CONNECTION_ERROR;
- return PoolByteArray();
+ break;
}
if (chunk.size() > 2 && chunk[chunk.size() - 2] == '\r' && chunk[chunk.size() - 1] == '\n') {
@@ -543,22 +568,22 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
else {
ERR_PRINT("HTTP Chunk len not in hex!!");
status = STATUS_CONNECTION_ERROR;
- return PoolByteArray();
+ break;
}
len <<= 4;
len |= v;
if (len > (1 << 24)) {
ERR_PRINT("HTTP Chunk too big!! >16mb");
status = STATUS_CONNECTION_ERROR;
- return PoolByteArray();
+ break;
}
}
if (len == 0) {
// End reached!
- status = STATUS_CONNECTED;
+ chunk_trailer_part = true;
chunk.clear();
- return PoolByteArray();
+ break;
}
chunk_left = len + 2;
@@ -578,18 +603,13 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
if (chunk[chunk.size() - 2] != '\r' || chunk[chunk.size() - 1] != '\n') {
ERR_PRINT("HTTP Invalid chunk terminator (not \\r\\n)");
status = STATUS_CONNECTION_ERROR;
- return PoolByteArray();
+ break;
}
- PoolByteArray ret;
ret.resize(chunk.size() - 2);
- {
- PoolByteArray::Write w = ret.write();
- copymem(w.ptr(), chunk.ptr(), chunk.size() - 2);
- }
+ PoolByteArray::Write w = ret.write();
+ copymem(w.ptr(), chunk.ptr(), chunk.size() - 2);
chunk.clear();
-
- return ret;
}
break;
@@ -599,45 +619,26 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
} else {
int to_read = !read_until_eof ? MIN(body_left, read_chunk_size) : read_chunk_size;
- PoolByteArray ret;
ret.resize(to_read);
int _offset = 0;
- while (read_until_eof || to_read > 0) {
+ while (to_read > 0) {
int rec = 0;
{
PoolByteArray::Write w = ret.write();
err = _get_http_data(w.ptr() + _offset, to_read, rec);
}
- if (rec < 0) {
- if (to_read > 0) // Ended up reading less
- ret.resize(_offset);
+ if (rec <= 0) { // Ended up reading less
+ ret.resize(_offset);
break;
} else {
_offset += rec;
+ to_read -= rec;
if (!read_until_eof) {
body_left -= rec;
- to_read -= rec;
- } else {
- if (rec < to_read) {
- ret.resize(_offset);
- err = ERR_FILE_EOF;
- break;
- }
- ret.resize(_offset + to_read);
}
}
- }
- if (!read_until_eof) {
- if (body_left == 0) {
- status = STATUS_CONNECTED;
- }
- return ret;
- } else {
- if (err == ERR_FILE_EOF) {
- err = OK; // EOF is expected here
- close();
- return ret;
- }
+ if (err != OK)
+ break;
}
}
@@ -652,12 +653,12 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
status = STATUS_CONNECTION_ERROR;
}
- } else if (body_left == 0 && !chunked) {
+ } else if (body_left == 0 && !chunked && !read_until_eof) {
status = STATUS_CONNECTED;
}
- return PoolByteArray();
+ return ret;
}
HTTPClient::Status HTTPClient::get_status() const {
@@ -719,6 +720,7 @@ HTTPClient::HTTPClient() {
body_left = 0;
read_until_eof = false;
chunk_left = 0;
+ chunk_trailer_part = false;
response_num = 0;
ssl = false;
blocking = false;
diff --git a/core/io/http_client.h b/core/io/http_client.h
index 1ad44d5f01..85ee1959a2 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -172,6 +172,7 @@ private:
bool chunked;
Vector<uint8_t> chunk;
int chunk_left;
+ bool chunk_trailer_part;
int body_size;
int body_left;
bool read_until_eof;
diff --git a/core/io/logger.h b/core/io/logger.h
index 0b871a13de..ff5b8ce489 100644
--- a/core/io/logger.h
+++ b/core/io/logger.h
@@ -49,11 +49,11 @@ public:
ERR_SHADER
};
- virtual void logv(const char *p_format, va_list p_list, bool p_err) = 0;
+ virtual void logv(const char *p_format, va_list p_list, bool p_err) _PRINTF_FORMAT_ATTRIBUTE_2_0 = 0;
virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
- void logf(const char *p_format, ...);
- void logf_error(const char *p_format, ...);
+ void logf(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
+ void logf_error(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
virtual ~Logger();
};
@@ -64,7 +64,7 @@ public:
class StdLogger : public Logger {
public:
- virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual void logv(const char *p_format, va_list p_list, bool p_err) _PRINTF_FORMAT_ATTRIBUTE_2_0;
virtual ~StdLogger();
};
@@ -88,7 +88,7 @@ class RotatedFileLogger : public Logger {
public:
RotatedFileLogger(const String &p_base_path, int p_max_files = 10);
- virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual void logv(const char *p_format, va_list p_list, bool p_err) _PRINTF_FORMAT_ATTRIBUTE_2_0;
virtual ~RotatedFileLogger();
};
@@ -99,7 +99,7 @@ class CompositeLogger : public Logger {
public:
CompositeLogger(Vector<Logger *> p_loggers);
- virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual void logv(const char *p_format, va_list p_list, bool p_err) _PRINTF_FORMAT_ATTRIBUTE_2_0;
virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
void add_logger(Logger *p_logger);
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index eec1c55744..5087a63b68 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -889,11 +889,11 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
if (buf) {
encode_uint32(uint32_t(np.get_name_count()) | 0x80000000, buf); //for compatibility with the old format
encode_uint32(np.get_subname_count(), buf + 4);
- uint32_t flags = 0;
+ uint32_t np_flags = 0;
if (np.is_absolute())
- flags |= 1;
+ np_flags |= 1;
- encode_uint32(flags, buf + 8);
+ encode_uint32(np_flags, buf + 8);
buf += 12;
}
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index 3aa1fcfd8f..d7bfdbbb37 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -224,7 +224,7 @@ Error PacketPeerStream::get_packet(const uint8_t **r_buffer, int &r_buffer_size)
uint32_t len = decode_uint32(lbuf);
ERR_FAIL_COND_V(remaining < (int)len, ERR_UNAVAILABLE);
- ERR_FAIL_COND_V(input_buffer.size() < len, ERR_UNAVAILABLE);
+ ERR_FAIL_COND_V(input_buffer.size() < (int)len, ERR_UNAVAILABLE);
ring_buffer.read(lbuf, 4); //get rid of first 4 bytes
ring_buffer.read(input_buffer.ptrw(), len); // read packet
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 4d4134b745..42070cd132 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -106,7 +106,7 @@ StringName ResourceInteractiveLoaderBinary::_get_string() {
uint32_t id = f->get_32();
if (id & 0x80000000) {
uint32_t len = id & 0x7FFFFFFF;
- if (len > str_buf.size()) {
+ if ((int)len > str_buf.size()) {
str_buf.resize(len);
}
if (len == 0)
@@ -296,9 +296,9 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
} break;
case VARIANT_OBJECT: {
- uint32_t type = f->get_32();
+ uint32_t objtype = f->get_32();
- switch (type) {
+ switch (objtype) {
case OBJECT_EMPTY: {
//do none
@@ -317,7 +317,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
case OBJECT_EXTERNAL_RESOURCE: {
//old file format, still around for compatibility
- String type = get_unicode_string();
+ String exttype = get_unicode_string();
String path = get_unicode_string();
if (path.find("://") == -1 && path.is_rel_path()) {
@@ -329,7 +329,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
path = remaps[path];
}
- RES res = ResourceLoader::load(path, type);
+ RES res = ResourceLoader::load(path, exttype);
if (res.is_null()) {
WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data());
@@ -346,7 +346,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = Variant();
} else {
- String type = external_resources[erindex].type;
+ String exttype = external_resources[erindex].type;
String path = external_resources[erindex].path;
if (path.find("://") == -1 && path.is_rel_path()) {
@@ -354,7 +354,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
path = ProjectSettings::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path));
}
- RES res = ResourceLoader::load(path, type);
+ RES res = ResourceLoader::load(path, exttype);
if (res.is_null()) {
WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data());
@@ -1314,8 +1314,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
} else {
f->store_32(VARIANT_INT);
- int val = p_property;
- f->store_32(int32_t(val));
+ f->store_32(int32_t(p_property));
}
} break;
@@ -1502,7 +1501,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
if (!resource_set.has(res)) {
f->store_32(OBJECT_EMPTY);
- ERR_EXPLAIN("Resource was not pre cached for the resource section, bug?");
+ ERR_EXPLAIN("Resource was not pre cached for the resource section, most likely due to circular refedence.");
ERR_FAIL();
}
@@ -1651,6 +1650,10 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant
return;
if (!p_main && (!bundle_resources) && res->get_path().length() && res->get_path().find("::") == -1) {
+ if (res->get_path() == path) {
+ ERR_PRINTS("Circular reference to resource being saved found: '" + local_path + "' will be null next time it's loaded.");
+ return;
+ }
int idx = external_resources.size();
external_resources[res] = idx;
return;
@@ -1667,7 +1670,20 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant
if (E->get().usage & PROPERTY_USAGE_STORAGE) {
- _find_resources(res->get(E->get().name));
+ Variant value = res->get(E->get().name);
+ if (E->get().usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) {
+ RES sres = value;
+ if (sres.is_valid()) {
+ NonPersistentKey npk;
+ npk.base = res;
+ npk.property = E->get().name;
+ non_persistent_map[npk] = sres;
+ resource_set.insert(sres);
+ saved_resources.push_back(sres);
+ }
+ } else {
+ _find_resources(value);
+ }
}
}
@@ -1762,6 +1778,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
takeover_paths = false;
local_path = p_path.get_base_dir();
+ path = ProjectSettings::get_singleton()->localize_path(p_path);
_find_resources(p_resource, true);
@@ -1811,7 +1828,17 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
if ((F->get().usage & PROPERTY_USAGE_STORAGE)) {
Property p;
p.name_idx = get_string_index(F->get().name);
- p.value = E->get()->get(F->get().name);
+
+ if (F->get().usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) {
+ NonPersistentKey npk;
+ npk.base = E->get();
+ npk.property = F->get().name;
+ if (non_persistent_map.has(npk)) {
+ p.value = non_persistent_map[npk];
+ }
+ } else {
+ p.value = E->get()->get(F->get().name);
+ }
Variant default_value = ClassDB::class_get_default_property_value(E->get()->get_class(), F->get().name);
diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h
index 8f2c48e745..a4894e4033 100644
--- a/core/io/resource_format_binary.h
+++ b/core/io/resource_format_binary.h
@@ -114,6 +114,7 @@ public:
class ResourceFormatSaverBinaryInstance {
String local_path;
+ String path;
bool relative_paths;
bool bundle_resources;
@@ -123,6 +124,14 @@ class ResourceFormatSaverBinaryInstance {
FileAccess *f;
String magic;
Set<RES> resource_set;
+
+ struct NonPersistentKey { //for resource properties generated on the fly
+ RES base;
+ StringName property;
+ bool operator<(const NonPersistentKey &p_key) const { return base == p_key.base ? property < p_key.property : base < p_key.base; }
+ };
+
+ Map<NonPersistentKey, RES> non_persistent_map;
Map<StringName, int> string_map;
Vector<StringName> strings;
diff --git a/core/io/resource_import.cpp b/core/io/resource_importer.cpp
index 63dc0b6a26..b5fa412576 100644
--- a/core/io/resource_import.cpp
+++ b/core/io/resource_importer.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* resource_import.cpp */
+/* resource_importer.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "resource_import.h"
+#include "resource_importer.h"
#include "core/os/os.h"
#include "core/variant_parser.h"
+bool ResourceFormatImporter::SortImporterByName::operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const {
+ return p_a->get_importer_name() < p_b->get_importer_name();
+}
+
Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndType &r_path_and_type, bool *r_valid) const {
Error err;
@@ -90,6 +94,8 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
r_path_and_type.type = value;
} else if (assign == "importer") {
r_path_and_type.importer = value;
+ } else if (assign == "metadata") {
+ r_path_and_type.metadata = value;
} else if (assign == "valid") {
if (r_valid) {
*r_valid = value;
@@ -177,6 +183,11 @@ void ResourceFormatImporter::get_recognized_extensions_for_type(const String &p_
}
}
+bool ResourceFormatImporter::exists(const String &p_path) const {
+
+ return FileAccess::exists(p_path + ".import");
+}
+
bool ResourceFormatImporter::recognize_path(const String &p_path, const String &p_for_type) const {
return FileAccess::exists(p_path + ".import");
@@ -304,6 +315,18 @@ String ResourceFormatImporter::get_resource_type(const String &p_path) const {
return pat.type;
}
+Variant ResourceFormatImporter::get_resource_metadata(const String &p_path) const {
+ PathAndType pat;
+ Error err = _get_path_and_type(p_path, pat);
+
+ if (err != OK) {
+
+ return Variant();
+ }
+
+ return pat.metadata;
+}
+
void ResourceFormatImporter::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
PathAndType pat;
@@ -366,6 +389,40 @@ String ResourceFormatImporter::get_import_base_path(const String &p_for_file) co
return "res://.import/" + p_for_file.get_file() + "-" + p_for_file.md5_text();
}
+bool ResourceFormatImporter::are_import_settings_valid(const String &p_path) const {
+
+ bool valid = true;
+ PathAndType pat;
+ _get_path_and_type(p_path, pat, &valid);
+
+ if (!valid) {
+ return false;
+ }
+
+ for (int i = 0; i < importers.size(); i++) {
+ if (importers[i]->get_importer_name() == pat.importer) {
+ if (!importers[i]->are_import_settings_valid(p_path)) { //importer thinks this is not valid
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+String ResourceFormatImporter::get_import_settings_hash() const {
+
+ Vector<Ref<ResourceImporter> > sorted_importers = importers;
+
+ sorted_importers.sort_custom<SortImporterByName>();
+
+ String hash;
+ for (int i = 0; i < sorted_importers.size(); i++) {
+ hash += ":" + sorted_importers[i]->get_importer_name() + ":" + sorted_importers[i]->get_import_settings_string();
+ }
+ return hash.md5_text();
+}
+
ResourceFormatImporter *ResourceFormatImporter::singleton = NULL;
ResourceFormatImporter::ResourceFormatImporter() {
diff --git a/core/io/resource_import.h b/core/io/resource_importer.h
index 96dd7983e6..1c146c33d7 100644
--- a/core/io/resource_import.h
+++ b/core/io/resource_importer.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* resource_import.h */
+/* resource_importer.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef RESOURCE_IMPORT_H
-#define RESOURCE_IMPORT_H
+#ifndef RESOURCE_IMPORTER_H
+#define RESOURCE_IMPORTER_H
#include "core/io/resource_loader.h"
@@ -43,12 +43,18 @@ class ResourceFormatImporter : public ResourceFormatLoader {
String path;
String type;
String importer;
+ Variant metadata;
};
Error _get_path_and_type(const String &p_path, PathAndType &r_path_and_type, bool *r_valid = NULL) const;
static ResourceFormatImporter *singleton;
+ //need them to stay in order to compute the settings hash
+ struct SortImporterByName {
+ bool operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const;
+ };
+
Vector<Ref<ResourceImporter> > importers;
public:
@@ -59,8 +65,11 @@ public:
virtual bool recognize_path(const String &p_path, const String &p_for_type = String()) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
+ virtual Variant get_resource_metadata(const String &p_path) const;
virtual bool is_import_valid(const String &p_path) const;
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
+ virtual bool is_imported(const String &p_path) const { return recognize_path(p_path); }
+ virtual bool exists(const String &p_path) const;
virtual bool can_be_imported(const String &p_path) const;
virtual int get_import_order(const String &p_path) const;
@@ -68,12 +77,17 @@ public:
String get_internal_resource_path(const String &p_path) const;
void get_internal_resource_path_list(const String &p_path, List<String> *r_paths);
- void add_importer(const Ref<ResourceImporter> &p_importer) { importers.push_back(p_importer); }
+ void add_importer(const Ref<ResourceImporter> &p_importer) {
+ importers.push_back(p_importer);
+ }
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const;
void get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter> > *r_importers);
+ bool are_import_settings_valid(const String &p_path) const;
+ String get_import_settings_hash() const;
+
String get_import_base_path(const String &p_for_file) const;
ResourceFormatImporter();
};
@@ -107,7 +121,9 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const = 0;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const = 0;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL) = 0;
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL) = 0;
+ virtual bool are_import_settings_valid(const String &p_path) const { return true; }
+ virtual String get_import_settings_string() const { return String(); }
};
-#endif // RESOURCE_IMPORT_H
+#endif // RESOURCE_IMPORTER_H
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 02e4d8dc7a..e4b694b64f 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -30,7 +30,7 @@
#include "resource_loader.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "core/os/file_access.h"
#include "core/os/os.h"
#include "core/path_remap.h"
@@ -55,7 +55,7 @@ Error ResourceInteractiveLoader::wait() {
ResourceInteractiveLoader::~ResourceInteractiveLoader() {
if (path_loading != String()) {
- ResourceLoader::_remove_from_loading_map(path_loading);
+ ResourceLoader::_remove_from_loading_map_and_thread(path_loading, path_loading_thread);
}
}
@@ -293,10 +293,14 @@ bool ResourceLoader::_add_to_loading_map(const String &p_path) {
loading_map_mutex->lock();
}
- if (loading_map.has(p_path)) {
+ LoadingMapKey key;
+ key.path = p_path;
+ key.thread = Thread::get_caller_id();
+
+ if (loading_map.has(key)) {
success = false;
} else {
- loading_map[p_path] = true;
+ loading_map[key] = true;
success = true;
}
@@ -312,7 +316,27 @@ void ResourceLoader::_remove_from_loading_map(const String &p_path) {
loading_map_mutex->lock();
}
- loading_map.erase(p_path);
+ LoadingMapKey key;
+ key.path = p_path;
+ key.thread = Thread::get_caller_id();
+
+ loading_map.erase(key);
+
+ if (loading_map_mutex) {
+ loading_map_mutex->unlock();
+ }
+}
+
+void ResourceLoader::_remove_from_loading_map_and_thread(const String &p_path, Thread::ID p_thread) {
+ if (loading_map_mutex) {
+ loading_map_mutex->lock();
+ }
+
+ LoadingMapKey key;
+ key.path = p_path;
+ key.thread = p_thread;
+
+ loading_map.erase(key);
if (loading_map_mutex) {
loading_map_mutex->unlock();
@@ -471,6 +495,7 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_
ril->resource = res_cached;
ril->path_loading = local_path;
+ ril->path_loading_thread = Thread::get_caller_id();
return ril;
}
}
@@ -499,6 +524,7 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_
if (!p_no_cache) {
ril->set_local_path(local_path);
ril->path_loading = local_path;
+ ril->path_loading_thread = Thread::get_caller_id();
}
if (xl_remapped)
@@ -607,6 +633,31 @@ bool ResourceLoader::is_import_valid(const String &p_path) {
return false; //not found
}
+bool ResourceLoader::is_imported(const String &p_path) {
+
+ String path = _path_remap(p_path);
+
+ String local_path;
+ if (path.is_rel_path())
+ local_path = "res://" + path;
+ else
+ local_path = ProjectSettings::get_singleton()->localize_path(path);
+
+ for (int i = 0; i < loader_count; i++) {
+
+ if (!loader[i]->recognize_path(local_path))
+ continue;
+ /*
+ if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
+ continue;
+ */
+
+ return loader[i]->is_imported(p_path);
+ }
+
+ return false; //not found
+}
+
void ResourceLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
String path = _path_remap(p_path);
@@ -879,9 +930,9 @@ bool ResourceLoader::add_custom_resource_format_loader(String script_path) {
void ResourceLoader::remove_custom_resource_format_loader(String script_path) {
- Ref<ResourceFormatLoader> loader = _find_custom_resource_format_loader(script_path);
- if (loader.is_valid())
- remove_resource_format_loader(loader);
+ Ref<ResourceFormatLoader> custom_loader = _find_custom_resource_format_loader(script_path);
+ if (custom_loader.is_valid())
+ remove_resource_format_loader(custom_loader);
}
void ResourceLoader::add_custom_loaders() {
@@ -895,7 +946,7 @@ void ResourceLoader::add_custom_loaders() {
for (List<StringName>::Element *E = global_classes.front(); E; E = E->next()) {
StringName class_name = E->get();
- StringName base_class = ScriptServer::get_global_class_base(class_name);
+ StringName base_class = ScriptServer::get_global_class_native_base(class_name);
if (base_class == custom_loader_base_class) {
String path = ScriptServer::get_global_class_path(class_name);
@@ -919,7 +970,7 @@ void ResourceLoader::remove_custom_loaders() {
}
Mutex *ResourceLoader::loading_map_mutex = NULL;
-HashMap<String, int> ResourceLoader::loading_map;
+HashMap<ResourceLoader::LoadingMapKey, int, ResourceLoader::LoadingMapKeyHasher> ResourceLoader::loading_map;
void ResourceLoader::initialize() {
#ifndef NO_THREADS
@@ -929,9 +980,9 @@ void ResourceLoader::initialize() {
void ResourceLoader::finalize() {
#ifndef NO_THREADS
- const String *K = NULL;
+ const LoadingMapKey *K = NULL;
while ((K = loading_map.next(K))) {
- ERR_PRINTS("Exited while resource is being loaded: " + *K);
+ ERR_PRINTS("Exited while resource is being loaded: " + K->path);
}
loading_map.clear();
memdelete(loading_map_mutex);
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index 622b74a998..ca7610a0d2 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -31,8 +31,8 @@
#ifndef RESOURCE_LOADER_H
#define RESOURCE_LOADER_H
+#include "core/os/thread.h"
#include "core/resource.h"
-
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -42,6 +42,7 @@ class ResourceInteractiveLoader : public Reference {
GDCLASS(ResourceInteractiveLoader, Reference);
friend class ResourceLoader;
String path_loading;
+ Thread::ID path_loading_thread;
protected:
static void _bind_methods();
@@ -78,6 +79,7 @@ public:
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map);
virtual bool is_import_valid(const String &p_path) const { return true; }
+ virtual bool is_imported(const String &p_path) const { return false; }
virtual int get_import_order(const String &p_path) const { return 0; }
virtual ~ResourceFormatLoader() {}
@@ -121,10 +123,25 @@ class ResourceLoader {
static Ref<ResourceFormatLoader> _find_custom_resource_format_loader(String path);
static Mutex *loading_map_mutex;
- static HashMap<String, int> loading_map;
+
+ //used to track paths being loaded in a thread, avoids cyclic recursion
+ struct LoadingMapKey {
+ String path;
+ Thread::ID thread;
+ bool operator==(const LoadingMapKey &p_key) const {
+ return (thread == p_key.thread && path == p_key.path);
+ }
+ };
+ struct LoadingMapKeyHasher {
+
+ static _FORCE_INLINE_ uint32_t hash(const LoadingMapKey &p_key) { return p_key.path.hash() + HashMapHasherDefault::hash(p_key.thread); }
+ };
+
+ static HashMap<LoadingMapKey, int, LoadingMapKeyHasher> loading_map;
static bool _add_to_loading_map(const String &p_path);
static void _remove_from_loading_map(const String &p_path);
+ static void _remove_from_loading_map_and_thread(const String &p_path, Thread::ID p_thread);
public:
static Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false, Error *r_error = NULL);
@@ -138,6 +155,7 @@ public:
static void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
static Error rename_dependencies(const String &p_path, const Map<String, String> &p_map);
static bool is_import_valid(const String &p_path);
+ static bool is_imported(const String &p_path);
static int get_import_order(const String &p_path);
static void set_timestamp_on_load(bool p_timestamp) { timestamp_on_load = p_timestamp; }
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp
index 279788796c..0cecca904d 100644
--- a/core/io/resource_saver.cpp
+++ b/core/io/resource_saver.cpp
@@ -233,9 +233,9 @@ bool ResourceSaver::add_custom_resource_format_saver(String script_path) {
void ResourceSaver::remove_custom_resource_format_saver(String script_path) {
- Ref<ResourceFormatSaver> saver = _find_custom_resource_format_saver(script_path);
- if (saver.is_valid())
- remove_resource_format_saver(saver);
+ Ref<ResourceFormatSaver> custom_saver = _find_custom_resource_format_saver(script_path);
+ if (custom_saver.is_valid())
+ remove_resource_format_saver(custom_saver);
}
void ResourceSaver::add_custom_savers() {
@@ -249,7 +249,7 @@ void ResourceSaver::add_custom_savers() {
for (List<StringName>::Element *E = global_classes.front(); E; E = E->next()) {
StringName class_name = E->get();
- StringName base_class = ScriptServer::get_global_class_base(class_name);
+ StringName base_class = ScriptServer::get_global_class_native_base(class_name);
if (base_class == custom_saver_base_class) {
String path = ScriptServer::get_global_class_path(class_name);
diff --git a/core/list.h b/core/list.h
index dd4ea3bd89..c26aad6463 100644
--- a/core/list.h
+++ b/core/list.h
@@ -32,7 +32,7 @@
#define GLOBALS_LIST_H
#include "core/os/memory.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
/**
* Generic Templatized Linked List Implementation.
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index a0556ae839..6c3b84d49a 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -97,11 +97,14 @@ void AStar::remove_point(int p_id) {
Point *p = points[p_id];
- for (Set<Point *>::Element *E = p->neighbours.front(); E; E = E->next()) {
-
- Segment s(p_id, E->get()->id);
- segments.erase(s);
- E->get()->neighbours.erase(p);
+ Map<int, Point *>::Element *PE = points.front();
+ while (PE) {
+ for (Set<Point *>::Element *E = PE->get()->neighbours.front(); E; E = E->next()) {
+ Segment s(p_id, E->get()->id);
+ segments.erase(s);
+ E->get()->neighbours.erase(p);
+ }
+ PE = PE->next();
}
memdelete(p);
@@ -260,8 +263,8 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
}
// Check open list
- SelfList<Point> *least_cost_point = NULL;
- real_t least_cost = 1e30;
+ SelfList<Point> *least_cost_point = open_list.first();
+ real_t least_cost = Math_INF;
// TODO: Cache previous results
for (SelfList<Point> *E = open_list.first(); E; E = E->next()) {
@@ -371,14 +374,14 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
{
PoolVector<Vector3>::Write w = path.write();
- Point *p = end_point;
+ Point *p2 = end_point;
int idx = pc - 1;
- while (p != begin_point) {
- w[idx--] = p->pos;
- p = p->prev_point;
+ while (p2 != begin_point) {
+ w[idx--] = p2->pos;
+ p2 = p2->prev_point;
}
- w[0] = p->pos; // Assign first
+ w[0] = p2->pos; // Assign first
}
return path;
diff --git a/core/math/matrix3.cpp b/core/math/basis.cpp
index 0aa67078fb..8816e3639a 100644
--- a/core/math/matrix3.cpp
+++ b/core/math/basis.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* matrix3.cpp */
+/* basis.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "matrix3.h"
+#include "basis.h"
#include "core/math/math_funcs.h"
#include "core/os/copymem.h"
@@ -76,9 +76,11 @@ void Basis::invert() {
}
void Basis::orthonormalize() {
+
#ifdef MATH_CHECKS
ERR_FAIL_COND(determinant() == 0);
#endif
+
// Gram-Schmidt Process
Vector3 x = get_axis(0);
@@ -118,16 +120,16 @@ bool Basis::is_diagonal() const {
}
bool Basis::is_rotation() const {
- return Math::is_equal_approx(determinant(), 1) && is_orthogonal();
+ return Math::is_equal_approx(determinant(), 1, UNIT_EPSILON) && is_orthogonal();
}
bool Basis::is_symmetric() const {
- if (!Math::is_equal_approx(elements[0][1], elements[1][0]))
+ if (!Math::is_equal_approx_ratio(elements[0][1], elements[1][0], UNIT_EPSILON))
return false;
- if (!Math::is_equal_approx(elements[0][2], elements[2][0]))
+ if (!Math::is_equal_approx_ratio(elements[0][2], elements[2][0], UNIT_EPSILON))
return false;
- if (!Math::is_equal_approx(elements[1][2], elements[2][1]))
+ if (!Math::is_equal_approx_ratio(elements[1][2], elements[2][1], UNIT_EPSILON))
return false;
return true;
@@ -258,7 +260,7 @@ Vector3 Basis::get_scale_abs() const {
}
Vector3 Basis::get_scale_local() const {
- real_t det_sign = determinant() > 0 ? 1 : -1;
+ real_t det_sign = SGN(determinant());
return det_sign * Vector3(elements[0].length(), elements[1].length(), elements[2].length());
}
@@ -284,7 +286,7 @@ Vector3 Basis::get_scale() const {
// matrix elements.
//
// The rotation part of this decomposition is returned by get_rotation* functions.
- real_t det_sign = determinant() > 0 ? 1 : -1;
+ real_t det_sign = SGN(determinant());
return det_sign * Vector3(
Vector3(elements[0][0], elements[1][0], elements[2][0]).length(),
Vector3(elements[0][1], elements[1][1], elements[2][1]).length(),
@@ -488,6 +490,11 @@ void Basis::set_euler_xyz(const Vector3 &p_euler) {
// as the x, y, and z components of a Vector3 respectively.
Vector3 Basis::get_euler_yxz() const {
+ /* checking this is a bad idea, because obtaining from scaled transform is a valid use case
+#ifdef MATH_CHECKS
+ ERR_FAIL_COND(!is_rotation());
+#endif
+*/
// Euler angles in YXZ convention.
// See https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix
//
@@ -496,9 +503,7 @@ Vector3 Basis::get_euler_yxz() const {
// cy*sx*sz-cz*sy cy*cz*sx+sy*sz cy*cx
Vector3 euler;
-#ifdef MATH_CHECKS
- ERR_FAIL_COND_V(!is_rotation(), euler);
-#endif
+
real_t m12 = elements[1][2];
if (m12 < 1) {
@@ -556,7 +561,7 @@ bool Basis::is_equal_approx(const Basis &a, const Basis &b) const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
- if (!Math::is_equal_approx(a.elements[i][j], b.elements[i][j]))
+ if (!Math::is_equal_approx_ratio(a.elements[i][j], b.elements[i][j], UNIT_EPSILON))
return false;
}
}
@@ -599,10 +604,14 @@ Basis::operator String() const {
}
Quat Basis::get_quat() const {
-#ifdef MATH_CHECKS
- ERR_FAIL_COND_V(!is_rotation(), Quat());
-#endif
- real_t trace = elements[0][0] + elements[1][1] + elements[2][2];
+
+ /* Allow getting a quaternion from an unnormalized transform */
+ Basis m = *this;
+ m.elements[0].normalize();
+ m.elements[1].normalize();
+ m.elements[2].normalize();
+
+ real_t trace = m.elements[0][0] + m.elements[1][1] + m.elements[2][2];
real_t temp[4];
if (trace > 0.0) {
@@ -610,23 +619,23 @@ Quat Basis::get_quat() const {
temp[3] = (s * 0.5);
s = 0.5 / s;
- temp[0] = ((elements[2][1] - elements[1][2]) * s);
- temp[1] = ((elements[0][2] - elements[2][0]) * s);
- temp[2] = ((elements[1][0] - elements[0][1]) * s);
+ temp[0] = ((m.elements[2][1] - m.elements[1][2]) * s);
+ temp[1] = ((m.elements[0][2] - m.elements[2][0]) * s);
+ temp[2] = ((m.elements[1][0] - m.elements[0][1]) * s);
} else {
- int i = elements[0][0] < elements[1][1] ?
- (elements[1][1] < elements[2][2] ? 2 : 1) :
- (elements[0][0] < elements[2][2] ? 2 : 0);
+ int i = m.elements[0][0] < m.elements[1][1] ?
+ (m.elements[1][1] < m.elements[2][2] ? 2 : 1) :
+ (m.elements[0][0] < m.elements[2][2] ? 2 : 0);
int j = (i + 1) % 3;
int k = (i + 2) % 3;
- real_t s = Math::sqrt(elements[i][i] - elements[j][j] - elements[k][k] + 1.0);
+ real_t s = Math::sqrt(m.elements[i][i] - m.elements[j][j] - m.elements[k][k] + 1.0);
temp[i] = s * 0.5;
s = 0.5 / s;
- temp[3] = (elements[k][j] - elements[j][k]) * s;
- temp[j] = (elements[j][i] + elements[i][j]) * s;
- temp[k] = (elements[k][i] + elements[i][k]) * s;
+ temp[3] = (m.elements[k][j] - m.elements[j][k]) * s;
+ temp[j] = (m.elements[j][i] + m.elements[i][j]) * s;
+ temp[k] = (m.elements[k][i] + m.elements[i][k]) * s;
}
return Quat(temp[0], temp[1], temp[2], temp[3]);
@@ -696,9 +705,11 @@ void Basis::set_orthogonal_index(int p_index) {
}
void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
+ /* checking this is a bad idea, because obtaining from scaled transform is a valid use case
#ifdef MATH_CHECKS
ERR_FAIL_COND(!is_rotation());
#endif
+*/
real_t angle, x, y, z; // variables for result
real_t epsilon = 0.01; // margin to allow for rounding errors
real_t epsilon2 = 0.1; // margin to distinguish between 0 and 180 degrees
@@ -835,14 +846,15 @@ void Basis::set_diagonal(const Vector3 p_diag) {
}
Basis Basis::slerp(const Basis &target, const real_t &t) const {
-// TODO: implement this directly without using quaternions to make it more efficient
-#ifdef MATH_CHECKS
- ERR_FAIL_COND_V(!is_rotation(), Basis());
- ERR_FAIL_COND_V(!target.is_rotation(), Basis());
-#endif
+ //consider scale
Quat from(*this);
Quat to(target);
- return Basis(from.slerp(to, t));
+ Basis b(from.slerp(to, t));
+ b.elements[0] *= Math::lerp(elements[0].length(), target.elements[0].length(), t);
+ b.elements[1] *= Math::lerp(elements[1].length(), target.elements[1].length(), t);
+ b.elements[2] *= Math::lerp(elements[2].length(), target.elements[2].length(), t);
+
+ return b;
}
diff --git a/core/math/matrix3.h b/core/math/basis.h
index e7d6ab4522..128e56b494 100644
--- a/core/math/matrix3.h
+++ b/core/math/basis.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* matrix3.h */
+/* basis.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -31,8 +31,8 @@
// Circular dependency between Vector3 and Basis :/
#include "core/math/vector3.h"
-#ifndef MATRIX3_H
-#define MATRIX3_H
+#ifndef BASIS_H
+#define BASIS_H
#include "core/math/quat.h"
@@ -341,4 +341,4 @@ real_t Basis::determinant() const {
elements[1][0] * (elements[0][1] * elements[2][2] - elements[2][1] * elements[0][2]) +
elements[2][0] * (elements[0][1] * elements[1][2] - elements[1][1] * elements[0][2]);
}
-#endif
+#endif // BASIS_H
diff --git a/core/math/bsp_tree.h b/core/math/bsp_tree.h
index 0af532a2d5..a7a3697990 100644
--- a/core/math/bsp_tree.h
+++ b/core/math/bsp_tree.h
@@ -31,11 +31,11 @@
#ifndef BSP_TREE_H
#define BSP_TREE_H
-#include "core/dvector.h"
#include "core/math/aabb.h"
#include "core/math/face3.h"
#include "core/math/plane.h"
#include "core/method_ptrcall.h"
+#include "core/pool_vector.h"
#include "core/variant.h"
#include "core/vector.h"
/**
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index 61e5154f44..99251d80e3 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -1264,10 +1264,10 @@ Expression::ENode *Expression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *subexpr = _parse_expression();
+ if (!subexpr)
return NULL;
- dn->dict.push_back(expr);
+ dn->dict.push_back(subexpr);
_get_token(tk);
if (tk.type != TK_COLON) {
@@ -1275,11 +1275,11 @@ Expression::ENode *Expression::_parse_expression() {
return NULL;
}
- expr = _parse_expression();
- if (!expr)
+ subexpr = _parse_expression();
+ if (!subexpr)
return NULL;
- dn->dict.push_back(expr);
+ dn->dict.push_back(subexpr);
cofs = str_ofs;
_get_token(tk);
@@ -1308,10 +1308,10 @@ Expression::ENode *Expression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *subexpr = _parse_expression();
+ if (!subexpr)
return NULL;
- an->array.push_back(expr);
+ an->array.push_back(subexpr);
cofs = str_ofs;
_get_token(tk);
@@ -1355,25 +1355,25 @@ Expression::ENode *Expression::_parse_expression() {
while (true) {
- int cofs = str_ofs;
+ int cofs2 = str_ofs;
_get_token(tk);
if (tk.type == TK_PARENTHESIS_CLOSE) {
break;
}
- str_ofs = cofs; //revert
+ str_ofs = cofs2; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *subexpr = _parse_expression();
+ if (!subexpr)
return NULL;
- func_call->arguments.push_back(expr);
+ func_call->arguments.push_back(subexpr);
- cofs = str_ofs;
+ cofs2 = str_ofs;
_get_token(tk);
if (tk.type == TK_COMMA) {
//all good
} else if (tk.type == TK_PARENTHESIS_CLOSE) {
- str_ofs = cofs;
+ str_ofs = cofs2;
} else {
_set_error("Expected ',' or ')'");
}
@@ -1444,11 +1444,11 @@ Expression::ENode *Expression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *subexpr = _parse_expression();
+ if (!subexpr)
return NULL;
- constructor->arguments.push_back(expr);
+ constructor->arguments.push_back(subexpr);
cofs = str_ofs;
_get_token(tk);
@@ -1485,11 +1485,11 @@ Expression::ENode *Expression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *subexpr = _parse_expression();
+ if (!subexpr)
return NULL;
- bifunc->arguments.push_back(expr);
+ bifunc->arguments.push_back(subexpr);
cofs = str_ofs;
_get_token(tk);
@@ -1584,25 +1584,25 @@ Expression::ENode *Expression::_parse_expression() {
while (true) {
- int cofs = str_ofs;
+ int cofs3 = str_ofs;
_get_token(tk);
if (tk.type == TK_PARENTHESIS_CLOSE) {
break;
}
- str_ofs = cofs; //revert
+ str_ofs = cofs3; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *subexpr = _parse_expression();
+ if (!subexpr)
return NULL;
- func_call->arguments.push_back(expr);
+ func_call->arguments.push_back(subexpr);
- cofs = str_ofs;
+ cofs3 = str_ofs;
_get_token(tk);
if (tk.type == TK_COMMA) {
//all good
} else if (tk.type == TK_PARENTHESIS_CLOSE) {
- str_ofs = cofs;
+ str_ofs = cofs3;
} else {
_set_error("Expected ',' or ')'");
}
@@ -1902,7 +1902,7 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression:
Variant b;
if (op->nodes[1]) {
- bool ret = _execute(p_inputs, p_instance, op->nodes[1], b, r_error_str);
+ ret = _execute(p_inputs, p_instance, op->nodes[1], b, r_error_str);
if (ret)
return true;
}
@@ -2070,7 +2070,7 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression:
for (int i = 0; i < call->arguments.size(); i++) {
Variant value;
- bool ret = _execute(p_inputs, p_instance, call->arguments[i], value, r_error_str);
+ ret = _execute(p_inputs, p_instance, call->arguments[i], value, r_error_str);
if (ret)
return true;
diff --git a/core/math/face3.h b/core/math/face3.h
index 1a00851eab..184e80ff77 100644
--- a/core/math/face3.h
+++ b/core/math/face3.h
@@ -241,13 +241,13 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const {
real_t minT = 1e20, maxT = -1e20;
for (int k = 0; k < 3; k++) {
- real_t d = axis.dot(vertex[k]);
+ real_t vert_d = axis.dot(vertex[k]);
- if (d > maxT)
- maxT = d;
+ if (vert_d > maxT)
+ maxT = vert_d;
- if (d < minT)
- minT = d;
+ if (vert_d < minT)
+ minT = vert_d;
}
if (maxB < minT || maxT < minB)
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp
index 95399fb0c6..a84b5a16c7 100644
--- a/core/math/geometry.cpp
+++ b/core/math/geometry.cpp
@@ -31,6 +31,7 @@
#include "geometry.h"
#include "core/print_string.h"
+#include "thirdparty/misc/triangulator.h"
/* this implementation is very inefficient, commenting unless bugs happen. See the other one.
bool Geometry::is_point_in_polygon(const Vector2 &p_point, const Vector<Vector2> &p_polygon) {
@@ -737,6 +738,40 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
return wrapped_faces;
}
+Vector<Vector<Vector2> > Geometry::decompose_polygon_in_convex(Vector<Point2> polygon) {
+ Vector<Vector<Vector2> > decomp;
+ List<TriangulatorPoly> in_poly, out_poly;
+
+ TriangulatorPoly inp;
+ inp.Init(polygon.size());
+ for (int i = 0; i < polygon.size(); i++) {
+ inp.GetPoint(i) = polygon[i];
+ }
+ inp.SetOrientation(TRIANGULATOR_CCW);
+ in_poly.push_back(inp);
+ TriangulatorPartition tpart;
+ if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
+ ERR_PRINT("Convex decomposing failed!");
+ return decomp;
+ }
+
+ decomp.resize(out_poly.size());
+ int idx = 0;
+ for (List<TriangulatorPoly>::Element *I = out_poly.front(); I; I = I->next()) {
+ TriangulatorPoly &tp = I->get();
+
+ decomp.write[idx].resize(tp.GetNumPoints());
+
+ for (int i = 0; i < tp.GetNumPoints(); i++) {
+ decomp.write[idx].write[i] = tp.GetPoint(i);
+ }
+
+ idx++;
+ }
+
+ return decomp;
+}
+
Geometry::MeshData Geometry::build_convex_mesh(const PoolVector<Plane> &p_planes) {
MeshData mesh;
diff --git a/core/math/geometry.h b/core/math/geometry.h
index 29493516b8..4b478b6b16 100644
--- a/core/math/geometry.h
+++ b/core/math/geometry.h
@@ -31,12 +31,12 @@
#ifndef GEOMETRY_H
#define GEOMETRY_H
-#include "core/dvector.h"
#include "core/math/face3.h"
#include "core/math/rect2.h"
#include "core/math/triangulate.h"
#include "core/math/vector3.h"
#include "core/object.h"
+#include "core/pool_vector.h"
#include "core/print_string.h"
#include "core/vector.h"
@@ -950,6 +950,8 @@ public:
return H;
}
+ static Vector<Vector<Vector2> > decompose_polygon_in_convex(Vector<Point2> polygon);
+
static MeshData build_convex_mesh(const PoolVector<Plane> &p_planes);
static PoolVector<Plane> build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z);
static PoolVector<Plane> build_box_planes(const Vector3 &p_extents);
diff --git a/core/math/math_defs.h b/core/math/math_defs.h
index 48533ba659..c54d3cc96f 100644
--- a/core/math/math_defs.h
+++ b/core/math/math_defs.h
@@ -33,6 +33,7 @@
#define CMP_EPSILON 0.00001
#define CMP_EPSILON2 (CMP_EPSILON * CMP_EPSILON)
+
#define CMP_NORMALIZE_TOLERANCE 0.000001
#define CMP_POINT_IN_PLANE_EPSILON 0.00001
@@ -49,6 +50,14 @@
#define MATH_CHECKS
#endif
+//this epsilon is for values related to a unit size (scalar or vector len)
+#ifdef PRECISE_MATH_CHECKS
+#define UNIT_EPSILON 0.00001
+#else
+//tolerate some more floating point error normally
+#define UNIT_EPSILON 0.001
+#endif
+
#define USEC_TO_SEC(m_usec) ((m_usec) / 1000000.0)
enum ClockDirection {
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index ea0bfd88cc..17112d8940 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -217,17 +217,17 @@ public:
static _ALWAYS_INLINE_ double round(double p_val) { return (p_val >= 0) ? Math::floor(p_val + 0.5) : -Math::floor(-p_val + 0.5); }
static _ALWAYS_INLINE_ float round(float p_val) { return (p_val >= 0) ? Math::floor(p_val + 0.5) : -Math::floor(-p_val + 0.5); }
- static _ALWAYS_INLINE_ int wrapi(int value, int min, int max) {
- int rng = max - min;
- return min + ((((value - min) % rng) + rng) % rng);
+ static _ALWAYS_INLINE_ int64_t wrapi(int64_t value, int64_t min, int64_t max) {
+ int64_t rng = max - min;
+ return (rng != 0) ? min + ((((value - min) % rng) + rng) % rng) : min;
}
static _ALWAYS_INLINE_ double wrapf(double value, double min, double max) {
double rng = max - min;
- return value - (rng * Math::floor((value - min) / rng));
+ return (!is_equal_approx(rng, 0.0)) ? value - (rng * Math::floor((value - min) / rng)) : min;
}
static _ALWAYS_INLINE_ float wrapf(float value, float min, float max) {
float rng = max - min;
- return value - (rng * Math::floor((value - min) / rng));
+ return (!is_equal_approx(rng, 0.0f)) ? value - (rng * Math::floor((value - min) / rng)) : min;
}
// double only, as these functions are mainly used by the editor and not performance-critical,
@@ -242,20 +242,32 @@ public:
static void randomize();
static uint32_t rand_from_seed(uint64_t *seed);
static uint32_t rand();
- static _ALWAYS_INLINE_ double randf() { return (double)rand() / (double)Math::RANDOM_MAX; }
- static _ALWAYS_INLINE_ float randd() { return (float)rand() / (float)Math::RANDOM_MAX; }
+ static _ALWAYS_INLINE_ double randd() { return (double)rand() / (double)Math::RANDOM_MAX; }
+ static _ALWAYS_INLINE_ float randf() { return (float)rand() / (float)Math::RANDOM_MAX; }
static double random(double from, double to);
static float random(float from, float to);
static real_t random(int from, int to) { return (real_t)random((real_t)from, (real_t)to); }
- static _ALWAYS_INLINE_ bool is_equal_approx(real_t a, real_t b) {
+ static _ALWAYS_INLINE_ bool is_equal_approx_ratio(real_t a, real_t b, real_t epsilon = CMP_EPSILON) {
+ // this is an approximate way to check that numbers are close, as a ratio of their average size
+ // helps compare approximate numbers that may be very big or very small
+ real_t diff = abs(a - b);
+ if (diff == 0.0) {
+ return true;
+ }
+ real_t avg_size = (abs(a) + abs(b)) / 2.0;
+ diff /= avg_size;
+ return diff < epsilon;
+ }
+
+ static _ALWAYS_INLINE_ bool is_equal_approx(real_t a, real_t b, real_t epsilon = CMP_EPSILON) {
// TODO: Comparing floats for approximate-equality is non-trivial.
// Using epsilon should cover the typical cases in Godot (where a == b is used to compare two reals), such as matrix and vector comparison operators.
// A proper implementation in terms of ULPs should eventually replace the contents of this function.
// See https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ for details.
- return abs(a - b) < CMP_EPSILON;
+ return abs(a - b) < epsilon;
}
static _ALWAYS_INLINE_ float absf(float g) {
diff --git a/core/math/octree.h b/core/math/octree.h
index 36a77663f4..d6fc9776bc 100644
--- a/core/math/octree.h
+++ b/core/math/octree.h
@@ -916,34 +916,34 @@ void Octree<T, use_pairs, AL>::move(OctreeElementID p_id, const AABB &p_aabb) {
pass++;
- for (typename List<typename Element::OctantOwner, AL>::Element *E = owners.front(); E;) {
+ for (typename List<typename Element::OctantOwner, AL>::Element *F = owners.front(); F;) {
- Octant *o = E->get().octant;
- typename List<typename Element::OctantOwner, AL>::Element *N = E->next();
+ Octant *o = F->get().octant;
+ typename List<typename Element::OctantOwner, AL>::Element *N = F->next();
/*
if (!use_pairs)
- o->elements.erase( E->get().E );
+ o->elements.erase( F->get().E );
*/
if (use_pairs && e.pairable)
- o->pairable_elements.erase(E->get().E);
+ o->pairable_elements.erase(F->get().E);
else
- o->elements.erase(E->get().E);
+ o->elements.erase(F->get().E);
if (_remove_element_from_octant(&e, o, common_parent->parent)) {
- owners.erase(E);
+ owners.erase(F);
}
- E = N;
+ F = N;
}
if (use_pairs) {
//unpair child elements in anything that survived
- for (typename List<typename Element::OctantOwner, AL>::Element *E = owners.front(); E; E = E->next()) {
+ for (typename List<typename Element::OctantOwner, AL>::Element *F = owners.front(); F; F = F->next()) {
- Octant *o = E->get().octant;
+ Octant *o = F->get().octant;
// erase children pairs, unref ONCE
pass++;
diff --git a/core/math/quat.cpp b/core/math/quat.cpp
index c1e45f36f0..1a67be7384 100644
--- a/core/math/quat.cpp
+++ b/core/math/quat.cpp
@@ -30,7 +30,7 @@
#include "quat.h"
-#include "core/math/matrix3.h"
+#include "core/math/basis.h"
#include "core/print_string.h"
// set_euler_xyz expects a vector containing the Euler angles in the format
@@ -135,7 +135,7 @@ Quat Quat::normalized() const {
}
bool Quat::is_normalized() const {
- return Math::is_equal_approx(length_squared(), 1.0);
+ return Math::is_equal_approx(length_squared(), 1.0, UNIT_EPSILON); //use less epsilon
}
Quat Quat::inverse() const {
diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp
index 1aa345db1f..fc2eb1454d 100644
--- a/core/math/quick_hull.cpp
+++ b/core/math/quick_hull.cpp
@@ -36,8 +36,6 @@ uint32_t QuickHull::debug_stop_after = 0xFFFFFFFF;
Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_mesh) {
- static const real_t over_tolerance = 0.0001;
-
/* CREATE AABB VOLUME */
AABB aabb;
@@ -180,6 +178,8 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
faces.push_back(f);
}
+ real_t over_tolerance = 3 * UNIT_EPSILON * (aabb.size.x + aabb.size.y + aabb.size.z);
+
/* COMPUTE AVAILABLE VERTICES */
for (int i = 0; i < p_points.size(); i++) {
@@ -438,12 +438,12 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
}
// remove all edge connections to this face
- for (Map<Edge, RetFaceConnect>::Element *E = ret_edges.front(); E; E = E->next()) {
- if (E->get().left == O)
- E->get().left = NULL;
+ for (Map<Edge, RetFaceConnect>::Element *G = ret_edges.front(); G; G = G->next()) {
+ if (G->get().left == O)
+ G->get().left = NULL;
- if (E->get().right == O)
- E->get().right = NULL;
+ if (G->get().right == O)
+ G->get().right = NULL;
}
ret_edges.erase(F); //remove the edge
diff --git a/core/math/quick_hull.h b/core/math/quick_hull.h
index 2e659cab6e..a445a47cbe 100644
--- a/core/math/quick_hull.h
+++ b/core/math/quick_hull.h
@@ -64,7 +64,7 @@ public:
struct Face {
Plane plane;
- int vertices[3];
+ uint32_t vertices[3];
Vector<int> points_over;
bool operator<(const Face &p_face) const {
diff --git a/core/math/random_pcg.cpp b/core/math/random_pcg.cpp
index 8bbcca88fe..45467b32b2 100644
--- a/core/math/random_pcg.cpp
+++ b/core/math/random_pcg.cpp
@@ -32,24 +32,25 @@
#include "core/os/os.h"
-RandomPCG::RandomPCG(uint64_t seed, uint64_t inc) :
- pcg() {
- pcg.state = seed;
- pcg.inc = inc;
+RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
+ pcg(),
+ current_seed(DEFAULT_SEED) {
+ pcg.inc = p_inc;
+ seed(p_seed);
}
void RandomPCG::randomize() {
seed(OS::get_singleton()->get_ticks_usec() * pcg.state + PCG_DEFAULT_INC_64);
}
-double RandomPCG::random(double from, double to) {
+double RandomPCG::random(double p_from, double p_to) {
unsigned int r = rand();
double ret = (double)r / (double)RANDOM_MAX;
- return (ret) * (to - from) + from;
+ return (ret) * (p_to - p_from) + p_from;
}
-float RandomPCG::random(float from, float to) {
+float RandomPCG::random(float p_from, float p_to) {
unsigned int r = rand();
float ret = (float)r / (float)RANDOM_MAX;
- return (ret) * (to - from) + from;
+ return (ret) * (p_to - p_from) + p_from;
}
diff --git a/core/math/random_pcg.h b/core/math/random_pcg.h
index ef69bf7120..230eb9a11b 100644
--- a/core/math/random_pcg.h
+++ b/core/math/random_pcg.h
@@ -37,25 +37,33 @@
class RandomPCG {
pcg32_random_t pcg;
+ uint64_t current_seed; // seed with this to get the same state
public:
static const uint64_t DEFAULT_SEED = 12047754176567800795U;
static const uint64_t DEFAULT_INC = PCG_DEFAULT_INC_64;
static const uint64_t RANDOM_MAX = 0xFFFFFFFF;
- RandomPCG(uint64_t seed = DEFAULT_SEED, uint64_t inc = PCG_DEFAULT_INC_64);
+ RandomPCG(uint64_t p_seed = DEFAULT_SEED, uint64_t p_inc = PCG_DEFAULT_INC_64);
- _FORCE_INLINE_ void seed(uint64_t seed) { pcg.state = seed; }
- _FORCE_INLINE_ uint64_t get_seed() { return pcg.state; }
+ _FORCE_INLINE_ void seed(uint64_t p_seed) {
+ current_seed = p_seed;
+ pcg.state = p_seed;
+ pcg32_random_r(&pcg); // Force changing internal state to avoid initial 0
+ }
+ _FORCE_INLINE_ uint64_t get_seed() { return current_seed; }
void randomize();
- _FORCE_INLINE_ uint32_t rand() { return pcg32_random_r(&pcg); }
+ _FORCE_INLINE_ uint32_t rand() {
+ current_seed = pcg.state;
+ return pcg32_random_r(&pcg);
+ }
_FORCE_INLINE_ double randd() { return (double)rand() / (double)RANDOM_MAX; }
_FORCE_INLINE_ float randf() { return (float)rand() / (float)RANDOM_MAX; }
- double random(double from, double to);
- float random(float from, float to);
- real_t random(int from, int to) { return (real_t)random((real_t)from, (real_t)to); }
+ double random(double p_from, double p_to);
+ float random(float p_from, float p_to);
+ real_t random(int p_from, int p_to) { return (real_t)random((real_t)p_from, (real_t)p_to); }
};
#endif // RANDOM_PCG_H
diff --git a/core/math/transform.h b/core/math/transform.h
index 9b323a6f0f..2f43f6b035 100644
--- a/core/math/transform.h
+++ b/core/math/transform.h
@@ -32,7 +32,7 @@
#define TRANSFORM_H
#include "core/math/aabb.h"
-#include "core/math/matrix3.h"
+#include "core/math/basis.h"
#include "core/math/plane.h"
/**
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp
index 295e60babb..7d00158f3d 100644
--- a/core/math/transform_2d.cpp
+++ b/core/math/transform_2d.cpp
@@ -80,13 +80,14 @@ real_t Transform2D::get_rotation() const {
}
void Transform2D::set_rotation(real_t p_rot) {
-
+ Size2 scale = get_scale();
real_t cr = Math::cos(p_rot);
real_t sr = Math::sin(p_rot);
elements[0][0] = cr;
elements[0][1] = sr;
elements[1][0] = -sr;
elements[1][1] = cr;
+ set_scale(scale);
}
Transform2D::Transform2D(real_t p_rot, const Vector2 &p_pos) {
@@ -101,10 +102,17 @@ Transform2D::Transform2D(real_t p_rot, const Vector2 &p_pos) {
}
Size2 Transform2D::get_scale() const {
- real_t det_sign = basis_determinant() > 0 ? 1 : -1;
+ real_t det_sign = SGN(basis_determinant());
return Size2(elements[0].length(), det_sign * elements[1].length());
}
+void Transform2D::set_scale(Size2 &p_scale) {
+ elements[0].normalize();
+ elements[1].normalize();
+ elements[0] *= p_scale.x;
+ elements[1] *= p_scale.y;
+}
+
void Transform2D::scale(const Size2 &p_scale) {
scale_basis(p_scale);
elements[2] *= p_scale;
diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h
index 507e6a16eb..b9e7a36fb3 100644
--- a/core/math/transform_2d.h
+++ b/core/math/transform_2d.h
@@ -81,6 +81,7 @@ struct Transform2D {
real_t basis_determinant() const;
Size2 get_scale() const;
+ void set_scale(Size2 &p_scale);
_FORCE_INLINE_ const Vector2 &get_origin() const { return elements[2]; }
_FORCE_INLINE_ void set_origin(const Vector2 &p_origin) { elements[2] = p_origin; }
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index cdf3d16b72..83784a1fa7 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -30,7 +30,7 @@
#include "triangle_mesh.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
int TriangleMesh::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, int p_depth, int &max_depth, int &max_alloc) {
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index e580057950..5c1ea5943d 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -65,7 +65,7 @@ Vector2 Vector2::normalized() const {
bool Vector2::is_normalized() const {
// use length_squared() instead of length() to avoid sqrt(), makes it more stringent.
- return Math::is_equal_approx(length_squared(), 1.0);
+ return Math::is_equal_approx(length_squared(), 1.0, UNIT_EPSILON);
}
real_t Vector2::distance_to(const Vector2 &p_vector2) const {
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index b2e89ac7b8..1c28934422 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -30,7 +30,7 @@
#include "vector3.h"
-#include "core/math/matrix3.h"
+#include "core/math/basis.h"
void Vector3::rotate(const Vector3 &p_axis, real_t p_phi) {
diff --git a/core/math/vector3.h b/core/math/vector3.h
index b0eef35635..b11838d16e 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -151,7 +151,7 @@ struct Vector3 {
};
// Should be included after class definition, otherwise we get circular refs
-#include "core/math/matrix3.h"
+#include "core/math/basis.h"
Vector3 Vector3::cross(const Vector3 &p_b) const {
@@ -414,7 +414,7 @@ Vector3 Vector3::normalized() const {
bool Vector3::is_normalized() const {
// use length_squared() instead of length() to avoid sqrt(), makes it more stringent.
- return Math::is_equal_approx(length_squared(), 1.0);
+ return Math::is_equal_approx(length_squared(), 1.0, UNIT_EPSILON);
}
Vector3 Vector3::inverse() const {
diff --git a/core/node_path.h b/core/node_path.h
index 17b1435723..24725123d6 100644
--- a/core/node_path.h
+++ b/core/node_path.h
@@ -31,7 +31,7 @@
#ifndef NODE_PATH_H
#define NODE_PATH_H
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
/**
diff --git a/core/object.cpp b/core/object.cpp
index 682586a7ab..8b693f039c 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -703,40 +703,38 @@ Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Vari
}
#ifdef DEBUG_ENABLED
-static bool _test_call_error(const StringName &p_func, const Variant::CallError &error) {
+static void _test_call_error(const StringName &p_func, const Variant::CallError &error) {
switch (error.error) {
case Variant::CallError::CALL_OK:
- return true;
case Variant::CallError::CALL_ERROR_INVALID_METHOD:
- return false;
+ break;
case Variant::CallError::CALL_ERROR_INVALID_ARGUMENT: {
ERR_EXPLAIN("Error Calling Function: " + String(p_func) + " - Invalid type for argument " + itos(error.argument) + ", expected " + Variant::get_type_name(error.expected));
- ERR_FAIL_V(true);
- } break;
+ ERR_FAIL();
+ break;
+ }
case Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
ERR_EXPLAIN("Error Calling Function: " + String(p_func) + " - Too many arguments, expected " + itos(error.argument));
- ERR_FAIL_V(true);
-
- } break;
+ ERR_FAIL();
+ break;
+ }
case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
ERR_EXPLAIN("Error Calling Function: " + String(p_func) + " - Too few arguments, expected " + itos(error.argument));
- ERR_FAIL_V(true);
-
- } break;
- case Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL: {
- } //?
+ ERR_FAIL();
+ break;
+ }
+ case Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL:
+ break;
}
-
- return true;
}
#else
-#define _test_call_error(m_str, m_err) ((m_err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) ? false : true)
+#define _test_call_error(m_str, m_err)
#endif
@@ -834,23 +832,22 @@ void Object::setvar(const Variant &p_key, const Variant &p_value, bool *r_valid)
}
Variant Object::callv(const StringName &p_method, const Array &p_args) {
+ const Variant **argptrs = NULL;
- if (p_args.size() == 0) {
- return call(p_method);
- }
-
- Vector<Variant> args;
- args.resize(p_args.size());
- Vector<const Variant *> argptrs;
- argptrs.resize(p_args.size());
-
- for (int i = 0; i < p_args.size(); i++) {
- args.write[i] = p_args[i];
- argptrs.write[i] = &args[i];
+ if (p_args.size() > 0) {
+ argptrs = (const Variant **)alloca(sizeof(Variant *) * p_args.size());
+ for (int i = 0; i < p_args.size(); i++) {
+ argptrs[i] = &p_args[i];
+ }
}
Variant::CallError ce;
- return call(p_method, (const Variant **)argptrs.ptr(), p_args.size(), ce);
+ Variant ret = call(p_method, argptrs, p_args.size(), ce);
+ if (ce.error != Variant::CallError::CALL_OK) {
+ ERR_EXPLAIN("Error calling method from 'callv': " + Variant::get_call_error_text(this, p_method, argptrs, p_args.size(), ce));
+ ERR_FAIL_V(Variant());
+ }
+ return ret;
}
Variant Object::call(const StringName &p_name, VARIANT_ARG_DECLARE) {
@@ -1016,7 +1013,7 @@ void Object::set_script(const RefPtr &p_script) {
}
}
- _change_notify("script");
+ _change_notify(); //scripts may add variables, so refresh is desired
emit_signal(CoreStringNames::get_singleton()->script_changed);
}
@@ -1247,7 +1244,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
bool disconnect = c.flags & CONNECT_ONESHOT;
#ifdef TOOLS_ENABLED
if (disconnect && (c.flags & CONNECT_PERSIST) && Engine::get_singleton()->is_editor_hint()) {
- //this signal was connected from the editor, and is being edited. just dont disconnect for now
+ //this signal was connected from the editor, and is being edited. just don't disconnect for now
disconnect = false;
}
#endif
@@ -1924,6 +1921,18 @@ void *Object::get_script_instance_binding(int p_script_language_index) {
return _script_instance_bindings[p_script_language_index];
}
+bool Object::has_script_instance_binding(int p_script_language_index) {
+
+ return _script_instance_bindings[p_script_language_index] != NULL;
+}
+
+void Object::set_script_instance_binding(int p_script_language_index, void *p_data) {
+#ifdef DEBUG_ENABLED
+ CRASH_COND(_script_instance_bindings[p_script_language_index] != NULL);
+#endif
+ _script_instance_bindings[p_script_language_index] = p_data;
+}
+
Object::Object() {
_class_ptr = NULL;
@@ -1987,9 +1996,11 @@ Object::~Object() {
_instance_ID = 0;
_predelete_ok = 2;
- for (int i = 0; i < MAX_SCRIPT_INSTANCE_BINDINGS; i++) {
- if (_script_instance_bindings[i]) {
- ScriptServer::get_language(i)->free_instance_binding_data(_script_instance_bindings[i]);
+ if (!ScriptServer::are_languages_finished()) {
+ for (int i = 0; i < MAX_SCRIPT_INSTANCE_BINDINGS; i++) {
+ if (_script_instance_bindings[i]) {
+ ScriptServer::get_language(i)->free_instance_binding_data(_script_instance_bindings[i]);
+ }
}
}
}
diff --git a/core/object.h b/core/object.h
index a5bb6dea5d..e8a6178052 100644
--- a/core/object.h
+++ b/core/object.h
@@ -119,6 +119,7 @@ enum PropertyUsageFlags {
PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE = 1 << 21, // If the object is duplicated also this property will be duplicated
PROPERTY_USAGE_HIGH_END_GFX = 1 << 22,
PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 23,
+ PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT = 1 << 24,
PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED,
@@ -729,6 +730,8 @@ public:
//used by script languages to store binding data
void *get_script_instance_binding(int p_script_language_index);
+ bool has_script_instance_binding(int p_script_language_index);
+ void set_script_instance_binding(int p_script_language_index, void *p_data);
void clear_internal_resource_paths();
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index d1f8236898..39d9f45bd7 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -409,6 +409,23 @@ int FileAccess::get_buffer(uint8_t *p_dst, int p_length) const {
return i;
}
+String FileAccess::get_as_utf8_string() const {
+ PoolVector<uint8_t> sourcef;
+ int len = get_len();
+ sourcef.resize(len + 1);
+
+ PoolVector<uint8_t>::Write w = sourcef.write();
+ int r = get_buffer(w.ptr(), len);
+ ERR_FAIL_COND_V(r != len, String());
+ w[len] = 0;
+
+ String s;
+ if (s.parse_utf8((const char *)w.ptr())) {
+ return String();
+ }
+ return s;
+}
+
void FileAccess::store_16(uint16_t p_dest) {
uint8_t a, b;
diff --git a/core/os/file_access.h b/core/os/file_access.h
index 7bfbf6e7f0..c65b75369c 100644
--- a/core/os/file_access.h
+++ b/core/os/file_access.h
@@ -113,6 +113,7 @@ public:
virtual String get_line() const;
virtual String get_token() const;
virtual Vector<String> get_csv_line(const String &p_delim = ",") const;
+ virtual String get_as_utf8_string() const;
/**< use this for files WRITTEN in _big_ endian machines (ie, amiga/mac)
* It's not about the current CPU type but file formats.
diff --git a/core/os/input.cpp b/core/os/input.cpp
index cf11ba3c6d..caa9fb1493 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -91,6 +91,7 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_default_cursor_shape", "shape"), &Input::set_default_cursor_shape, DEFVAL(CURSOR_ARROW));
ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image", "shape", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(CURSOR_ARROW), DEFVAL(Vector2()));
ClassDB::bind_method(D_METHOD("parse_input_event", "event"), &Input::parse_input_event);
+ ClassDB::bind_method(D_METHOD("set_use_accumulated_input", "enable"), &Input::set_use_accumulated_input);
BIND_ENUM_CONSTANT(MOUSE_MODE_VISIBLE);
BIND_ENUM_CONSTANT(MOUSE_MODE_HIDDEN);
diff --git a/core/os/input.h b/core/os/input.h
index b354acd961..c8b80b28d0 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -132,6 +132,9 @@ public:
virtual int get_joy_axis_index_from_string(String p_axis) = 0;
virtual void parse_input_event(const Ref<InputEvent> &p_event) = 0;
+ virtual void accumulate_input_event(const Ref<InputEvent> &p_event) = 0;
+ virtual void flush_accumulated_events() = 0;
+ virtual void set_use_accumulated_input(bool p_enable) = 0;
Input();
};
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 1e0e83c8d2..25a5c2afeb 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -33,6 +33,9 @@
#include "core/input_map.h"
#include "core/os/keyboard.h"
+const int InputEvent::DEVICE_ID_TOUCH_MOUSE = -1;
+const int InputEvent::DEVICE_ID_INTERNAL = -2;
+
void InputEvent::set_device(int p_device) {
device = p_device;
}
@@ -122,6 +125,8 @@ void InputEvent::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_action_type"), &InputEvent::is_action_type);
+ ClassDB::bind_method(D_METHOD("accumulate", "with_event"), &InputEvent::accumulate);
+
ClassDB::bind_method(D_METHOD("xformed_by", "xform", "local_ofs"), &InputEvent::xformed_by, DEFVAL(Vector2()));
ADD_PROPERTY(PropertyInfo(Variant::INT, "device"), "set_device", "get_device");
@@ -620,6 +625,44 @@ String InputEventMouseMotion::as_text() const {
return "InputEventMouseMotion : button_mask=" + button_mask_string + ", position=(" + String(get_position()) + "), relative=(" + String(get_relative()) + "), speed=(" + String(get_speed()) + ")";
}
+bool InputEventMouseMotion::accumulate(const Ref<InputEvent> &p_event) {
+
+ Ref<InputEventMouseMotion> motion = p_event;
+ if (motion.is_null())
+ return false;
+
+ if (is_pressed() != motion->is_pressed()) {
+ return false;
+ }
+
+ if (get_button_mask() != motion->get_button_mask()) {
+ return false;
+ }
+
+ if (get_shift() != motion->get_shift()) {
+ return false;
+ }
+
+ if (get_control() != motion->get_control()) {
+ return false;
+ }
+
+ if (get_alt() != motion->get_alt()) {
+ return false;
+ }
+
+ if (get_metakey() != motion->get_metakey()) {
+ return false;
+ }
+
+ set_position(motion->get_position());
+ set_global_position(motion->get_global_position());
+ set_speed(motion->get_speed());
+ relative += motion->get_relative();
+
+ return true;
+}
+
void InputEventMouseMotion::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_relative", "relative"), &InputEventMouseMotion::set_relative);
@@ -749,6 +792,15 @@ bool InputEventJoypadButton::action_match(const Ref<InputEvent> &p_event, bool *
return match;
}
+bool InputEventJoypadButton::shortcut_match(const Ref<InputEvent> &p_event) const {
+
+ Ref<InputEventJoypadButton> button = p_event;
+ if (button.is_null())
+ return false;
+
+ return button_index == button->button_index;
+}
+
String InputEventJoypadButton::as_text() const {
return "InputEventJoypadButton : button_index=" + itos(button_index) + ", pressed=" + (pressed ? "true" : "false") + ", pressure=" + String(Variant(pressure));
@@ -950,11 +1002,10 @@ bool InputEventAction::is_pressed() const {
}
bool InputEventAction::shortcut_match(const Ref<InputEvent> &p_event) const {
- Ref<InputEventKey> event = p_event;
- if (event.is_null())
+ if (p_event.is_null())
return false;
- return event->is_action(action);
+ return p_event->is_action(action);
}
bool InputEventAction::is_action(const StringName &p_action) const {
diff --git a/core/os/input_event.h b/core/os/input_event.h
index db31055b5f..ba01516519 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -165,6 +165,9 @@ protected:
static void _bind_methods();
public:
+ static const int DEVICE_ID_TOUCH_MOUSE;
+ static const int DEVICE_ID_INTERNAL;
+
void set_device(int p_device);
int get_device() const;
@@ -186,6 +189,7 @@ public:
virtual bool shortcut_match(const Ref<InputEvent> &p_event) const;
virtual bool is_action_type() const;
+ virtual bool accumulate(const Ref<InputEvent> &p_event) { return false; }
InputEvent();
};
@@ -351,6 +355,8 @@ public:
virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
virtual String as_text() const;
+ virtual bool accumulate(const Ref<InputEvent> &p_event);
+
InputEventMouseMotion();
};
@@ -400,6 +406,7 @@ public:
float get_pressure() const;
virtual bool action_match(const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const;
+ virtual bool shortcut_match(const Ref<InputEvent> &p_event) const;
virtual bool is_action_type() const { return true; }
virtual String as_text() const;
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 1f967030e7..03e63f636e 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -393,16 +393,16 @@ Error OS::dialog_input_text(String p_title, String p_description, String p_parti
return OK;
};
-int OS::get_static_memory_usage() const {
+uint64_t OS::get_static_memory_usage() const {
return Memory::get_mem_usage();
}
-int OS::get_dynamic_memory_usage() const {
+uint64_t OS::get_dynamic_memory_usage() const {
return MemoryPool::total_memory;
}
-int OS::get_static_memory_peak_usage() const {
+uint64_t OS::get_static_memory_peak_usage() const {
return Memory::get_mem_max_usage();
}
@@ -418,7 +418,7 @@ bool OS::has_touchscreen_ui_hint() const {
return Input::get_singleton() && Input::get_singleton()->is_emulating_touch_from_mouse();
}
-int OS::get_free_static_memory() const {
+uint64_t OS::get_free_static_memory() const {
return Memory::get_mem_available();
}
@@ -569,6 +569,11 @@ int OS::get_power_percent_left() {
return -1;
}
+void OS::set_has_server_feature_callback(HasServerFeatureCallback p_callback) {
+
+ has_server_feature_callback = p_callback;
+}
+
bool OS::has_feature(const String &p_feature) {
if (p_feature == get_name())
@@ -625,6 +630,10 @@ bool OS::has_feature(const String &p_feature) {
if (_check_internal_feature_support(p_feature))
return true;
+ if (has_server_feature_callback && has_server_feature_callback(p_feature)) {
+ return true;
+ }
+
if (ProjectSettings::get_singleton()->has_custom_feature(p_feature))
return true;
@@ -729,6 +738,8 @@ OS::OS() {
_logger = NULL;
+ has_server_feature_callback = NULL;
+
Vector<Logger *> loggers;
loggers.push_back(memnew(StdLogger));
_set_logger(memnew(CompositeLogger(loggers)));
diff --git a/core/os/os.h b/core/os/os.h
index 36d4e5a8c1..d02d5a2c84 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -45,12 +45,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-enum VideoDriver {
- VIDEO_DRIVER_GLES3,
- VIDEO_DRIVER_GLES2,
- VIDEO_DRIVER_MAX,
-};
-
class OS {
static OS *singleton;
@@ -83,6 +77,7 @@ protected:
public:
typedef void (*ImeCallback)(void *p_inp, String p_text, Point2 p_selection);
+ typedef bool (*HasServerFeatureCallback)(const String &p_feature);
enum PowerState {
POWERSTATE_UNKNOWN, /**< cannot determine power status */
@@ -127,6 +122,7 @@ public:
protected:
friend class Main;
+ HasServerFeatureCallback has_server_feature_callback;
RenderThreadMode _render_thread_mode;
// functions used by main to initialize/deinitialize the OS
@@ -152,8 +148,8 @@ public:
static OS *get_singleton();
void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, Logger::ErrorType p_type = Logger::ERR_ERROR);
- void print(const char *p_format, ...);
- void printerr(const char *p_format, ...);
+ void print(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
+ void printerr(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
virtual void alert(const String &p_alert, const String &p_title = "ALERT!") = 0;
virtual String get_stdin_string(bool p_block = true) = 0;
@@ -184,9 +180,16 @@ public:
virtual VideoMode get_video_mode(int p_screen = 0) const = 0;
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const = 0;
+ enum VideoDriver {
+ VIDEO_DRIVER_GLES3,
+ VIDEO_DRIVER_GLES2,
+ VIDEO_DRIVER_MAX,
+ };
+
virtual int get_video_driver_count() const;
virtual const char *get_video_driver_name(int p_driver) const;
virtual int get_current_video_driver() const = 0;
+
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
@@ -266,6 +269,7 @@ public:
virtual bool has_environment(const String &p_var) const = 0;
virtual String get_environment(const String &p_var) const = 0;
+ virtual bool set_environment(const String &p_var, const String &p_value) const = 0;
virtual String get_name() = 0;
virtual List<String> get_cmdline_args() const { return _cmdline; }
@@ -382,10 +386,10 @@ public:
virtual void print_resources_in_use(bool p_short = false);
virtual void print_all_resources(String p_to_file = "");
- virtual int get_static_memory_usage() const;
- virtual int get_static_memory_peak_usage() const;
- virtual int get_dynamic_memory_usage() const;
- virtual int get_free_static_memory() const;
+ virtual uint64_t get_static_memory_usage() const;
+ virtual uint64_t get_static_memory_peak_usage() const;
+ virtual uint64_t get_dynamic_memory_usage() const;
+ virtual uint64_t get_free_static_memory() const;
RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; }
@@ -505,6 +509,8 @@ public:
virtual void force_process_input(){};
bool has_feature(const String &p_feature);
+ void set_has_server_feature_callback(HasServerFeatureCallback p_callback);
+
bool is_layered_allowed() const { return _allow_layered; }
bool is_hidpi_allowed() const { return _allow_hidpi; }
@@ -512,6 +518,9 @@ public:
bool is_restart_on_exit_set() const;
List<String> get_restart_on_exit_arguments() const;
+ virtual bool request_permission(const String &p_name) { return true; }
+
+ virtual void process_and_drop_events() {}
OS();
virtual ~OS();
};
diff --git a/core/os/shell.cpp b/core/os/shell.cpp
deleted file mode 100644
index a859241cb6..0000000000
--- a/core/os/shell.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************/
-/* shell.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "shell.h"
-
-Shell *Shell::singleton = NULL;
-
-Shell *Shell::get_singleton() {
-
- return singleton;
-}
-
-Shell::~Shell() {
-}
-
-Shell::Shell() {
-
- singleton = this;
-}
diff --git a/core/pair.h b/core/pair.h
index cb661160b5..9afaa726cb 100644
--- a/core/pair.h
+++ b/core/pair.h
@@ -37,7 +37,11 @@ struct Pair {
F first;
S second;
- Pair() {}
+ Pair() :
+ first(),
+ second() {
+ }
+
Pair(F p_first, const S &p_second) :
first(p_first),
second(p_second) {
diff --git a/core/dvector.cpp b/core/pool_vector.cpp
index 592c3c053d..b9d2316315 100644
--- a/core/dvector.cpp
+++ b/core/pool_vector.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* dvector.cpp */
+/* pool_vector.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,9 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "dvector.h"
+#include "pool_vector.h"
-Mutex *dvector_lock = NULL;
+Mutex *pool_vector_lock = NULL;
PoolAllocator *MemoryPool::memory_pool = NULL;
uint8_t *MemoryPool::pool_memory = NULL;
diff --git a/core/dvector.h b/core/pool_vector.h
index fc962b4940..102a620f17 100644
--- a/core/dvector.h
+++ b/core/pool_vector.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* dvector.h */
+/* pool_vector.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef DVECTOR_H
-#define DVECTOR_H
+#ifndef POOL_VECTOR_H
+#define POOL_VECTOR_H
#include "core/os/copymem.h"
#include "core/os/memory.h"
@@ -188,19 +188,19 @@ class PoolVector {
}
}
- void _reference(const PoolVector &p_dvector) {
+ void _reference(const PoolVector &p_pool_vector) {
- if (alloc == p_dvector.alloc)
+ if (alloc == p_pool_vector.alloc)
return;
_unreference();
- if (!p_dvector.alloc) {
+ if (!p_pool_vector.alloc) {
return;
}
- if (p_dvector.alloc->refcount.ref()) {
- alloc = p_dvector.alloc;
+ if (p_pool_vector.alloc->refcount.ref()) {
+ alloc = p_pool_vector.alloc;
}
}
@@ -460,11 +460,11 @@ public:
void invert();
- void operator=(const PoolVector &p_dvector) { _reference(p_dvector); }
+ void operator=(const PoolVector &p_pool_vector) { _reference(p_pool_vector); }
PoolVector() { alloc = NULL; }
- PoolVector(const PoolVector &p_dvector) {
+ PoolVector(const PoolVector &p_pool_vector) {
alloc = NULL;
- _reference(p_dvector);
+ _reference(p_pool_vector);
}
~PoolVector() { _unreference(); }
};
@@ -640,4 +640,4 @@ void PoolVector<T>::invert() {
}
}
-#endif
+#endif // POOL_VECTOR_H
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 8d05d7cc74..02c7c9e029 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -501,7 +501,7 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
d.resize(vlen);
f->get_buffer(d.ptrw(), vlen);
Variant value;
- Error err = decode_variant(value, d.ptr(), d.size());
+ err = decode_variant(value, d.ptr(), d.size());
ERR_EXPLAIN("Error decoding property: " + key);
ERR_CONTINUE(err != OK);
set(key, value);
@@ -656,7 +656,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
file->store_string(key);
int len;
- Error err = encode_variant(p_custom_features, NULL, len);
+ err = encode_variant(p_custom_features, NULL, len);
if (err != OK) {
memdelete(file);
ERR_FAIL_V(err);
@@ -694,7 +694,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
file->store_string(key);
int len;
- Error err = encode_variant(value, NULL, len);
+ err = encode_variant(value, NULL, len);
if (err != OK)
memdelete(file);
ERR_FAIL_COND_V(err != OK, ERR_INVALID_DATA);
@@ -1185,6 +1185,9 @@ ProjectSettings::ProjectSettings() {
Compression::gzip_level = GLOBAL_DEF("compression/formats/gzip/compression_level", Z_DEFAULT_COMPRESSION);
custom_prop_info["compression/formats/gzip/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/gzip/compression_level", PROPERTY_HINT_RANGE, "-1,9,1");
+ // Would ideally be defined in an Android-specific file, but then it doesn't appear in the docs
+ GLOBAL_DEF("android/modules", "");
+
using_datapack = false;
}
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 60c2778603..97c96b4018 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -47,7 +47,7 @@
#include "core/io/packet_peer_udp.h"
#include "core/io/pck_packer.h"
#include "core/io/resource_format_binary.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "core/io/stream_peer_ssl.h"
#include "core/io/tcp_server.h"
#include "core/io/translation_loader_po.h"
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index ee6133f374..e7ff7a3aef 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -139,10 +139,6 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue)
ERR_FAIL();
}
- if (allow_focus_steal_pid) {
- OS::get_singleton()->enable_for_stealing_focus(allow_focus_steal_pid);
- }
-
packet_peer_stream->put_var("debug_enter");
packet_peer_stream->put_var(2);
packet_peer_stream->put_var(p_can_continue);
@@ -315,6 +311,7 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue)
} else {
OS::get_singleton()->delay_usec(10000);
+ OS::get_singleton()->process_and_drop_events();
}
}
@@ -1058,10 +1055,6 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p
physics_frame_time = p_physics_frame_time;
}
-void ScriptDebuggerRemote::set_allow_focus_steal_pid(OS::ProcessID p_pid) {
- allow_focus_steal_pid = p_pid;
-}
-
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
ScriptDebuggerRemote::ScriptDebuggerRemote() :
@@ -1083,7 +1076,6 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() :
char_count(0),
last_msec(0),
msec_count(0),
- allow_focus_steal_pid(0),
locking(false),
poll_every(0),
request_scene_tree(NULL),
diff --git a/core/script_debugger_remote.h b/core/script_debugger_remote.h
index 7afc90428d..1fc9d7c7f1 100644
--- a/core/script_debugger_remote.h
+++ b/core/script_debugger_remote.h
@@ -99,8 +99,6 @@ class ScriptDebuggerRemote : public ScriptDebugger {
uint64_t last_msec;
uint64_t msec_count;
- OS::ProcessID allow_focus_steal_pid;
-
bool locking; //hack to avoid a deadloop
static void _print_handler(void *p_this, const String &p_string, bool p_error);
@@ -174,8 +172,6 @@ public:
virtual void profiling_end();
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time);
- void set_allow_focus_steal_pid(OS::ProcessID p_pid);
-
ScriptDebuggerRemote();
~ScriptDebuggerRemote();
};
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 632fa3b336..4a6f904f9d 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -37,6 +37,7 @@ int ScriptServer::_language_count = 0;
bool ScriptServer::scripting_enabled = true;
bool ScriptServer::reload_scripts_on_save = false;
+bool ScriptServer::languages_finished = false;
ScriptEditRequestFunction ScriptServer::edit_request_func = NULL;
void Script::_notification(int p_what) {
@@ -130,6 +131,7 @@ void ScriptServer::finish_languages() {
_languages[i]->finish();
}
global_classes_clear();
+ languages_finished = true;
}
void ScriptServer::set_reload_scripts_on_save(bool p_enable) {
@@ -188,6 +190,14 @@ StringName ScriptServer::get_global_class_base(const String &p_class) {
ERR_FAIL_COND_V(!global_classes.has(p_class), String());
return global_classes[p_class].base;
}
+StringName ScriptServer::get_global_class_native_base(const String &p_class) {
+ ERR_FAIL_COND_V(!global_classes.has(p_class), String());
+ String base = global_classes[p_class].base;
+ while (global_classes.has(base)) {
+ base = global_classes[base].base;
+ }
+ return base;
+}
void ScriptServer::get_global_class_list(List<StringName> *r_global_classes) {
const StringName *K = NULL;
List<StringName> classes;
@@ -407,6 +417,11 @@ bool PlaceHolderScriptInstance::get(const StringName &p_name, Variant &r_ret) co
return true;
}
+ if (constants.has(p_name)) {
+ r_ret = constants[p_name];
+ return true;
+ }
+
if (!script->is_placeholder_fallback_enabled()) {
Variant defval;
if (script->get_property_default_value(p_name, defval)) {
@@ -442,6 +457,13 @@ Variant::Type PlaceHolderScriptInstance::get_property_type(const StringName &p_n
*r_is_valid = true;
return values[p_name].get_type();
}
+
+ if (constants.has(p_name)) {
+ if (r_is_valid)
+ *r_is_valid = true;
+ return constants[p_name].get_type();
+ }
+
if (r_is_valid)
*r_is_valid = false;
@@ -511,6 +533,9 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
owner->_change_notify();
}
//change notify
+
+ constants.clear();
+ script->get_constants(&constants);
}
void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid) {
@@ -525,8 +550,8 @@ void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name,
}
bool found = false;
- for (const List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
- if (E->get().name == p_name) {
+ for (const List<PropertyInfo>::Element *F = properties.front(); F; F = F->next()) {
+ if (F->get().name == p_name) {
found = true;
break;
}
@@ -550,6 +575,13 @@ Variant PlaceHolderScriptInstance::property_get_fallback(const StringName &p_nam
*r_valid = true;
return E->value();
}
+
+ E = constants.find(p_name);
+ if (E) {
+ if (r_valid)
+ *r_valid = true;
+ return E->value();
+ }
}
if (r_valid)
diff --git a/core/script_language.h b/core/script_language.h
index b0f12dc291..b6d7bea9c7 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -54,6 +54,7 @@ class ScriptServer {
static int _language_count;
static bool scripting_enabled;
static bool reload_scripts_on_save;
+ static bool languages_finished;
struct GlobalScriptClass {
StringName language;
@@ -86,11 +87,14 @@ public:
static StringName get_global_class_language(const StringName &p_class);
static String get_global_class_path(const String &p_class);
static StringName get_global_class_base(const String &p_class);
+ static StringName get_global_class_native_base(const String &p_class);
static void get_global_class_list(List<StringName> *r_global_classes);
static void save_global_classes();
static void init_languages();
static void finish_languages();
+
+ static bool are_languages_finished() { return languages_finished; }
};
class ScriptInstance;
@@ -333,6 +337,7 @@ class PlaceHolderScriptInstance : public ScriptInstance {
Object *owner;
List<PropertyInfo> properties;
Map<StringName, Variant> values;
+ Map<StringName, Variant> constants;
ScriptLanguage *language;
Ref<Script> script;
diff --git a/core/sort.h b/core/sort_array.h
index 4da7c323c7..0f258aec3e 100644
--- a/core/sort.h
+++ b/core/sort_array.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sort.h */
+/* sort_array.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SORT_H
-#define SORT_H
+#ifndef SORT_ARRAY_H
+#define SORT_ARRAY_H
#include "core/typedefs.h"
@@ -327,4 +327,4 @@ public:
}
};
-#endif
+#endif // SORT_ARRAY_H
diff --git a/core/string_db.cpp b/core/string_name.cpp
index c776c56023..10b71ad3ac 100644
--- a/core/string_db.cpp
+++ b/core/string_name.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* string_db.cpp */
+/* string_name.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "string_db.h"
+#include "string_name.h"
#include "core/os/os.h"
#include "core/print_string.h"
diff --git a/core/string_db.h b/core/string_name.h
index 06b24c28da..0984b0181f 100644
--- a/core/string_db.h
+++ b/core/string_name.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* string_db.h */
+/* string_name.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef STRING_DB_H
-#define STRING_DB_H
+#ifndef STRING_NAME_H
+#define STRING_NAME_H
#include "core/os/mutex.h"
#include "core/safe_refcount.h"
@@ -169,4 +169,4 @@ public:
StringName _scs_create(const char *p_chr);
-#endif
+#endif // STRING_NAME_H
diff --git a/core/translation.cpp b/core/translation.cpp
index a402df3eea..6921f1d9f1 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -1052,7 +1052,7 @@ StringName TranslationServer::translate(const StringName &p_message) const {
if (fallback.length() >= 2) {
const CharType *fptr = &fallback[0];
- bool near_match = false;
+ near_match = false;
for (const Set<Ref<Translation> >::Element *E = translations.front(); E; E = E->next()) {
const Ref<Translation> &t = E->get();
diff --git a/core/typedefs.h b/core/typedefs.h
index 433c97d8d2..78688ff311 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -116,6 +116,8 @@ T *_nullptr() {
#define ABS(m_v) (((m_v) < 0) ? (-(m_v)) : (m_v))
#endif
+#define ABSDIFF(x, y) (((x) < (y)) ? ((y) - (x)) : ((x) - (y)))
+
#ifndef SGN
#define SGN(m_v) (((m_v) < 0) ? (-1.0) : (+1.0))
#endif
@@ -248,21 +250,34 @@ static inline int get_shift_from_power_of_2(unsigned int p_pixel) {
}
/** Swap 16 bits value for endianness */
+#if defined(__GNUC__) || _llvm_has_builtin(__builtin_bswap16)
+#define BSWAP16(x) __builtin_bswap16(x)
+#else
static inline uint16_t BSWAP16(uint16_t x) {
return (x >> 8) | (x << 8);
}
+#endif
+
/** Swap 32 bits value for endianness */
+#if defined(__GNUC__) || _llvm_has_builtin(__builtin_bswap32)
+#define BSWAP32(x) __builtin_bswap32(x)
+#else
static inline uint32_t BSWAP32(uint32_t x) {
return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) | (x >> 24));
}
-/** Swap 64 bits value for endianness */
+#endif
+/** Swap 64 bits value for endianness */
+#if defined(__GNUC__) || _llvm_has_builtin(__builtin_bswap64)
+#define BSWAP64(x) __builtin_bswap64(x)
+#else
static inline uint64_t BSWAP64(uint64_t x) {
x = (x & 0x00000000FFFFFFFF) << 32 | (x & 0xFFFFFFFF00000000) >> 32;
x = (x & 0x0000FFFF0000FFFF) << 16 | (x & 0xFFFF0000FFFF0000) >> 16;
x = (x & 0x00FF00FF00FF00FF) << 8 | (x & 0xFF00FF00FF00FF00) >> 8;
return x;
}
+#endif
/** When compiling with RTTI, we can add an "extra"
* layer of safeness in many operations, so dynamic_cast
@@ -305,4 +320,12 @@ struct _GlobalLock {
#define unlikely(x) x
#endif
+#if defined(__GNUC__)
+#define _PRINTF_FORMAT_ATTRIBUTE_2_0 __attribute__((format(printf, 2, 0)))
+#define _PRINTF_FORMAT_ATTRIBUTE_2_3 __attribute__((format(printf, 2, 3)))
+#else
+#define _PRINTF_FORMAT_ATTRIBUTE_2_0
+#define _PRINTF_FORMAT_ATTRIBUTE_2_3
+#endif
+
#endif // TYPEDEFS_H
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index 6bc882eaec..e13164d50f 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -234,7 +234,13 @@ void UndoRedo::_pop_history_tail() {
}
actions.remove(0);
- current_action--;
+ if (current_action >= 0) {
+ current_action--;
+ }
+}
+
+bool UndoRedo::is_commiting_action() const {
+ return commiting > 0;
}
void UndoRedo::commit_action() {
@@ -244,8 +250,9 @@ void UndoRedo::commit_action() {
if (action_level > 0)
return; //still nested
+ commiting++;
redo(); // perform action
-
+ commiting--;
if (callback && actions.size() > 0) {
callback(callback_ud, actions[actions.size() - 1].name);
}
@@ -258,11 +265,8 @@ void UndoRedo::_process_operation_list(List<Operation>::Element *E) {
Operation &op = E->get();
Object *obj = ObjectDB::get_instance(op.object);
- if (!obj) {
- //corruption
- clear_history();
- ERR_FAIL_COND(!obj);
- }
+ if (!obj) //may have been deleted and this is fine
+ continue;
switch (op.type) {
@@ -322,6 +326,7 @@ bool UndoRedo::redo() {
if ((current_action + 1) >= actions.size())
return false; //nothing to redo
+
current_action++;
_process_operation_list(actions.write[current_action].do_ops.front());
@@ -338,7 +343,6 @@ bool UndoRedo::undo() {
_process_operation_list(actions.write[current_action].undo_ops.front());
current_action--;
version--;
-
return true;
}
@@ -387,6 +391,7 @@ void UndoRedo::set_property_notify_callback(PropertyNotifyCallback p_property_ca
UndoRedo::UndoRedo() {
+ commiting = 0;
version = 1;
action_level = 0;
current_action = -1;
@@ -485,6 +490,7 @@ void UndoRedo::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_action", "name", "merge_mode"), &UndoRedo::create_action, DEFVAL(MERGE_DISABLE));
ClassDB::bind_method(D_METHOD("commit_action"), &UndoRedo::commit_action);
+ ClassDB::bind_method(D_METHOD("is_commiting_action"), &UndoRedo::is_commiting_action);
//ClassDB::bind_method(D_METHOD("add_do_method","p_object", "p_method", "VARIANT_ARG_LIST"),&UndoRedo::add_do_method);
//ClassDB::bind_method(D_METHOD("add_undo_method","p_object", "p_method", "VARIANT_ARG_LIST"),&UndoRedo::add_undo_method);
diff --git a/core/undo_redo.h b/core/undo_redo.h
index 4ee64dbfcf..b626149ce6 100644
--- a/core/undo_redo.h
+++ b/core/undo_redo.h
@@ -94,6 +94,8 @@ private:
MethodNotifyCallback method_callback;
PropertyNotifyCallback property_callback;
+ int commiting;
+
protected:
static void _bind_methods();
@@ -107,6 +109,7 @@ public:
void add_do_reference(Object *p_object);
void add_undo_reference(Object *p_object);
+ bool is_commiting_action() const;
void commit_action();
bool redo();
diff --git a/core/ustring.cpp b/core/ustring.cpp
index c1888c87a7..ff8fcaaaaf 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -603,13 +603,13 @@ String String::camelcase_to_underscore(bool lowercase) const {
is_next_number = cstr[i + 1] >= '0' && cstr[i + 1] <= '9';
}
- const bool a = is_upper && !was_precedent_upper && !was_precedent_number;
- const bool b = was_precedent_upper && is_upper && are_next_2_lower;
- const bool c = is_number && !was_precedent_number;
+ const bool cond_a = is_upper && !was_precedent_upper && !was_precedent_number;
+ const bool cond_b = was_precedent_upper && is_upper && are_next_2_lower;
+ const bool cond_c = is_number && !was_precedent_number;
const bool can_break_number_letter = is_number && !was_precedent_number && is_next_lower;
const bool can_break_letter_number = !is_number && was_precedent_number && (is_next_lower || is_next_number);
- bool should_split = a || b || c || can_break_number_letter || can_break_letter_number;
+ bool should_split = cond_a || cond_b || cond_c || can_break_number_letter || can_break_letter_number;
if (should_split) {
new_string += this->substr(start_index, i - start_index) + "_";
start_index = i;
@@ -1359,6 +1359,9 @@ bool String::parse_utf8(const char *p_utf8, int p_len) {
#define _UNICERROR(m_err) print_line("Unicode error: " + String(m_err));
+ if (!p_utf8)
+ return true;
+
String aux;
int cstr_size = 0;
@@ -2393,7 +2396,7 @@ int String::find(const char *p_str, int p_from) const {
return -1;
}
-int String::find_char(CharType p_char, int p_from) const {
+int String::find_char(const CharType &p_char, int p_from) const {
return _cowdata.find(p_char, p_from);
}
@@ -2945,12 +2948,12 @@ String String::left(int p_pos) const {
String String::right(int p_pos) const {
- if (p_pos >= size())
- return *this;
-
- if (p_pos < 0)
+ if (p_pos >= length())
return "";
+ if (p_pos <= 0)
+ return *this;
+
return substr(p_pos, (length() - p_pos));
}
diff --git a/core/ustring.h b/core/ustring.h
index 5ec5c79e2d..cb3d87378a 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -85,8 +85,7 @@ public:
_FORCE_INLINE_ int size() const { return _cowdata.size(); }
Error resize(int p_size) { return _cowdata.resize(p_size); }
- _FORCE_INLINE_ char get(int p_index) { return _cowdata.get(p_index); }
- _FORCE_INLINE_ const char get(int p_index) const { return _cowdata.get(p_index); }
+ _FORCE_INLINE_ char get(int p_index) const { return _cowdata.get(p_index); }
_FORCE_INLINE_ void set(int p_index, const char &p_elem) { _cowdata.set(p_index, p_elem); }
_FORCE_INLINE_ const char &operator[](int p_index) const {
if (unlikely(p_index == _cowdata.size()))
@@ -143,8 +142,7 @@ public:
_FORCE_INLINE_ void clear() { resize(0); }
- _FORCE_INLINE_ CharType get(int p_index) { return _cowdata.get(p_index); }
- _FORCE_INLINE_ const CharType get(int p_index) const { return _cowdata.get(p_index); }
+ _FORCE_INLINE_ CharType get(int p_index) const { return _cowdata.get(p_index); }
_FORCE_INLINE_ void set(int p_index, const CharType &p_elem) { _cowdata.set(p_index, p_elem); }
_FORCE_INLINE_ int size() const { return _cowdata.size(); }
Error resize(int p_size) { return _cowdata.resize(p_size); }
@@ -197,7 +195,7 @@ public:
String substr(int p_from, int p_chars) const;
int find(const String &p_str, int p_from = 0) const; ///< return <0 if failed
int find(const char *p_str, int p_from = 0) const; ///< return <0 if failed
- int find_char(CharType p_char, int p_from = 0) const; ///< return <0 if failed
+ int find_char(const CharType &p_char, int p_from = 0) const; ///< return <0 if failed
int find_last(const String &p_str) const; ///< return <0 if failed
int findn(const String &p_str, int p_from = 0) const; ///< return <0 if failed, case insensitive
int rfind(const String &p_str, int p_from = -1) const; ///< return <0 if failed
diff --git a/core/variant.cpp b/core/variant.cpp
index 56b272cccf..2ee2e8e293 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -2816,27 +2816,37 @@ uint32_t Variant::hash() const {
const PoolVector<uint8_t> &arr = *reinterpret_cast<const PoolVector<uint8_t> *>(_data._mem);
int len = arr.size();
- PoolVector<uint8_t>::Read r = arr.read();
-
- return hash_djb2_buffer((uint8_t *)&r[0], len);
+ if (likely(len)) {
+ PoolVector<uint8_t>::Read r = arr.read();
+ return hash_djb2_buffer((uint8_t *)&r[0], len);
+ } else {
+ return hash_djb2_one_64(0);
+ }
} break;
case POOL_INT_ARRAY: {
const PoolVector<int> &arr = *reinterpret_cast<const PoolVector<int> *>(_data._mem);
int len = arr.size();
- PoolVector<int>::Read r = arr.read();
-
- return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int));
+ if (likely(len)) {
+ PoolVector<int>::Read r = arr.read();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int));
+ } else {
+ return hash_djb2_one_64(0);
+ }
} break;
case POOL_REAL_ARRAY: {
const PoolVector<real_t> &arr = *reinterpret_cast<const PoolVector<real_t> *>(_data._mem);
int len = arr.size();
- PoolVector<real_t>::Read r = arr.read();
- return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(real_t));
+ if (likely(len)) {
+ PoolVector<real_t>::Read r = arr.read();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(real_t));
+ } else {
+ return hash_djb2_one_float(0.0);
+ }
} break;
case POOL_STRING_ARRAY: {
@@ -2844,10 +2854,13 @@ uint32_t Variant::hash() const {
uint32_t hash = 5831;
const PoolVector<String> &arr = *reinterpret_cast<const PoolVector<String> *>(_data._mem);
int len = arr.size();
- PoolVector<String>::Read r = arr.read();
- for (int i = 0; i < len; i++) {
- hash = hash_djb2_one_32(r[i].hash(), hash);
+ if (likely(len)) {
+ PoolVector<String>::Read r = arr.read();
+
+ for (int i = 0; i < len; i++) {
+ hash = hash_djb2_one_32(r[i].hash(), hash);
+ }
}
return hash;
@@ -2857,48 +2870,54 @@ uint32_t Variant::hash() const {
uint32_t hash = 5831;
const PoolVector<Vector2> &arr = *reinterpret_cast<const PoolVector<Vector2> *>(_data._mem);
int len = arr.size();
- PoolVector<Vector2>::Read r = arr.read();
- for (int i = 0; i < len; i++) {
- hash = hash_djb2_one_float(r[i].x, hash);
- hash = hash_djb2_one_float(r[i].y, hash);
+ if (likely(len)) {
+ PoolVector<Vector2>::Read r = arr.read();
+
+ for (int i = 0; i < len; i++) {
+ hash = hash_djb2_one_float(r[i].x, hash);
+ hash = hash_djb2_one_float(r[i].y, hash);
+ }
}
return hash;
-
} break;
case POOL_VECTOR3_ARRAY: {
uint32_t hash = 5831;
const PoolVector<Vector3> &arr = *reinterpret_cast<const PoolVector<Vector3> *>(_data._mem);
int len = arr.size();
- PoolVector<Vector3>::Read r = arr.read();
- for (int i = 0; i < len; i++) {
- hash = hash_djb2_one_float(r[i].x, hash);
- hash = hash_djb2_one_float(r[i].y, hash);
- hash = hash_djb2_one_float(r[i].z, hash);
+ if (likely(len)) {
+ PoolVector<Vector3>::Read r = arr.read();
+
+ for (int i = 0; i < len; i++) {
+ hash = hash_djb2_one_float(r[i].x, hash);
+ hash = hash_djb2_one_float(r[i].y, hash);
+ hash = hash_djb2_one_float(r[i].z, hash);
+ }
}
return hash;
-
} break;
case POOL_COLOR_ARRAY: {
uint32_t hash = 5831;
const PoolVector<Color> &arr = *reinterpret_cast<const PoolVector<Color> *>(_data._mem);
int len = arr.size();
- PoolVector<Color>::Read r = arr.read();
- for (int i = 0; i < len; i++) {
- hash = hash_djb2_one_float(r[i].r, hash);
- hash = hash_djb2_one_float(r[i].g, hash);
- hash = hash_djb2_one_float(r[i].b, hash);
- hash = hash_djb2_one_float(r[i].a, hash);
+ if (likely(len)) {
+ PoolVector<Color>::Read r = arr.read();
+
+ for (int i = 0; i < len; i++) {
+ hash = hash_djb2_one_float(r[i].r, hash);
+ hash = hash_djb2_one_float(r[i].g, hash);
+ hash = hash_djb2_one_float(r[i].b, hash);
+ hash = hash_djb2_one_float(r[i].a, hash);
+ }
}
return hash;
-
} break;
default: {}
}
diff --git a/core/variant.h b/core/variant.h
index 0377c78ea8..9215d15bf0 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -38,17 +38,17 @@
#include "core/array.h"
#include "core/color.h"
#include "core/dictionary.h"
-#include "core/dvector.h"
#include "core/io/ip_address.h"
#include "core/math/aabb.h"
+#include "core/math/basis.h"
#include "core/math/face3.h"
-#include "core/math/matrix3.h"
#include "core/math/plane.h"
#include "core/math/quat.h"
#include "core/math/transform.h"
#include "core/math/transform_2d.h"
#include "core/math/vector3.h"
#include "core/node_path.h"
+#include "core/pool_vector.h"
#include "core/ref_ptr.h"
#include "core/rid.h"
#include "core/ustring.h"
@@ -69,6 +69,13 @@ typedef PoolVector<Vector2> PoolVector2Array;
typedef PoolVector<Vector3> PoolVector3Array;
typedef PoolVector<Color> PoolColorArray;
+// Temporary workaround until c++11 alignas()
+#ifdef __GNUC__
+#define GCC_ALIGNED_8 __attribute__((aligned(8)))
+#else
+#define GCC_ALIGNED_8
+#endif
+
class Variant {
public:
// If this changes the table in variant_op must be updated
@@ -132,7 +139,6 @@ private:
_FORCE_INLINE_ const ObjData &_get_obj() const;
union {
-
bool _bool;
int64_t _int;
double _real;
@@ -142,7 +148,7 @@ private:
Transform *_transform;
void *_ptr; //generic pointer
uint8_t _mem[sizeof(ObjData) > (sizeof(real_t) * 4) ? sizeof(ObjData) : (sizeof(real_t) * 4)];
- } _data;
+ } _data GCC_ALIGNED_8;
void reference(const Variant &p_variant);
void clear();
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index f6f4569dfa..25a0f3957c 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -480,7 +480,7 @@ struct _VariantCall {
VCALL_LOCALMEM0(Dictionary, clear);
VCALL_LOCALMEM1R(Dictionary, has);
VCALL_LOCALMEM1R(Dictionary, has_all);
- VCALL_LOCALMEM1(Dictionary, erase);
+ VCALL_LOCALMEM1R(Dictionary, erase);
VCALL_LOCALMEM0R(Dictionary, hash);
VCALL_LOCALMEM0R(Dictionary, keys);
VCALL_LOCALMEM0R(Dictionary, values);
@@ -1227,15 +1227,15 @@ bool Variant::has_method(const StringName &p_method) const {
#endif
}
- const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[type];
- return fd.functions.has(p_method);
+ const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[type];
+ return tf.functions.has(p_method);
}
Vector<Variant::Type> Variant::get_method_argument_types(Variant::Type p_type, const StringName &p_method) {
- const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type];
+ const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type];
- const Map<StringName, _VariantCall::FuncData>::Element *E = fd.functions.find(p_method);
+ const Map<StringName, _VariantCall::FuncData>::Element *E = tf.functions.find(p_method);
if (!E)
return Vector<Variant::Type>();
@@ -1244,9 +1244,9 @@ Vector<Variant::Type> Variant::get_method_argument_types(Variant::Type p_type, c
bool Variant::is_method_const(Variant::Type p_type, const StringName &p_method) {
- const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type];
+ const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type];
- const Map<StringName, _VariantCall::FuncData>::Element *E = fd.functions.find(p_method);
+ const Map<StringName, _VariantCall::FuncData>::Element *E = tf.functions.find(p_method);
if (!E)
return false;
@@ -1255,9 +1255,9 @@ bool Variant::is_method_const(Variant::Type p_type, const StringName &p_method)
Vector<StringName> Variant::get_method_argument_names(Variant::Type p_type, const StringName &p_method) {
- const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type];
+ const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type];
- const Map<StringName, _VariantCall::FuncData>::Element *E = fd.functions.find(p_method);
+ const Map<StringName, _VariantCall::FuncData>::Element *E = tf.functions.find(p_method);
if (!E)
return Vector<StringName>();
@@ -1266,9 +1266,9 @@ Vector<StringName> Variant::get_method_argument_names(Variant::Type p_type, cons
Variant::Type Variant::get_method_return_type(Variant::Type p_type, const StringName &p_method, bool *r_has_return) {
- const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type];
+ const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type];
- const Map<StringName, _VariantCall::FuncData>::Element *E = fd.functions.find(p_method);
+ const Map<StringName, _VariantCall::FuncData>::Element *E = tf.functions.find(p_method);
if (!E)
return Variant::NIL;
@@ -1280,9 +1280,9 @@ Variant::Type Variant::get_method_return_type(Variant::Type p_type, const String
Vector<Variant> Variant::get_method_default_arguments(Variant::Type p_type, const StringName &p_method) {
- const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type];
+ const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type];
- const Map<StringName, _VariantCall::FuncData>::Element *E = fd.functions.find(p_method);
+ const Map<StringName, _VariantCall::FuncData>::Element *E = tf.functions.find(p_method);
if (!E)
return Vector<Variant>();
@@ -1291,9 +1291,9 @@ Vector<Variant> Variant::get_method_default_arguments(Variant::Type p_type, cons
void Variant::get_method_list(List<MethodInfo> *p_list) const {
- const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[type];
+ const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[type];
- for (const Map<StringName, _VariantCall::FuncData>::Element *E = fd.functions.front(); E; E = E->next()) {
+ for (const Map<StringName, _VariantCall::FuncData>::Element *E = tf.functions.front(); E; E = E->next()) {
const _VariantCall::FuncData &fd = E->get();
@@ -1405,11 +1405,11 @@ Variant Variant::get_constant_value(Variant::Type p_type, const StringName &p_va
Map<StringName, int>::Element *E = cd.value.find(p_value);
if (!E) {
- Map<StringName, Variant>::Element *E = cd.variant_value.find(p_value);
- if (E) {
+ Map<StringName, Variant>::Element *F = cd.variant_value.find(p_value);
+ if (F) {
if (r_valid)
*r_valid = true;
- return E->get();
+ return F->get();
} else {
return -1;
}
diff --git a/core/variant_construct_string.cpp b/core/variant_construct_string.cpp
deleted file mode 100644
index 2cb7481634..0000000000
--- a/core/variant_construct_string.cpp
+++ /dev/null
@@ -1,438 +0,0 @@
-/*************************************************************************/
-/* variant_construct_string.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "variant.h"
-
-class VariantConstruct {
-
- enum TokenType {
- TK_CURLY_BRACKET_OPEN,
- TK_CURLY_BRACKET_CLOSE,
- TK_BRACKET_OPEN,
- TK_BRACKET_CLOSE,
- TK_IDENTIFIER,
- TK_STRING,
- TK_NUMBER,
- TK_COLON,
- TK_COMMA,
- TK_EOF,
- TK_MAX
- };
-
- enum Expecting {
-
- EXPECT_OBJECT,
- EXPECT_OBJECT_KEY,
- EXPECT_COLON,
- EXPECT_OBJECT_VALUE,
- };
-
- struct Token {
-
- TokenType type;
- Variant value;
- };
-
- static const char *tk_name[TK_MAX];
-
- static String _print_var(const Variant &p_var);
-
- static Error _get_token(const CharType *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str);
- static Error _parse_value(Variant &value, Token &token, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud);
- static Error _parse_array(Array &array, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud);
- static Error _parse_dict(Dictionary &dict, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud);
-
-public:
- static Error parse(const String &p_string, Variant &r_ret, String &r_err_str, int &r_err_line, Variant::ObjectConstruct *p_construct, void *p_ud);
-};
-
-const char *VariantConstruct::tk_name[TK_MAX] = {
- "'{'",
- "'}'",
- "'['",
- "']'",
- "identifier",
- "string",
- "number",
- "':'",
- "','",
- "EOF",
-};
-
-Error VariantConstruct::_get_token(const CharType *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str) {
-
- while (true) {
- switch (p_str[index]) {
-
- case '\n': {
-
- line++;
- index++;
- break;
- };
- case 0: {
- r_token.type = TK_EOF;
- return OK;
- } break;
- case '{': {
-
- r_token.type = TK_CURLY_BRACKET_OPEN;
- index++;
- return OK;
- };
- case '}': {
-
- r_token.type = TK_CURLY_BRACKET_CLOSE;
- index++;
- return OK;
- };
- case '[': {
-
- r_token.type = TK_BRACKET_OPEN;
- index++;
- return OK;
- };
- case ']': {
-
- r_token.type = TK_BRACKET_CLOSE;
- index++;
- return OK;
- };
- case ':': {
-
- r_token.type = TK_COLON;
- index++;
- return OK;
- };
- case ',': {
-
- r_token.type = TK_COMMA;
- index++;
- return OK;
- };
- case '"': {
-
- index++;
- String str;
- while (true) {
- if (p_str[index] == 0) {
- r_err_str = "Unterminated String";
- return ERR_PARSE_ERROR;
- } else if (p_str[index] == '"') {
- index++;
- break;
- } else if (p_str[index] == '\\') {
- //escaped characters...
- index++;
- CharType next = p_str[index];
- if (next == 0) {
- r_err_str = "Unterminated String";
- return ERR_PARSE_ERROR;
- }
- CharType res = 0;
-
- switch (next) {
-
- case 'b': res = 8; break;
- case 't': res = 9; break;
- case 'n': res = 10; break;
- case 'f': res = 12; break;
- case 'r': res = 13; break;
- case '\"': res = '\"'; break;
- case '\\': res = '\\'; break;
- case '/': res = '/'; break;
- case 'u': {
- //hexnumbarh - oct is deprecated
-
- for (int j = 0; j < 4; j++) {
- CharType c = p_str[index + j + 1];
- if (c == 0) {
- r_err_str = "Unterminated String";
- return ERR_PARSE_ERROR;
- }
- if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))) {
-
- r_err_str = "Malformed hex constant in string";
- return ERR_PARSE_ERROR;
- }
- CharType v;
- if (c >= '0' && c <= '9') {
- v = c - '0';
- } else if (c >= 'a' && c <= 'f') {
- v = c - 'a';
- v += 10;
- } else if (c >= 'A' && c <= 'F') {
- v = c - 'A';
- v += 10;
- } else {
- ERR_PRINT("BUG");
- v = 0;
- }
-
- res <<= 4;
- res |= v;
- }
- index += 4; //will add at the end anyway
-
- } break;
- default: {
-
- r_err_str = "Invalid escape sequence";
- return ERR_PARSE_ERROR;
- } break;
- }
-
- str += res;
-
- } else {
- if (p_str[index] == '\n')
- line++;
- str += p_str[index];
- }
- index++;
- }
-
- r_token.type = TK_STRING;
- r_token.value = str;
- return OK;
-
- } break;
- default: {
-
- if (p_str[index] <= 32) {
- index++;
- break;
- }
-
- if (p_str[index] == '-' || (p_str[index] >= '0' && p_str[index] <= '9')) {
- //a number
- const CharType *rptr;
- double number = String::to_double(&p_str[index], &rptr);
- index += (rptr - &p_str[index]);
- r_token.type = TK_NUMBER;
- r_token.value = number;
- return OK;
-
- } else if ((p_str[index] >= 'A' && p_str[index] <= 'Z') || (p_str[index] >= 'a' && p_str[index] <= 'z')) {
-
- String id;
-
- while ((p_str[index] >= 'A' && p_str[index] <= 'Z') || (p_str[index] >= 'a' && p_str[index] <= 'z')) {
-
- id += p_str[index];
- index++;
- }
-
- r_token.type = TK_IDENTIFIER;
- r_token.value = id;
- return OK;
- } else {
- r_err_str = "Unexpected character.";
- return ERR_PARSE_ERROR;
- }
- }
- }
- }
-
- return ERR_PARSE_ERROR;
-}
-
-Error VariantConstruct::_parse_value(Variant &value, Token &token, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- if (token.type == TK_CURLY_BRACKET_OPEN) {
-
- Dictionary d;
- Error err = _parse_dict(d, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
- value = d;
- return OK;
- } else if (token.type == TK_BRACKET_OPEN) {
-
- Array a;
- Error err = _parse_array(a, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
- value = a;
- return OK;
-
- } else if (token.type == TK_IDENTIFIER) {
-
- String id = token.value;
- if (id == "true")
- value = true;
- else if (id == "false")
- value = false;
- else if (id == "null")
- value = Variant();
- else {
- r_err_str = "Expected 'true','false' or 'null', got '" + id + "'.";
- return ERR_PARSE_ERROR;
- }
- return OK;
-
- } else if (token.type == TK_NUMBER) {
-
- value = token.value;
- return OK;
- } else if (token.type == TK_STRING) {
-
- value = token.value;
- return OK;
- } else {
- r_err_str = "Expected value, got " + String(tk_name[token.type]) + ".";
- return ERR_PARSE_ERROR;
- }
-
- return ERR_PARSE_ERROR;
-}
-
-Error VariantConstruct::_parse_array(Array &array, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- Token token;
- bool need_comma = false;
-
- while (index < p_len) {
-
- Error err = _get_token(p_str, index, p_len, token, line, r_err_str);
- if (err != OK)
- return err;
-
- if (token.type == TK_BRACKET_CLOSE) {
-
- return OK;
- }
-
- if (need_comma) {
-
- if (token.type != TK_COMMA) {
-
- r_err_str = "Expected ','";
- return ERR_PARSE_ERROR;
- } else {
- need_comma = false;
- continue;
- }
- }
-
- Variant v;
- err = _parse_value(v, token, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
-
- array.push_back(v);
- need_comma = true;
- }
-
- return OK;
-}
-
-Error VariantConstruct::_parse_dict(Dictionary &dict, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- bool at_key = true;
- Variant key;
- Token token;
- bool need_comma = false;
-
- while (index < p_len) {
-
- if (at_key) {
-
- Error err = _get_token(p_str, index, p_len, token, line, r_err_str);
- if (err != OK)
- return err;
-
- if (token.type == TK_CURLY_BRACKET_CLOSE) {
-
- return OK;
- }
-
- if (need_comma) {
-
- if (token.type != TK_COMMA) {
-
- r_err_str = "Expected '}' or ','";
- return ERR_PARSE_ERROR;
- } else {
- need_comma = false;
- continue;
- }
- }
-
- err = _parse_value(key, token, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
-
- if (err != OK)
- return err;
-
- err = _get_token(p_str, index, p_len, token, line, r_err_str);
-
- if (err != OK)
- return err;
-
- if (token.type != TK_COLON) {
-
- r_err_str = "Expected ':'";
- return ERR_PARSE_ERROR;
- }
- at_key = false;
- } else {
-
- Error err = _get_token(p_str, index, p_len, token, line, r_err_str);
- if (err != OK)
- return err;
-
- Variant v;
- err = _parse_value(v, token, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
- dict[key] = v;
- need_comma = true;
- at_key = true;
- }
- }
-
- return OK;
-}
-
-Error VariantConstruct::parse(const String &p_string, Variant &r_ret, String &r_err_str, int &r_err_line, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- const CharType *str = p_string.ptr();
- int idx = 0;
- int len = p_string.length();
- Token token;
- r_err_line = 0;
- String aux_key;
-
- Error err = _get_token(str, idx, len, token, r_err_line, r_err_str);
- if (err)
- return err;
-
- return _parse_value(r_ret, token, str, idx, len, r_err_line, r_err_str, p_construct, p_ud);
-}
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 93654d3389..b40b6ce4a6 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -3496,15 +3496,15 @@ void Variant::blend(const Variant &a, const Variant &b, float c, Variant &r_dst)
case COLOR: {
const Color *ca = reinterpret_cast<const Color *>(a._data._mem);
const Color *cb = reinterpret_cast<const Color *>(b._data._mem);
- float r = ca->r + cb->r * c;
- float g = ca->g + cb->g * c;
- float b = ca->b + cb->b * c;
- float a = ca->a + cb->a * c;
- r = r > 1.0 ? 1.0 : r;
- g = g > 1.0 ? 1.0 : g;
- b = b > 1.0 ? 1.0 : b;
- a = a > 1.0 ? 1.0 : a;
- r_dst = Color(r, g, b, a);
+ float new_r = ca->r + cb->r * c;
+ float new_g = ca->g + cb->g * c;
+ float new_b = ca->b + cb->b * c;
+ float new_a = ca->a + cb->a * c;
+ new_r = new_r > 1.0 ? 1.0 : new_r;
+ new_g = new_g > 1.0 ? 1.0 : new_g;
+ new_b = new_b > 1.0 ? 1.0 : new_b;
+ new_a = new_a > 1.0 ? 1.0 : new_a;
+ r_dst = Color(new_r, new_g, new_b, new_a);
}
return;
default: {
@@ -3656,11 +3656,55 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
return;
case POOL_INT_ARRAY: {
- r_dst = a;
+ const PoolVector<int> *arr_a = reinterpret_cast<const PoolVector<int> *>(a._data._mem);
+ const PoolVector<int> *arr_b = reinterpret_cast<const PoolVector<int> *>(b._data._mem);
+ int sz = arr_a->size();
+ if (sz == 0 || arr_b->size() != sz) {
+
+ r_dst = a;
+ } else {
+
+ PoolVector<int> v;
+ v.resize(sz);
+ {
+ PoolVector<int>::Write vw = v.write();
+ PoolVector<int>::Read ar = arr_a->read();
+ PoolVector<int>::Read br = arr_b->read();
+
+ Variant va;
+ for (int i = 0; i < sz; i++) {
+ Variant::interpolate(ar[i], br[i], c, va);
+ vw[i] = va;
+ }
+ }
+ r_dst = v;
+ }
}
return;
case POOL_REAL_ARRAY: {
- r_dst = a;
+ const PoolVector<real_t> *arr_a = reinterpret_cast<const PoolVector<real_t> *>(a._data._mem);
+ const PoolVector<real_t> *arr_b = reinterpret_cast<const PoolVector<real_t> *>(b._data._mem);
+ int sz = arr_a->size();
+ if (sz == 0 || arr_b->size() != sz) {
+
+ r_dst = a;
+ } else {
+
+ PoolVector<real_t> v;
+ v.resize(sz);
+ {
+ PoolVector<real_t>::Write vw = v.write();
+ PoolVector<real_t>::Read ar = arr_a->read();
+ PoolVector<real_t>::Read br = arr_b->read();
+
+ Variant va;
+ for (int i = 0; i < sz; i++) {
+ Variant::interpolate(ar[i], br[i], c, va);
+ vw[i] = va;
+ }
+ }
+ r_dst = v;
+ }
}
return;
case POOL_STRING_ARRAY: {
@@ -3717,7 +3761,27 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
return;
case POOL_COLOR_ARRAY: {
- r_dst = a;
+ const PoolVector<Color> *arr_a = reinterpret_cast<const PoolVector<Color> *>(a._data._mem);
+ const PoolVector<Color> *arr_b = reinterpret_cast<const PoolVector<Color> *>(b._data._mem);
+ int sz = arr_a->size();
+ if (sz == 0 || arr_b->size() != sz) {
+
+ r_dst = a;
+ } else {
+
+ PoolVector<Color> v;
+ v.resize(sz);
+ {
+ PoolVector<Color>::Write vw = v.write();
+ PoolVector<Color>::Read ar = arr_a->read();
+ PoolVector<Color>::Read br = arr_b->read();
+
+ for (int i = 0; i < sz; i++) {
+ vw[i] = ar[i].linear_interpolate(br[i], c);
+ }
+ }
+ r_dst = v;
+ }
}
return;
default: {
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 84fb85e812..0056fc75b6 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -728,7 +728,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
bool at_key = true;
String key;
- Token token;
+ Token token2;
bool need_comma = false;
while (true) {
@@ -740,11 +740,11 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
if (at_key) {
- Error err = get_token(p_stream, token, line, r_err_str);
+ Error err = get_token(p_stream, token2, line, r_err_str);
if (err != OK)
return err;
- if (token.type == TK_PARENTHESIS_CLOSE) {
+ if (token2.type == TK_PARENTHESIS_CLOSE) {
Reference *reference = Object::cast_to<Reference>(obj);
if (reference) {
value = REF(reference);
@@ -756,7 +756,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
if (need_comma) {
- if (token.type != TK_COMMA) {
+ if (token2.type != TK_COMMA) {
r_err_str = "Expected '}' or ','";
return ERR_PARSE_ERROR;
@@ -766,18 +766,18 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
}
}
- if (token.type != TK_STRING) {
+ if (token2.type != TK_STRING) {
r_err_str = "Expected property name as string";
return ERR_PARSE_ERROR;
}
- key = token.value;
+ key = token2.value;
- err = get_token(p_stream, token, line, r_err_str);
+ err = get_token(p_stream, token2, line, r_err_str);
if (err != OK)
return err;
- if (token.type != TK_COLON) {
+ if (token2.type != TK_COLON) {
r_err_str = "Expected ':'";
return ERR_PARSE_ERROR;
@@ -785,12 +785,12 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
at_key = false;
} else {
- Error err = get_token(p_stream, token, line, r_err_str);
+ Error err = get_token(p_stream, token2, line, r_err_str);
if (err != OK)
return err;
Variant v;
- err = parse_value(token, v, p_stream, line, r_err_str, p_res_parser);
+ err = parse_value(token2, v, p_stream, line, r_err_str, p_res_parser);
if (err)
return err;
obj->set(key, v);
@@ -882,11 +882,11 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return ERR_PARSE_ERROR;
}
- String id = token.value;
+ String id2 = token.value;
Ref<InputEvent> ie;
- if (id == "NONE") {
+ if (id2 == "NONE") {
get_token(p_stream, token, line, r_err_str);
@@ -895,7 +895,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return ERR_PARSE_ERROR;
}
- } else if (id == "KEY") {
+ } else if (id2 == "KEY") {
Ref<InputEventKey> key;
key.instance();
@@ -954,7 +954,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return ERR_PARSE_ERROR;
}
- } else if (id == "MBUTTON") {
+ } else if (id2 == "MBUTTON") {
Ref<InputEventMouseButton> mb;
mb.instance();
@@ -980,7 +980,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return ERR_PARSE_ERROR;
}
- } else if (id == "JBUTTON") {
+ } else if (id2 == "JBUTTON") {
Ref<InputEventJoypadButton> jb;
jb.instance();
@@ -1006,7 +1006,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return ERR_PARSE_ERROR;
}
- } else if (id == "JAXIS") {
+ } else if (id2 == "JAXIS") {
Ref<InputEventJoypadMotion> jm;
jm.instance();
@@ -1597,7 +1597,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
} break;
case Variant::INT: {
- p_store_string_func(p_store_string_ud, itos(p_variant.operator int()));
+ p_store_string_func(p_store_string_ud, itos(p_variant.operator int64_t()));
} break;
case Variant::REAL: {
diff --git a/core/vector.h b/core/vector.h
index 90b3d90826..93ee003519 100644
--- a/core/vector.h
+++ b/core/vector.h
@@ -40,7 +40,7 @@
#include "core/cowdata.h"
#include "core/error_macros.h"
#include "core/os/memory.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
template <class T>
class VectorWriteProxy {
diff --git a/core/version.h b/core/version.h
index 46eecf6125..05fec9d0a6 100644
--- a/core/version.h
+++ b/core/version.h
@@ -41,9 +41,14 @@
#ifdef VERSION_PATCH
// Example: "3.1.4"
#define VERSION_NUMBER "" VERSION_BRANCH "." _MKSTR(VERSION_PATCH)
+// Version number encoded as hexadecimal int with one byte for each number,
+// for easy comparison from code.
+// Example: 3.1.4 will be 0x030104, making comparison easy from script.
+#define VERSION_HEX 0x10000 * VERSION_MAJOR + 0x100 * VERSION_MINOR + VERSION_PATCH
#else
// Example: "3.1"
#define VERSION_NUMBER "" VERSION_BRANCH
+#define VERSION_HEX 0x10000 * VERSION_MAJOR + 0x100 * VERSION_MINOR
#endif // VERSION_PATCH
// Describes the full configuration of that Godot version, including the version number,
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 072eec800f..7b4b3e43ba 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -811,7 +811,7 @@
<description>
Random range, any floating point value between [code]from[/code] and [code]to[/code].
[codeblock]
- prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263
+ prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263
[/codeblock]
</description>
</method>
@@ -828,9 +828,9 @@
<return type="float">
</return>
<description>
- Returns a random floating point value between 0 and 1.
+ Returns a random floating point value on the interval [code][0, 1][/code].
[codeblock]
- randf() # returns 0.375671
+ randf() # returns e.g. 0.375671
[/codeblock]
</description>
</method>
@@ -838,11 +838,12 @@
<return type="int">
</return>
<description>
- Returns a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1).
+ Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N][/code] (where N is smaller than 2^32 -1).
[codeblock]
- randi() % 20 # returns random number between 0 and 19
- randi() % 100 # returns random number between 0 and 99
- randi() % 100 + 1 # returns random number between 1 and 100
+ randi() # returns random integer between 0 and 2^32 - 1
+ randi() % 20 # returns random integer between 0 and 19
+ randi() % 100 # returns random integer between 0 and 99
+ randi() % 100 + 1 # returns random integer between 1 and 100
[/codeblock]
</description>
</method>
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index 08cd79e78f..871ae1a701 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -4,7 +4,7 @@
Proxy texture for simple frame-based animations.
</brief_description>
<description>
- [code]AnimatedTexture[/code] is a resource format for simple frame-based animations, where multiple frames textures can be chained automatically with a predefined delay for each frame. It's not a [Node], contrarily to [AnimationPlayer] or [AnimatedSprite], but has the advantage of being usable at any place where a [Texture] resource can be used, e.g. in a [TileSet].
+ [code]AnimatedTexture[/code] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture] resource can be used, e.g. in a [TileSet].
The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
[code]AnimatedTexture[/code] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one.
</description>
@@ -19,7 +19,7 @@
<argument index="0" name="frame" type="int">
</argument>
<description>
- Retrieves the delayed assigned to the given [code]frame[/code] ID.
+ Returns the given frame's delay value.
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
@@ -28,7 +28,7 @@
<argument index="0" name="frame" type="int">
</argument>
<description>
- Retrieves the [Texture] assigned to the given [code]frame[/code] ID.
+ Returns the given frame's [Texture].
</description>
</method>
<method name="set_frame_delay">
@@ -39,7 +39,7 @@
<argument index="1" name="delay" type="float">
</argument>
<description>
- Defines an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code].
+ Sets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code].
For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:
[codeblock]
Frame 0: 0.5 s (1 / fps)
@@ -57,15 +57,15 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
- Assigns a [Texture] to the given [code]frame[/code] ID. IDs start at 0 (so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1).
- You can define any frame texture up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
+ Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
+ You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
</description>
</method>
</methods>
<members>
<member name="fps" type="float" setter="set_fps" getter="get_fps">
- Number of frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). Default value: 4.
- For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run over 4 seconds, with one frame each 0.5 seconds.
+ Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). Default value: 4.
+ For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.
</member>
<member name="frames" type="int" setter="set_frames" getter="get_frames">
Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. Default value: 1.
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index a7cae709a4..eaaa64d53d 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -648,6 +648,12 @@
The animation step value.
</member>
</members>
+ <signals>
+ <signal name="tracks_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="TYPE_VALUE" value="0" enum="TrackType">
Value tracks set values in node properties, but only those which can be Interpolated.
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 499da4b8a3..21aba282ee 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -30,7 +30,7 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
- Shifts position in the animation timeline. Delta is the time in seconds to shift.
+ Shifts position in the animation timeline. Delta is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
</description>
</method>
<method name="animation_get_next" qualifiers="const">
@@ -145,6 +145,7 @@
</argument>
<description>
Play the animation with key [code]name[/code]. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
+ If the animation has been paused by [code]stop(true)[/code] it will be resumed. Calling [code]play()[/code] without arguments will also resume the animation.
</description>
</method>
<method name="play_backwards">
@@ -156,6 +157,7 @@
</argument>
<description>
Play the animation with key [code]name[/code] in reverse.
+ If the animation has been paused by [code]stop(true)[/code] it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards.
</description>
</method>
<method name="queue">
@@ -195,7 +197,7 @@
<argument index="1" name="update" type="bool" default="false">
</argument>
<description>
- Seek the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time.
+ Seek the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped.
</description>
</method>
<method name="set_blend_time">
@@ -217,7 +219,8 @@
<argument index="0" name="reset" type="bool" default="true">
</argument>
<description>
- Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the anim position is reset to [code]0[/code].
+ Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
+ If [code]reset[/code] is [code]false[/code], then calling [code]play()[/code] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [code]play_backwards()[/code] method.
</description>
</method>
</methods>
diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml
index b0b58fc7bd..cfec75bc3a 100644
--- a/doc/classes/AnimationTreePlayer.xml
+++ b/doc/classes/AnimationTreePlayer.xml
@@ -29,7 +29,7 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
- Shifts position in the animation timeline. Delta is the time in seconds to shift.
+ Shifts position in the animation timeline. Delta is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
</description>
</method>
<method name="animation_node_get_animation" qualifiers="const">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 6bd0ef3421..0b5c0eb0b3 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -4,7 +4,7 @@
Generic array datatype.
</brief_description>
<description>
- Generic array, contains several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example:
+ Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example:
[codeblock]
var array = ["One", 2, 3, "Four"]
print(array[0]) # One
@@ -26,7 +26,7 @@
<argument index="0" name="from" type="PoolColorArray">
</argument>
<description>
- Construct an array from a [PoolColorArray].
+ Constructs an array from a [PoolColorArray].
</description>
</method>
<method name="Array">
@@ -35,7 +35,7 @@
<argument index="0" name="from" type="PoolVector3Array">
</argument>
<description>
- Construct an array from a [PoolVector3Array].
+ Constructs an array from a [PoolVector3Array].
</description>
</method>
<method name="Array">
@@ -44,7 +44,7 @@
<argument index="0" name="from" type="PoolVector2Array">
</argument>
<description>
- Construct an array from a [PoolVector2Array].
+ Constructs an array from a [PoolVector2Array].
</description>
</method>
<method name="Array">
@@ -53,7 +53,7 @@
<argument index="0" name="from" type="PoolStringArray">
</argument>
<description>
- Construct an array from a [PoolStringArray].
+ Constructs an array from a [PoolStringArray].
</description>
</method>
<method name="Array">
@@ -62,7 +62,7 @@
<argument index="0" name="from" type="PoolRealArray">
</argument>
<description>
- Construct an array from a [PoolRealArray].
+ Constructs an array from a [PoolRealArray].
</description>
</method>
<method name="Array">
@@ -71,7 +71,7 @@
<argument index="0" name="from" type="PoolIntArray">
</argument>
<description>
- Construct an array from a [PoolIntArray].
+ Constructs an array from a [PoolIntArray].
</description>
</method>
<method name="Array">
@@ -80,21 +80,21 @@
<argument index="0" name="from" type="PoolByteArray">
</argument>
<description>
- Construct an array from a [PoolByteArray].
+ Constructs an array from a [PoolByteArray].
</description>
</method>
<method name="append">
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Append an element at the end of the array (alias of [method push_back]).
+ Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="back">
<return type="Variant">
</return>
<description>
- Returns the last element of the array if the array is not empty (size&gt;0).
+ Returns the last element of the array if the array is not empty.
</description>
</method>
<method name="bsearch">
@@ -125,7 +125,7 @@
</method>
<method name="clear">
<description>
- Clear the array (resize to 0).
+ Clears the array (resizes to 0).
</description>
</method>
<method name="count">
@@ -134,7 +134,7 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Return the amount of times an element is in the array.
+ Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate">
@@ -144,21 +144,21 @@
</argument>
<description>
Returns a copy of the array.
- If [code]deep[/code] is [code]true[/code], a deep copy is be performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
+ If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
- Return true if the array is empty (size==0).
+ Returns [code]true[/code] if the array is empty.
</description>
</method>
<method name="erase">
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Remove the first occurrence of a value from the array.
+ Removes the first occurrence of a value from the array.
</description>
</method>
<method name="find">
@@ -185,7 +185,7 @@
<return type="Variant">
</return>
<description>
- Returns the first element of the array if the array is not empty (size&gt;0).
+ Returns the first element of the array if the array is not empty.
</description>
</method>
<method name="has">
@@ -194,7 +194,7 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Return true if the array contains given value.
+ Returns [code]true[/code] if the array contains the given value.
[codeblock]
["inside", 7].has("inside") == true
["inside", 7].has("outside") == false
@@ -207,7 +207,7 @@
<return type="int">
</return>
<description>
- Return a hashed integer value representing the array contents.
+ Returns a hashed integer value representing the array contents.
</description>
</method>
<method name="insert">
@@ -216,68 +216,68 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
- Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]).
+ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]).
</description>
</method>
<method name="invert">
<description>
- Reverse the order of the elements in the array.
+ Reverses the order of the elements in the array.
</description>
</method>
<method name="max">
<return type="Variant">
</return>
<description>
- Return maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
+ Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="min">
<return type="Variant">
</return>
<description>
- Return minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
+ Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="pop_back">
<return type="Variant">
</return>
<description>
- Remove the last element of the array.
+ Removes the last element of the array.
</description>
</method>
<method name="pop_front">
<return type="Variant">
</return>
<description>
- Remove the first element of the array.
+ Removes the first element of the array.
</description>
</method>
<method name="push_back">
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Append an element at the end of the array.
+ Appends an element at the end of the array.
</description>
</method>
<method name="push_front">
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Add an element at the beginning of the array.
+ Adds an element at the beginning of the array.
</description>
</method>
<method name="remove">
<argument index="0" name="position" type="int">
</argument>
<description>
- Remove an element from the array by index.
+ Removes an element from the array by index.
</description>
</method>
<method name="resize">
<argument index="0" name="size" type="int">
</argument>
<description>
- Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
+ Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
</description>
</method>
<method name="rfind">
@@ -293,19 +293,19 @@
</method>
<method name="shuffle">
<description>
- Shuffle the array such that the items will have a random order.
+ Shuffles the array such that the items will have a random order.
</description>
</method>
<method name="size">
<return type="int">
</return>
<description>
- Return the amount of elements in the array.
+ Returns the number of elements in the array.
</description>
</method>
<method name="sort">
<description>
- Sort the array using natural order.
+ Sorts the array. Note: strings are sorted in alphabetical, not natural order.
</description>
</method>
<method name="sort_custom">
@@ -314,7 +314,7 @@
<argument index="1" name="func" type="String">
</argument>
<description>
- Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
+ Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblock]
class MyCustomSorter:
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index bcb9b4f6da..fd66777997 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -53,13 +53,6 @@
Godot uses clockwise winding order for front faces of triangle primitive modes.
</description>
</method>
- <method name="center_geometry">
- <return type="void">
- </return>
- <description>
- Centers the geometry.
- </description>
- </method>
<method name="clear_blend_shapes">
<return type="void">
</return>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
index c43da3e233..f122906167 100644
--- a/doc/classes/AudioBusLayout.xml
+++ b/doc/classes/AudioBusLayout.xml
@@ -4,7 +4,7 @@
Stores information about the audiobusses.
</brief_description>
<description>
- Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between busses. See [AudioServer] for usage.
+ Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See [AudioServer] for usage.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index 9e791f02d7..5c5c55d17b 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -4,7 +4,7 @@
Adds a soft clip Limiter audio effect to an Audio bus.
</brief_description>
<description>
- A limiter is similar to a compressor, but it’s less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping.
+ A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping.
Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded.
</description>
<tutorials>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 96f02137cf..eb3c7cb3b4 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -58,7 +58,7 @@
<return type="AudioBusLayout">
</return>
<description>
- Generates an [AudioBusLayout] using the available busses and effects.
+ Generates an [AudioBusLayout] using the available buses and effects.
</description>
</method>
<method name="get_bus_channels" qualifiers="const">
@@ -74,7 +74,7 @@
<return type="int">
</return>
<description>
- Returns the number of available busses.
+ Returns the number of available buses.
</description>
</method>
<method name="get_bus_effect">
@@ -274,7 +274,7 @@
<argument index="0" name="amount" type="int">
</argument>
<description>
- Adds and removes busses to make the number of busses match [code]amount[/code].
+ Adds and removes buses to make the number of buses match [code]amount[/code].
</description>
</method>
<method name="set_bus_effect_enabled">
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index 77d5f14ab7..fdaa942018 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -12,11 +12,13 @@
</demos>
<methods>
<method name="save_to_wav">
- <return type="void">
+ <return type="int" enum="Error">
</return>
<argument index="0" name="path" type="String">
</argument>
<description>
+ Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
+ Note that a [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
</description>
</method>
</methods>
diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml
index 2073ca0664..6db2acac43 100644
--- a/doc/classes/CPUParticles.xml
+++ b/doc/classes/CPUParticles.xml
@@ -54,6 +54,7 @@
<member name="color" type="Color" setter="set_color" getter="get_color">
</member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
+ Each particle's vertex color will vary along this [GradientTexture].
</member>
<member name="damping" type="float" setter="set_param" getter="get_param">
</member>
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index f4b1bc1519..e56fb63dc5 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -35,6 +35,12 @@
<description>
</description>
</method>
+ <method name="get_frustum" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_position_behind" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml
index 28e9ba4217..0b4f07578e 100644
--- a/doc/classes/CollisionPolygon.xml
+++ b/doc/classes/CollisionPolygon.xml
@@ -20,7 +20,7 @@
If true, no collision will be produced.
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- Array of vertices which define the polygon.
+ Array of vertices which define the polygon. Note that the returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index 3dd87a4120..e754a2f2d1 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -25,7 +25,7 @@
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin">
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- The polygon's list of vertices. The final point will be connected to the first.
+ The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference.
</member>
</members>
<constants>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index d27839e0a6..0152cca957 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -9,7 +9,7 @@
[b]User Interface nodes and input[/b]
Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it.
Only one [code]Control[/code] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [code]Control[/code] nodes lose focus when another node grabs it, or if you hide the node in focus.
- Set [member mouse_filter] to MOUSE_FILTER_IGNORE to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
+ Set [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
[Theme] resources change the Control's appearance. If you change the [Theme] on a [code]Control[/code] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector.
</description>
<tutorials>
@@ -658,7 +658,7 @@
Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
</member>
<member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip">
- Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments.
+ Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE].
</member>
<member name="margin_bottom" type="float" setter="set_margin" getter="get_margin">
Distance between the node's bottom edge and its parent control, based on [member anchor_bottom].
@@ -941,10 +941,10 @@
The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis.
</constant>
<constant name="GROW_DIRECTION_END" value="1" enum="GrowDirection">
- The control wil grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis.
+ The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis.
</constant>
<constant name="GROW_DIRECTION_BOTH" value="2" enum="GrowDirection">
- The control wil grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
+ The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
</constant>
<constant name="ANCHOR_BEGIN" value="0" enum="Anchor">
Snaps one of the 4 anchor's sides to the origin of the node's [code]Rect[/code], in the top left. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset].
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index a9e2a38dcf..d87b029676 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -5,8 +5,19 @@
</brief_description>
<description>
Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
+ Erasing elements while iterating over them [b]is not supported[/b].
+ Creating a dictionary:
+ [codeblock]
+ var d = {4: 5, "A key": "A value", 28: [1, 2, 3]}
+ [/codeblock]
+ To add a key to an existing dictionary, access it like an existing key and assign to it:
+ [codeblock]
+ d[4] = "hello" # Add integer 4 as a key and assign the String "hello" as its value.
+ d["Godot"] = 3.01 # Add String "Godot" as a key and assign the value 3.01 to it.
+ [/codeblock]
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#dictionary</link>
</tutorials>
<demos>
</demos>
@@ -38,7 +49,7 @@
<argument index="0" name="key" type="Variant">
</argument>
<description>
- Erase a dictionary key/value pair by key.
+ Erase a dictionary key/value pair by key. Do not erase elements while iterating over the dictionary.
</description>
</method>
<method name="get">
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml
index 45b92276f1..0bec11e183 100644
--- a/doc/classes/EditorSpatialGizmo.xml
+++ b/doc/classes/EditorSpatialGizmo.xml
@@ -66,6 +66,8 @@
</argument>
<argument index="2" name="skeleton" type="RID">
</argument>
+ <argument index="3" name="material" type="Material" default="null">
+ </argument>
<description>
</description>
</method>
diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml
index a62b23ead8..d49a50893d 100644
--- a/doc/classes/EditorSpatialGizmoPlugin.xml
+++ b/doc/classes/EditorSpatialGizmoPlugin.xml
@@ -134,7 +134,13 @@
<return type="String">
</return>
<description>
- Override this method to provide the name that will appear in teh gizmo visibility menu.
+ Override this method to provide the name that will appear in the gizmo visibility menu.
+ </description>
+ </method>
+ <method name="get_priority" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
</description>
</method>
<method name="has_gizmo" qualifiers="virtual">
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index f921b76b21..d947784676 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -90,9 +90,17 @@
"major" - Holds the major version number as an int
"minor" - Holds the minor version number as an int
"patch" - Holds the patch version number as an int
+ "hex" - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below)
"status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
"build" - Holds the build name (e.g. "custom-build") as a String
"string" - major + minor + patch + status + build in a single String
+ The "hex" value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:
+ [codeblock]
+ if Engine.get_version_info().hex &gt;= 0x030200:
+ # do things specific to version 3.2 or later
+ else:
+ # do things specific to versions before 3.2
+ [/codeblock]
</description>
</method>
<method name="has_singleton" qualifiers="const">
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index b0a21d7f82..78623b359e 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -39,6 +39,7 @@
</argument>
<description>
Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed].
+ If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order.
</description>
</method>
<method name="get_error_text" qualifiers="const">
@@ -64,6 +65,7 @@
</argument>
<description>
Parses the expression and returns a [enum @GlobalScope.Error].
+ You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed.
</description>
</method>
</methods>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 6462176c73..c9a8f18116 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -38,7 +38,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the file cursor has reached the end of the file.
+ Returns [code]true[/code] if the file cursor has read past the end of the file. Note that this function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic.
</description>
</method>
<method name="file_exists" qualifiers="const">
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 3e47b167ef..6cb5e0b17a 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -4,7 +4,7 @@
Internationalized font and text drawing support.
</brief_description>
<description>
- Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
+ Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 8868dd778d..f165027d44 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -227,7 +227,7 @@
<return type="int" enum="Image.Format">
</return>
<description>
- Returns the image’s format. See [code]FORMAT_*[/code] constants.
+ Returns the image's format. See [code]FORMAT_*[/code] constants.
</description>
</method>
<method name="get_height" qualifiers="const">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 724e6a078d..29c60f902e 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -325,6 +325,15 @@
Set the mouse mode. See the constants for more information.
</description>
</method>
+ <method name="set_use_accumulated_input">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ Whether to accumulate similar input events sent by the operating system. Defaults to [code]true[/code].
+ </description>
+ </method>
<method name="start_joy_vibration">
<return type="void">
</return>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index c880823aee..cd08cd4fe7 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -13,6 +13,14 @@
<demos>
</demos>
<methods>
+ <method name="accumulate">
+ <return type="bool">
+ </return>
+ <argument index="0" name="with_event" type="InputEvent">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="as_text" qualifiers="const">
<return type="String">
</return>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index a4fade6ab2..4aec75d89f 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -65,7 +65,9 @@
</argument>
<argument index="1" name="infinite_inertia" type="bool" default="true">
</argument>
- <argument index="2" name="test_only" type="bool" default="false">
+ <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="3" name="test_only" type="bool" default="false">
</argument>
<description>
Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision.
@@ -91,7 +93,7 @@
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
[code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
- [i]TODO: Update for new stop_on_slode argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
+ If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
Returns the movement that remained when the body stopped. To get more detailed information about collisions that occurred, use [method get_slide_collision].
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index b94304b9a8..8aaa7c4ace 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -27,6 +27,12 @@
</argument>
<description>
Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ Example usage:
+ [codeblock]
+ for i in get_slide_count():
+ var collision = get_slide_collision(i)
+ print("Collided with: ", collision.collider.name)
+ [/codeblock]
</description>
</method>
<method name="get_slide_count" qualifiers="const">
@@ -91,10 +97,10 @@
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
[code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
- [i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
+ If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
- Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get more detailed information about collisions that occurred, use [method get_slide_collision].
+ Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
</description>
</method>
<method name="move_and_slide_with_snap">
@@ -138,7 +144,7 @@
If the body is at least this close to another body, this body will consider them to be colliding.
</member>
<member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled">
- If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms.
+ If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions.
</member>
</members>
<constants>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 90547b7c2f..36aa3c8b55 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead.
- Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events).
+ Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index 0d754f1d4e..3cb785e7b8 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -7,6 +7,7 @@
Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index 38b9054411..c7dfe9606b 100644
--- a/doc/classes/LightOccluder2D.xml
+++ b/doc/classes/LightOccluder2D.xml
@@ -7,6 +7,7 @@
Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed.
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index 7f0136bf77..c26665b6b5 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -5,6 +5,7 @@
<description>
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link>
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 1908fdd684..9bee8e2100 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -4,12 +4,13 @@
Provides high performance mesh instancing.
</brief_description>
<description>
- MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory.
- For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.
+ MultiMesh provides low level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow because each object is submitted to the GPU to be drawn individually.
+ MultiMesh is much faster because it can draw thousands of instances with a single draw call, resulting in less API overhead.
As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link>
</tutorials>
<demos>
</demos>
@@ -36,6 +37,7 @@
<argument index="0" name="instance" type="int">
</argument>
<description>
+ Return the custom data that has been set for a specific instance.
</description>
</method>
<method name="get_instance_transform" qualifiers="const">
@@ -47,6 +49,14 @@
Return the transform of a specific instance.
</description>
</method>
+ <method name="get_instance_transform_2d" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_instance_color">
<return type="void">
</return>
@@ -56,6 +66,7 @@
</argument>
<description>
Set the color of a specific instance.
+ For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [code]MultiMesh[/code] and [member SpatialMaterial.vertex_color_use_as_albedo] is [code]true[/code] on the material.
</description>
</method>
<method name="set_instance_custom_data">
@@ -66,6 +77,7 @@
<argument index="1" name="custom_data" type="Color">
</argument>
<description>
+ Set custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers.
</description>
</method>
<method name="set_instance_transform">
@@ -79,35 +91,58 @@
Set the transform for a specific instance.
</description>
</method>
+ <method name="set_instance_transform_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <argument index="1" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat">
+ Format of colors in color array that gets passed to shader.
</member>
<member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat">
+ Format of custom data in custom data array that gets passed to shader.
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count">
+ Number of instances that will get drawn.
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ Mesh to be drawn.
</member>
<member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat">
+ Format of transform used to transform mesh, either 2D or 3D.
</member>
</members>
<constants>
<constant name="TRANSFORM_2D" value="0" enum="TransformFormat">
+ Use this when using 2D transforms.
</constant>
<constant name="TRANSFORM_3D" value="1" enum="TransformFormat">
+ Use this when using 3D transforms.
</constant>
<constant name="COLOR_NONE" value="0" enum="ColorFormat">
+ Use when you are not using per-instance [Color]s.
</constant>
<constant name="COLOR_8BIT" value="1" enum="ColorFormat">
+ Compress [Color] data into 8 bits when passing to shader. This uses less memory and can be faster, but the [Color] loses precision.
</constant>
<constant name="COLOR_FLOAT" value="2" enum="ColorFormat">
+ The [Color] passed into [method set_instance_color] will use 4 floats. Use this for highest precision [Color].
</constant>
<constant name="CUSTOM_DATA_NONE" value="0" enum="CustomDataFormat">
+ Use when you are not using per-instance custom data.
</constant>
<constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat">
+ Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision.
</constant>
<constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat">
+ The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision.
</constant>
</constants>
</class>
diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml
index 5e021dfe9b..866ffffb5f 100644
--- a/doc/classes/MultiMeshInstance.xml
+++ b/doc/classes/MultiMeshInstance.xml
@@ -8,6 +8,8 @@
This is useful to optimize the rendering of a high amount of instances of a given mesh (for example tree in a forest or grass strands).
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link>
+ <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link>
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 02a8ee8e75..e872fee1cc 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -269,6 +269,15 @@
<description>
</description>
</method>
+ <method name="get_node_or_null" qualifiers="const">
+ <return type="Node">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ Similar to [method get_node], but does not raise an error when [code]path[/code] does not point to a valid [code]Node[/code].
+ </description>
+ </method>
<method name="get_parent" qualifiers="const">
<return type="Node">
</return>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index f6ad71b6e2..edf8f507f0 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -159,6 +159,13 @@
<description>
</description>
</method>
+ <method name="get_current_video_driver" qualifiers="const">
+ <return type="int" enum="OS.VideoDriver">
+ </return>
+ <description>
+ Returns the currently used video driver, using one of the values from [enum OS.VideoDriver].
+ </description>
+ </method>
<method name="get_date" qualifiers="const">
<return type="Dictionary">
</return>
@@ -459,14 +466,16 @@
<return type="int">
</return>
<description>
+ Returns the number of video drivers supported on the current platform.
</description>
</method>
<method name="get_video_driver_name" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="driver" type="int">
+ <argument index="0" name="driver" type="int" enum="OS.VideoDriver">
</argument>
<description>
+ Returns the name of the video driver matching the given [code]driver[/code] index. This index is a value from [enum OS.VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index.
</description>
</method>
<method name="get_virtual_keyboard_height">
@@ -675,6 +684,15 @@
Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
</description>
</method>
+ <method name="request_permission">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ At the moment this function is only used by [code]AudioDriverOpenSL[/code] to request permission for [code]RECORD_AUDIO[/code] on Android.
+ </description>
+ </method>
<method name="set_icon">
<return type="void">
</return>
@@ -806,6 +824,12 @@
</member>
</members>
<constants>
+ <constant name="VIDEO_DRIVER_GLES2" value="1" enum="VideoDriver">
+ The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web.
+ </constant>
+ <constant name="VIDEO_DRIVER_GLES3" value="0" enum="VideoDriver">
+ The GLES3 rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web.
+ </constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
</constant>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index 58ad268f05..b8adc4c96f 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -20,7 +20,7 @@
Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code].
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- A [Vector2] array with the index for polygon's vertices positions.
+ A [Vector2] array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference.
</member>
</members>
<constants>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index c58c932b61..0f795b4bf8 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -71,7 +71,16 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the ID of the item at index "idx".
+ Return the ID of the item at index [code]idx[/code].
+ </description>
+ </method>
+ <method name="get_item_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the index of the item with the given [code]id[/code].
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
@@ -198,14 +207,14 @@
<argument index="0" name="ID" type="int">
</argument>
<description>
- This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
+ This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument.
</description>
</signal>
<signal name="item_selected">
<argument index="0" name="ID" type="int">
</argument>
<description>
- This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
+ This signal is emitted when the current item was changed by the user. Index of the item selected is passed as argument.
</description>
</signal>
</signals>
diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml
index b6e31d3576..5d80f32bc2 100644
--- a/doc/classes/Particles.xml
+++ b/doc/classes/Particles.xml
@@ -8,6 +8,7 @@
Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link>
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml
index 91c1a0ca9b..53088e909e 100644
--- a/doc/classes/Particles2D.xml
+++ b/doc/classes/Particles2D.xml
@@ -8,6 +8,7 @@
Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link>
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index fe1465260f..341457a2b3 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -1112,6 +1112,8 @@
<constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
+ <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter">
+ </constant>
<constant name="SHAPE_LINE" value="0" enum="ShapeType">
This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml
index 2b4125aef4..cf718f06b2 100644
--- a/doc/classes/PhysicsDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState.xml
@@ -57,7 +57,7 @@
<argument index="1" name="j" type="Vector3">
</argument>
<description>
- Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin.
+ Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<method name="apply_torque_impulse">
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index c4dc103b72..118010b3cf 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -21,7 +21,7 @@
</argument>
<description>
Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code].
- If the shape can not move, the returned array will be [code][0, 0][/code].
+ If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics.
</description>
</method>
<method name="collide_shape">
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index e3ed43e7bc..b797e6ecf7 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -1595,6 +1595,8 @@
<constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
+ <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="8" enum="SpaceParameter">
+ </constant>
<constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis">
</constant>
<constant name="BODY_AXIS_LINEAR_Y" value="2" enum="BodyAxis">
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 9803837e5d..31ee0a9490 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -99,7 +99,7 @@
The offset applied to each vertex.
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- The polygon's list of vertices. The final point will be connected to the first.
+ The polygon's list of vertices. The final point will be connected to the first. Note that this returns a copy of the [PoolVector2Array] rather than a reference.
</member>
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons">
</member>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index fe7dbe52b0..ea696e624a 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -378,7 +378,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Mark the item at index "idx" as a separator, which means that it would be displayed as a mere line.
+ Mark the item at index "idx" as a separator, which means that it would be displayed as a line.
</description>
</method>
<method name="set_item_checked">
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 6b53615535..77a695d070 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -163,7 +163,11 @@
</method>
</methods>
<members>
+ <member name="android/modules" type="String" setter="" getter="">
+ Comma-separated list of custom Android modules (which must have been built in the Android export templates) using their Java package path, e.g. [code]org/godotengine/org/GodotPaymentV3,org/godotengine/godot/MyCustomSingleton"[/code].
+ </member>
<member name="application/boot_splash/bg_color" type="Color" setter="" getter="">
+ Background color for the boot splash.
</member>
<member name="application/boot_splash/fullsize" type="bool" setter="" getter="">
Scale the boot splash image to the full window length when engine starts (will leave it as default pixel size otherwise).
@@ -319,8 +323,8 @@
<member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter="">
Hotspot for the custom mouse cursor image.
</member>
- <member name="display/window/allow_per_pixel_transparency" type="bool" setter="" getter="">
- Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off.
+ <member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="">
+ Position offset for tooltips, relative to the hotspot of the mouse cursor.
</member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="">
Allow HiDPI display on Windows and OSX. On Desktop Linux, this can't be enabled or disabled.
@@ -331,9 +335,12 @@
<member name="display/window/handheld/orientation" type="String" setter="" getter="">
Default orientation for cell phone or tablet.
</member>
- <member name="display/window/per_pixel_transparency" type="bool" setter="" getter="">
+ <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="">
+ Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off.
+ </member>
+ <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter="">
</member>
- <member name="display/window/per_pixel_transparency_splash" type="bool" setter="" getter="">
+ <member name="display/window/per_pixel_transparency/splash" type="bool" setter="" getter="">
</member>
<member name="display/window/size/always_on_top" type="bool" setter="" getter="">
Force the window to be always on top.
@@ -688,10 +695,13 @@
</member>
<member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter="">
</member>
- <member name="rendering/quality/driver/driver_fallback" type="String" setter="" getter="">
- Whether to allow falling back to other graphics drivers if the preferred driver is not available. Best means use the best working driver (this is the default). Never means never fall back to another driver even if it does not work. This means the project will not run if the preferred driver does not function.
- </member>
<member name="rendering/quality/driver/driver_name" type="String" setter="" getter="">
+ Name of the configured video driver ("GLES2" or "GLES3").
+ Note that the backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument, or by the [member rendering/quality/driver/fallback_to_gles2] option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at runtime.
+ </member>
+ <member name="rendering/quality/driver/fallback_to_gles2" type="bool" setter="" getter="">
+ Whether to allow falling back to the GLES2 driver if the GLES3 driver is not supported. Default value: [code]false[/code].
+ Note that the two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the size of the game data pack.
</member>
<member name="rendering/quality/filters/anisotropic_filter_level" type="int" setter="" getter="">
Maximum Anisotropic filter level used for textures when anisotropy enabled.
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 5badfba923..fff13402f1 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -43,7 +43,7 @@
<argument index="1" name="to" type="int">
</argument>
<description>
- Generates pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code](inclusive).
+ Generates pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive).
</description>
</method>
<method name="randomize">
@@ -56,6 +56,7 @@
</methods>
<members>
<member name="seed" type="int" setter="set_seed" getter="get_seed">
+ The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.
</member>
</members>
<constants>
diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml
index 61f2737c01..22c70b789f 100644
--- a/doc/classes/RayCast.xml
+++ b/doc/classes/RayCast.xml
@@ -5,10 +5,10 @@
</brief_description>
<description>
A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray.
- RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks.
+ RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code] or by setting proper filtering with collision layers and masks.
RayCast can be configured to report collisions with [Area]s ([member collide_with_areas]) and/or [PhysicsBody]s ([member collide_with_bodies]).
Only enabled raycasts will be able to query the space and report collisions.
- RayCast calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
+ RayCast calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 45bfd16cb8..248b3a6010 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -145,7 +145,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns a larger Rect2 that contains this Rect2 and [code]with[/code].
+ Returns a larger Rect2 that contains this Rect2 and [code]b[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index fc42635ce2..4369f77abd 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,9 +4,10 @@
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/stable/getting_started/step_by_step/resources.html</link>
</tutorials>
<demos>
</demos>
@@ -23,6 +24,7 @@
<argument index="0" name="subresources" type="bool" default="false">
</argument>
<description>
+ Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency, this can be changed by passing [code]true[/code] to the [code]subresources[/code] argument.
</description>
</method>
<method name="get_local_scene" qualifiers="const">
@@ -35,7 +37,7 @@
<return type="RID">
</return>
<description>
- Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
+ Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
</description>
</method>
<method name="setup_local_to_scene">
@@ -50,7 +52,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the path of the resource. Differs from set_path(), if another [code]Resource[/code] exists with "path" it over-takes it, instead of failing.
+ Sets the path of the resource. Differs from [code]set_path()[/code], if another [code]Resource[/code] exists with "path" it over-takes it, instead of failing.
</description>
</method>
</methods>
@@ -58,8 +60,10 @@
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene">
</member>
<member name="resource_name" type="String" setter="set_name" getter="get_name">
+ The name of the resource. This is an optional identifier.
</member>
<member name="resource_path" type="String" setter="set_path" getter="get_path">
+ The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.
</member>
</members>
<signals>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 002bcd891a..18d6e04d8e 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -4,7 +4,7 @@
Resource Preloader Node.
</brief_description>
<description>
- Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
+ This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader.
</description>
<tutorials>
</tutorials>
@@ -19,6 +19,7 @@
<argument index="1" name="resource" type="Resource">
</argument>
<description>
+ Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2.
</description>
</method>
<method name="get_resource" qualifiers="const">
@@ -27,14 +28,14 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the resource given a text-id.
+ Returns the resource associated to [code]name[/code].
</description>
</method>
<method name="get_resource_list" qualifiers="const">
<return type="PoolStringArray">
</return>
<description>
- Return the list of resources inside the preloader.
+ Returns the list of resources inside the preloader.
</description>
</method>
<method name="has_resource" qualifiers="const">
@@ -43,7 +44,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Return true if the preloader has a given resource.
+ Returns true if the preloader contains a resource associated to [code]name[/code].
</description>
</method>
<method name="remove_resource">
@@ -52,7 +53,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Remove a resource from the preloader by text id.
+ Removes the resource associated to [code]name[/code] from the preloader.
</description>
</method>
<method name="rename_resource">
@@ -63,7 +64,7 @@
<argument index="1" name="newname" type="String">
</argument>
<description>
- Rename a resource inside the preloader, from a text-id to a new text-id.
+ Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 3f28156915..3c253c3bea 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -72,7 +72,7 @@
<argument index="1" name="impulse" type="Vector3">
</argument>
<description>
- Applies a positioned impulse which will be affected by the body mass and shape. This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin.
+ Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<method name="apply_torque_impulse">
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 68e78ba5d4..9b74dbedb4 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -69,7 +69,7 @@
<argument index="1" name="impulse" type="Vector2">
</argument>
<description>
- Applies a positioned impulse to the body (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied instantaneously. Both the impulse and the offset from the body origin are in global coordinates.
+ Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<method name="apply_torque_impulse">
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index f39d221d89..7e696badb2 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -64,6 +64,13 @@
</argument>
<description>
Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this SceneTree. If [code]pause_mode_process[/code] is set to false, pausing the SceneTree will also pause the timer.
+ Commonly used to create a one-shot delay timer as in the following example:
+ [codeblock]
+ func some_function():
+ print("start")
+ yield(get_tree().create_timer(1.0), "timeout")
+ print("end")
+ [/codeblock]
</description>
</method>
<method name="get_frame" qualifiers="const">
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index e1234ce88a..f58c531ed5 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.1">
<brief_description>
+ One-shot timer.
</brief_description>
<description>
+ A one-shot timer managed by the scene tree, which emits [signal timeout] on completion. See also [method SceneTree.create_timer].
+ As opposed to [Timer], it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example:
+ [codeblock]
+ func some_function():
+ print("start")
+ yield(get_tree().create_timer(1.0), "timeout")
+ print("end")
+ [/codeblock]
</description>
<tutorials>
</tutorials>
@@ -12,11 +21,13 @@
</methods>
<members>
<member name="time_left" type="float" setter="set_time_left" getter="get_time_left">
+ The time remaining.
</member>
</members>
<signals>
<signal name="timeout">
<description>
+ Emitted when the timer reaches 0.
</description>
</signal>
</signals>
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 0b427fc089..c8c7fa1d01 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -4,7 +4,7 @@
A helper node for displaying scrollable elements (e.g. lists).
</brief_description>
<description>
- A ScrollContainer node with a [Control] child and scrollbar child ([HScrollBar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension).
+ A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index 7491d22479..9b15c6e8b4 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -7,6 +7,7 @@
A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/shading/index.html</link>
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml
index 233df28255..f07329f31f 100644
--- a/doc/classes/Skeleton.xml
+++ b/doc/classes/Skeleton.xml
@@ -259,6 +259,10 @@
</description>
</method>
</methods>
+ <members>
+ <member name="bones_in_world_transform" type="bool" setter="set_use_bones_in_world_transform" getter="is_using_bones_in_world_transform">
+ </member>
+ </members>
<constants>
<constant name="NOTIFICATION_UPDATE_SKELETON" value="50">
</constant>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 712b9ca2a5..258525c396 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -5,6 +5,7 @@
<description>
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
</tutorials>
<demos>
</demos>
@@ -30,6 +31,12 @@
</description>
</method>
</methods>
+ <signals>
+ <signal name="bone_setup_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml
index 11f914aac2..56ba2fc5b9 100644
--- a/doc/classes/SpotLight.xml
+++ b/doc/classes/SpotLight.xml
@@ -4,7 +4,7 @@
Spotlight [Light], such as a reflector spotlight or a lantern.
</brief_description>
<description>
- A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
+ A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index be21abe275..d8cc56cc8c 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -39,7 +39,8 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
- Return the offset of margin "margin" (see MARGIN_* enum).
+ Return the content margin offset for the specified margin
+ Positive values reduce size inwards, unlike [Control]'s margin values.
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
@@ -70,12 +71,22 @@
</methods>
<members>
<member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin">
+ The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.
+ If this value is negative, it is ignored and a child-specific margin is used instead. For example for [StyleBoxFlat] the border thickness (if any) is used instead.
+ It is up to the code using this style box to decide what these contents are: for example, a [Button] respects this content margin for the textual contents of the button.
+ [method get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above.
</member>
<member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin">
+ The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left.
+ Refer to [member content_margin_bottom] for extra considerations.
</member>
<member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin">
+ The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.
+ Refer to [member content_margin_bottom] for extra considerations.
</member>
<member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin">
+ The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.
+ Refer to [member content_margin_bottom] for extra considerations.
</member>
</members>
<constants>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index d8c378fde2..806ed1941a 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -42,28 +42,49 @@
<member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled">
</member>
<member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the left margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the right margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the top margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the bottom margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_bottom] if it is negative.
</member>
<member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the left margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the left border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_left] if it is negative.
</member>
<member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the right margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the right border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_right] if it is negative.
</member>
<member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the top margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the top border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative.
</member>
<member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate">
+ Modulates the color of the texture when this style box is drawn.
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ The normal map to use when drawing this style box.
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ Species a sub region of the texture to use.
+ This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ The texture to use when drawing this style box.
</member>
</members>
<signals>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index fd158587e5..587b0190fe 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -78,7 +78,7 @@
<method name="add_triangle_fan">
<return type="void">
</return>
- <argument index="0" name="vertexes" type="PoolVector3Array">
+ <argument index="0" name="vertices" type="PoolVector3Array">
</argument>
<argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
</argument>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 04285b62df..3c5bc25def 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -216,6 +216,8 @@
</theme_item>
<theme_item name="tab_bg" type="StyleBox">
</theme_item>
+ <theme_item name="tab_disabled" type="StyleBox">
+ </theme_item>
<theme_item name="tab_fg" type="StyleBox">
</theme_item>
<theme_item name="top_margin" type="int">
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index de57250d8b..b22d9d73da 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -279,6 +279,8 @@
</theme_item>
<theme_item name="tab_bg" type="StyleBox">
</theme_item>
+ <theme_item name="tab_disabled" type="StyleBox">
+ </theme_item>
<theme_item name="tab_fg" type="StyleBox">
</theme_item>
<theme_item name="top_margin" type="int">
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 4849d768f5..fe3b2118a3 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -34,7 +34,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
- Returns the tile index of the given cell.
+ Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
<method name="get_cell_autotile_coord" qualifiers="const">
@@ -53,7 +53,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Returns the tile index of the cell given by a Vector2.
+ Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
<method name="get_collision_layer_bit" qualifiers="const">
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index c3af586b21..f5f50a75b1 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -13,7 +13,7 @@
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
tween.start()
[/codeblock]
- Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector.
+ Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using "property:component" (eg. [code]position:x[/code]), where it would only apply to that particular component.
Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [code]http://easings.net/[/code] for some examples). The second accepts an [enum EaseType] constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [code]EASE_IN_OUT[/code], and use the one that looks best.
</description>
<tutorials>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 93806ac326..f0980f6414 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -8,22 +8,22 @@
Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
Here's an example on how to add an action to Godot editor's own 'undoredo':
[codeblock]
- var undoredo = get_undo_redo() # method of EditorPlugin
+ var undo_redo = get_undo_redo() # Method of EditorPlugin.
func do_something():
- pass # put your code here
+ pass # Put your code here.
func undo_something():
- pass # put here the code that reverts what's done by "do_something()"
+ pass # Put here the code that reverts what's done by "do_something()".
func _on_MyButton_pressed():
var node = get_node("MyNode2D")
- undoredo.create_action("Move the node")
- undoredo.add_do_method(self, "do_something")
- undoredo.add_undo_method(self, "undo_something")
- undoredo.add_do_property(node, "position", Vector2(100,100))
- undoredo.add_undo_property(node, "position", node.position)
- undoredo.commit_action()
+ undo_redo.create_action("Move the node")
+ undo_redo.add_do_method(self, "do_something")
+ undo_redo.add_undo_method(self, "undo_something")
+ undo_redo.add_do_property(node, "position", Vector2(100,100))
+ undo_redo.add_undo_property(node, "position", node.position)
+ undo_redo.commit_action()
[/codeblock]
[method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes.
If you don't need to register a method you can leave [method add_do_method] and [method add_undo_method] out, and so it goes for properties. You can register more than one method/property.
@@ -125,6 +125,7 @@
</argument>
<description>
Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].
+ The way actions are merged is dictated by the [code]merge_mode[/code] argument. See [enum MergeMode] for details.
</description>
</method>
<method name="get_current_action_name" qualifiers="const">
@@ -142,6 +143,12 @@
This is useful mostly to check if something changed from a saved version.
</description>
</method>
+ <method name="is_commiting_action" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="redo">
<return type="bool">
</return>
@@ -159,10 +166,13 @@
</methods>
<constants>
<constant name="MERGE_DISABLE" value="0" enum="MergeMode">
+ Makes [code]do[/code]/[code]undo[/code] operations stay in separate actions.
</constant>
<constant name="MERGE_ENDS" value="1" enum="MergeMode">
+ Makes so that the action's [code]do[/code] operation is from the first action created and the [code]undo[/code] operation is from the last subsequent action with the same name.
</constant>
<constant name="MERGE_ALL" value="2" enum="MergeMode">
+ Makes subsequent actions with the same name be merged into one.
</constant>
</constants>
</class>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 880dc43c90..09891ca889 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -80,7 +80,11 @@
<return type="ViewportTexture">
</return>
<description>
- Returns the viewport's texture.
+ Returns the viewport's texture. Note that due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture.get_data] to flip it back, for example:
+ [codeblock]
+ var img = get_viewport().get_texture().get_data()
+ img.flip_y()
+ [/codeblock]
</description>
</method>
<method name="get_viewport_rid" qualifiers="const">
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 4855fa2848..7175b9fd88 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -4,7 +4,21 @@
Integer built-in type.
</brief_description>
<description>
- Integer built-in type.
+ Signed 64-bit integer type.
+ It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around.
+ [code]int[/code] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint.
+ [codeblock]
+ var my_variant = 0 # int, value 0
+ my_variant += 4.2 # float, value 4.2
+ var my_int: int = 1 # int, value 1
+ my_int = 4.2 # int, value 4, the right value is implicitly cast to int
+ my_int = int("6.7") # int, value 6, the String is explicitly cast with [method int]
+
+ var max_int = 9223372036854775807
+ print(max_int) # 9223372036854775807, OK
+ max_int += 1
+ print(max_int) # -9223372036854775808, we overflowed and wrapped around
+ [/codeblock]
</description>
<tutorials>
</tutorials>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 22c0b5d1fd..40dde48432 100755
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -950,6 +950,12 @@ def make_method_signature(class_def, method_def, make_ref, state): # type: (Cla
if arg.default_value is not None:
out += '=' + arg.default_value
+ if isinstance(method_def, MethodDef) and method_def.qualifiers is not None and 'vararg' in method_def.qualifiers:
+ if len(method_def.parameters) > 0:
+ out += ', ...'
+ else:
+ out += ' ...'
+
out += ' **)**'
if isinstance(method_def, MethodDef) and method_def.qualifiers is not None:
diff --git a/drivers/SCsub b/drivers/SCsub
index 320d4dc4bb..583973c025 100644
--- a/drivers/SCsub
+++ b/drivers/SCsub
@@ -13,7 +13,6 @@ SConscript('alsa/SCsub')
SConscript('coreaudio/SCsub')
SConscript('pulseaudio/SCsub')
if (env["platform"] == "windows"):
- SConscript("rtaudio/SCsub")
SConscript("wasapi/SCsub")
if env['xaudio2']:
SConscript("xaudio2/SCsub")
diff --git a/drivers/alsamidi/alsa_midi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp
index cd90c8912b..aae0ae0216 100644
--- a/drivers/alsamidi/alsa_midi.cpp
+++ b/drivers/alsamidi/midi_driver_alsamidi.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* alsa_midi.cpp */
+/* midi_driver_alsamidi.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#ifdef ALSAMIDI_ENABLED
-#include "alsa_midi.h"
+#include "midi_driver_alsamidi.h"
#include "core/os/os.h"
#include "core/print_string.h"
@@ -199,4 +199,4 @@ MIDIDriverALSAMidi::~MIDIDriverALSAMidi() {
close();
}
-#endif
+#endif // ALSAMIDI_ENABLED
diff --git a/drivers/alsamidi/alsa_midi.h b/drivers/alsamidi/midi_driver_alsamidi.h
index 054a7b474e..b6956cc32f 100644
--- a/drivers/alsamidi/alsa_midi.h
+++ b/drivers/alsamidi/midi_driver_alsamidi.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* alsa_midi.h */
+/* midi_driver_alsamidi.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,8 +30,8 @@
#ifdef ALSAMIDI_ENABLED
-#ifndef ALSA_MIDI_H
-#define ALSA_MIDI_H
+#ifndef MIDI_DRIVER_ALSAMIDI_H
+#define MIDI_DRIVER_ALSAMIDI_H
#include "core/os/midi_driver.h"
#include "core/os/mutex.h"
@@ -65,5 +65,5 @@ public:
virtual ~MIDIDriverALSAMidi();
};
-#endif
-#endif
+#endif // MIDI_DRIVER_ALSAMIDI_H
+#endif // ALSAMIDI_ENABLED
diff --git a/drivers/coremidi/core_midi.cpp b/drivers/coremidi/midi_driver_coremidi.cpp
index 7d3477213f..7a92ac0702 100644
--- a/drivers/coremidi/core_midi.cpp
+++ b/drivers/coremidi/midi_driver_coremidi.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* core_midi.cpp */
+/* midi_driver_coremidi.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#ifdef COREMIDI_ENABLED
-#include "core_midi.h"
+#include "midi_driver_coremidi.h"
#include "core/print_string.h"
@@ -120,4 +120,4 @@ MIDIDriverCoreMidi::~MIDIDriverCoreMidi() {
close();
}
-#endif
+#endif // COREMIDI_ENABLED
diff --git a/drivers/coremidi/core_midi.h b/drivers/coremidi/midi_driver_coremidi.h
index 7a10b5548e..23c2a19812 100644
--- a/drivers/coremidi/core_midi.h
+++ b/drivers/coremidi/midi_driver_coremidi.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* core_midi.h */
+/* midi_driver_coremidi.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,8 +30,8 @@
#ifdef COREMIDI_ENABLED
-#ifndef CORE_MIDI_H
-#define CORE_MIDI_H
+#ifndef MIDI_DRIVER_COREMIDI_H
+#define MIDI_DRIVER_COREMIDI_H
#include "core/os/midi_driver.h"
#include "core/vector.h"
@@ -58,5 +58,5 @@ public:
virtual ~MIDIDriverCoreMidi();
};
-#endif
-#endif
+#endif // MIDI_DRIVER_COREMIDI_H
+#endif // COREMIDI_ENABLED
diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h
index 214da82819..ddf4d1d85c 100644
--- a/drivers/dummy/rasterizer_dummy.h
+++ b/drivers/dummy/rasterizer_dummy.h
@@ -461,6 +461,7 @@ public:
RID skeleton_create() { return RID(); }
void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) {}
void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) {}
+ void skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform) {}
int skeleton_get_bone_count(RID p_skeleton) const { return 0; }
void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) {}
Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone) const { return Transform(); }
diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp
index 64e4dbdab4..3671679b49 100644
--- a/drivers/gles2/rasterizer_canvas_gles2.cpp
+++ b/drivers/gles2/rasterizer_canvas_gles2.cpp
@@ -112,25 +112,21 @@ void RasterizerCanvasGLES2::_set_uniforms() {
void RasterizerCanvasGLES2::canvas_begin() {
state.canvas_shader.bind();
- bool transparent = false;
+ state.using_transparent_rt = false;
if (storage->frame.current_rt) {
glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo);
- glColorMask(1, 1, 1, 1);
- transparent = storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT];
+ state.using_transparent_rt = storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT];
}
if (storage->frame.clear_request) {
- glColorMask(true, true, true, true);
glClearColor(storage->frame.clear_request_color.r,
storage->frame.clear_request_color.g,
storage->frame.clear_request_color.b,
- transparent ? storage->frame.clear_request_color.a : 1.0);
+ state.using_transparent_rt ? storage->frame.clear_request_color.a : 1.0);
glClear(GL_COLOR_BUFFER_BIT);
storage->frame.clear_request = false;
}
- glColorMask(1, 1, 1, transparent ? 1 : 0);
-
/*
if (storage->frame.current_rt) {
glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo);
@@ -186,7 +182,7 @@ void RasterizerCanvasGLES2::canvas_end() {
state.using_texture_rect = false;
state.using_skeleton = false;
state.using_ninepatch = false;
- glColorMask(1, 1, 1, 1);
+ state.using_transparent_rt = false;
}
RasterizerStorageGLES2::Texture *RasterizerCanvasGLES2::_bind_canvas_texture(const RID &p_texture, const RID &p_normal_map) {
@@ -206,12 +202,12 @@ RasterizerStorageGLES2::Texture *RasterizerCanvasGLES2::_bind_canvas_texture(con
} else {
- texture = texture->get_ptr();
-
if (texture->redraw_if_visible) {
VisualServerRaster::redraw_request();
}
+ texture = texture->get_ptr();
+
if (texture->render_target) {
texture->render_target->used_in_frame = true;
}
@@ -248,12 +244,12 @@ RasterizerStorageGLES2::Texture *RasterizerCanvasGLES2::_bind_canvas_texture(con
} else {
- normal_map = normal_map->get_ptr();
-
if (normal_map->redraw_if_visible) { //check before proxy, because this is usually used with proxies
VisualServerRaster::redraw_request();
}
+ normal_map = normal_map->get_ptr();
+
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 2);
glBindTexture(GL_TEXTURE_2D, normal_map->tex_id);
state.current_normal = p_normal_map;
@@ -503,6 +499,23 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glDisableVertexAttribArray(VS::ARRAY_COLOR);
glVertexAttrib4fv(VS::ARRAY_COLOR, r->modulate.components);
+ bool can_tile = true;
+ if (r->texture.is_valid() && r->flags & CANVAS_RECT_TILE && !storage->config.support_npot_repeat_mipmap) {
+ // workaround for when setting tiling does not work due to hardware limitation
+
+ RasterizerStorageGLES2::Texture *texture = storage->texture_owner.getornull(r->texture);
+
+ if (texture) {
+
+ texture = texture->get_ptr();
+
+ if (next_power_of_2(texture->alloc_width) != (unsigned int)texture->alloc_width && next_power_of_2(texture->alloc_height) != (unsigned int)texture->alloc_height) {
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_FORCE_REPEAT, true);
+ can_tile = false;
+ }
+ }
+ }
+
// On some widespread Nvidia cards, the normal draw method can produce some
// flickering in draw_rect and especially TileMap rendering (tiles randomly flicker).
// See GH-9913.
@@ -563,7 +576,7 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
bool untile = false;
- if (r->flags & CANVAS_RECT_TILE && !(texture->flags & VS::TEXTURE_FLAG_REPEAT)) {
+ if (can_tile && r->flags & CANVAS_RECT_TILE && !(texture->flags & VS::TEXTURE_FLAG_REPEAT)) {
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
untile = true;
@@ -576,8 +589,15 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
} else {
+ static const Vector2 uvs[4] = {
+ Vector2(0.0, 0.0),
+ Vector2(0.0, 1.0),
+ Vector2(1.0, 1.0),
+ Vector2(1.0, 0.0),
+ };
+
state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, Vector2());
- _draw_gui_primitive(4, points, NULL, NULL);
+ _draw_gui_primitive(4, points, NULL, uvs);
}
} else {
@@ -613,7 +633,7 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
bool untile = false;
- if (r->flags & CANVAS_RECT_TILE && !(tex->flags & VS::TEXTURE_FLAG_REPEAT)) {
+ if (can_tile && r->flags & CANVAS_RECT_TILE && !(tex->flags & VS::TEXTURE_FLAG_REPEAT)) {
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
untile = true;
@@ -661,6 +681,9 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
}
+
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_FORCE_REPEAT, false);
+
} break;
case Item::Command::TYPE_NINEPATCH: {
@@ -844,11 +867,11 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
int indices[num_points * 3];
- for (int i = 0; i < num_points; i++) {
- points[i] = circle->pos + Vector2(Math::sin(i * Math_PI * 2.0 / num_points), Math::cos(i * Math_PI * 2.0 / num_points)) * circle->radius;
- indices[i * 3 + 0] = i;
- indices[i * 3 + 1] = (i + 1) % num_points;
- indices[i * 3 + 2] = num_points;
+ for (int j = 0; j < num_points; j++) {
+ points[j] = circle->pos + Vector2(Math::sin(j * Math_PI * 2.0 / num_points), Math::cos(j * Math_PI * 2.0 / num_points)) * circle->radius;
+ indices[j * 3 + 0] = j;
+ indices[j * 3 + 1] = (j + 1) % num_points;
+ indices[j * 3 + 2] = num_points;
}
_bind_canvas_texture(RID(), RID());
@@ -906,13 +929,13 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_id);
}
- for (int i = 0; i < VS::ARRAY_MAX - 1; i++) {
- if (s->attribs[i].enabled) {
- glEnableVertexAttribArray(i);
- glVertexAttribPointer(s->attribs[i].index, s->attribs[i].size, s->attribs[i].type, s->attribs[i].normalized, s->attribs[i].stride, (uint8_t *)0 + s->attribs[i].offset);
+ for (int k = 0; k < VS::ARRAY_MAX - 1; k++) {
+ if (s->attribs[k].enabled) {
+ glEnableVertexAttribArray(k);
+ glVertexAttribPointer(s->attribs[k].index, s->attribs[k].size, s->attribs[k].type, s->attribs[k].normalized, s->attribs[k].stride, (uint8_t *)0 + s->attribs[k].offset);
} else {
- glDisableVertexAttribArray(i);
- switch (i) {
+ glDisableVertexAttribArray(k);
+ switch (k) {
case VS::ARRAY_NORMAL: {
glVertexAttrib4f(VS::ARRAY_NORMAL, 0.0, 0.0, 1, 1);
} break;
@@ -932,8 +955,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
}
}
- for (int i = 1; i < VS::ARRAY_MAX - 1; i++) {
- glDisableVertexAttribArray(i);
+ for (int j = 1; j < VS::ARRAY_MAX - 1; j++) {
+ glDisableVertexAttribArray(j);
}
}
@@ -995,13 +1018,13 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_id);
}
- for (int i = 0; i < VS::ARRAY_MAX - 1; i++) {
- if (s->attribs[i].enabled) {
- glEnableVertexAttribArray(i);
- glVertexAttribPointer(s->attribs[i].index, s->attribs[i].size, s->attribs[i].type, s->attribs[i].normalized, s->attribs[i].stride, (uint8_t *)0 + s->attribs[i].offset);
+ for (int k = 0; k < VS::ARRAY_MAX - 1; k++) {
+ if (s->attribs[k].enabled) {
+ glEnableVertexAttribArray(k);
+ glVertexAttribPointer(s->attribs[k].index, s->attribs[k].size, s->attribs[k].type, s->attribs[k].normalized, s->attribs[k].stride, (uint8_t *)0 + s->attribs[k].offset);
} else {
- glDisableVertexAttribArray(i);
- switch (i) {
+ glDisableVertexAttribArray(k);
+ switch (k) {
case VS::ARRAY_NORMAL: {
glVertexAttrib4f(VS::ARRAY_NORMAL, 0.0, 0.0, 1, 1);
} break;
@@ -1014,8 +1037,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
}
}
- for (int i = 0; i < amount; i++) {
- const float *buffer = base_buffer + i * stride;
+ for (int k = 0; k < amount; k++) {
+ const float *buffer = base_buffer + k * stride;
{
@@ -1165,7 +1188,7 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
}
}
-void RasterizerCanvasGLES2::_copy_texscreen(const Rect2 &p_rect) {
+void RasterizerCanvasGLES2::_copy_screen(const Rect2 &p_rect) {
if (storage->frame.current_rt->copy_screen_effect.color == 0) {
ERR_EXPLAIN("Can't use screen texture copying in a render target configured without copy buffers");
@@ -1174,8 +1197,6 @@ void RasterizerCanvasGLES2::_copy_texscreen(const Rect2 &p_rect) {
glDisable(GL_BLEND);
- state.canvas_texscreen_used = true;
-
Vector2 wh(storage->frame.current_rt->width, storage->frame.current_rt->height);
Color copy_section(p_rect.position.x / wh.x, p_rect.position.y / wh.y, p_rect.size.x / wh.x, p_rect.size.y / wh.y);
@@ -1184,13 +1205,12 @@ void RasterizerCanvasGLES2::_copy_texscreen(const Rect2 &p_rect) {
storage->shaders.copy.set_conditional(CopyShaderGLES2::USE_COPY_SECTION, true);
}
+ storage->shaders.copy.set_conditional(CopyShaderGLES2::USE_NO_ALPHA, !state.using_transparent_rt);
+
glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->copy_screen_effect.fbo);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->color);
- glClearColor(1, 0, 1, 1);
- glClear(GL_COLOR_BUFFER_BIT);
-
storage->shaders.copy.bind();
storage->shaders.copy.set_uniform(CopyShaderGLES2::COPY_SECTION, copy_section);
@@ -1216,16 +1236,23 @@ void RasterizerCanvasGLES2::_copy_texscreen(const Rect2 &p_rect) {
_draw_polygon(indexpos, 6, 4, vertpos, uvpos, NULL, false);
storage->shaders.copy.set_conditional(CopyShaderGLES2::USE_COPY_SECTION, false);
+ storage->shaders.copy.set_conditional(CopyShaderGLES2::USE_NO_ALPHA, false);
glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo); //back to front
+ glEnable(GL_BLEND);
+}
+
+void RasterizerCanvasGLES2::_copy_texscreen(const Rect2 &p_rect) {
+
+ state.canvas_texscreen_used = true;
+
+ _copy_screen(p_rect);
// back to canvas, force rebind
state.using_texture_rect = false;
state.canvas_shader.bind();
_bind_canvas_texture(state.current_tex, state.current_normal);
_set_uniforms();
-
- glEnable(GL_BLEND);
}
void RasterizerCanvasGLES2::canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light, const Transform2D &p_base_transform) {
@@ -1385,6 +1412,10 @@ void RasterizerCanvasGLES2::canvas_render_items(Item *p_item_list, int p_z, cons
continue;
}
+ if (t->redraw_if_visible) {
+ VisualServerRaster::redraw_request();
+ }
+
t = t->get_ptr();
#ifdef TOOLS_ENABLED
@@ -1395,10 +1426,6 @@ void RasterizerCanvasGLES2::canvas_render_items(Item *p_item_list, int p_z, cons
if (t->render_target)
t->render_target->used_in_frame = true;
- if (t->redraw_if_visible) {
- VisualServerRaster::redraw_request();
- }
-
glBindTexture(t->target, t->tex_id);
}
@@ -1878,6 +1905,8 @@ void RasterizerCanvasGLES2::draw_window_margins(int *black_margin, RID *black_im
draw_generic_textured_rect(Rect2(0, window_h - black_margin[MARGIN_BOTTOM], window_w, black_margin[MARGIN_BOTTOM]), Rect2(0, 0, 1, 1));
}
+
+ canvas_end();
}
void RasterizerCanvasGLES2::initialize() {
@@ -1990,6 +2019,7 @@ void RasterizerCanvasGLES2::initialize() {
state.canvas_shader.init();
state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, true);
+ state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_RGBA_SHADOWS, storage->config.use_rgba_2d_shadows);
state.canvas_shader.bind();
@@ -1998,6 +2028,8 @@ void RasterizerCanvasGLES2::initialize() {
state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_PIXEL_SNAP, GLOBAL_DEF("rendering/quality/2d/use_pixel_snap", false));
state.using_light = NULL;
+ state.using_transparent_rt = false;
+ state.using_skeleton = false;
}
void RasterizerCanvasGLES2::finalize() {
diff --git a/drivers/gles2/rasterizer_canvas_gles2.h b/drivers/gles2/rasterizer_canvas_gles2.h
index 221427198a..af41e91e0c 100644
--- a/drivers/gles2/rasterizer_canvas_gles2.h
+++ b/drivers/gles2/rasterizer_canvas_gles2.h
@@ -93,6 +93,7 @@ public:
Transform vp;
Light *using_light;
bool using_shadow;
+ bool using_transparent_rt;
} state;
@@ -118,6 +119,7 @@ public:
_FORCE_INLINE_ void _draw_generic(GLuint p_primitive, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor);
_FORCE_INLINE_ void _canvas_item_render_commands(Item *p_item, Item *current_clip, bool &reclip, RasterizerStorageGLES2::Material *p_material);
+ void _copy_screen(const Rect2 &p_rect);
_FORCE_INLINE_ void _copy_texscreen(const Rect2 &p_rect);
virtual void canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light, const Transform2D &p_base_transform);
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
index 2c52895bda..2ffc0d7463 100644
--- a/drivers/gles2/rasterizer_scene_gles2.cpp
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -42,8 +42,6 @@
#define glClearDepth glClearDepthf
#endif
-#define _DEPTH_COMPONENT24_OES 0x81A6
-
static const GLenum _cube_side_enum[6] = {
GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
@@ -62,6 +60,7 @@ RID RasterizerSceneGLES2::shadow_atlas_create() {
ShadowAtlas *shadow_atlas = memnew(ShadowAtlas);
shadow_atlas->fbo = 0;
shadow_atlas->depth = 0;
+ shadow_atlas->color = 0;
shadow_atlas->size = 0;
shadow_atlas->smallest_subdiv = 0;
@@ -84,11 +83,19 @@ void RasterizerSceneGLES2::shadow_atlas_set_size(RID p_atlas, int p_size) {
// erase the old atlast
if (shadow_atlas->fbo) {
- glDeleteTextures(1, &shadow_atlas->depth);
+ if (storage->config.use_rgba_3d_shadows) {
+ glDeleteRenderbuffers(1, &shadow_atlas->depth);
+ } else {
+ glDeleteTextures(1, &shadow_atlas->depth);
+ }
glDeleteFramebuffers(1, &shadow_atlas->fbo);
+ if (shadow_atlas->color) {
+ glDeleteTextures(1, &shadow_atlas->color);
+ }
shadow_atlas->fbo = 0;
shadow_atlas->depth = 0;
+ shadow_atlas->color = 0;
}
// erase shadow atlast references from lights
@@ -108,17 +115,36 @@ void RasterizerSceneGLES2::shadow_atlas_set_size(RID p_atlas, int p_size) {
// create a depth texture
glActiveTexture(GL_TEXTURE0);
- glGenTextures(1, &shadow_atlas->depth);
- glBindTexture(GL_TEXTURE_2D, shadow_atlas->depth);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, shadow_atlas->size, shadow_atlas->size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ if (storage->config.use_rgba_3d_shadows) {
+
+ //maximum compatibility, renderbuffer and RGBA shadow
+ glGenRenderbuffers(1, &shadow_atlas->depth);
+ glBindRenderbuffer(GL_RENDERBUFFER, directional_shadow.depth);
+ glRenderbufferStorage(GL_RENDERBUFFER, storage->config.depth_internalformat, shadow_atlas->size, shadow_atlas->size);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, shadow_atlas->depth);
+
+ glGenTextures(1, &shadow_atlas->color);
+ glBindTexture(GL_TEXTURE_2D, shadow_atlas->color);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, shadow_atlas->size, shadow_atlas->size, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, shadow_atlas->color, 0);
+ } else {
+ //just depth texture
+ glGenTextures(1, &shadow_atlas->depth);
+ glBindTexture(GL_TEXTURE_2D, shadow_atlas->depth);
+ glTexImage2D(GL_TEXTURE_2D, 0, storage->config.depth_internalformat, shadow_atlas->size, shadow_atlas->size, 0, GL_DEPTH_COMPONENT, storage->config.depth_type, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, shadow_atlas->depth, 0);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, shadow_atlas->depth, 0);
+ }
glViewport(0, 0, shadow_atlas->size, shadow_atlas->size);
glDepthMask(GL_TRUE);
@@ -143,7 +169,7 @@ void RasterizerSceneGLES2::shadow_atlas_set_quadrant_subdivision(RID p_atlas, in
subdiv = int(Math::sqrt((float)subdiv));
- if (shadow_atlas->quadrants[p_quadrant].shadows.size() == subdiv)
+ if (shadow_atlas->quadrants[p_quadrant].shadows.size() == (int)subdiv)
return;
// erase all data from the quadrant
@@ -459,10 +485,11 @@ RID RasterizerSceneGLES2::reflection_probe_instance_create(RID p_probe) {
for (int i = 0; i < 6; i++) {
glGenFramebuffers(1, &rpi->fbo[i]);
+ glGenTextures(1, &rpi->color[i]);
}
- glGenFramebuffers(1, &rpi->fbo_blur);
glGenRenderbuffers(1, &rpi->depth);
+
rpi->cubemap = 0;
//glGenTextures(1, &rpi->cubemap);
@@ -510,9 +537,14 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance
GLenum type = GL_UNSIGNED_BYTE;
glActiveTexture(GL_TEXTURE0);
+
+ glBindRenderbuffer(GL_RENDERBUFFER, rpi->depth);
+ glRenderbufferStorage(GL_RENDERBUFFER, storage->config.depth_internalformat, size, size);
+
if (rpi->cubemap != 0) {
glDeleteTextures(1, &rpi->cubemap);
}
+
glGenTextures(1, &rpi->cubemap);
glBindTexture(GL_TEXTURE_CUBE_MAP, rpi->cubemap);
#if 1
@@ -523,17 +555,15 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
- glBindRenderbuffer(GL_RENDERBUFFER, rpi->depth); //resize depth buffer
-#ifdef JAVASCRIPT_ENABLED
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size);
-#else
- glRenderbufferStorage(GL_RENDERBUFFER, _DEPTH_COMPONENT24_OES, size, size);
-#endif
-
+ //Generate framebuffers for rendering
for (int i = 0; i < 6; i++) {
glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], rpi->cubemap, 0);
+ glBindTexture(GL_TEXTURE_2D, rpi->color[i]);
+ glTexImage2D(GL_TEXTURE_2D, 0, internal_format, size, size, 0, format, type, NULL);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, rpi->color[i], 0);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rpi->depth);
+ GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+ ERR_CONTINUE(status != GL_FRAMEBUFFER_COMPLETE);
}
#else
@@ -550,8 +580,6 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance
//adjust framebuffer
glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], rpi->cubemap, 0);
- glBindRenderbuffer(GL_RENDERBUFFER, rpi->depth);
- glRenderbufferStorage(GL_RENDERBUFFER, _DEPTH_COMPONENT24_OES, size, size);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rpi->depth);
#ifdef DEBUG_ENABLED
@@ -570,6 +598,8 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
}
return true;
@@ -579,6 +609,7 @@ bool RasterizerSceneGLES2::reflection_probe_instance_postprocess_step(RID p_inst
ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
ERR_FAIL_COND_V(!rpi, false);
+ ERR_FAIL_COND_V(rpi->current_resolution == 0, false);
int size = rpi->probe_ptr->resolution;
@@ -596,16 +627,23 @@ bool RasterizerSceneGLES2::reflection_probe_instance_postprocess_step(RID p_inst
}
}
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, rpi->cubemap);
+ glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR); //use linear, no mipmaps so it does not read from what is being written to
+
+ //first of all, copy rendered textures to cubemap
+ for (int i = 0; i < 6; i++) {
+ glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]);
+ glViewport(0, 0, size, size);
+ glCopyTexSubImage2D(_cube_side_enum[i], 0, 0, 0, 0, 0, size, size);
+ }
+ //do filtering
//vdc cache
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, storage->resources.radical_inverse_vdc_cache_tex);
- glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo_blur);
// now render to the framebuffer, mipmap level for mipmap level
int lod = 1;
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_CUBE_MAP, rpi->cubemap);
- glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR); //use linear, no mipmaps so it does not read from what is being written to
size >>= 1;
int mipmaps = 6;
@@ -613,13 +651,20 @@ bool RasterizerSceneGLES2::reflection_probe_instance_postprocess_step(RID p_inst
storage->shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_SOURCE_PANORAMA, false);
storage->shaders.cubemap_filter.bind();
+ glBindFramebuffer(GL_FRAMEBUFFER, storage->resources.mipmap_blur_fbo);
+
//blur
while (size >= 1) {
+ glActiveTexture(GL_TEXTURE3);
+ glBindTexture(GL_TEXTURE_2D, storage->resources.mipmap_blur_color);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, size, size, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, storage->resources.mipmap_blur_color, 0);
+ glViewport(0, 0, size, size);
+ glActiveTexture(GL_TEXTURE0);
+
for (int i = 0; i < 6; i++) {
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], rpi->cubemap, lod);
- glViewport(0, 0, size, size);
storage->bind_quad_array();
storage->shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES2::FACE_ID, i);
float roughness = CLAMP(lod / (float)(mipmaps - 1), 0, 1);
@@ -627,6 +672,7 @@ bool RasterizerSceneGLES2::reflection_probe_instance_postprocess_step(RID p_inst
storage->shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES2::Z_FLIP, false);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ glCopyTexSubImage2D(_cube_side_enum[i], lod, 0, 0, 0, 0, size, size);
}
size >>= 1;
@@ -635,9 +681,14 @@ bool RasterizerSceneGLES2::reflection_probe_instance_postprocess_step(RID p_inst
}
// restore ranges
-
+ glActiveTexture(GL_TEXTURE0);
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glActiveTexture(GL_TEXTURE3); //back to panorama
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glActiveTexture(GL_TEXTURE1);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
return true;
}
@@ -1120,10 +1171,10 @@ void RasterizerSceneGLES2::_fill_render_list(InstanceBase **p_cull_result, int p
int num_surfaces = mesh->surfaces.size();
- for (int i = 0; i < num_surfaces; i++) {
- int material_index = instance->materials[i].is_valid() ? i : -1;
+ for (int j = 0; j < num_surfaces; j++) {
+ int material_index = instance->materials[j].is_valid() ? j : -1;
- RasterizerStorageGLES2::Surface *surface = mesh->surfaces[i];
+ RasterizerStorageGLES2::Surface *surface = mesh->surfaces[j];
_add_geometry(surface, instance, NULL, material_index, p_depth_pass, p_shadow_pass);
}
@@ -1143,8 +1194,8 @@ void RasterizerSceneGLES2::_fill_render_list(InstanceBase **p_cull_result, int p
int ssize = mesh->surfaces.size();
- for (int i = 0; i < ssize; i++) {
- RasterizerStorageGLES2::Surface *s = mesh->surfaces[i];
+ for (int j = 0; j < ssize; j++) {
+ RasterizerStorageGLES2::Surface *s = mesh->surfaces[j];
_add_geometry(s, instance, multi_mesh, -1, p_depth_pass, p_shadow_pass);
}
} break;
@@ -1178,9 +1229,19 @@ bool RasterizerSceneGLES2::_setup_material(RasterizerStorageGLES2::Material *p_m
state.scene_shader.set_custom_shader(p_material->shader->custom_code_id);
+ if (p_material->shader->spatial.uses_screen_texture && storage->frame.current_rt) {
+ glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 4);
+ glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->copy_screen_effect.color);
+ }
+
+ if (p_material->shader->spatial.uses_depth_texture && storage->frame.current_rt) {
+ glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 4);
+ glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->depth);
+ }
+
bool shader_rebind = state.scene_shader.bind();
- if (p_material->shader->spatial.no_depth_test) {
+ if (p_material->shader->spatial.no_depth_test || p_material->shader->spatial.uses_depth_texture) {
glDisable(GL_DEPTH_TEST);
} else {
glEnable(GL_DEPTH_TEST);
@@ -1190,19 +1251,16 @@ bool RasterizerSceneGLES2::_setup_material(RasterizerStorageGLES2::Material *p_m
case RasterizerStorageGLES2::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS:
case RasterizerStorageGLES2::Shader::Spatial::DEPTH_DRAW_OPAQUE: {
- glDepthMask(!p_alpha_pass);
+ glDepthMask(!p_alpha_pass && !p_material->shader->spatial.uses_depth_texture);
} break;
case RasterizerStorageGLES2::Shader::Spatial::DEPTH_DRAW_ALWAYS: {
- glDepthMask(GL_TRUE);
+ glDepthMask(GL_TRUE && !p_material->shader->spatial.uses_depth_texture);
} break;
case RasterizerStorageGLES2::Shader::Spatial::DEPTH_DRAW_NEVER: {
glDepthMask(GL_FALSE);
} break;
}
- // TODO whyyyyy????
- p_reverse_cull = true;
-
switch (p_material->shader->spatial.cull_mode) {
case RasterizerStorageGLES2::Shader::Spatial::CULL_MODE_DISABLED: {
glDisable(GL_CULL_FACE);
@@ -1219,9 +1277,9 @@ bool RasterizerSceneGLES2::_setup_material(RasterizerStorageGLES2::Material *p_m
}
int tc = p_material->textures.size();
- Pair<StringName, RID> *textures = p_material->textures.ptrw();
+ const Pair<StringName, RID> *textures = p_material->textures.ptr();
- ShaderLanguage::ShaderNode::Uniform::Hint *texture_hints = p_material->shader->texture_hints.ptrw();
+ const ShaderLanguage::ShaderNode::Uniform::Hint *texture_hints = p_material->shader->texture_hints.ptr();
state.scene_shader.set_uniform(SceneShaderGLES2::SKELETON_TEXTURE_SIZE, p_skeleton_tex_size);
@@ -1254,12 +1312,12 @@ bool RasterizerSceneGLES2::_setup_material(RasterizerStorageGLES2::Material *p_m
continue;
}
- t = t->get_ptr();
-
if (t->redraw_if_visible) { //must check before proxy because this is often used with proxies
VisualServerRaster::redraw_request();
}
+ t = t->get_ptr();
+
#ifdef TOOLS_ENABLED
if (t->detect_3d) {
t->detect_3d(t->detect_3d_ud);
@@ -1564,6 +1622,8 @@ void RasterizerSceneGLES2::_render_geometry(RenderList::Element *p_element) {
} else {
glVertexAttrib4fv(INSTANCE_ATTRIB_BASE + 3, buffer + color_ofs);
}
+ } else {
+ glVertexAttrib4f(INSTANCE_ATTRIB_BASE + 3, 1.0, 1.0, 1.0, 1.0);
}
if (multi_mesh->custom_data_floats) {
@@ -1611,11 +1671,10 @@ void RasterizerSceneGLES2::_render_geometry(RenderList::Element *p_element) {
if (c.texture.is_valid() && storage->texture_owner.owns(c.texture)) {
RasterizerStorageGLES2::Texture *t = storage->texture_owner.get(c.texture);
- t = t->get_ptr();
-
if (t->redraw_if_visible) {
VisualServerRaster::redraw_request();
}
+ t = t->get_ptr();
#ifdef TOOLS_ENABLED
if (t->detect_3d) {
@@ -1742,7 +1801,11 @@ void RasterizerSceneGLES2::_setup_light_type(LightInstance *p_light, ShadowAtlas
if (!state.render_no_shadows && p_light->light_ptr->shadow) {
state.scene_shader.set_conditional(SceneShaderGLES2::USE_SHADOW, true);
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 3);
- glBindTexture(GL_TEXTURE_2D, directional_shadow.depth);
+ if (storage->config.use_rgba_3d_shadows) {
+ glBindTexture(GL_TEXTURE_2D, directional_shadow.color);
+ } else {
+ glBindTexture(GL_TEXTURE_2D, directional_shadow.depth);
+ }
state.scene_shader.set_conditional(SceneShaderGLES2::SHADOW_MODE_PCF_5, shadow_filter_mode == SHADOW_FILTER_PCF5);
state.scene_shader.set_conditional(SceneShaderGLES2::SHADOW_MODE_PCF_13, shadow_filter_mode == SHADOW_FILTER_PCF13);
}
@@ -1754,7 +1817,11 @@ void RasterizerSceneGLES2::_setup_light_type(LightInstance *p_light, ShadowAtlas
if (!state.render_no_shadows && shadow_atlas && p_light->light_ptr->shadow) {
state.scene_shader.set_conditional(SceneShaderGLES2::USE_SHADOW, true);
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 3);
- glBindTexture(GL_TEXTURE_2D, shadow_atlas->depth);
+ if (storage->config.use_rgba_3d_shadows) {
+ glBindTexture(GL_TEXTURE_2D, shadow_atlas->color);
+ } else {
+ glBindTexture(GL_TEXTURE_2D, shadow_atlas->depth);
+ }
state.scene_shader.set_conditional(SceneShaderGLES2::SHADOW_MODE_PCF_5, shadow_filter_mode == SHADOW_FILTER_PCF5);
state.scene_shader.set_conditional(SceneShaderGLES2::SHADOW_MODE_PCF_13, shadow_filter_mode == SHADOW_FILTER_PCF13);
}
@@ -1765,7 +1832,11 @@ void RasterizerSceneGLES2::_setup_light_type(LightInstance *p_light, ShadowAtlas
if (!state.render_no_shadows && shadow_atlas && p_light->light_ptr->shadow) {
state.scene_shader.set_conditional(SceneShaderGLES2::USE_SHADOW, true);
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 3);
- glBindTexture(GL_TEXTURE_2D, shadow_atlas->depth);
+ if (storage->config.use_rgba_3d_shadows) {
+ glBindTexture(GL_TEXTURE_2D, shadow_atlas->color);
+ } else {
+ glBindTexture(GL_TEXTURE_2D, shadow_atlas->depth);
+ }
state.scene_shader.set_conditional(SceneShaderGLES2::SHADOW_MODE_PCF_5, shadow_filter_mode == SHADOW_FILTER_PCF5);
state.scene_shader.set_conditional(SceneShaderGLES2::SHADOW_MODE_PCF_13, shadow_filter_mode == SHADOW_FILTER_PCF13);
}
@@ -1786,6 +1857,9 @@ void RasterizerSceneGLES2::_setup_light(LightInstance *light, ShadowAtlas *shado
Color color = light_ptr->color * sign * energy * Math_PI;
state.scene_shader.set_uniform(SceneShaderGLES2::LIGHT_COLOR, color);
+ Color shadow_color = light_ptr->shadow_color.to_linear();
+ state.scene_shader.set_uniform(SceneShaderGLES2::SHADOW_COLOR, shadow_color);
+
//specific parameters
switch (light_ptr->type) {
@@ -2029,7 +2103,7 @@ void RasterizerSceneGLES2::_setup_refprobes(ReflectionProbeInstance *p_refprobe1
state.scene_shader.set_uniform(SceneShaderGLES2::REFPROBE2_USE_BOX_PROJECT, p_refprobe2->probe_ptr->box_projection);
state.scene_shader.set_uniform(SceneShaderGLES2::REFPROBE2_BOX_EXTENTS, p_refprobe2->probe_ptr->extents);
state.scene_shader.set_uniform(SceneShaderGLES2::REFPROBE2_BOX_OFFSET, p_refprobe2->probe_ptr->origin_offset);
- state.scene_shader.set_uniform(SceneShaderGLES2::REFPROBE2_EXTERIOR, !p_refprobe2->probe_ptr->interior);
+ state.scene_shader.set_uniform(SceneShaderGLES2::REFPROBE2_EXTERIOR, p_refprobe2->probe_ptr->interior);
state.scene_shader.set_uniform(SceneShaderGLES2::REFPROBE2_INTENSITY, p_refprobe2->probe_ptr->intensity);
Color ambient;
@@ -2337,7 +2411,7 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
Transform sky_orientation(p_env->sky_orientation, Vector3(0.0, 0.0, 0.0));
state.scene_shader.set_uniform(SceneShaderGLES2::RADIANCE_INVERSE_XFORM, sky_orientation.affine_inverse() * p_view_transform);
} else {
- // would be a bit weird if we dont have this...
+ // would be a bit weird if we don't have this...
state.scene_shader.set_uniform(SceneShaderGLES2::RADIANCE_INVERSE_XFORM, p_view_transform);
}
}
@@ -2352,7 +2426,7 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
} else {
state.scene_shader.set_uniform(SceneShaderGLES2::BG_ENERGY, 1.0);
state.scene_shader.set_uniform(SceneShaderGLES2::AMBIENT_SKY_CONTRIBUTION, 1.0);
- state.scene_shader.set_uniform(SceneShaderGLES2::AMBIENT_COLOR, Color(1.0, 1.0, 1.0, 1.0));
+ state.scene_shader.set_uniform(SceneShaderGLES2::AMBIENT_COLOR, state.default_ambient);
state.scene_shader.set_uniform(SceneShaderGLES2::AMBIENT_ENERGY, 1.0);
}
@@ -2412,6 +2486,12 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
state.scene_shader.set_uniform(SceneShaderGLES2::WORLD_TRANSFORM, e->instance->transform);
+ if (skeleton) {
+ state.scene_shader.set_uniform(SceneShaderGLES2::SKELETON_IN_WORLD_COORDS, skeleton->use_world_transform);
+ state.scene_shader.set_uniform(SceneShaderGLES2::SKELETON_TRANSFORM, skeleton->world_transform);
+ state.scene_shader.set_uniform(SceneShaderGLES2::SKELETON_TRANSFORM_INVERSE, skeleton->world_transform_inverse);
+ }
+
if (use_lightmap_capture) { //this is per instance, must be set always if present
glUniform4fv(state.scene_shader.get_uniform_location(SceneShaderGLES2::LIGHTMAP_CAPTURES), 12, (const GLfloat *)e->instance->lightmap_capture_data.ptr());
state.scene_shader.set_uniform(SceneShaderGLES2::LIGHTMAP_CAPTURE_SKY, false);
@@ -2448,6 +2528,7 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
state.scene_shader.set_conditional(SceneShaderGLES2::FOG_DEPTH_ENABLED, false);
state.scene_shader.set_conditional(SceneShaderGLES2::FOG_HEIGHT_ENABLED, false);
state.scene_shader.set_conditional(SceneShaderGLES2::USE_RADIANCE_MAP, false);
+ state.scene_shader.set_conditional(SceneShaderGLES2::USE_DEPTH_PREPASS, false);
}
void RasterizerSceneGLES2::_draw_sky(RasterizerStorageGLES2::Sky *p_sky, const CameraMatrix &p_projection, const Transform &p_transform, bool p_vflip, float p_custom_fov, float p_energy, const Basis &p_sky_orientation) {
@@ -2464,7 +2545,6 @@ void RasterizerSceneGLES2::_draw_sky(RasterizerStorageGLES2::Sky *p_sky, const C
glDisable(GL_CULL_FACE);
glDisable(GL_BLEND);
glDepthFunc(GL_LEQUAL);
- glColorMask(1, 1, 1, 1);
// Camera
CameraMatrix camera;
@@ -2555,11 +2635,19 @@ void RasterizerSceneGLES2::_draw_sky(RasterizerStorageGLES2::Sky *p_sky, const C
void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID p_environment, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass) {
+ Transform cam_transform = p_cam_transform;
+
GLuint current_fb = 0;
Environment *env = NULL;
int viewport_width, viewport_height;
bool probe_interior = false;
+ bool reverse_cull = false;
+
+ if (storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP]) {
+ cam_transform.basis.set_axis(1, -cam_transform.basis.get_axis(1));
+ reverse_cull = true;
+ }
if (p_reflection_probe.is_valid()) {
ReflectionProbeInstance *probe = reflection_probe_instance_owner.getornull(p_reflection_probe);
@@ -2586,6 +2674,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
viewport_height = storage->frame.current_rt->height;
}
+ state.used_screen_texture = false;
state.viewport_size.x = viewport_width;
state.viewport_size.y = viewport_height;
state.screen_pixel_size.x = 1.0 / viewport_width;
@@ -2594,7 +2683,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
//push back the directional lights
if (p_light_cull_count) {
- //harcoded limit of 256 lights
+ //hardcoded limit of 256 lights
render_light_instance_count = MIN(RenderList::MAX_LIGHTS, p_light_cull_count);
render_light_instances = (LightInstance **)alloca(sizeof(LightInstance *) * render_light_instance_count);
render_directional_lights = 0;
@@ -2608,7 +2697,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
if (light->light_ptr->type == VS::LIGHT_DIRECTIONAL) {
render_directional_lights++;
- //as goin in reverse, directional lights are always first anyway
+ //as going in reverse, directional lights are always first anyway
}
light->light_index = index;
@@ -2657,7 +2746,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
// clear color
- Color clear_color(0, 0, 0, 0);
+ Color clear_color(0, 0, 0, 1);
if (storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
clear_color = Color(0, 0, 0, 0);
@@ -2678,6 +2767,8 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
glClearColor(clear_color.r, clear_color.g, clear_color.b, clear_color.a);
}
+ state.default_ambient = Color(clear_color.r, clear_color.g, clear_color.b, 1.0);
+
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
@@ -2709,18 +2800,23 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
if (env && env->bg_mode == VS::ENV_BG_SKY && (!storage->frame.current_rt || !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT])) {
if (sky && sky->panorama.is_valid()) {
- _draw_sky(sky, p_cam_projection, p_cam_transform, false, env->sky_custom_fov, env->bg_energy, env->sky_orientation);
+ _draw_sky(sky, p_cam_projection, cam_transform, false, env->sky_custom_fov, env->bg_energy, env->sky_orientation);
}
}
if (probe_interior) {
env_radiance_tex = 0; //do not use radiance texture on interiors
+ state.default_ambient = Color(0, 0, 0, 1); //black as default ambient for interior
}
// render opaque things first
render_list.sort_by_key(false);
- _render_render_list(render_list.elements, render_list.element_count, p_cam_transform, p_cam_projection, p_shadow_atlas, env, env_radiance_tex, 0.0, 0.0, false, false, false);
+ _render_render_list(render_list.elements, render_list.element_count, cam_transform, p_cam_projection, p_shadow_atlas, env, env_radiance_tex, 0.0, 0.0, reverse_cull, false, false);
+ if (storage->frame.current_rt && state.used_screen_texture) {
+ //copy screen texture
+ storage->canvas->_copy_screen(Rect2());
+ }
// alpha pass
glBlendEquation(GL_FUNC_ADD);
@@ -2728,7 +2824,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
render_list.sort_by_depth(true);
- _render_render_list(&render_list.elements[render_list.max_elements - render_list.alpha_element_count], render_list.alpha_element_count, p_cam_transform, p_cam_projection, p_shadow_atlas, env, env_radiance_tex, 0.0, 0.0, false, true, false);
+ _render_render_list(&render_list.elements[render_list.max_elements - render_list.alpha_element_count], render_list.alpha_element_count, cam_transform, p_cam_projection, p_shadow_atlas, env, env_radiance_tex, 0.0, 0.0, reverse_cull, true, false);
glDisable(GL_DEPTH_TEST);
@@ -2899,7 +2995,7 @@ void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_
if (light->type == VS::LIGHT_OMNI) {
// cubemap only
- if (light->omni_shadow_mode == VS::LIGHT_OMNI_SHADOW_CUBE && storage->config.support_write_depth) {
+ if (light->omni_shadow_mode == VS::LIGHT_OMNI_SHADOW_CUBE && storage->config.support_shadow_cubemaps) {
int cubemap_index = shadow_cubemaps.size() - 1;
// find an appropriate cubemap to render to
@@ -2968,7 +3064,9 @@ void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glDepthMask(GL_TRUE);
- glColorMask(0, 0, 0, 0);
+ if (!storage->config.use_rgba_3d_shadows) {
+ glColorMask(0, 0, 0, 0);
+ }
if (custom_vp_size) {
glViewport(0, 0, custom_vp_size, custom_vp_size);
@@ -2995,7 +3093,7 @@ void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_
state.scene_shader.set_conditional(SceneShaderGLES2::RENDER_DEPTH_DUAL_PARABOLOID, false);
// convert cubemap to dual paraboloid if needed
- if (light->type == VS::LIGHT_OMNI && (light->omni_shadow_mode == VS::LIGHT_OMNI_SHADOW_CUBE && storage->config.support_write_depth) && p_pass == 5) {
+ if (light->type == VS::LIGHT_OMNI && (light->omni_shadow_mode == VS::LIGHT_OMNI_SHADOW_CUBE && storage->config.support_shadow_cubemaps) && p_pass == 5) {
ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
glBindFramebuffer(GL_FRAMEBUFFER, shadow_atlas->fbo);
@@ -3041,8 +3139,12 @@ void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_
}
}
- glViewport(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height);
- glColorMask(1, 1, 1, 1);
+ if (storage->frame.current_rt) {
+ glViewport(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height);
+ }
+ if (!storage->config.use_rgba_3d_shadows) {
+ glColorMask(1, 1, 1, 1);
+ }
}
void RasterizerSceneGLES2::set_scene_pass(uint64_t p_pass) {
@@ -3080,6 +3182,16 @@ bool RasterizerSceneGLES2::free(RID p_rid) {
ReflectionProbeInstance *reflection_instance = reflection_probe_instance_owner.get(p_rid);
+ for (int i = 0; i < 6; i++) {
+ glDeleteFramebuffers(1, &reflection_instance->fbo[i]);
+ glDeleteTextures(1, &reflection_instance->color[i]);
+ }
+
+ if (reflection_instance->cubemap != 0) {
+ glDeleteTextures(1, &reflection_instance->cubemap);
+ }
+ glDeleteRenderbuffers(1, &reflection_instance->depth);
+
reflection_probe_release_atlas_index(p_rid);
reflection_probe_instance_owner.free(p_rid);
memdelete(reflection_instance);
@@ -3096,6 +3208,8 @@ void RasterizerSceneGLES2::set_debug_draw_mode(VS::ViewportDebugDraw p_debug_dra
void RasterizerSceneGLES2::initialize() {
state.scene_shader.init();
+
+ state.scene_shader.set_conditional(SceneShaderGLES2::USE_RGBA_SHADOWS, storage->config.use_rgba_3d_shadows);
state.cube_to_dp_shader.init();
render_list.init();
@@ -3157,7 +3271,7 @@ void RasterizerSceneGLES2::initialize() {
}
// cubemaps for shadows
- if (storage->config.support_write_depth) { //not going to be used
+ if (storage->config.support_shadow_cubemaps) { //not going to be used
int max_shadow_cubemap_sampler_size = 512;
int cube_size = max_shadow_cubemap_sampler_size;
@@ -3174,7 +3288,8 @@ void RasterizerSceneGLES2::initialize() {
glBindTexture(GL_TEXTURE_CUBE_MAP, cube.cubemap);
for (int i = 0; i < 6; i++) {
- glTexImage2D(_cube_side_enum[i], 0, GL_DEPTH_COMPONENT, cube_size, cube_size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+
+ glTexImage2D(_cube_side_enum[i], 0, storage->config.depth_internalformat, cube_size, cube_size, 0, GL_DEPTH_COMPONENT, storage->config.depth_type, NULL);
}
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@@ -3205,17 +3320,35 @@ void RasterizerSceneGLES2::initialize() {
glGenFramebuffers(1, &directional_shadow.fbo);
glBindFramebuffer(GL_FRAMEBUFFER, directional_shadow.fbo);
- glGenTextures(1, &directional_shadow.depth);
- glBindTexture(GL_TEXTURE_2D, directional_shadow.depth);
+ if (storage->config.use_rgba_3d_shadows) {
+ //maximum compatibility, renderbuffer and RGBA shadow
+ glGenRenderbuffers(1, &directional_shadow.depth);
+ glBindRenderbuffer(GL_RENDERBUFFER, directional_shadow.depth);
+ glRenderbufferStorage(GL_RENDERBUFFER, storage->config.depth_internalformat, directional_shadow.size, directional_shadow.size);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, directional_shadow.depth);
+
+ glGenTextures(1, &directional_shadow.color);
+ glBindTexture(GL_TEXTURE_2D, directional_shadow.color);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, directional_shadow.size, directional_shadow.size, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, directional_shadow.color, 0);
+ } else {
+ //just a depth buffer
+ glGenTextures(1, &directional_shadow.depth);
+ glBindTexture(GL_TEXTURE_2D, directional_shadow.depth);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, directional_shadow.size, directional_shadow.size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+ glTexImage2D(GL_TEXTURE_2D, 0, storage->config.depth_internalformat, directional_shadow.size, directional_shadow.size, 0, GL_DEPTH_COMPONENT, storage->config.depth_type, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, directional_shadow.depth, 0);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, directional_shadow.depth, 0);
+ }
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
@@ -3224,6 +3357,8 @@ void RasterizerSceneGLES2::initialize() {
}
shadow_filter_mode = SHADOW_FILTER_NEAREST;
+
+ glFrontFace(GL_CW);
}
void RasterizerSceneGLES2::iteration() {
diff --git a/drivers/gles2/rasterizer_scene_gles2.h b/drivers/gles2/rasterizer_scene_gles2.h
index 0d917f4da2..f23e45b52f 100644
--- a/drivers/gles2/rasterizer_scene_gles2.h
+++ b/drivers/gles2/rasterizer_scene_gles2.h
@@ -103,6 +103,7 @@ public:
GLuint sky_verts;
GLuint immediate_buffer;
+ Color default_ambient;
// ResolveShaderGLES3 resolve_shader;
// ScreenSpaceReflectionShaderGLES3 ssr_shader;
@@ -255,6 +256,7 @@ public:
GLuint fbo;
GLuint depth;
+ GLuint color;
Map<RID, uint32_t> shadow_owners;
};
@@ -278,6 +280,7 @@ public:
struct DirectionalShadow {
GLuint fbo;
GLuint depth;
+ GLuint color;
int light_count;
int size;
@@ -310,10 +313,9 @@ public:
int reflection_index;
GLuint fbo[6];
- GLuint cubemap;
+ GLuint color[6];
GLuint depth;
-
- GLuint fbo_blur;
+ GLuint cubemap;
int current_resolution;
mutable bool dirty;
@@ -473,7 +475,7 @@ public:
virtual void light_instance_set_transform(RID p_light_instance, const Transform &p_transform);
virtual void light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform &p_transform, float p_far, float p_split, int p_pass, float p_bias_scale = 1.0);
virtual void light_instance_mark_visible(RID p_light_instance);
- virtual bool light_instances_can_render_shadow_cube() const { return storage->config.support_write_depth; }
+ virtual bool light_instances_can_render_shadow_cube() const { return storage->config.support_shadow_cubemaps; }
LightInstance **render_light_instances;
int render_directional_lights;
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index d00d572ccf..206679dda3 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -44,8 +44,31 @@ GLuint RasterizerStorageGLES2::system_fbo = 0;
#define _EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
#define _EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
+#define _EXT_COMPRESSED_RED_RGTC1_EXT 0x8DBB
+#define _EXT_COMPRESSED_RED_RGTC1 0x8DBB
+#define _EXT_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
+#define _EXT_COMPRESSED_RG_RGTC2 0x8DBD
+#define _EXT_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
+#define _EXT_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
+#define _EXT_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
+#define _EXT_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
#define _EXT_ETC1_RGB8_OES 0x8D64
+#define _EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
+#define _EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
+#define _EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
+#define _EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
+
+#define _EXT_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
+#define _EXT_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
+#define _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
+#define _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
+
+#define _EXT_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
+#define _EXT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
+#define _EXT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
+#define _EXT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
+
#ifdef GLES_OVER_GL
#define _GL_HALF_FLOAT_OES 0x140B
#else
@@ -54,10 +77,10 @@ GLuint RasterizerStorageGLES2::system_fbo = 0;
#define _EXT_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
-#define _DEPTH_COMPONENT24_OES 0x81A6
-
#define _RED_OES 0x1903
+#define _DEPTH_COMPONENT24_OES 0x81A6
+
void RasterizerStorageGLES2::bind_quad_array() const {
glBindBuffer(GL_ARRAY_BUFFER, resources.quadie);
glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, 0);
@@ -67,7 +90,7 @@ void RasterizerStorageGLES2::bind_quad_array() const {
glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
}
-Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed) const {
+Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed, bool p_will_need_resize) const {
r_gl_format = 0;
Ref<Image> image = p_image;
@@ -97,9 +120,13 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
} break;
case Image::FORMAT_RG8: {
-
- ERR_EXPLAIN("RG texture not supported");
- ERR_FAIL_V(image);
+ ERR_PRINT("RG texture not supported, converting to RGB8.");
+ if (image.is_valid())
+ image->convert(Image::FORMAT_RGB8);
+ r_real_format = Image::FORMAT_RGB8;
+ r_gl_internal_format = GL_RGB;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_UNSIGNED_BYTE;
} break;
case Image::FORMAT_RGB8: {
@@ -132,42 +159,57 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
} break;
case Image::FORMAT_RF: {
if (!config.float_texture_supported) {
- ERR_EXPLAIN("R float texture not supported");
- ERR_FAIL_V(image);
+ ERR_PRINT("R float texture not supported, converting to RGB8.");
+ if (image.is_valid())
+ image->convert(Image::FORMAT_RGB8);
+ r_real_format = Image::FORMAT_RGB8;
+ r_gl_internal_format = GL_RGB;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ } else {
+ r_gl_internal_format = GL_ALPHA;
+ r_gl_format = GL_ALPHA;
+ r_gl_type = GL_FLOAT;
}
-
- r_gl_internal_format = GL_ALPHA;
- r_gl_format = GL_ALPHA;
- r_gl_type = GL_FLOAT;
} break;
case Image::FORMAT_RGF: {
- ERR_EXPLAIN("RG float texture not supported");
- ERR_FAIL_V(image);
-
+ ERR_PRINT("RG float texture not supported, converting to RGB8.");
+ if (image.is_valid())
+ image->convert(Image::FORMAT_RGB8);
+ r_real_format = Image::FORMAT_RGB8;
+ r_gl_internal_format = GL_RGB;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_UNSIGNED_BYTE;
} break;
case Image::FORMAT_RGBF: {
if (!config.float_texture_supported) {
-
- ERR_EXPLAIN("RGB float texture not supported");
- ERR_FAIL_V(image);
+ ERR_PRINT("RGB float texture not supported, converting to RGB8.");
+ if (image.is_valid())
+ image->convert(Image::FORMAT_RGB8);
+ r_real_format = Image::FORMAT_RGB8;
+ r_gl_internal_format = GL_RGB;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ } else {
+ r_gl_internal_format = GL_RGB;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_FLOAT;
}
-
- r_gl_internal_format = GL_RGB;
- r_gl_format = GL_RGB;
- r_gl_type = GL_FLOAT;
-
} break;
case Image::FORMAT_RGBAF: {
if (!config.float_texture_supported) {
-
- ERR_EXPLAIN("RGBA float texture not supported");
- ERR_FAIL_V(image);
+ ERR_PRINT("RGBA float texture not supported, converting to RGBA8.");
+ if (image.is_valid())
+ image->convert(Image::FORMAT_RGBA8);
+ r_real_format = Image::FORMAT_RGBA8;
+ r_gl_internal_format = GL_RGBA;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ } else {
+ r_gl_internal_format = GL_RGBA;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_FLOAT;
}
-
- r_gl_internal_format = GL_RGBA;
- r_gl_format = GL_RGBA;
- r_gl_type = GL_FLOAT;
-
} break;
case Image::FORMAT_RH: {
need_decompress = true;
@@ -195,7 +237,7 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
} break;
case Image::FORMAT_DXT1: {
- if (config.s3tc_supported) {
+ if (config.s3tc_supported && !p_will_need_resize) {
r_gl_internal_format = _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
@@ -207,7 +249,7 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
} break;
case Image::FORMAT_DXT3: {
- if (config.s3tc_supported) {
+ if (config.s3tc_supported && !p_will_need_resize) {
r_gl_internal_format = _EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
@@ -219,7 +261,7 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
} break;
case Image::FORMAT_DXT5: {
- if (config.s3tc_supported) {
+ if (config.s3tc_supported && !p_will_need_resize) {
r_gl_internal_format = _EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
@@ -231,45 +273,134 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
} break;
case Image::FORMAT_RGTC_R: {
- need_decompress = true;
+ if (config.rgtc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RED_RGTC1_EXT;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_compressed = true;
+
+ } else {
+
+ need_decompress = true;
+ }
} break;
case Image::FORMAT_RGTC_RG: {
- need_decompress = true;
+ if (config.rgtc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RED_GREEN_RGTC2_EXT;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_compressed = true;
+ } else {
+
+ need_decompress = true;
+ }
} break;
case Image::FORMAT_BPTC_RGBA: {
- need_decompress = true;
+ if (config.bptc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RGBA_BPTC_UNORM;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_compressed = true;
+
+ } else {
+
+ need_decompress = true;
+ }
} break;
case Image::FORMAT_BPTC_RGBF: {
- need_decompress = true;
+ if (config.bptc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_FLOAT;
+ r_compressed = true;
+ } else {
+
+ need_decompress = true;
+ }
} break;
case Image::FORMAT_BPTC_RGBFU: {
+ if (config.bptc_supported) {
- need_decompress = true;
+ r_gl_internal_format = _EXT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT;
+ r_gl_format = GL_RGB;
+ r_gl_type = GL_FLOAT;
+ r_compressed = true;
+ } else {
+
+ need_decompress = true;
+ }
} break;
case Image::FORMAT_PVRTC2: {
- need_decompress = true;
+ if (config.pvrtc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_compressed = true;
+
+ } else {
+
+ need_decompress = true;
+ }
} break;
case Image::FORMAT_PVRTC2A: {
- need_decompress = true;
+ if (config.pvrtc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_compressed = true;
+
+ } else {
+
+ need_decompress = true;
+ }
+
} break;
case Image::FORMAT_PVRTC4: {
- need_decompress = true;
+ if (config.pvrtc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_compressed = true;
+
+ } else {
+
+ need_decompress = true;
+ }
+
} break;
case Image::FORMAT_PVRTC4A: {
- need_decompress = true;
+ if (config.pvrtc_supported) {
+
+ r_gl_internal_format = _EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
+ r_gl_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_compressed = true;
+
+ } else {
+
+ need_decompress = true;
+ }
+
} break;
case Image::FORMAT_ETC: {
- if (config.etc1_supported) {
+ if (config.etc1_supported && !p_will_need_resize) {
r_gl_internal_format = _EXT_ETC1_RGB8_OES;
r_gl_format = GL_RGBA;
r_gl_type = GL_UNSIGNED_BYTE;
@@ -315,17 +446,37 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
if (need_decompress) {
if (!image.is_null()) {
+
image = image->duplicate();
image->decompress();
ERR_FAIL_COND_V(image->is_compressed(), image);
- image->convert(Image::FORMAT_RGBA8);
+ switch (image->get_format()) {
+ case Image::FORMAT_RGB8: {
+ r_gl_format = GL_RGB;
+ r_gl_internal_format = GL_RGB;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_real_format = Image::FORMAT_RGB8;
+ r_compressed = false;
+ } break;
+ case Image::FORMAT_RGBA8: {
+ r_gl_format = GL_RGBA;
+ r_gl_internal_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_real_format = Image::FORMAT_RGBA8;
+ r_compressed = false;
+ } break;
+ default: {
+ image->convert(Image::FORMAT_RGBA8);
+ r_gl_format = GL_RGBA;
+ r_gl_internal_format = GL_RGBA;
+ r_gl_type = GL_UNSIGNED_BYTE;
+ r_real_format = Image::FORMAT_RGBA8;
+ r_compressed = false;
+
+ } break;
+ }
}
- r_gl_format = GL_RGBA;
- r_gl_internal_format = GL_RGBA;
- r_gl_type = GL_UNSIGNED_BYTE;
- r_real_format = Image::FORMAT_RGBA8;
-
return image;
}
@@ -395,11 +546,31 @@ void RasterizerStorageGLES2::texture_allocate(RID p_texture, int p_width, int p_
}
}
- Image::Format real_format;
- _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, format, internal_format, type, compressed);
-
texture->alloc_width = texture->width;
texture->alloc_height = texture->height;
+ texture->resize_to_po2 = false;
+ if (!config.support_npot_repeat_mipmap) {
+ int po2_width = next_power_of_2(p_width);
+ int po2_height = next_power_of_2(p_height);
+
+ bool is_po2 = p_width == po2_width && p_height == po2_height;
+
+ if (!is_po2 && (p_flags & VS::TEXTURE_FLAG_REPEAT || p_flags & VS::TEXTURE_FLAG_MIPMAPS)) {
+
+ if (p_flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING) {
+ //not supported
+ ERR_PRINTS("Streaming texture for non power of 2 or has mipmaps on this hardware: " + texture->path + "'. Mipmaps and repeat disabled.");
+ texture->flags &= ~(VS::TEXTURE_FLAG_REPEAT | VS::TEXTURE_FLAG_MIPMAPS);
+ } else {
+ texture->alloc_height = po2_height;
+ texture->alloc_width = po2_width;
+ texture->resize_to_po2 = true;
+ }
+ }
+ }
+
+ Image::Format real_format;
+ _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, format, internal_format, type, compressed, texture->resize_to_po2);
texture->gl_format_cache = format;
texture->gl_type_cache = type;
@@ -414,7 +585,7 @@ void RasterizerStorageGLES2::texture_allocate(RID p_texture, int p_width, int p_
if (p_flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING) {
//prealloc if video
- glTexImage2D(texture->target, 0, internal_format, p_width, p_height, 0, format, type, NULL);
+ glTexImage2D(texture->target, 0, internal_format, texture->alloc_width, texture->alloc_height, 0, format, type, NULL);
}
texture->active = true;
@@ -439,7 +610,18 @@ void RasterizerStorageGLES2::texture_set_data(RID p_texture, const Ref<Image> &p
}
Image::Format real_format;
- Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), texture->flags, real_format, format, internal_format, type, compressed);
+ Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), texture->flags, real_format, format, internal_format, type, compressed, texture->resize_to_po2);
+
+ if (texture->resize_to_po2) {
+ if (p_image->is_compressed()) {
+ ERR_PRINTS("Texture '" + texture->path + "' was required to be a power of 2 (because it uses either mipmaps or repeat), so it was decompressed. This will hurt performance and memory usage.");
+ }
+
+ if (img == p_image) {
+ img = img->duplicate();
+ }
+ img->resize_to_po2(false);
+ }
if (config.shrink_textures_x2 && (p_image->has_mipmaps() || !p_image->is_compressed()) && !(texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING)) {
@@ -575,7 +757,7 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer)
GLenum gl_internal_format;
GLenum gl_type;
bool compressed;
- _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed);
+ _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed, false);
PoolVector<uint8_t> data;
@@ -620,7 +802,7 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer)
GLenum gl_internal_format;
GLenum gl_type;
bool compressed;
- _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed);
+ _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, real_format, gl_format, gl_internal_format, gl_type, compressed, texture->resize_to_po2);
PoolVector<uint8_t> data;
@@ -974,17 +1156,7 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
glGenTextures(1, &sky->radiance);
glBindTexture(GL_TEXTURE_CUBE_MAP, sky->radiance);
- // Now we create a new framebuffer. The new cubemap images will be used as
- // attachements for it, so we can fill them by issuing draw calls.
- GLuint tmp_fb;
-
- int size = p_radiance_size / 4; //divide by four because its a cubemap (this is an approximation because GLES3 uses a dual paraboloid)
-
- int lod = 0;
-
- int mipmaps = 6;
-
- int mm_level = mipmaps;
+ int size = p_radiance_size / 2; //divide by two because its a cubemap (this is an approximation because GLES3 uses a dual paraboloid)
GLenum internal_format = GL_RGB;
GLenum format = GL_RGB;
@@ -998,6 +1170,12 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
}
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
+ //no filters for now
+ glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
#else
while (size >= 1) {
@@ -1011,34 +1189,52 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
}
#endif
//framebuffer
- glGenFramebuffers(1, &tmp_fb);
- glBindFramebuffer(GL_FRAMEBUFFER, tmp_fb);
- shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_SOURCE_PANORAMA, texture->target == GL_TEXTURE_2D);
+ glBindFramebuffer(GL_FRAMEBUFFER, resources.mipmap_blur_fbo);
+ int mipmaps = 6;
+ int lod = 0;
+ int mm_level = mipmaps;
+ size = p_radiance_size / 2;
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_SOURCE_PANORAMA, true);
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_DIRECT_WRITE, true);
shaders.cubemap_filter.bind();
- lod = 0;
- mm_level = mipmaps;
- size = p_radiance_size;
-
- // now render to the framebuffer, mipmap level for mipmap level
+ // third, render to the framebuffer using separate textures, then copy to mipmaps
while (size >= 1) {
- for (int i = 0; i < 6; i++) {
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], sky->radiance, lod);
+ //make framebuffer size the texture size, need to use a separate texture for compatibility
+ glActiveTexture(GL_TEXTURE3);
+ glBindTexture(GL_TEXTURE_2D, resources.mipmap_blur_color);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, size, size, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, resources.mipmap_blur_color, 0);
+
+ if (lod == 1) {
+ //bind panorama for smaller lods
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, sky->radiance);
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_SOURCE_PANORAMA, false);
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_DIRECT_WRITE, false);
+ shaders.cubemap_filter.bind();
+ }
+ glViewport(0, 0, size, size);
+ bind_quad_array();
- glViewport(0, 0, size, size);
+ glActiveTexture(GL_TEXTURE2); //back to panorama
- bind_quad_array();
+ for (int i = 0; i < 6; i++) {
shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES2::FACE_ID, i);
- float roughness = mm_level ? lod / (float)(mipmaps - 1) : 1;
+ float roughness = mm_level >= 0 ? lod / (float)(mipmaps - 1) : 1;
roughness = MIN(1.0, roughness); //keep max at 1
shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES2::ROUGHNESS, roughness);
+ shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES2::Z_FLIP, false);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+
+ glCopyTexSubImage2D(_cube_side_enum[i], lod, 0, 0, 0, 0, size, size);
}
size >>= 1;
@@ -1048,16 +1244,28 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
lod++;
}
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_SOURCE_PANORAMA, false);
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_DIRECT_WRITE, false);
+
// restore ranges
+ glActiveTexture(GL_TEXTURE2); //back to panorama
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glActiveTexture(GL_TEXTURE3); //back to panorama
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glActiveTexture(GL_TEXTURE1);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
// Framebuffer did its job. thank mr framebuffer
+ glActiveTexture(GL_TEXTURE0); //back to panorama
glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo);
- glDeleteFramebuffers(1, &tmp_fb);
}
/* SHADER API */
@@ -1147,8 +1355,6 @@ void RasterizerStorageGLES2::_update_shader(Shader *p_shader) const {
switch (p_shader->mode) {
- // TODO
-
case VS::SHADER_CANVAS_ITEM: {
p_shader->canvas_item.light_mode = Shader::CanvasItem::LIGHT_MODE_NORMAL;
@@ -1230,6 +1436,14 @@ void RasterizerStorageGLES2::_update_shader(Shader *p_shader) const {
actions = &shaders.actions_scene;
actions->uniforms = &p_shader->uniforms;
+
+ if (p_shader->spatial.uses_screen_texture && p_shader->spatial.uses_depth_texture) {
+ ERR_PRINT_ONCE("Using both SCREEN_TEXTURE and DEPTH_TEXTURE is not supported in GLES2");
+ }
+
+ if (p_shader->spatial.uses_depth_texture && !config.support_depth_texture) {
+ ERR_PRINT_ONCE("Using DEPTH_TEXTURE is not permitted on this hardware, operation will fail.");
+ }
} break;
default: {
@@ -2174,14 +2388,19 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
surface->aabb = p_aabb;
surface->max_bone = p_bone_aabbs.size();
-
+#ifdef TOOLS_ENABLED
+ surface->blend_shape_data = p_blend_shapes;
+ if (surface->blend_shape_data.size()) {
+ ERR_PRINT_ONCE("Blend shapes are not supported in OpenGL ES 2.0");
+ }
surface->data = array;
surface->index_data = p_index_array;
+#endif
surface->total_data_size += surface->array_byte_size + surface->index_array_byte_size;
for (int i = 0; i < surface->skeleton_bone_used.size(); i++) {
- surface->skeleton_bone_used.write[i] = surface->skeleton_bone_aabb[i].size.x < 0 || surface->skeleton_bone_aabb[i].size.y < 0 || surface->skeleton_bone_aabb[i].size.z < 0;
+ surface->skeleton_bone_used.write[i] = !(surface->skeleton_bone_aabb[i].size.x < 0 || surface->skeleton_bone_aabb[i].size.y < 0 || surface->skeleton_bone_aabb[i].size.z < 0);
}
for (int i = 0; i < VS::ARRAY_MAX; i++) {
@@ -2205,6 +2424,8 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, index_array_size, ir.ptr(), GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+ } else {
+ surface->index_id = 0;
}
// TODO generate wireframes
@@ -2231,7 +2452,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
}
mesh->surfaces.push_back(surface);
- mesh->instance_change_notify(true, false);
+ mesh->instance_change_notify(true, true);
info.vertex_mem += surface->total_data_size;
}
@@ -2244,12 +2465,12 @@ void RasterizerStorageGLES2::mesh_set_blend_shape_count(RID p_mesh, int p_amount
ERR_FAIL_COND(p_amount < 0);
mesh->blend_shape_count = p_amount;
+ mesh->instance_change_notify(true, false);
}
int RasterizerStorageGLES2::mesh_get_blend_shape_count(RID p_mesh) const {
const Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND_V(!mesh, 0);
-
return mesh->blend_shape_count;
}
@@ -2335,7 +2556,9 @@ PoolVector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, i
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), PoolVector<uint8_t>());
Surface *surface = mesh->surfaces[p_surface];
-
+#ifndef TOOLS_ENABLED
+ ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
+#endif
return surface->data;
}
@@ -2375,8 +2598,14 @@ AABB RasterizerStorageGLES2::mesh_surface_get_aabb(RID p_mesh, int p_surface) co
}
Vector<PoolVector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
- WARN_PRINT("GLES2 mesh_surface_get_blend_shapes is not implemented");
- return Vector<PoolVector<uint8_t> >();
+ const Mesh *mesh = mesh_owner.getornull(p_mesh);
+ ERR_FAIL_COND_V(!mesh, Vector<PoolVector<uint8_t> >());
+ ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<PoolVector<uint8_t> >());
+#ifndef TOOLS_ENABLED
+ ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
+#endif
+
+ return mesh->surfaces[p_surface]->blend_shape_data;
}
Vector<AABB> RasterizerStorageGLES2::mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const {
const Mesh *mesh = mesh_owner.getornull(p_mesh);
@@ -2395,7 +2624,7 @@ void RasterizerStorageGLES2::mesh_remove_surface(RID p_mesh, int p_surface) {
Surface *surface = mesh->surfaces[p_surface];
if (surface->material.is_valid()) {
- // TODO _material_remove_geometry(surface->material, mesh->surfaces[p_surface]);
+ _material_remove_geometry(surface->material, mesh->surfaces[p_surface]);
}
glDeleteBuffers(1, &surface->vertex_id);
@@ -2443,16 +2672,110 @@ AABB RasterizerStorageGLES2::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
if (mesh->custom_aabb != AABB())
return mesh->custom_aabb;
- // TODO handle skeletons
+ Skeleton *sk = NULL;
+ if (p_skeleton.is_valid()) {
+ sk = skeleton_owner.get(p_skeleton);
+ }
AABB aabb;
- if (mesh->surfaces.size() >= 1) {
- aabb = mesh->surfaces[0]->aabb;
- }
+ if (sk && sk->size != 0) {
+
+ for (int i = 0; i < mesh->surfaces.size(); i++) {
+
+ AABB laabb;
+ if ((mesh->surfaces[i]->format & VS::ARRAY_FORMAT_BONES) && mesh->surfaces[i]->skeleton_bone_aabb.size()) {
+
+ int bs = mesh->surfaces[i]->skeleton_bone_aabb.size();
+ const AABB *skbones = mesh->surfaces[i]->skeleton_bone_aabb.ptr();
+ const bool *skused = mesh->surfaces[i]->skeleton_bone_used.ptr();
+
+ int sbs = sk->size;
+ ERR_CONTINUE(bs > sbs);
+ const float *texture = sk->bone_data.ptr();
+
+ bool first = true;
+ if (sk->use_2d) {
+ for (int j = 0; j < bs; j++) {
+
+ if (!skused[j])
+ continue;
+
+ int base_ofs = j * 2 * 4;
+
+ Transform mtx;
+
+ mtx.basis[0].x = texture[base_ofs + 0];
+ mtx.basis[0].y = texture[base_ofs + 1];
+ mtx.origin.x = texture[base_ofs + 3];
+ base_ofs += 4;
+ mtx.basis[1].x = texture[base_ofs + 0];
+ mtx.basis[1].y = texture[base_ofs + 1];
+ mtx.origin.y = texture[base_ofs + 3];
- for (int i = 0; i < mesh->surfaces.size(); i++) {
- aabb.merge_with(mesh->surfaces[i]->aabb);
+ AABB baabb = mtx.xform(skbones[j]);
+
+ if (first) {
+ laabb = baabb;
+ first = false;
+ } else {
+ laabb.merge_with(baabb);
+ }
+ }
+ } else {
+ for (int j = 0; j < bs; j++) {
+
+ if (!skused[j])
+ continue;
+
+ int base_ofs = j * 3 * 4;
+
+ Transform mtx;
+
+ mtx.basis[0].x = texture[base_ofs + 0];
+ mtx.basis[0].y = texture[base_ofs + 1];
+ mtx.basis[0].z = texture[base_ofs + 2];
+ mtx.origin.x = texture[base_ofs + 3];
+ base_ofs += 4;
+ mtx.basis[1].x = texture[base_ofs + 0];
+ mtx.basis[1].y = texture[base_ofs + 1];
+ mtx.basis[1].z = texture[base_ofs + 2];
+ mtx.origin.y = texture[base_ofs + 3];
+ base_ofs += 4;
+ mtx.basis[2].x = texture[base_ofs + 0];
+ mtx.basis[2].y = texture[base_ofs + 1];
+ mtx.basis[2].z = texture[base_ofs + 2];
+ mtx.origin.z = texture[base_ofs + 3];
+
+ AABB baabb = mtx.xform(skbones[j]);
+ if (first) {
+ laabb = baabb;
+ first = false;
+ } else {
+ laabb.merge_with(baabb);
+ }
+ }
+ }
+
+ } else {
+
+ laabb = mesh->surfaces[i]->aabb;
+ }
+
+ if (i == 0)
+ aabb = laabb;
+ else
+ aabb.merge_with(laabb);
+ }
+ } else {
+
+ for (int i = 0; i < mesh->surfaces.size(); i++) {
+
+ if (i == 0)
+ aabb = mesh->surfaces[i]->aabb;
+ else
+ aabb.merge_with(mesh->surfaces[i]->aabb);
+ }
}
return aabb;
@@ -3146,7 +3469,6 @@ void RasterizerStorageGLES2::skeleton_allocate(RID p_skeleton, int p_bones, bool
skeleton->size = p_bones;
skeleton->use_2d = p_2d_skeleton;
- // TODO use float texture for vertex shader
if (config.float_texture_supported) {
glGenTextures(1, &skeleton->tex_id);
@@ -3297,6 +3619,23 @@ void RasterizerStorageGLES2::skeleton_set_base_transform_2d(RID p_skeleton, cons
skeleton->base_transform_2d = p_base_transform;
}
+void RasterizerStorageGLES2::skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform) {
+
+ Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+
+ ERR_FAIL_COND(skeleton->use_2d);
+
+ skeleton->world_transform = p_world_transform;
+ skeleton->use_world_transform = p_enable;
+ if (p_enable) {
+ skeleton->world_transform_inverse = skeleton->world_transform.affine_inverse();
+ }
+
+ if (!skeleton->update_list.in_list()) {
+ skeleton_update_list.add(&skeleton->update_list);
+ }
+}
+
void RasterizerStorageGLES2::_update_skeleton_transform_buffer(const PoolVector<float> &p_data, size_t p_size) {
glBindBuffer(GL_ARRAY_BUFFER, resources.skeleton_transform_buffer);
@@ -3599,6 +3938,7 @@ RID RasterizerStorageGLES2::reflection_probe_create() {
reflection_probe->intensity = 1.0;
reflection_probe->interior_ambient = Color();
reflection_probe->interior_ambient_energy = 1.0;
+ reflection_probe->interior_ambient_probe_contrib = 0.0;
reflection_probe->max_distance = 0;
reflection_probe->extents = Vector3(1, 1, 1);
reflection_probe->origin_offset = Vector3(0, 0, 0);
@@ -3684,6 +4024,7 @@ void RasterizerStorageGLES2::reflection_probe_set_as_interior(RID p_probe, bool
ERR_FAIL_COND(!reflection_probe);
reflection_probe->interior = p_enable;
+ reflection_probe->instance_change_notify(true, false);
}
void RasterizerStorageGLES2::reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) {
@@ -4200,7 +4541,12 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
glGenTextures(1, &rt->color);
glBindTexture(GL_TEXTURE_2D, rt->color);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, rt->width, rt->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+
+ if (rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, rt->width, rt->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ } else {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, rt->width, rt->height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
+ }
if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
@@ -4218,21 +4564,36 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
// depth
- glGenRenderbuffers(1, &rt->depth);
- glBindRenderbuffer(GL_RENDERBUFFER, rt->depth);
-#ifdef JAVASCRIPT_ENABLED
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, rt->width, rt->height);
-#else
- glRenderbufferStorage(GL_RENDERBUFFER, _DEPTH_COMPONENT24_OES, rt->width, rt->height);
-#endif
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rt->depth);
+ if (config.support_depth_texture) {
+ glGenTextures(1, &rt->depth);
+ glBindTexture(GL_TEXTURE_2D, rt->depth);
+ glTexImage2D(GL_TEXTURE_2D, 0, config.depth_internalformat, rt->width, rt->height, 0, GL_DEPTH_COMPONENT, config.depth_type, NULL);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, rt->depth, 0);
+ } else {
+ glGenRenderbuffers(1, &rt->depth);
+ glBindRenderbuffer(GL_RENDERBUFFER, rt->depth);
+
+ glRenderbufferStorage(GL_RENDERBUFFER, config.depth_internalformat, rt->width, rt->height);
+
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rt->depth);
+ }
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
- glDeleteRenderbuffers(1, &rt->fbo);
- glDeleteTextures(1, &rt->depth);
+ glDeleteFramebuffers(1, &rt->fbo);
+ if (config.support_depth_texture) {
+ glDeleteTextures(1, &rt->depth);
+ } else {
+ glDeleteRenderbuffers(1, &rt->depth);
+ }
glDeleteTextures(1, &rt->color);
rt->fbo = 0;
rt->width = 0;
@@ -4264,13 +4625,15 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
// copy texscreen buffers
if (!(rt->flags[RasterizerStorage::RENDER_TARGET_NO_SAMPLING])) {
- int w = rt->width;
- int h = rt->height;
-
glGenTextures(1, &rt->copy_screen_effect.color);
glBindTexture(GL_TEXTURE_2D, rt->copy_screen_effect.color);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ if (rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, rt->width, rt->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ } else {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, rt->width, rt->height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
+ }
+
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -4283,7 +4646,7 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+ status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
_render_target_clear(rt);
ERR_FAIL_COND(status != GL_FRAMEBUFFER_COMPLETE);
@@ -4302,7 +4665,12 @@ void RasterizerStorageGLES2::_render_target_clear(RenderTarget *rt) {
}
if (rt->depth) {
- glDeleteRenderbuffers(1, &rt->depth);
+ if (config.support_depth_texture) {
+ glDeleteTextures(1, &rt->depth);
+ } else {
+ glDeleteRenderbuffers(1, &rt->depth);
+ }
+
rt->depth = 0;
}
@@ -4313,7 +4681,6 @@ void RasterizerStorageGLES2::_render_target_clear(RenderTarget *rt) {
tex->height = 0;
tex->active = false;
- // TODO hardcoded texscreen copy effect
if (rt->copy_screen_effect.color) {
glDeleteFramebuffers(1, &rt->copy_screen_effect.fbo);
rt->copy_screen_effect.fbo = 0;
@@ -4385,6 +4752,7 @@ void RasterizerStorageGLES2::render_target_set_flag(RID p_render_target, RenderT
rt->flags[p_flag] = p_value;
switch (p_flag) {
+ case RENDER_TARGET_TRANSPARENT:
case RENDER_TARGET_HDR:
case RENDER_TARGET_NO_3D:
case RENDER_TARGET_NO_SAMPLING:
@@ -4443,13 +4811,8 @@ RID RasterizerStorageGLES2::canvas_light_shadow_buffer_create(int p_width) {
glGenRenderbuffers(1, &cls->depth);
glBindRenderbuffer(GL_RENDERBUFFER, cls->depth);
-#ifdef JAVASCRIPT_ENABLED
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, cls->size, cls->height);
-#else
- glRenderbufferStorage(GL_RENDERBUFFER, _DEPTH_COMPONENT24_OES, cls->size, cls->height);
-#endif
+ glRenderbufferStorage(GL_RENDERBUFFER, config.depth_internalformat, cls->size, cls->height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, cls->depth);
- glBindRenderbuffer(GL_RENDERBUFFER, 0);
glGenTextures(1, &cls->distance);
glBindTexture(GL_TEXTURE_2D, cls->distance);
@@ -4827,6 +5190,9 @@ bool RasterizerStorageGLES2::free(RID p_rid) {
bool RasterizerStorageGLES2::has_os_feature(const String &p_feature) const {
+ if (p_feature == "pvrtc")
+ return config.pvrtc_supported;
+
if (p_feature == "s3tc")
return config.s3tc_supported;
@@ -4876,16 +5242,30 @@ void RasterizerStorageGLES2::initialize() {
#ifdef GLES_OVER_GL
config.float_texture_supported = true;
config.s3tc_supported = true;
+ config.pvrtc_supported = false;
config.etc1_supported = false;
+ config.support_npot_repeat_mipmap = true;
+ config.depth_internalformat = GL_DEPTH_COMPONENT;
+ config.depth_type = GL_UNSIGNED_INT;
+
#else
config.float_texture_supported = config.extensions.has("GL_ARB_texture_float") || config.extensions.has("GL_OES_texture_float");
config.s3tc_supported = config.extensions.has("GL_EXT_texture_compression_s3tc") || config.extensions.has("WEBGL_compressed_texture_s3tc");
config.etc1_supported = config.extensions.has("GL_OES_compressed_ETC1_RGB8_texture") || config.extensions.has("WEBGL_compressed_texture_etc1");
+ config.pvrtc_supported = config.extensions.has("IMG_texture_compression_pvrtc");
+ config.support_npot_repeat_mipmap = config.extensions.has("GL_OES_texture_npot");
+
#endif
#ifdef GLES_OVER_GL
config.use_rgba_2d_shadows = false;
+ config.support_depth_texture = true;
+ config.use_rgba_3d_shadows = false;
+ config.support_depth_cubemaps = true;
#else
config.use_rgba_2d_shadows = !(config.float_texture_supported && config.extensions.has("GL_EXT_texture_rg"));
+ config.support_depth_texture = config.extensions.has("GL_OES_depth_texture");
+ config.use_rgba_3d_shadows = !config.support_depth_texture;
+ config.support_depth_cubemaps = config.extensions.has("GL_OES_depth_texture_cube_map");
#endif
#ifdef GLES_OVER_GL
@@ -4896,6 +5276,8 @@ void RasterizerStorageGLES2::initialize() {
#ifdef GLES_OVER_GL
config.support_write_depth = true;
+#elif defined(JAVASCRIPT_ENABLED)
+ config.support_write_depth = false;
#else
config.support_write_depth = config.extensions.has("GL_EXT_frag_depth");
#endif
@@ -4907,6 +5289,58 @@ void RasterizerStorageGLES2::initialize() {
config.support_half_float_vertices = true;
#endif
+ config.rgtc_supported = config.extensions.has("GL_EXT_texture_compression_rgtc") || config.extensions.has("GL_ARB_texture_compression_rgtc") || config.extensions.has("EXT_texture_compression_rgtc");
+ config.bptc_supported = config.extensions.has("GL_ARB_texture_compression_bptc");
+
+ //determine formats for depth textures (or renderbuffers)
+ if (config.support_depth_texture) {
+ // Will use texture for depth
+ // have to manually see if we can create a valid framebuffer texture using UNSIGNED_INT,
+ // as there is no extension to test for this.
+ GLuint fbo;
+ glGenFramebuffers(1, &fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+ GLuint depth;
+ glGenTextures(1, &depth);
+ glBindTexture(GL_TEXTURE_2D, depth);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 32, 32, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depth, 0);
+
+ GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+
+ if (status == GL_FRAMEBUFFER_COMPLETE) {
+ config.depth_internalformat = GL_DEPTH_COMPONENT;
+ config.depth_type = GL_UNSIGNED_INT;
+ } else {
+ config.depth_internalformat = GL_DEPTH_COMPONENT16;
+ config.depth_type = GL_UNSIGNED_SHORT;
+ }
+
+ glBindFramebuffer(GL_FRAMEBUFFER, system_fbo);
+ glDeleteFramebuffers(1, &fbo);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glDeleteTextures(1, &depth);
+
+ } else {
+ // Will use renderbuffer for depth
+ if (config.extensions.has("GL_OES_depth24")) {
+ config.depth_internalformat = _DEPTH_COMPONENT24_OES;
+ config.depth_type = GL_UNSIGNED_INT;
+ } else {
+ config.depth_internalformat = GL_DEPTH_COMPONENT16;
+ config.depth_type = GL_UNSIGNED_SHORT;
+ }
+ }
+
+ //picky requirements for these
+ config.support_shadow_cubemaps = config.support_depth_texture && config.support_write_depth && config.support_depth_cubemaps;
+
frame.count = 0;
frame.delta = 0;
frame.current_rt = NULL;
@@ -4917,7 +5351,7 @@ void RasterizerStorageGLES2::initialize() {
shaders.copy.init();
shaders.cubemap_filter.init();
- bool ggx_hq = GLOBAL_GET("rendering/quality/reflections/high_quality_ggx.mobile");
+ bool ggx_hq = GLOBAL_GET("rendering/quality/reflections/high_quality_ggx");
shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::LOW_QUALITY, !ggx_hq);
{
@@ -5037,14 +5471,26 @@ void RasterizerStorageGLES2::initialize() {
}
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 512, 1, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, radical_inverse);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); //need this for proper sampling
glBindTexture(GL_TEXTURE_2D, 0);
}
+ {
+
+ glGenFramebuffers(1, &resources.mipmap_blur_fbo);
+ glGenTextures(1, &resources.mipmap_blur_color);
+ }
+
#ifdef GLES_OVER_GL
//this needs to be enabled manually in OpenGL 2.1
- glEnable(_EXT_TEXTURE_CUBE_MAP_SEAMLESS);
+ if (config.extensions.has("GL_ARB_seamless_cube_map")) {
+ glEnable(_EXT_TEXTURE_CUBE_MAP_SEAMLESS);
+ }
glEnable(GL_POINT_SPRITE);
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
#endif
diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h
index ba48ddd185..361f304a17 100644
--- a/drivers/gles2/rasterizer_storage_gles2.h
+++ b/drivers/gles2/rasterizer_storage_gles2.h
@@ -31,7 +31,7 @@
#ifndef RASTERIZERSTORAGEGLES2_H
#define RASTERIZERSTORAGEGLES2_H
-#include "core/dvector.h"
+#include "core/pool_vector.h"
#include "core/self_list.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual/shader_language.h"
@@ -72,16 +72,29 @@ public:
bool float_texture_supported;
bool s3tc_supported;
bool etc1_supported;
+ bool pvrtc_supported;
+ bool rgtc_supported;
+ bool bptc_supported;
bool keep_original_textures;
bool force_vertex_shading;
bool use_rgba_2d_shadows;
+ bool use_rgba_3d_shadows;
bool support_32_bits_indices;
bool support_write_depth;
bool support_half_float_vertices;
+ bool support_npot_repeat_mipmap;
+ bool support_depth_texture;
+ bool support_depth_cubemaps;
+
+ bool support_shadow_cubemaps;
+
+ GLuint depth_internalformat;
+ GLuint depth_type;
+
} config;
struct Resources {
@@ -91,6 +104,9 @@ public:
GLuint normal_tex;
GLuint aniso_tex;
+ GLuint mipmap_blur_fbo;
+ GLuint mipmap_blur_color;
+
GLuint radical_inverse_vdc_cache_tex;
bool use_rgba_2d_shadows;
@@ -240,6 +256,8 @@ public:
int mipmaps;
+ bool resize_to_po2;
+
bool active;
GLenum tex_id;
@@ -275,6 +293,7 @@ public:
ignore_mipmaps(false),
compressed(false),
mipmaps(0),
+ resize_to_po2(false),
active(false),
tex_id(0),
stored_cube_sides(0),
@@ -313,7 +332,7 @@ public:
mutable RID_Owner<Texture> texture_owner;
- Ref<Image> _get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed) const;
+ Ref<Image> _get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, Image::Format &r_real_format, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed, bool p_will_need_resize) const;
virtual RID texture_create();
virtual void texture_allocate(RID p_texture, int p_width, int p_height, int p_depth_3d, Image::Format p_format, VS::TextureType p_type, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT);
@@ -619,6 +638,7 @@ public:
PoolVector<uint8_t> data;
PoolVector<uint8_t> index_data;
+ Vector<PoolVector<uint8_t> > blend_shape_data;
int total_data_size;
@@ -845,12 +865,16 @@ public:
Set<RasterizerScene::InstanceBase *> instances;
Transform2D base_transform_2d;
+ Transform world_transform;
+ Transform world_transform_inverse;
+ bool use_world_transform;
Skeleton() :
use_2d(false),
size(0),
tex_id(0),
- update_list(this) {
+ update_list(this),
+ use_world_transform(false) {
}
};
@@ -868,6 +892,7 @@ public:
virtual void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform);
virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const;
virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform);
+ virtual void skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform);
void _update_skeleton_transform_buffer(const PoolVector<float> &p_data, size_t p_size);
diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp
index fa1242ceed..d00b03fb8a 100644
--- a/drivers/gles2/shader_compiler_gles2.cpp
+++ b/drivers/gles2/shader_compiler_gles2.cpp
@@ -81,7 +81,7 @@ static String _opstr(SL::Operator p_op) {
static String _mkid(const String &p_id) {
String id = "m_" + p_id;
- return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
+ return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
}
static String f2sp0(float p_float) {
@@ -318,7 +318,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener
uniform_code += "uniform ";
- uniform_code += _prestr(E->get().precission);
+ uniform_code += _prestr(E->get().precision);
uniform_code += _typestr(E->get().type);
uniform_code += " ";
uniform_code += _mkid(E->key());
@@ -344,7 +344,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener
StringBuffer<> varying_code;
varying_code += "varying ";
- varying_code += _prestr(E->get().precission);
+ varying_code += _prestr(E->get().precision);
varying_code += _typestr(E->get().type);
varying_code += " ";
varying_code += _mkid(E->key());
@@ -770,7 +770,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
/** CANVAS ITEM SHADER **/
actions[VS::SHADER_CANVAS_ITEM].renames["VERTEX"] = "outvec.xy";
- actions[VS::SHADER_CANVAS_ITEM].renames["UV"] = "uv_interp";
+ actions[VS::SHADER_CANVAS_ITEM].renames["UV"] = "uv";
actions[VS::SHADER_CANVAS_ITEM].renames["POINT_SIZE"] = "gl_PointSize";
actions[VS::SHADER_CANVAS_ITEM].renames["WORLD_MATRIX"] = "modelview_matrix";
@@ -859,7 +859,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
actions[VS::SHADER_SPATIAL].renames["INSTANCE_CUSTOM"] = "instance_custom";
actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"] = "screen_uv";
actions[VS::SHADER_SPATIAL].renames["SCREEN_TEXTURE"] = "screen_texture";
- actions[VS::SHADER_SPATIAL].renames["DEPTH_TEXTURE"] = "depth_buffer";
+ actions[VS::SHADER_SPATIAL].renames["DEPTH_TEXTURE"] = "depth_texture";
// Defined in GLES3, but not available in GLES2
//actions[VS::SHADER_SPATIAL].renames["DEPTH"] = "gl_FragDepth";
actions[VS::SHADER_SPATIAL].renames["ALPHA_SCISSOR"] = "alpha_scissor";
@@ -895,6 +895,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
actions[VS::SHADER_SPATIAL].usage_defines["SSS_STRENGTH"] = "#define ENABLE_SSS\n";
actions[VS::SHADER_SPATIAL].usage_defines["TRANSMISSION"] = "#define TRANSMISSION_USED\n";
actions[VS::SHADER_SPATIAL].usage_defines["SCREEN_TEXTURE"] = "#define SCREEN_TEXTURE_USED\n";
+ actions[VS::SHADER_SPATIAL].usage_defines["DEPTH_TEXTURE"] = "#define DEPTH_TEXTURE_USED\n";
actions[VS::SHADER_SPATIAL].usage_defines["SCREEN_UV"] = "#define SCREEN_UV_USED\n";
actions[VS::SHADER_SPATIAL].usage_defines["DIFFUSE_LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n";
diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp
index 5e259a01f0..df7b170bf4 100644
--- a/drivers/gles2/shader_gles2.cpp
+++ b/drivers/gles2/shader_gles2.cpp
@@ -69,51 +69,6 @@ ShaderGLES2 *ShaderGLES2::active = NULL;
#endif
-void ShaderGLES2::bind_uniforms() {
- if (!uniforms_dirty)
- return;
-
- // regular uniforms
-
- const Map<uint32_t, Variant>::Element *E = uniform_defaults.front();
-
- while (E) {
- int idx = E->key();
- int location = version->uniform_location[idx];
-
- if (location < 0) {
- E = E->next();
- continue;
- }
-
- Variant v;
-
- v = E->value();
-
- _set_uniform_variant(location, v);
- E = E->next();
- }
-
- // camera uniforms
-
- const Map<uint32_t, CameraMatrix>::Element *C = uniform_cameras.front();
-
- while (C) {
- int idx = C->key();
- int location = version->uniform_location[idx];
-
- if (location < 0) {
- C = C->next();
- continue;
- }
-
- glUniformMatrix4fv(location, 1, GL_FALSE, &(C->get().matrix[0][0]));
- C = C->next();
- }
-
- uniforms_dirty = false;
-}
-
GLint ShaderGLES2::get_uniform_location(int p_index) const {
ERR_FAIL_COND_V(!version, -1);
@@ -139,28 +94,6 @@ bool ShaderGLES2::bind() {
glUseProgram(version->id);
- // find out uniform names and locations
-
- int count;
- glGetProgramiv(version->id, GL_ACTIVE_UNIFORMS, &count);
- version->uniform_names.resize(count);
-
- for (int i = 0; i < count; i++) {
- GLchar uniform_name[1024];
- int len = 0;
- GLint size = 0;
- GLenum type;
-
- glGetActiveUniform(version->id, i, 1024, &len, &size, &type, uniform_name);
-
- uniform_name[len] = '\0';
- String name = String((const char *)uniform_name);
-
- version->uniform_names.write[i] = name;
- }
-
- bind_uniforms();
-
DEBUG_TEST_ERROR("use program");
active = this;
@@ -199,7 +132,7 @@ static void _display_error_with_code(const String &p_error, const Vector<const c
static String _mkid(const String &p_id) {
String id = "m_" + p_id;
- return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
+ return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
}
ShaderGLES2::Version *ShaderGLES2::get_current_version() {
@@ -513,6 +446,7 @@ ShaderGLES2::Version *ShaderGLES2::get_current_version() {
String native_uniform_name = _mkid(cc->texture_uniforms[i]);
GLint location = glGetUniformLocation(v.id, (native_uniform_name).ascii().get_data());
v.custom_uniform_locations[cc->texture_uniforms[i]] = location;
+ glUniform1i(location, i);
}
}
@@ -732,340 +666,434 @@ void ShaderGLES2::use_material(void *p_material) {
if (E->get().texture_order >= 0)
continue; // this is a texture, doesn't go here
- Map<StringName, Variant>::Element *V = material->params.find(E->key());
+ Map<StringName, GLint>::Element *L = v->custom_uniform_locations.find(E->key());
+ if (!L || L->get() < 0)
+ continue; //uniform not valid
- Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value> > value;
+ GLuint location = L->get();
- value.first = E->get().type;
- value.second = E->get().default_value;
+ Map<StringName, Variant>::Element *V = material->params.find(E->key());
if (V) {
- value.second = Vector<ShaderLanguage::ConstantNode::Value>();
- value.second.resize(E->get().default_value.size());
switch (E->get().type) {
case ShaderLanguage::TYPE_BOOL: {
- if (value.second.size() < 1)
- value.second.resize(1);
- value.second.write[0].boolean = V->get();
+
+ bool boolean = V->get();
+ glUniform1i(location, boolean ? 1 : 0);
} break;
case ShaderLanguage::TYPE_BVEC2: {
- if (value.second.size() < 2)
- value.second.resize(2);
int flags = V->get();
- value.second.write[0].boolean = flags & 1;
- value.second.write[1].boolean = flags & 2;
+ glUniform2i(location, (flags & 1) ? 1 : 0, (flags & 2) ? 1 : 0);
} break;
case ShaderLanguage::TYPE_BVEC3: {
- if (value.second.size() < 3)
- value.second.resize(3);
+
int flags = V->get();
- value.second.write[0].boolean = flags & 1;
- value.second.write[1].boolean = flags & 2;
- value.second.write[2].boolean = flags & 4;
+ glUniform3i(location, (flags & 1) ? 1 : 0, (flags & 2) ? 1 : 0, (flags & 4) ? 1 : 0);
} break;
case ShaderLanguage::TYPE_BVEC4: {
- if (value.second.size() < 4)
- value.second.resize(4);
int flags = V->get();
- value.second.write[0].boolean = flags & 1;
- value.second.write[1].boolean = flags & 2;
- value.second.write[2].boolean = flags & 4;
- value.second.write[3].boolean = flags & 8;
+ glUniform4i(location, (flags & 1) ? 1 : 0, (flags & 2) ? 1 : 0, (flags & 4) ? 1 : 0, (flags & 8) ? 1 : 0);
} break;
- case ShaderLanguage::TYPE_INT: {
- if (value.second.size() < 1)
- value.second.resize(1);
- int val = V->get();
- value.second.write[0].sint = val;
+ case ShaderLanguage::TYPE_INT:
+ case ShaderLanguage::TYPE_UINT: {
+ int value = V->get();
+ glUniform1i(location, value);
} break;
- case ShaderLanguage::TYPE_IVEC2: {
- if (value.second.size() < 2)
- value.second.resize(2);
- PoolIntArray val = V->get();
- for (int i = 0; i < val.size(); i++) {
- value.second.write[i].sint = val[i];
+ case ShaderLanguage::TYPE_IVEC2:
+ case ShaderLanguage::TYPE_UVEC2: {
+
+ Array r = V->get();
+ const int count = 2;
+ if (r.size() == count) {
+ int values[count];
+ for (int i = 0; i < count; i++) {
+ values[i] = r[i];
+ }
+ glUniform2i(location, values[0], values[1]);
}
+
} break;
- case ShaderLanguage::TYPE_IVEC3: {
- if (value.second.size() < 3)
- value.second.resize(3);
- PoolIntArray val = V->get();
- for (int i = 0; i < val.size(); i++) {
- value.second.write[i].sint = val[i];
+ case ShaderLanguage::TYPE_IVEC3:
+ case ShaderLanguage::TYPE_UVEC3: {
+ Array r = V->get();
+ const int count = 3;
+ if (r.size() == count) {
+ int values[count];
+ for (int i = 0; i < count; i++) {
+ values[i] = r[i];
+ }
+ glUniform3i(location, values[0], values[1], values[2]);
}
} break;
- case ShaderLanguage::TYPE_IVEC4: {
- if (value.second.size() < 4)
- value.second.resize(4);
- PoolIntArray val = V->get();
- for (int i = 0; i < val.size(); i++) {
- value.second.write[i].sint = val[i];
+ case ShaderLanguage::TYPE_IVEC4:
+ case ShaderLanguage::TYPE_UVEC4: {
+ Array r = V->get();
+ const int count = 4;
+ if (r.size() == count) {
+ int values[count];
+ for (int i = 0; i < count; i++) {
+ values[i] = r[i];
+ }
+ glUniform4i(location, values[0], values[1], values[2], values[3]);
}
} break;
- case ShaderLanguage::TYPE_UINT: {
- if (value.second.size() < 1)
- value.second.resize(1);
- uint32_t val = V->get();
- value.second.write[0].uint = val;
+ case ShaderLanguage::TYPE_FLOAT: {
+ float value = V->get();
+ glUniform1f(location, value);
+
} break;
- case ShaderLanguage::TYPE_UVEC2: {
- if (value.second.size() < 2)
- value.second.resize(2);
- PoolIntArray val = V->get();
- for (int i = 0; i < val.size(); i++) {
- value.second.write[i].uint = val[i];
- }
+ case ShaderLanguage::TYPE_VEC2: {
+ Vector2 value = V->get();
+ glUniform2f(location, value.x, value.y);
+ } break;
+ case ShaderLanguage::TYPE_VEC3: {
+ Vector3 value = V->get();
+ glUniform3f(location, value.x, value.y, value.z);
} break;
- case ShaderLanguage::TYPE_UVEC3: {
- if (value.second.size() < 3)
- value.second.resize(3);
- PoolIntArray val = V->get();
- for (int i = 0; i < val.size(); i++) {
- value.second.write[i].uint = val[i];
+ case ShaderLanguage::TYPE_VEC4: {
+ if (V->get().get_type() == Variant::COLOR) {
+ Color value = V->get();
+ glUniform4f(location, value.r, value.g, value.b, value.a);
+ } else if (V->get().get_type() == Variant::QUAT) {
+ Quat value = V->get();
+ glUniform4f(location, value.x, value.y, value.z, value.w);
+ } else {
+ Plane value = V->get();
+ glUniform4f(location, value.normal.x, value.normal.y, value.normal.z, value.d);
}
} break;
- case ShaderLanguage::TYPE_UVEC4: {
- if (value.second.size() < 4)
- value.second.resize(4);
- PoolIntArray val = V->get();
- for (int i = 0; i < val.size(); i++) {
- value.second.write[i].uint = val[i];
- }
+ case ShaderLanguage::TYPE_MAT2: {
+
+ Transform2D tr = V->get();
+ GLfloat matrix[4] = {
+ /* build a 16x16 matrix */
+ tr.elements[0][0],
+ tr.elements[0][1],
+ tr.elements[1][0],
+ tr.elements[1][1],
+ };
+ glUniformMatrix2fv(location, 1, GL_FALSE, matrix);
} break;
- case ShaderLanguage::TYPE_FLOAT: {
- if (value.second.size() < 1)
- value.second.resize(1);
- value.second.write[0].real = V->get();
+ case ShaderLanguage::TYPE_MAT3: {
+ Basis val = V->get();
+
+ GLfloat mat[9] = {
+ val.elements[0][0],
+ val.elements[1][0],
+ val.elements[2][0],
+ val.elements[0][1],
+ val.elements[1][1],
+ val.elements[2][1],
+ val.elements[0][2],
+ val.elements[1][2],
+ val.elements[2][2],
+ };
+
+ glUniformMatrix3fv(location, 1, GL_FALSE, mat);
+
+ } break;
+
+ case ShaderLanguage::TYPE_MAT4: {
+
+ Transform2D tr = V->get();
+ GLfloat matrix[16] = { /* build a 16x16 matrix */
+ tr.elements[0][0],
+ tr.elements[0][1],
+ 0,
+ 0,
+ tr.elements[1][0],
+ tr.elements[1][1],
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ tr.elements[2][0],
+ tr.elements[2][1],
+ 0,
+ 1
+ };
+
+ glUniformMatrix4fv(location, 1, GL_FALSE, matrix);
+
+ } break;
+
+ default: {
+ ERR_PRINT("ShaderNode type missing, bug?");
+ } break;
+ }
+ } else if (E->get().default_value.size()) {
+ const Vector<ShaderLanguage::ConstantNode::Value> &values = E->get().default_value;
+ switch (E->get().type) {
+ case ShaderLanguage::TYPE_BOOL: {
+ glUniform1i(location, values[0].boolean);
+ } break;
+
+ case ShaderLanguage::TYPE_BVEC2: {
+ glUniform2i(location, values[0].boolean, values[1].boolean);
+ } break;
+ case ShaderLanguage::TYPE_BVEC3: {
+ glUniform3i(location, values[0].boolean, values[1].boolean, values[2].boolean);
+ } break;
+
+ case ShaderLanguage::TYPE_BVEC4: {
+ glUniform4i(location, values[0].boolean, values[1].boolean, values[2].boolean, values[3].boolean);
+ } break;
+
+ case ShaderLanguage::TYPE_INT: {
+ glUniform1i(location, values[0].sint);
+ } break;
+
+ case ShaderLanguage::TYPE_IVEC2: {
+ glUniform2i(location, values[0].sint, values[1].sint);
+ } break;
+
+ case ShaderLanguage::TYPE_IVEC3: {
+ glUniform3i(location, values[0].sint, values[1].sint, values[2].sint);
+ } break;
+
+ case ShaderLanguage::TYPE_IVEC4: {
+ glUniform4i(location, values[0].sint, values[1].sint, values[2].sint, values[3].sint);
+ } break;
+
+ case ShaderLanguage::TYPE_UINT: {
+ glUniform1i(location, values[0].uint);
+ } break;
+
+ case ShaderLanguage::TYPE_UVEC2: {
+ glUniform2i(location, values[0].uint, values[1].uint);
+ } break;
+
+ case ShaderLanguage::TYPE_UVEC3: {
+ glUniform3i(location, values[0].uint, values[1].uint, values[2].uint);
+ } break;
+
+ case ShaderLanguage::TYPE_UVEC4: {
+ glUniform4i(location, values[0].uint, values[1].uint, values[2].uint, values[3].uint);
+ } break;
+
+ case ShaderLanguage::TYPE_FLOAT: {
+ glUniform1f(location, values[0].real);
} break;
case ShaderLanguage::TYPE_VEC2: {
- if (value.second.size() < 2)
- value.second.resize(2);
- Vector2 val = V->get();
- value.second.write[0].real = val.x;
- value.second.write[1].real = val.y;
+ glUniform2f(location, values[0].real, values[1].real);
} break;
case ShaderLanguage::TYPE_VEC3: {
- if (value.second.size() < 3)
- value.second.resize(3);
- Vector3 val = V->get();
- value.second.write[0].real = val.x;
- value.second.write[1].real = val.y;
- value.second.write[2].real = val.z;
+ glUniform3f(location, values[0].real, values[1].real, values[2].real);
} break;
case ShaderLanguage::TYPE_VEC4: {
- if (value.second.size() < 4)
- value.second.resize(4);
- if (V->get().get_type() == Variant::PLANE) {
- Plane val = V->get();
- value.second.write[0].real = val.normal.x;
- value.second.write[1].real = val.normal.y;
- value.second.write[2].real = val.normal.z;
- value.second.write[3].real = val.d;
- } else {
- Color val = V->get();
- value.second.write[0].real = val.r;
- value.second.write[1].real = val.g;
- value.second.write[2].real = val.b;
- value.second.write[3].real = val.a;
- }
-
+ glUniform4f(location, values[0].real, values[1].real, values[2].real, values[3].real);
} break;
case ShaderLanguage::TYPE_MAT2: {
- Transform2D val = V->get();
+ GLfloat mat[4];
- if (value.second.size() < 4) {
- value.second.resize(4);
+ for (int i = 0; i < 4; i++) {
+ mat[i] = values[i].real;
}
- value.second.write[0].real = val.elements[0][0];
- value.second.write[1].real = val.elements[0][1];
- value.second.write[2].real = val.elements[1][0];
- value.second.write[3].real = val.elements[1][1];
-
+ glUniformMatrix2fv(location, 1, GL_FALSE, mat);
} break;
case ShaderLanguage::TYPE_MAT3: {
- Basis val = V->get();
+ GLfloat mat[9];
- if (value.second.size() < 9) {
- value.second.resize(9);
+ for (int i = 0; i < 9; i++) {
+ mat[i] = values[i].real;
}
- value.second.write[0].real = val.elements[0][0];
- value.second.write[1].real = val.elements[0][1];
- value.second.write[2].real = val.elements[0][2];
- value.second.write[3].real = val.elements[1][0];
- value.second.write[4].real = val.elements[1][1];
- value.second.write[5].real = val.elements[1][2];
- value.second.write[6].real = val.elements[2][0];
- value.second.write[7].real = val.elements[2][1];
- value.second.write[8].real = val.elements[2][2];
+ glUniformMatrix3fv(location, 1, GL_FALSE, mat);
+
} break;
case ShaderLanguage::TYPE_MAT4: {
- Transform val = V->get();
+ GLfloat mat[16];
- if (value.second.size() < 16) {
- value.second.resize(16);
+ for (int i = 0; i < 16; i++) {
+ mat[i] = values[i].real;
}
- value.second.write[0].real = val.basis.elements[0][0];
- value.second.write[1].real = val.basis.elements[0][1];
- value.second.write[2].real = val.basis.elements[0][2];
- value.second.write[3].real = 0;
- value.second.write[4].real = val.basis.elements[1][0];
- value.second.write[5].real = val.basis.elements[1][1];
- value.second.write[6].real = val.basis.elements[1][2];
- value.second.write[7].real = 0;
- value.second.write[8].real = val.basis.elements[2][0];
- value.second.write[9].real = val.basis.elements[2][1];
- value.second.write[10].real = val.basis.elements[2][2];
- value.second.write[11].real = 0;
- value.second.write[12].real = val.origin[0];
- value.second.write[13].real = val.origin[1];
- value.second.write[14].real = val.origin[2];
- value.second.write[15].real = 1;
+ glUniformMatrix4fv(location, 1, GL_FALSE, mat);
+
} break;
- default: {
+ case ShaderLanguage::TYPE_SAMPLER2D: {
} break;
- }
- } else {
- if (value.second.size() == 0) {
- // No default value set... weird, let's just use zero for everything
- size_t default_arg_size = 1;
- bool is_float = false;
- switch (E->get().type) {
- case ShaderLanguage::TYPE_BOOL:
- case ShaderLanguage::TYPE_INT:
- case ShaderLanguage::TYPE_UINT: {
- default_arg_size = 1;
- } break;
-
- case ShaderLanguage::TYPE_FLOAT: {
- default_arg_size = 1;
- is_float = true;
- } break;
-
- case ShaderLanguage::TYPE_BVEC2:
- case ShaderLanguage::TYPE_IVEC2:
- case ShaderLanguage::TYPE_UVEC2: {
- default_arg_size = 2;
- } break;
-
- case ShaderLanguage::TYPE_VEC2: {
- default_arg_size = 2;
- is_float = true;
- } break;
-
- case ShaderLanguage::TYPE_BVEC3:
- case ShaderLanguage::TYPE_IVEC3:
- case ShaderLanguage::TYPE_UVEC3: {
- default_arg_size = 3;
- } break;
-
- case ShaderLanguage::TYPE_VEC3: {
- default_arg_size = 3;
- is_float = true;
- } break;
-
- case ShaderLanguage::TYPE_BVEC4:
- case ShaderLanguage::TYPE_IVEC4:
- case ShaderLanguage::TYPE_UVEC4: {
- default_arg_size = 4;
- } break;
-
- case ShaderLanguage::TYPE_VEC4: {
- default_arg_size = 4;
- is_float = true;
- } break;
-
- default: {
- // TODO matricies and all that stuff
- default_arg_size = 1;
- } break;
- }
-
- value.second.resize(default_arg_size);
-
- for (size_t i = 0; i < default_arg_size; i++) {
- if (is_float) {
- value.second.write[i].real = 0.0;
- } else {
- value.second.write[i].uint = 0;
- }
- }
- }
- }
- GLint location;
- if (v->custom_uniform_locations.has(E->key())) {
- location = v->custom_uniform_locations[E->key()];
- } else {
- int idx = v->uniform_names.find(E->key()); // TODO maybe put those in a Map?
- if (idx < 0) {
- location = -1;
- } else {
- location = v->uniform_location[idx];
+ case ShaderLanguage::TYPE_ISAMPLER2D: {
+
+ } break;
+
+ case ShaderLanguage::TYPE_USAMPLER2D: {
+
+ } break;
+
+ case ShaderLanguage::TYPE_SAMPLERCUBE: {
+
+ } break;
+
+ case ShaderLanguage::TYPE_SAMPLER2DARRAY:
+ case ShaderLanguage::TYPE_ISAMPLER2DARRAY:
+ case ShaderLanguage::TYPE_USAMPLER2DARRAY:
+ case ShaderLanguage::TYPE_SAMPLER3D:
+ case ShaderLanguage::TYPE_ISAMPLER3D:
+ case ShaderLanguage::TYPE_USAMPLER3D: {
+ // Not implemented in GLES2
+ } break;
+
+ case ShaderLanguage::TYPE_VOID: {
+ // Nothing to do?
+ } break;
+ default: {
+ ERR_PRINT("ShaderNode type missing, bug?");
+ } break;
}
- }
+ } else { //zero
- _set_uniform_value(location, value);
- }
+ switch (E->get().type) {
+ case ShaderLanguage::TYPE_BOOL: {
+ glUniform1i(location, GL_FALSE);
+ } break;
+
+ case ShaderLanguage::TYPE_BVEC2: {
+ glUniform2i(location, GL_FALSE, GL_FALSE);
+ } break;
- // bind textures
- int tc = material->textures.size();
- Pair<StringName, RID> *textures = material->textures.ptrw();
+ case ShaderLanguage::TYPE_BVEC3: {
+ glUniform3i(location, GL_FALSE, GL_FALSE, GL_FALSE);
+ } break;
+
+ case ShaderLanguage::TYPE_BVEC4: {
+ glUniform4i(location, GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+ } break;
- for (int i = 0; i < tc; i++) {
+ case ShaderLanguage::TYPE_INT: {
+ glUniform1i(location, 0);
+ } break;
- Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value> > value;
- value.first = ShaderLanguage::TYPE_INT;
- value.second.resize(1);
- value.second.write[0].sint = i;
+ case ShaderLanguage::TYPE_IVEC2: {
+ glUniform2i(location, 0, 0);
+ } break;
- // GLint location = get_uniform_location(textures[i].first);
+ case ShaderLanguage::TYPE_IVEC3: {
+ glUniform3i(location, 0, 0, 0);
+ } break;
- // if (location < 0) {
- // location = material->shader->uniform_locations[textures[i].first];
- // }
- GLint location = -1;
- if (v->custom_uniform_locations.has(textures[i].first)) {
- location = v->custom_uniform_locations[textures[i].first];
- } else {
- location = get_uniform_location(textures[i].first);
- }
+ case ShaderLanguage::TYPE_IVEC4: {
+ glUniform4i(location, 0, 0, 0, 0);
+ } break;
- _set_uniform_value(location, value);
- }
-}
+ case ShaderLanguage::TYPE_UINT: {
+ glUniform1i(location, 0);
+ } break;
-void ShaderGLES2::set_base_material_tex_index(int p_idx) {
+ case ShaderLanguage::TYPE_UVEC2: {
+ glUniform2i(location, 0, 0);
+ } break;
+
+ case ShaderLanguage::TYPE_UVEC3: {
+ glUniform3i(location, 0, 0, 0);
+ } break;
+
+ case ShaderLanguage::TYPE_UVEC4: {
+ glUniform4i(location, 0, 0, 0, 0);
+ } break;
+
+ case ShaderLanguage::TYPE_FLOAT: {
+ glUniform1f(location, 0);
+ } break;
+
+ case ShaderLanguage::TYPE_VEC2: {
+ glUniform2f(location, 0, 0);
+ } break;
+
+ case ShaderLanguage::TYPE_VEC3: {
+ glUniform3f(location, 0, 0, 0);
+ } break;
+
+ case ShaderLanguage::TYPE_VEC4: {
+ glUniform4f(location, 0, 0, 0, 0);
+ } break;
+
+ case ShaderLanguage::TYPE_MAT2: {
+ GLfloat mat[4] = { 0, 0, 0, 0 };
+
+ glUniformMatrix2fv(location, 1, GL_FALSE, mat);
+ } break;
+
+ case ShaderLanguage::TYPE_MAT3: {
+ GLfloat mat[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ glUniformMatrix3fv(location, 1, GL_FALSE, mat);
+
+ } break;
+
+ case ShaderLanguage::TYPE_MAT4: {
+ GLfloat mat[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ glUniformMatrix4fv(location, 1, GL_FALSE, mat);
+
+ } break;
+
+ case ShaderLanguage::TYPE_SAMPLER2D: {
+
+ } break;
+
+ case ShaderLanguage::TYPE_ISAMPLER2D: {
+
+ } break;
+
+ case ShaderLanguage::TYPE_USAMPLER2D: {
+
+ } break;
+
+ case ShaderLanguage::TYPE_SAMPLERCUBE: {
+
+ } break;
+
+ case ShaderLanguage::TYPE_SAMPLER2DARRAY:
+ case ShaderLanguage::TYPE_ISAMPLER2DARRAY:
+ case ShaderLanguage::TYPE_USAMPLER2DARRAY:
+ case ShaderLanguage::TYPE_SAMPLER3D:
+ case ShaderLanguage::TYPE_ISAMPLER3D:
+ case ShaderLanguage::TYPE_USAMPLER3D: {
+ // Not implemented in GLES2
+ } break;
+
+ case ShaderLanguage::TYPE_VOID: {
+ // Nothing to do?
+ } break;
+ default: {
+ ERR_PRINT("ShaderNode type missing, bug?");
+ } break;
+ }
+ }
+ }
}
ShaderGLES2::ShaderGLES2() {
diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h
index d493880d0b..ebea40e10e 100644
--- a/drivers/gles2/shader_gles2.h
+++ b/drivers/gles2/shader_gles2.h
@@ -1,4 +1,4 @@
-/*************************************************************************/
+/*************************************************************************/
/* shader_gles2.h */
/*************************************************************************/
/* This file is part of: */
@@ -112,7 +112,6 @@ private:
GLuint id;
GLuint vert_id;
GLuint frag_id;
- Vector<StringName> uniform_names;
GLint *uniform_location;
Vector<GLint> texture_uniform_locations;
Map<StringName, GLint> custom_uniform_locations;
@@ -177,9 +176,6 @@ private:
int max_image_units;
- Map<uint32_t, Variant> uniform_defaults;
- Map<uint32_t, CameraMatrix> uniform_cameras;
-
Map<StringName, Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value> > > uniform_values;
protected:
@@ -212,246 +208,11 @@ public:
static _FORCE_INLINE_ ShaderGLES2 *get_active() { return active; }
bool bind();
void unbind();
- void bind_uniforms();
inline GLuint get_program() const { return version ? version->id : 0; }
void clear_caches();
- _FORCE_INLINE_ void _set_uniform_value(GLint p_uniform, const Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value> > &value) {
- if (p_uniform < 0)
- return;
-
- const Vector<ShaderLanguage::ConstantNode::Value> &values = value.second;
-
- switch (value.first) {
- case ShaderLanguage::TYPE_BOOL: {
- glUniform1i(p_uniform, values[0].boolean);
- } break;
-
- case ShaderLanguage::TYPE_BVEC2: {
- glUniform2i(p_uniform, values[0].boolean, values[1].boolean);
- } break;
-
- case ShaderLanguage::TYPE_BVEC3: {
- glUniform3i(p_uniform, values[0].boolean, values[1].boolean, values[2].boolean);
- } break;
-
- case ShaderLanguage::TYPE_BVEC4: {
- glUniform4i(p_uniform, values[0].boolean, values[1].boolean, values[2].boolean, values[3].boolean);
- } break;
-
- case ShaderLanguage::TYPE_INT: {
- glUniform1i(p_uniform, values[0].sint);
- } break;
-
- case ShaderLanguage::TYPE_IVEC2: {
- glUniform2i(p_uniform, values[0].sint, values[1].sint);
- } break;
-
- case ShaderLanguage::TYPE_IVEC3: {
- glUniform3i(p_uniform, values[0].sint, values[1].sint, values[2].sint);
- } break;
-
- case ShaderLanguage::TYPE_IVEC4: {
- glUniform4i(p_uniform, values[0].sint, values[1].sint, values[2].sint, values[3].sint);
- } break;
-
- case ShaderLanguage::TYPE_UINT: {
- glUniform1i(p_uniform, values[0].uint);
- } break;
-
- case ShaderLanguage::TYPE_UVEC2: {
- glUniform2i(p_uniform, values[0].uint, values[1].uint);
- } break;
-
- case ShaderLanguage::TYPE_UVEC3: {
- glUniform3i(p_uniform, values[0].uint, values[1].uint, values[2].uint);
- } break;
-
- case ShaderLanguage::TYPE_UVEC4: {
- glUniform4i(p_uniform, values[0].uint, values[1].uint, values[2].uint, values[3].uint);
- } break;
-
- case ShaderLanguage::TYPE_FLOAT: {
- glUniform1f(p_uniform, values[0].real);
- } break;
-
- case ShaderLanguage::TYPE_VEC2: {
- glUniform2f(p_uniform, values[0].real, values[1].real);
- } break;
-
- case ShaderLanguage::TYPE_VEC3: {
- glUniform3f(p_uniform, values[0].real, values[1].real, values[2].real);
- } break;
-
- case ShaderLanguage::TYPE_VEC4: {
- glUniform4f(p_uniform, values[0].real, values[1].real, values[2].real, values[3].real);
- } break;
-
- case ShaderLanguage::TYPE_MAT2: {
- GLfloat mat[4];
-
- for (int i = 0; i < 4; i++) {
- mat[i] = values[i].real;
- }
-
- glUniformMatrix2fv(p_uniform, 1, GL_FALSE, mat);
- } break;
-
- case ShaderLanguage::TYPE_MAT3: {
- GLfloat mat[9];
-
- for (int i = 0; i < 9; i++) {
- mat[i] = values[i].real;
- }
-
- glUniformMatrix3fv(p_uniform, 1, GL_FALSE, mat);
-
- } break;
-
- case ShaderLanguage::TYPE_MAT4: {
- GLfloat mat[16];
-
- for (int i = 0; i < 16; i++) {
- mat[i] = values[i].real;
- }
-
- glUniformMatrix4fv(p_uniform, 1, GL_FALSE, mat);
-
- } break;
-
- case ShaderLanguage::TYPE_SAMPLER2D: {
-
- } break;
-
- case ShaderLanguage::TYPE_ISAMPLER2D: {
-
- } break;
-
- case ShaderLanguage::TYPE_USAMPLER2D: {
-
- } break;
-
- case ShaderLanguage::TYPE_SAMPLERCUBE: {
-
- } break;
-
- case ShaderLanguage::TYPE_SAMPLER2DARRAY:
- case ShaderLanguage::TYPE_ISAMPLER2DARRAY:
- case ShaderLanguage::TYPE_USAMPLER2DARRAY:
- case ShaderLanguage::TYPE_SAMPLER3D:
- case ShaderLanguage::TYPE_ISAMPLER3D:
- case ShaderLanguage::TYPE_USAMPLER3D: {
- // Not implemented in GLES2
- } break;
-
- case ShaderLanguage::TYPE_VOID: {
- // Nothing to do?
- } break;
- }
- }
-
- _FORCE_INLINE_ void _set_uniform_variant(GLint p_uniform, const Variant &p_value) {
-
- if (p_uniform < 0)
- return; // do none
- switch (p_value.get_type()) {
-
- case Variant::BOOL:
- case Variant::INT: {
-
- int val = p_value;
- glUniform1i(p_uniform, val);
- } break;
- case Variant::REAL: {
-
- real_t val = p_value;
- glUniform1f(p_uniform, val);
- } break;
- case Variant::COLOR: {
-
- Color val = p_value;
- glUniform4f(p_uniform, val.r, val.g, val.b, val.a);
- } break;
- case Variant::VECTOR2: {
-
- Vector2 val = p_value;
- glUniform2f(p_uniform, val.x, val.y);
- } break;
- case Variant::VECTOR3: {
-
- Vector3 val = p_value;
- glUniform3f(p_uniform, val.x, val.y, val.z);
- } break;
- case Variant::PLANE: {
-
- Plane val = p_value;
- glUniform4f(p_uniform, val.normal.x, val.normal.y, val.normal.z, val.d);
- } break;
- case Variant::QUAT: {
-
- Quat val = p_value;
- glUniform4f(p_uniform, val.x, val.y, val.z, val.w);
- } break;
-
- case Variant::TRANSFORM2D: {
-
- Transform2D tr = p_value;
- GLfloat matrix[16] = { /* build a 16x16 matrix */
- tr.elements[0][0],
- tr.elements[0][1],
- 0,
- 0,
- tr.elements[1][0],
- tr.elements[1][1],
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- tr.elements[2][0],
- tr.elements[2][1],
- 0,
- 1
- };
-
- glUniformMatrix4fv(p_uniform, 1, false, matrix);
-
- } break;
- case Variant::BASIS:
- case Variant::TRANSFORM: {
-
- Transform tr = p_value;
- GLfloat matrix[16] = { /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[1][0],
- tr.basis.elements[2][0],
- 0,
- tr.basis.elements[0][1],
- tr.basis.elements[1][1],
- tr.basis.elements[2][1],
- 0,
- tr.basis.elements[0][2],
- tr.basis.elements[1][2],
- tr.basis.elements[2][2],
- 0,
- tr.origin.x,
- tr.origin.y,
- tr.origin.z,
- 1
- };
-
- glUniformMatrix4fv(p_uniform, 1, false, matrix);
- } break;
- case Variant::OBJECT: {
-
- } break;
- default: { ERR_FAIL(); } // do nothing
- }
- }
-
uint32_t create_custom_shader();
void set_custom_shader_code(uint32_t p_code_id,
const String &p_vertex,
@@ -468,18 +229,6 @@ public:
uint32_t get_version_key() const { return conditional_version.version; }
- void set_uniform_default(int p_idx, const Variant &p_value) {
-
- if (p_value.get_type() == Variant::NIL) {
-
- uniform_defaults.erase(p_idx);
- } else {
-
- uniform_defaults[p_idx] = p_value;
- }
- uniforms_dirty = true;
- }
-
// this void* is actually a RasterizerStorageGLES2::Material, but C++ doesn't
// like forward declared nested classes.
void use_material(void *p_material);
@@ -487,31 +236,9 @@ public:
_FORCE_INLINE_ uint32_t get_version() const { return new_conditional_version.version; }
_FORCE_INLINE_ bool is_version_valid() const { return version && version->ok; }
- void set_uniform_camera(int p_idx, const CameraMatrix &p_mat) {
-
- uniform_cameras[p_idx] = p_mat;
- uniforms_dirty = true;
- }
-
- _FORCE_INLINE_ void set_texture_uniform(int p_idx, const Variant &p_value) {
-
- ERR_FAIL_COND(!version);
- ERR_FAIL_INDEX(p_idx, version->texture_uniform_locations.size());
- _set_uniform_variant(version->texture_uniform_locations[p_idx], p_value);
- }
-
- _FORCE_INLINE_ GLint get_texture_uniform_location(int p_idx) {
-
- ERR_FAIL_COND_V(!version, -1);
- ERR_FAIL_INDEX_V(p_idx, version->texture_uniform_locations.size(), -1);
- return version->texture_uniform_locations[p_idx];
- }
-
virtual void init() = 0;
void finish();
- void set_base_material_tex_index(int p_idx);
-
void add_custom_define(const String &p_define) {
custom_defines.push_back(p_define.utf8());
}
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
index c4a8c8b990..7ba2856216 100644
--- a/drivers/gles2/shaders/canvas.glsl
+++ b/drivers/gles2/shaders/canvas.glsl
@@ -107,6 +107,7 @@ vec2 select(vec2 a, vec2 b, bvec2 c) {
void main() {
vec4 color = color_attrib;
+ vec2 uv;
#ifdef USE_INSTANCING
mat4 extra_matrix_instance = extra_matrix * transpose(mat4(instance_xform0, instance_xform1, instance_xform2, vec4(0.0, 0.0, 0.0, 1.0)));
@@ -121,9 +122,9 @@ void main() {
#ifdef USE_TEXTURE_RECT
if (dst_rect.z < 0.0) { // Transpose is encoded as negative dst_rect.z
- uv_interp = src_rect.xy + abs(src_rect.zw) * vertex.yx;
+ uv = src_rect.xy + abs(src_rect.zw) * vertex.yx;
} else {
- uv_interp = src_rect.xy + abs(src_rect.zw) * vertex;
+ uv = src_rect.xy + abs(src_rect.zw) * vertex;
}
vec4 outvec = vec4(0.0, 0.0, 0.0, 1.0);
@@ -140,7 +141,7 @@ void main() {
#else
vec4 outvec = vec4(vertex.xy, 0.0, 1.0);
- uv_interp = uv_attrib;
+ uv = uv_attrib;
#endif
{
@@ -161,6 +162,9 @@ VERTEX_SHADER_CODE
#ifdef USE_PIXEL_SNAP
outvec.xy = floor(outvec + 0.5).xy;
+ // precision issue on some hardware creates artifacts within texture
+ // offset uv by a small amount to avoid
+ uv += 1e-5;
#endif
#ifdef USE_SKELETON
@@ -189,6 +193,7 @@ VERTEX_SHADER_CODE
#endif
+ uv_interp = uv;
gl_Position = projection_matrix * outvec;
#ifdef USE_LIGHTING
@@ -215,29 +220,25 @@ VERTEX_SHADER_CODE
/* clang-format off */
[fragment]
+// texture2DLodEXT and textureCubeLodEXT are fragment shader specific.
+// Do not copy these defines in the vertex section.
#ifndef USE_GLES_OVER_GL
-
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#define texture2DLod(img, coord, lod) texture2DLodEXT(img, coord, lod)
#define textureCubeLod(img, coord, lod) textureCubeLodEXT(img, coord, lod)
#endif
-
-#endif
+#endif // !USE_GLES_OVER_GL
#ifdef GL_ARB_shader_texture_lod
#extension GL_ARB_shader_texture_lod : enable
#endif
-
#if !defined(GL_EXT_shader_texture_lod) && !defined(GL_ARB_shader_texture_lod)
#define texture2DLod(img, coord, lod) texture2D(img, coord, lod)
#define textureCubeLod(img, coord, lod) textureCube(img, coord, lod)
#endif
-
-
-
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
@@ -316,13 +317,43 @@ FRAGMENT_SHADER_GLOBALS
/* clang-format on */
+void light_compute(
+ inout vec4 light,
+ inout vec2 light_vec,
+ inout float light_height,
+ inout vec4 light_color,
+ vec2 light_uv,
+ inout vec4 shadow_color,
+ vec3 normal,
+ vec2 uv,
+#if defined(SCREEN_UV_USED)
+ vec2 screen_uv,
+#endif
+ vec4 color) {
+
+#if defined(USE_LIGHT_SHADER_CODE)
+
+ /* clang-format off */
+
+LIGHT_SHADER_CODE
+
+ /* clang-format on */
+
+#endif
+}
+
void main() {
vec4 color = color_interp;
+ vec2 uv = uv_interp;
+#ifdef USE_FORCE_REPEAT
+ //needs to use this to workaround GLES2/WebGL1 forcing tiling that textures that dont support it
+ uv = mod(uv, vec2(1.0, 1.0));
+#endif
#if !defined(COLOR_USED)
//default behavior, texture by color
- color *= texture2D(color_texture, uv_interp);
+ color *= texture2D(color_texture, uv);
#endif
#ifdef SCREEN_UV_USED
@@ -339,7 +370,7 @@ void main() {
#endif
if (use_default_normal) {
- normal.xy = texture2D(normal_texture, uv_interp).xy * 2.0 - 1.0;
+ normal.xy = texture2D(normal_texture, uv).xy * 2.0 - 1.0;
normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
normal_used = true;
} else {
@@ -414,7 +445,10 @@ FRAGMENT_SHADER_CODE
color *= light;
#ifdef USE_SHADOWS
- light_vec = light_uv_interp.zw; //for shadows
+ // Reset light_vec to compute shadows, the shadow map is created from the light origin, so it only
+ // makes sense to compute shadows from there.
+ light_vec = light_uv_interp.zw;
+
float angle_to_light = -atan(light_vec.x, light_vec.y);
float PI = 3.14159265358979323846264;
/*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays
@@ -451,7 +485,7 @@ FRAGMENT_SHADER_CODE
#ifdef USE_RGBA_SHADOWS
-#define SHADOW_DEPTH(m_tex, m_uv) dot(texture2D((m_tex), (m_uv)), vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1))
+#define SHADOW_DEPTH(m_tex, m_uv) dot(texture2D((m_tex), (m_uv)), vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1.0))
#else
diff --git a/drivers/gles2/shaders/canvas_shadow.glsl b/drivers/gles2/shaders/canvas_shadow.glsl
index d39212826e..01b2c59325 100644
--- a/drivers/gles2/shaders/canvas_shadow.glsl
+++ b/drivers/gles2/shaders/canvas_shadow.glsl
@@ -48,7 +48,7 @@ void main() {
#ifdef USE_RGBA_SHADOWS
highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
+ comp -= comp.xxyz * vec4(0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
gl_FragColor = comp;
#else
diff --git a/drivers/gles2/shaders/cubemap_filter.glsl b/drivers/gles2/shaders/cubemap_filter.glsl
index 7643297a14..db3d8b3a1b 100644
--- a/drivers/gles2/shaders/cubemap_filter.glsl
+++ b/drivers/gles2/shaders/cubemap_filter.glsl
@@ -25,15 +25,15 @@ void main() {
/* clang-format off */
[fragment]
+// texture2DLodEXT and textureCubeLodEXT are fragment shader specific.
+// Do not copy these defines in the vertex section.
#ifndef USE_GLES_OVER_GL
-
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#define texture2DLod(img, coord, lod) texture2DLodEXT(img, coord, lod)
#define textureCubeLod(img, coord, lod) textureCubeLodEXT(img, coord, lod)
#endif
-
-#endif
+#endif // !USE_GLES_OVER_GL
#ifdef GL_ARB_shader_texture_lod
#extension GL_ARB_shader_texture_lod : enable
@@ -44,8 +44,6 @@ void main() {
#define textureCubeLod(img, coord, lod) textureCube(img, coord, lod)
#endif
-
-
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
@@ -187,6 +185,18 @@ void main() {
vec2 uv = (uv_interp * 2.0) - 1.0;
vec3 N = texelCoordToVec(uv, face_id);
+#ifdef USE_DIRECT_WRITE
+
+#ifdef USE_SOURCE_PANORAMA
+
+ gl_FragColor = vec4(texturePanorama(source_panorama, N).rgb, 1.0);
+#else
+
+ gl_FragColor = vec4(textureCube(source_cube, N).rgb, 1.0);
+#endif //USE_SOURCE_PANORAMA
+
+#else
+
vec4 sum = vec4(0.0);
for (int sample_num = 0; sample_num < SAMPLE_COUNT; sample_num++) {
@@ -221,4 +231,5 @@ void main() {
sum.rgb = mix((vec3(1.0) + a) * pow(sum.rgb, vec3(1.0 / 2.4)) - a, 12.92 * sum.rgb, vec3(lessThan(sum.rgb, vec3(0.0031308))));
gl_FragColor = vec4(sum.rgb, 1.0);
+#endif
}
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl
index 6c3d3baccd..7e59b63935 100644
--- a/drivers/gles2/shaders/scene.glsl
+++ b/drivers/gles2/shaders/scene.glsl
@@ -59,6 +59,10 @@ uniform ivec2 skeleton_texture_size;
#endif
+uniform highp mat4 skeleton_transform;
+uniform highp mat4 skeleton_transform_inverse;
+uniform bool skeleton_in_world_coords;
+
#endif
#ifdef USE_INSTANCING
@@ -96,6 +100,10 @@ uniform float light_normal_bias;
// varyings
//
+#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS)
+varying highp vec4 position_interp;
+#endif
+
varying highp vec3 vertex_interp;
varying vec3 normal_interp;
@@ -158,6 +166,7 @@ varying highp vec3 specular_interp;
// general for all lights
uniform highp vec4 light_color;
+uniform highp vec4 shadow_color;
uniform highp float light_specular;
// directional
@@ -354,7 +363,7 @@ void main() {
uv2_interp = uv2_attrib;
#endif
-#ifdef OVERRIDE_POSITION
+#if defined(OVERRIDE_POSITION)
highp vec4 position;
#endif
@@ -399,7 +408,13 @@ void main() {
#endif
- world_matrix = bone_transform * world_matrix;
+ if (skeleton_in_world_coords) {
+ bone_transform = skeleton_transform * (bone_transform * skeleton_transform_inverse);
+ world_matrix = bone_transform * world_matrix;
+ } else {
+ world_matrix = world_matrix * bone_transform;
+ }
+
#endif
#ifdef USE_INSTANCING
@@ -646,25 +661,29 @@ VERTEX_SHADER_CODE
#endif //use vertex lighting
-#ifdef OVERRIDE_POSITION
+#if defined(OVERRIDE_POSITION)
gl_Position = position;
#else
gl_Position = projection_matrix * vec4(vertex_interp, 1.0);
#endif
+
+#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS)
+ position_interp = gl_Position;
+#endif
}
/* clang-format off */
[fragment]
+// texture2DLodEXT and textureCubeLodEXT are fragment shader specific.
+// Do not copy these defines in the vertex section.
#ifndef USE_GLES_OVER_GL
-
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#define texture2DLod(img, coord, lod) texture2DLodEXT(img, coord, lod)
#define textureCubeLod(img, coord, lod) textureCubeLodEXT(img, coord, lod)
#endif
-
-#endif
+#endif // !USE_GLES_OVER_GL
#ifdef GL_ARB_shader_texture_lod
#extension GL_ARB_shader_texture_lod : enable
@@ -675,9 +694,6 @@ VERTEX_SHADER_CODE
#define textureCubeLod(img, coord, lod) textureCube(img, coord, lod)
#endif
-
-
-
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
@@ -723,6 +739,9 @@ uniform vec2 screen_pixel_size;
#if defined(SCREEN_TEXTURE_USED)
uniform highp sampler2D screen_texture; //texunit:-4
#endif
+#if defined(DEPTH_TEXTURE_USED)
+uniform highp sampler2D depth_texture; //texunit:-4
+#endif
#ifdef USE_REFLECTION_PROBE1
@@ -900,6 +919,8 @@ uniform float ambient_energy;
#ifdef USE_LIGHTING
+uniform highp vec4 shadow_color;
+
#ifdef USE_VERTEX_LIGHTING
//get from vertex
@@ -912,6 +933,7 @@ uniform highp vec3 light_direction; //may be used by fog, so leave here
//done in fragment
// general for all lights
uniform highp vec4 light_color;
+
uniform highp float light_specular;
// directional
@@ -968,6 +990,10 @@ uniform vec4 light_clamp;
// varyings
//
+#if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS)
+varying highp vec4 position_interp;
+#endif
+
varying highp vec3 vertex_interp;
varying vec3 normal_interp;
@@ -1328,8 +1354,18 @@ LIGHT_SHADER_CODE
#ifdef USE_SHADOW
-#define SAMPLE_SHADOW_TEXEL(p_shadow, p_pos, p_depth) step(p_depth, texture2D(p_shadow, p_pos).r)
-#define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, texture2DProj(p_shadow, p_pos).r)
+#ifdef USE_RGBA_SHADOWS
+
+#define SHADOW_DEPTH(m_val) dot(m_val, vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1.0))
+
+#else
+
+#define SHADOW_DEPTH(m_val) (m_val).r
+
+#endif
+
+#define SAMPLE_SHADOW_TEXEL(p_shadow, p_pos, p_depth) step(p_depth, SHADOW_DEPTH(texture2D(p_shadow, p_pos)))
+#define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, SHADOW_DEPTH(texture2DProj(p_shadow, p_pos)))
float sample_shadow(highp sampler2D shadow, highp vec4 spos) {
@@ -1591,14 +1627,14 @@ FRAGMENT_SHADER_CODE
#ifdef USE_LIGHTMAP_CAPTURE
{
vec3 cone_dirs[12] = vec3[](
- vec3(0, 0, 1),
- vec3(0.866025, 0, 0.5),
+ vec3(0.0, 0.0, 1.0),
+ vec3(0.866025, 0.0, 0.5),
vec3(0.267617, 0.823639, 0.5),
vec3(-0.700629, 0.509037, 0.5),
vec3(-0.700629, -0.509037, 0.5),
vec3(0.267617, -0.823639, 0.5),
- vec3(0, 0, -1),
- vec3(0.866025, 0, -0.5),
+ vec3(0.0, 0.0, -1.0),
+ vec3(0.866025, 0.0, -0.5),
vec3(0.267617, 0.823639, -0.5),
vec3(-0.700629, 0.509037, -0.5),
vec3(-0.700629, -0.509037, -0.5),
@@ -1680,7 +1716,7 @@ FRAGMENT_SHADER_CODE
float shadow = sample_shadow(light_shadow_atlas, splane);
- light_att *= shadow;
+ light_att *= mix(shadow_color.rgb, vec3(1.0), shadow);
}
#endif
@@ -1757,7 +1793,7 @@ FRAGMENT_SHADER_CODE
shadow_att = mix(shadow_att, shadow_att2, pssm_blend);
}
#endif
- light_att *= shadow_att;
+ light_att *= mix(shadow_color.rgb, vec3(1.0), shadow_att);
}
#endif //LIGHT_USE_PSSM4
@@ -1798,14 +1834,14 @@ FRAGMENT_SHADER_CODE
shadow_att = mix(shadow_att, shadow_att2, pssm_blend);
}
#endif
- light_att *= shadow_att;
+ light_att *= mix(shadow_color.rgb, vec3(1.0), shadow_att);
}
#endif //LIGHT_USE_PSSM2
#if !defined(LIGHT_USE_PSSM4) && !defined(LIGHT_USE_PSSM2)
- light_att *= sample_shadow(light_directional_shadow, shadow_coord);
+ light_att *= mix(shadow_color.rgb, vec3(1.0), sample_shadow(light_directional_shadow, shadow_coord));
#endif //orthogonal
#else //fragment version of pssm
@@ -1905,7 +1941,7 @@ FRAGMENT_SHADER_CODE
}
#endif
- light_att *= shadow;
+ light_att *= mix(shadow_color.rgb, vec3(1.0), shadow);
}
}
#endif //use vertex lighting
@@ -1953,7 +1989,7 @@ FRAGMENT_SHADER_CODE
highp vec4 splane = shadow_coord;
float shadow = sample_shadow(light_shadow_atlas, splane);
- light_att *= shadow;
+ light_att *= mix(shadow_color.rgb, vec3(1.0), shadow);
}
#endif
@@ -2049,7 +2085,12 @@ FRAGMENT_SHADER_CODE
#if defined(USE_VERTEX_LIGHTING)
+#if defined(BASE_PASS)
gl_FragColor.rgb = mix(gl_FragColor.rgb, fog_interp.rgb, fog_interp.a);
+#else
+ gl_FragColor.rgb *= (1.0 - fog_interp.a);
+#endif // BASE_PASS
+
#else //pixel based fog
float fog_amount = 0.0;
@@ -2083,11 +2124,25 @@ FRAGMENT_SHADER_CODE
}
#endif
+#if defined(BASE_PASS)
gl_FragColor.rgb = mix(gl_FragColor.rgb, fog_color, fog_amount);
+#else
+ gl_FragColor.rgb *= (1.0 - fog_amount);
+#endif // BASE_PASS
#endif //use vertex lit
#endif // defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED)
-#endif // not RENDER_DEPTH
+#else // not RENDER_DEPTH
+//depth render
+#ifdef USE_RGBA_SHADOWS
+
+ highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; // bias
+ highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
+ comp -= comp.xxyz * vec4(0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
+ gl_FragColor = comp;
+
+#endif
+#endif
}
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index b8f0965af8..4817a524f4 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -222,12 +222,12 @@ RasterizerStorageGLES3::Texture *RasterizerCanvasGLES3::_bind_canvas_texture(con
} else {
- texture = texture->get_ptr();
-
if (texture->redraw_if_visible) { //check before proxy, because this is usually used with proxies
VisualServerRaster::redraw_request();
}
+ texture = texture->get_ptr();
+
if (texture->render_target)
texture->render_target->used_in_frame = true;
@@ -263,12 +263,12 @@ RasterizerStorageGLES3::Texture *RasterizerCanvasGLES3::_bind_canvas_texture(con
} else {
- normal_map = normal_map->get_ptr();
-
if (normal_map->redraw_if_visible) { //check before proxy, because this is usually used with proxies
VisualServerRaster::redraw_request();
}
+ normal_map = normal_map->get_ptr();
+
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, normal_map->tex_id);
state.current_normal = p_normal_map;
@@ -581,10 +581,10 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
#ifdef GLES_OVER_GL
if (line->antialiased) {
glEnable(GL_LINE_SMOOTH);
- for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
Vector2 vertsl[2] = {
- verts[i],
- verts[(i + 1) % 4],
+ verts[j],
+ verts[(j + 1) % 4],
};
_draw_gui_primitive(2, vertsl, NULL, NULL);
}
@@ -782,8 +782,8 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
}
if (primitive->colors.size() == 1 && primitive->points.size() > 1) {
- Color c = primitive->colors[0];
- glVertexAttrib4f(VS::ARRAY_COLOR, c.r, c.g, c.b, c.a);
+ Color col = primitive->colors[0];
+ glVertexAttrib4f(VS::ARRAY_COLOR, col.r, col.g, col.b, col.a);
} else if (primitive->colors.empty()) {
glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
@@ -834,6 +834,8 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
// materials are ignored in 2D meshes, could be added but many things (ie, lighting mode, reading from screen, etc) would break as they are not meant be set up at this point of drawing
glBindVertexArray(s->array_id);
+ glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
+
if (s->index_array_len) {
glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len >= (1 << 16)) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT, 0);
} else {
@@ -1035,8 +1037,6 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, amount);
} else {
//split
-
- int stride = sizeof(float) * 4 * 6;
int split = int(Math::ceil(particles->phase * particles->amount));
if (amount - split > 0) {
@@ -1099,12 +1099,12 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
points[numpoints] = circle->pos;
int indices[numpoints * 3];
- for (int i = 0; i < numpoints; i++) {
+ for (int j = 0; j < numpoints; j++) {
- points[i] = circle->pos + Vector2(Math::sin(i * Math_PI * 2.0 / numpoints), Math::cos(i * Math_PI * 2.0 / numpoints)) * circle->radius;
- indices[i * 3 + 0] = i;
- indices[i * 3 + 1] = (i + 1) % numpoints;
- indices[i * 3 + 2] = numpoints;
+ points[j] = circle->pos + Vector2(Math::sin(j * Math_PI * 2.0 / numpoints), Math::cos(j * Math_PI * 2.0 / numpoints)) * circle->radius;
+ indices[j * 3 + 0] = j;
+ indices[j * 3 + 1] = (j + 1) % numpoints;
+ indices[j * 3 + 2] = numpoints;
}
_bind_canvas_texture(RID(), RID());
@@ -1322,6 +1322,8 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 1);
glBindTexture(GL_TEXTURE_2D, skeleton->texture);
state.using_skeleton = true;
+ state.canvas_shader.set_uniform(CanvasShaderGLES3::SKELETON_TRANSFORM, state.skeleton_transform);
+ state.canvas_shader.set_uniform(CanvasShaderGLES3::SKELETON_TRANSFORM_INVERSE, state.skeleton_transform_inverse);
} else {
state.using_skeleton = false;
}
@@ -1402,12 +1404,12 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
continue;
}
- t = t->get_ptr();
-
if (t->redraw_if_visible) { //check before proxy, because this is usually used with proxies
VisualServerRaster::redraw_request();
}
+ t = t->get_ptr();
+
if (storage->config.srgb_decode_supported && t->using_srgb) {
//no srgb in 2D
glTexParameteri(t->target, _TEXTURE_SRGB_DECODE_EXT, _SKIP_DECODE_EXT);
@@ -1704,6 +1706,8 @@ void RasterizerCanvasGLES3::canvas_debug_viewport_shadows(Light *p_lights_with_s
light = light->shadows_next_ptr;
}
+
+ canvas_end();
}
void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders, CameraMatrix *p_xform_cache) {
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 966466d9bc..309f8b506c 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -1199,12 +1199,12 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m
if (t) {
- t = t->get_ptr(); //resolve for proxies
-
if (t->redraw_if_visible) { //must check before proxy because this is often used with proxies
VisualServerRaster::redraw_request();
}
+ t = t->get_ptr(); //resolve for proxies
+
#ifdef TOOLS_ENABLED
if (t->detect_3d) {
t->detect_3d(t->detect_3d_ud);
@@ -1629,11 +1629,10 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) {
RasterizerStorageGLES3::Texture *t = storage->texture_owner.get(c.texture);
- t = t->get_ptr(); //resolve for proxies
-
if (t->redraw_if_visible) {
VisualServerRaster::redraw_request();
}
+ t = t->get_ptr(); //resolve for proxies
#ifdef TOOLS_ENABLED
if (t->detect_3d) {
@@ -2044,7 +2043,7 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
int current_blend_mode = -1;
int prev_shading = -1;
- RID prev_skeleton;
+ RasterizerStorageGLES3::Skeleton *prev_skeleton = NULL;
state.scene_shader.set_conditional(SceneShaderGLES3::SHADELESS, true); //by default unshaded (easier to set)
@@ -2058,7 +2057,10 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
RenderList::Element *e = p_elements[i];
RasterizerStorageGLES3::Material *material = e->material;
- RID skeleton = e->instance->skeleton;
+ RasterizerStorageGLES3::Skeleton *skeleton = NULL;
+ if (e->instance->skeleton.is_valid()) {
+ skeleton = storage->skeleton_owner.getornull(e->instance->skeleton);
+ }
bool rebind = first;
@@ -2205,15 +2207,14 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
}
if (prev_skeleton != skeleton) {
- if (prev_skeleton.is_valid() != skeleton.is_valid()) {
- state.scene_shader.set_conditional(SceneShaderGLES3::USE_SKELETON, skeleton.is_valid());
+ if ((prev_skeleton == NULL) != (skeleton == NULL)) {
+ state.scene_shader.set_conditional(SceneShaderGLES3::USE_SKELETON, skeleton != NULL);
rebind = true;
}
- if (skeleton.is_valid()) {
- RasterizerStorageGLES3::Skeleton *sk = storage->skeleton_owner.getornull(skeleton);
+ if (skeleton) {
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 1);
- glBindTexture(GL_TEXTURE_2D, sk->texture);
+ glBindTexture(GL_TEXTURE_2D, skeleton->texture);
}
}
@@ -2240,6 +2241,11 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
_set_cull(e->sort_key & RenderList::SORT_KEY_MIRROR_FLAG, e->sort_key & RenderList::SORT_KEY_CULL_DISABLED_FLAG, p_reverse_cull);
+ if (skeleton) {
+ state.scene_shader.set_uniform(SceneShaderGLES3::SKELETON_TRANSFORM, skeleton->world_transform);
+ state.scene_shader.set_uniform(SceneShaderGLES3::SKELETON_IN_WORLD_COORDS, skeleton->use_world_transform);
+ }
+
state.scene_shader.set_uniform(SceneShaderGLES3::WORLD_TRANSFORM, e->instance->transform);
_render_geometry(e);
@@ -2345,7 +2351,7 @@ void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::G
if (p_depth_pass) {
- if (has_blend_alpha || p_material->shader->spatial.uses_depth_texture || (has_base_alpha && p_material->shader->spatial.depth_draw_mode != RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS))
+ if (has_blend_alpha || p_material->shader->spatial.uses_depth_texture || (has_base_alpha && p_material->shader->spatial.depth_draw_mode != RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) || p_material->shader->spatial.depth_draw_mode == RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_NEVER || p_material->shader->spatial.no_depth_test)
return; //bye
if (!p_material->shader->spatial.uses_alpha_scissor && !p_material->shader->spatial.writes_modelview_or_projection && !p_material->shader->spatial.uses_vertex && !p_material->shader->spatial.uses_discard && p_material->shader->spatial.depth_draw_mode != RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) {
@@ -3114,7 +3120,7 @@ void RasterizerSceneGLES3::_copy_screen(bool p_invalidate_color, bool p_invalida
GLenum attachments[2] = {
GL_COLOR_ATTACHMENT0,
- GL_DEPTH_STENCIL_ATTACHMENT
+ GL_DEPTH_ATTACHMENT
};
glInvalidateFramebuffer(GL_FRAMEBUFFER, p_invalidate_depth ? 2 : 1, attachments);
@@ -3159,6 +3165,7 @@ void RasterizerSceneGLES3::_fill_render_list(InstanceBase **p_cull_result, int p
current_material_index = 0;
state.used_sss = false;
state.used_screen_texture = false;
+
//fill list
for (int i = 0; i < p_cull_count; i++) {
@@ -3173,10 +3180,10 @@ void RasterizerSceneGLES3::_fill_render_list(InstanceBase **p_cull_result, int p
int ssize = mesh->surfaces.size();
- for (int i = 0; i < ssize; i++) {
+ for (int j = 0; j < ssize; j++) {
- int mat_idx = inst->materials[i].is_valid() ? i : -1;
- RasterizerStorageGLES3::Surface *s = mesh->surfaces[i];
+ int mat_idx = inst->materials[j].is_valid() ? j : -1;
+ RasterizerStorageGLES3::Surface *s = mesh->surfaces[j];
_add_geometry(s, inst, NULL, mat_idx, p_depth_pass, p_shadow_pass);
}
@@ -3197,9 +3204,9 @@ void RasterizerSceneGLES3::_fill_render_list(InstanceBase **p_cull_result, int p
int ssize = mesh->surfaces.size();
- for (int i = 0; i < ssize; i++) {
+ for (int j = 0; j < ssize; j++) {
- RasterizerStorageGLES3::Surface *s = mesh->surfaces[i];
+ RasterizerStorageGLES3::Surface *s = mesh->surfaces[j];
_add_geometry(s, inst, multi_mesh, -1, p_depth_pass, p_shadow_pass);
}
@@ -3217,9 +3224,9 @@ void RasterizerSceneGLES3::_fill_render_list(InstanceBase **p_cull_result, int p
RasterizerStorageGLES3::Particles *particles = storage->particles_owner.getptr(inst->base);
ERR_CONTINUE(!particles);
- for (int i = 0; i < particles->draw_passes.size(); i++) {
+ for (int j = 0; j < particles->draw_passes.size(); j++) {
- RID pmesh = particles->draw_passes[i];
+ RID pmesh = particles->draw_passes[j];
if (!pmesh.is_valid())
continue;
RasterizerStorageGLES3::Mesh *mesh = storage->mesh_owner.get(pmesh);
@@ -3228,9 +3235,9 @@ void RasterizerSceneGLES3::_fill_render_list(InstanceBase **p_cull_result, int p
int ssize = mesh->surfaces.size();
- for (int j = 0; j < ssize; j++) {
+ for (int k = 0; k < ssize; k++) {
- RasterizerStorageGLES3::Surface *s = mesh->surfaces[j];
+ RasterizerStorageGLES3::Surface *s = mesh->surfaces[k];
_add_geometry(s, inst, particles, -1, p_depth_pass, p_shadow_pass);
}
}
@@ -3281,6 +3288,16 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
glDisable(GL_CULL_FACE);
glDisable(GL_BLEND);
+ if (!state.used_depth_prepass_and_resolved) {
+ //resolve depth buffer
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->buffers.fbo);
+ glReadBuffer(GL_COLOR_ATTACHMENT0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, storage->frame.current_rt->fbo);
+ glBlitFramebuffer(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, 0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ }
+
if (env->ssao_enabled || env->ssr_enabled) {
//copy normal and roughness to effect buffer
@@ -3613,7 +3630,6 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
if (storage->frame.current_rt->buffers.active) {
//transfer to effect buffer if using buffers, also resolve MSAA
- glReadBuffer(GL_COLOR_ATTACHMENT0);
glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->buffers.fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, storage->frame.current_rt->effects.mip_maps[0].sizes[0].fbo);
glBlitFramebuffer(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, 0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, GL_COLOR_BUFFER_BIT, GL_NEAREST);
@@ -4133,6 +4149,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
glDepthFunc(GL_LEQUAL);
state.used_contact_shadows = false;
+ state.used_depth_prepass_and_resolved = false;
for (int i = 0; i < p_light_cull_count; i++) {
@@ -4158,7 +4175,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
glColorMask(0, 0, 0, 0);
glClearDepth(1.0f);
- glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+ glClear(GL_DEPTH_BUFFER_BIT);
render_list.clear();
_fill_render_list(p_cull_result, p_cull_count, true, false);
@@ -4180,13 +4197,14 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
//bind depth for read
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 8);
glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->depth);
+ state.used_depth_prepass_and_resolved = true;
}
fb_cleared = true;
render_pass++;
- state.using_contact_shadows = true;
+ state.used_depth_prepass = true;
} else {
- state.using_contact_shadows = false;
+ state.used_depth_prepass = false;
}
_setup_lights(p_light_cull_result, p_light_cull_count, p_cam_transform.affine_inverse(), p_cam_projection, p_shadow_atlas);
@@ -4233,7 +4251,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
} else {
- use_mrt = env && (state.used_sss || env->ssao_enabled || env->ssr_enabled); //only enable MRT rendering if any of these is enabled
+ use_mrt = env && (state.used_sss || env->ssao_enabled || env->ssr_enabled || env->dof_blur_far_enabled || env->dof_blur_near_enabled); //only enable MRT rendering if any of these is enabled
//effects disabled and transparency also prevent using MRTs
use_mrt = use_mrt && !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT];
use_mrt = use_mrt && !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_NO_3D_EFFECTS];
@@ -4283,7 +4301,8 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
}
if (!fb_cleared) {
- glClearBufferfi(GL_DEPTH_STENCIL, 0, 1.0, 0);
+ glClearDepth(1.0f);
+ glClear(GL_DEPTH_BUFFER_BIT);
}
Color clear_color(0, 0, 0, 0);
@@ -4433,6 +4452,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
//state.scene_shader.set_conditional( SceneShaderGLES3::USE_FOG,false);
if (use_mrt) {
+
_render_mrts(env, p_cam_projection);
} else {
//FIXME: check that this is possible to use
@@ -4557,7 +4577,7 @@ void RasterizerSceneGLES3::render_shadow(RID p_light, RID p_shadow_atlas, int p_
float bias = 0;
float normal_bias = 0;
- state.using_contact_shadows = false;
+ state.used_depth_prepass = false;
CameraMatrix light_projection;
Transform light_transform;
@@ -5034,7 +5054,7 @@ void RasterizerSceneGLES3::initialize() {
state.scene_shader.add_custom_define("#define MAX_LIGHT_DATA_STRUCTS " + itos(state.max_ubo_lights) + "\n");
state.scene_shader.add_custom_define("#define MAX_FORWARD_LIGHTS " + itos(state.max_forward_lights_per_object) + "\n");
- state.max_ubo_reflections = MIN(RenderList::MAX_REFLECTIONS, max_ubo_size / sizeof(ReflectionProbeDataUBO));
+ state.max_ubo_reflections = MIN((int)RenderList::MAX_REFLECTIONS, max_ubo_size / sizeof(ReflectionProbeDataUBO));
state.reflection_array_tmp = (uint8_t *)memalloc(sizeof(ReflectionProbeDataUBO) * state.max_ubo_reflections);
@@ -5054,7 +5074,7 @@ void RasterizerSceneGLES3::initialize() {
{ //reflection cubemaps
int max_reflection_cubemap_sampler_size = 512;
- int cube_size = max_reflection_cubemap_sampler_size;
+ int rcube_size = max_reflection_cubemap_sampler_size;
glActiveTexture(GL_TEXTURE0);
@@ -5064,10 +5084,10 @@ void RasterizerSceneGLES3::initialize() {
GLenum format = GL_RGBA;
GLenum type = use_float ? GL_HALF_FLOAT : GL_UNSIGNED_INT_2_10_10_10_REV;
- while (cube_size >= 32) {
+ while (rcube_size >= 32) {
ReflectionCubeMap cube;
- cube.size = cube_size;
+ cube.size = rcube_size;
glGenTextures(1, &cube.depth);
glBindTexture(GL_TEXTURE_2D, cube.depth);
@@ -5106,7 +5126,7 @@ void RasterizerSceneGLES3::initialize() {
reflection_cubemaps.push_back(cube);
- cube_size >>= 1;
+ rcube_size >>= 1;
}
}
@@ -5162,12 +5182,15 @@ void RasterizerSceneGLES3::initialize() {
glGenTextures(1, &e.color);
glBindTexture(GL_TEXTURE_2D, e.color);
-#ifdef IPHONE_ENABLED
- ///@TODO ugly hack to get around iOS not supporting 32bit single channel floating point textures...
- glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F, max_exposure_shrink_size, max_exposure_shrink_size, 0, GL_RED, GL_FLOAT, NULL);
-#else
- glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, max_exposure_shrink_size, max_exposure_shrink_size, 0, GL_RED, GL_FLOAT, NULL);
-#endif
+
+ if (storage->config.framebuffer_float_supported) {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, max_exposure_shrink_size, max_exposure_shrink_size, 0, GL_RED, GL_FLOAT, NULL);
+ } else if (storage->config.framebuffer_half_float_supported) {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F, max_exposure_shrink_size, max_exposure_shrink_size, 0, GL_RED, GL_HALF_FLOAT, NULL);
+ } else {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB10_A2, max_exposure_shrink_size, max_exposure_shrink_size, 0, GL_RED, GL_UNSIGNED_INT_2_10_10_10_REV, NULL);
+ }
+
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, e.color, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 325617745a..56e378d7fa 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -204,7 +204,9 @@ public:
bool cull_disabled;
bool used_sss;
bool used_screen_texture;
- bool using_contact_shadows;
+
+ bool used_depth_prepass;
+ bool used_depth_prepass_and_resolved;
VS::ViewportDebugDraw debug_draw;
} state;
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 4ef7db8ea9..1fa4eacd95 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -101,6 +101,10 @@
#define _EXT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
#define _EXT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
+#ifndef GLES_OVER_GL
+#define glClearDepth glClearDepthf
+#endif
+
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
@@ -698,14 +702,18 @@ void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_
int mipmaps = 0;
- while (width != 1 && height != 1) {
- glTexImage3D(texture->target, 0, internal_format, width, height, depth, 0, format, type, NULL);
+ while (width > 0 || height > 0 || (p_type == VS::TEXTURE_TYPE_3D && depth > 0)) {
+ width = MAX(1, width);
+ height = MAX(1, height);
+ depth = MAX(1, depth);
- width = MAX(1, width / 2);
- height = MAX(1, height / 2);
+ glTexImage3D(texture->target, mipmaps, internal_format, width, height, depth, 0, format, type, NULL);
+
+ width /= 2;
+ height /= 2;
if (p_type == VS::TEXTURE_TYPE_3D) {
- depth = MAX(1, depth / 2);
+ depth /= 2;
}
mipmaps++;
@@ -744,7 +752,11 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p
if (config.keep_original_textures && !(texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING)) {
texture->images.write[p_layer] = p_image;
}
-
+#ifndef GLES_OVER_GL
+ if (p_image->is_compressed() && p_image->has_mipmaps() && !p_image->is_size_po2()) {
+ ERR_PRINTS("Texuture '" + texture->path + "' is compressed, has mipmaps but is not of powerf-of-2 size. This does not work on OpenGL ES 3.0.");
+ }
+#endif
Image::Format real_format;
Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), texture->flags, real_format, format, internal_format, type, compressed, srgb);
@@ -922,6 +934,9 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p
h = MAX(1, h >> 1);
}
+ // Handle array and 3D textures, as those set their data per layer.
+ tsize *= MAX(texture->alloc_depth, 1);
+
info.texture_mem -= texture->total_data_size;
texture->total_data_size = tsize;
info.texture_mem += texture->total_data_size;
@@ -1492,7 +1507,7 @@ void RasterizerStorageGLES3::texture_debug_usage(List<VS::TextureInfo> *r_info)
tinfo.format = t->format;
tinfo.width = t->alloc_width;
tinfo.height = t->alloc_height;
- tinfo.depth = 0;
+ tinfo.depth = t->alloc_depth;
tinfo.bytes = t->total_data_size;
r_info->push_back(tinfo);
}
@@ -1539,7 +1554,7 @@ RID RasterizerStorageGLES3::texture_create_radiance_cubemap(RID p_source, int p_
ERR_FAIL_COND_V(!texture, RID());
ERR_FAIL_COND_V(texture->type != VS::TEXTURE_TYPE_CUBEMAP, RID());
- bool use_float = config.hdr_supported;
+ bool use_float = config.framebuffer_half_float_supported;
if (p_resolution < 0) {
p_resolution = texture->width;
@@ -1787,7 +1802,7 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
int array_level = 6;
- bool use_float = config.hdr_supported;
+ bool use_float = config.framebuffer_half_float_supported;
GLenum internal_format = use_float ? GL_RGBA16F : GL_RGB10_A2;
GLenum format = GL_RGBA;
@@ -1899,7 +1914,7 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
int mm_level = mipmaps;
- bool use_float = config.hdr_supported;
+ bool use_float = config.framebuffer_half_float_supported;
GLenum internal_format = use_float ? GL_RGBA16F : GL_RGB10_A2;
GLenum format = GL_RGBA;
@@ -3616,7 +3631,7 @@ void RasterizerStorageGLES3::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
}
mesh->surfaces.push_back(surface);
- mesh->instance_change_notify(true, false);
+ mesh->instance_change_notify(true, true);
info.vertex_mem += surface->total_data_size;
}
@@ -3630,6 +3645,7 @@ void RasterizerStorageGLES3::mesh_set_blend_shape_count(RID p_mesh, int p_amount
ERR_FAIL_COND(p_amount < 0);
mesh->blend_shape_count = p_amount;
+ mesh->instance_change_notify(true, false);
}
int RasterizerStorageGLES3::mesh_get_blend_shape_count(RID p_mesh) const {
@@ -5130,6 +5146,20 @@ void RasterizerStorageGLES3::skeleton_set_base_transform_2d(RID p_skeleton, cons
skeleton->base_transform_2d = p_base_transform;
}
+void RasterizerStorageGLES3::skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform) {
+
+ Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+
+ ERR_FAIL_COND(skeleton->use_2d);
+
+ skeleton->world_transform = p_world_transform;
+ skeleton->use_world_transform = p_enable;
+
+ if (!skeleton->update_list.in_list()) {
+ skeleton_update_list.add(&skeleton->update_list);
+ }
+}
+
void RasterizerStorageGLES3::update_dirty_skeletons() {
glActiveTexture(GL_TEXTURE0);
@@ -5434,6 +5464,8 @@ RID RasterizerStorageGLES3::reflection_probe_create() {
reflection_probe->intensity = 1.0;
reflection_probe->interior_ambient = Color();
reflection_probe->interior_ambient_energy = 1.0;
+ reflection_probe->interior_ambient_probe_contrib = 0.0;
+
reflection_probe->max_distance = 0;
reflection_probe->extents = Vector3(1, 1, 1);
reflection_probe->origin_offset = Vector3(0, 0, 0);
@@ -5518,6 +5550,7 @@ void RasterizerStorageGLES3::reflection_probe_set_as_interior(RID p_probe, bool
ERR_FAIL_COND(!reflection_probe);
reflection_probe->interior = p_enable;
+ reflection_probe->instance_change_notify(true, false);
}
void RasterizerStorageGLES3::reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) {
@@ -6045,9 +6078,9 @@ void RasterizerStorageGLES3::particles_set_amount(RID p_particles, int p_amount)
glBindBuffer(GL_ARRAY_BUFFER, particles->particle_buffers[i]);
glBufferData(GL_ARRAY_BUFFER, floats * sizeof(float), data, GL_STATIC_DRAW);
- for (int i = 0; i < 6; i++) {
- glEnableVertexAttribArray(i);
- glVertexAttribPointer(i, 4, GL_FLOAT, GL_FALSE, sizeof(float) * 4 * 6, ((uint8_t *)0) + (i * 16));
+ for (int j = 0; j < 6; j++) {
+ glEnableVertexAttribArray(j);
+ glVertexAttribPointer(j, 4, GL_FLOAT, GL_FALSE, sizeof(float) * 4 * 6, ((uint8_t *)0) + (j * 16));
}
}
@@ -6800,7 +6833,7 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
GLuint color_type;
Image::Format image_format;
- bool hdr = rt->flags[RENDER_TARGET_HDR] && config.hdr_supported;
+ bool hdr = rt->flags[RENDER_TARGET_HDR] && config.framebuffer_half_float_supported;
//hdr = false;
if (!hdr || rt->flags[RENDER_TARGET_NO_3D]) {
@@ -6836,8 +6869,9 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glGenTextures(1, &rt->depth);
glBindTexture(GL_TEXTURE_2D, rt->depth);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, rt->width, rt->height, 0,
- GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, rt->width, rt->height, 0,
+ GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -6904,9 +6938,9 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glGenRenderbuffers(1, &rt->buffers.depth);
glBindRenderbuffer(GL_RENDERBUFFER, rt->buffers.depth);
if (msaa == 0)
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, rt->width, rt->height);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, rt->width, rt->height);
else
- glRenderbufferStorageMultisample(GL_RENDERBUFFER, msaa, GL_DEPTH24_STENCIL8, rt->width, rt->height);
+ glRenderbufferStorageMultisample(GL_RENDERBUFFER, msaa, GL_DEPTH_COMPONENT24, rt->width, rt->height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rt->buffers.depth);
@@ -7054,7 +7088,14 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glGenTextures(1, &rt->exposure.color);
glBindTexture(GL_TEXTURE_2D, rt->exposure.color);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, 1, 1, 0, GL_RED, GL_FLOAT, NULL);
+ if (config.framebuffer_float_supported) {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, 1, 1, 0, GL_RED, GL_FLOAT, NULL);
+ } else if (config.framebuffer_half_float_supported) {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F, 1, 1, 0, GL_RED, GL_HALF_FLOAT, NULL);
+ } else {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB10_A2, 1, 1, 0, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, NULL);
+ }
+
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, rt->exposure.color, 0);
status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
@@ -7139,7 +7180,8 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glViewport(0, 0, rt->effects.mip_maps[i].sizes[j].width, rt->effects.mip_maps[i].sizes[j].height);
glClearBufferfv(GL_COLOR, 0, zero);
if (used_depth) {
- glClearBufferfi(GL_DEPTH_STENCIL, 0, 1.0, 0);
+ glClearDepth(1.0);
+ glClear(GL_DEPTH_BUFFER_BIT);
}
}
@@ -7809,17 +7851,21 @@ void RasterizerStorageGLES3::initialize() {
config.latc_supported = config.extensions.has("GL_EXT_texture_compression_latc");
config.bptc_supported = config.extensions.has("GL_ARB_texture_compression_bptc");
#ifdef GLES_OVER_GL
- config.hdr_supported = true;
config.etc2_supported = false;
config.s3tc_supported = true;
config.rgtc_supported = true; //RGTC - core since OpenGL version 3.0
config.texture_float_linear_supported = true;
+ config.framebuffer_float_supported = true;
+ config.framebuffer_half_float_supported = true;
+
#else
config.etc2_supported = true;
- config.hdr_supported = false;
config.s3tc_supported = config.extensions.has("GL_EXT_texture_compression_dxt1") || config.extensions.has("GL_EXT_texture_compression_s3tc") || config.extensions.has("WEBGL_compressed_texture_s3tc");
config.rgtc_supported = config.extensions.has("GL_EXT_texture_compression_rgtc") || config.extensions.has("GL_ARB_texture_compression_rgtc") || config.extensions.has("EXT_texture_compression_rgtc");
config.texture_float_linear_supported = config.extensions.has("GL_OES_texture_float_linear");
+ config.framebuffer_float_supported = config.extensions.has("GL_EXT_color_buffer_float");
+ config.framebuffer_half_float_supported = config.extensions.has("GL_EXT_color_buffer_half_float") || config.framebuffer_float_supported;
+
#endif
config.pvrtc_supported = config.extensions.has("GL_IMG_texture_compression_pvrtc");
@@ -7912,11 +7958,7 @@ void RasterizerStorageGLES3::initialize() {
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &config.max_texture_image_units);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &config.max_texture_size);
-#ifdef GLES_OVER_GL
- config.use_rgba_2d_shadows = false;
-#else
- config.use_rgba_2d_shadows = true;
-#endif
+ config.use_rgba_2d_shadows = config.framebuffer_float_supported;
//generic quadie for copying
diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h
index 88897e1e07..2994bfb074 100644
--- a/drivers/gles3/rasterizer_storage_gles3.h
+++ b/drivers/gles3/rasterizer_storage_gles3.h
@@ -82,11 +82,11 @@ public:
bool etc2_supported;
bool pvrtc_supported;
- bool hdr_supported;
-
bool srgb_decode_supported;
bool texture_float_linear_supported;
+ bool framebuffer_float_supported;
+ bool framebuffer_half_float_supported;
bool use_rgba_2d_shadows;
@@ -890,12 +890,15 @@ public:
SelfList<Skeleton> update_list;
Set<RasterizerScene::InstanceBase *> instances; //instances using skeleton
Transform2D base_transform_2d;
+ bool use_world_transform;
+ Transform world_transform;
Skeleton() :
use_2d(false),
size(0),
texture(0),
- update_list(this) {
+ update_list(this),
+ use_world_transform(false) {
}
};
@@ -913,6 +916,7 @@ public:
virtual void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform);
virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const;
virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform);
+ virtual void skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform);
/* Light API */
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index 4d6f37e093..ad26294527 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -167,7 +167,7 @@ static String _opstr(SL::Operator p_op) {
static String _mkid(const String &p_id) {
String id = "m_" + p_id;
- return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
+ return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
}
static String f2sp0(float p_float) {
@@ -373,7 +373,7 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
ucode = "uniform ";
}
- ucode += _prestr(E->get().precission);
+ ucode += _prestr(E->get().precision);
ucode += _typestr(E->get().type);
ucode += " " + _mkid(E->key());
ucode += ";\n";
@@ -464,7 +464,7 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
String vcode;
String interp_mode = _interpstr(E->get().interpolation);
- vcode += _prestr(E->get().precission);
+ vcode += _prestr(E->get().precision);
vcode += _typestr(E->get().type);
vcode += " " + _mkid(E->key());
vcode += ";\n";
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 2db0223edd..fa7cc00230 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -133,15 +133,6 @@ bool ShaderGLES3::bind() {
active = this;
uniforms_dirty = true;
- /*
- * why on earth is this code here?
- for (int i=0;i<texunit_pair_count;i++) {
-
- glUniform1i(texunit_pairs[i].location, texunit_pairs[i].index);
- DEBUG_TEST_ERROR("Uniform 1 i");
- }
-
-*/
return true;
}
diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl
index 974eff86f3..0d1e7ee4a1 100644
--- a/drivers/gles3/shaders/canvas.glsl
+++ b/drivers/gles3/shaders/canvas.glsl
@@ -173,6 +173,9 @@ VERTEX_SHADER_CODE
#ifdef USE_PIXEL_SNAP
outvec.xy = floor(outvec + 0.5).xy;
+ // precision issue on some hardware creates artifacts within texture
+ // offset uv by a small amount to avoid
+ uv_interp += 1e-5;
#endif
#ifdef USE_SKELETON
@@ -495,7 +498,7 @@ FRAGMENT_SHADER_CODE
#endif
}
#ifdef DEBUG_ENCODED_32
- highp float enc32 = dot(color, highp vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1));
+ highp float enc32 = dot(color, highp vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1.0));
color = vec4(vec3(enc32), 1.0);
#endif
@@ -549,7 +552,10 @@ FRAGMENT_SHADER_CODE
color *= light;
#ifdef USE_SHADOWS
- light_vec = light_uv_interp.zw; //for shadows
+ // Reset light_vec to compute shadows, the shadow map is created from the light origin, so it only
+ // makes sense to compute shadows from there.
+ light_vec = light_uv_interp.zw;
+
float angle_to_light = -atan(light_vec.x, light_vec.y);
float PI = 3.14159265358979323846264;
/*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays
@@ -586,7 +592,7 @@ FRAGMENT_SHADER_CODE
#ifdef USE_RGBA_SHADOWS
-#define SHADOW_DEPTH(m_tex, m_uv) dot(texture((m_tex), (m_uv)), vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1))
+#define SHADOW_DEPTH(m_tex, m_uv) dot(texture((m_tex), (m_uv)), vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1.0))
#else
diff --git a/drivers/gles3/shaders/canvas_shadow.glsl b/drivers/gles3/shaders/canvas_shadow.glsl
index 68d0713385..13fff7f4d1 100644
--- a/drivers/gles3/shaders/canvas_shadow.glsl
+++ b/drivers/gles3/shaders/canvas_shadow.glsl
@@ -36,7 +36,7 @@ void main() {
#ifdef USE_RGBA_SHADOWS
highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
+ comp -= comp.xxyz * vec4(0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
distance_buf = comp;
#else
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 1a8ad5e1ef..630e1c2089 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -44,7 +44,7 @@ layout(location = 5) in vec2 uv2_attrib;
#ifdef USE_SKELETON
layout(location = 6) in uvec4 bone_indices; // attrib:6
-layout(location = 7) in vec4 bone_weights; // attrib:7
+layout(location = 7) in highp vec4 bone_weights; // attrib:7
#endif
#ifdef USE_INSTANCING
@@ -302,6 +302,8 @@ out highp float dp_clip;
#ifdef USE_SKELETON
uniform highp sampler2D skeleton_texture; // texunit:-1
+uniform highp mat4 skeleton_transform;
+uniform bool skeleton_in_world_coords;
#endif
out highp vec4 position_interp;
@@ -314,7 +316,7 @@ void main() {
highp vec4 vertex = vertex_attrib; // vec4(vertex_attrib.xyz * data_attrib.x,1.0);
- mat4 world_matrix = world_transform;
+ highp mat4 world_matrix = world_transform;
#ifdef USE_INSTANCING
@@ -395,44 +397,53 @@ void main() {
ivec4 bone_indicesi = ivec4(bone_indices); // cast to signed int
ivec2 tex_ofs = ivec2(bone_indicesi.x % 256, (bone_indicesi.x / 256) * 3);
- highp mat3x4 m;
- m = mat3x4(
+ highp mat4 m;
+ m = mat4(
texelFetch(skeleton_texture, tex_ofs, 0),
texelFetch(skeleton_texture, tex_ofs + ivec2(0, 1), 0),
- texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0)) *
+ texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0),
+ vec4(0.0, 0.0, 0.0, 1.0)) *
bone_weights.x;
tex_ofs = ivec2(bone_indicesi.y % 256, (bone_indicesi.y / 256) * 3);
- m += mat3x4(
+ m += mat4(
texelFetch(skeleton_texture, tex_ofs, 0),
texelFetch(skeleton_texture, tex_ofs + ivec2(0, 1), 0),
- texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0)) *
+ texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0),
+ vec4(0.0, 0.0, 0.0, 1.0)) *
bone_weights.y;
tex_ofs = ivec2(bone_indicesi.z % 256, (bone_indicesi.z / 256) * 3);
- m += mat3x4(
+ m += mat4(
texelFetch(skeleton_texture, tex_ofs, 0),
texelFetch(skeleton_texture, tex_ofs + ivec2(0, 1), 0),
- texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0)) *
+ texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0),
+ vec4(0.0, 0.0, 0.0, 1.0)) *
bone_weights.z;
tex_ofs = ivec2(bone_indicesi.w % 256, (bone_indicesi.w / 256) * 3);
- m += mat3x4(
+ m += mat4(
texelFetch(skeleton_texture, tex_ofs, 0),
texelFetch(skeleton_texture, tex_ofs + ivec2(0, 1), 0),
- texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0)) *
+ texelFetch(skeleton_texture, tex_ofs + ivec2(0, 2), 0),
+ vec4(0.0, 0.0, 0.0, 1.0)) *
bone_weights.w;
- mat4 bone_matrix = transpose(mat4(m[0], m[1], m[2], vec4(0.0, 0.0, 0.0, 1.0)));
+ if (skeleton_in_world_coords) {
+ highp mat4 bone_matrix = skeleton_transform * (transpose(m) * inverse(skeleton_transform));
+ world_matrix = bone_matrix * world_matrix;
- world_matrix = bone_matrix * world_matrix;
+ } else {
+
+ world_matrix = world_matrix * transpose(m);
+ }
}
#endif
- mat4 modelview = camera_inverse_matrix * world_matrix;
+ highp mat4 modelview = camera_inverse_matrix * world_matrix;
{
/* clang-format off */
@@ -1519,8 +1530,8 @@ void gi_probe_compute(mediump sampler3D probe, mat4 probe_xform, vec3 bounds, ve
#define MAX_CONE_DIRS 6
vec3 cone_dirs[MAX_CONE_DIRS] = vec3[](
- vec3(0, 0, 1),
- vec3(0.866025, 0, 0.5),
+ vec3(0.0, 0.0, 1.0),
+ vec3(0.866025, 0.0, 0.5),
vec3(0.267617, 0.823639, 0.5),
vec3(-0.700629, 0.509037, 0.5),
vec3(-0.700629, -0.509037, 0.5),
@@ -1534,10 +1545,10 @@ void gi_probe_compute(mediump sampler3D probe, mat4 probe_xform, vec3 bounds, ve
#define MAX_CONE_DIRS 4
vec3 cone_dirs[MAX_CONE_DIRS] = vec3[](
- vec3(0.707107, 0, 0.707107),
- vec3(0, 0.707107, 0.707107),
- vec3(-0.707107, 0, 0.707107),
- vec3(0, -0.707107, 0.707107));
+ vec3(0.707107, 0.0, 0.707107),
+ vec3(0.0, 0.707107, 0.707107),
+ vec3(-0.707107, 0.0, 0.707107),
+ vec3(0.0, -0.707107, 0.707107));
float cone_weights[MAX_CONE_DIRS] = float[](0.25, 0.25, 0.25, 0.25);
float cone_angle_tan = 0.98269;
@@ -1573,7 +1584,7 @@ void gi_probes_compute(vec3 pos, vec3 normal, float roughness, inout vec3 out_sp
vec3 ref_vec = normalize(reflect(normalize(pos), normal));
//find arbitrary tangent and bitangent, then build a matrix
- vec3 v0 = abs(normal.z) < 0.999 ? vec3(0, 0, 1) : vec3(0, 1, 0);
+ vec3 v0 = abs(normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);
vec3 tangent = normalize(cross(v0, normal));
vec3 bitangent = normalize(cross(tangent, normal));
mat3 normal_mat = mat3(tangent, bitangent, normal);
@@ -1961,14 +1972,14 @@ FRAGMENT_SHADER_CODE
#ifdef USE_LIGHTMAP_CAPTURE
{
vec3 cone_dirs[12] = vec3[](
- vec3(0, 0, 1),
- vec3(0.866025, 0, 0.5),
+ vec3(0.0, 0.0, 1.0),
+ vec3(0.866025, 0.0, 0.5),
vec3(0.267617, 0.823639, 0.5),
vec3(-0.700629, 0.509037, 0.5),
vec3(-0.700629, -0.509037, 0.5),
vec3(0.267617, -0.823639, 0.5),
- vec3(0, 0, -1),
- vec3(0.866025, 0, -0.5),
+ vec3(0.0, 0.0, -1.0),
+ vec3(0.866025, 0.0, -0.5),
vec3(0.267617, 0.823639, -0.5),
vec3(-0.700629, 0.509037, -0.5),
vec3(-0.700629, -0.509037, -0.5),
diff --git a/drivers/gles3/shaders/screen_space_reflection.glsl b/drivers/gles3/shaders/screen_space_reflection.glsl
index 86546319a0..39f1ea6155 100644
--- a/drivers/gles3/shaders/screen_space_reflection.glsl
+++ b/drivers/gles3/shaders/screen_space_reflection.glsl
@@ -77,7 +77,7 @@ void main() {
return;
}
//ray_dir = normalize(view_dir - normal * dot(normal,view_dir) * 2.0);
- //ray_dir = normalize(vec3(1, 1, -1));
+ //ray_dir = normalize(vec3(1.0, 1.0, -1.0));
////////////////
diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl
index 80ad003c80..626968bc05 100644
--- a/drivers/gles3/shaders/tonemap.glsl
+++ b/drivers/gles3/shaders/tonemap.glsl
@@ -124,7 +124,7 @@ vec4 texture2D_bicubic(sampler2D tex, vec2 uv, int p_lod) {
#endif
vec3 tonemap_filmic(vec3 color, float white) {
- // exposure bias: input scale (color *= bias, white *= bias) to make the brighness consistent with other tonemappers
+ // exposure bias: input scale (color *= bias, white *= bias) to make the brightness consistent with other tonemappers
// also useful to scale the input to the range that the tonemapper is designed for (some require very high input values)
// has no effect on the curve's general shape or visual properties
const float exposure_bias = 2.0f;
diff --git a/drivers/png/SCsub b/drivers/png/SCsub
index 22fb1817d1..97ba1de3db 100644
--- a/drivers/png/SCsub
+++ b/drivers/png/SCsub
@@ -50,6 +50,7 @@ if env['builtin_libpng']:
neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c"))
neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon_intrinsics.c"))
neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S"))
+ neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/palette_neon_intrinsics.c"))
env.drivers_sources += neon_sources
# Godot source files
diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp
index 6d8185cdd8..0bf432c78a 100644
--- a/drivers/png/image_loader_png.cpp
+++ b/drivers/png/image_loader_png.cpp
@@ -63,7 +63,11 @@ static void _png_error_function(png_structp, png_const_charp text) {
}
static void _png_warn_function(png_structp, png_const_charp text) {
-
+#ifdef TOOLS_ENABLED
+ if (Engine::get_singleton()->is_editor_hint()) {
+ if (String(text).begins_with("iCCP")) return; // silences annoying spam emitted to output every time the user opened assetlib
+ }
+#endif
WARN_PRINT(text);
}
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 0d98b7fbc0..aec3d27d69 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -420,7 +420,7 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
pa_operation *pa_op = pa_context_get_server_info(ad->pa_ctx, &AudioDriverPulseAudio::pa_server_info_cb, (void *)ad);
if (pa_op) {
while (ad->pa_status == 0) {
- int ret = pa_mainloop_iterate(ad->pa_ml, 1, NULL);
+ ret = pa_mainloop_iterate(ad->pa_ml, 1, NULL);
if (ret < 0) {
ERR_PRINT("pa_mainloop_iterate error");
}
diff --git a/drivers/rtaudio/SCsub b/drivers/rtaudio/SCsub
deleted file mode 100644
index 285658073c..0000000000
--- a/drivers/rtaudio/SCsub
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-
-Import('env')
-
-# Not cloning the env, the includes need to be accessible for platform/
-
-# Thirdparty source files
-thirdparty_dir = "#thirdparty/rtaudio/"
-thirdparty_sources = [
- "RtAudio.cpp",
-]
-thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
-
-env.Append(CPPPATH=[thirdparty_dir])
-
-env_thirdparty = env.Clone()
-env_thirdparty.disable_warnings()
-env_thirdparty.add_source_files(env.drivers_sources, thirdparty_sources)
-
-# Driver source files
-env.add_source_files(env.drivers_sources, "*.cpp")
-
-Export('env')
diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp
deleted file mode 100644
index e45621d70f..0000000000
--- a/drivers/rtaudio/audio_driver_rtaudio.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/*************************************************************************/
-/* audio_driver_rtaudio.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "audio_driver_rtaudio.h"
-
-#include "core/os/os.h"
-#include "core/project_settings.h"
-
-#ifdef RTAUDIO_ENABLED
-
-const char *AudioDriverRtAudio::get_name() const {
-
-#ifdef OSX_ENABLED
- return "RtAudio-OSX";
-#elif defined(UNIX_ENABLED)
- return "RtAudio-ALSA";
-#elif defined(WINDOWS_ENABLED)
- return "RtAudio-DirectSound";
-#else
- return "RtAudio-None";
-#endif
-}
-
-int AudioDriverRtAudio::callback(void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames, double streamTime, RtAudioStreamStatus status, void *userData) {
-
- if (status) {
- if (status & RTAUDIO_INPUT_OVERFLOW) {
- WARN_PRINT("RtAudio input overflow!");
- }
- if (status & RTAUDIO_OUTPUT_UNDERFLOW) {
- WARN_PRINT("RtAudio output underflow!");
- }
- }
- int32_t *buffer = (int32_t *)outputBuffer;
-
- AudioDriverRtAudio *self = (AudioDriverRtAudio *)userData;
-
- if (self->mutex->try_lock() != OK) {
- // what should i do..
- for (unsigned int i = 0; i < nBufferFrames; i++)
- buffer[i] = 0;
-
- return 0;
- }
-
- self->audio_server_process(nBufferFrames, buffer);
-
- self->mutex->unlock();
-
- return 0;
-}
-
-Error AudioDriverRtAudio::init() {
-
- active = false;
- mutex = Mutex::create(true);
- dac = memnew(RtAudio);
-
- ERR_EXPLAIN("Cannot initialize RtAudio audio driver: No devices present.")
- ERR_FAIL_COND_V(dac->getDeviceCount() < 1, ERR_UNAVAILABLE);
-
- // FIXME: Adapt to the OutputFormat -> SpeakerMode change
- /*
- String channels = GLOBAL_DEF_RST("audio/output","stereo");
-
- if (channels=="5.1")
- output_format=OUTPUT_5_1;
- else if (channels=="quad")
- output_format=OUTPUT_QUAD;
- else if (channels=="mono")
- output_format=OUTPUT_MONO;
- else
- output_format=OUTPUT_STEREO;
- */
-
- RtAudio::StreamParameters parameters;
- parameters.deviceId = dac->getDefaultOutputDevice();
- RtAudio::StreamOptions options;
-
- // set the desired numberOfBuffers
- options.numberOfBuffers = 4;
-
- parameters.firstChannel = 0;
- mix_rate = GLOBAL_DEF_RST("audio/mix_rate", DEFAULT_MIX_RATE);
-
- int latency = GLOBAL_DEF("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
- unsigned int buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
- print_verbose("Audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
-
- short int tries = 4;
-
- while (tries > 0) {
- switch (speaker_mode) {
- case SPEAKER_MODE_STEREO: parameters.nChannels = 2; break;
- case SPEAKER_SURROUND_31: parameters.nChannels = 4; break;
- case SPEAKER_SURROUND_51: parameters.nChannels = 6; break;
- case SPEAKER_SURROUND_71: parameters.nChannels = 8; break;
- };
-
- try {
- dac->openStream(&parameters, NULL, RTAUDIO_SINT32, mix_rate, &buffer_frames, &callback, this, &options);
- active = true;
-
- break;
- } catch (RtAudioError) {
- // try with less channels
- ERR_PRINT("Unable to open audio, retrying with fewer channels...");
-
- switch (speaker_mode) {
- case SPEAKER_MODE_STEREO: break; // Required to silence unhandled enum value warning.
- case SPEAKER_SURROUND_31: speaker_mode = SPEAKER_MODE_STEREO; break;
- case SPEAKER_SURROUND_51: speaker_mode = SPEAKER_SURROUND_31; break;
- case SPEAKER_SURROUND_71: speaker_mode = SPEAKER_SURROUND_51; break;
- }
-
- tries--;
- }
- }
-
- return active ? OK : ERR_UNAVAILABLE;
-}
-
-int AudioDriverRtAudio::get_mix_rate() const {
-
- return mix_rate;
-}
-
-AudioDriver::SpeakerMode AudioDriverRtAudio::get_speaker_mode() const {
-
- return speaker_mode;
-}
-
-void AudioDriverRtAudio::start() {
-
- if (active)
- dac->startStream();
-}
-
-void AudioDriverRtAudio::lock() {
-
- if (mutex)
- mutex->lock();
-}
-
-void AudioDriverRtAudio::unlock() {
-
- if (mutex)
- mutex->unlock();
-}
-
-void AudioDriverRtAudio::finish() {
-
- lock();
- if (active && dac->isStreamOpen()) {
- dac->closeStream();
- active = false;
- }
- unlock();
-
- if (mutex) {
- memdelete(mutex);
- mutex = NULL;
- }
- if (dac) {
- memdelete(dac);
- dac = NULL;
- }
-}
-
-AudioDriverRtAudio::AudioDriverRtAudio() :
- speaker_mode(SPEAKER_MODE_STEREO),
- mutex(NULL),
- dac(NULL),
- mix_rate(DEFAULT_MIX_RATE),
- active(false) {
-}
-
-#endif
diff --git a/drivers/rtaudio/audio_driver_rtaudio.h b/drivers/rtaudio/audio_driver_rtaudio.h
deleted file mode 100644
index ac4eee4947..0000000000
--- a/drivers/rtaudio/audio_driver_rtaudio.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*************************************************************************/
-/* audio_driver_rtaudio.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef AUDIO_DRIVER_RTAUDIO_H
-#define AUDIO_DRIVER_RTAUDIO_H
-
-#ifdef RTAUDIO_ENABLED
-
-#include "servers/audio_server.h"
-
-#include <RtAudio.h>
-
-class AudioDriverRtAudio : public AudioDriver {
-
- static int callback(void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
- double streamTime, RtAudioStreamStatus status, void *userData);
- SpeakerMode speaker_mode;
- Mutex *mutex;
- RtAudio *dac;
- int mix_rate;
- bool active;
-
-public:
- virtual const char *get_name() const;
-
- virtual Error init();
- virtual void start();
- virtual int get_mix_rate() const;
- virtual SpeakerMode get_speaker_mode() const;
- virtual void lock();
- virtual void unlock();
- virtual void finish();
-
- AudioDriverRtAudio();
-};
-
-#endif // AUDIO_DRIVER_RTAUDIO_H
-#endif
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 072ffd96e7..6e045817bc 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -246,7 +246,7 @@ void FileAccessUnix::store_8(uint8_t p_dest) {
void FileAccessUnix::store_buffer(const uint8_t *p_src, int p_length) {
ERR_FAIL_COND(!f);
- ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != p_length);
+ ERR_FAIL_COND((int)fwrite(p_src, 1, p_length, f) != p_length);
}
bool FileAccessUnix::file_exists(const String &p_path) {
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index 824ba7bb8a..b5feaabc32 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -50,7 +50,7 @@
#define _WIN32_WINNT 0x0501 // Windows XP, disable Vista API
#include <iphlpapi.h>
#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600 // Reenable Vista API
+#define _WIN32_WINNT 0x0600 // Re-enable Vista API
#else
#include <iphlpapi.h>
#endif // MINGW hack
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index 6910abc64c..2dffa083fe 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/drivers/unix/net_socket_posix.cpp
@@ -543,7 +543,7 @@ void NetSocketPosix::set_blocking_enabled(bool p_enabled) {
void NetSocketPosix::set_ipv6_only_enabled(bool p_enabled) {
ERR_FAIL_COND(!is_open());
- // This option is only avaiable in IPv6 sockets.
+ // This option is only available in IPv6 sockets.
ERR_FAIL_COND(_ip_type == IP::TYPE_IPV4);
int par = p_enabled ? 1 : 0;
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index ce1c183242..e7550903a8 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -282,7 +282,7 @@ uint64_t OS_Unix::get_ticks_usec() const {
uint64_t longtime = mach_absolute_time() * _clock_scale;
#else
// Unchecked return. Static analyzers might complain.
- // If _setup_clock() succeded, we assume clock_gettime() works.
+ // If _setup_clock() succeeded, we assume clock_gettime() works.
struct timespec tv_now = { 0, 0 };
clock_gettime(GODOT_CLOCK, &tv_now);
uint64_t longtime = ((uint64_t)tv_now.tv_nsec / 1000L) + (uint64_t)tv_now.tv_sec * 1000000L;
@@ -469,6 +469,11 @@ String OS_Unix::get_environment(const String &p_var) const {
return "";
}
+bool OS_Unix::set_environment(const String &p_var, const String &p_value) const {
+
+ return setenv(p_var.utf8().get_data(), p_value.utf8().get_data(), /* overwrite: */ true) == 0;
+}
+
int OS_Unix::get_processor_count() const {
return sysconf(_SC_NPROCESSORS_CONF);
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 2a23da6f28..09ab4aa1d8 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -95,6 +95,7 @@ public:
virtual bool has_environment(const String &p_var) const;
virtual String get_environment(const String &p_var) const;
+ virtual bool set_environment(const String &p_var, const String &p_value) const;
virtual String get_locale() const;
virtual int get_processor_count() const;
diff --git a/drivers/unix/syslog_logger.h b/drivers/unix/syslog_logger.h
index 5cfe3964f6..49a34dacc3 100644
--- a/drivers/unix/syslog_logger.h
+++ b/drivers/unix/syslog_logger.h
@@ -37,7 +37,7 @@
class SyslogLogger : public Logger {
public:
- virtual void logv(const char *p_format, va_list p_list, bool p_err);
+ virtual void logv(const char *p_format, va_list p_list, bool p_err) _PRINTF_FORMAT_ATTRIBUTE_2_0;
virtual void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type);
virtual ~SyslogLogger();
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 38012f8f76..c97849ef07 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -238,6 +238,32 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c
hr = p_device->audio_client->GetMixFormat(&pwfex);
ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+ print_verbose("WASAPI: wFormatTag = " + itos(pwfex->wFormatTag));
+ print_verbose("WASAPI: nChannels = " + itos(pwfex->nChannels));
+ print_verbose("WASAPI: nSamplesPerSec = " + itos(pwfex->nSamplesPerSec));
+ print_verbose("WASAPI: nAvgBytesPerSec = " + itos(pwfex->nAvgBytesPerSec));
+ print_verbose("WASAPI: nBlockAlign = " + itos(pwfex->nBlockAlign));
+ print_verbose("WASAPI: wBitsPerSample = " + itos(pwfex->wBitsPerSample));
+ print_verbose("WASAPI: cbSize = " + itos(pwfex->cbSize));
+
+ WAVEFORMATEX *closest = NULL;
+ hr = p_device->audio_client->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED, pwfex, &closest);
+ if (hr == S_FALSE) {
+ WARN_PRINT("WASAPI: Mix format is not supported by the Device");
+ if (closest) {
+ print_verbose("WASAPI: closest->wFormatTag = " + itos(closest->wFormatTag));
+ print_verbose("WASAPI: closest->nChannels = " + itos(closest->nChannels));
+ print_verbose("WASAPI: closest->nSamplesPerSec = " + itos(closest->nSamplesPerSec));
+ print_verbose("WASAPI: closest->nAvgBytesPerSec = " + itos(closest->nAvgBytesPerSec));
+ print_verbose("WASAPI: closest->nBlockAlign = " + itos(closest->nBlockAlign));
+ print_verbose("WASAPI: closest->wBitsPerSample = " + itos(closest->wBitsPerSample));
+ print_verbose("WASAPI: closest->cbSize = " + itos(closest->cbSize));
+
+ WARN_PRINT("WASAPI: Using closest match instead");
+ pwfex = closest;
+ }
+ }
+
// Since we're using WASAPI Shared Mode we can't control any of these, we just tag along
p_device->channels = pwfex->nChannels;
p_device->format_tag = pwfex->wFormatTag;
@@ -270,6 +296,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c
}
hr = p_device->audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, streamflags, p_capture ? REFTIMES_PER_SEC : 0, 0, pwfex, NULL);
+ ERR_EXPLAIN("WASAPI: Initialize failed with error 0x" + String::num_uint64(hr, 16));
ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
if (p_capture) {
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 499bb4f34b..2f705ec87d 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -348,11 +348,10 @@ size_t DirAccessWindows::get_space_left() {
String DirAccessWindows::get_filesystem_type() const {
String path = fix_path(const_cast<DirAccessWindows *>(this)->get_current_dir());
- print_line("fixed path: " + path);
+
int unit_end = path.find(":");
ERR_FAIL_COND_V(unit_end == -1, String());
String unit = path.substr(0, unit_end + 1) + "\\";
- print_line("unit: " + unit);
WCHAR szVolumeName[100];
WCHAR szFileSystemName[10];
diff --git a/drivers/windows/shell_windows.cpp b/drivers/windows/shell_windows.cpp
deleted file mode 100644
index 731d16d18d..0000000000
--- a/drivers/windows/shell_windows.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************/
-/* shell_windows.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifdef WINDOWS_ENABLED
-
-#ifdef UWP_ENABLED
-
-// Use Launcher class on windows 8
-
-#else
-
-//
-// C++ Implementation: shell_windows
-//
-// Description:
-//
-//
-// Author: Juan Linietsky <reduzio@gmail.com>, (C) 2008
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
-#include "shell_windows.h"
-
-#include <windows.h>
-
-void ShellWindows::execute(String p_path) {
-
- ShellExecuteW(NULL, L"open", p_path.c_str(), NULL, NULL, SW_SHOWNORMAL);
-}
-
-ShellWindows::ShellWindows() {
-}
-
-ShellWindows::~ShellWindows() {
-}
-
-#endif
-
-#endif
diff --git a/drivers/windows/shell_windows.h b/drivers/windows/shell_windows.h
deleted file mode 100644
index 9e9edd2f62..0000000000
--- a/drivers/windows/shell_windows.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************/
-/* shell_windows.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef SHELL_WINDOWS_H
-#define SHELL_WINDOWS_H
-
-#include "core/os/shell.h"
-
-#ifdef WINDOWS_ENABLED
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-class ShellWindows : public Shell {
-public:
- virtual void execute(String p_path);
-
- ShellWindows();
-
- ~ShellWindows();
-};
-
-#endif
-#endif
diff --git a/drivers/winmidi/win_midi.cpp b/drivers/winmidi/midi_driver_winmidi.cpp
index 26bba34661..65676b629a 100644
--- a/drivers/winmidi/win_midi.cpp
+++ b/drivers/winmidi/midi_driver_winmidi.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* win_midi.cpp */
+/* midi_driver_winmidi.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#ifdef WINMIDI_ENABLED
-#include "win_midi.h"
+#include "midi_driver_winmidi.h"
#include "core/print_string.h"
@@ -104,4 +104,4 @@ MIDIDriverWinMidi::~MIDIDriverWinMidi() {
close();
}
-#endif
+#endif // WINMIDI_ENABLED
diff --git a/drivers/winmidi/win_midi.h b/drivers/winmidi/midi_driver_winmidi.h
index 4341f7ca7e..2eaa70ef8d 100644
--- a/drivers/winmidi/win_midi.h
+++ b/drivers/winmidi/midi_driver_winmidi.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* win_midi.h */
+/* midi_driver_winmidi.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,8 +30,8 @@
#ifdef WINMIDI_ENABLED
-#ifndef WIN_MIDI_H
-#define WIN_MIDI_H
+#ifndef MIDI_DRIVER_WINMIDI_H
+#define MIDI_DRIVER_WINMIDI_H
#include "core/os/midi_driver.h"
#include "core/vector.h"
@@ -57,5 +57,5 @@ public:
virtual ~MIDIDriverWinMidi();
};
-#endif
-#endif
+#endif // MIDI_DRIVER_WINMIDI_H
+#endif // WINMIDI_ENABLED
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 565336701a..f6d4a2665c 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -758,7 +758,7 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
time += 0.001;
}
- undo_redo->create_action("Add Bezier Point");
+ undo_redo->create_action(TTR("Add Bezier Point"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, time, new_point);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", track, time);
undo_redo->commit_action();
@@ -823,7 +823,7 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (moving_handle != 0 && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
- undo_redo->create_action("Move Bezier Points");
+ undo_redo->create_action(TTR("Move Bezier Points"));
undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_in_handle", track, moving_handle_key, moving_handle_left);
undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_out_handle", track, moving_handle_key, moving_handle_right);
undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_in_handle", track, moving_handle_key, animation->bezier_track_get_key_in_handle(track, moving_handle_key));
@@ -839,7 +839,7 @@ void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (moving_selection) {
//combit it
- undo_redo->create_action("Move Bezier Points");
+ undo_redo->create_action(TTR("Move Bezier Points"));
List<AnimMoveRestore> to_restore;
// 1-remove the keys
@@ -1053,7 +1053,7 @@ void AnimationBezierTrackEdit::_menu_selected(int p_index) {
time += 0.001;
}
- undo_redo->create_action("Add Bezier Point");
+ undo_redo->create_action(TTR("Add Bezier Point"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, time, new_point);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", track, time);
undo_redo->commit_action();
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 0ba45a596e..8807a01f64 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -45,18 +45,22 @@ class AnimationTrackKeyEdit : public Object {
public:
bool setting;
- bool hidden;
bool _hide_script_from_inspector() {
return true;
}
+ bool _dont_undo_redo() {
+ return true;
+ }
+
static void _bind_methods() {
ClassDB::bind_method("_update_obj", &AnimationTrackKeyEdit::_update_obj);
ClassDB::bind_method("_key_ofs_changed", &AnimationTrackKeyEdit::_key_ofs_changed);
ClassDB::bind_method("_hide_script_from_inspector", &AnimationTrackKeyEdit::_hide_script_from_inspector);
ClassDB::bind_method("get_root_path", &AnimationTrackKeyEdit::get_root_path);
+ ClassDB::bind_method("_dont_undo_redo", &AnimationTrackKeyEdit::_dont_undo_redo);
}
//PopupDialog *ke_dialog;
@@ -82,16 +86,13 @@ public:
void _update_obj(const Ref<Animation> &p_anim) {
if (setting)
return;
- if (hidden)
- return;
if (!(animation == p_anim))
return;
+
notify_change();
}
void _key_ofs_changed(const Ref<Animation> &p_anim, float from, float to) {
- if (hidden)
- return;
if (!(animation == p_anim))
return;
if (from != key_ofs)
@@ -131,7 +132,7 @@ public:
if (existing != -1) {
Variant v = animation->track_get_key_value(track, existing);
- float trans = animation->track_get_key_transition(track, existing);
+ trans = animation->track_get_key_transition(track, existing);
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, new_time, v, trans);
}
@@ -168,6 +169,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
@@ -191,6 +193,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
}
@@ -267,6 +270,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
if (change_notify_deserved)
notify_change();
@@ -286,6 +290,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
}
@@ -301,6 +306,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
}
@@ -316,6 +322,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
}
@@ -335,6 +342,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
}
@@ -350,6 +358,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
}
@@ -365,6 +374,7 @@ public:
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
+
setting = false;
return true;
}
@@ -374,12 +384,12 @@ public:
if (name == "animation") {
- StringName name = p_value;
+ StringName anim_name = p_value;
setting = true;
undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
StringName prev = animation->animation_track_get_key_animation(track, key);
- undo_redo->add_do_method(animation.ptr(), "animation_track_set_key_animation", track, key, name);
+ undo_redo->add_do_method(animation.ptr(), "animation_track_set_key_animation", track, key, anim_name);
undo_redo->add_undo_method(animation.ptr(), "animation_track_set_key_animation", track, key, prev);
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
@@ -649,7 +659,6 @@ public:
}
AnimationTrackKeyEdit() {
- hidden = true;
key_ofs = 0;
track = -1;
setting = false;
@@ -683,12 +692,10 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
p_new_len = MAX(0.001, p_new_len);
editing = true;
- *block_animation_update_ptr = true;
- undo_redo->create_action("Change animation length");
+ undo_redo->create_action(TTR("Change Animation Length"));
undo_redo->add_do_method(animation.ptr(), "set_length", p_new_len);
undo_redo->add_undo_method(animation.ptr(), "set_length", animation->get_length());
undo_redo->commit_action();
- *block_animation_update_ptr = false;
editing = false;
update();
@@ -697,12 +704,10 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
void AnimationTimelineEdit::_anim_loop_pressed() {
- *block_animation_update_ptr = true;
- undo_redo->create_action("Change animation loop");
+ undo_redo->create_action(TTR("Change Animation Loop"));
undo_redo->add_do_method(animation.ptr(), "set_loop", loop->is_pressed());
undo_redo->add_undo_method(animation.ptr(), "set_loop", animation->has_loop());
undo_redo->commit_action();
- *block_animation_update_ptr = false;
}
int AnimationTimelineEdit::get_buttons_width() const {
@@ -927,10 +932,6 @@ Size2 AnimationTimelineEdit::get_minimum_size() const {
return ms;
}
-void AnimationTimelineEdit::set_block_animation_update_ptr(bool *p_block_ptr) {
- block_animation_update_ptr = p_block_ptr;
-}
-
void AnimationTimelineEdit::set_undo_redo(UndoRedo *p_undo_redo) {
undo_redo = p_undo_redo;
}
@@ -1071,7 +1072,6 @@ void AnimationTimelineEdit::_bind_methods() {
AnimationTimelineEdit::AnimationTimelineEdit() {
- block_animation_update_ptr = NULL;
editing = false;
name_limit = 150;
zoom = NULL;
@@ -1621,10 +1621,15 @@ void AnimationTrackEdit::set_animation_and_track(const Ref<Animation> &p_animati
ERR_FAIL_INDEX(track, animation->get_track_count());
+ node_path = animation->track_get_path(p_track);
type_icon = type_icons[animation->track_get_type(track)];
selected_icon = get_icon("KeySelected", "EditorIcons");
}
+NodePath AnimationTrackEdit::get_path() const {
+ return node_path;
+}
+
Size2 AnimationTrackEdit::get_minimum_size() const {
Ref<Texture> texture = get_icon("Object", "EditorIcons");
@@ -1685,7 +1690,7 @@ void AnimationTrackEdit::_zoom_changed() {
}
void AnimationTrackEdit::_path_entered(const String &p_text) {
- undo_redo->create_action("Change Track Path");
+ undo_redo->create_action(TTR("Change Track Path"));
undo_redo->add_do_method(animation.ptr(), "track_set_path", track, p_text);
undo_redo->add_undo_method(animation.ptr(), "track_set_path", track, animation->track_get_path(track));
undo_redo->commit_action();
@@ -1875,12 +1880,10 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
Point2 pos = mb->get_position();
if (check_rect.has_point(pos)) {
- *block_animation_update_ptr = true;
- undo_redo->create_action("Toggle track enabled");
+ undo_redo->create_action(TTR("Toggle Track Enabled"));
undo_redo->add_do_method(animation.ptr(), "track_set_enabled", track, !animation->track_is_enabled(track));
undo_redo->add_undo_method(animation.ptr(), "track_set_enabled", track, animation->track_is_enabled(track));
undo_redo->commit_action();
- *block_animation_update_ptr = false;
update();
accept_event();
}
@@ -1947,6 +1950,7 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (remove_rect.has_point(pos)) {
emit_signal("remove_request", track);
accept_event();
+ return;
}
if (bezier_edit_rect.has_point(pos)) {
@@ -2177,12 +2181,10 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
case MENU_CALL_MODE_CAPTURE: {
Animation::UpdateMode update_mode = Animation::UpdateMode(p_index);
- *block_animation_update_ptr = true;
- undo_redo->create_action("Change animation update mode");
+ undo_redo->create_action(TTR("Change Animation Update Mode"));
undo_redo->add_do_method(animation.ptr(), "value_track_set_update_mode", track, update_mode);
undo_redo->add_undo_method(animation.ptr(), "value_track_set_update_mode", track, animation->value_track_get_update_mode(track));
undo_redo->commit_action();
- *block_animation_update_ptr = false;
update();
} break;
@@ -2191,24 +2193,20 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
case MENU_INTERPOLATION_CUBIC: {
Animation::InterpolationType interp_mode = Animation::InterpolationType(p_index - MENU_INTERPOLATION_NEAREST);
- *block_animation_update_ptr = true;
- undo_redo->create_action("Change animation interpolation mode");
+ undo_redo->create_action(TTR("Change Animation Interpolation Mode"));
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_type", track, interp_mode);
undo_redo->add_undo_method(animation.ptr(), "track_set_interpolation_type", track, animation->track_get_interpolation_type(track));
undo_redo->commit_action();
- *block_animation_update_ptr = false;
update();
} break;
case MENU_LOOP_WRAP:
case MENU_LOOP_CLAMP: {
bool loop_wrap = p_index == MENU_LOOP_WRAP;
- *block_animation_update_ptr = true;
- undo_redo->create_action("Change animation loop mode");
+ undo_redo->create_action(TTR("Change Animation Loop Mode"));
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_loop_wrap", track, loop_wrap);
undo_redo->add_undo_method(animation.ptr(), "track_set_interpolation_loop_wrap", track, animation->track_get_interpolation_loop_wrap(track));
undo_redo->commit_action();
- *block_animation_update_ptr = false;
update();
} break;
@@ -2226,10 +2224,6 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
}
}
-void AnimationTrackEdit::set_block_animation_update_ptr(bool *p_block_ptr) {
- block_animation_update_ptr = p_block_ptr;
-}
-
void AnimationTrackEdit::cancel_drop() {
if (dropping_at != 0) {
dropping_at = 0;
@@ -2292,7 +2286,6 @@ AnimationTrackEdit::AnimationTrackEdit() {
root = NULL;
path = NULL;
menu = NULL;
- block_animation_update_ptr = NULL;
clicking_on_name = false;
dropping_at = 0;
@@ -2546,7 +2539,10 @@ void AnimationTrackEditor::_track_remove_request(int p_track) {
int idx = p_track;
if (idx >= 0 && idx < animation->get_track_count()) {
- _clear_selection();
+ selection.clear();
+ _clear_key_edit();
+ //all will be updated after remove anyway, and triggering update here raises error on tracks already removed
+
undo_redo->create_action(TTR("Remove Anim Track"));
undo_redo->add_do_method(animation.ptr(), "remove_track", idx);
undo_redo->add_undo_method(animation.ptr(), "add_track", animation->track_get_type(idx), idx);
@@ -2824,9 +2820,9 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
if (animation->track_get_path(i) == np) {
value = p_value; //all good
} else {
- String path = animation->track_get_path(i);
- if (NodePath(path.get_basename()) == np) {
- String subindex = path.get_extension();
+ String tpath = animation->track_get_path(i);
+ if (NodePath(tpath.get_basename()) == np) {
+ String subindex = tpath.get_extension();
value = p_value.get(subindex);
} else {
continue;
@@ -2919,9 +2915,9 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
if (animation->track_get_path(i) == np) {
value = p_value; //all good
} else {
- String path = animation->track_get_path(i);
- if (NodePath(path.get_basename()) == np) {
- String subindex = path.get_extension();
+ String tpath = animation->track_get_path(i);
+ if (NodePath(tpath.get_basename()) == np) {
+ String subindex = tpath.get_extension();
value = p_value.get(subindex);
} else {
continue;
@@ -3209,14 +3205,6 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
}
}
- /*
- undo_redo->add_do_method(this, "update_tracks");
- undo_redo->add_undo_method(this, "update");
- undo_redo->add_do_method(track_editor, "update");
- undo_redo->add_undo_method(track_editor, "update");
- undo_redo->add_do_method(track_pos, "update");
- undo_redo->add_undo_method(track_pos, "update");
-*/
undo_redo->commit_action();
return p_last_track;
@@ -3383,7 +3371,6 @@ void AnimationTrackEditor::_update_tracks() {
track_edit->set_undo_redo(undo_redo);
track_edit->set_timeline(timeline);
- track_edit->set_block_animation_update_ptr(&block_animation_update);
track_edit->set_root(root);
track_edit->set_animation_and_track(animation, i);
track_edit->set_play_position(timeline->get_play_position());
@@ -3414,9 +3401,47 @@ void AnimationTrackEditor::_update_tracks() {
void AnimationTrackEditor::_animation_changed() {
+ if (animation_changing_awaiting_update) {
+ return; //all will be updated, dont bother with anything
+ }
+
+ if (key_edit && key_edit->setting) {
+ //if editing a key, just update the edited track, makes refresh less costly
+ if (key_edit->track < track_edits.size()) {
+ track_edits[key_edit->track]->update();
+ }
+ return;
+ }
+
+ animation_changing_awaiting_update = true;
+ call_deferred("_animation_update");
+}
+
+void AnimationTrackEditor::_animation_update() {
+
timeline->update();
timeline->update_values();
- if (block_animation_update) {
+
+ bool same = true;
+
+ if (animation.is_null()) {
+ return;
+ }
+
+ if (track_edits.size() == animation->get_track_count()) {
+ //check tracks are the same
+
+ for (int i = 0; i < track_edits.size(); i++) {
+ if (track_edits[i]->get_path() != animation->track_get_path(i)) {
+ same = false;
+ break;
+ }
+ }
+ } else {
+ same = false;
+ }
+
+ if (same) {
for (int i = 0; i < track_edits.size(); i++) {
track_edits[i]->update();
}
@@ -3432,6 +3457,8 @@ void AnimationTrackEditor::_animation_changed() {
step->set_block_signals(true);
step->set_value(animation->get_step());
step->set_block_signals(false);
+
+ animation_changing_awaiting_update = false;
}
MenuButton *AnimationTrackEditor::get_edit_menu() {
@@ -3469,7 +3496,7 @@ void AnimationTrackEditor::_update_scroll(double) {
void AnimationTrackEditor::_update_step(double p_new_step) {
- undo_redo->create_action("Change animation step");
+ undo_redo->create_action(TTR("Change Animation Step"));
undo_redo->add_do_method(animation.ptr(), "set_step", p_new_step);
undo_redo->add_undo_method(animation.ptr(), "set_step", animation->get_step());
step->set_block_signals(true);
@@ -3492,7 +3519,7 @@ void AnimationTrackEditor::_dropped_track(int p_from_track, int p_to_track) {
return;
_clear_selection();
- undo_redo->create_action("Rearrange tracks");
+ undo_redo->create_action(TTR("Rearrange Tracks"));
undo_redo->add_do_method(animation.ptr(), "track_swap", p_from_track, p_to_track);
undo_redo->add_undo_method(animation.ptr(), "track_swap", p_to_track, p_from_track);
undo_redo->commit_action();
@@ -3519,7 +3546,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
case Animation::TYPE_TRANSFORM:
case Animation::TYPE_METHOD: {
- undo_redo->create_action("Add Track");
+ undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);
undo_redo->add_undo_method(animation.ptr(), "remove_track", animation->get_track_count());
@@ -3548,7 +3575,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
return;
}
- undo_redo->create_action("Add Track");
+ undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);
undo_redo->add_undo_method(animation.ptr(), "remove_track", animation->get_track_count());
@@ -3567,7 +3594,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
return;
}
- undo_redo->create_action("Add Track");
+ undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);
undo_redo->add_undo_method(animation.ptr(), "remove_track", animation->get_track_count());
@@ -3619,7 +3646,7 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
}
}
- undo_redo->create_action("Add Track");
+ undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), full_path);
undo_redo->add_do_method(animation.ptr(), "value_track_set_update_mode", animation->get_track_count(), update_mode);
@@ -3642,7 +3669,7 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
}
}
- undo_redo->create_action("Add Bezier Track");
+ undo_redo->create_action(TTR("Add Bezier Track"));
int base_track = animation->get_track_count();
for (int i = 0; i < subindices.size(); i++) {
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
@@ -3710,7 +3737,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
Vector3 scale = xf.basis.get_scale_local();
Quat rot = xf.basis;
- undo_redo->create_action("Add Transform Track Key");
+ undo_redo->create_action(TTR("Add Transform Track Key"));
undo_redo->add_do_method(animation.ptr(), "transform_track_insert_key", p_track, p_ofs, loc, rot, scale);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", p_track, p_ofs);
undo_redo->commit_action();
@@ -3722,7 +3749,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
Variant value;
_find_hint_for_track(p_track, bp, &value);
- undo_redo->create_action("Add Track Key");
+ undo_redo->create_action(TTR("Add Track Key"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", p_track, p_ofs, value);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", p_track, p_ofs);
undo_redo->commit_action();
@@ -3754,7 +3781,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
arr[3] = 0.25;
arr[4] = 0;
- undo_redo->create_action("Add Track Key");
+ undo_redo->create_action(TTR("Add Track Key"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", p_track, p_ofs, arr);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", p_track, p_ofs);
undo_redo->commit_action();
@@ -3767,7 +3794,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
ak["start_offset"] = 0;
ak["end_offset"] = 0;
- undo_redo->create_action("Add Track Key");
+ undo_redo->create_action(TTR("Add Track Key"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", p_track, p_ofs, ak);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", p_track, p_ofs);
undo_redo->commit_action();
@@ -3776,7 +3803,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
StringName anim = "[stop]";
- undo_redo->create_action("Add Track Key");
+ undo_redo->create_action(TTR("Add Track Key"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", p_track, p_ofs, anim);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", p_track, p_ofs);
undo_redo->commit_action();
@@ -3816,7 +3843,7 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) {
}
d["args"] = params;
- undo_redo->create_action("Add Method Track Key");
+ undo_redo->create_action(TTR("Add Method Track Key"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", insert_key_from_track_call_track, insert_key_from_track_call_ofs, d);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_position", insert_key_from_track_call_track, insert_key_from_track_call_ofs);
undo_redo->commit_action();
@@ -4318,9 +4345,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
text = node->get_name();
Vector<StringName> sn = path.get_subnames();
- for (int i = 0; i < sn.size(); i++) {
+ for (int j = 0; j < sn.size(); j++) {
text += ".";
- text += sn[i];
+ text += sn[j];
}
path = NodePath(node->get_path().get_names(), path.get_subnames(), true); //store full path instead for copying
@@ -4397,7 +4424,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
int base_track = animation->get_track_count();
- undo_redo->create_action("Paste Tracks");
+ undo_redo->create_action(TTR("Paste Tracks"));
for (int i = 0; i < track_clipboard.size(); i++) {
undo_redo->add_do_method(animation.ptr(), "add_track", track_clipboard[i].track_type);
Node *exists = NULL;
@@ -4726,10 +4753,12 @@ float AnimationTrackEditor::snap_time(float p_value) {
void AnimationTrackEditor::_bind_methods() {
ClassDB::bind_method("_animation_changed", &AnimationTrackEditor::_animation_changed);
+ ClassDB::bind_method("_animation_update", &AnimationTrackEditor::_animation_update);
ClassDB::bind_method("_timeline_changed", &AnimationTrackEditor::_timeline_changed);
ClassDB::bind_method("_track_remove_request", &AnimationTrackEditor::_track_remove_request);
ClassDB::bind_method("_name_limit_changed", &AnimationTrackEditor::_name_limit_changed);
ClassDB::bind_method("_update_scroll", &AnimationTrackEditor::_update_scroll);
+ ClassDB::bind_method("_update_tracks", &AnimationTrackEditor::_update_tracks);
ClassDB::bind_method("_update_step", &AnimationTrackEditor::_update_step);
ClassDB::bind_method("_update_length", &AnimationTrackEditor::_update_length);
ClassDB::bind_method("_dropped_track", &AnimationTrackEditor::_dropped_track);
@@ -4767,7 +4796,6 @@ void AnimationTrackEditor::_bind_methods() {
AnimationTrackEditor::AnimationTrackEditor() {
root = NULL;
- block_animation_update = false;
undo_redo = EditorNode::get_singleton()->get_undo_redo();
@@ -4785,7 +4813,6 @@ AnimationTrackEditor::AnimationTrackEditor() {
timeline_vbox->add_constant_override("separation", 0);
timeline = memnew(AnimationTimelineEdit);
- timeline->set_block_animation_update_ptr(&block_animation_update);
timeline->set_undo_redo(undo_redo);
timeline_vbox->add_child(timeline);
timeline->connect("timeline_changed", this, "_timeline_changed");
@@ -4804,7 +4831,6 @@ AnimationTrackEditor::AnimationTrackEditor() {
bezier_edit = memnew(AnimationBezierTrackEdit);
timeline_vbox->add_child(bezier_edit);
- bezier_edit->set_block_animation_update_ptr(&block_animation_update);
bezier_edit->set_undo_redo(undo_redo);
bezier_edit->set_editor(this);
bezier_edit->set_timeline(timeline);
@@ -5034,6 +5060,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_copy_select->set_hide_root(true);
track_copy_dialog->add_child(track_copy_select);
track_copy_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_COPY_TRACKS_CONFIRM));
+ animation_changing_awaiting_update = false;
}
AnimationTrackEditor::~AnimationTrackEditor() {
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 47058839ba..29ce4f189e 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -76,7 +76,6 @@ class AnimationTimelineEdit : public Range {
Rect2 hsize_rect;
bool editing;
- bool *block_animation_update_ptr; //used to block all tracks re-gen (speed up)
bool panning_timeline;
float panning_timeline_from;
@@ -104,7 +103,6 @@ public:
void set_zoom(Range *p_zoom);
Range *get_zoom() const { return zoom; }
void set_undo_redo(UndoRedo *p_undo_redo);
- void set_block_animation_update_ptr(bool *p_block_ptr);
void set_play_position(float p_pos);
float get_play_position() const;
@@ -143,6 +141,7 @@ class AnimationTrackEdit : public Control {
Node *root;
Control *play_position; //separate control used to draw so updates for only position changed are much faster
float play_position_pos;
+ NodePath node_path;
Ref<Animation> animation;
int track;
@@ -170,8 +169,6 @@ class AnimationTrackEdit : public Control {
void _menu_selected(int p_index);
- bool *block_animation_update_ptr; //used to block all tracks re-gen (speed up)
-
void _path_entered(const String &p_text);
void _play_position_draw();
mutable int dropping_at;
@@ -216,8 +213,7 @@ public:
AnimationTimelineEdit *get_timeline() const { return timeline; }
AnimationTrackEditor *get_editor() const { return editor; }
UndoRedo *get_undo_redo() const { return undo_redo; }
- bool *get_block_animation_update_ptr() { return block_animation_update_ptr; }
-
+ NodePath get_path() const;
void set_animation_and_track(const Ref<Animation> &p_animation, int p_track);
virtual Size2 get_minimum_size() const;
@@ -226,8 +222,6 @@ public:
void set_editor(AnimationTrackEditor *p_editor);
void set_root(Node *p_root);
- void set_block_animation_update_ptr(bool *p_block_ptr);
-
void set_play_position(float p_pos);
void update_play_position();
void cancel_drop();
@@ -313,8 +307,8 @@ class AnimationTrackEditor : public VBoxContainer {
Vector<AnimationTrackEdit *> track_edits;
Vector<AnimationTrackEditGroup *> groups;
- bool block_animation_update;
-
+ bool animation_changing_awaiting_update;
+ void _animation_update();
int _get_track_selected();
void _animation_changed();
void _update_tracks();
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 8c2c2b7f38..baf417fed7 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "animation_track_editor_plugins.h"
+
#include "editor/audio_stream_preview.h"
#include "editor_resource_preview.h"
#include "editor_scale.h"
@@ -37,6 +38,7 @@
#include "scene/3d/sprite_3d.h"
#include "scene/animation/animation_player.h"
#include "servers/audio/audio_stream.h"
+
/// BOOL ///
int AnimationTrackEditBool::get_key_height() const {
@@ -247,9 +249,6 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
return;
}
- Ref<Font> font = get_font("font", "Label");
- float fh = int(font->get_height() * 1.5);
-
bool play = get_animation()->track_get_key_value(get_track(), p_index);
if (play) {
float len = stream->get_length();
@@ -285,8 +284,9 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
if (to_x <= from_x)
return;
- int h = get_size().height;
- Rect2 rect = Rect2(from_x, (h - fh) / 2, to_x - from_x, fh);
+ Ref<Font> font = get_font("font", "Label");
+ float fh = int(font->get_height() * 1.5);
+ Rect2 rect = Rect2(from_x, (get_size().height - fh) / 2, to_x - from_x, fh);
draw_rect(rect, Color(0.25, 0.25, 0.25));
Vector<Vector2> lines;
@@ -439,13 +439,13 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
return;
}
- int frame = get_animation()->track_get_key_value(get_track(), p_index);
-
Ref<Texture> texture;
Rect2 region;
if (Object::cast_to<Sprite>(object) || Object::cast_to<Sprite3D>(object)) {
+ int frame = get_animation()->track_get_key_value(get_track(), p_index);
+
texture = object->call("get_texture");
if (!texture.is_valid()) {
AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right);
@@ -1004,12 +1004,10 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
ofs += 0.001;
}
- *get_block_animation_update_ptr() = true;
- get_undo_redo()->create_action("Add Audio Track Clip");
+ get_undo_redo()->create_action(TTR("Add Audio Track Clip"));
get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_insert_key", get_track(), ofs, stream);
get_undo_redo()->add_undo_method(get_animation().ptr(), "track_remove_key_at_position", get_track(), ofs);
get_undo_redo()->commit_action();
- *get_block_animation_update_ptr() = false;
update();
return;
@@ -1098,21 +1096,17 @@ void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) {
float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale();
if (len_resizing_start) {
float prev_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), len_resizing_index);
- *get_block_animation_update_ptr() = true;
- get_undo_redo()->create_action("Change Audio Track Clip Start Offset");
+ get_undo_redo()->create_action(TTR("Change Audio Track Clip Start Offset"));
get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, prev_ofs + ofs_local);
get_undo_redo()->add_undo_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, prev_ofs);
get_undo_redo()->commit_action();
- *get_block_animation_update_ptr() = false;
} else {
float prev_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), len_resizing_index);
- *get_block_animation_update_ptr() = true;
- get_undo_redo()->create_action("Change Audio Track Clip End Offset");
+ get_undo_redo()->create_action(TTR("Change Audio Track Clip End Offset"));
get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, prev_ofs + ofs_local);
get_undo_redo()->add_undo_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, prev_ofs);
get_undo_redo()->commit_action();
- *get_block_animation_update_ptr() = false;
}
len_resizing = false;
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index 7a3edfde50..72beeaaf45 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -288,12 +288,17 @@ Node *ArrayPropertyEdit::get_node() {
return Object::cast_to<Node>(ObjectDB::get_instance(obj));
}
+bool ArrayPropertyEdit::_dont_undo_redo() {
+ return true;
+}
+
void ArrayPropertyEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_size"), &ArrayPropertyEdit::_set_size);
ClassDB::bind_method(D_METHOD("_set_value"), &ArrayPropertyEdit::_set_value);
ClassDB::bind_method(D_METHOD("_notif_change"), &ArrayPropertyEdit::_notif_change);
ClassDB::bind_method(D_METHOD("_notif_changev"), &ArrayPropertyEdit::_notif_changev);
+ ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &ArrayPropertyEdit::_dont_undo_redo);
}
ArrayPropertyEdit::ArrayPropertyEdit() {
diff --git a/editor/array_property_edit.h b/editor/array_property_edit.h
index b2a3564c8c..fd17ebe9f8 100644
--- a/editor/array_property_edit.h
+++ b/editor/array_property_edit.h
@@ -52,6 +52,8 @@ class ArrayPropertyEdit : public Reference {
void _set_size(int p_size);
void _set_value(int p_idx, const Variant &p_value);
+ bool _dont_undo_redo();
+
protected:
static void _bind_methods();
bool _set(const StringName &p_name, const Variant &p_value);
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp
index 1ddd4552d3..85db8b77f9 100644
--- a/editor/audio_stream_preview.cpp
+++ b/editor/audio_stream_preview.cpp
@@ -77,7 +77,7 @@ float AudioStreamPreview::get_min(float p_time, float p_time_next) const {
time_to = time_from + 1;
}
- uint8_t vmin = 0;
+ uint8_t vmin = 255;
for (int i = time_from; i < time_to; i++) {
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 4ab9a72694..0b06839ecf 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -31,6 +31,7 @@
#include "code_editor.h"
#include "core/os/keyboard.h"
+#include "core/string_builder.h"
#include "editor/editor_scale.h"
#include "editor_node.h"
#include "editor_settings.h"
@@ -98,9 +99,6 @@ void FindReplaceBar::_notification(int p_what) {
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
set_process_unhandled_input(is_visible_in_tree());
- if (is_visible_in_tree()) {
- _update_size();
- }
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
find_prev->set_icon(get_icon("MoveUp", "EditorIcons"));
@@ -389,7 +387,6 @@ void FindReplaceBar::_show_search() {
search_text->set_cursor_position(search_text->get_text().length());
search_current();
}
- call_deferred("_update_size");
}
void FindReplaceBar::popup_search() {
@@ -482,11 +479,6 @@ void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) {
text_edit->connect("text_changed", this, "_editor_text_changed");
}
-void FindReplaceBar::_update_size() {
-
- container->set_size(Size2(hbc->get_size().width, 1));
-}
-
void FindReplaceBar::_bind_methods() {
ClassDB::bind_method("_unhandled_input", &FindReplaceBar::_unhandled_input);
@@ -502,7 +494,6 @@ void FindReplaceBar::_bind_methods() {
ClassDB::bind_method("_replace_all_pressed", &FindReplaceBar::_replace_all);
ClassDB::bind_method("_search_options_changed", &FindReplaceBar::_search_options_changed);
ClassDB::bind_method("_hide_pressed", &FindReplaceBar::_hide_bar);
- ClassDB::bind_method("_update_size", &FindReplaceBar::_update_size);
ADD_SIGNAL(MethodInfo("search"));
ADD_SIGNAL(MethodInfo("error"));
@@ -510,26 +501,16 @@ void FindReplaceBar::_bind_methods() {
FindReplaceBar::FindReplaceBar() {
- container = memnew(MarginContainer);
- container->add_constant_override("margin_bottom", 5 * EDSCALE);
- add_child(container);
- container->set_clip_contents(true);
- container->set_h_size_flags(SIZE_EXPAND_FILL);
-
replace_all_mode = false;
preserve_cursor = false;
- hbc = memnew(HBoxContainer);
- container->add_child(hbc);
- hbc->set_anchor_and_margin(MARGIN_RIGHT, 1, 0);
-
vbc_lineedit = memnew(VBoxContainer);
- hbc->add_child(vbc_lineedit);
+ add_child(vbc_lineedit);
vbc_lineedit->set_h_size_flags(SIZE_EXPAND_FILL);
VBoxContainer *vbc_button = memnew(VBoxContainer);
- hbc->add_child(vbc_button);
+ add_child(vbc_button);
VBoxContainer *vbc_option = memnew(VBoxContainer);
- hbc->add_child(vbc_option);
+ add_child(vbc_option);
HBoxContainer *hbc_button_search = memnew(HBoxContainer);
vbc_button->add_child(hbc_button_search);
@@ -673,18 +654,14 @@ void CodeTextEditor::_reset_zoom() {
if (font.is_valid()) {
EditorSettings::get_singleton()->set("interface/editor/code_font_size", 14);
font->set_size(14);
- font_size_nb->set_text("14 (100%)");
}
}
void CodeTextEditor::_line_col_changed() {
- line_nb->set_text(itos(text_editor->cursor_get_line() + 1));
-
String line = text_editor->get_line(text_editor->cursor_get_line());
int positional_column = 0;
-
for (int i = 0; i < text_editor->cursor_get_column(); i++) {
if (line[i] == '\t') {
positional_column += text_editor->get_indent_size(); //tab size
@@ -693,7 +670,14 @@ void CodeTextEditor::_line_col_changed() {
}
}
- col_nb->set_text(itos(positional_column + 1));
+ StringBuilder *sb = memnew(StringBuilder);
+ sb->append("(");
+ sb->append(itos(text_editor->cursor_get_line() + 1).lpad(3));
+ sb->append(",");
+ sb->append(itos(positional_column + 1).lpad(3));
+ sb->append(")");
+
+ line_and_col_txt->set_text(sb->as_string());
}
void CodeTextEditor::_text_changed() {
@@ -747,8 +731,6 @@ bool CodeTextEditor::_add_font_size(int p_delta) {
if (font.is_valid()) {
int new_size = CLAMP(font->get_size() + p_delta, 8 * EDSCALE, 96 * EDSCALE);
- font_size_nb->set_text(itos(new_size) + " (" + itos(100 * new_size / (14 * EDSCALE)) + "%)");
-
if (new_size != font->get_size()) {
EditorSettings::get_singleton()->set("interface/editor/code_font_size", new_size / EDSCALE);
font->set_size(new_size);
@@ -1060,37 +1042,118 @@ void CodeTextEditor::delete_lines() {
}
void CodeTextEditor::clone_lines_down() {
+ const int cursor_column = text_editor->cursor_get_column();
int from_line = text_editor->cursor_get_line();
int to_line = text_editor->cursor_get_line();
- int column = text_editor->cursor_get_column();
-
+ int from_column = 0;
+ int to_column = 0;
+ int cursor_new_line = to_line + 1;
+ int cursor_new_column = text_editor->cursor_get_column();
+ String new_text = "\n" + text_editor->get_line(from_line);
+ bool selection_active = false;
+
+ text_editor->cursor_set_column(text_editor->get_line(from_line).length());
if (text_editor->is_selection_active()) {
+ from_column = text_editor->get_selection_from_column();
+ to_column = text_editor->get_selection_to_column();
+
from_line = text_editor->get_selection_from_line();
to_line = text_editor->get_selection_to_line();
- column = text_editor->cursor_get_column();
+ cursor_new_line = to_line + text_editor->cursor_get_line() - from_line;
+ cursor_new_column = to_column == cursor_column ? 2 * to_column - from_column : to_column;
+ new_text = text_editor->get_selection_text();
+ selection_active = true;
+
+ text_editor->cursor_set_line(to_line);
+ text_editor->cursor_set_column(to_column);
}
- int next_line = to_line + 1;
- bool caret_at_start = text_editor->cursor_get_line() == from_line;
text_editor->begin_complex_operation();
+
for (int i = from_line; i <= to_line; i++) {
text_editor->unfold_line(i);
- text_editor->set_line(next_line - 1, text_editor->get_line(next_line - 1) + "\n");
- text_editor->set_line(next_line, text_editor->get_line(i));
- next_line++;
}
-
- if (caret_at_start) {
- text_editor->cursor_set_line(to_line + 1);
- } else {
- text_editor->cursor_set_line(next_line - 1);
+ text_editor->deselect();
+ text_editor->insert_text_at_cursor(new_text);
+ text_editor->cursor_set_line(cursor_new_line);
+ text_editor->cursor_set_column(cursor_new_column);
+ if (selection_active) {
+ text_editor->select(to_line, to_column, 2 * to_line - from_line, 2 * to_column - from_column);
}
- text_editor->cursor_set_column(column);
+ text_editor->end_complex_operation();
+ text_editor->update();
+}
+
+void CodeTextEditor::toggle_inline_comment(const String &delimiter) {
+ text_editor->begin_complex_operation();
if (text_editor->is_selection_active()) {
- text_editor->select(to_line + 1, text_editor->get_selection_from_column(), next_line - 1, text_editor->get_selection_to_column());
- }
+ int begin = text_editor->get_selection_from_line();
+ int end = text_editor->get_selection_to_line();
+
+ // End of selection ends on the first column of the last line, ignore it.
+ if (text_editor->get_selection_to_column() == 0)
+ end -= 1;
+
+ int col_to = text_editor->get_selection_to_column();
+ int cursor_pos = text_editor->cursor_get_column();
+
+ // Check if all lines in the selected block are commented
+ bool is_commented = true;
+ for (int i = begin; i <= end; i++) {
+ if (!text_editor->get_line(i).begins_with(delimiter)) {
+ is_commented = false;
+ break;
+ }
+ }
+ for (int i = begin; i <= end; i++) {
+ String line_text = text_editor->get_line(i);
+
+ if (line_text.strip_edges().empty()) {
+ line_text = delimiter;
+ } else {
+ if (is_commented) {
+ line_text = line_text.substr(delimiter.length(), line_text.length());
+ } else {
+ line_text = delimiter + line_text;
+ }
+ }
+ text_editor->set_line(i, line_text);
+ }
+
+ // Adjust selection & cursor position.
+ int offset = (is_commented ? -1 : 1) * delimiter.length();
+ int col_from = text_editor->get_selection_from_column() > 0 ? text_editor->get_selection_from_column() + offset : 0;
+
+ if (is_commented && text_editor->cursor_get_column() == text_editor->get_line(text_editor->cursor_get_line()).length() + 1)
+ cursor_pos += 1;
+
+ if (text_editor->get_selection_to_column() != 0 && col_to != text_editor->get_line(text_editor->get_selection_to_line()).length() + 1)
+ col_to += offset;
+
+ if (text_editor->cursor_get_column() != 0)
+ cursor_pos += offset;
+ text_editor->select(begin, col_from, text_editor->get_selection_to_line(), col_to);
+ text_editor->cursor_set_column(cursor_pos);
+
+ } else {
+ int begin = text_editor->cursor_get_line();
+ String line_text = text_editor->get_line(begin);
+ int delimiter_length = delimiter.length();
+
+ int col = text_editor->cursor_get_column();
+ if (line_text.begins_with(delimiter)) {
+ line_text = line_text.substr(delimiter_length, line_text.length());
+ col -= delimiter_length;
+ } else {
+ line_text = delimiter + line_text;
+ col += delimiter_length;
+ }
+
+ text_editor->set_line(begin, line_text);
+ text_editor->cursor_set_column(col);
+ }
text_editor->end_complex_operation();
text_editor->update();
}
@@ -1154,6 +1217,7 @@ void CodeTextEditor::_update_font() {
text_editor->add_font_override("font", get_font("source", "EditorFonts"));
Ref<Font> status_bar_font = get_font("status_source", "EditorFonts");
+ error->add_font_override("font", status_bar_font);
int count = status_bar->get_child_count();
for (int i = 0; i < count; i++) {
Control *n = Object::cast_to<Control>(status_bar->get_child(i));
@@ -1167,7 +1231,6 @@ void CodeTextEditor::_on_settings_change() {
_update_font();
font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size");
- font_size_nb->set_text(itos(font_size) + " (" + itos(100 * font_size / (14 * EDSCALE)) + "%)");
// AUTO BRACE COMPLETION
text_editor->set_auto_brace_completion(
@@ -1188,17 +1251,56 @@ void CodeTextEditor::_text_changed_idle_timeout() {
emit_signal("validate_script");
}
-void CodeTextEditor::_notification(int p_what) {
+void CodeTextEditor::_warning_label_gui_input(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+ _warning_button_pressed();
+ }
+}
+
+void CodeTextEditor::_warning_button_pressed() {
+ _set_show_warnings_panel(!is_warnings_panel_opened);
+}
+
+void CodeTextEditor::_set_show_warnings_panel(bool p_show) {
+ is_warnings_panel_opened = p_show;
+ emit_signal("show_warnings_panel", p_show);
+}
- if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
- _load_theme_settings();
- emit_signal("load_theme_settings");
+void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+ emit_signal("error_pressed");
}
- if (p_what == NOTIFICATION_THEME_CHANGED) {
- _update_font();
+}
+
+void CodeTextEditor::_notification(int p_what) {
+
+ switch (p_what) {
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ _load_theme_settings();
+ emit_signal("load_theme_settings");
+ } break;
+ case NOTIFICATION_THEME_CHANGED: {
+ _update_font();
+ } break;
+ case NOTIFICATION_ENTER_TREE: {
+ warning_button->set_icon(get_icon("NodeWarning", "EditorIcons"));
+ add_constant_override("separation", 4 * EDSCALE);
+ } break;
+ default:
+ break;
}
}
+void CodeTextEditor::set_warning_nb(int p_warning_nb) {
+ warning_count_label->set_text(itos(p_warning_nb));
+ warning_count_label->set_visible(p_warning_nb > 0);
+ warning_button->set_visible(p_warning_nb > 0);
+ if (!p_warning_nb)
+ _set_show_warnings_panel(false);
+}
+
void CodeTextEditor::_bind_methods() {
ClassDB::bind_method("_text_editor_gui_input", &CodeTextEditor::_text_editor_gui_input);
@@ -1209,9 +1311,14 @@ void CodeTextEditor::_bind_methods() {
ClassDB::bind_method("_code_complete_timer_timeout", &CodeTextEditor::_code_complete_timer_timeout);
ClassDB::bind_method("_complete_request", &CodeTextEditor::_complete_request);
ClassDB::bind_method("_font_resize_timeout", &CodeTextEditor::_font_resize_timeout);
+ ClassDB::bind_method("_error_pressed", &CodeTextEditor::_error_pressed);
+ ClassDB::bind_method("_warning_button_pressed", &CodeTextEditor::_warning_button_pressed);
+ ClassDB::bind_method("_warning_label_gui_input", &CodeTextEditor::_warning_label_gui_input);
ADD_SIGNAL(MethodInfo("validate_script"));
ADD_SIGNAL(MethodInfo("load_theme_settings"));
+ ADD_SIGNAL(MethodInfo("show_warnings_panel"));
+ ADD_SIGNAL(MethodInfo("error_pressed"));
}
void CodeTextEditor::set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void *p_ud) {
@@ -1226,15 +1333,16 @@ CodeTextEditor::CodeTextEditor() {
ED_SHORTCUT("script_editor/zoom_out", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS);
ED_SHORTCUT("script_editor/reset_zoom", TTR("Reset Zoom"), KEY_MASK_CMD | KEY_0);
+ text_editor = memnew(TextEdit);
+ add_child(text_editor);
+ text_editor->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ // Added second so it opens at the bottom, so it won't shift the entire text editor when opening.
find_replace_bar = memnew(FindReplaceBar);
add_child(find_replace_bar);
find_replace_bar->set_h_size_flags(SIZE_EXPAND_FILL);
find_replace_bar->hide();
- text_editor = memnew(TextEdit);
- add_child(text_editor);
- text_editor->set_v_size_flags(SIZE_EXPAND_FILL);
-
find_replace_bar->set_text_edit(text_editor);
text_editor->set_show_line_numbers(true);
@@ -1244,6 +1352,7 @@ CodeTextEditor::CodeTextEditor() {
status_bar = memnew(HBoxContainer);
add_child(status_bar);
status_bar->set_h_size_flags(SIZE_EXPAND_FILL);
+ status_bar->set_custom_minimum_size(Size2(0, 24 * EDSCALE)); // Adjust for the height of the warning icon.
idle = memnew(Timer);
add_child(idle);
@@ -1258,95 +1367,51 @@ CodeTextEditor::CodeTextEditor() {
error_line = 0;
error_column = 0;
+ // Error
+ ScrollContainer *scroll = memnew(ScrollContainer);
+ scroll->set_h_size_flags(SIZE_EXPAND_FILL);
+ scroll->set_v_size_flags(SIZE_EXPAND_FILL);
+ scroll->set_enable_v_scroll(false);
+ status_bar->add_child(scroll);
+
error = memnew(Label);
- status_bar->add_child(error);
- error->set_autowrap(true);
- error->set_valign(Label::VALIGN_CENTER);
- error->set_h_size_flags(SIZE_EXPAND_FILL); //required for it to display, given now it's clipping contents, do not touch
+ scroll->add_child(error);
+ error->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
error->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
error->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
error->set_mouse_filter(MOUSE_FILTER_STOP);
+ error->connect("gui_input", this, "_error_pressed");
find_replace_bar->connect("error", error, "set_text");
- status_bar->add_child(memnew(Label)); //to keep the height if the other labels are not visible
-
- warning_label = memnew(Label);
- status_bar->add_child(warning_label);
- warning_label->set_align(Label::ALIGN_RIGHT);
- warning_label->set_valign(Label::VALIGN_CENTER);
- warning_label->set_v_size_flags(SIZE_FILL);
- warning_label->set_default_cursor_shape(CURSOR_POINTING_HAND);
- warning_label->set_mouse_filter(MOUSE_FILTER_STOP);
- warning_label->set_text(TTR("Warnings:"));
- warning_label->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
+ // Warnings
+ warning_button = memnew(ToolButton);
+ status_bar->add_child(warning_button);
+ warning_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
+ warning_button->set_default_cursor_shape(CURSOR_POINTING_HAND);
+ warning_button->connect("pressed", this, "_warning_button_pressed");
+ warning_button->set_tooltip(TTR("Warnings"));
warning_count_label = memnew(Label);
status_bar->add_child(warning_count_label);
- warning_count_label->set_valign(Label::VALIGN_CENTER);
- warning_count_label->set_v_size_flags(SIZE_FILL);
- warning_count_label->set_autowrap(true); // workaround to prevent resizing the label on each change, do not touch
- warning_count_label->set_clip_text(true); // workaround to prevent resizing the label on each change, do not touch
- warning_count_label->set_custom_minimum_size(Size2(40, 1) * EDSCALE);
+ warning_count_label->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
warning_count_label->set_align(Label::ALIGN_RIGHT);
warning_count_label->set_default_cursor_shape(CURSOR_POINTING_HAND);
warning_count_label->set_mouse_filter(MOUSE_FILTER_STOP);
+ warning_count_label->set_tooltip(TTR("Warnings"));
+ warning_count_label->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("warning_color", "Editor"));
warning_count_label->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
- warning_count_label->set_text("0");
-
- Label *font_size_txt = memnew(Label);
- status_bar->add_child(font_size_txt);
- font_size_txt->set_align(Label::ALIGN_RIGHT);
- font_size_txt->set_valign(Label::VALIGN_CENTER);
- font_size_txt->set_v_size_flags(SIZE_FILL);
- font_size_txt->set_text(TTR("Font Size:"));
- font_size_txt->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
-
- font_size_nb = memnew(Label);
- status_bar->add_child(font_size_nb);
- font_size_nb->set_valign(Label::VALIGN_CENTER);
- font_size_nb->set_v_size_flags(SIZE_FILL);
- font_size_nb->set_autowrap(true); // workaround to prevent resizing the label on each change, do not touch
- font_size_nb->set_clip_text(true); // workaround to prevent resizing the label on each change, do not touch
- font_size_nb->set_custom_minimum_size(Size2(100, 1) * EDSCALE);
- font_size_nb->set_align(Label::ALIGN_RIGHT);
- font_size_nb->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
-
- Label *line_txt = memnew(Label);
- status_bar->add_child(line_txt);
- line_txt->set_align(Label::ALIGN_RIGHT);
- line_txt->set_valign(Label::VALIGN_CENTER);
- line_txt->set_v_size_flags(SIZE_FILL);
- line_txt->set_text(TTR("Line:"));
- line_txt->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
-
- line_nb = memnew(Label);
- status_bar->add_child(line_nb);
- line_nb->set_valign(Label::VALIGN_CENTER);
- line_nb->set_v_size_flags(SIZE_FILL);
- line_nb->set_autowrap(true); // workaround to prevent resizing the label on each change, do not touch
- line_nb->set_clip_text(true); // workaround to prevent resizing the label on each change, do not touch
- line_nb->set_custom_minimum_size(Size2(40, 1) * EDSCALE);
- line_nb->set_align(Label::ALIGN_RIGHT);
- line_nb->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
-
- Label *col_txt = memnew(Label);
- status_bar->add_child(col_txt);
- col_txt->set_align(Label::ALIGN_RIGHT);
- col_txt->set_valign(Label::VALIGN_CENTER);
- col_txt->set_v_size_flags(SIZE_FILL);
- col_txt->set_text(TTR("Col:"));
- col_txt->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
-
- col_nb = memnew(Label);
- status_bar->add_child(col_nb);
- col_nb->set_valign(Label::VALIGN_CENTER);
- col_nb->set_v_size_flags(SIZE_FILL);
- col_nb->set_autowrap(true); // workaround to prevent resizing the label on each change, do not touch
- col_nb->set_clip_text(true); // workaround to prevent resizing the label on each change, do not touch
- col_nb->set_custom_minimum_size(Size2(40, 1) * EDSCALE);
- col_nb->set_align(Label::ALIGN_RIGHT);
- col_nb->set("custom_constants/margin_right", 0);
- col_nb->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
+ warning_count_label->connect("gui_input", this, "_warning_label_gui_input");
+
+ is_warnings_panel_opened = false;
+ set_warning_nb(0);
+
+ // Line and column
+ line_and_col_txt = memnew(Label);
+ status_bar->add_child(line_and_col_txt);
+ line_and_col_txt->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
+ line_and_col_txt->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
+ line_and_col_txt->set_tooltip(TTR("Line and column numbers."));
+ line_and_col_txt->set_mouse_filter(MOUSE_FILTER_STOP);
text_editor->connect("gui_input", this, "_text_editor_gui_input");
text_editor->connect("cursor_changed", this, "_line_col_changed");
@@ -1365,7 +1430,6 @@ CodeTextEditor::CodeTextEditor() {
font_resize_val = 0;
font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size");
- font_size_nb->set_text(itos(font_size) + " (" + itos(100 * font_size / (14 * EDSCALE)) + "%)");
font_resize_timer = memnew(Timer);
add_child(font_resize_timer);
font_resize_timer->set_one_shot(true);
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 96fc5b79e5..e3dbfe1ce0 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -63,7 +63,6 @@ class FindReplaceBar : public HBoxContainer {
GDCLASS(FindReplaceBar, HBoxContainer);
- MarginContainer *container;
LineEdit *search_text;
ToolButton *find_prev;
ToolButton *find_next;
@@ -76,7 +75,6 @@ class FindReplaceBar : public HBoxContainer {
Button *replace_all;
CheckBox *selection_only;
- HBoxContainer *hbc;
VBoxContainer *vbc_lineedit;
HBoxContainer *hbc_button_replace;
HBoxContainer *hbc_option_replace;
@@ -142,12 +140,12 @@ class CodeTextEditor : public VBoxContainer {
TextEdit *text_editor;
FindReplaceBar *find_replace_bar;
HBoxContainer *status_bar;
- Label *warning_label;
+
+ ToolButton *warning_button;
Label *warning_count_label;
- Label *line_nb;
- Label *col_nb;
- Label *font_size_nb;
+ Label *line_and_col_txt;
+
Label *info;
Timer *idle;
Timer *code_complete_timer;
@@ -176,6 +174,11 @@ class CodeTextEditor : public VBoxContainer {
CodeTextEditorCodeCompleteFunc code_complete_func;
void *code_complete_ud;
+ void _warning_label_gui_input(const Ref<InputEvent> &p_event);
+ void _warning_button_pressed();
+ void _set_show_warnings_panel(bool p_show);
+ void _error_pressed(const Ref<InputEvent> &p_event);
+
protected:
virtual void _load_theme_settings() {}
virtual void _validate_script() {}
@@ -188,6 +191,8 @@ protected:
void _notification(int);
static void _bind_methods();
+ bool is_warnings_panel_opened;
+
public:
void trim_trailing_whitespace();
@@ -206,21 +211,24 @@ public:
void delete_lines();
void clone_lines_down();
+ /// Toggle inline comment on currently selected lines, or on current line if nothing is selected,
+ /// by adding or removing comment delimiter
+ void toggle_inline_comment(const String &delimiter);
+
void goto_line(int p_line);
void goto_line_selection(int p_line, int p_begin, int p_end);
Variant get_edit_state();
void set_edit_state(const Variant &p_state);
+ void set_warning_nb(int p_warning_nb);
+
void update_editor_settings();
void set_error(const String &p_error);
void set_error_pos(int p_line, int p_column);
void update_line_and_column() { _line_col_changed(); }
TextEdit *get_text_edit() { return text_editor; }
FindReplaceBar *get_find_replace_bar() { return find_replace_bar; }
- Label *get_error_label() const { return error; }
- Label *get_warning_label() const { return warning_label; }
- Label *get_warning_count_label() const { return warning_count_label; }
virtual void apply_code() {}
void goto_error();
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp
index d004e30fb8..94e6d4ded0 100644
--- a/editor/collada/collada.cpp
+++ b/editor/collada/collada.cpp
@@ -2071,17 +2071,17 @@ void Collada::_parse_library(XMLParser &parser) {
} else if (name == "geometry") {
String id = parser.get_attribute_value("id");
- String name = parser.get_attribute_value_safe("name");
+ String name2 = parser.get_attribute_value_safe("name");
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "mesh") {
- state.mesh_name_map[id] = (name != "") ? name : id;
- _parse_mesh_geometry(parser, id, name);
+ state.mesh_name_map[id] = (name2 != "") ? name2 : id;
+ _parse_mesh_geometry(parser, id, name2);
} else if (parser.get_node_name() == "spline") {
- state.mesh_name_map[id] = (name != "") ? name : id;
- _parse_curve_geometry(parser, id, name);
+ state.mesh_name_map[id] = (name2 != "") ? name2 : id;
+ _parse_curve_geometry(parser, id, name2);
} else if (!parser.is_empty())
parser.skip_section();
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "geometry")
@@ -2356,9 +2356,8 @@ bool Collada::_optimize_skeletons(VisualScene *p_vscene, Node *p_node) {
bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, List<Node *> *p_mgeom) {
- // bind shape matrix escala los huesos y los hace gigantes, asi la matriz despues achica
- // al modelo?
- // solucion: aplicarle la bind shape matrix a los VERTICES, y si el objeto viene con escala, se la dejo me parece!
+ // Bind Shape Matrix scales the bones and makes them gigantic, so the matrix then shrinks the model?
+ // Solution: apply the Bind Shape Matrix to the VERTICES, and if the object comes scaled, it seems to be left alone!
if (p_node->type == Node::TYPE_GEOMETRY) {
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 7a5ebc5c00..f775a0a14b 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -766,7 +766,7 @@ void ConnectionsDock::update_tree() {
while (base) {
- List<MethodInfo> node_signals;
+ List<MethodInfo> node_signals2;
Ref<Texture> icon;
String name;
@@ -774,7 +774,7 @@ void ConnectionsDock::update_tree() {
Ref<Script> scr = selectedNode->get_script();
if (scr.is_valid()) {
- scr->get_script_signal_list(&node_signals);
+ scr->get_script_signal_list(&node_signals2);
if (scr->get_path().is_resource_file())
name = scr->get_path().get_file();
else
@@ -787,7 +787,7 @@ void ConnectionsDock::update_tree() {
} else {
- ClassDB::get_signal_list(base, &node_signals, true);
+ ClassDB::get_signal_list(base, &node_signals2, true);
if (has_icon(base, "EditorIcons")) {
icon = get_icon(base, "EditorIcons");
}
@@ -796,17 +796,17 @@ void ConnectionsDock::update_tree() {
TreeItem *pitem = NULL;
- if (node_signals.size()) {
+ if (node_signals2.size()) {
pitem = tree->create_item(root);
pitem->set_text(0, name);
pitem->set_icon(0, icon);
pitem->set_selectable(0, false);
pitem->set_editable(0, false);
pitem->set_custom_bg_color(0, get_color("prop_subsection", "Editor"));
- node_signals.sort();
+ node_signals2.sort();
}
- for (List<MethodInfo>::Element *E = node_signals.front(); E; E = E->next()) {
+ for (List<MethodInfo>::Element *E = node_signals2.front(); E; E = E->next()) {
MethodInfo &mi = E->get();
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 3c2bfdc04d..364c5126d7 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -113,18 +113,6 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode) {
_update_search();
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- search_options->add_constant_override("draw_relationship_lines", 1);
- search_options->add_color_override("relationship_line_color", rl_color);
- search_options->add_constant_override("draw_guides", 0);
- } else {
- search_options->add_constant_override("draw_relationship_lines", 0);
- search_options->add_constant_override("draw_guides", 1);
- }
-
is_replace_mode = p_replace_mode;
if (p_replace_mode) {
@@ -216,7 +204,7 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p
if (cpp_type) {
String cpp_to_select_type = to_select_type;
if (ScriptServer::is_global_class(to_select_type))
- cpp_to_select_type = ScriptServer::get_global_class_base(to_select_type);
+ cpp_to_select_type = ScriptServer::get_global_class_native_base(to_select_type);
current_item_is_preferred = ClassDB::is_parent_class(p_type, preferred_search_result_type) && !ClassDB::is_parent_class(cpp_to_select_type, preferred_search_result_type);
} else {
current_item_is_preferred = ed.script_class_is_parent(p_type, preferred_search_result_type) && !ed.script_class_is_parent(to_select_type, preferred_search_result_type) && search_box->get_text() != to_select_type;
@@ -299,15 +287,15 @@ void CreateDialog::_update_search() {
} else {
bool found = false;
- String type = I->get();
- while (type != "" && (cpp_type ? ClassDB::is_parent_class(type, base_type) : ed.script_class_is_parent(type, base_type)) && type != base_type) {
- if (search_box->get_text().is_subsequence_ofi(type)) {
+ String type2 = I->get();
+ while (type2 != "" && (cpp_type ? ClassDB::is_parent_class(type2, base_type) : ed.script_class_is_parent(type2, base_type)) && type2 != base_type) {
+ if (search_box->get_text().is_subsequence_ofi(type2)) {
found = true;
break;
}
- type = cpp_type ? ClassDB::get_parent_class(type) : ed.script_class_get_base(type);
+ type2 = cpp_type ? ClassDB::get_parent_class(type2) : ed.script_class_get_base(type2);
}
if (found)
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index f9f1e455f5..f559eb6cb2 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -475,7 +475,6 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector<
Vector<RemovedDependency> removed_deps;
_find_all_removed_dependencies(EditorFileSystem::get_singleton()->get_filesystem(), removed_deps);
removed_deps.sort();
-
if (removed_deps.empty()) {
owners->hide();
text->set_text(TTR("Remove selected files from the project? (no undo)"));
@@ -486,6 +485,7 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector<
text->set_text(TTR("The files being removed are required by other resources in order for them to work.\nRemove them anyway? (no undo)"));
popup_centered_minsize(Size2(500, 350));
}
+ EditorFileSystem::get_singleton()->scan_changes();
}
void DependencyRemoveDialog::ok_pressed() {
@@ -496,11 +496,15 @@ void DependencyRemoveDialog::ok_pressed() {
res->set_path("");
}
- // If the file we are deleting is the main scene, clear its definition.
+ // If the file we are deleting is the main scene or default environment, clear its definition.
if (files_to_delete[i] == ProjectSettings::get_singleton()->get("application/run/main_scene")) {
ProjectSettings::get_singleton()->set("application/run/main_scene", "");
}
+ if (files_to_delete[i] == ProjectSettings::get_singleton()->get("rendering/environment/default_environment")) {
+ ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
+ }
+
String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/");
print_verbose("Moving to trash: " + path);
Error err = OS::get_singleton()->move_to_trash(path);
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp
index 483f5ae2d0..9f4096ca02 100644
--- a/editor/dictionary_property_edit.cpp
+++ b/editor/dictionary_property_edit.cpp
@@ -102,12 +102,17 @@ Node *DictionaryPropertyEdit::get_node() {
return cast_to<Node>(o);
}
+bool DictionaryPropertyEdit::_dont_undo_redo() {
+ return true;
+}
+
void DictionaryPropertyEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_key"), &DictionaryPropertyEdit::_set_key);
ClassDB::bind_method(D_METHOD("_set_value"), &DictionaryPropertyEdit::_set_value);
ClassDB::bind_method(D_METHOD("_notif_change"), &DictionaryPropertyEdit::_notif_change);
ClassDB::bind_method(D_METHOD("_notif_changev"), &DictionaryPropertyEdit::_notif_changev);
+ ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &DictionaryPropertyEdit::_dont_undo_redo);
}
bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
diff --git a/editor/dictionary_property_edit.h b/editor/dictionary_property_edit.h
index f6bd13785a..a2a81c261c 100644
--- a/editor/dictionary_property_edit.h
+++ b/editor/dictionary_property_edit.h
@@ -46,6 +46,8 @@ class DictionaryPropertyEdit : public Reference {
Variant get_dictionary() const;
+ bool _dont_undo_redo();
+
protected:
static void _bind_methods();
bool _set(const StringName &p_name, const Variant &p_value);
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 24a746d159..8f1d0d9677 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -497,9 +497,9 @@ void DocData::generate(bool p_basic_types) {
method.name = mi.name;
- for (int i = 0; i < mi.arguments.size(); i++) {
+ for (int j = 0; j < mi.arguments.size(); j++) {
- PropertyInfo arginfo = mi.arguments[i];
+ PropertyInfo arginfo = mi.arguments[j];
ArgumentDoc ad;
ad.name = arginfo.name;
@@ -509,7 +509,7 @@ void DocData::generate(bool p_basic_types) {
else
ad.type = Variant::get_type_name(arginfo.type);
- int defarg = mi.default_arguments.size() - mi.arguments.size() + i;
+ int defarg = mi.default_arguments.size() - mi.arguments.size() + j;
if (defarg >= 0)
ad.default_value = mi.default_arguments[defarg];
@@ -620,12 +620,12 @@ void DocData::generate(bool p_basic_types) {
return_doc_from_retinfo(md, mi.return_val);
- for (int i = 0; i < mi.arguments.size(); i++) {
+ for (int j = 0; j < mi.arguments.size(); j++) {
ArgumentDoc ad;
- argument_doc_from_arginfo(ad, mi.arguments[i]);
+ argument_doc_from_arginfo(ad, mi.arguments[j]);
- int darg_idx = i - (mi.arguments.size() - mi.default_arguments.size());
+ int darg_idx = j - (mi.arguments.size() - mi.default_arguments.size());
if (darg_idx >= 0) {
Variant default_arg = E->get().default_arguments[darg_idx];
@@ -734,9 +734,9 @@ Error DocData::load_classes(const String &p_dir) {
while (path != String()) {
if (!isdir && path.ends_with("xml")) {
Ref<XMLParser> parser = memnew(XMLParser);
- Error err = parser->open(p_dir.plus_file(path));
- if (err)
- return err;
+ Error err2 = parser->open(p_dir.plus_file(path));
+ if (err2)
+ return err2;
_load(parser);
}
@@ -806,78 +806,78 @@ Error DocData::_load(Ref<XMLParser> parser) {
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
- String name = parser->get_node_name();
+ String name2 = parser->get_node_name();
- if (name == "brief_description") {
+ if (name2 == "brief_description") {
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
c.brief_description = parser->get_node_data();
- } else if (name == "description") {
+ } else if (name2 == "description") {
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
c.description = parser->get_node_data();
- } else if (name == "tutorials") {
+ } else if (name2 == "tutorials") {
while (parser->read() == OK) {
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
- String name = parser->get_node_name();
+ String name3 = parser->get_node_name();
- if (name == "link") {
+ if (name3 == "link") {
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
c.tutorials.push_back(parser->get_node_data().strip_edges());
} else {
- ERR_EXPLAIN("Invalid tag in doc file: " + name);
+ ERR_EXPLAIN("Invalid tag in doc file: " + name3);
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
} else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "tutorials")
break; //end of <tutorials>
}
- } else if (name == "demos") {
+ } else if (name2 == "demos") {
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
c.demos = parser->get_node_data();
- } else if (name == "methods") {
+ } else if (name2 == "methods") {
- Error err = _parse_methods(parser, c.methods);
- ERR_FAIL_COND_V(err, err);
+ Error err2 = _parse_methods(parser, c.methods);
+ ERR_FAIL_COND_V(err2, err2);
- } else if (name == "signals") {
+ } else if (name2 == "signals") {
- Error err = _parse_methods(parser, c.signals);
- ERR_FAIL_COND_V(err, err);
- } else if (name == "members") {
+ Error err2 = _parse_methods(parser, c.signals);
+ ERR_FAIL_COND_V(err2, err2);
+ } else if (name2 == "members") {
while (parser->read() == OK) {
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
- String name = parser->get_node_name();
+ String name3 = parser->get_node_name();
- if (name == "member") {
+ if (name3 == "member") {
- PropertyDoc prop;
+ PropertyDoc prop2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- prop.name = parser->get_attribute_value("name");
+ prop2.name = parser->get_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
- prop.type = parser->get_attribute_value("type");
+ prop2.type = parser->get_attribute_value("type");
if (parser->has_attribute("setter"))
- prop.setter = parser->get_attribute_value("setter");
+ prop2.setter = parser->get_attribute_value("setter");
if (parser->has_attribute("getter"))
- prop.getter = parser->get_attribute_value("getter");
+ prop2.getter = parser->get_attribute_value("getter");
if (parser->has_attribute("enum"))
- prop.enumeration = parser->get_attribute_value("enum");
+ prop2.enumeration = parser->get_attribute_value("enum");
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
- prop.description = parser->get_node_data();
- c.properties.push_back(prop);
+ prop2.description = parser->get_node_data();
+ c.properties.push_back(prop2);
} else {
- ERR_EXPLAIN("Invalid tag in doc file: " + name);
+ ERR_EXPLAIN("Invalid tag in doc file: " + name3);
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
@@ -885,28 +885,28 @@ Error DocData::_load(Ref<XMLParser> parser) {
break; //end of <constants>
}
- } else if (name == "theme_items") {
+ } else if (name2 == "theme_items") {
while (parser->read() == OK) {
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
- String name = parser->get_node_name();
+ String name3 = parser->get_node_name();
- if (name == "theme_item") {
+ if (name3 == "theme_item") {
- PropertyDoc prop;
+ PropertyDoc prop2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- prop.name = parser->get_attribute_value("name");
+ prop2.name = parser->get_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
- prop.type = parser->get_attribute_value("type");
+ prop2.type = parser->get_attribute_value("type");
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
- prop.description = parser->get_node_data();
- c.theme_properties.push_back(prop);
+ prop2.description = parser->get_node_data();
+ c.theme_properties.push_back(prop2);
} else {
- ERR_EXPLAIN("Invalid tag in doc file: " + name);
+ ERR_EXPLAIN("Invalid tag in doc file: " + name3);
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
@@ -914,30 +914,30 @@ Error DocData::_load(Ref<XMLParser> parser) {
break; //end of <constants>
}
- } else if (name == "constants") {
+ } else if (name2 == "constants") {
while (parser->read() == OK) {
if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
- String name = parser->get_node_name();
+ String name3 = parser->get_node_name();
- if (name == "constant") {
+ if (name3 == "constant") {
- ConstantDoc constant;
+ ConstantDoc constant2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- constant.name = parser->get_attribute_value("name");
+ constant2.name = parser->get_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("value"), ERR_FILE_CORRUPT);
- constant.value = parser->get_attribute_value("value");
+ constant2.value = parser->get_attribute_value("value");
if (parser->has_attribute("enum")) {
- constant.enumeration = parser->get_attribute_value("enum");
+ constant2.enumeration = parser->get_attribute_value("enum");
}
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
- constant.description = parser->get_node_data();
- c.constants.push_back(constant);
+ constant2.description = parser->get_node_data();
+ c.constants.push_back(constant2);
} else {
- ERR_EXPLAIN("Invalid tag in doc file: " + name);
+ ERR_EXPLAIN("Invalid tag in doc file: " + name3);
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
@@ -947,7 +947,7 @@ Error DocData::_load(Ref<XMLParser> parser) {
} else {
- ERR_EXPLAIN("Invalid tag in doc file: " + name);
+ ERR_EXPLAIN("Invalid tag in doc file: " + name2);
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 6593eb8f03..29e9cd01c5 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -365,7 +365,7 @@ void EditorAudioBus::_send_selected(int p_which) {
updating_bus = true;
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Select Audio Bus Send");
+ ur->create_action(TTR("Select Audio Bus Send"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_send", get_index(), send->get_item_text(p_which));
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_send", get_index(), AudioServer::get_singleton()->get_bus_send(get_index()));
ur->add_do_method(buses, "_update_bus", get_index());
@@ -385,9 +385,9 @@ void EditorAudioBus::_effect_selected() {
if (effect->get_metadata(0) != Variant()) {
int index = effect->get_metadata(0);
- Ref<AudioEffect> effect = AudioServer::get_singleton()->get_bus_effect(get_index(), index);
- if (effect.is_valid()) {
- EditorNode::get_singleton()->push_item(effect.ptr());
+ Ref<AudioEffect> effect2 = AudioServer::get_singleton()->get_bus_effect(get_index(), index);
+ if (effect2.is_valid()) {
+ EditorNode::get_singleton()->push_item(effect2.ptr());
}
}
@@ -1165,7 +1165,7 @@ EditorAudioBuses::EditorAudioBuses() {
add = memnew(Button);
top_hb->add_child(add);
add->set_text(TTR("Add Bus"));
- add->set_tooltip(TTR("Create a new Bus Layout."));
+ add->set_tooltip(TTR("Add a new Audio Bus to this layout."));
add->connect("pressed", this, "_add_bus");
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 9534410590..2f2b0d2cba 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -598,8 +598,8 @@ void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &
int i = 0;
- for (List<AutoLoadInfo>::Element *E = autoload_cache.front(); E; E = E->next()) {
- orders.write[i++] = E->get().order;
+ for (List<AutoLoadInfo>::Element *F = autoload_cache.front(); F; F = F->next()) {
+ orders.write[i++] = F->get().order;
}
orders.sort();
@@ -610,9 +610,9 @@ void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &
i = 0;
- for (List<AutoLoadInfo>::Element *E = autoload_cache.front(); E; E = E->next()) {
- undo_redo->add_do_method(ProjectSettings::get_singleton(), "set_order", "autoload/" + E->get().name, orders[i++]);
- undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", "autoload/" + E->get().name, E->get().order);
+ for (List<AutoLoadInfo>::Element *F = autoload_cache.front(); F; F = F->next()) {
+ undo_redo->add_do_method(ProjectSettings::get_singleton(), "set_order", "autoload/" + F->get().name, orders[i++]);
+ undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", "autoload/" + F->get().name, F->get().order);
}
orders.clear();
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index b87b80dafd..f61a831015 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -895,7 +895,7 @@ StringName EditorData::script_class_get_base(const String &p_class) const {
Object *EditorData::script_class_instance(const String &p_class) {
if (ScriptServer::is_global_class(p_class)) {
- Object *obj = ClassDB::instance(ScriptServer::get_global_class_base(p_class));
+ Object *obj = ClassDB::instance(ScriptServer::get_global_class_native_base(p_class));
if (obj) {
RES script = ResourceLoader::load(ScriptServer::get_global_class_path(p_class));
if (script.is_valid())
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 7c99318dca..dc43faeff1 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -42,7 +42,7 @@
#include "editor/plugins/script_editor_plugin.h"
#include "editor_node.h"
#include "editor_settings.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include "thirdparty/misc/md5.h"
static int _get_pad(int p_alignment, int p_n) {
@@ -858,7 +858,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Vector<uint8_t> array = FileAccess::get_file_as_array(icon);
p_func(p_udata, icon, array, idx, total);
}
- if (splash != String() && FileAccess::exists(splash)) {
+ if (splash != String() && FileAccess::exists(splash) && icon != splash) {
Vector<uint8_t> array = FileAccess::get_file_as_array(splash);
p_func(p_udata, splash, array, idx, total);
}
@@ -1160,6 +1160,30 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
export_presets.insert(p_at_pos, p_preset);
}
+String EditorExportPlatform::test_etc2() const {
+
+ String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
+ bool driver_fallback = ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2");
+ bool etc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc");
+ bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2");
+
+ if (driver == "GLES2" && !etc_supported) {
+ return TTR("Target platform requires 'ETC' texture compression for GLES2. Enable 'Import Etc' in Project Settings.");
+ } else if (driver == "GLES3") {
+ String err;
+ if (!etc2_supported) {
+ err += TTR("Target platform requires 'ETC2' texture compression for GLES3. Enable 'Import Etc 2' in Project Settings.");
+ }
+ if (driver_fallback && !etc_supported) {
+ if (err != String())
+ err += "\n";
+ err += TTR("Target platform requires 'ETC' texture compression for the driver fallback to GLES2.\nEnable 'Import Etc' in Project Settings, or disable 'Driver Fallback Enabled'.");
+ }
+ return err;
+ }
+ return String();
+}
+
int EditorExport::get_export_preset_count() const {
return export_presets.size();
@@ -1442,6 +1466,10 @@ List<String> EditorExportPlatformPC::get_binary_extensions(const Ref<EditorExpor
Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
+ if (!DirAccess::exists(p_path.get_base_dir())) {
+ return ERR_FILE_BAD_PATH;
+ }
+
String custom_debug = p_preset->get("custom_template/debug");
String custom_release = p_preset->get("custom_template/release");
diff --git a/editor/editor_export.h b/editor/editor_export.h
index c7c2b76327..bd864c528c 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -258,6 +258,7 @@ public:
virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, int p_debug_flags) { return OK; }
virtual Ref<Texture> get_run_icon() const { return get_logo(); }
+ String test_etc2() const; //generic test for etc2 since most platforms use it
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0;
virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const = 0;
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 765a330aaf..4c9f58f312 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -75,7 +75,7 @@ void EditorFileDialog::_notification(int p_what) {
preview_wheel_index++;
if (preview_wheel_index >= 8)
preview_wheel_index = 0;
- Ref<Texture> frame = get_icon("WaitPreview" + itos(preview_wheel_index + 1), "EditorIcons");
+ Ref<Texture> frame = get_icon("Progress" + itos(preview_wheel_index + 1), "EditorIcons");
preview->set_texture(frame);
preview_wheel_timeout = 0.1;
}
@@ -323,11 +323,10 @@ void EditorFileDialog::_request_single_thumbnail(const String &p_path) {
if (!FileAccess::exists(p_path))
return;
- EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, this, "_thumbnail_done", p_path);
-
set_process(true);
preview_waiting = true;
preview_wheel_timeout = 0;
+ EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, this, "_thumbnail_done", p_path);
}
void EditorFileDialog::_action_pressed() {
@@ -853,7 +852,7 @@ void EditorFileDialog::update_file_list() {
fav_down->set_disabled(true);
get_ok()->set_disabled(_is_open_should_be_disabled());
for (int i = 0; i < favorites->get_item_count(); i++) {
- if (favorites->get_item_metadata(i) == cdir) {
+ if (favorites->get_item_metadata(i) == cdir || favorites->get_item_metadata(i) == cdir + "/") {
favorites->select(i);
favorite->set_pressed(true);
if (i > 0) {
@@ -1206,8 +1205,10 @@ void EditorFileDialog::_update_favorites() {
if (name == current)
setthis = true;
name = "/";
+
+ favorites->add_item(name, folder_icon);
} else if (name.ends_with("/")) {
- if (name == current)
+ if (name == current || name == current + "/")
setthis = true;
name = name.substr(0, name.length() - 1);
name = name.get_file();
@@ -1230,6 +1231,8 @@ void EditorFileDialog::_favorite_toggled(bool p_toggle) {
bool res = access == ACCESS_RESOURCES;
String cd = get_current_dir();
+ if (!cd.ends_with("/"))
+ cd += "/";
Vector<String> favorited = EditorSettings::get_singleton()->get_favorites();
@@ -1245,13 +1248,10 @@ void EditorFileDialog::_favorite_toggled(bool p_toggle) {
}
}
- if (found) {
+ if (found)
favorited.erase(cd);
- favorite->set_pressed(false);
- } else {
+ else
favorited.push_back(cd);
- favorite->set_pressed(true);
- }
EditorSettings::get_singleton()->set_favorites(favorited);
@@ -1495,7 +1495,9 @@ EditorFileDialog::EditorFileDialog() {
HBoxContainer *pathhb = memnew(HBoxContainer);
dir_prev = memnew(ToolButton);
+ dir_prev->set_tooltip(TTR("Previous Folder"));
dir_next = memnew(ToolButton);
+ dir_next->set_tooltip(TTR("Next Folder"));
dir_up = memnew(ToolButton);
dir_up->set_tooltip(TTR("Go to parent folder"));
@@ -1514,12 +1516,14 @@ EditorFileDialog::EditorFileDialog() {
dir->set_h_size_flags(SIZE_EXPAND_FILL);
refresh = memnew(ToolButton);
+ refresh->set_tooltip(TTR("Refresh"));
refresh->connect("pressed", this, "_update_file_list");
pathhb->add_child(refresh);
favorite = memnew(ToolButton);
favorite->set_flat(true);
favorite->set_toggle_mode(true);
+ favorite->set_tooltip(TTR("(Un)favorite current folder."));
favorite->connect("toggled", this, "_favorite_toggled");
pathhb->add_child(favorite);
@@ -1533,6 +1537,7 @@ EditorFileDialog::EditorFileDialog() {
mode_thumbnails->set_toggle_mode(true);
mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS);
mode_thumbnails->set_button_group(view_mode_group);
+ mode_thumbnails->set_tooltip(TTR("View items as a grid of thumbnails."));
pathhb->add_child(mode_thumbnails);
mode_list = memnew(ToolButton);
@@ -1540,6 +1545,7 @@ EditorFileDialog::EditorFileDialog() {
mode_list->set_toggle_mode(true);
mode_list->set_pressed(display_mode == DISPLAY_LIST);
mode_list->set_button_group(view_mode_group);
+ mode_list->set_tooltip(TTR("View items as a list."));
pathhb->add_child(mode_list);
drives = memnew(OptionButton);
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index fe8d57d1a1..3d9d5e26be 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -30,7 +30,7 @@
#include "editor_file_system.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/os/file_access.h"
@@ -42,6 +42,8 @@
#include "editor_settings.h"
EditorFileSystem *EditorFileSystem::singleton = NULL;
+//the name is the version, to keep compatibility with different versions of Godot
+#define CACHE_FILE_NAME "filesystem_cache5"
void EditorFileSystemDirectory::sort_files() {
@@ -203,14 +205,30 @@ void EditorFileSystem::_scan_filesystem() {
String project = ProjectSettings::get_singleton()->get_resource_path();
- String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_cache4");
+ String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
FileAccess *f = FileAccess::open(fscache, FileAccess::READ);
+ bool first = true;
if (f) {
//read the disk cache
while (!f->eof_reached()) {
String l = f->get_line().strip_edges();
+ if (first) {
+ if (first_scan) {
+ // only use this on first scan, afterwards it gets ignored
+ // this is so on first reimport we synchronize versions, then
+ // we dont care until editor restart. This is for usability mainly so
+ // your workflow is not killed after changing a setting by forceful reimporting
+ // everything there is.
+ filesystem_settings_version_for_import = l.strip_edges();
+ if (filesystem_settings_version_for_import != ResourceFormatImporter::get_singleton()->get_import_settings_hash()) {
+ revalidate_import_files = true;
+ }
+ }
+ first = false;
+ continue;
+ }
if (l == String())
continue;
@@ -260,12 +278,12 @@ void EditorFileSystem::_scan_filesystem() {
if (FileAccess::exists(update_cache)) {
{
- FileAccessRef f = FileAccess::open(update_cache, FileAccess::READ);
- String l = f->get_line().strip_edges();
+ FileAccessRef f2 = FileAccess::open(update_cache, FileAccess::READ);
+ String l = f2->get_line().strip_edges();
while (l != String()) {
file_cache.erase(l); //erase cache for this, so it gets updated
- l = f->get_line().strip_edges();
+ l = f2->get_line().strip_edges();
}
}
@@ -291,25 +309,22 @@ void EditorFileSystem::_scan_filesystem() {
memdelete(d);
- f = FileAccess::open(fscache, FileAccess::WRITE);
- if (f == NULL) {
- ERR_PRINTS("Error writing fscache: " + fscache);
- } else {
- _save_filesystem_cache(new_filesystem, f);
- f->close();
- memdelete(f);
+ if (!first_scan) {
+ //on the first scan this is done from the main thread after re-importing
+ _save_filesystem_cache();
}
scanning = false;
}
void EditorFileSystem::_save_filesystem_cache() {
- String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_cache4");
+ String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
FileAccess *f = FileAccess::open(fscache, FileAccess::WRITE);
if (f == NULL) {
ERR_PRINTS("Error writing fscache: " + fscache);
} else {
+ f->store_line(filesystem_settings_version_for_import);
_save_filesystem_cache(filesystem, f);
f->close();
memdelete(f);
@@ -327,6 +342,15 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
if (!reimport_on_missing_imported_files && p_only_imported_files)
return false;
+ if (!FileAccess::exists(p_path + ".import")) {
+ return true;
+ }
+
+ if (!ResourceFormatImporter::get_singleton()->are_import_settings_valid(p_path)) {
+ //reimport settings are not valid, reimport
+ return true;
+ }
+
Error err;
FileAccess *f = FileAccess::open(p_path + ".import", FileAccess::READ, &err);
@@ -562,6 +586,13 @@ bool EditorFileSystem::_update_scan_actions() {
reimport_files(reimports);
}
+ if (first_scan) {
+ //only on first scan this is valid and updated, then settings changed.
+ revalidate_import_files = false;
+ filesystem_settings_version_for_import = ResourceFormatImporter::get_singleton()->get_import_settings_hash();
+ _save_filesystem_cache();
+ }
+
if (reloads.size()) {
emit_signal("resources_reload", reloads);
}
@@ -595,7 +626,7 @@ void EditorFileSystem::scan() {
emit_signal("filesystem_changed");
emit_signal("sources_changed", sources_changed.size() > 0);
_queue_update_script_classes();
-
+ first_scan = false;
} else {
ERR_FAIL_COND(thread);
@@ -686,17 +717,17 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
_scan_new_dir(efd, da, p_progress.get_sub(idx, total));
- int idx = 0;
+ int idx2 = 0;
for (int i = 0; i < p_dir->subdirs.size(); i++) {
if (efd->name < p_dir->subdirs[i]->name)
break;
- idx++;
+ idx2++;
}
- if (idx == p_dir->subdirs.size()) {
+ if (idx2 == p_dir->subdirs.size()) {
p_dir->subdirs.push_back(efd);
} else {
- p_dir->subdirs.insert(idx, efd);
+ p_dir->subdirs.insert(idx2, efd);
}
da->change_dir("..");
@@ -737,11 +768,20 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
fi->deps = fc->deps;
fi->modified_time = fc->modification_time;
fi->import_modified_time = fc->import_modification_time;
+
fi->import_valid = fc->import_valid;
fi->script_class_name = fc->script_class_name;
fi->script_class_extends = fc->script_class_extends;
fi->script_class_icon_path = fc->script_class_icon_path;
+ if (revalidate_import_files && !ResourceFormatImporter::get_singleton()->are_import_settings_valid(path)) {
+ ItemAction ia;
+ ia.action = ItemAction::ACTION_FILE_TEST_REIMPORT;
+ ia.dir = p_dir;
+ ia.file = E->get();
+ scan_actions.push_back(ia);
+ }
+
if (fc->type == String()) {
fi->type = ResourceLoader::get_resource_type(path);
//there is also the chance that file type changed due to reimport, must probably check this somehow here (or kind of note it for next time in another file?)
@@ -1101,6 +1141,7 @@ void EditorFileSystem::_notification(int p_what) {
emit_signal("filesystem_changed");
emit_signal("sources_changed", sources_changed.size() > 0);
_queue_update_script_classes();
+ first_scan = false;
}
} else if (!scanning) {
@@ -1117,6 +1158,7 @@ void EditorFileSystem::_notification(int p_what) {
emit_signal("filesystem_changed");
emit_signal("sources_changed", sources_changed.size() > 0);
_queue_update_script_classes();
+ first_scan = false;
}
}
} break;
@@ -1569,8 +1611,8 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
List<String> import_variants;
List<String> gen_files;
-
- Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files);
+ Variant metadata;
+ Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &metadata);
if (err != OK) {
ERR_PRINTS("Error importing: " + p_file);
@@ -1615,6 +1657,10 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
f->store_line("valid=false");
}
+ if (metadata != Variant()) {
+ f->store_line("metadata=" + metadata.get_construct_string());
+ }
+
f->store_line("");
f->store_line("[deps]\n");
@@ -1815,6 +1861,8 @@ EditorFileSystem::EditorFileSystem() {
scan_total = 0;
update_script_classes_queued = false;
+ first_scan = true;
+ revalidate_import_files = false;
}
EditorFileSystem::~EditorFileSystem() {
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index bb892baf57..2a9e325454 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -143,7 +143,10 @@ class EditorFileSystem : public Node {
bool abort_scan;
bool scanning;
bool importing;
+ bool first_scan;
float scan_total;
+ String filesystem_settings_version_for_import;
+ bool revalidate_import_files;
void _scan_filesystem();
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 6ab41c641d..77c0f7491e 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -171,9 +171,9 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
ERR_FAIL_COND(res_unfolds.size() & 1);
for (int i = 0; i < unfolds.size(); i += 2) {
- NodePath path = unfolds[i];
+ NodePath path2 = unfolds[i];
PoolVector<String> un = unfolds[i + 1];
- Node *node = p_scene->get_node(path);
+ Node *node = p_scene->get_node_or_null(path2);
if (!node) {
continue;
}
@@ -181,17 +181,17 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
}
for (int i = 0; i < res_unfolds.size(); i += 2) {
- String path = res_unfolds[i];
+ String path2 = res_unfolds[i];
RES res;
- if (ResourceCache::has(path)) {
- res = RES(ResourceCache::get(path));
+ if (ResourceCache::has(path2)) {
+ res = RES(ResourceCache::get(path2));
}
if (res.is_null()) {
continue;
}
- PoolVector<String> unfolds = res_unfolds[i + 1];
- _set_unfolds(res.ptr(), unfolds);
+ PoolVector<String> unfolds2 = res_unfolds[i + 1];
+ _set_unfolds(res.ptr(), unfolds2);
}
}
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index f8cee6883b..e0acc5cd70 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1423,10 +1423,6 @@ EditorHelp::EditorHelp() {
EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true);
- find_bar = memnew(FindBar);
- add_child(find_bar);
- find_bar->hide();
-
class_desc = memnew(RichTextLabel);
add_child(class_desc);
class_desc->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1434,13 +1430,16 @@ EditorHelp::EditorHelp() {
class_desc->connect("meta_clicked", this, "_class_desc_select");
class_desc->connect("gui_input", this, "_class_desc_input");
+ // Added second so it opens at the bottom so it won't offset the entire widget.
+ find_bar = memnew(FindBar);
+ add_child(find_bar);
+ find_bar->hide();
find_bar->set_rich_text_label(class_desc);
class_desc->set_selection_enabled(true);
scroll_locked = false;
select_locked = false;
- //set_process_unhandled_key_input(true);
class_desc->hide();
}
@@ -1509,7 +1508,6 @@ EditorHelpBit::EditorHelpBit() {
rich_text = memnew(RichTextLabel);
add_child(rich_text);
- //rich_text->set_anchors_and_margins_preset(Control::PRESET_WIDE);
rich_text->connect("meta_clicked", this, "_meta_clicked");
rich_text->add_color_override("selection_color", EditorSettings::get_singleton()->get("text_editor/theme/selection_color"));
rich_text->set_override_selected_font_color(false);
@@ -1518,38 +1516,25 @@ EditorHelpBit::EditorHelpBit() {
FindBar::FindBar() {
- container = memnew(Control);
- add_child(container);
-
- container->set_clip_contents(true);
- container->set_h_size_flags(SIZE_EXPAND_FILL);
-
- hbc = memnew(HBoxContainer);
- container->add_child(hbc);
-
- vbc_search_text = memnew(VBoxContainer);
- hbc->add_child(vbc_search_text);
- vbc_search_text->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->set_anchor_and_margin(MARGIN_RIGHT, 1, 0);
-
search_text = memnew(LineEdit);
- vbc_search_text->add_child(search_text);
+ add_child(search_text);
search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
+ search_text->set_h_size_flags(SIZE_EXPAND_FILL);
search_text->connect("text_changed", this, "_search_text_changed");
search_text->connect("text_entered", this, "_search_text_entered");
find_prev = memnew(ToolButton);
- hbc->add_child(find_prev);
+ add_child(find_prev);
find_prev->set_focus_mode(FOCUS_NONE);
find_prev->connect("pressed", this, "_search_prev");
find_next = memnew(ToolButton);
- hbc->add_child(find_next);
+ add_child(find_next);
find_next->set_focus_mode(FOCUS_NONE);
find_next->connect("pressed", this, "_search_next");
error_label = memnew(Label);
- hbc->add_child(error_label);
+ add_child(error_label);
error_label->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
hide_button = memnew(TextureButton);
@@ -1576,13 +1561,6 @@ void FindBar::popup_search() {
_search();
}
}
-
- call_deferred("_update_size");
-}
-
-void FindBar::_update_size() {
-
- container->set_custom_minimum_size(Size2(0, hbc->get_size().height));
}
void FindBar::_notification(int p_what) {
@@ -1618,7 +1596,6 @@ void FindBar::_bind_methods() {
ClassDB::bind_method("_search_next", &FindBar::search_next);
ClassDB::bind_method("_search_prev", &FindBar::search_prev);
ClassDB::bind_method("_hide_pressed", &FindBar::_hide_bar);
- ClassDB::bind_method("_update_size", &FindBar::_update_size);
ADD_SIGNAL(MethodInfo("search"));
}
@@ -1677,7 +1654,7 @@ void FindBar::_unhandled_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
- if (k->is_pressed() && (rich_text_label->has_focus() || hbc->is_a_parent_of(get_focus_owner()))) {
+ if (k->is_pressed() && (rich_text_label->has_focus() || is_a_parent_of(get_focus_owner()))) {
bool accepted = true;
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 133d98f81f..a50ab8a9f9 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -34,6 +34,7 @@
#include "editor/code_editor.h"
#include "editor/doc/doc_data.h"
#include "editor/editor_plugin.h"
+#include "scene/gui/margin_container.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/panel_container.h"
#include "scene/gui/rich_text_label.h"
@@ -52,10 +53,6 @@ class FindBar : public HBoxContainer {
TextureButton *hide_button;
String prev_search;
- Control *container;
- HBoxContainer *hbc;
- VBoxContainer *vbc_search_text;
-
RichTextLabel *rich_text_label;
void _show_search();
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 21cddc8ca4..616a52e25b 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -45,21 +45,6 @@ void EditorHelpSearch::_update_icons() {
_update_results();
}
-void EditorHelpSearch::_load_settings() {
-
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- results_tree->add_constant_override("draw_relationship_lines", 1);
- results_tree->add_color_override("relationship_line_color", rl_color);
- results_tree->add_constant_override("draw_guides", 0);
- } else {
- results_tree->add_constant_override("draw_relationship_lines", 0);
- results_tree->add_constant_override("draw_guides", 1);
- }
-}
-
void EditorHelpSearch::_update_results() {
String term = search_box->get_text();
@@ -120,7 +105,6 @@ void EditorHelpSearch::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- _load_settings();
_update_icons();
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -264,8 +248,6 @@ EditorHelpSearch::EditorHelpSearch() {
results_tree->connect("item_activated", this, "_confirmed");
results_tree->connect("item_selected", get_ok(), "set_disabled", varray(false));
vbox->add_child(results_tree, true);
-
- _load_settings();
}
bool EditorHelpSearch::Runner::_slice() {
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h
index e74bfdc5b6..93cf66a0dd 100644
--- a/editor/editor_help_search.h
+++ b/editor/editor_help_search.h
@@ -64,7 +64,6 @@ class EditorHelpSearch : public ConfirmationDialog {
Ref<Runner> search;
void _update_icons();
- void _load_settings();
void _update_results();
void _search_box_gui_input(const Ref<InputEvent> &p_event);
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 1078fabc2e..60fa5ff16f 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -82,7 +82,10 @@ Size2 EditorProperty::get_minimum_size() const {
void EditorProperty::emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field, bool p_changing) {
- emit_signal("property_changed", p_property, p_value, p_field, p_changing);
+ Variant args[4] = { p_property, p_value, p_field, p_changing };
+ const Variant *argptrs[4] = { &args[0], &args[1], &args[2], &args[3] };
+
+ emit_signal("property_changed", (const Variant **)argptrs, 4);
}
void EditorProperty::_notification(int p_what) {
@@ -215,14 +218,14 @@ void EditorProperty::_notification(int p_what) {
else
checkbox = get_icon("unchecked", "CheckBox");
- Color color(1, 1, 1);
+ Color color2(1, 1, 1);
if (check_hover) {
- color.r *= 1.2;
- color.g *= 1.2;
- color.b *= 1.2;
+ color2.r *= 1.2;
+ color2.g *= 1.2;
+ color2.b *= 1.2;
}
check_rect = Rect2(ofs, ((size.height - checkbox->get_height()) / 2), checkbox->get_width(), checkbox->get_height());
- draw_texture(checkbox, check_rect.position, color);
+ draw_texture(checkbox, check_rect.position, color2);
ofs += get_constant("hseparator", "Tree");
ofs += checkbox->get_width();
} else {
@@ -236,14 +239,14 @@ void EditorProperty::_notification(int p_what) {
text_limit -= reload_icon->get_width() + get_constant("hseparator", "Tree") * 2;
revert_rect = Rect2(text_limit + get_constant("hseparator", "Tree"), (size.height - reload_icon->get_height()) / 2, reload_icon->get_width(), reload_icon->get_height());
- Color color(1, 1, 1);
+ Color color2(1, 1, 1);
if (revert_hover) {
- color.r *= 1.2;
- color.g *= 1.2;
- color.b *= 1.2;
+ color2.r *= 1.2;
+ color2.g *= 1.2;
+ color2.b *= 1.2;
}
- draw_texture(reload_icon, revert_rect.position, color);
+ draw_texture(reload_icon, revert_rect.position, color2);
} else {
revert_rect = Rect2();
}
@@ -262,14 +265,14 @@ void EditorProperty::_notification(int p_what) {
ofs = size.width - key->get_width() - get_constant("hseparator", "Tree");
- Color color(1, 1, 1);
+ Color color2(1, 1, 1);
if (keying_hover) {
- color.r *= 1.2;
- color.g *= 1.2;
- color.b *= 1.2;
+ color2.r *= 1.2;
+ color2.g *= 1.2;
+ color2.b *= 1.2;
}
keying_rect = Rect2(ofs, ((size.height - key->get_height()) / 2), key->get_width(), key->get_height());
- draw_texture(key, keying_rect.position, color);
+ draw_texture(key, keying_rect.position, color2);
} else {
keying_rect = Rect2();
}
@@ -1233,6 +1236,7 @@ EditorInspectorSection::EditorInspectorSection() {
}
EditorInspectorSection::~EditorInspectorSection() {
+
if (!vbox_added) {
memdelete(vbox);
}
@@ -1294,6 +1298,10 @@ void EditorInspector::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &
for (int i = idx; i < inspector_plugin_count - 1; i++) {
inspector_plugins[i] = inspector_plugins[i + 1];
}
+
+ if (idx == inspector_plugin_count - 1)
+ inspector_plugins[idx] = Ref<EditorInspectorPlugin>();
+
inspector_plugin_count--;
}
@@ -1482,19 +1490,19 @@ void EditorInspector::update_tree() {
category->bg_color = get_color("prop_category", "Editor");
if (use_doc_hints) {
- StringName type = p.name;
- if (!class_descr_cache.has(type)) {
+ StringName type2 = p.name;
+ if (!class_descr_cache.has(type2)) {
String descr;
DocData *dd = EditorHelp::get_doc_data();
- Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(type);
+ Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(type2);
if (E) {
descr = E->get().brief_description;
}
- class_descr_cache[type] = descr.word_wrap(80);
+ class_descr_cache[type2] = descr.word_wrap(80);
}
- category->set_tooltip(p.name + "::" + (class_descr_cache[type] == "" ? "" : class_descr_cache[type]));
+ category->set_tooltip(p.name + "::" + (class_descr_cache[type2] == "" ? "" : class_descr_cache[type2]));
}
for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) {
@@ -1639,16 +1647,16 @@ void EditorInspector::update_tree() {
if (!found) {
DocData *dd = EditorHelp::get_doc_data();
- Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(classname);
- while (E && descr == String()) {
- for (int i = 0; i < E->get().properties.size(); i++) {
- if (E->get().properties[i].name == propname.operator String()) {
- descr = E->get().properties[i].description.strip_edges().word_wrap(80);
+ Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(classname);
+ while (F && descr == String()) {
+ for (int i = 0; i < F->get().properties.size(); i++) {
+ if (F->get().properties[i].name == propname.operator String()) {
+ descr = F->get().properties[i].description.strip_edges().word_wrap(80);
break;
}
}
- if (!E->get().inherits.empty()) {
- E = dd->class_list.find(E->get().inherits);
+ if (!F->get().inherits.empty()) {
+ F = dd->class_list.find(F->get().inherits);
} else {
break;
}
@@ -1937,7 +1945,7 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
}
}
- if (!undo_redo || Object::cast_to<ArrayPropertyEdit>(object) || Object::cast_to<DictionaryPropertyEdit>(object)) { //kind of hacky
+ if (!undo_redo || bool(object->call("_dont_undo_redo"))) {
object->set(p_name, p_value);
if (p_refresh_all)
@@ -2133,6 +2141,9 @@ void EditorInspector::_notification(int p_what) {
get_tree()->connect("node_removed", this, "_node_removed");
}
}
+ if (p_what == NOTIFICATION_PREDELETE) {
+ edit(NULL); //just in case
+ }
if (p_what == NOTIFICATION_EXIT_TREE) {
if (!sub_inspector) {
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 803d7e10f7..aaca47622d 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -65,7 +65,6 @@ void EditorLog::_notification(int p_what) {
} else if (p_what == NOTIFICATION_THEME_CHANGED) {
Ref<DynamicFont> df_output_code = get_font("output_source", "EditorFonts");
if (df_output_code.is_valid()) {
- df_output_code->set_size(int(EDITOR_DEF("run/output/font_size", 13)) * EDSCALE);
if (log != NULL) {
log->add_font_override("normal_font", get_font("output_source", "EditorFonts"));
}
@@ -132,7 +131,6 @@ void EditorLog::_bind_methods() {
EditorLog::EditorLog() {
VBoxContainer *vb = this;
- add_constant_override("separation", get_constant("separation", "VBoxContainer"));
HBoxContainer *hb = memnew(HBoxContainer);
vb->add_child(hb);
@@ -163,6 +161,8 @@ EditorLog::EditorLog() {
current = Thread::get_caller_id();
+ add_constant_override("separation", get_constant("separation", "VBoxContainer"));
+
EditorNode::get_undo_redo()->set_commit_notify_callback(_undo_redo_cbk, this);
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index c8e00b0586..6140412a32 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -136,10 +136,10 @@ void EditorNode::_update_scene_tabs() {
Ref<Texture> script_icon = gui_base->get_icon("Script", "EditorIcons");
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
- String type = editor_data.get_scene_type(i);
+ Node *type_node = editor_data.get_edited_scene_root(i);
Ref<Texture> icon;
- if (type != String()) {
- icon = get_class_icon(type, "Node");
+ if (type_node) {
+ icon = EditorNode::get_singleton()->get_object_icon(type_node, "Node");
}
int current = editor_data.get_edited_scene();
@@ -291,6 +291,8 @@ void EditorNode::_notification(int p_what) {
get_tree()->get_root()->set_as_audio_listener_2d(false);
get_tree()->set_auto_accept_quit(false);
get_tree()->connect("files_dropped", this, "_dropped_files");
+
+ /* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
}
if (p_what == NOTIFICATION_EXIT_TREE) {
@@ -305,7 +307,8 @@ void EditorNode::_notification(int p_what) {
_editor_select(EDITOR_3D);
_update_debug_options();
- _load_docks();
+
+ /* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
}
if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) {
@@ -326,7 +329,6 @@ void EditorNode::_notification(int p_what) {
gui_base->set_theme(theme);
gui_base->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
- play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer"));
scene_tabs->add_style_override("tab_fg", gui_base->get_stylebox("SceneTabFG", "EditorStyles"));
@@ -528,14 +530,17 @@ void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
void EditorNode::_sources_changed(bool p_exist) {
if (waiting_for_first_scan) {
+ waiting_for_first_scan = false;
+
+ EditorResourcePreview::get_singleton()->start(); //start previes now that it's safe
+
+ _load_docks();
if (defer_load_scene != "") {
load_scene(defer_load_scene);
defer_load_scene = "";
}
-
- waiting_for_first_scan = false;
}
}
@@ -614,7 +619,11 @@ void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const St
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err != OK) {
- show_accept(TTR("Error saving resource!"), TTR("OK"));
+ if (ResourceLoader::is_imported(p_resource->get_path())) {
+ show_accept(TTR("Imported resources can't be saved."), TTR("OK"));
+ } else {
+ show_accept(TTR("Error saving resource!"), TTR("OK"));
+ }
return;
}
@@ -634,6 +643,18 @@ void EditorNode::save_resource(const Ref<Resource> &p_resource) {
void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String &p_at_path) {
+ {
+ String path = p_resource->get_path();
+ int srpos = path.find("::");
+ if (srpos != -1) {
+ String base = path.substr(0, srpos);
+ if (!get_edited_scene() || get_edited_scene()->get_filename() != base) {
+ show_warning(TTR("This resource can't be saved because it does not belong to the edited scene. Make it unique first."));
+ return;
+ }
+ }
+ }
+
file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
saving_resource = p_resource;
@@ -881,9 +902,9 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool>
Dictionary d = obj->get(E->get().name);
List<Variant> keys;
d.get_key_list(&keys);
- for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
+ for (List<Variant>::Element *F = keys.front(); F; F = F->next()) {
- Variant v = d[E->get()];
+ Variant v = d[F->get()];
RES res = v;
if (_find_and_save_resource(res, processed, flags))
ret_changed = true;
@@ -1018,6 +1039,70 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod
return false;
}
+static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource> > &edited_resources) {
+
+ if (p_resource->is_edited()) {
+ edited_resources.insert(p_resource);
+ return true;
+ }
+
+ List<PropertyInfo> plist;
+
+ p_resource->get_property_list(&plist);
+
+ for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) {
+ if (E->get().type == Variant::OBJECT && E->get().usage & PROPERTY_USAGE_STORAGE && !(E->get().usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT)) {
+ RES res = p_resource->get(E->get().name);
+ if (res.is_null()) {
+ continue;
+ }
+ if (res->get_path().is_resource_file()) { //not a subresource, continue
+ continue;
+ }
+ if (_find_edited_resources(res, edited_resources)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+int EditorNode::_save_external_resources() {
+ //save external resources and its subresources if any was modified
+
+ int flg = 0;
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
+ flg |= ResourceSaver::FLAG_COMPRESS;
+ flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
+
+ Set<Ref<Resource> > edited_subresources;
+ int saved = 0;
+ List<Ref<Resource> > cached;
+ ResourceCache::get_cached_resources(&cached);
+ for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
+
+ Ref<Resource> res = E->get();
+ if (!res->get_path().is_resource_file())
+ continue;
+ //not only check if this resourec is edited, check contained subresources too
+ if (_find_edited_resources(res, edited_subresources)) {
+ ResourceSaver::save(res->get_path(), res, flg);
+ saved++;
+ }
+ }
+
+ // clear later, because user may have put the same subresource in two different resources,
+ // which will be shared until the next reload
+
+ for (Set<Ref<Resource> >::Element *E = edited_subresources.front(); E; E = E->next()) {
+ Ref<Resource> res = E->get();
+ res->set_edited(false);
+ }
+
+ return saved;
+}
+
void EditorNode::_save_scene(String p_file, int idx) {
Node *scene = editor_data.get_edited_scene_root(idx);
@@ -1076,22 +1161,8 @@ void EditorNode::_save_scene(String p_file, int idx) {
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
err = ResourceSaver::save(p_file, sdata, flg);
- //Map<RES, bool> processed;
- //this method is slow and not always works, deprecating
- //_save_edited_subresources(scene, processed, flg);
- { //instead, just find globally unsaved subresources and save them
-
- List<Ref<Resource> > cached;
- ResourceCache::get_cached_resources(&cached);
- for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
-
- Ref<Resource> res = E->get();
- if (res->is_edited() && res->get_path().is_resource_file()) {
- ResourceSaver::save(res->get_path(), res, flg);
- res->set_edited(false);
- }
- }
- }
+
+ _save_external_resources();
editor_data.save_editor_external_data();
if (err == OK) {
@@ -1371,6 +1442,9 @@ bool EditorNode::item_has_editor(Object *p_object) {
return editor_data.get_subeditors(p_object).size() > 0;
}
+void EditorNode::edit_item_resource(RES p_resource) {
+ edit_item(p_resource.ptr());
+}
void EditorNode::edit_item(Object *p_object) {
Vector<EditorPlugin *> sub_plugins;
@@ -1380,13 +1454,25 @@ void EditorNode::edit_item(Object *p_object) {
}
if (!sub_plugins.empty()) {
- _display_top_editors(false);
- _set_top_editors(sub_plugins);
+ bool same = true;
+ if (sub_plugins.size() == editor_plugins_over->get_plugins_list().size()) {
+ for (int i = 0; i < sub_plugins.size(); i++) {
+ if (sub_plugins[i] != editor_plugins_over->get_plugins_list()[i]) {
+ same = false;
+ }
+ }
+ } else {
+ same = false;
+ }
+ if (!same) {
+ _display_top_editors(false);
+ _set_top_editors(sub_plugins);
+ }
_set_editing_top_editors(p_object);
_display_top_editors(true);
} else {
- _hide_top_editors();
+ hide_top_editors();
}
}
@@ -1424,7 +1510,7 @@ void EditorNode::_save_default_environment() {
}
}
-void EditorNode::_hide_top_editors() {
+void EditorNode::hide_top_editors() {
_display_top_editors(false);
@@ -1601,7 +1687,7 @@ void EditorNode::_edit_current() {
} else if (!editor_plugins_over->get_plugins_list().empty()) {
- _hide_top_editors();
+ hide_top_editors();
}
}
@@ -1841,7 +1927,15 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
if (!scene) {
- show_accept(TTR("This operation can't be done without a tree root."), TTR("OK"));
+ int saved = _save_external_resources();
+ String err_text;
+ if (saved > 0) {
+ err_text = vformat(TTR("Saved %s modified resource(s)."), itos(saved));
+ } else {
+ err_text = TTR("A root node is required to save the scene.");
+ }
+
+ show_accept(err_text, TTR("OK"));
break;
}
@@ -2540,6 +2634,7 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
singleton->editor_plugins_over->get_plugins_list().erase(p_editor);
singleton->remove_child(p_editor);
singleton->editor_data.remove_editor_plugin(p_editor);
+ singleton->get_editor_plugins_force_input_forwarding()->remove_plugin(p_editor);
}
void EditorNode::_update_addon_config() {
@@ -2580,6 +2675,20 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
Ref<ConfigFile> cf;
cf.instance();
String addon_path = "res://addons/" + p_addon + "/plugin.cfg";
+ if (!DirAccess::exists(addon_path.get_base_dir())) {
+ ProjectSettings *ps = ProjectSettings::get_singleton();
+ PoolStringArray enabled_plugins = ps->get("editor_plugins/enabled");
+ for (int i = 0; i < enabled_plugins.size(); ++i) {
+ if (enabled_plugins.get(i) == p_addon) {
+ enabled_plugins.remove(i);
+ break;
+ }
+ }
+ ps->set("editor_plugins/enabled", enabled_plugins);
+ ps->save();
+ WARN_PRINTS("Addon '" + p_addon + "' failed to load. No directory found. Removing from enabled plugins.");
+ return;
+ }
Error err = cf->load(addon_path);
if (err != OK) {
show_warning(vformat(TTR("Unable to enable addon plugin at: '%s' parsing of config failed."), addon_path));
@@ -2771,7 +2880,7 @@ bool EditorNode::is_changing_scene() const {
void EditorNode::_clear_undo_history() {
- get_undo_redo()->clear_history();
+ get_undo_redo()->clear_history(false);
}
void EditorNode::set_current_scene(int p_idx) {
@@ -2972,6 +3081,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
prev_scene->set_disabled(previous_scenes.size() == 0);
opening_prev = false;
+ scene_tree_dock->set_selected(new_scene);
ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
@@ -3244,7 +3354,7 @@ Ref<Texture> EditorNode::get_class_icon(const String &p_class, const String &p_f
icon = ResourceLoader::load(icon_path);
}
if (!icon.is_valid()) {
- icon = gui_base->get_icon(ScriptServer::get_global_class_base(p_class), "EditorIcons");
+ icon = gui_base->get_icon(ScriptServer::get_global_class_native_base(p_class), "EditorIcons");
}
return icon;
}
@@ -3587,6 +3697,9 @@ void EditorNode::_dock_select_draw() {
void EditorNode::_save_docks() {
+ if (waiting_for_first_scan) {
+ return; //scanning, do not touch docks
+ }
Ref<ConfigFile> config;
config.instance();
@@ -3614,6 +3727,8 @@ void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p
}
p_layout->set_value(p_section, "dock_filesystem_split", filesystem_dock->get_split_offset());
+ p_layout->set_value(p_section, "dock_filesystem_display_mode", filesystem_dock->get_display_mode());
+ p_layout->set_value(p_section, "dock_filesystem_file_list_display_mode", filesystem_dock->get_file_list_display_mode());
for (int i = 0; i < vsplits.size(); i++) {
@@ -3798,11 +3913,20 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
}
}
- int fs_split_ofs = 0;
if (p_layout->has_section_key(p_section, "dock_filesystem_split")) {
- fs_split_ofs = p_layout->get_value(p_section, "dock_filesystem_split");
+ int fs_split_ofs = p_layout->get_value(p_section, "dock_filesystem_split");
+ filesystem_dock->set_split_offset(fs_split_ofs);
+ }
+
+ if (p_layout->has_section_key(p_section, "dock_filesystem_display_mode")) {
+ FileSystemDock::DisplayMode dock_filesystem_display_mode = FileSystemDock::DisplayMode(int(p_layout->get_value(p_section, "dock_filesystem_display_mode")));
+ filesystem_dock->set_display_mode(dock_filesystem_display_mode);
+ }
+
+ if (p_layout->has_section_key(p_section, "dock_filesystem_file_list_display_mode")) {
+ FileSystemDock::FileListDisplayMode dock_filesystem_file_list_display_mode = FileSystemDock::FileListDisplayMode(int(p_layout->get_value(p_section, "dock_filesystem_file_list_display_mode")));
+ filesystem_dock->set_file_list_display_mode(dock_filesystem_file_list_display_mode);
}
- filesystem_dock->set_split_offset(fs_split_ofs);
for (int i = 0; i < vsplits.size(); i++) {
@@ -4108,7 +4232,13 @@ bool EditorNode::are_bottom_panels_hidden() const {
void EditorNode::hide_bottom_panel() {
- _bottom_panel_switch(false, 0);
+ for (int i = 0; i < bottom_panel_items.size(); i++) {
+
+ if (bottom_panel_items[i].control->is_visible()) {
+ _bottom_panel_switch(false, i);
+ break;
+ }
+ }
}
void EditorNode::make_bottom_panel_item_visible(Control *p_item) {
@@ -4145,7 +4275,7 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
if (bottom_panel_items[i].control == p_item) {
if (p_item->is_visible_in_tree()) {
- _bottom_panel_switch(false, 0);
+ _bottom_panel_switch(false, i);
}
bottom_panel_vb->remove_child(bottom_panel_items[i].control);
bottom_panel_hb_editors->remove_child(bottom_panel_items[i].button);
@@ -4165,6 +4295,10 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
ERR_FAIL_INDEX(p_idx, bottom_panel_items.size());
+ if (bottom_panel_items[p_idx].control->is_visible() == p_enable) {
+ return;
+ }
+
if (p_enable) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
@@ -4185,11 +4319,8 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
} else {
bottom_panel->add_style_override("panel", gui_base->get_stylebox("panel", "TabContainer"));
- for (int i = 0; i < bottom_panel_items.size(); i++) {
-
- bottom_panel_items[i].button->set_pressed(false);
- bottom_panel_items[i].control->set_visible(false);
- }
+ bottom_panel_items[p_idx].button->set_pressed(false);
+ bottom_panel_items[p_idx].control->set_visible(false);
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
center_split->set_collapsed(true);
bottom_panel_raise->hide();
@@ -4405,7 +4536,7 @@ void EditorNode::remove_tool_menu_item(const String &p_name) {
void EditorNode::_dropped_files(const Vector<String> &p_files, int p_screen) {
- String to_path = ProjectSettings::get_singleton()->globalize_path(get_filesystem_dock()->get_current_path());
+ String to_path = ProjectSettings::get_singleton()->globalize_path(get_filesystem_dock()->get_selected_path());
DirAccessRef dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
Vector<String> just_copy = String("ttf,otf").split(",");
@@ -4716,6 +4847,7 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_clear_undo_history", &EditorNode::_clear_undo_history);
ClassDB::bind_method("_dropped_files", &EditorNode::_dropped_files);
ClassDB::bind_method("_toggle_distraction_free_mode", &EditorNode::_toggle_distraction_free_mode);
+ ClassDB::bind_method("edit_item_resource", &EditorNode::edit_item_resource);
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
ClassDB::bind_method(D_METHOD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
@@ -4753,6 +4885,7 @@ void EditorNode::_print_handler(void *p_this, const String &p_string, bool p_err
EditorNode::EditorNode() {
+ Input::get_singleton()->set_use_accumulated_input(true);
Resource::_get_local_scene_func = _resource_get_edited_scene;
VisualServer::get_singleton()->textures_keep_original(true);
@@ -4767,8 +4900,6 @@ EditorNode::EditorNode() {
ResourceLoader::clear_translation_remaps(); //no remaps using during editor
ResourceLoader::clear_path_remaps();
- ImageTexture::set_keep_images_cached(true);
-
InputDefault *id = Object::cast_to<InputDefault>(Input::get_singleton());
if (id) {
@@ -4886,9 +5017,9 @@ EditorNode::EditorNode() {
import_collada.instance();
import_scene->add_importer(import_collada);
- Ref<EditorOBJImporter> import_obj;
- import_obj.instance();
- import_scene->add_importer(import_obj);
+ Ref<EditorOBJImporter> import_obj2;
+ import_obj2.instance();
+ import_scene->add_importer(import_obj2);
Ref<EditorSceneImporterGLTF> import_gltf;
import_gltf.instance();
@@ -4961,7 +5092,7 @@ EditorNode::EditorNode() {
EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false);
EDITOR_DEF("interface/inspector/horizontal_vector_types_editing", true);
EDITOR_DEF("interface/inspector/open_resources_in_current_inspector", true);
- EDITOR_DEF("interface/inspector/resources_types_to_open_in_new_inspector", "SpatialMaterial,Script");
+ EDITOR_DEF("interface/inspector/resources_to_open_in_new_inspector", "SpatialMaterial,Script,MeshLibrary,TileSet");
EDITOR_DEF("run/auto_save/save_before_running", true);
theme_base = memnew(Control);
@@ -4990,7 +5121,7 @@ EditorNode::EditorNode() {
main_vbox = memnew(VBoxContainer);
gui_base->add_child(main_vbox);
main_vbox->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 8);
- main_vbox->set_margin(MARGIN_TOP, 5 * EDSCALE);
+ main_vbox->add_constant_override("separation", 8 * EDSCALE);
menu_hb = memnew(HBoxContainer);
main_vbox->add_child(menu_hb);
@@ -5202,11 +5333,8 @@ EditorNode::EditorNode() {
viewport->add_constant_override("separation", 0);
scene_root_parent->add_child(viewport);
- PanelContainer *top_region = memnew(PanelContainer);
- top_region->add_style_override("panel", gui_base->get_stylebox("MenuPanel", "EditorStyles"));
HBoxContainer *left_menu_hb = memnew(HBoxContainer);
- top_region->add_child(left_menu_hb);
- menu_hb->add_child(top_region);
+ menu_hb->add_child(left_menu_hb);
file_menu = memnew(MenuButton);
file_menu->set_flat(false);
@@ -5336,11 +5464,10 @@ EditorNode::EditorNode() {
p->add_item(TTR("Quit to Project List"), RUN_PROJECT_MANAGER, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Q);
#endif
- PanelContainer *editor_region = memnew(PanelContainer);
- main_editor_button_vb = memnew(HBoxContainer);
- editor_region->add_child(main_editor_button_vb);
menu_hb->add_spacer();
- menu_hb->add_child(editor_region);
+
+ main_editor_button_vb = memnew(HBoxContainer);
+ menu_hb->add_child(main_editor_button_vb);
debug_menu = memnew(MenuButton);
debug_menu->set_flat(false);
@@ -5429,11 +5556,8 @@ EditorNode::EditorNode() {
p->add_separator();
p->add_icon_item(gui_base->get_icon("Godot", "EditorIcons"), TTR("About"), HELP_ABOUT);
- play_button_panel = memnew(PanelContainer);
- menu_hb->add_child(play_button_panel);
-
HBoxContainer *play_hb = memnew(HBoxContainer);
- play_button_panel->add_child(play_hb);
+ menu_hb->add_child(play_hb);
play_button = memnew(ToolButton);
play_hb->add_child(play_button);
@@ -5511,7 +5635,6 @@ EditorNode::EditorNode() {
video_driver = memnew(OptionButton);
video_driver->set_flat(true);
video_driver->set_focus_mode(Control::FOCUS_NONE);
- video_driver->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
video_driver->connect("item_selected", this, "_video_driver_selected");
video_driver->add_font_override("font", gui_base->get_font("bold", "EditorFonts"));
right_menu_hb->add_child(video_driver);
@@ -5547,7 +5670,7 @@ EditorNode::EditorNode() {
layout_dialog->connect("name_confirmed", this, "_dialog_action");
update_menu = memnew(MenuButton);
- update_menu->set_tooltip(TTR("Spins when the editor window repaints!"));
+ update_menu->set_tooltip(TTR("Spins when the editor window redraws."));
right_menu_hb->add_child(update_menu);
update_menu->set_icon(gui_base->get_icon("Progress1", "EditorIcons"));
update_menu->get_popup()->connect("id_pressed", this, "_menu_option");
@@ -5571,9 +5694,9 @@ EditorNode::EditorNode() {
node_dock = memnew(NodeDock);
filesystem_dock = memnew(FileSystemDock(this));
- filesystem_dock->set_file_list_display_mode(int(EditorSettings::get_singleton()->get("docks/filesystem/files_display_mode")));
filesystem_dock->connect("open", this, "open_request");
filesystem_dock->connect("instance", this, "_instance_request");
+ filesystem_dock->connect("display_mode_changed", this, "_save_docks");
// Scene: Top left
dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock);
@@ -5800,6 +5923,8 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(SkeletonEditorPlugin(this)));
add_editor_plugin(memnew(SkeletonIKEditorPlugin(this)));
add_editor_plugin(memnew(PhysicalBonePlugin(this)));
+ add_editor_plugin(memnew(MeshEditorPlugin(this)));
+ add_editor_plugin(memnew(MaterialEditorPlugin(this)));
for (int i = 0; i < EditorPlugins::get_plugin_count(); i++)
add_editor_plugin(EditorPlugins::create(i, this));
@@ -6051,6 +6176,10 @@ void EditorPluginList::add_plugin(EditorPlugin *p_plugin) {
plugins_list.push_back(p_plugin);
}
+void EditorPluginList::remove_plugin(EditorPlugin *p_plugin) {
+ plugins_list.erase(p_plugin);
+}
+
bool EditorPluginList::empty() {
return plugins_list.empty();
}
diff --git a/editor/editor_node.h b/editor/editor_node.h
index a45ea54186..267c70c773 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -200,7 +200,6 @@ private:
Control *theme_base;
Control *gui_base;
VBoxContainer *main_vbox;
- PanelContainer *play_button_panel;
OptionButton *video_driver;
ConfirmationDialog *video_restart_dialog;
@@ -443,6 +442,8 @@ private:
void _show_messages();
void _vp_resized();
+ int _save_external_resources();
+
bool _validate_scene_recursive(const String &p_filename, Node *p_node);
void _save_scene(String p_file, int idx = -1);
void _save_all_scenes();
@@ -451,7 +452,6 @@ private:
void _instance_request(const Vector<String> &p_files);
- void _hide_top_editors();
void _display_top_editors(bool p_display);
void _set_top_editors(Vector<EditorPlugin *> p_editor_plugins_over);
void _set_editing_top_editors(Object *p_current_object);
@@ -674,7 +674,9 @@ public:
void push_item(Object *p_object, const String &p_property = "", bool p_inspector_only = false);
void edit_item(Object *p_object);
+ void edit_item_resource(RES p_resource);
bool item_has_editor(Object *p_object);
+ void hide_top_editors();
void open_request(const String &p_path);
@@ -837,6 +839,7 @@ public:
void forward_spatial_draw_over_viewport(Control *p_overlay);
void forward_spatial_force_draw_over_viewport(Control *p_overlay);
void add_plugin(EditorPlugin *p_plugin);
+ void remove_plugin(EditorPlugin *p_plugin);
void clear();
bool empty();
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index ecc3b33a15..09577e39e1 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -92,9 +92,9 @@ void EditorPluginSettings::update_plugins() {
cf.instance();
String path = "res://addons/" + plugins[i] + "/plugin.cfg";
- Error err = cf->load(path);
+ Error err2 = cf->load(path);
- if (err != OK) {
+ if (err2 != OK) {
WARN_PRINTS("Can't load plugin config: " + path);
} else if (!cf->has_section_key("plugin", "name")) {
WARN_PRINTS("Plugin misses plugin/name: " + path);
@@ -108,7 +108,7 @@ void EditorPluginSettings::update_plugins() {
WARN_PRINTS("Plugin misses plugin/script: " + path);
} else {
- String d = plugins[i];
+ String d2 = plugins[i];
String name = cf->get_value("plugin", "name");
String author = cf->get_value("plugin", "author");
String version = cf->get_value("plugin", "version");
@@ -118,7 +118,7 @@ void EditorPluginSettings::update_plugins() {
TreeItem *item = plugin_list->create_item(root);
item->set_text(0, name);
item->set_tooltip(0, "Name: " + name + "\nPath: " + path + "\nMain Script: " + script + "\nDescription: " + description);
- item->set_metadata(0, d);
+ item->set_metadata(0, d2);
item->set_text(1, version);
item->set_metadata(1, script);
item->set_text(2, author);
@@ -129,7 +129,7 @@ void EditorPluginSettings::update_plugins() {
item->set_editable(3, true);
item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin"));
- if (EditorNode::get_singleton()->is_addon_plugin_enabled(d)) {
+ if (EditorNode::get_singleton()->is_addon_plugin_enabled(d2)) {
item->set_custom_color(3, get_color("success_color", "Editor"));
item->set_range(3, 1);
} else {
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 56bab440c9..d7faa44441 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -115,8 +115,8 @@ void EditorPropertyMultilineText::_open_big_text() {
add_child(big_text_dialog);
}
- big_text->set_text(text->get_text());
big_text_dialog->popup_centered_ratio();
+ big_text->set_text(text->get_text());
}
void EditorPropertyMultilineText::update_property() {
@@ -483,16 +483,16 @@ EditorPropertyCheck::EditorPropertyCheck() {
void EditorPropertyEnum::_option_selected(int p_which) {
- int val = options->get_item_metadata(p_which);
+ int64_t val = options->get_item_metadata(p_which);
emit_changed(get_edited_property(), val);
}
void EditorPropertyEnum::update_property() {
- int which = get_edited_object()->get(get_edited_property());
+ int64_t which = get_edited_object()->get(get_edited_property());
for (int i = 0; i < options->get_item_count(); i++) {
- if (which == (int)options->get_item_metadata(i)) {
+ if (which == (int64_t)options->get_item_metadata(i)) {
options->select(i);
return;
}
@@ -501,11 +501,11 @@ void EditorPropertyEnum::update_property() {
void EditorPropertyEnum::setup(const Vector<String> &p_options) {
- int current_val = 0;
+ int64_t current_val = 0;
for (int i = 0; i < p_options.size(); i++) {
Vector<String> text_split = p_options[i].split(":");
if (text_split.size() != 1)
- current_val = text_split[1].to_int();
+ current_val = text_split[1].to_int64();
options->add_item(text_split[0]);
options->set_item_metadata(i, current_val);
current_val += 1;
@@ -665,10 +665,10 @@ public:
uint32_t idx = i * 10 + j;
bool on = value & (1 << idx);
- Rect2 rect = Rect2(o, Size2(bsize, bsize));
+ Rect2 rect2 = Rect2(o, Size2(bsize, bsize));
color.a = on ? 0.6 : 0.2;
- draw_rect(rect, color);
- flag_rects.push_back(rect);
+ draw_rect(rect2, color);
+ flag_rects.push_back(rect2);
}
}
}
@@ -801,11 +801,11 @@ EditorPropertyLayers::EditorPropertyLayers() {
void EditorPropertyInteger::_value_changed(double val) {
if (setting)
return;
- emit_changed(get_edited_property(), int(val));
+ emit_changed(get_edited_property(), (int64_t)val);
}
void EditorPropertyInteger::update_property() {
- int val = get_edited_object()->get(get_edited_property());
+ int64_t val = get_edited_object()->get(get_edited_property());
setting = true;
spin->set_value(val);
setting = false;
@@ -2190,7 +2190,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
Object *obj = NULL;
if (ScriptServer::is_global_class(intype)) {
- obj = ClassDB::instance(ScriptServer::get_global_class_base(intype));
+ obj = ClassDB::instance(ScriptServer::get_global_class_native_base(intype));
if (obj) {
Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(intype));
if (script.is_valid()) {
@@ -2277,8 +2277,8 @@ void EditorPropertyResource::_update_menu_items() {
List<StringName> inheritors;
ClassDB::get_inheriters_from_class(base.strip_edges(), &inheritors);
- for (int i = 0; i < custom_resources.size(); i++) {
- inheritors.push_back(custom_resources[i].name);
+ for (int j = 0; j < custom_resources.size(); j++) {
+ inheritors.push_back(custom_resources[j].name);
}
List<StringName>::Element *E = inheritors.front();
@@ -2287,17 +2287,17 @@ void EditorPropertyResource::_update_menu_items() {
E = E->next();
}
- for (Set<String>::Element *E = valid_inheritors.front(); E; E = E->next()) {
- String t = E->get();
+ for (Set<String>::Element *F = valid_inheritors.front(); F; F = F->next()) {
+ String t = F->get();
bool is_custom_resource = false;
Ref<Texture> icon;
if (!custom_resources.empty()) {
- for (int i = 0; i < custom_resources.size(); i++) {
- if (custom_resources[i].name == t) {
+ for (int j = 0; j < custom_resources.size(); j++) {
+ if (custom_resources[j].name == t) {
is_custom_resource = true;
- if (custom_resources[i].icon.is_valid())
- icon = custom_resources[i].icon;
+ if (custom_resources[j].icon.is_valid())
+ icon = custom_resources[j].icon;
break;
}
}
@@ -2439,7 +2439,39 @@ void EditorPropertyResource::_button_input(const Ref<InputEvent> &p_event) {
void EditorPropertyResource::_open_editor_pressed() {
RES res = get_edited_object()->get(get_edited_property());
if (res.is_valid()) {
- EditorNode::get_singleton()->edit_item(res.ptr());
+ EditorNode::get_singleton()->call_deferred("edit_item_resource", res); //may clear the editor so do it deferred
+ }
+}
+
+void EditorPropertyResource::_fold_other_editors(Object *p_self) {
+
+ if (this == p_self) {
+ return;
+ }
+
+ RES res = get_edited_object()->get(get_edited_property());
+
+ if (!res.is_valid())
+ return;
+ bool use_editor = false;
+ for (int i = 0; i < EditorNode::get_singleton()->get_editor_data().get_editor_plugin_count(); i++) {
+ EditorPlugin *ep = EditorNode::get_singleton()->get_editor_data().get_editor_plugin(i);
+ if (ep->handles(res.ptr())) {
+ use_editor = true;
+ }
+ }
+
+ if (!use_editor)
+ return;
+ bool unfolded = get_edited_object()->editor_is_section_unfolded(get_edited_property());
+
+ opened_editor = false;
+
+ if (unfolded) {
+ //refold
+ assign->set_pressed(false);
+ get_edited_object()->editor_set_section_unfold(get_edited_property(), false);
+ update_property();
}
}
@@ -2487,12 +2519,20 @@ void EditorPropertyResource::update_property() {
}
if (use_editor) {
+ //open editor directly and hide other open of these
+ _open_editor_pressed();
+ if (is_inside_tree()) {
+ get_tree()->call_deferred("call_group", "_editor_resource_properties", "_fold_other_editors", this);
+ }
+ opened_editor = true;
+ /*
Button *open_in_editor = memnew(Button);
open_in_editor->set_text(TTR("Open Editor"));
open_in_editor->set_icon(get_icon("Edit", "EditorIcons"));
sub_inspector_vbox->add_child(open_in_editor);
open_in_editor->connect("pressed", this, "_open_editor_pressed");
open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
+ */
}
}
@@ -2506,6 +2546,10 @@ void EditorPropertyResource::update_property() {
memdelete(sub_inspector_vbox);
sub_inspector = NULL;
sub_inspector_vbox = NULL;
+ if (opened_editor) {
+ EditorNode::get_singleton()->hide_top_editors();
+ opened_editor = false;
+ }
}
}
#endif
@@ -2547,7 +2591,8 @@ void EditorPropertyResource::_resource_selected() {
if (use_sub_inspector) {
- get_edited_object()->editor_set_section_unfold(get_edited_property(), assign->is_pressed());
+ bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property());
+ get_edited_object()->editor_set_section_unfold(get_edited_property(), unfold);
update_property();
} else {
@@ -2726,10 +2771,12 @@ void EditorPropertyResource::_bind_methods() {
ClassDB::bind_method(D_METHOD("_button_draw"), &EditorPropertyResource::_button_draw);
ClassDB::bind_method(D_METHOD("_open_editor_pressed"), &EditorPropertyResource::_open_editor_pressed);
ClassDB::bind_method(D_METHOD("_button_input"), &EditorPropertyResource::_button_input);
+ ClassDB::bind_method(D_METHOD("_fold_other_editors"), &EditorPropertyResource::_fold_other_editors);
}
EditorPropertyResource::EditorPropertyResource() {
+ opened_editor = false;
sub_inspector = NULL;
sub_inspector_vbox = NULL;
use_sub_inspector = bool(EDITOR_GET("interface/inspector/open_resources_in_current_inspector"));
@@ -2766,6 +2813,8 @@ EditorPropertyResource::EditorPropertyResource() {
file = NULL;
scene_tree = NULL;
dropping = false;
+
+ add_to_group("_editor_resource_properties");
}
////////////// DEFAULT PLUGIN //////////////////////
@@ -3162,12 +3211,11 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(p_hint == PROPERTY_HINT_RESOURCE_TYPE ? p_hint_text : "Resource");
if (p_hint == PROPERTY_HINT_RESOURCE_TYPE) {
- String open_in_new = EDITOR_GET("interface/inspector/resources_types_to_open_in_new_inspector");
+ String open_in_new = EDITOR_GET("interface/inspector/resources_to_open_in_new_inspector");
for (int i = 0; i < open_in_new.get_slice_count(","); i++) {
String type = open_in_new.get_slicec(',', i).strip_edges();
for (int j = 0; j < p_hint_text.get_slice_count(","); j++) {
String inherits = p_hint_text.get_slicec(',', j);
-
if (ClassDB::is_parent_class(inherits, type)) {
editor->set_use_sub_inspector(false);
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index df01ee83b5..574767890c 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -581,6 +581,9 @@ class EditorPropertyResource : public EditorProperty {
void _button_input(const Ref<InputEvent> &p_event);
void _open_editor_pressed();
+ void _fold_other_editors(Object *p_self);
+
+ bool opened_editor;
protected:
static void _bind_methods();
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 0851485208..0f6c6349ed 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -418,13 +418,14 @@ void EditorPropertyArray::_length_changed(double p_page) {
return;
Variant array = object->get_array();
+ int previous_size = array.call("size");
+
array.call("resize", int(p_page));
- emit_changed(get_edited_property(), array, "", false);
if (array.get_type() == Variant::ARRAY) {
if (subtype != Variant::NIL) {
int size = array.call("size");
- for (int i = 0; i < size; i++) {
+ for (int i = previous_size; i < size; i++) {
if (array.get(i).get_type() == Variant::NIL) {
Variant::CallError ce;
array.set(i, Variant::construct(subtype, NULL, 0, ce));
@@ -432,7 +433,16 @@ void EditorPropertyArray::_length_changed(double p_page) {
}
}
array = array.call("duplicate"); //dupe, so undo/redo works better
+ } else {
+ int size = array.call("size");
+ // Pool*Array don't initialize their elements, have to do it manually
+ for (int i = previous_size; i < size; i++) {
+ Variant::CallError ce;
+ array.set(i, Variant::construct(array.get(i).get_type(), NULL, 0, ce));
+ }
}
+
+ emit_changed(get_edited_property(), array, "", false);
object->set_array(array);
update_property();
}
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index f77f31db80..173333dac9 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -155,7 +155,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
r_texture = generated;
if (r_texture.is_valid() && preview_generators[i]->should_generate_small_preview()) {
- int small_thumbnail_size = EditorNode::get_singleton()->get_theme_base()->get_icon("Object", "EditorIcons")->get_width(); // Kind of a workaround to retreive the default icon size
+ int small_thumbnail_size = EditorNode::get_singleton()->get_theme_base()->get_icon("Object", "EditorIcons")->get_width(); // Kind of a workaround to retrieve the default icon size
small_thumbnail_size *= EDSCALE;
Ref<Image> small_image = r_texture->get_data();
@@ -188,6 +188,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
void EditorResourcePreview::_thread() {
+#ifndef SERVER_ENABLED
while (!exit) {
preview_sem->wait();
@@ -313,6 +314,8 @@ void EditorResourcePreview::_thread() {
preview_mutex->unlock();
}
}
+#endif
+ exited = true;
}
void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p_res, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata) {
@@ -417,10 +420,19 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
}
}
+void EditorResourcePreview::start() {
+ ERR_FAIL_COND(thread);
+ thread = Thread::create(_thread_func, this);
+ exited = false;
+}
void EditorResourcePreview::stop() {
if (thread) {
exit = true;
preview_sem->post();
+ while (!exited) {
+ OS::get_singleton()->delay_usec(10000);
+ VisualServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on visual server
+ }
Thread::wait_to_finish(thread);
memdelete(thread);
thread = NULL;
@@ -428,13 +440,13 @@ void EditorResourcePreview::stop() {
}
EditorResourcePreview::EditorResourcePreview() {
+ thread = NULL;
singleton = this;
preview_mutex = Mutex::create();
preview_sem = Semaphore::create();
order = 0;
exit = false;
-
- thread = Thread::create(_thread_func, this);
+ exited = false;
}
EditorResourcePreview::~EditorResourcePreview() {
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index 85ac78d58f..9b9223a818 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -36,24 +36,6 @@
#include "scene/main/node.h"
#include "scene/resources/texture.h"
-/* make previews for:
-*packdscene
-*wav
-*image
-*mesh
--font
-*script
-*material
--shader
--shader graph?
--navigation mesh
--collision?
--occluder polygon
--navigation polygon
--tileset
--curve and curve2D
-*/
-
class EditorResourcePreviewGenerator : public Reference {
GDCLASS(EditorResourcePreviewGenerator, Reference);
@@ -90,7 +72,8 @@ class EditorResourcePreview : public Node {
Mutex *preview_mutex;
Semaphore *preview_sem;
Thread *thread;
- bool exit;
+ volatile bool exit;
+ volatile bool exited;
struct Item {
Ref<Texture> preview;
@@ -126,6 +109,7 @@ public:
void remove_preview_generator(const Ref<EditorResourcePreviewGenerator> &p_generator);
void check_for_invalidation(const String &p_path);
+ void start();
void stop();
EditorResourcePreview();
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 887a102aa4..06cadca1c0 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -32,6 +32,7 @@
#include "editor_export.h"
#include "editor_node.h"
+#include "editor_scale.h"
void EditorRunNative::_notification(int p_what) {
@@ -49,7 +50,7 @@ void EditorRunNative::_notification(int p_what) {
im->clear_mipmaps();
if (!im->empty()) {
- im->resize(16, 16);
+ im->resize(16 * EDSCALE, 16 * EDSCALE);
Ref<ImageTexture> small_icon;
small_icon.instance();
small_icon->create_from_image(im, 0);
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index acc7637c0b..e7019e4ef6 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -80,7 +80,7 @@ class SectionedInspectorFilter : public Object {
PropertyInfo pi = E->get();
int sp = pi.name.find("/");
- if (pi.name == "resource_path" || pi.name == "resource_name" || pi.name == "resource_local_to_scene" || pi.name.begins_with("script/")) //skip resource stuff
+ if (pi.name == "resource_path" || pi.name == "resource_name" || pi.name == "resource_local_to_scene" || pi.name.begins_with("script/") || pi.name.begins_with("_global_script")) //skip resource stuff
continue;
if (sp == -1) {
@@ -233,7 +233,7 @@ void SectionedInspector::update_category_list() {
else if (!(pi.usage & PROPERTY_USAGE_EDITOR))
continue;
- if (pi.name.find(":") != -1 || pi.name == "script" || pi.name == "resource_name" || pi.name == "resource_path" || pi.name == "resource_local_to_scene")
+ if (pi.name.find(":") != -1 || pi.name == "script" || pi.name == "resource_name" || pi.name == "resource_path" || pi.name == "resource_local_to_scene" || pi.name.begins_with("_global_script"))
continue;
if (search_box && search_box->get_text() != String() && pi.name.findn(search_box->get_text()) == -1)
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 9973c7354e..8d590e5268 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -190,6 +190,11 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
vc.order = v->order;
vc.type = v->variant.get_type();
vc.save = v->save;
+ /*if (vc.save) { this should be implemented, but lets do after 3.1 is out.
+ if (v->initial.get_type() != Variant::NIL && v->initial == v->variant) {
+ vc.save = false;
+ }
+ }*/
vc.restart_if_changed = v->restart_if_changed;
vclist.insert(vc);
@@ -327,23 +332,25 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Theme
_initial_set("interface/theme/preset", "Default");
- hints["interface/theme/preset"] = PropertyInfo(Variant::STRING, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Alien,Arc,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/preset"] = PropertyInfo(Variant::STRING, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Alien,Arc,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/icon_and_font_color", 0);
- hints["interface/theme/icon_and_font_color"] = PropertyInfo(Variant::INT, "interface/theme/icon_and_font_color", PROPERTY_HINT_ENUM, "Auto,Dark,Light", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/icon_and_font_color"] = PropertyInfo(Variant::INT, "interface/theme/icon_and_font_color", PROPERTY_HINT_ENUM, "Auto,Dark,Light", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/base_color", Color::html("#323b4f"));
- hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/accent_color", Color::html("#699ce8"));
- hints["interface/theme/base_color"] = PropertyInfo(Variant::COLOR, "interface/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/base_color"] = PropertyInfo(Variant::COLOR, "interface/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/contrast", 0.25);
hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
+ _initial_set("interface/theme/relationship_line_opacity", 0.1);
+ hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::REAL, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01");
_initial_set("interface/theme/highlight_tabs", false);
_initial_set("interface/theme/border_size", 1);
_initial_set("interface/theme/use_graph_node_headers", false);
- hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/additional_spacing", 0);
- hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::REAL, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::REAL, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/custom_theme", "");
- hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT);
// Scene tabs
_initial_set("interface/scene_tabs/show_extension", false);
@@ -385,16 +392,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// SceneTree
_initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false);
- _initial_set("docks/scene_tree/draw_relationship_lines", true);
- _initial_set("docks/scene_tree/relationship_line_color", Color::html("464646"));
// FileSystem
- _initial_set("docks/filesystem/display_mode", 0);
- hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Tree only, Split");
_initial_set("docks/filesystem/thumbnail_size", 64);
hints["docks/filesystem/thumbnail_size"] = PropertyInfo(Variant::INT, "docks/filesystem/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16");
- _initial_set("docks/filesystem/files_display_mode", 0);
- hints["docks/filesystem/files_display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/files_display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List");
_initial_set("docks/filesystem/always_show_folders", true);
// Property editor
@@ -575,6 +576,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("run/auto_save/save_before_running", true);
// Output
+ hints["run/output/font_size"] = PropertyInfo(Variant::INT, "run/output/font_size", PROPERTY_HINT_RANGE, "8,96,1", PROPERTY_USAGE_DEFAULT);
_initial_set("run/output/always_clear_output_on_play", true);
_initial_set("run/output/always_open_output_on_play", true);
_initial_set("run/output/always_close_output_on_stop", false);
@@ -783,12 +785,6 @@ void EditorSettings::create() {
// Validate/create data dir and subdirectories
dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- if (dir->change_dir(data_path) != OK) {
- ERR_PRINT("Cannot find path for data directory!");
- memdelete(dir);
- goto fail;
- }
-
if (dir->change_dir(data_dir) != OK) {
dir->make_dir_recursive(data_dir);
if (dir->change_dir(data_dir) != OK) {
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 927ef9ab52..dcb106899e 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -213,14 +213,14 @@ void EditorSpinSlider::_notification(int p_what) {
draw_string(font, Vector2(sb->get_offset().x + string_width + sep, vofs), numstr, fc, number_width);
if (get_step() == 1) {
- Ref<Texture> updown = get_icon("updown", "SpinBox");
- int updown_vofs = (get_size().height - updown->get_height()) / 2;
- updown_offset = get_size().width - sb->get_margin(MARGIN_RIGHT) - updown->get_width();
+ Ref<Texture> updown2 = get_icon("updown", "SpinBox");
+ int updown_vofs = (get_size().height - updown2->get_height()) / 2;
+ updown_offset = get_size().width - sb->get_margin(MARGIN_RIGHT) - updown2->get_width();
Color c(1, 1, 1);
if (hover_updown) {
c *= Color(1.2, 1.2, 1.2);
}
- draw_texture(updown, Vector2(updown_offset, updown_vofs), c);
+ draw_texture(updown2, Vector2(updown_offset, updown_vofs), c);
if (grabber->is_visible()) {
grabber->hide();
}
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
index 6a0a151aa9..e4807a37c6 100644
--- a/editor/editor_sub_scene.cpp
+++ b/editor/editor_sub_scene.cpp
@@ -187,8 +187,8 @@ void EditorSubScene::move(Node *p_new_parent, Node *p_new_owner) {
}
p_new_parent->add_child(selnode);
- for (List<Node *>::Element *E = to_reown.front(); E; E = E->next()) {
- E->get()->set_owner(p_new_owner);
+ for (List<Node *>::Element *F = to_reown.front(); F; F = F->next()) {
+ F->get()->set_owner(p_new_owner);
}
}
if (!is_root) {
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 31655fed87..c05db2571b 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -238,16 +238,17 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const float default_contrast = 0.25;
//Theme settings
- Color accent_color = EDITOR_DEF("interface/theme/accent_color", Color::html("#699ce8"));
- Color base_color = EDITOR_DEF("interface/theme/base_color", Color::html("#323b4f"));
- float contrast = EDITOR_DEF("interface/theme/contrast", default_contrast);
+ Color accent_color = EDITOR_GET("interface/theme/accent_color");
+ Color base_color = EDITOR_GET("interface/theme/base_color");
+ float contrast = EDITOR_GET("interface/theme/contrast");
+ float relationship_line_opacity = EDITOR_GET("interface/theme/relationship_line_opacity");
- String preset = EDITOR_DEF("interface/theme/preset", "Default");
+ String preset = EDITOR_GET("interface/theme/preset");
- bool highlight_tabs = EDITOR_DEF("interface/theme/highlight_tabs", false);
- int border_size = EDITOR_DEF("interface/theme/border_size", 1);
+ bool highlight_tabs = EDITOR_GET("interface/theme/highlight_tabs");
+ int border_size = EDITOR_GET("interface/theme/border_size");
- bool use_gn_headers = EDITOR_DEF("interface/theme/use_graph_node_headers", false);
+ bool use_gn_headers = EDITOR_GET("interface/theme/use_graph_node_headers");
Color preset_accent_color;
Color preset_base_color;
@@ -260,9 +261,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
preset_base_color = Color::html("#323b4f");
preset_contrast = default_contrast;
} else if (preset == "Custom") {
- accent_color = EDITOR_DEF("interface/theme/accent_color", Color::html("#699ce8"));
- base_color = EDITOR_DEF("interface/theme/base_color", Color::html("#323b4f"));
- contrast = EDITOR_DEF("interface/theme/contrast", default_contrast);
+ accent_color = EDITOR_GET("interface/theme/accent_color");
+ base_color = EDITOR_GET("interface/theme/base_color");
+ contrast = EDITOR_GET("interface/theme/contrast");
} else if (preset == "Alien") {
preset_accent_color = Color::html("#1bfe99");
preset_base_color = Color::html("#2f373f");
@@ -286,7 +287,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
} else if (preset == "Solarized (Dark)") {
preset_accent_color = Color::html("#268bd2");
preset_base_color = Color::html("#073642");
- preset_contrast = 0.15;
+ preset_contrast = 0.23;
} else if (preset == "Solarized (Light)") {
preset_accent_color = Color::html("#268bd2");
preset_base_color = Color::html("#fdf6e3");
@@ -368,7 +369,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("error_color", "Editor", error_color);
theme->set_color("property_color", "Editor", property_color);
- const int thumb_size = EDITOR_DEF("filesystem/file_dialog/thumbnail_size", 64);
+ const int thumb_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
theme->set_constant("scale", "Editor", EDSCALE);
theme->set_constant("thumb_size", "Editor", thumb_size);
theme->set_constant("dark_theme", "Editor", dark_theme);
@@ -481,6 +482,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_tab_unselected->set_bg_color(dark_color_1);
style_tab_unselected->set_border_color_all(dark_color_2);
+ Ref<StyleBoxFlat> style_tab_disabled = style_tab_selected->duplicate();
+ style_tab_disabled->set_bg_color(color_disabled_bg);
+ style_tab_disabled->set_border_color_all(color_disabled);
+
// Editor background
theme->set_stylebox("Background", "EditorStyles", make_flat_stylebox(background_color, default_margin_size, default_margin_size, default_margin_size, default_margin_size));
@@ -637,9 +642,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("visibility_xray", "PopupMenu", theme->get_icon("GuiVisibilityXray", "EditorIcons"));
theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size + 1) * EDSCALE);
- Ref<StyleBoxFlat> sub_inspector_bg = make_flat_stylebox(dark_color_1, 2, 0, 0, 0);
+ Ref<StyleBoxFlat> sub_inspector_bg = make_flat_stylebox(dark_color_1.linear_interpolate(accent_color, 0.08), 2, 0, 2, 2);
sub_inspector_bg->set_border_width(MARGIN_LEFT, 2);
sub_inspector_bg->set_border_color(MARGIN_LEFT, accent_color * Color(1, 1, 1, 0.3));
+ sub_inspector_bg->set_border_width(MARGIN_RIGHT, 2);
+ sub_inspector_bg->set_border_color(MARGIN_RIGHT, accent_color * Color(1, 1, 1, 0.3));
+ sub_inspector_bg->set_border_width(MARGIN_BOTTOM, 2);
+ sub_inspector_bg->set_border_color(MARGIN_BOTTOM, accent_color * Color(1, 1, 1, 0.3));
sub_inspector_bg->set_draw_center(true);
theme->set_stylebox("sub_inspector_bg", "Editor", sub_inspector_bg);
@@ -652,6 +661,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("bg", "Tree", style_tree_bg);
const Color guide_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.05);
+ Color relationship_line_color = Color(mono_color.r, mono_color.g, mono_color.b, relationship_line_opacity);
// Tree
theme->set_icon("checked", "Tree", theme->get_icon("GuiChecked", "EditorIcons"));
theme->set_icon("unchecked", "Tree", theme->get_icon("GuiUnchecked", "EditorIcons"));
@@ -670,13 +680,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("font_color_selected", "Tree", mono_color);
theme->set_color("title_button_color", "Tree", font_color);
theme->set_color("guide_color", "Tree", guide_color);
+ theme->set_color("relationship_line_color", "Tree", relationship_line_color);
theme->set_color("drop_position_color", "Tree", accent_color);
theme->set_constant("vseparation", "Tree", (extra_spacing + default_margin_size) * EDSCALE);
theme->set_constant("hseparation", "Tree", (extra_spacing + default_margin_size) * EDSCALE);
theme->set_constant("guide_width", "Tree", border_width);
theme->set_constant("item_margin", "Tree", 3 * default_margin_size * EDSCALE);
theme->set_constant("button_margin", "Tree", default_margin_size * EDSCALE);
- theme->set_constant("draw_relationship_lines", "Tree", 0);
+ theme->set_constant("draw_relationship_lines", "Tree", relationship_line_opacity >= 0.01);
+ theme->set_constant("draw_guides", "Tree", relationship_line_opacity < 0.01);
theme->set_constant("scroll_border", "Tree", default_margin_size * EDSCALE);
theme->set_constant("scroll_speed", "Tree", 12);
@@ -742,8 +754,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Tabs & TabContainer
theme->set_stylebox("tab_fg", "TabContainer", style_tab_selected);
theme->set_stylebox("tab_bg", "TabContainer", style_tab_unselected);
+ theme->set_stylebox("tab_disabled", "TabContainer", style_tab_disabled);
theme->set_stylebox("tab_fg", "Tabs", style_tab_selected);
theme->set_stylebox("tab_bg", "Tabs", style_tab_unselected);
+ theme->set_stylebox("tab_disabled", "Tabs", style_tab_disabled);
theme->set_color("font_color_fg", "TabContainer", font_color);
theme->set_color("font_color_bg", "TabContainer", font_color_disabled);
theme->set_color("font_color_fg", "Tabs", font_color);
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index ce1d545510..97ccfb0db1 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -193,6 +193,7 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
int fc = 0; //count them and find version
String version;
+ String contents_dir;
while (ret == UNZ_OK) {
@@ -225,6 +226,7 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
}
version = data_str;
+ contents_dir = file.get_base_dir().trim_suffix("/").trim_suffix("\\");
}
if (file.get_file().size() != 0) {
@@ -268,7 +270,9 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
char fname[16384];
unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
- String file = String(fname).get_file();
+ String file_path(String(fname).simplify_path());
+
+ String file = file_path.get_file();
if (file.size() == 0) {
ret = unzGoToNextFile(pkg);
@@ -283,6 +287,23 @@ bool ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
unzReadCurrentFile(pkg, data.ptrw(), data.size());
unzCloseCurrentFile(pkg);
+ String base_dir = file_path.get_base_dir().trim_suffix("/");
+
+ if (base_dir != contents_dir && base_dir.begins_with(contents_dir)) {
+ base_dir = base_dir.substr(contents_dir.length(), file_path.length()).trim_prefix("/");
+ file = base_dir.plus_file(file);
+
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ ERR_CONTINUE(!da);
+
+ String output_dir = template_path.plus_file(base_dir);
+
+ if (!DirAccess::exists(output_dir)) {
+ Error mkdir_err = da->make_dir_recursive(output_dir);
+ ERR_CONTINUE(mkdir_err != OK);
+ }
+ }
+
if (p) {
p->step(TTR("Importing:") + " " + file, fc);
}
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index 3b402407df..2bea61fe04 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -80,9 +80,9 @@ void EditorFileServer::_subthread_start(void *s) {
ERR_FAIL_COND(err != OK);
}
passutf8.write[passlen] = 0;
- String s;
- s.parse_utf8(passutf8.ptr());
- if (s != cd->efs->password) {
+ String s2;
+ s2.parse_utf8(passutf8.ptr());
+ if (s2 != cd->efs->password) {
encode_uint32(ERR_INVALID_DATA, buf4);
cd->connection->put_data(buf4, 4);
OS::get_singleton()->delay_usec(1000000);
@@ -146,23 +146,23 @@ void EditorFileServer::_subthread_start(void *s) {
ERR_FAIL_COND(err != OK);
}
fileutf8.write[namelen] = 0;
- String s;
- s.parse_utf8(fileutf8.ptr());
+ String s2;
+ s2.parse_utf8(fileutf8.ptr());
if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) {
- print_verbose("FILE EXISTS: " + s);
+ print_verbose("FILE EXISTS: " + s2);
}
if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) {
- print_verbose("MOD TIME: " + s);
+ print_verbose("MOD TIME: " + s2);
}
if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) {
- print_verbose("OPEN: " + s);
+ print_verbose("OPEN: " + s2);
}
- if (!s.begins_with("res://")) {
+ if (!s2.begins_with("res://")) {
_close_client(cd);
- ERR_FAIL_COND(!s.begins_with("res://"));
+ ERR_FAIL_COND(!s2.begins_with("res://"));
}
ERR_CONTINUE(cd->files.has(id));
@@ -172,7 +172,7 @@ void EditorFileServer::_subthread_start(void *s) {
cd->connection->put_data(buf4, 4);
encode_uint32(FileAccessNetwork::RESPONSE_FILE_EXISTS, buf4);
cd->connection->put_data(buf4, 4);
- encode_uint32(FileAccess::exists(s), buf4);
+ encode_uint32(FileAccess::exists(s2), buf4);
cd->connection->put_data(buf4, 4);
DEBUG_TIME("open_file_end")
break;
@@ -184,13 +184,13 @@ void EditorFileServer::_subthread_start(void *s) {
cd->connection->put_data(buf4, 4);
encode_uint32(FileAccessNetwork::RESPONSE_GET_MODTIME, buf4);
cd->connection->put_data(buf4, 4);
- encode_uint64(FileAccess::get_modified_time(s), buf4);
+ encode_uint64(FileAccess::get_modified_time(s2), buf4);
cd->connection->put_data(buf4, 8);
DEBUG_TIME("open_file_end")
break;
}
- FileAccess *fa = FileAccess::open(s, FileAccess::READ);
+ FileAccess *fa = FileAccess::open(s2, FileAccess::READ);
if (!fa) {
//not found, continue
encode_uint32(id, buf4);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 1ac66fdd1d..c99786bb07 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -66,7 +66,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
subdirectory_item->set_selectable(0, true);
String lpath = p_dir->get_path();
subdirectory_item->set_metadata(0, lpath);
- if (!p_select_in_favorites && (path == lpath || ((display_mode_setting == DISPLAY_MODE_SETTING_SPLIT) && path.get_base_dir() == lpath))) {
+ if (!p_select_in_favorites && (path == lpath || ((display_mode == DISPLAY_MODE_SPLIT) && path.get_base_dir() == lpath))) {
subdirectory_item->select(0);
}
@@ -84,13 +84,13 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
parent_should_expand = (_create_tree(subdirectory_item, p_dir->get_subdir(i), uncollapsed_paths, p_select_in_favorites) || parent_should_expand);
// Create all items for the files in the subdirectory
- if (display_mode_setting == DISPLAY_MODE_SETTING_TREE_ONLY) {
+ if (display_mode == DISPLAY_MODE_TREE_ONLY) {
for (int i = 0; i < p_dir->get_file_count(); i++) {
String file_name = p_dir->get_file(i);
if (searched_string.length() > 0) {
if (file_name.to_lower().find(searched_string) < 0) {
- // The seached string is not in the file name, we skip it
+ // The searched string is not in the file name, we skip it
continue;
} else {
// We expand all parents
@@ -229,19 +229,20 @@ void FileSystemDock::_update_tree(const Vector<String> p_uncollapsed_paths, bool
updating_tree = false;
}
+void FileSystemDock::set_display_mode(DisplayMode p_display_mode) {
+ display_mode = p_display_mode;
+ _update_display_mode(false);
+}
+
void FileSystemDock::_update_display_mode(bool p_force) {
// Compute the new display mode
- DisplayMode new_display_mode = (display_mode_setting == DISPLAY_MODE_SETTING_TREE_ONLY) ? DISPLAY_MODE_TREE_ONLY : DISPLAY_MODE_SPLIT;
-
- if (p_force || new_display_mode != display_mode || old_display_mode_setting != display_mode_setting) {
- display_mode = new_display_mode;
- old_display_mode_setting = display_mode_setting;
- button_toggle_display_mode->set_pressed(display_mode_setting == DISPLAY_MODE_SETTING_SPLIT ? true : false);
+ if (p_force || old_display_mode != display_mode) {
+ button_toggle_display_mode->set_pressed(display_mode == DISPLAY_MODE_SPLIT ? true : false);
switch (display_mode) {
case DISPLAY_MODE_TREE_ONLY:
tree->show();
tree->set_v_size_flags(SIZE_EXPAND_FILL);
- if (display_mode_setting == DISPLAY_MODE_SETTING_TREE_ONLY) {
+ if (display_mode == DISPLAY_MODE_TREE_ONLY) {
tree_search_box->show();
} else {
tree_search_box->hide();
@@ -262,6 +263,7 @@ void FileSystemDock::_update_display_mode(bool p_force) {
_update_file_list(true);
break;
}
+ old_display_mode = display_mode;
}
}
@@ -269,9 +271,6 @@ void FileSystemDock::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_RESIZED: {
- _update_display_mode();
- } break;
case NOTIFICATION_ENTER_TREE: {
if (initialized)
@@ -284,8 +283,7 @@ void FileSystemDock::_notification(int p_what) {
String ei = "EditorIcons";
button_reload->set_icon(get_icon("Reload", ei));
button_toggle_display_mode->set_icon(get_icon("Panels2", ei));
- _update_file_list_display_mode_button();
- button_file_list_display_mode->connect("pressed", this, "_change_file_display");
+ button_file_list_display_mode->connect("pressed", this, "_toggle_file_display");
files->connect("item_activated", this, "_file_list_activate_file");
button_hist_next->connect("pressed", this, "_fw_history");
@@ -302,9 +300,10 @@ void FileSystemDock::_notification(int p_what) {
current_path->connect("text_entered", this, "_navigate_to_path");
- display_mode_setting = DisplayModeSetting(int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode")));
always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"));
+ set_file_list_display_mode(FileSystemDock::FILE_LIST_DISPLAY_LIST);
+
_update_display_mode();
if (EditorFileSystem::get_singleton()->is_scanning()) {
@@ -351,7 +350,7 @@ void FileSystemDock::_notification(int p_what) {
button_toggle_display_mode->set_icon(get_icon("Panels2", ei));
button_hist_next->set_icon(get_icon("Forward", ei));
button_hist_prev->set_icon(get_icon("Back", ei));
- if (button_file_list_display_mode->is_pressed()) {
+ if (file_list_display_mode == FILE_LIST_DISPLAY_LIST) {
button_file_list_display_mode->set_icon(get_icon("FileThumbnail", "EditorIcons"));
} else {
button_file_list_display_mode->set_icon(get_icon("FileList", "EditorIcons"));
@@ -362,27 +361,10 @@ void FileSystemDock::_notification(int p_what) {
file_list_search_box->set_right_icon(get_icon("Search", ei));
file_list_search_box->set_clear_button_enabled(true);
- bool should_update_files = false;
-
- // Update file list display mode
- int new_file_list_mode = int(EditorSettings::get_singleton()->get("docks/filesystem/files_display_mode"));
- if (new_file_list_mode != file_list_display_mode) {
- set_file_list_display_mode(new_file_list_mode);
- _update_file_list_display_mode_button();
- should_update_files = true;
- }
-
- // Update display of files in tree
- display_mode_setting = DisplayModeSetting(int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode")));
-
- // Update allways showfolders
+ // Update always showfolders
bool new_always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"));
if (new_always_show_folders != always_show_folders) {
always_show_folders = new_always_show_folders;
- should_update_files = true;
- }
-
- if (should_update_files) {
_update_file_list(true);
}
@@ -519,9 +501,13 @@ void FileSystemDock::_tree_thumbnail_done(const String &p_path, const Ref<Textur
}
}
-void FileSystemDock::_update_file_list_display_mode_button() {
+void FileSystemDock::_toggle_file_display() {
+ _set_file_display(file_list_display_mode != FILE_LIST_DISPLAY_LIST);
+ emit_signal("display_mode_changed");
+}
- if (button_file_list_display_mode->is_pressed()) {
+void FileSystemDock::_set_file_display(bool p_active) {
+ if (p_active) {
file_list_display_mode = FILE_LIST_DISPLAY_LIST;
button_file_list_display_mode->set_icon(get_icon("FileThumbnail", "EditorIcons"));
button_file_list_display_mode->set_tooltip(TTR("View items as a grid of thumbnails."));
@@ -530,13 +516,6 @@ void FileSystemDock::_update_file_list_display_mode_button() {
button_file_list_display_mode->set_icon(get_icon("FileList", "EditorIcons"));
button_file_list_display_mode->set_tooltip(TTR("View items as a list."));
}
-}
-
-void FileSystemDock::_change_file_display() {
-
- _update_file_list_display_mode_button();
-
- EditorSettings::get_singleton()->set("docks/filesystem/files_display_mode", file_list_display_mode);
_update_file_list(true);
}
@@ -1695,9 +1674,8 @@ void FileSystemDock::_rescan() {
}
void FileSystemDock::_toggle_split_mode(bool p_active) {
- display_mode_setting = p_active ? DISPLAY_MODE_SETTING_SPLIT : DISPLAY_MODE_SETTING_TREE_ONLY;
- EditorSettings::get_singleton()->set("docks/filesystem/display_mode", int(display_mode_setting));
- _update_display_mode();
+ set_display_mode(p_active ? DISPLAY_MODE_SPLIT : DISPLAY_MODE_TREE_ONLY);
+ emit_signal("display_mode_changed");
}
void FileSystemDock::fix_dependencies(const String &p_for_file) {
@@ -1709,13 +1687,12 @@ void FileSystemDock::focus_on_filter() {
file_list_search_box->grab_focus();
}
-void FileSystemDock::set_file_list_display_mode(int p_mode) {
+void FileSystemDock::set_file_list_display_mode(FileListDisplayMode p_mode) {
if (p_mode == file_list_display_mode)
return;
- button_file_list_display_mode->set_pressed(p_mode == FILE_LIST_DISPLAY_LIST);
- _change_file_display();
+ _toggle_file_display();
}
Variant FileSystemDock::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
@@ -1855,7 +1832,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
// Drop on the favorite folder
drop_position = 0;
} else if (ti == resources_item) {
- // Drop on the resouce item
+ // Drop on the resource item
drop_position = dirs.size();
} else {
// Drop in the list
@@ -2157,7 +2134,7 @@ void FileSystemDock::select_file(const String &p_file) {
void FileSystemDock::_file_multi_selected(int p_index, bool p_selected) {
- // Set the path to the current focussed item
+ // Set the path to the current focused item
int current = files->get_current();
if (current == p_index) {
String fpath = files->get_item_metadata(current);
@@ -2219,7 +2196,7 @@ void FileSystemDock::_update_import_dock() {
// List selected
Vector<String> selected;
- if (display_mode_setting == DISPLAY_MODE_SETTING_TREE_ONLY) {
+ if (display_mode == DISPLAY_MODE_TREE_ONLY) {
// Use the tree
selected = _tree_get_selected();
@@ -2303,8 +2280,8 @@ void FileSystemDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_file_list_activate_file"), &FileSystemDock::_file_list_activate_file);
ClassDB::bind_method(D_METHOD("_tree_activate_file"), &FileSystemDock::_tree_activate_file);
ClassDB::bind_method(D_METHOD("_select_file"), &FileSystemDock::_select_file);
- ClassDB::bind_method(D_METHOD("_navigate_to_path"), &FileSystemDock::_navigate_to_path);
- ClassDB::bind_method(D_METHOD("_change_file_display"), &FileSystemDock::_change_file_display);
+ ClassDB::bind_method(D_METHOD("_navigate_to_path"), &FileSystemDock::_navigate_to_path, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("_toggle_file_display"), &FileSystemDock::_toggle_file_display);
ClassDB::bind_method(D_METHOD("_fw_history"), &FileSystemDock::_fw_history);
ClassDB::bind_method(D_METHOD("_bw_history"), &FileSystemDock::_bw_history);
ClassDB::bind_method(D_METHOD("_fs_changed"), &FileSystemDock::_fs_changed);
@@ -2334,6 +2311,8 @@ void FileSystemDock::_bind_methods() {
ADD_SIGNAL(MethodInfo("folder_removed", PropertyInfo(Variant::STRING, "folder")));
ADD_SIGNAL(MethodInfo("files_moved", PropertyInfo(Variant::STRING, "old_file"), PropertyInfo(Variant::STRING, "new_file")));
ADD_SIGNAL(MethodInfo("folder_moved", PropertyInfo(Variant::STRING, "old_folder"), PropertyInfo(Variant::STRING, "new_file")));
+
+ ADD_SIGNAL(MethodInfo("display_mode_changed"));
}
FileSystemDock::FileSystemDock(EditorNode *p_editor) {
@@ -2397,29 +2376,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
tree_search_box->connect("text_changed", this, "_search_changed", varray(tree_search_box));
toolbar2_hbc->add_child(tree_search_box);
- //toolbar_hbc->add_spacer();
-
- //Control *spacer = memnew( Control);
-
- /*
- button_open = memnew( Button );
- button_open->set_flat(true);
- button_open->connect("pressed",this,"_tree_toggle_collapsed");
- toolbar_hbc->add_child(button_open);
- button_open->hide();
- button_open->set_focus_mode(FOCUS_NONE);
- button_open->set_tooltip("Open the selected file.\nOpen as scene if a scene, or as resource otherwise.");
-
-
- button_instance = memnew( Button );
- button_instance->set_flat(true);
- button_instance->connect("pressed",this,"_instance_pressed");
- toolbar_hbc->add_child(button_instance);
- button_instance->hide();
- button_instance->set_focus_mode(FOCUS_NONE);
- button_instance->set_tooltip(TTR("Instance the selected scene(s) as child of the selected node."));
-
-*/
file_list_popup = memnew(PopupMenu);
file_list_popup->set_hide_on_window_lose_focus(true);
add_child(file_list_popup);
@@ -2461,7 +2417,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
path_hb->add_child(file_list_search_box);
button_file_list_display_mode = memnew(ToolButton);
- button_file_list_display_mode->set_toggle_mode(true);
path_hb->add_child(button_file_list_display_mode);
files = memnew(ItemList);
@@ -2564,11 +2519,10 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
history_max_size = 20;
history.push_back("res://");
- display_mode = DISPLAY_MODE_SPLIT;
+ display_mode = DISPLAY_MODE_TREE_ONLY;
+ old_display_mode = DISPLAY_MODE_TREE_ONLY;
file_list_display_mode = FILE_LIST_DISPLAY_THUMBNAILS;
- display_mode_setting = DISPLAY_MODE_SETTING_TREE_ONLY;
- old_display_mode_setting = DISPLAY_MODE_SETTING_TREE_ONLY;
always_show_folders = false;
}
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 237413acc4..cd052f9700 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -65,17 +65,12 @@ public:
FILE_LIST_DISPLAY_LIST
};
-private:
- enum DisplayModeSetting {
- DISPLAY_MODE_SETTING_TREE_ONLY,
- DISPLAY_MODE_SETTING_SPLIT,
- };
-
enum DisplayMode {
DISPLAY_MODE_TREE_ONLY,
DISPLAY_MODE_SPLIT,
};
+private:
enum FileMenu {
FILE_OPEN,
FILE_INSTANCE,
@@ -123,8 +118,7 @@ private:
FileListDisplayMode file_list_display_mode;
DisplayMode display_mode;
- DisplayModeSetting display_mode_setting;
- DisplayModeSetting old_display_mode_setting;
+ DisplayMode old_display_mode;
PopupMenu *file_list_popup;
PopupMenu *tree_popup;
@@ -187,8 +181,8 @@ private:
void _tree_gui_input(Ref<InputEvent> p_event);
void _update_file_list(bool p_keep_selection);
- void _update_file_list_display_mode_button();
- void _change_file_display();
+ void _toggle_file_display();
+ void _set_file_display(bool p_active);
void _fs_changed();
void _tree_toggle_collapsed();
@@ -287,12 +281,16 @@ public:
void fix_dependencies(const String &p_for_file);
- void set_file_list_display_mode(int p_mode);
-
int get_split_offset() { return split_box->get_split_offset(); }
void set_split_offset(int p_offset) { split_box->set_split_offset(p_offset); }
void select_file(const String &p_file);
+ void set_display_mode(DisplayMode p_display_mode);
+ DisplayMode get_display_mode() { return display_mode; }
+
+ void set_file_list_display_mode(FileListDisplayMode p_mode);
+ FileListDisplayMode get_file_list_display_mode() { return file_list_display_mode; };
+
FileSystemDock(EditorNode *p_editor);
~FileSystemDock();
};
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index bae0d196fd..4dbba952bf 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -321,7 +321,7 @@ FindInFilesDialog::FindInFilesDialog() {
_search_text_line_edit->connect("text_entered", this, "_on_search_text_entered");
gc->add_child(_search_text_line_edit);
- gc->add_child(memnew(Control)); // Space to mantain the grid aligned.
+ gc->add_child(memnew(Control)); // Space to maintain the grid aligned.
{
HBoxContainer *hbc = memnew(HBoxContainer);
@@ -766,9 +766,9 @@ void FindInFilesPanel::_on_replace_all_clicked() {
if (!item->is_checked(0))
continue;
- Map<TreeItem *, Result>::Element *E = _result_items.find(item);
- ERR_FAIL_COND(E == NULL);
- locations.push_back(E->value());
+ Map<TreeItem *, Result>::Element *F = _result_items.find(item);
+ ERR_FAIL_COND(F == NULL);
+ locations.push_back(F->value());
}
if (locations.size() != 0) {
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index dbf63102cf..44eaf3d9ef 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -176,7 +176,7 @@ Error ColladaImport::_create_scene_skeletons(Collada::Node *p_node) {
Skeleton *sk = memnew(Skeleton);
int bone = 0;
-
+ sk->set_use_bones_in_world_transform(true); // This improves compatibility in Collada
for (int i = 0; i < p_node->children.size(); i++) {
_populate_skeleton(sk, p_node->children[i], bone, -1);
@@ -724,13 +724,13 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int _prim_ofs = 0;
int vertidx = 0;
- for (int p_i = 0; p_i < p.count; p_i++) {
+ for (int p_j = 0; p_j < p.count; p_j++) {
int amount;
if (p.polygons.size()) {
- ERR_FAIL_INDEX_V(p_i, p.polygons.size(), ERR_INVALID_DATA);
- amount = p.polygons[p_i];
+ ERR_FAIL_INDEX_V(p_j, p.polygons.size(), ERR_INVALID_DATA);
+ amount = p.polygons[p_j];
} else {
amount = 3; //triangles;
}
@@ -1100,7 +1100,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
if (Object::cast_to<MeshInstance>(node)) {
- Collada::NodeGeometry *ng = static_cast<Collada::NodeGeometry *>(p_node);
+ Collada::NodeGeometry *ng2 = static_cast<Collada::NodeGeometry *>(p_node);
MeshInstance *mi = Object::cast_to<MeshInstance>(node);
@@ -1113,16 +1113,16 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
Vector<int> bone_remap;
Vector<Ref<ArrayMesh> > morphs;
- if (ng->controller) {
+ if (ng2->controller) {
- String ngsource = ng->source;
+ String ngsource = ng2->source;
if (collada.state.skin_controller_data_map.has(ngsource)) {
ERR_FAIL_COND_V(!collada.state.skin_controller_data_map.has(ngsource), ERR_INVALID_DATA);
skin = &collada.state.skin_controller_data_map[ngsource];
- Vector<String> skeletons = ng->skeletons;
+ Vector<String> skeletons = ng2->skeletons;
ERR_FAIL_COND_V(skeletons.empty(), ERR_INVALID_DATA);
@@ -1185,12 +1185,12 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
Vector<String> names = morph->sources[target].sarray;
for (int i = 0; i < names.size(); i++) {
- String meshid = names[i];
- if (collada.state.mesh_data_map.has(meshid)) {
+ String meshid2 = names[i];
+ if (collada.state.mesh_data_map.has(meshid2)) {
Ref<ArrayMesh> mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
- const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid];
+ const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid2];
mesh->set_name(meshdata.name);
- Error err = _create_mesh_surfaces(false, mesh, ng->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh> >(), false);
+ Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh> >(), false);
ERR_FAIL_COND_V(err, err);
morphs.push_back(mesh);
@@ -1212,7 +1212,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
}
} else {
- meshid = ng->source;
+ meshid = ng2->source;
}
Ref<ArrayMesh> mesh;
@@ -1226,7 +1226,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid];
mesh->set_name(meshdata.name);
- Error err = _create_mesh_surfaces(morphs.size() == 0, mesh, ng->material_map, meshdata, apply_xform, bone_remap, skin, morph, morphs, p_use_compression, use_mesh_builtin_materials);
+ Error err = _create_mesh_surfaces(morphs.size() == 0, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, morph, morphs, p_use_compression, use_mesh_builtin_materials);
ERR_FAIL_COND_V(err, err);
mesh_cache[meshid] = mesh;
@@ -1246,8 +1246,8 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
String matname = meshdata.primitives[i].material;
- if (ng->material_map.has(matname)) {
- String target = ng->material_map[matname].target;
+ if (ng2->material_map.has(matname)) {
+ String target = ng2->material_map[matname].target;
Ref<Material> material;
if (!material_cache.has(target)) {
@@ -1296,25 +1296,25 @@ Error ColladaImport::load(const String &p_path, int p_flags, bool p_force_make_t
for (int i = 0; i < vs.root_nodes.size(); i++) {
- Error err = _create_scene_skeletons(vs.root_nodes[i]);
- if (err != OK) {
+ Error err2 = _create_scene_skeletons(vs.root_nodes[i]);
+ if (err2 != OK) {
memdelete(scene);
- ERR_FAIL_COND_V(err, err);
+ ERR_FAIL_COND_V(err2, err2);
}
}
for (int i = 0; i < vs.root_nodes.size(); i++) {
- Error err = _create_scene(vs.root_nodes[i], scene);
- if (err != OK) {
+ Error err2 = _create_scene(vs.root_nodes[i], scene);
+ if (err2 != OK) {
memdelete(scene);
- ERR_FAIL_COND_V(err, err);
+ ERR_FAIL_COND_V(err2, err2);
}
- Error err2 = _create_resources(vs.root_nodes[i], p_use_compression);
- if (err2 != OK) {
+ Error err3 = _create_resources(vs.root_nodes[i], p_use_compression);
+ if (err3 != OK) {
memdelete(scene);
- ERR_FAIL_COND_V(err2, err2);
+ ERR_FAIL_COND_V(err3, err3);
}
}
@@ -1627,10 +1627,10 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
ERR_CONTINUE(xf.data.size() < 4);
xf.data.write[3] = data[0];
} else if (at.component == "X" || at.component == "Y" || at.component == "Z") {
- int cn = at.component[0] - 'X';
- ERR_CONTINUE(cn >= xf.data.size());
+ int cn2 = at.component[0] - 'X';
+ ERR_CONTINUE(cn2 >= xf.data.size());
ERR_CONTINUE(data.size() > 1);
- xf.data.write[cn] = data[0];
+ xf.data.write[cn2] = data[0];
} else if (data.size() == xf.data.size()) {
xf.data = data;
} else {
@@ -1747,11 +1747,11 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
animation->track_set_path(track, path);
animation->track_set_imported(track, true); //helps merging later
- for (int i = 0; i < at.keys.size(); i++) {
+ for (int j = 0; j < at.keys.size(); j++) {
- float time = at.keys[i].time;
+ float time = at.keys[j].time;
Variant value;
- Vector<float> data = at.keys[i].data;
+ Vector<float> data = at.keys[j].data;
if (data.size() == 1) {
//push a float
value = data[0];
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index e365471733..98f4947c2d 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -130,7 +130,7 @@ bool EditorImportPlugin::get_option_visibility(const String &p_option, const Map
return get_script_instance()->call("get_option_visibility", p_option, d);
}
-Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("import")), ERR_UNAVAILABLE);
Dictionary options;
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index 9e64fdb7c7..d396dd6d5b 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -31,7 +31,7 @@
#ifndef EDITOR_IMPORT_PLUGIN_H
#define EDITOR_IMPORT_PLUGIN_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class EditorImportPlugin : public ResourceImporter {
GDCLASS(EditorImportPlugin, Reference)
@@ -51,7 +51,7 @@ public:
virtual int get_import_order() const;
virtual void get_import_options(List<ImportOption> *r_options, int p_preset) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = NULL);
};
#endif //EDITOR_IMPORT_PLUGIN_H
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index c29e9281fa..7032146229 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -244,8 +244,8 @@ Error EditorSceneImporterGLTF::_parse_nodes(GLTFState &state) {
if (n.has("children")) {
Array children = n["children"];
- for (int i = 0; i < children.size(); i++) {
- node->children.push_back(children[i]);
+ for (int j = 0; j < children.size(); j++) {
+ node->children.push_back(children[j]);
}
}
@@ -879,7 +879,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
if (p.has("mode")) {
int mode = p["mode"];
ERR_FAIL_INDEX_V(mode, 7, ERR_FILE_CORRUPT);
- static const Mesh::PrimitiveType primitives[7] = {
+ static const Mesh::PrimitiveType primitives2[7] = {
Mesh::PRIMITIVE_POINTS,
Mesh::PRIMITIVE_LINES,
Mesh::PRIMITIVE_LINE_LOOP,
@@ -889,12 +889,14 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
Mesh::PRIMITIVE_TRIANGLE_FAN,
};
- primitive = primitives[mode];
+ primitive = primitives2[mode];
}
+ ERR_FAIL_COND_V(!a.has("POSITION"), ERR_PARSE_ERROR);
if (a.has("POSITION")) {
array[Mesh::ARRAY_VERTEX] = _decode_accessor_as_vec3(state, a["POSITION"], true);
}
+
if (a.has("NORMAL")) {
array[Mesh::ARRAY_NORMAL] = _decode_accessor_as_vec3(state, a["NORMAL"], true);
}
@@ -922,17 +924,17 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
//PoolVector<int> v = array[Mesh::ARRAY_BONES];
//PoolVector<int>::Read r = v.read();
- for (int j = 0; j < wc; j += 4) {
+ for (int k = 0; k < wc; k += 4) {
float total = 0.0;
- total += w[j + 0];
- total += w[j + 1];
- total += w[j + 2];
- total += w[j + 3];
+ total += w[k + 0];
+ total += w[k + 1];
+ total += w[k + 2];
+ total += w[k + 3];
if (total > 0.0) {
- w[j + 0] /= total;
- w[j + 1] /= total;
- w[j + 2] /= total;
- w[j + 3] /= total;
+ w[k + 0] /= total;
+ w[k + 1] /= total;
+ w[k + 2] /= total;
+ w[k + 3] /= total;
}
//print_verbose(itos(j / 4) + ": " + itos(r[j + 0]) + ":" + rtos(w[j + 0]) + ", " + itos(r[j + 1]) + ":" + rtos(w[j + 1]) + ", " + itos(r[j + 2]) + ":" + rtos(w[j + 2]) + ", " + itos(r[j + 3]) + ":" + rtos(w[j + 3]));
@@ -950,8 +952,8 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
int is = indices.size();
PoolVector<int>::Write w = indices.write();
- for (int i = 0; i < is; i += 3) {
- SWAP(w[i + 1], w[i + 2]);
+ for (int k = 0; k < is; k += 3) {
+ SWAP(w[k + 1], w[k + 2]);
}
}
array[Mesh::ARRAY_INDEX] = indices;
@@ -964,10 +966,10 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
indices.resize(vs);
{
PoolVector<int>::Write w = indices.write();
- for (int i = 0; i < vs; i += 3) {
- w[i] = i;
- w[i + 1] = i + 2;
- w[i + 2] = i + 1;
+ for (int k = 0; k < vs; k += 3) {
+ w[k] = k;
+ w[k + 1] = k + 2;
+ w[k + 2] = k + 1;
}
}
array[Mesh::ARRAY_INDEX] = indices;
@@ -2119,6 +2121,7 @@ Spatial *EditorSceneImporterGLTF::_generate_scene(GLTFState &state, int p_bake_f
Vector<Skeleton *> skeletons;
for (int i = 0; i < state.skins.size(); i++) {
Skeleton *s = memnew(Skeleton);
+ s->set_use_bones_in_world_transform(false); //GLTF does not need this since meshes are always local
String name = state.skins[i].name;
if (name == "") {
name = _gen_unique_name(state, "Skeleton");
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index 431396d584..18e53fc783 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -34,7 +34,7 @@
#include "core/io/image_loader.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/texture.h"
String ResourceImporterBitMap::get_importer_name() const {
@@ -78,7 +78,7 @@ void ResourceImporterBitMap::get_import_options(List<ImportOption> *r_options, i
r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5));
}
-Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
int create_from = p_options["create_from"];
float threshold = p_options["threshold"];
diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h
index b0168e2b53..166fa998e4 100644
--- a/editor/import/resource_importer_bitmask.h
+++ b/editor/import/resource_importer_bitmask.h
@@ -32,7 +32,7 @@
#define RESOURCE_IMPORTER_BITMASK_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class StreamBitMap;
@@ -51,7 +51,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
ResourceImporterBitMap();
~ResourceImporterBitMap();
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index be5ce34c25..cfcdbc8de4 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -77,7 +77,7 @@ void ResourceImporterCSVTranslation::get_import_options(List<ImportOption> *r_op
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0));
}
-Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
bool compress = p_options["compress"];
@@ -119,7 +119,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
if (key != "") {
for (int i = 1; i < line.size(); i++) {
- translations.write[i - 1]->add_message(key, line[i]);
+ translations.write[i - 1]->add_message(key, line[i].c_unescape());
}
}
diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h
index 3d74731e8c..6785b68d87 100644
--- a/editor/import/resource_importer_csv_translation.h
+++ b/editor/import/resource_importer_csv_translation.h
@@ -31,7 +31,7 @@
#ifndef RESOURCEIMPORTERCSVTRANSLATION_H
#define RESOURCEIMPORTERCSVTRANSLATION_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterCSVTranslation : public ResourceImporter {
GDCLASS(ResourceImporterCSVTranslation, ResourceImporter)
@@ -48,7 +48,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
ResourceImporterCSVTranslation();
};
diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp
index c3421466f2..1259e81be7 100644
--- a/editor/import/resource_importer_image.cpp
+++ b/editor/import/resource_importer_image.cpp
@@ -74,7 +74,7 @@ String ResourceImporterImage::get_preset_name(int p_idx) const {
void ResourceImporterImage::get_import_options(List<ImportOption> *r_options, int p_preset) const {
}
-Error ResourceImporterImage::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterImage::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
FileAccess *f = FileAccess::open(p_source_file, FileAccess::READ);
if (!f) {
diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h
index b38d833c5b..3d5b99db2c 100644
--- a/editor/import/resource_importer_image.h
+++ b/editor/import/resource_importer_image.h
@@ -32,7 +32,7 @@
#define RESOURCE_IMPORTER_IMAGE_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterImage : public ResourceImporter {
GDCLASS(ResourceImporterImage, ResourceImporter)
@@ -49,7 +49,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
ResourceImporterImage();
};
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index f43df02916..7e3c4cecf4 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -132,9 +132,9 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag
int mmc = image->get_mipmap_count() + 1;
f->store_32(mmc);
- for (int i = 0; i < mmc; i++) {
+ for (int j = 0; j < mmc; j++) {
- if (i > 0) {
+ if (j > 0) {
image->shrink_x2();
}
@@ -191,7 +191,7 @@ void ResourceImporterLayeredTexture::_save_tex(const Vector<Ref<Image> > &p_imag
memdelete(f);
}
-Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
int compress_mode = p_options["compress/mode"];
int no_bptc_if_rgb = p_options["compress/no_bptc_if_rgb"];
@@ -252,6 +252,7 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
}
String extension = get_save_extension();
+ Array formats_imported;
if (compress_mode == COMPRESS_VIDEO_RAM) {
//must import in all formats, in order of priority (so platform choses the best supported one. IE, etc2 over etc).
@@ -270,6 +271,8 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
encode_bptc = false;
}
}
+
+ formats_imported.push_back("bptc");
}
if (encode_bptc) {
@@ -284,23 +287,27 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
_save_tex(slices, p_save_path + ".s3tc." + extension, compress_mode, Image::COMPRESS_S3TC, mipmaps, tex_flags);
r_platform_variants->push_back("s3tc");
ok_on_pc = true;
+ formats_imported.push_back("s3tc");
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) {
_save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, Image::COMPRESS_ETC2, mipmaps, tex_flags);
r_platform_variants->push_back("etc2");
+ formats_imported.push_back("etc2");
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc")) {
_save_tex(slices, p_save_path + ".etc." + extension, compress_mode, Image::COMPRESS_ETC, mipmaps, tex_flags);
r_platform_variants->push_back("etc");
+ formats_imported.push_back("etc");
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) {
_save_tex(slices, p_save_path + ".pvrtc." + extension, compress_mode, Image::COMPRESS_PVRTC4, mipmaps, tex_flags);
r_platform_variants->push_back("pvrtc");
+ formats_imported.push_back("pvrtc");
}
if (!ok_on_pc) {
@@ -311,9 +318,79 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
_save_tex(slices, p_save_path + "." + extension, compress_mode, Image::COMPRESS_S3TC /*this is ignored */, mipmaps, tex_flags);
}
+ if (r_metadata) {
+ Dictionary metadata;
+ metadata["vram_texture"] = compress_mode == COMPRESS_VIDEO_RAM;
+ if (formats_imported.size()) {
+ metadata["imported_formats"] = formats_imported;
+ }
+ *r_metadata = metadata;
+ }
+
return OK;
}
+const char *ResourceImporterLayeredTexture::compression_formats[] = {
+ "bptc",
+ "s3tc",
+ "etc",
+ "etc2",
+ "pvrtc",
+ NULL
+};
+String ResourceImporterLayeredTexture::get_import_settings_string() const {
+
+ String s;
+
+ int index = 0;
+ while (compression_formats[index]) {
+ String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ bool test = ProjectSettings::get_singleton()->get(setting_path);
+ if (test) {
+ s += String(compression_formats[index]);
+ }
+ index++;
+ }
+
+ return s;
+}
+
+bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_path) const {
+
+ //will become invalid if formats are missing to import
+ Dictionary metadata = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
+
+ if (!metadata.has("vram_texture")) {
+ return false;
+ }
+
+ bool vram = metadata["vram_texture"];
+ if (!vram) {
+ return true; //do not care about non vram
+ }
+
+ Vector<String> formats_imported;
+ if (metadata.has("imported_formats")) {
+ formats_imported = metadata["imported_formats"];
+ }
+
+ int index = 0;
+ bool valid = true;
+ while (compression_formats[index]) {
+ String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ bool test = ProjectSettings::get_singleton()->get(setting_path);
+ if (test) {
+ if (formats_imported.find(compression_formats[index]) == -1) {
+ valid = false;
+ break;
+ }
+ }
+ index++;
+ }
+
+ return valid;
+}
+
ResourceImporterLayeredTexture *ResourceImporterLayeredTexture::singleton = NULL;
ResourceImporterLayeredTexture::ResourceImporterLayeredTexture() {
diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h
index 599fdf12fa..6b393886b7 100644
--- a/editor/import/resource_importer_layered_texture.h
+++ b/editor/import/resource_importer_layered_texture.h
@@ -32,7 +32,7 @@
#define RESOURCE_IMPORTER_LAYERED_TEXTURE_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class StreamTexture;
@@ -40,6 +40,7 @@ class ResourceImporterLayeredTexture : public ResourceImporter {
GDCLASS(ResourceImporterLayeredTexture, ResourceImporter)
bool is_3d;
+ static const char *compression_formats[];
protected:
static void _texture_reimport_srgb(const Ref<StreamTexture> &p_tex);
@@ -76,10 +77,13 @@ public:
void _save_tex(const Vector<Ref<Image> > &p_images, const String &p_to_path, int p_compress_mode, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags);
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
void update_imports();
+ virtual bool are_import_settings_valid(const String &p_path) const;
+ virtual String get_import_settings_string() const;
+
void set_3d(bool p_3d) { is_3d = p_3d; }
ResourceImporterLayeredTexture();
~ResourceImporterLayeredTexture();
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index 030b54a589..e950421476 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -499,7 +499,7 @@ bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Ma
return true;
}
-Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
List<Ref<Mesh> > meshes;
diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h
index effc56ad95..b2a53f582c 100644
--- a/editor/import/resource_importer_obj.h
+++ b/editor/import/resource_importer_obj.h
@@ -61,7 +61,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
ResourceImporterOBJ();
};
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index f230fa1b8b..5eb1d2ec6c 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -46,7 +46,7 @@
#include "scene/resources/box_shape.h"
#include "scene/resources/plane_shape.h"
#include "scene/resources/ray_shape.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include "scene/resources/sphere_shape.h"
uint32_t EditorSceneImporter::get_import_flags() const {
@@ -1183,7 +1183,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito
return importer->import_animation(p_path, p_flags, p_bake_fps);
}
-Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
String src_path = p_source_file;
@@ -1240,7 +1240,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
String root_type = p_options["nodes/root_type"];
- if (scene->get_class() != root_type) {
+ if (root_type != "Spatial") {
Node *base_node = Object::cast_to<Node>(ClassDB::instance(root_type));
if (base_node) {
@@ -1314,9 +1314,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
if (bool(p_options["external_files/store_in_subdir"])) {
String subdir_name = p_source_file.get_file().get_basename();
DirAccess *da = DirAccess::open(base_path);
- Error err = da->make_dir(subdir_name);
+ Error err2 = da->make_dir(subdir_name);
memdelete(da);
- ERR_FAIL_COND_V(err != OK && err != ERR_ALREADY_EXISTS, err);
+ ERR_FAIL_COND_V(err2 != OK && err2 != ERR_ALREADY_EXISTS, err2);
base_path = base_path.plus_file(subdir_name);
}
}
@@ -1331,7 +1331,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
float texel_size = p_options["meshes/lightmap_texel_size"];
texel_size = MAX(0.001, texel_size);
- EditorProgress progress("gen_lightmaps", TTR("Generating Lightmaps"), meshes.size());
+ EditorProgress progress2("gen_lightmaps", TTR("Generating Lightmaps"), meshes.size());
int step = 0;
for (Map<Ref<ArrayMesh>, Transform>::Element *E = meshes.front(); E; E = E->next()) {
@@ -1341,10 +1341,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
name = "Mesh " + itos(step);
}
- progress.step(TTR("Generating for Mesh: ") + name + " (" + itos(step) + "/" + itos(meshes.size()) + ")", step);
+ progress2.step(TTR("Generating for Mesh: ") + name + " (" + itos(step) + "/" + itos(meshes.size()) + ")", step);
- Error err = mesh->lightmap_unwrap(E->get(), texel_size);
- if (err != OK) {
+ Error err2 = mesh->lightmap_unwrap(E->get(), texel_size);
+ if (err2 != OK) {
EditorNode::add_io_error("Mesh '" + name + "' failed lightmap generation. Please fix geometry.");
}
step++;
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 9435b6599a..99f8b1a8e0 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -31,7 +31,7 @@
#ifndef RESOURCEIMPORTERSCENE_H
#define RESOURCEIMPORTERSCENE_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "scene/resources/animation.h"
#include "scene/resources/mesh.h"
#include "scene/resources/shape.h"
@@ -153,7 +153,7 @@ public:
void _filter_tracks(Node *scene, const String &p_text);
void _optimize_animations(Node *scene, float p_max_lin_error, float p_max_ang_error, float p_max_angle);
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
Node *import_scene_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps);
Ref<Animation> import_animation_from_other_importer(EditorSceneImporter *p_exception, const String &p_path, uint32_t p_flags, int p_bake_fps);
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index a3bc9d0ec9..d72de3de48 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -219,7 +219,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options,
r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
}
-void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb, bool p_force_rgbe, bool p_detect_normal, bool p_force_normal) {
+void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb, bool p_force_rgbe, bool p_detect_normal, bool p_force_normal, bool p_force_po2_for_compressed) {
FileAccess *f = FileAccess::open(p_to_path, FileAccess::WRITE);
f->store_8('G');
@@ -227,8 +227,20 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String
f->store_8('S');
f->store_8('T'); //godot streamable texture
- f->store_32(p_image->get_width());
- f->store_32(p_image->get_height());
+ bool resize_to_po2 = false;
+
+ if (p_compress_mode == COMPRESS_VIDEO_RAM && p_force_po2_for_compressed && (p_mipmaps || p_texture_flags & Texture::FLAG_REPEAT)) {
+ resize_to_po2 = true;
+ f->store_16(next_power_of_2(p_image->get_width()));
+ f->store_16(p_image->get_width());
+ f->store_16(next_power_of_2(p_image->get_height()));
+ f->store_16(p_image->get_height());
+ } else {
+ f->store_16(p_image->get_width());
+ f->store_16(0);
+ f->store_16(p_image->get_height());
+ f->store_16(0);
+ }
f->store_32(p_texture_flags);
uint32_t format = 0;
@@ -310,6 +322,9 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String
case COMPRESS_VIDEO_RAM: {
Ref<Image> image = p_image->duplicate();
+ if (resize_to_po2) {
+ image->resize_to_po2();
+ }
if (p_mipmaps) {
image->generate_mipmaps(p_force_normal);
}
@@ -360,7 +375,7 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String
memdelete(f);
}
-Error ResourceImporterTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
int compress_mode = p_options["compress/mode"];
float lossy = p_options["compress/lossy_quality"];
@@ -386,6 +401,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
if (err != OK)
return err;
+ Array formats_imported;
+
int tex_flags = 0;
if (repeat > 0)
tex_flags |= Texture::FLAG_REPEAT;
@@ -470,6 +487,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
can_bptc = false;
}
}
+
+ formats_imported.push_back("bptc");
}
if (!can_bptc && is_hdr && !force_rgbe) {
@@ -478,26 +497,30 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
}
if (can_bptc || can_s3tc) {
- _save_stex(image, p_save_path + ".s3tc.stex", compress_mode, lossy, can_bptc ? Image::COMPRESS_BPTC : Image::COMPRESS_S3TC, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal);
+ _save_stex(image, p_save_path + ".s3tc.stex", compress_mode, lossy, can_bptc ? Image::COMPRESS_BPTC : Image::COMPRESS_S3TC, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal, false);
r_platform_variants->push_back("s3tc");
+ formats_imported.push_back("s3tc");
ok_on_pc = true;
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) {
- _save_stex(image, p_save_path + ".etc2.stex", compress_mode, lossy, Image::COMPRESS_ETC2, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal);
+ _save_stex(image, p_save_path + ".etc2.stex", compress_mode, lossy, Image::COMPRESS_ETC2, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal, true);
r_platform_variants->push_back("etc2");
+ formats_imported.push_back("etc2");
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc")) {
- _save_stex(image, p_save_path + ".etc.stex", compress_mode, lossy, Image::COMPRESS_ETC, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal);
+ _save_stex(image, p_save_path + ".etc.stex", compress_mode, lossy, Image::COMPRESS_ETC, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal, true);
r_platform_variants->push_back("etc");
+ formats_imported.push_back("etc");
}
if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) {
- _save_stex(image, p_save_path + ".pvrtc.stex", compress_mode, lossy, Image::COMPRESS_PVRTC4, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal);
+ _save_stex(image, p_save_path + ".pvrtc.stex", compress_mode, lossy, Image::COMPRESS_PVRTC4, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal, true);
r_platform_variants->push_back("pvrtc");
+ formats_imported.push_back("pvrtc");
}
if (!ok_on_pc) {
@@ -505,12 +528,81 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
}
} else {
//import normally
- _save_stex(image, p_save_path + ".stex", compress_mode, lossy, Image::COMPRESS_S3TC /*this is ignored */, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal);
+ _save_stex(image, p_save_path + ".stex", compress_mode, lossy, Image::COMPRESS_S3TC /*this is ignored */, mipmaps, tex_flags, stream, detect_3d, detect_srgb, force_rgbe, detect_normal, force_normal, false);
}
+ if (r_metadata) {
+ Dictionary metadata;
+ metadata["vram_texture"] = compress_mode == COMPRESS_VIDEO_RAM;
+ if (formats_imported.size()) {
+ metadata["imported_formats"] = formats_imported;
+ }
+ *r_metadata = metadata;
+ }
return OK;
}
+const char *ResourceImporterTexture::compression_formats[] = {
+ "bptc",
+ "s3tc",
+ "etc",
+ "etc2",
+ "pvrtc",
+ NULL
+};
+String ResourceImporterTexture::get_import_settings_string() const {
+
+ String s;
+
+ int index = 0;
+ while (compression_formats[index]) {
+ String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ bool test = ProjectSettings::get_singleton()->get(setting_path);
+ if (test) {
+ s += String(compression_formats[index]);
+ }
+ index++;
+ }
+
+ return s;
+}
+
+bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) const {
+
+ //will become invalid if formats are missing to import
+ Dictionary metadata = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
+
+ if (!metadata.has("vram_texture")) {
+ return false;
+ }
+
+ bool vram = metadata["vram_texture"];
+ if (!vram) {
+ return true; //do not care about non vram
+ }
+
+ Vector<String> formats_imported;
+ if (metadata.has("imported_formats")) {
+ formats_imported = metadata["imported_formats"];
+ }
+
+ int index = 0;
+ bool valid = true;
+ while (compression_formats[index]) {
+ String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ bool test = ProjectSettings::get_singleton()->get(setting_path);
+ if (test) {
+ if (formats_imported.find(compression_formats[index]) == -1) {
+ valid = false;
+ break;
+ }
+ }
+ index++;
+ }
+
+ return valid;
+}
+
ResourceImporterTexture *ResourceImporterTexture::singleton = NULL;
ResourceImporterTexture::ResourceImporterTexture() {
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index 900654c114..ef74e4e41e 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -32,7 +32,7 @@
#define RESOURCEIMPORTTEXTURE_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class StreamTexture;
@@ -54,6 +54,7 @@ protected:
static void _texture_reimport_normal(const Ref<StreamTexture> &p_tex);
static ResourceImporterTexture *singleton;
+ static const char *compression_formats[];
public:
static ResourceImporterTexture *get_singleton() { return singleton; }
@@ -83,12 +84,15 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- void _save_stex(const Ref<Image> &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb, bool p_force_rgbe, bool p_detect_normal, bool p_force_normal);
+ void _save_stex(const Ref<Image> &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb, bool p_force_rgbe, bool p_detect_normal, bool p_force_normal, bool p_force_po2_for_compressed);
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
void update_imports();
+ virtual bool are_import_settings_valid(const String &p_path) const;
+ virtual String get_import_settings_string() const;
+
ResourceImporterTexture();
~ResourceImporterTexture();
};
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index 76ab7a7037..857d8992fd 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -82,7 +82,7 @@ void ResourceImporterWAV::get_import_options(List<ImportOption> *r_options, int
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Disabled,RAM (Ima-ADPCM)"), 0));
}
-Error ResourceImporterWAV::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterWAV::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
/* STEP 1, READ WAVE FILE */
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index 68e677b977..f993f9e7bc 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -31,7 +31,7 @@
#ifndef RESOURCEIMPORTWAV_H
#define RESOURCEIMPORTWAV_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterWAV : public ResourceImporter {
GDCLASS(ResourceImporterWAV, ResourceImporter)
@@ -161,7 +161,7 @@ public:
}
}
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
ResourceImporterWAV();
};
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 40cf02ac9d..15539ee3db 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -424,7 +424,7 @@ void ImportDock::_reimport_attempt() {
void ImportDock::_reimport_and_restart() {
EditorNode::get_singleton()->save_all_scenes();
- EditorResourcePreview::get_singleton()->stop(); //dont try to re-create previews after import
+ EditorResourcePreview::get_singleton()->stop(); //don't try to re-create previews after import
_reimport();
EditorNode::get_singleton()->restart_editor();
}
diff --git a/editor/import_dock.h b/editor/import_dock.h
index 1d43e00b63..77a34e80eb 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -32,7 +32,7 @@
#define IMPORTDOCK_H
#include "core/io/config_file.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "editor/editor_file_system.h"
#include "editor/editor_inspector.h"
#include "scene/gui/box_container.h"
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 88672bdf34..12bf544357 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -120,6 +120,10 @@ void PluginConfigDialog::_notification(int p_what) {
connect("confirmed", this, "_on_confirmed");
get_cancel()->connect("pressed", this, "_on_cancelled");
} break;
+
+ case NOTIFICATION_POST_POPUP: {
+ name_edit->grab_focus();
+ } break;
}
}
@@ -215,11 +219,15 @@ PluginConfigDialog::PluginConfigDialog() {
grid->add_child(script_option_lb);
script_option_edit = memnew(OptionButton);
+ int default_lang = 0;
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptLanguage *lang = ScriptServer::get_language(i);
script_option_edit->add_item(lang->get_name());
+ if (lang == GDScriptLanguage::get_singleton()) {
+ default_lang = i;
+ }
}
- script_option_edit->select(0);
+ script_option_edit->select(default_lang);
grid->add_child(script_option_edit);
Label *script_lb = memnew(Label);
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 41e2062ab2..28f786e99a 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -201,6 +201,8 @@ void AbstractPolygon2DEditor::_notification(int p_what) {
case NOTIFICATION_READY: {
+ disable_polygon_editing(false, String());
+
button_create->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveCreate", "EditorIcons"));
button_edit->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveEdit", "EditorIcons"));
button_delete->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("CurveDelete", "EditorIcons"));
@@ -275,9 +277,30 @@ void AbstractPolygon2DEditor::_wip_close() {
selected_point = Vertex();
}
+void AbstractPolygon2DEditor::disable_polygon_editing(bool p_disable, String p_reason) {
+
+ _polygon_editing_enabled = !p_disable;
+
+ button_create->set_disabled(p_disable);
+ button_edit->set_disabled(p_disable);
+ button_delete->set_disabled(p_disable);
+
+ if (p_disable) {
+
+ button_create->set_tooltip(p_reason);
+ button_edit->set_tooltip(p_reason);
+ button_delete->set_tooltip(p_reason);
+ } else {
+
+ button_create->set_tooltip(TTR("Create points."));
+ button_edit->set_tooltip(TTR("Edit points.\nLMB: Move Point\nRMB: Erase Point"));
+ button_delete->set_tooltip(TTR("Erase points."));
+ }
+}
+
bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
- if (!_get_node())
+ if (!_get_node() || !_polygon_editing_enabled)
return false;
Ref<InputEventMouseButton> mb = p_event;
@@ -324,16 +347,16 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return true;
} else {
- Vector<Vector2> vertices = _get_polygon(insert.polygon);
- pre_move_edit = vertices;
+ Vector<Vector2> vertices2 = _get_polygon(insert.polygon);
+ pre_move_edit = vertices2;
printf("setting pre_move_edit\n");
edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos));
- vertices.insert(edited_point.vertex, edited_point.pos);
+ vertices2.insert(edited_point.vertex, edited_point.pos);
selected_point = edited_point;
edge_point = PosVertex();
undo_redo->create_action(TTR("Insert Point"));
- _action_set_polygon(insert.polygon, vertices);
+ _action_set_polygon(insert.polygon, vertices2);
_commit_action();
return true;
}
@@ -627,9 +650,8 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
void AbstractPolygon2DEditor::edit(Node *p_polygon) {
- if (!canvas_item_editor) {
+ if (!canvas_item_editor)
canvas_item_editor = CanvasItemEditor::get_singleton();
- }
if (p_polygon) {
@@ -648,7 +670,6 @@ void AbstractPolygon2DEditor::edit(Node *p_polygon) {
selected_point = Vertex();
canvas_item_editor->update_viewport();
-
} else {
_set_node(NULL);
@@ -783,19 +804,16 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wi
add_child(button_create);
button_create->connect("pressed", this, "_menu_option", varray(MODE_CREATE));
button_create->set_toggle_mode(true);
- button_create->set_tooltip(TTR("Create points."));
button_edit = memnew(ToolButton);
add_child(button_edit);
button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
- button_edit->set_tooltip(TTR("Edit points.\nLMB: Move Point\nRMB: Erase Point"));
button_delete = memnew(ToolButton);
add_child(button_delete);
button_delete->connect("pressed", this, "_menu_option", varray(MODE_DELETE));
button_delete->set_toggle_mode(true);
- button_delete->set_tooltip(TTR("Erase points."));
create_resource = memnew(ConfirmationDialog);
add_child(create_resource);
diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h
index 289c2785b1..97244fa4e9 100644
--- a/editor/plugins/abstract_polygon_2d_editor.h
+++ b/editor/plugins/abstract_polygon_2d_editor.h
@@ -81,6 +81,8 @@ class AbstractPolygon2DEditor : public HBoxContainer {
bool wip_active;
bool wip_destructive;
+ bool _polygon_editing_enabled;
+
CanvasItemEditor *canvas_item_editor;
EditorNode *editor;
Panel *panel;
@@ -135,6 +137,8 @@ protected:
virtual void _create_resource();
public:
+ void disable_polygon_editing(bool p_disable, String p_reason);
+
bool forward_gui_input(const Ref<InputEvent> &p_event);
void forward_canvas_draw_over_viewport(Control *p_overlay);
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 3029ad978a..2ae39d90de 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -142,7 +142,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
}
updating = true;
- undo_redo->create_action("Move Node Point");
+ undo_redo->create_action(TTR("Move Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, point);
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
undo_redo->add_do_method(this, "_update_space");
@@ -325,7 +325,7 @@ void AnimationNodeBlendSpace1DEditor::_config_changed(double) {
return;
updating = true;
- undo_redo->create_action("Change BlendSpace1D Limits");
+ undo_redo->create_action(TTR("Change BlendSpace1D Limits"));
undo_redo->add_do_method(blend_space.ptr(), "set_max_space", max_value->get_value());
undo_redo->add_undo_method(blend_space.ptr(), "set_max_space", blend_space->get_max_space());
undo_redo->add_do_method(blend_space.ptr(), "set_min_space", min_value->get_value());
@@ -345,7 +345,7 @@ void AnimationNodeBlendSpace1DEditor::_labels_changed(String) {
return;
updating = true;
- undo_redo->create_action("Change BlendSpace1D Labels", UndoRedo::MERGE_ENDS);
+ undo_redo->create_action(TTR("Change BlendSpace1D Labels"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(blend_space.ptr(), "set_value_label", label_value->get_text());
undo_redo->add_undo_method(blend_space.ptr(), "set_value_label", blend_space->get_value_label());
undo_redo->add_do_method(this, "_update_space");
@@ -401,7 +401,7 @@ void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
}
updating = true;
- undo_redo->create_action("Add Node Point");
+ undo_redo->create_action(TTR("Add Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", node, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
undo_redo->add_do_method(this, "_update_space");
@@ -419,7 +419,7 @@ void AnimationNodeBlendSpace1DEditor::_add_animation_type(int p_index) {
anim->set_animation(animations_to_add[p_index]);
updating = true;
- undo_redo->create_action("Add Animation Point");
+ undo_redo->create_action(TTR("Add Animation Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
undo_redo->add_do_method(this, "_update_space");
@@ -489,7 +489,7 @@ void AnimationNodeBlendSpace1DEditor::_erase_selected() {
if (selected_point != -1) {
updating = true;
- undo_redo->create_action("Remove BlendSpace1D Point");
+ undo_redo->create_action(TTR("Remove BlendSpace1D Point"));
undo_redo->add_do_method(blend_space.ptr(), "remove_blend_point", selected_point);
undo_redo->add_undo_method(blend_space.ptr(), "add_blend_point", blend_space->get_blend_point_node(selected_point), blend_space->get_blend_point_position(selected_point), selected_point);
undo_redo->add_do_method(this, "_update_space");
@@ -507,7 +507,7 @@ void AnimationNodeBlendSpace1DEditor::_edit_point_pos(double) {
return;
updating = true;
- undo_redo->create_action("Move BlendSpace1D Node Point");
+ undo_redo->create_action(TTR("Move BlendSpace1D Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, edit_value->get_value());
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
undo_redo->add_do_method(this, "_update_space");
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 038e2d0b3e..918f3a2149 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -200,7 +200,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
updating = true;
- undo_redo->create_action("Add Triangle");
+ undo_redo->create_action(TTR("Add Triangle"));
undo_redo->add_do_method(blend_space.ptr(), "add_triangle", making_triangle[0], making_triangle[1], making_triangle[2]);
undo_redo->add_undo_method(blend_space.ptr(), "remove_triangle", blend_space->get_triangle_count());
undo_redo->add_do_method(this, "_update_space");
@@ -225,7 +225,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
updating = true;
- undo_redo->create_action("Move Node Point");
+ undo_redo->create_action(TTR("Move Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, point);
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
undo_redo->add_do_method(this, "_update_space");
@@ -333,7 +333,7 @@ void AnimationNodeBlendSpace2DEditor::_add_menu_type(int p_index) {
}
updating = true;
- undo_redo->create_action("Add Node Point");
+ undo_redo->create_action(TTR("Add Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", node, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
undo_redo->add_do_method(this, "_update_space");
@@ -352,7 +352,7 @@ void AnimationNodeBlendSpace2DEditor::_add_animation_type(int p_index) {
anim->set_animation(animations_to_add[p_index]);
updating = true;
- undo_redo->create_action("Add Animation Point");
+ undo_redo->create_action(TTR("Add Animation Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
undo_redo->add_do_method(this, "_update_space");
@@ -639,7 +639,7 @@ void AnimationNodeBlendSpace2DEditor::_config_changed(double) {
return;
updating = true;
- undo_redo->create_action("Change BlendSpace2D Limits");
+ undo_redo->create_action(TTR("Change BlendSpace2D Limits"));
undo_redo->add_do_method(blend_space.ptr(), "set_max_space", Vector2(max_x_value->get_value(), max_y_value->get_value()));
undo_redo->add_undo_method(blend_space.ptr(), "set_max_space", blend_space->get_max_space());
undo_redo->add_do_method(blend_space.ptr(), "set_min_space", Vector2(min_x_value->get_value(), min_y_value->get_value()));
@@ -661,7 +661,7 @@ void AnimationNodeBlendSpace2DEditor::_labels_changed(String) {
return;
updating = true;
- undo_redo->create_action("Change BlendSpace2D Labels", UndoRedo::MERGE_ENDS);
+ undo_redo->create_action(TTR("Change BlendSpace2D Labels"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(blend_space.ptr(), "set_x_label", label_x->get_text());
undo_redo->add_undo_method(blend_space.ptr(), "set_x_label", blend_space->get_x_label());
undo_redo->add_do_method(blend_space.ptr(), "set_y_label", label_y->get_text());
@@ -677,7 +677,7 @@ void AnimationNodeBlendSpace2DEditor::_erase_selected() {
if (selected_point != -1) {
updating = true;
- undo_redo->create_action("Remove BlendSpace2D Point");
+ undo_redo->create_action(TTR("Remove BlendSpace2D Point"));
undo_redo->add_do_method(blend_space.ptr(), "remove_blend_point", selected_point);
undo_redo->add_undo_method(blend_space.ptr(), "add_blend_point", blend_space->get_blend_point_node(selected_point), blend_space->get_blend_point_position(selected_point), selected_point);
@@ -700,7 +700,7 @@ void AnimationNodeBlendSpace2DEditor::_erase_selected() {
} else if (selected_triangle != -1) {
updating = true;
- undo_redo->create_action("Remove BlendSpace2D Triangle");
+ undo_redo->create_action(TTR("Remove BlendSpace2D Triangle"));
undo_redo->add_do_method(blend_space.ptr(), "remove_triangle", selected_triangle);
undo_redo->add_undo_method(blend_space.ptr(), "add_triangle", blend_space->get_triangle_point(selected_triangle, 0), blend_space->get_triangle_point(selected_triangle, 1), blend_space->get_triangle_point(selected_triangle, 2), selected_triangle);
@@ -737,7 +737,7 @@ void AnimationNodeBlendSpace2DEditor::_edit_point_pos(double) {
if (updating)
return;
updating = true;
- undo_redo->create_action("Move Node Point");
+ undo_redo->create_action(TTR("Move Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, Vector2(edit_x->get_value(), edit_y->get_value()));
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
undo_redo->add_do_method(this, "_update_space");
@@ -814,7 +814,7 @@ void AnimationNodeBlendSpace2DEditor::_removed_from_graph() {
void AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled() {
- undo_redo->create_action("Toggle Auto Triangles");
+ undo_redo->create_action(TTR("Toggle Auto Triangles"));
undo_redo->add_do_method(blend_space.ptr(), "set_auto_triangles", auto_triangles->is_pressed());
undo_redo->add_undo_method(blend_space.ptr(), "set_auto_triangles", blend_space->get_auto_triangles());
undo_redo->add_do_method(this, "_update_space");
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 13c80e5394..afe2573898 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -91,7 +91,7 @@ void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_propert
AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_tree();
updating = true;
- undo_redo->create_action("Parameter Changed: " + String(p_property), UndoRedo::MERGE_ENDS);
+ undo_redo->create_action(TTR("Parameter Changed") + ": " + String(p_property), UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(tree, p_property, p_value);
undo_redo->add_undo_property(tree, p_property, tree->get(p_property));
undo_redo->add_do_method(this, "_update_graph");
@@ -231,6 +231,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
}
pb->set_percent_visible(false);
+ pb->set_custom_minimum_size(Vector2(0, 14) * EDSCALE);
animations[E->get()] = pb;
node->add_child(pb);
@@ -325,7 +326,7 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
name = base_name + " " + itos(base);
}
- undo_redo->create_action("Add Node to BlendTree");
+ undo_redo->create_action(TTR("Add Node to BlendTree"));
undo_redo->add_do_method(blend_tree.ptr(), "add_node", name, anode, instance_pos / EDSCALE);
undo_redo->add_undo_method(blend_tree.ptr(), "remove_node", name);
undo_redo->add_do_method(this, "_update_graph");
@@ -336,7 +337,7 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
void AnimationNodeBlendTreeEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_to, const StringName &p_which) {
updating = true;
- undo_redo->create_action("Node Moved");
+ undo_redo->create_action(TTR("Node Moved"));
undo_redo->add_do_method(blend_tree.ptr(), "set_node_position", p_which, p_to / EDSCALE);
undo_redo->add_undo_method(blend_tree.ptr(), "set_node_position", p_which, p_from / EDSCALE);
undo_redo->add_do_method(this, "_update_graph");
@@ -354,7 +355,7 @@ void AnimationNodeBlendTreeEditor::_connection_request(const String &p_from, int
return;
}
- undo_redo->create_action("Nodes Connected");
+ undo_redo->create_action(TTR("Nodes Connected"));
undo_redo->add_do_method(blend_tree.ptr(), "connect_node", p_to, p_to_index, p_from);
undo_redo->add_undo_method(blend_tree.ptr(), "disconnect_node", p_to, p_to_index);
undo_redo->add_do_method(this, "_update_graph");
@@ -367,7 +368,7 @@ void AnimationNodeBlendTreeEditor::_disconnection_request(const String &p_from,
graph->disconnect_node(p_from, p_from_index, p_to, p_to_index);
updating = true;
- undo_redo->create_action("Nodes Disconnected");
+ undo_redo->create_action(TTR("Nodes Disconnected"));
undo_redo->add_do_method(blend_tree.ptr(), "disconnect_node", p_to, p_to_index);
undo_redo->add_undo_method(blend_tree.ptr(), "connect_node", p_to, p_to_index, p_from);
undo_redo->add_do_method(this, "_update_graph");
@@ -383,7 +384,7 @@ void AnimationNodeBlendTreeEditor::_anim_selected(int p_index, Array p_options,
Ref<AnimationNodeAnimation> anim = blend_tree->get_node(p_node);
ERR_FAIL_COND(!anim.is_valid());
- undo_redo->create_action("Set Animation");
+ undo_redo->create_action(TTR("Set Animation"));
undo_redo->add_do_method(anim.ptr(), "set_animation", option);
undo_redo->add_undo_method(anim.ptr(), "set_animation", anim->get_animation());
undo_redo->add_do_method(this, "_update_graph");
@@ -393,7 +394,7 @@ void AnimationNodeBlendTreeEditor::_anim_selected(int p_index, Array p_options,
void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
- undo_redo->create_action("Delete Node");
+ undo_redo->create_action(TTR("Delete Node"));
undo_redo->add_do_method(blend_tree.ptr(), "remove_node", p_which);
undo_redo->add_undo_method(blend_tree.ptr(), "add_node", p_which, blend_tree->get_node(p_which), blend_tree.ptr()->get_node_position(p_which));
@@ -434,7 +435,7 @@ void AnimationNodeBlendTreeEditor::_open_in_editor(const String &p_which) {
void AnimationNodeBlendTreeEditor::_filter_toggled() {
updating = true;
- undo_redo->create_action("Toggle filter on/off");
+ undo_redo->create_action(TTR("Toggle Filter On/Off"));
undo_redo->add_do_method(_filter_edit.ptr(), "set_filter_enabled", filter_enabled->is_pressed());
undo_redo->add_undo_method(_filter_edit.ptr(), "set_filter_enabled", _filter_edit->is_filter_enabled());
undo_redo->add_do_method(this, "_update_filters", _filter_edit);
@@ -452,7 +453,7 @@ void AnimationNodeBlendTreeEditor::_filter_edited() {
bool filtered = edited->is_checked(0);
updating = true;
- undo_redo->create_action("Change filter");
+ undo_redo->create_action(TTR("Change Filter"));
undo_redo->add_do_method(_filter_edit.ptr(), "set_filter_path", edited_path, filtered);
undo_redo->add_undo_method(_filter_edit.ptr(), "set_filter_path", edited_path, _filter_edit->is_path_filtered(edited_path));
undo_redo->add_do_method(this, "_update_filters", _filter_edit);
@@ -769,7 +770,7 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
String base_path = AnimationTreeEditor::get_singleton()->get_base_path();
updating = true;
- undo_redo->create_action("Node Renamed");
+ undo_redo->create_action(TTR("Node Renamed"));
undo_redo->add_do_method(blend_tree.ptr(), "rename_node", prev_name, name);
undo_redo->add_undo_method(blend_tree.ptr(), "rename_node", name, prev_name);
undo_redo->add_do_method(AnimationTreeEditor::get_singleton()->get_tree(), "rename_parameter", base_path + prev_name, base_path + name);
@@ -785,8 +786,8 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
for (int i = 0; i < visible_properties.size(); i++) {
String pname = visible_properties[i]->get_edited_property().operator String();
if (pname.begins_with(base_path + prev_name)) {
- String new_name = pname.replace_first(base_path + prev_name, base_path + name);
- visible_properties[i]->set_object_and_property(visible_properties[i]->get_edited_object(), new_name);
+ String new_name2 = pname.replace_first(base_path + prev_name, base_path + name);
+ visible_properties[i]->set_object_and_property(visible_properties[i]->get_edited_object(), new_name2);
}
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index b32b537d3d..bbaf41e3cc 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1160,22 +1160,22 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
return;
}
- String current = animation->get_item_text(animation->get_selected());
- Ref<Animation> anim = player->get_animation(current);
- //editor->edit_resource(anim);
- EditorSettings::get_singleton()->set_resource_clipboard(anim);
+ String current2 = animation->get_item_text(animation->get_selected());
+ Ref<Animation> anim2 = player->get_animation(current2);
+ //editor->edit_resource(anim2);
+ EditorSettings::get_singleton()->set_resource_clipboard(anim2);
} break;
case TOOL_PASTE_ANIM: {
- Ref<Animation> anim = EditorSettings::get_singleton()->get_resource_clipboard();
- if (!anim.is_valid()) {
+ Ref<Animation> anim2 = EditorSettings::get_singleton()->get_resource_clipboard();
+ if (!anim2.is_valid()) {
error_dialog->set_text(TTR("No animation resource on clipboard!"));
error_dialog->popup_centered_minsize();
return;
}
- String name = anim->get_name();
+ String name = anim2->get_name();
if (name == "") {
name = TTR("Pasted Animation");
}
@@ -1189,7 +1189,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
}
undo_redo->create_action(TTR("Paste Animation"));
- undo_redo->add_do_method(player, "add_animation", name, anim);
+ undo_redo->add_do_method(player, "add_animation", name, anim2);
undo_redo->add_undo_method(player, "remove_animation", name);
undo_redo->add_do_method(this, "_animation_player_changed", player);
undo_redo->add_undo_method(this, "_animation_player_changed", player);
@@ -1206,9 +1206,9 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
return;
}
- String current = animation->get_item_text(animation->get_selected());
- Ref<Animation> anim = player->get_animation(current);
- editor->edit_resource(anim);
+ String current2 = animation->get_item_text(animation->get_selected());
+ Ref<Animation> anim2 = player->get_animation(current2);
+ editor->edit_resource(anim2);
} break;
}
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 197ee77254..cb3e5a8129 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -226,7 +226,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
Ref<AnimationNode> an = state_machine->get_node(selected_node);
updating = true;
- undo_redo->create_action("Move Node");
+ undo_redo->create_action(TTR("Move Node"));
undo_redo->add_do_method(state_machine.ptr(), "set_node_position", selected_node, state_machine->get_node_position(selected_node) + drag_ofs / EDSCALE);
undo_redo->add_undo_method(state_machine.ptr(), "set_node_position", selected_node, state_machine->get_node_position(selected_node));
undo_redo->add_do_method(this, "_update_graph");
@@ -271,7 +271,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
tr->set_switch_mode(AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected()));
updating = true;
- undo_redo->create_action("Add Transition");
+ undo_redo->create_action(TTR("Add Transition"));
undo_redo->add_do_method(state_machine.ptr(), "add_transition", connecting_from, connecting_to_node, tr);
undo_redo->add_undo_method(state_machine.ptr(), "remove_transition", connecting_from, connecting_to_node);
undo_redo->add_do_method(this, "_update_graph");
@@ -463,7 +463,7 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) {
}
updating = true;
- undo_redo->create_action("Add Node");
+ undo_redo->create_action(TTR("Add Node"));
undo_redo->add_do_method(state_machine.ptr(), "add_node", name, node, add_node_pos);
undo_redo->add_undo_method(state_machine.ptr(), "remove_node", name);
undo_redo->add_do_method(this, "_update_graph");
@@ -490,7 +490,7 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) {
}
updating = true;
- undo_redo->create_action("Add Node");
+ undo_redo->create_action(TTR("Add Node"));
undo_redo->add_do_method(state_machine.ptr(), "add_node", name, anim, add_node_pos);
undo_redo->add_undo_method(state_machine.ptr(), "remove_node", name);
undo_redo->add_do_method(this, "_update_graph");
@@ -714,12 +714,12 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
tl.to += offset;
}
- for (int i = 0; i < node_rects.size(); i++) {
- if (node_rects[i].node_name == tl.from_node) {
- _clip_src_line_to_rect(tl.from, tl.to, node_rects[i].node);
+ for (int j = 0; j < node_rects.size(); j++) {
+ if (node_rects[j].node_name == tl.from_node) {
+ _clip_src_line_to_rect(tl.from, tl.to, node_rects[j].node);
}
- if (node_rects[i].node_name == tl.to_node) {
- _clip_dst_line_to_rect(tl.from, tl.to, node_rects[i].node);
+ if (node_rects[j].node_name == tl.to_node) {
+ _clip_dst_line_to_rect(tl.from, tl.to, node_rects[j].node);
}
}
@@ -1088,7 +1088,7 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
}
updating = true;
- undo_redo->create_action("Node Renamed");
+ undo_redo->create_action(TTR("Node Renamed"));
undo_redo->add_do_method(state_machine.ptr(), "rename_node", prev_name, name);
undo_redo->add_undo_method(state_machine.ptr(), "rename_node", name, prev_name);
undo_redo->add_do_method(this, "_update_graph");
@@ -1119,7 +1119,7 @@ void AnimationNodeStateMachineEditor::_erase_selected() {
if (selected_node != StringName() && state_machine->has_node(selected_node)) {
updating = true;
- undo_redo->create_action("Node Removed");
+ undo_redo->create_action(TTR("Node Removed"));
undo_redo->add_do_method(state_machine.ptr(), "remove_node", selected_node);
undo_redo->add_undo_method(state_machine.ptr(), "add_node", selected_node, state_machine->get_node(selected_node), state_machine->get_node_position(selected_node));
for (int i = 0; i < state_machine->get_transition_count(); i++) {
@@ -1143,7 +1143,7 @@ void AnimationNodeStateMachineEditor::_erase_selected() {
Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(state_machine->find_transition(selected_transition_from, selected_transition_to));
updating = true;
- undo_redo->create_action("Transition Removed");
+ undo_redo->create_action(TTR("Transition Removed"));
undo_redo->add_do_method(state_machine.ptr(), "remove_transition", selected_transition_from, selected_transition_to);
undo_redo->add_undo_method(state_machine.ptr(), "add_transition", selected_transition_from, selected_transition_to, tr);
undo_redo->add_do_method(this, "_update_graph");
@@ -1169,7 +1169,7 @@ void AnimationNodeStateMachineEditor::_autoplay_selected() {
}
updating = true;
- undo_redo->create_action("Set Start Node (Autoplay)");
+ undo_redo->create_action(TTR("Set Start Node (Autoplay)"));
undo_redo->add_do_method(state_machine.ptr(), "set_start_node", new_start_node);
undo_redo->add_undo_method(state_machine.ptr(), "set_start_node", state_machine->get_start_node());
undo_redo->add_do_method(this, "_update_graph");
@@ -1192,7 +1192,7 @@ void AnimationNodeStateMachineEditor::_end_selected() {
}
updating = true;
- undo_redo->create_action("Set Start Node (Autoplay)");
+ undo_redo->create_action(TTR("Set Start Node (Autoplay)"));
undo_redo->add_do_method(state_machine.ptr(), "set_end_node", new_end_node);
undo_redo->add_undo_method(state_machine.ptr(), "set_end_node", state_machine->get_end_node());
undo_redo->add_do_method(this, "_update_graph");
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index c68023ee9b..a9e9607bc5 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -177,6 +177,8 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
thumbnail = thumbnail->duplicate();
Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2);
+ // Overlay and thumbnail need the same format for `blend_rect` to work.
+ thumbnail->convert(Image::FORMAT_RGBA8);
thumbnail->lock();
thumbnail->blend_rect(overlay, overlay->get_used_rect(), overlay_pos);
thumbnail->unlock();
@@ -1338,6 +1340,7 @@ void EditorAssetLibrary::_bind_methods() {
EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
+ requesting = REQUESTING_NONE;
templates_only = p_templates_only;
VBoxContainer *library_main = memnew(VBoxContainer);
diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h
index e60bf6a38f..12e4faef94 100644
--- a/editor/plugins/audio_stream_editor_plugin.h
+++ b/editor/plugins/audio_stream_editor_plugin.h
@@ -33,7 +33,7 @@
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
-#include "scene/audio/audio_player.h"
+#include "scene/audio/audio_stream_player.h"
#include "scene/gui/color_rect.h"
#include "scene/resources/texture.h"
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index b2d2704f07..ac05b03ed2 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -42,9 +42,9 @@
#include "scene/2d/light_2d.h"
#include "scene/2d/particles_2d.h"
#include "scene/2d/polygon_2d.h"
-#include "scene/2d/screen_button.h"
#include "scene/2d/skeleton_2d.h"
#include "scene/2d/sprite.h"
+#include "scene/2d/touch_screen_button.h"
#include "scene/gui/grid_container.h"
#include "scene/gui/nine_patch_rect.h"
#include "scene/main/canvas_layer.h"
@@ -398,10 +398,10 @@ Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_li
// Expand with the other ones
for (List<CanvasItem *>::Element *E = p_list.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get();
- Transform2D xform = canvas_item->get_global_transform_with_canvas();
+ CanvasItem *canvas_item2 = E->get();
+ Transform2D xform = canvas_item2->get_global_transform_with_canvas();
- Rect2 current_rect = canvas_item->_edit_get_rect();
+ Rect2 current_rect = canvas_item2->_edit_get_rect();
rect.expand_to(xform.xform(current_rect.position));
rect.expand_to(xform.xform(current_rect.position + Vector2(current_rect.size.x, 0)));
rect.expand_to(xform.xform(current_rect.position + current_rect.size));
@@ -816,10 +816,10 @@ void CanvasItemEditor::_commit_canvas_item_state(List<CanvasItem *> p_canvas_ite
undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
undo_redo->add_undo_method(canvas_item, "_edit_set_state", se->undo_state);
if (commit_bones) {
- for (List<Dictionary>::Element *E = se->pre_drag_bones_undo_state.front(); E; E = E->next()) {
+ for (List<Dictionary>::Element *F = se->pre_drag_bones_undo_state.front(); F; F = F->next()) {
canvas_item = Object::cast_to<CanvasItem>(canvas_item->get_parent());
undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
- undo_redo->add_undo_method(canvas_item, "_edit_set_state", E->get());
+ undo_redo->add_undo_method(canvas_item, "_edit_set_state", F->get());
}
}
}
@@ -1921,9 +1921,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if (drag_selection.size() == 1) {
Node2D *node_2d = Object::cast_to<Node2D>(drag_selection[0]);
if (node_2d && move_local_base_rotated) {
- Transform2D m;
- m.rotate(node_2d->get_rotation());
- new_pos += m.xform(drag_to);
+ Transform2D m2;
+ m2.rotate(node_2d->get_rotation());
+ new_pos += m2.xform(drag_to);
} else if (move_local_base) {
new_pos += drag_to;
} else {
@@ -2065,18 +2065,18 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
// Start dragging
if (still_selected) {
// Drag the node(s) if requested
- List<CanvasItem *> selection = _get_edited_canvas_items();
+ List<CanvasItem *> selection2 = _get_edited_canvas_items();
// Remove not movable nodes
- for (int i = 0; i < selection.size(); i++) {
- if (!_is_node_movable(selection[i], true)) {
- selection.erase(selection[i]);
+ for (int i = 0; i < selection2.size(); i++) {
+ if (!_is_node_movable(selection2[i], true)) {
+ selection2.erase(selection2[i]);
}
}
- if (selection.size() > 0) {
+ if (selection2.size() > 0) {
drag_type = DRAG_MOVE;
- drag_selection = selection;
+ drag_selection = selection2;
drag_from = click;
_save_canvas_item_state(drag_selection);
}
@@ -3288,7 +3288,7 @@ void CanvasItemEditor::_notification(int p_what) {
Control *control = Object::cast_to<Control>(E->get());
if (!control || Object::cast_to<Container>(control->get_parent())) {
presets_menu->set_disabled(true);
- presets_menu->set_tooltip(TTR("A child of a container gets its anchors and margins values overriden by its parent."));
+ presets_menu->set_tooltip(TTR("Children of containers have their anchors and margins values overridden by their parent."));
break;
}
}
@@ -4559,6 +4559,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_grid = true;
snap_guides = true;
snap_rotation = false;
+ snap_relative = false;
snap_pixel = false;
skeleton_show_bones = true;
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index fc572f54e1..10023d88bf 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -35,9 +35,9 @@
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/line_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/shape_line_2d.h"
Variant CollisionShape2DEditor::get_handle_value(int idx) const {
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 0c0cc9d635..58d7968723 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -36,7 +36,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/dynamic_font.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
@@ -92,7 +92,12 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2
if (!tex.is_valid()) {
return Ref<Texture>();
}
+
Ref<Image> atlas = tex->get_data();
+ if (!atlas.is_valid()) {
+ return Ref<Texture>();
+ }
+
img = atlas->get_rect(atex->get_region());
} else if (ltex.is_valid()) {
img = ltex->to_image();
@@ -845,15 +850,16 @@ Ref<Texture> EditorFontPreviewPlugin::generate_from_path(const String &p_path, c
font->draw(canvas_item, pos, sampled_text);
- VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ONCE); //once used for capture
-
preview_done = false;
+ VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ONCE); //once used for capture
VS::get_singleton()->request_frame_drawn_callback(const_cast<EditorFontPreviewPlugin *>(this), "_preview_done", Variant());
while (!preview_done) {
OS::get_singleton()->delay_usec(10);
}
+ VS::get_singleton()->canvas_item_clear(canvas_item);
+
Ref<Image> img = VS::get_singleton()->texture_get_data(viewport_texture);
ERR_FAIL_COND_V(img.is_null(), Ref<ImageTexture>());
@@ -878,7 +884,11 @@ Ref<Texture> EditorFontPreviewPlugin::generate_from_path(const String &p_path, c
Ref<Texture> EditorFontPreviewPlugin::generate(const RES &p_from, const Size2 p_size) const {
- return generate_from_path(p_from->get_path(), p_size);
+ String path = p_from->get_path();
+ if (!FileAccess::exists(path)) {
+ return Ref<Texture>();
+ }
+ return generate_from_path(path, p_size);
}
EditorFontPreviewPlugin::EditorFontPreviewPlugin() {
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 62a9ce719b..e85c475ad7 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -51,7 +51,7 @@ void GradientEditor::_ramp_changed() {
editing = true;
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
- undo_redo->create_action("Gradient Edited");
+ undo_redo->create_action(TTR("Gradient Edited"));
undo_redo->add_do_method(gradient.ptr(), "set_offsets", get_offsets());
undo_redo->add_do_method(gradient.ptr(), "set_colors", get_colors());
undo_redo->add_undo_method(gradient.ptr(), "set_offsets", gradient->get_offsets());
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index db0816064c..b3f3ccf501 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -353,6 +353,7 @@ void ItemListEditor::_bind_methods() {
ItemListEditor::ItemListEditor() {
selected_idx = -1;
+ item_list = NULL;
toolbar_button = memnew(ToolButton);
toolbar_button->set_text(TTR("Items"));
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index ce8cc77802..ebacccb03c 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -32,6 +32,210 @@
#include "scene/resources/particles_material.h"
+void MaterialEditor::_notification(int p_what) {
+
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
+ }
+
+ if (p_what == NOTIFICATION_READY) {
+
+ //get_scene()->connect("node_removed",this,"_node_removed");
+
+ if (first_enter) {
+ //it's in propertyeditor so.. could be moved around
+
+ light_1_switch->set_normal_texture(get_icon("MaterialPreviewLight1", "EditorIcons"));
+ light_1_switch->set_pressed_texture(get_icon("MaterialPreviewLight1Off", "EditorIcons"));
+ light_2_switch->set_normal_texture(get_icon("MaterialPreviewLight2", "EditorIcons"));
+ light_2_switch->set_pressed_texture(get_icon("MaterialPreviewLight2Off", "EditorIcons"));
+
+ sphere_switch->set_normal_texture(get_icon("MaterialPreviewSphereOff", "EditorIcons"));
+ sphere_switch->set_pressed_texture(get_icon("MaterialPreviewSphere", "EditorIcons"));
+ box_switch->set_normal_texture(get_icon("MaterialPreviewCubeOff", "EditorIcons"));
+ box_switch->set_pressed_texture(get_icon("MaterialPreviewCube", "EditorIcons"));
+
+ first_enter = false;
+ }
+ }
+
+ if (p_what == NOTIFICATION_DRAW) {
+
+ Ref<Texture> checkerboard = get_icon("Checkerboard", "EditorIcons");
+ Size2 size = get_size();
+
+ draw_texture_rect(checkerboard, Rect2(Point2(), size), true);
+ }
+}
+
+void MaterialEditor::edit(Ref<Material> p_material, const Ref<Environment> &p_env) {
+
+ material = p_material;
+ camera->set_environment(p_env);
+ if (!material.is_null()) {
+ sphere_instance->set_material_override(material);
+ box_instance->set_material_override(material);
+ } else {
+
+ hide();
+ }
+}
+
+void MaterialEditor::_button_pressed(Node *p_button) {
+
+ if (p_button == light_1_switch) {
+ light1->set_visible(!light_1_switch->is_pressed());
+ }
+
+ if (p_button == light_2_switch) {
+ light2->set_visible(!light_2_switch->is_pressed());
+ }
+
+ if (p_button == box_switch) {
+ box_instance->show();
+ sphere_instance->hide();
+ box_switch->set_pressed(true);
+ sphere_switch->set_pressed(false);
+ }
+
+ if (p_button == sphere_switch) {
+ box_instance->hide();
+ sphere_instance->show();
+ box_switch->set_pressed(false);
+ sphere_switch->set_pressed(true);
+ }
+}
+
+void MaterialEditor::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("_button_pressed"), &MaterialEditor::_button_pressed);
+}
+
+MaterialEditor::MaterialEditor() {
+
+ vc = memnew(ViewportContainer);
+ vc->set_stretch(true);
+ add_child(vc);
+ vc->set_anchors_and_margins_preset(PRESET_WIDE);
+ viewport = memnew(Viewport);
+ Ref<World> world;
+ world.instance();
+ viewport->set_world(world); //use own world
+ vc->add_child(viewport);
+ viewport->set_disable_input(true);
+ viewport->set_transparent_background(true);
+ viewport->set_msaa(Viewport::MSAA_4X);
+
+ camera = memnew(Camera);
+ camera->set_transform(Transform(Basis(), Vector3(0, 0, 3)));
+ camera->set_perspective(45, 0.1, 10);
+ camera->make_current();
+ viewport->add_child(camera);
+
+ light1 = memnew(DirectionalLight);
+ light1->set_transform(Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0)));
+ viewport->add_child(light1);
+
+ light2 = memnew(DirectionalLight);
+ light2->set_transform(Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1)));
+ light2->set_color(Color(0.7, 0.7, 0.7));
+ viewport->add_child(light2);
+
+ sphere_instance = memnew(MeshInstance);
+ viewport->add_child(sphere_instance);
+
+ box_instance = memnew(MeshInstance);
+ viewport->add_child(box_instance);
+
+ Transform box_xform;
+ box_xform.basis.rotate(Vector3(1, 0, 0), Math::deg2rad(25.0));
+ box_xform.basis = box_xform.basis * Basis().rotated(Vector3(0, 1, 0), Math::deg2rad(-25.0));
+ box_xform.basis.scale(Vector3(0.8, 0.8, 0.8));
+ box_xform.origin.y = 0.2;
+ box_instance->set_transform(box_xform);
+
+ sphere_mesh.instance();
+ sphere_instance->set_mesh(sphere_mesh);
+ box_mesh.instance();
+ box_instance->set_mesh(box_mesh);
+ box_instance->hide();
+
+ set_custom_minimum_size(Size2(1, 150) * EDSCALE);
+
+ HBoxContainer *hb = memnew(HBoxContainer);
+ add_child(hb);
+ hb->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 2);
+
+ VBoxContainer *vb_shape = memnew(VBoxContainer);
+ hb->add_child(vb_shape);
+
+ sphere_switch = memnew(TextureButton);
+ sphere_switch->set_toggle_mode(true);
+ sphere_switch->set_pressed(true);
+ vb_shape->add_child(sphere_switch);
+ sphere_switch->connect("pressed", this, "_button_pressed", varray(sphere_switch));
+
+ box_switch = memnew(TextureButton);
+ box_switch->set_toggle_mode(true);
+ box_switch->set_pressed(false);
+ vb_shape->add_child(box_switch);
+ box_switch->connect("pressed", this, "_button_pressed", varray(box_switch));
+
+ hb->add_spacer();
+
+ VBoxContainer *vb_light = memnew(VBoxContainer);
+ hb->add_child(vb_light);
+
+ light_1_switch = memnew(TextureButton);
+ light_1_switch->set_toggle_mode(true);
+ vb_light->add_child(light_1_switch);
+ light_1_switch->connect("pressed", this, "_button_pressed", varray(light_1_switch));
+
+ light_2_switch = memnew(TextureButton);
+ light_2_switch->set_toggle_mode(true);
+ vb_light->add_child(light_2_switch);
+ light_2_switch->connect("pressed", this, "_button_pressed", varray(light_2_switch));
+
+ first_enter = true;
+}
+
+///////////////////////
+
+bool EditorInspectorPluginMaterial::can_handle(Object *p_object) {
+
+ Material *material = Object::cast_to<Material>(p_object);
+ if (!material)
+ return false;
+
+ return material->get_shader_mode() == Shader::MODE_SPATIAL;
+}
+
+void EditorInspectorPluginMaterial::parse_begin(Object *p_object) {
+
+ Material *material = Object::cast_to<Material>(p_object);
+ if (!material) {
+ return;
+ }
+ Ref<Material> m(material);
+
+ MaterialEditor *editor = memnew(MaterialEditor);
+ editor->edit(m, env);
+ add_custom_control(editor);
+}
+
+EditorInspectorPluginMaterial::EditorInspectorPluginMaterial() {
+ env.instance();
+ Ref<ProceduralSky> proc_sky = memnew(ProceduralSky(true));
+ env->set_sky(proc_sky);
+ env->set_background(Environment::BG_COLOR_SKY);
+}
+
+MaterialEditorPlugin::MaterialEditorPlugin(EditorNode *p_node) {
+
+ Ref<EditorInspectorPluginMaterial> plugin;
+ plugin.instance();
+ add_inspector_plugin(plugin);
+}
+
String SpatialMaterialConversionPlugin::converts_to() const {
return "ShaderMaterial";
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 39935d3e12..c3f14c27e5 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -32,6 +32,71 @@
#define MATERIAL_EDITOR_PLUGIN_H
#include "editor/property_editor.h"
+#include "scene/resources/primitive_meshes.h"
+
+#include "editor/editor_node.h"
+#include "editor/editor_plugin.h"
+#include "scene/3d/camera.h"
+#include "scene/3d/light.h"
+#include "scene/3d/mesh_instance.h"
+#include "scene/resources/material.h"
+
+class MaterialEditor : public Control {
+
+ GDCLASS(MaterialEditor, Control);
+
+ ViewportContainer *vc;
+ Viewport *viewport;
+ MeshInstance *sphere_instance;
+ MeshInstance *box_instance;
+ DirectionalLight *light1;
+ DirectionalLight *light2;
+ Camera *camera;
+
+ Ref<SphereMesh> sphere_mesh;
+ Ref<CubeMesh> box_mesh;
+
+ TextureButton *sphere_switch;
+ TextureButton *box_switch;
+
+ TextureButton *light_1_switch;
+ TextureButton *light_2_switch;
+
+ Ref<Material> material;
+
+ void _button_pressed(Node *p_button);
+ bool first_enter;
+
+protected:
+ void _notification(int p_what);
+
+ static void _bind_methods();
+
+public:
+ void edit(Ref<Material> p_material, const Ref<Environment> &p_env);
+ MaterialEditor();
+};
+
+class EditorInspectorPluginMaterial : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginMaterial, EditorInspectorPlugin)
+ Ref<Environment> env;
+
+public:
+ virtual bool can_handle(Object *p_object);
+ virtual void parse_begin(Object *p_object);
+
+ EditorInspectorPluginMaterial();
+};
+
+class MaterialEditorPlugin : public EditorPlugin {
+
+ GDCLASS(MaterialEditorPlugin, EditorPlugin);
+
+public:
+ virtual String get_name() const { return "Material"; }
+
+ MaterialEditorPlugin(EditorNode *p_node);
+};
class SpatialMaterialConversionPlugin : public EditorResourceConversionPlugin {
GDCLASS(SpatialMaterialConversionPlugin, EditorResourceConversionPlugin)
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index fcf515e3fc..6203035e25 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -80,26 +80,21 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) {
mesh = p_mesh;
mesh_instance->set_mesh(mesh);
- if (mesh.is_null()) {
-
- hide();
- } else {
- rot_x = 0;
- rot_y = 0;
- _update_rotation();
-
- AABB aabb = mesh->get_aabb();
- Vector3 ofs = aabb.position + aabb.size * 0.5;
- float m = aabb.get_longest_axis_size();
- if (m != 0) {
- m = 1.0 / m;
- m *= 0.5;
- Transform xform;
- xform.basis.scale(Vector3(m, m, m));
- xform.origin = -xform.basis.xform(ofs); //-ofs*m;
- //xform.origin.z -= aabb.get_longest_axis_size() * 2;
- mesh_instance->set_transform(xform);
- }
+ rot_x = Math::deg2rad(-15.0);
+ rot_y = Math::deg2rad(30.0);
+ _update_rotation();
+
+ AABB aabb = mesh->get_aabb();
+ Vector3 ofs = aabb.position + aabb.size * 0.5;
+ float m = aabb.get_longest_axis_size();
+ if (m != 0) {
+ m = 1.0 / m;
+ m *= 0.5;
+ Transform xform;
+ xform.basis.scale(Vector3(m, m, m));
+ xform.origin = -xform.basis.xform(ofs); //-ofs*m;
+ //xform.origin.z -= aabb.get_longest_axis_size() * 2;
+ mesh_instance->set_transform(xform);
}
}
@@ -128,8 +123,8 @@ MeshEditor::MeshEditor() {
viewport->set_world(world); //use own world
add_child(viewport);
viewport->set_disable_input(true);
+ viewport->set_msaa(Viewport::MSAA_2X);
set_stretch(true);
-
camera = memnew(Camera);
camera->set_transform(Transform(Basis(), Vector3(0, 0, 1.1)));
camera->set_perspective(45, 0.1, 10);
@@ -176,39 +171,29 @@ MeshEditor::MeshEditor() {
rot_y = 0;
}
-void MeshEditorPlugin::edit(Object *p_object) {
-
- Mesh *s = Object::cast_to<Mesh>(p_object);
- if (!s)
- return;
-
- mesh_editor->edit(Ref<Mesh>(s));
-}
+///////////////////////
-bool MeshEditorPlugin::handles(Object *p_object) const {
+bool EditorInspectorPluginMesh::can_handle(Object *p_object) {
- return p_object->is_class("Mesh");
+ return Object::cast_to<Mesh>(p_object) != NULL;
}
-void MeshEditorPlugin::make_visible(bool p_visible) {
+void EditorInspectorPluginMesh::parse_begin(Object *p_object) {
- if (p_visible) {
- mesh_editor->show();
- //mesh_editor->set_process(true);
- } else {
-
- mesh_editor->hide();
- //mesh_editor->set_process(false);
+ Mesh *mesh = Object::cast_to<Mesh>(p_object);
+ if (!mesh) {
+ return;
}
+ Ref<Mesh> m(mesh);
+
+ MeshEditor *editor = memnew(MeshEditor);
+ editor->edit(m);
+ add_custom_control(editor);
}
MeshEditorPlugin::MeshEditorPlugin(EditorNode *p_node) {
- editor = p_node;
- mesh_editor = memnew(MeshEditor);
- add_control_to_container(CONTAINER_PROPERTY_EDITOR_BOTTOM, mesh_editor);
- mesh_editor->hide();
-}
-
-MeshEditorPlugin::~MeshEditorPlugin() {
+ Ref<EditorInspectorPluginMesh> plugin;
+ plugin.instance();
+ add_inspector_plugin(plugin);
}
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 0275f45be9..8ada2dac90 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -72,22 +72,21 @@ public:
MeshEditor();
};
+class EditorInspectorPluginMesh : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginMesh, EditorInspectorPlugin)
+public:
+ virtual bool can_handle(Object *p_object);
+ virtual void parse_begin(Object *p_object);
+};
+
class MeshEditorPlugin : public EditorPlugin {
GDCLASS(MeshEditorPlugin, EditorPlugin);
- MeshEditor *mesh_editor;
- EditorNode *editor;
-
public:
virtual String get_name() const { return "Mesh"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_object);
- virtual bool handles(Object *p_object) const;
- virtual void make_visible(bool p_visible);
MeshEditorPlugin(EditorNode *p_node);
- ~MeshEditorPlugin();
};
#endif
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index 40ec03bc96..3e10cdbbfa 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -198,14 +198,14 @@ void MeshInstanceEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_CREATE_UV2: {
- Ref<ArrayMesh> mesh = node->get_mesh();
- if (!mesh.is_valid()) {
+ Ref<ArrayMesh> mesh2 = node->get_mesh();
+ if (!mesh2.is_valid()) {
err_dialog->set_text(TTR("Contained Mesh is not of type ArrayMesh."));
err_dialog->popup_centered_minsize();
return;
}
- Error err = mesh->lightmap_unwrap(node->get_global_transform());
+ Error err = mesh2->lightmap_unwrap(node->get_global_transform());
if (err != OK) {
err_dialog->set_text(TTR("UV Unwrap failed, mesh may not be manifold?"));
err_dialog->popup_centered_minsize();
@@ -214,8 +214,8 @@ void MeshInstanceEditor::_menu_option(int p_option) {
} break;
case MENU_OPTION_DEBUG_UV1: {
- Ref<Mesh> mesh = node->get_mesh();
- if (!mesh.is_valid()) {
+ Ref<Mesh> mesh2 = node->get_mesh();
+ if (!mesh2.is_valid()) {
err_dialog->set_text(TTR("No mesh to debug."));
err_dialog->popup_centered_minsize();
return;
@@ -223,8 +223,8 @@ void MeshInstanceEditor::_menu_option(int p_option) {
_create_uv_lines(0);
} break;
case MENU_OPTION_DEBUG_UV2: {
- Ref<Mesh> mesh = node->get_mesh();
- if (!mesh.is_valid()) {
+ Ref<Mesh> mesh2 = node->get_mesh();
+ if (!mesh2.is_valid()) {
err_dialog->set_text(TTR("No mesh to debug."));
err_dialog->popup_centered_minsize();
return;
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index aedac7b45d..89eb253afe 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -127,7 +127,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
continue;
MeshLibrary::ShapeData shape_data;
shape_data.shape = collision;
- shape_data.local_transform = sb->shape_owner_get_transform(E->get());
+ shape_data.local_transform = sb->get_transform() * sb->shape_owner_get_transform(E->get());
collisions.push_back(shape_data);
}
}
@@ -136,17 +136,20 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
p_library->set_item_shapes(id, collisions);
Ref<NavigationMesh> navmesh;
+ Transform navmesh_transform;
for (int j = 0; j < mi->get_child_count(); j++) {
Node *child2 = mi->get_child(j);
if (!Object::cast_to<NavigationMeshInstance>(child2))
continue;
NavigationMeshInstance *sb = Object::cast_to<NavigationMeshInstance>(child2);
navmesh = sb->get_navigation_mesh();
+ navmesh_transform = sb->get_transform();
if (!navmesh.is_null())
break;
}
if (!navmesh.is_null()) {
p_library->set_item_navmesh(id, navmesh);
+ p_library->set_item_navmesh_transform(id, navmesh_transform);
}
}
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index a944674cbd..d00687f7ea 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -91,6 +91,7 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) {
cpu_particles->set_transform(particles->get_transform());
cpu_particles->set_visible(particles->is_visible());
cpu_particles->set_pause_mode(particles->get_pause_mode());
+ cpu_particles->set_z_index(particles->get_z_index());
EditorNode::get_singleton()->get_scene_tree_dock()->replace_node(particles, cpu_particles, false);
@@ -132,7 +133,10 @@ void Particles2DEditorPlugin::_generate_visibility_rect() {
particles->set_emitting(false);
}
- particles->set_visibility_rect(rect);
+ undo_redo->create_action(TTR("Generate Visibility Rect"));
+ undo_redo->add_do_method(particles, "set_visibility_rect", rect);
+ undo_redo->add_undo_method(particles, "set_visibility_rect", particles->get_visibility_rect());
+ undo_redo->commit_action();
}
void Particles2DEditorPlugin::_generate_emission_mask() {
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index 95828064ac..0032850535 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -353,7 +353,11 @@ void ParticlesEditor::_generate_aabb() {
node->set_emitting(false);
}
- node->set_visibility_aabb(rect);
+ UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
+ ur->create_action(TTR("Generate Visibility AABB"));
+ ur->add_do_method(node, "set_visibility_aabb", rect);
+ ur->add_undo_method(node, "set_visibility_aabb", node->get_visibility_aabb());
+ ur->commit_action();
}
void ParticlesEditor::edit(Particles *p_particles) {
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 354475d268..a10eddb131 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -180,11 +180,11 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
// Check for segment split.
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && mode == MODE_EDIT && on_edge == true) {
- Vector2 gpoint = mb->get_position();
+ Vector2 gpoint2 = mb->get_position();
Ref<Curve2D> curve = node->get_curve();
int insertion_point = -1;
- float mbLength = curve->get_closest_offset(xform.affine_inverse().xform(gpoint));
+ float mbLength = curve->get_closest_offset(xform.affine_inverse().xform(gpoint2));
int len = curve->get_point_count();
for (int i = 0; i < len - 1; i++) {
float compareLength = curve->get_closest_offset(curve->get_point_position(i + 1));
@@ -195,7 +195,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
insertion_point = curve->get_point_count() - 2;
undo_redo->create_action(TTR("Split Curve"));
- undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
+ undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint2), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
undo_redo->add_undo_method(curve.ptr(), "remove_point", insertion_point + 1);
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
@@ -204,7 +204,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
action = ACTION_MOVING_POINT;
action_point = insertion_point + 1;
moving_from = curve->get_point_position(action_point);
- moving_screen_from = gpoint;
+ moving_screen_from = gpoint2;
canvas_item_editor->update_viewport();
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp
index 6efa76ef80..88dc258c5f 100644
--- a/editor/plugins/path_editor_plugin.cpp
+++ b/editor/plugins/path_editor_plugin.cpp
@@ -638,6 +638,10 @@ String PathSpatialGizmoPlugin::get_name() const {
return "Path";
}
+int PathSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
PathSpatialGizmoPlugin::PathSpatialGizmoPlugin() {
Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8));
diff --git a/editor/plugins/path_editor_plugin.h b/editor/plugins/path_editor_plugin.h
index ce3d3799d4..5482d09377 100644
--- a/editor/plugins/path_editor_plugin.h
+++ b/editor/plugins/path_editor_plugin.h
@@ -62,6 +62,7 @@ protected:
public:
String get_name() const;
+ int get_priority() const;
PathSpatialGizmoPlugin();
};
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 1d7b4ffa41..0dbbaf4177 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -45,6 +45,7 @@ Node2D *Polygon2DEditor::_get_node() const {
void Polygon2DEditor::_set_node(Node *p_polygon) {
node = Object::cast_to<Polygon2D>(p_polygon);
+ _update_polygon_editing_state();
}
Vector2 Polygon2DEditor::_get_offset(int p_idx) const {
@@ -53,6 +54,7 @@ Vector2 Polygon2DEditor::_get_offset(int p_idx) const {
}
int Polygon2DEditor::_get_polygon_count() const {
+
if (node->get_internal_vertex_count() > 0) {
return 0; //do not edit if internal vertices exist
} else {
@@ -365,6 +367,8 @@ void Polygon2DEditor::_cancel_editing() {
node->set_vertex_colors(uv_create_colors_prev);
node->call("_set_bones", uv_create_bones_prev);
node->set_polygons(polygons_prev);
+
+ _update_polygon_editing_state();
} else if (uv_drag) {
uv_drag = false;
if (uv_edit_mode[0]->is_pressed()) { // Edit UV.
@@ -377,9 +381,20 @@ void Polygon2DEditor::_cancel_editing() {
polygon_create.clear();
}
+void Polygon2DEditor::_update_polygon_editing_state() {
+
+ if (!_get_node())
+ return;
+
+ if (node->get_internal_vertex_count() > 0)
+ disable_polygon_editing(true, TTR("Polygon 2D has internal vertices, so it can no longer be edited in the viewport."));
+ else
+ disable_polygon_editing(false, String());
+}
+
void Polygon2DEditor::_commit_action() {
- // Makes that undo/redoing actions made outside of the UV editor still affects its polygon.
+ // Makes that undo/redoing actions made outside of the UV editor still affect its polygon.
undo_redo->add_do_method(uv_edit_draw, "update");
undo_redo->add_undo_method(uv_edit_draw, "update");
undo_redo->add_do_method(CanvasItemEditor::get_singleton(), "update_viewport");
@@ -480,6 +495,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
uv_create_colors_prev = node->get_vertex_colors();
uv_create_bones_prev = node->call("_get_bones");
polygons_prev = node->get_polygons();
+ disable_polygon_editing(false, String());
node->set_polygon(points_prev);
node->set_uv(points_prev);
node->set_internal_vertex_count(0);
@@ -501,6 +517,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
undo_redo->add_undo_method(node, "set_vertex_colors", uv_create_colors_prev);
undo_redo->add_do_method(node, "clear_bones");
undo_redo->add_undo_method(node, "_set_bones", uv_create_bones_prev);
+ undo_redo->add_do_method(this, "_update_polygon_editing_state");
+ undo_redo->add_undo_method(this, "_update_polygon_editing_state");
undo_redo->add_do_method(uv_edit_draw, "update");
undo_redo->add_undo_method(uv_edit_draw, "update");
undo_redo->commit_action();
@@ -552,7 +570,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
undo_redo->add_do_method(node, "set_internal_vertex_count", internal_vertices + 1);
undo_redo->add_undo_method(node, "set_internal_vertex_count", internal_vertices);
-
+ undo_redo->add_do_method(this, "_update_polygon_editing_state");
+ undo_redo->add_undo_method(this, "_update_polygon_editing_state");
undo_redo->add_do_method(uv_edit_draw, "update");
undo_redo->add_undo_method(uv_edit_draw, "update");
undo_redo->commit_action();
@@ -606,7 +625,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
undo_redo->add_do_method(node, "set_internal_vertex_count", internal_vertices - 1);
undo_redo->add_undo_method(node, "set_internal_vertex_count", internal_vertices);
-
+ undo_redo->add_do_method(this, "_update_polygon_editing_state");
+ undo_redo->add_undo_method(this, "_update_polygon_editing_state");
undo_redo->add_do_method(uv_edit_draw, "update");
undo_redo->add_undo_method(uv_edit_draw, "update");
undo_redo->commit_action();
@@ -1028,6 +1048,9 @@ void Polygon2DEditor::_uv_draw() {
Ref<Texture> internal_handle = get_icon("EditorInternalHandle", "EditorIcons");
Color poly_line_color = Color(0.9, 0.5, 0.5);
+ if (polygons.size() || polygon_create.size()) {
+ poly_line_color.a *= 0.25;
+ }
Color polygon_line_color = Color(0.5, 0.5, 0.9);
Vector<Color> polygon_fill_color;
{
@@ -1041,14 +1064,38 @@ void Polygon2DEditor::_uv_draw() {
int uv_draw_max = uvs.size();
+ uv_draw_max -= node->get_internal_vertex_count();
+ if (uv_draw_max < 0) {
+ uv_draw_max = 0;
+ }
+
+ for (int i = 0; i < uvs.size(); i++) {
+
+ int next = uv_draw_max > 0 ? (i + 1) % uv_draw_max : 0;
+
+ if (i < uv_draw_max && uv_drag && uv_move_current == UV_MODE_EDIT_POINT && EDITOR_DEF("editors/poly_editor/show_previous_outline", true)) {
+ uv_edit_draw->draw_line(mtx.xform(points_prev[i]), mtx.xform(points_prev[next]), prev_color, 2 * EDSCALE);
+ }
+
+ Vector2 next_point = uvs[next];
+ if (uv_create && i == uvs.size() - 1) {
+ next_point = uv_create_to;
+ }
+ if (i < uv_draw_max /*&& polygons.size() == 0 && polygon_create.size() == 0*/) { //if using or creating polygons, do not show outline (will show polygons instead)
+ uv_edit_draw->draw_line(mtx.xform(uvs[i]), mtx.xform(next_point), poly_line_color, 2 * EDSCALE);
+ }
+
+ rect.expand_to(mtx.basis_xform(uvs[i]));
+ }
+
for (int i = 0; i < polygons.size(); i++) {
PoolVector<int> points = polygons[i];
Vector<Vector2> polypoints;
- for (int i = 0; i < points.size(); i++) {
- int next = (i + 1) % points.size();
+ for (int j = 0; j < points.size(); j++) {
+ int next = (j + 1) % points.size();
- int idx = points[i];
+ int idx = points[j];
int idx_next = points[next];
if (idx < 0 || idx >= uvs.size())
continue;
@@ -1063,27 +1110,8 @@ void Polygon2DEditor::_uv_draw() {
}
}
- uv_draw_max -= node->get_internal_vertex_count();
- if (uv_draw_max < 0) {
- uv_draw_max = 0;
- }
-
for (int i = 0; i < uvs.size(); i++) {
- int next = uv_draw_max > 0 ? (i + 1) % uv_draw_max : 0;
-
- if (i < uv_draw_max && uv_drag && uv_move_current == UV_MODE_EDIT_POINT && EDITOR_DEF("editors/poly_editor/show_previous_outline", true)) {
- uv_edit_draw->draw_line(mtx.xform(points_prev[i]), mtx.xform(points_prev[next]), prev_color, 2 * EDSCALE);
- }
-
- Vector2 next_point = uvs[next];
- if (uv_create && i == uvs.size() - 1) {
- next_point = uv_create_to;
- }
- if (i < uv_draw_max && polygons.size() == 0 && polygon_create.size() == 0) { //if using or creating polygons, do not show outline (will show polygons instead)
- uv_edit_draw->draw_line(mtx.xform(uvs[i]), mtx.xform(next_point), poly_line_color, 2 * EDSCALE);
- }
-
if (weight_r.ptr()) {
Vector2 draw_pos = mtx.xform(uvs[i]);
float weight = weight_r[i];
@@ -1095,14 +1123,13 @@ void Polygon2DEditor::_uv_draw() {
uv_edit_draw->draw_texture(internal_handle, mtx.xform(uvs[i]) - internal_handle->get_size() * 0.5);
}
}
- rect.expand_to(mtx.basis_xform(uvs[i]));
}
if (polygon_create.size()) {
for (int i = 0; i < polygon_create.size(); i++) {
Vector2 from = uvs[polygon_create[i]];
Vector2 to = (i + 1) < polygon_create.size() ? uvs[polygon_create[i + 1]] : uv_create_to;
- uv_edit_draw->draw_line(mtx.xform(from), mtx.xform(to), poly_line_color, 2);
+ uv_edit_draw->draw_line(mtx.xform(from), mtx.xform(to), polygon_line_color, 2);
}
}
@@ -1216,6 +1243,7 @@ void Polygon2DEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_uv_edit_popup_hide"), &Polygon2DEditor::_uv_edit_popup_hide);
ClassDB::bind_method(D_METHOD("_sync_bones"), &Polygon2DEditor::_sync_bones);
ClassDB::bind_method(D_METHOD("_update_bone_list"), &Polygon2DEditor::_update_bone_list);
+ ClassDB::bind_method(D_METHOD("_update_polygon_editing_state"), &Polygon2DEditor::_update_polygon_editing_state);
ClassDB::bind_method(D_METHOD("_bone_paint_selected"), &Polygon2DEditor::_bone_paint_selected);
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index d1849dd09b..24ca2ea3f4 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -128,6 +128,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor {
virtual void _menu_option(int p_option);
void _cancel_editing();
+ void _update_polygon_editing_state();
void _uv_scroll_changed(float);
void _uv_input(const Ref<InputEvent> &p_input);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 9e65d9de10..e648fa0820 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2206,6 +2206,9 @@ void ScriptEditor::_script_split_dragged(float) {
Variant ScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
+ if (tab_container->get_child_count() == 0)
+ return Variant();
+
Node *cur_node = tab_container->get_child(tab_container->get_current_tab());
HBoxContainer *drag_preview = memnew(HBoxContainer);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 60dc156782..8c3f8fd3e8 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -273,18 +273,12 @@ void ScriptTextEditor::_set_theme_for_script() {
}
}
-void ScriptTextEditor::_toggle_warning_pannel(const Ref<InputEvent> &p_event) {
- Ref<InputEventMouseButton> mb = p_event;
- if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
- warnings_panel->set_visible(!warnings_panel->is_visible());
- }
+void ScriptTextEditor::_show_warnings_panel(bool p_show) {
+ warnings_panel->set_visible(p_show);
}
-void ScriptTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
- Ref<InputEventMouseButton> mb = p_event;
- if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
- code_editor->goto_error();
- }
+void ScriptTextEditor::_error_pressed() {
+ code_editor->goto_error();
}
void ScriptTextEditor::_warning_clicked(Variant p_line) {
@@ -468,7 +462,7 @@ void ScriptTextEditor::_validate_script() {
}
}
- code_editor->get_warning_count_label()->set_text(itos(warnings.size()));
+ code_editor->set_warning_nb(warnings.size());
warnings_panel->clear();
warnings_panel->push_table(3);
for (List<ScriptLanguage::Warning>::Element *E = warnings.front(); E; E = E->next()) {
@@ -626,7 +620,9 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
}
ScriptLanguage::LookupResult result;
- if (p_symbol.is_resource_file()) {
+ if (ScriptServer::is_global_class(p_symbol)) {
+ EditorNode::get_singleton()->load_resource(ScriptServer::get_global_class_path(p_symbol));
+ } else if (p_symbol.is_resource_file()) {
List<String> scene_extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);
@@ -800,92 +796,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
} break;
case EDIT_TOGGLE_COMMENT: {
- Ref<Script> scr = script;
- if (scr.is_null())
- return;
-
- String delimiter = "#";
- List<String> comment_delimiters;
- scr->get_language()->get_comment_delimiters(&comment_delimiters);
-
- for (List<String>::Element *E = comment_delimiters.front(); E; E = E->next()) {
- String script_delimiter = E->get();
- if (script_delimiter.find(" ") == -1) {
- delimiter = script_delimiter;
- break;
- }
- }
-
- tx->begin_complex_operation();
- if (tx->is_selection_active()) {
- int begin = tx->get_selection_from_line();
- int end = tx->get_selection_to_line();
-
- // End of selection ends on the first column of the last line, ignore it.
- if (tx->get_selection_to_column() == 0)
- end -= 1;
-
- int col_to = tx->get_selection_to_column();
- int cursor_pos = tx->cursor_get_column();
-
- // Check if all lines in the selected block are commented
- bool is_commented = true;
- for (int i = begin; i <= end; i++) {
- if (!tx->get_line(i).begins_with(delimiter)) {
- is_commented = false;
- break;
- }
- }
- for (int i = begin; i <= end; i++) {
- String line_text = tx->get_line(i);
-
- if (line_text.strip_edges().empty()) {
- line_text = delimiter;
- } else {
- if (is_commented) {
- line_text = line_text.substr(delimiter.length(), line_text.length());
- } else {
- line_text = delimiter + line_text;
- }
- }
- tx->set_line(i, line_text);
- }
-
- // Adjust selection & cursor position.
- int offset = is_commented ? -1 : 1;
- int col_from = tx->get_selection_from_column() > 0 ? tx->get_selection_from_column() + offset : 0;
-
- if (is_commented && tx->cursor_get_column() == tx->get_line(tx->cursor_get_line()).length() + 1)
- cursor_pos += 1;
-
- if (tx->get_selection_to_column() != 0 && col_to != tx->get_line(tx->get_selection_to_line()).length() + 1)
- col_to += offset;
-
- if (tx->cursor_get_column() != 0)
- cursor_pos += offset;
-
- tx->select(begin, col_from, tx->get_selection_to_line(), col_to);
- tx->cursor_set_column(cursor_pos);
-
- } else {
- int begin = tx->cursor_get_line();
- String line_text = tx->get_line(begin);
-
- int col = tx->cursor_get_column();
- if (line_text.begins_with(delimiter)) {
- line_text = line_text.substr(delimiter.length(), line_text.length());
- col -= 1;
- } else {
- line_text = delimiter + line_text;
- col += 1;
- }
-
- tx->set_line(begin, line_text);
- tx->cursor_set_column(col);
- }
- tx->end_complex_operation();
- tx->update();
-
+ _edit_option_toggle_inline_comment();
} break;
case EDIT_COMPLETE: {
@@ -1072,6 +983,25 @@ void ScriptTextEditor::_edit_option(int p_op) {
}
}
+void ScriptTextEditor::_edit_option_toggle_inline_comment() {
+ if (script.is_null())
+ return;
+
+ String delimiter = "#";
+ List<String> comment_delimiters;
+ script->get_language()->get_comment_delimiters(&comment_delimiters);
+
+ for (List<String>::Element *E = comment_delimiters.front(); E; E = E->next()) {
+ String script_delimiter = E->get();
+ if (script_delimiter.find(" ") == -1) {
+ delimiter = script_delimiter;
+ break;
+ }
+ }
+
+ code_editor->toggle_inline_comment(delimiter);
+}
+
void ScriptTextEditor::add_syntax_highlighter(SyntaxHighlighter *p_highlighter) {
highlighters[p_highlighter->get_name()] = p_highlighter;
highlighter_menu->add_radio_check_item(p_highlighter->get_name());
@@ -1107,7 +1037,7 @@ void ScriptTextEditor::_bind_methods() {
ClassDB::bind_method("_goto_line", &ScriptTextEditor::_goto_line);
ClassDB::bind_method("_lookup_symbol", &ScriptTextEditor::_lookup_symbol);
ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input);
- ClassDB::bind_method("_toggle_warning_pannel", &ScriptTextEditor::_toggle_warning_pannel);
+ ClassDB::bind_method("_show_warnings_panel", &ScriptTextEditor::_show_warnings_panel);
ClassDB::bind_method("_error_pressed", &ScriptTextEditor::_error_pressed);
ClassDB::bind_method("_warning_clicked", &ScriptTextEditor::_warning_clicked);
ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
@@ -1427,7 +1357,7 @@ ScriptTextEditor::ScriptTextEditor() {
code_editor = memnew(CodeTextEditor);
editor_box->add_child(code_editor);
- code_editor->add_constant_override("separation", 0);
+ code_editor->add_constant_override("separation", 2);
code_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE);
code_editor->connect("validate_script", this, "_validate_script");
code_editor->connect("load_theme_settings", this, "_load_theme_settings");
@@ -1445,9 +1375,8 @@ ScriptTextEditor::ScriptTextEditor() {
warnings_panel->set_focus_mode(FOCUS_CLICK);
warnings_panel->hide();
- code_editor->get_error_label()->connect("gui_input", this, "_error_pressed");
- code_editor->get_warning_label()->connect("gui_input", this, "_toggle_warning_pannel");
- code_editor->get_warning_count_label()->connect("gui_input", this, "_toggle_warning_pannel");
+ code_editor->connect("error_pressed", this, "_error_pressed");
+ code_editor->connect("show_warnings_panel", this, "_show_warnings_panel");
warnings_panel->connect("meta_clicked", this, "_warning_clicked");
update_settings();
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 856e442d82..b081a31c18 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -125,8 +125,8 @@ protected:
void _code_complete_script(const String &p_code, List<String> *r_options, bool &r_force);
void _load_theme_settings();
void _set_theme_for_script();
- void _toggle_warning_pannel(const Ref<InputEvent> &p_event);
- void _error_pressed(const Ref<InputEvent> &p_event);
+ void _show_warnings_panel(bool p_show);
+ void _error_pressed();
void _warning_clicked(Variant p_line);
void _notification(int p_what);
@@ -136,6 +136,7 @@ protected:
void _change_syntax_highlighter(int p_idx);
void _edit_option(int p_op);
+ void _edit_option_toggle_inline_comment();
void _make_context_menu(bool p_selection, bool p_color, bool p_foldable, bool p_open_docs, bool p_goto_definition);
void _text_edit_gui_input(const Ref<InputEvent> &ev);
void _color_changed(const Color &p_color);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index cc2e65cf6d..d39e521113 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -47,12 +47,16 @@ Ref<Shader> ShaderTextEditor::get_edited_shader() const {
}
void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
+ if (shader == p_shader) {
+ return;
+ }
shader = p_shader;
_load_theme_settings();
get_text_edit()->set_text(p_shader->get_code());
+ _validate_script();
_line_col_changed();
}
@@ -244,19 +248,19 @@ void ShaderEditor::_menu_option(int p_option) {
} break;
case EDIT_INDENT_LEFT: {
- TextEdit *tx = shader_editor->get_text_edit();
if (shader.is_null())
return;
+ TextEdit *tx = shader_editor->get_text_edit();
tx->indent_left();
} break;
case EDIT_INDENT_RIGHT: {
- TextEdit *tx = shader_editor->get_text_edit();
if (shader.is_null())
return;
+ TextEdit *tx = shader_editor->get_text_edit();
tx->indent_right();
} break;
@@ -268,54 +272,10 @@ void ShaderEditor::_menu_option(int p_option) {
} break;
case EDIT_TOGGLE_COMMENT: {
- TextEdit *tx = shader_editor->get_text_edit();
if (shader.is_null())
return;
- tx->begin_complex_operation();
- if (tx->is_selection_active()) {
- int begin = tx->get_selection_from_line();
- int end = tx->get_selection_to_line();
-
- // End of selection ends on the first column of the last line, ignore it.
- if (tx->get_selection_to_column() == 0)
- end -= 1;
-
- // Check if all lines in the selected block are commented
- bool is_commented = true;
- for (int i = begin; i <= end; i++) {
- if (!tx->get_line(i).begins_with("//")) {
- is_commented = false;
- break;
- }
- }
- for (int i = begin; i <= end; i++) {
- String line_text = tx->get_line(i);
-
- if (line_text.strip_edges().empty()) {
- line_text = "//";
- } else {
- if (is_commented) {
- line_text = line_text.substr(2, line_text.length());
- } else {
- line_text = "//" + line_text;
- }
- }
- tx->set_line(i, line_text);
- }
- } else {
- int begin = tx->cursor_get_line();
- String line_text = tx->get_line(begin);
-
- if (line_text.begins_with("//"))
- line_text = line_text.substr(2, line_text.length());
- else
- line_text = "//" + line_text;
- tx->set_line(begin, line_text);
- }
- tx->end_complex_operation();
- tx->update();
- //tx->deselect();
+ shader_editor->toggle_inline_comment("//");
} break;
case EDIT_COMPLETE: {
@@ -351,8 +311,8 @@ void ShaderEditor::_menu_option(int p_option) {
void ShaderEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
- if (is_visible_in_tree())
- shader_editor->get_text_edit()->grab_focus();
+ //if (is_visible_in_tree())
+ // shader_editor->get_text_edit()->grab_focus();
}
}
@@ -414,6 +374,9 @@ void ShaderEditor::edit(const Ref<Shader> &p_shader) {
if (p_shader.is_null() || !p_shader->is_text_shader())
return;
+ if (shader == p_shader)
+ return;
+
shader = p_shader;
shader_editor->set_edited_shader(p_shader);
@@ -437,8 +400,12 @@ void ShaderEditor::save_external_data() {
void ShaderEditor::apply_shaders() {
if (shader.is_valid()) {
- shader->set_code(shader_editor->get_text_edit()->get_text());
- shader->set_edited(true);
+ String shader_code = shader->get_code();
+ String editor_code = shader_editor->get_text_edit()->get_text();
+ if (shader_code != editor_code) {
+ shader->set_code(editor_code);
+ shader->set_edited(true);
+ }
}
}
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index 619d54b202..ef3e17279c 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -63,7 +63,7 @@ void Skeleton2DEditor::_menu_option(int p_option) {
return;
}
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Create Rest Pose from Bones");
+ ur->create_action(TTR("Create Rest Pose from Bones"));
for (int i = 0; i < node->get_bone_count(); i++) {
Bone2D *bone = node->get_bone(i);
ur->add_do_method(bone, "set_rest", bone->get_transform());
@@ -79,7 +79,7 @@ void Skeleton2DEditor::_menu_option(int p_option) {
return;
}
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Set Rest Pose to Bones");
+ ur->create_action(TTR("Set Rest Pose to Bones"));
for (int i = 0; i < node->get_bone_count(); i++) {
Bone2D *bone = node->get_bone(i);
ur->add_do_method(bone, "set_transform", bone->get_rest());
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 78bc989c5f..765d198f79 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -35,7 +35,7 @@
#include "core/os/keyboard.h"
#include "core/print_string.h"
#include "core/project_settings.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/plugins/animation_player_editor_plugin.h"
@@ -1021,7 +1021,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
_edit.mouse_pos = b->get_position();
- _edit.snap = false;
+ _edit.snap = spatial_editor->is_snap_enabled();
_edit.mode = TRANSFORM_NONE;
//gizmo has priority over everything
@@ -1772,7 +1772,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (ED_IS_SHORTCUT("spatial_editor/snap", p_event)) {
if (_edit.mode != TRANSFORM_NONE) {
- _edit.snap = true;
+ _edit.snap = !_edit.snap;
}
}
if (ED_IS_SHORTCUT("spatial_editor/bottom_view", p_event)) {
@@ -2108,9 +2108,11 @@ void SpatialEditorViewport::_notification(int p_what) {
set_process(visible);
- if (visible)
+ if (visible) {
_update_camera(0);
-
+ } else {
+ set_freelook_active(false);
+ }
call_deferred("update_transform_gizmo_view");
}
@@ -2262,7 +2264,7 @@ void SpatialEditorViewport::_notification(int p_what) {
if (show_fps) {
String text;
const float temp_fps = Engine::get_singleton()->get_frames_per_second();
- text += TTR("FPS") + ": " + itos(temp_fps) + " (" + String::num(1000.0f / temp_fps, 2) + " ms)";
+ text += TTR(vformat("FPS: %d (%s ms)", temp_fps, String::num(1000.0f / temp_fps, 2)));
fps_label->set_text(text);
}
@@ -2546,7 +2548,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
List<Node *> &selection = editor_selection->get_selected_node_list();
- undo_redo->create_action(TTR("Align with view"));
+ undo_redo->create_action(TTR("Align with View"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
Spatial *sp = Object::cast_to<Spatial>(E->get());
@@ -2865,6 +2867,18 @@ void SpatialEditorViewport::update_transform_gizmo_view() {
Transform xform = spatial_editor->get_gizmo_transform();
Transform camera_xform = camera->get_transform();
+
+ if (xform.origin.distance_squared_to(camera_xform.origin) < 0.01) {
+ for (int i = 0; i < 3; i++) {
+ VisualServer::get_singleton()->instance_set_visible(move_gizmo_instance[i], false);
+ VisualServer::get_singleton()->instance_set_visible(move_plane_gizmo_instance[i], false);
+ VisualServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[i], false);
+ VisualServer::get_singleton()->instance_set_visible(scale_gizmo_instance[i], false);
+ VisualServer::get_singleton()->instance_set_visible(scale_plane_gizmo_instance[i], false);
+ }
+ return;
+ }
+
Vector3 camz = -camera_xform.get_basis().get_axis(2).normalized();
Vector3 camy = -camera_xform.get_basis().get_axis(1).normalized();
Plane p(camera_xform.origin, camz);
@@ -3542,6 +3556,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
fps_label->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE);
fps_label->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -10 * EDSCALE);
fps_label->set_h_grow_direction(GROW_DIRECTION_BEGIN);
+ fps_label->set_tooltip(TTR("Note: The FPS value displayed is the editor's framerate.\nIt cannot be used as a reliable indication of in-game performance."));
+ fps_label->set_mouse_filter(MOUSE_FILTER_PASS); // Otherwise tooltip doesn't show.
surface->add_child(fps_label);
fps_label->hide();
@@ -4101,10 +4117,10 @@ Dictionary SpatialEditor::get_state() const {
d["zfar"] = get_zfar();
Dictionary gizmos_status;
- for (int i = 0; i < gizmo_plugins.size(); i++) {
- if (!gizmo_plugins[i]->can_be_hidden()) continue;
+ for (int i = 0; i < gizmo_plugins_by_name.size(); i++) {
+ if (!gizmo_plugins_by_name[i]->can_be_hidden()) continue;
int state = gizmos_menu->get_item_state(gizmos_menu->get_item_index(i));
- String name = gizmo_plugins[i]->get_name();
+ String name = gizmo_plugins_by_name[i]->get_name();
gizmos_status[name] = state;
}
@@ -4154,9 +4170,13 @@ void SpatialEditor::set_state(const Dictionary &p_state) {
if (d.has("viewports")) {
Array vp = d["viewports"];
- ERR_FAIL_COND(vp.size() > 4);
+ uint32_t vp_size = static_cast<uint32_t>(vp.size());
+ if (vp_size > VIEWPORTS_COUNT) {
+ WARN_PRINT("Ignoring superfluous viewport settings from spatial editor state.")
+ vp_size = VIEWPORTS_COUNT;
+ }
- for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
+ for (uint32_t i = 0; i < vp_size; i++) {
viewports[i]->set_state(vp[i]);
}
}
@@ -4189,32 +4209,19 @@ void SpatialEditor::set_state(const Dictionary &p_state) {
List<Variant> keys;
gizmos_status.get_key_list(&keys);
- for (int j = 0; j < gizmo_plugins.size(); ++j) {
- if (!gizmo_plugins[j]->can_be_hidden()) continue;
- int state = EditorSpatialGizmoPlugin::ON_TOP;
+ for (int j = 0; j < gizmo_plugins_by_name.size(); ++j) {
+ if (!gizmo_plugins_by_name[j]->can_be_hidden()) continue;
+ int state = EditorSpatialGizmoPlugin::VISIBLE;
for (int i = 0; i < keys.size(); i++) {
- if (gizmo_plugins.write[j]->get_name() == keys[i]) {
+ if (gizmo_plugins_by_name.write[j]->get_name() == keys[i]) {
state = gizmos_status[keys[i]];
+ break;
}
}
- const int idx = gizmos_menu->get_item_index(j);
-
- gizmos_menu->set_item_multistate(idx, state);
- gizmo_plugins.write[j]->set_state(state);
-
- switch (state) {
- case EditorSpatialGizmoPlugin::VISIBLE:
- gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_visible"));
- break;
- case EditorSpatialGizmoPlugin::ON_TOP:
- gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_xray"));
- break;
- case EditorSpatialGizmoPlugin::HIDDEN:
- gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_hidden"));
- break;
- }
+ gizmo_plugins_by_name.write[j]->set_state(state);
}
+ _update_gizmos_menu();
}
}
@@ -4328,7 +4335,7 @@ void SpatialEditor::_menu_gizmo_toggled(int p_option) {
break;
}
- gizmo_plugins.write[p_option]->set_state(state);
+ gizmo_plugins_by_name.write[p_option]->set_state(state);
update_all_gizmos();
}
@@ -4681,10 +4688,10 @@ void SpatialEditor::_init_indicators() {
plane_mat->set_on_top_of_alpha();
plane_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
plane_mat->set_cull_mode(SpatialMaterial::CULL_DISABLED);
- Color col;
- col[i] = 1.0;
- col.a = gizmo_alph;
- plane_mat->set_albedo(col);
+ Color col2;
+ col2[i] = 1.0;
+ col2.a = gizmo_alph;
+ plane_mat->set_albedo(col2);
plane_gizmo_color[i] = plane_mat; // needed, so we can draw planes from both sides
surftool->set_material(plane_mat);
surftool->commit(move_plane_gizmo[i]);
@@ -4810,10 +4817,10 @@ void SpatialEditor::_init_indicators() {
plane_mat->set_on_top_of_alpha();
plane_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
plane_mat->set_cull_mode(SpatialMaterial::CULL_DISABLED);
- Color col;
- col[i] = 1.0;
- col.a = gizmo_alph;
- plane_mat->set_albedo(col);
+ Color col2;
+ col2[i] = 1.0;
+ col2.a = gizmo_alph;
+ plane_mat->set_albedo(col2);
plane_gizmo_color[i] = plane_mat; // needed, so we can draw planes from both sides
surftool->set_material(plane_mat);
surftool->commit(scale_plane_gizmo[i]);
@@ -4824,23 +4831,46 @@ void SpatialEditor::_init_indicators() {
_generate_selection_box();
}
-struct _GizmoPluginComparator {
-
- bool operator()(const Ref<EditorSpatialGizmoPlugin> &p_a, const Ref<EditorSpatialGizmoPlugin> &p_b) const {
- return p_a->get_name() < p_b->get_name();
- }
-};
-
void SpatialEditor::_update_gizmos_menu() {
gizmos_menu->clear();
- gizmo_plugins.sort_custom<_GizmoPluginComparator>();
- for (int i = 0; i < gizmo_plugins.size(); ++i) {
- if (!gizmo_plugins[i]->can_be_hidden()) continue;
- String plugin_name = gizmo_plugins[i]->get_name();
- gizmos_menu->add_multistate_item(TTR(plugin_name), 3, EditorSpatialGizmoPlugin::VISIBLE, i);
- gizmos_menu->set_item_icon(gizmos_menu->get_item_index(i), gizmos_menu->get_icon("visibility_visible"));
+ for (int i = 0; i < gizmo_plugins_by_name.size(); ++i) {
+ if (!gizmo_plugins_by_name[i]->can_be_hidden()) continue;
+ String plugin_name = gizmo_plugins_by_name[i]->get_name();
+ const int plugin_state = gizmo_plugins_by_name[i]->get_state();
+ gizmos_menu->add_multistate_item(TTR(plugin_name), 3, plugin_state, i);
+ const int idx = gizmos_menu->get_item_index(i);
+ switch (plugin_state) {
+ case EditorSpatialGizmoPlugin::VISIBLE:
+ gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_visible"));
+ break;
+ case EditorSpatialGizmoPlugin::ON_TOP:
+ gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_xray"));
+ break;
+ case EditorSpatialGizmoPlugin::HIDDEN:
+ gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_hidden"));
+ break;
+ }
+ }
+}
+
+void SpatialEditor::_update_gizmos_menu_theme() {
+ for (int i = 0; i < gizmo_plugins_by_name.size(); ++i) {
+ if (!gizmo_plugins_by_name[i]->can_be_hidden()) continue;
+ const int plugin_state = gizmo_plugins_by_name[i]->get_state();
+ const int idx = gizmos_menu->get_item_index(i);
+ switch (plugin_state) {
+ case EditorSpatialGizmoPlugin::VISIBLE:
+ gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_visible"));
+ break;
+ case EditorSpatialGizmoPlugin::ON_TOP:
+ gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_xray"));
+ break;
+ case EditorSpatialGizmoPlugin::HIDDEN:
+ gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_hidden"));
+ break;
+ }
}
}
@@ -5034,7 +5064,7 @@ void SpatialEditor::snap_selected_nodes_to_floor() {
Array keys = snap_data.keys();
if (keys.size()) {
- undo_redo->create_action("Snap Nodes To Floor");
+ undo_redo->create_action(TTR("Snap Nodes To Floor"));
for (int i = 0; i < keys.size(); i++) {
Node *node = keys[i];
@@ -5133,20 +5163,17 @@ void SpatialEditor::_notification(int p_what) {
get_tree()->connect("node_removed", this, "_node_removed");
EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->connect("node_changed", this, "_refresh_menu_icons");
editor_selection->connect("selection_changed", this, "_refresh_menu_icons");
- }
-
- if (p_what == NOTIFICATION_ENTER_TREE) {
+ } else if (p_what == NOTIFICATION_ENTER_TREE) {
_register_all_gizmos();
_update_gizmos_menu();
_init_indicators();
- }
-
- if (p_what == NOTIFICATION_EXIT_TREE) {
+ } else if (p_what == NOTIFICATION_THEME_CHANGED) {
+ _update_gizmos_menu_theme();
+ } else if (p_what == NOTIFICATION_EXIT_TREE) {
_finish_indicators();
- }
- if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+ } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
tool_button[SpatialEditor::TOOL_MODE_SELECT]->set_icon(get_icon("ToolSelect", "EditorIcons"));
tool_button[SpatialEditor::TOOL_MODE_MOVE]->set_icon(get_icon("ToolMove", "EditorIcons"));
tool_button[SpatialEditor::TOOL_MODE_ROTATE]->set_icon(get_icon("ToolRotate", "EditorIcons"));
@@ -5205,8 +5232,8 @@ void SpatialEditor::_request_gizmo(Object *p_obj) {
Ref<EditorSpatialGizmo> seg;
- for (int i = 0; i < gizmo_plugins.size(); ++i) {
- seg = gizmo_plugins.write[i]->get_gizmo(sp);
+ for (int i = 0; i < gizmo_plugins_by_priority.size(); ++i) {
+ seg = gizmo_plugins_by_priority.write[i]->get_gizmo(sp);
if (seg.is_valid()) {
sp->set_gizmo(seg);
@@ -5731,15 +5758,39 @@ void SpatialEditorPlugin::snap_cursor_to_plane(const Plane &p_plane) {
spatial_editor->snap_cursor_to_plane(p_plane);
}
+struct _GizmoPluginPriorityComparator {
+
+ bool operator()(const Ref<EditorSpatialGizmoPlugin> &p_a, const Ref<EditorSpatialGizmoPlugin> &p_b) const {
+ if (p_a->get_priority() == p_b->get_priority()) {
+ return p_a->get_name() < p_b->get_name();
+ }
+ return p_a->get_priority() > p_b->get_priority();
+ }
+};
+
+struct _GizmoPluginNameComparator {
+
+ bool operator()(const Ref<EditorSpatialGizmoPlugin> &p_a, const Ref<EditorSpatialGizmoPlugin> &p_b) const {
+ return p_a->get_name() < p_b->get_name();
+ }
+};
+
void SpatialEditor::add_gizmo_plugin(Ref<EditorSpatialGizmoPlugin> p_plugin) {
ERR_FAIL_NULL(p_plugin.ptr());
- gizmo_plugins.push_back(p_plugin);
+
+ gizmo_plugins_by_priority.push_back(p_plugin);
+ gizmo_plugins_by_priority.sort_custom<_GizmoPluginPriorityComparator>();
+
+ gizmo_plugins_by_name.push_back(p_plugin);
+ gizmo_plugins_by_name.sort_custom<_GizmoPluginNameComparator>();
+
_update_gizmos_menu();
SpatialEditor::get_singleton()->update_all_gizmos();
}
void SpatialEditor::remove_gizmo_plugin(Ref<EditorSpatialGizmoPlugin> p_plugin) {
- gizmo_plugins.erase(p_plugin);
+ gizmo_plugins_by_priority.erase(p_plugin);
+ gizmo_plugins_by_name.erase(p_plugin);
_update_gizmos_menu();
}
@@ -5892,6 +5943,13 @@ String EditorSpatialGizmoPlugin::get_name() const {
return TTR("Nameless gizmo");
}
+int EditorSpatialGizmoPlugin::get_priority() const {
+ if (get_script_instance() && get_script_instance()->has_method("get_priority")) {
+ return get_script_instance()->call("get_priority");
+ }
+ return 0;
+}
+
Ref<EditorSpatialGizmo> EditorSpatialGizmoPlugin::get_gizmo(Spatial *p_spatial) {
if (get_script_instance() && get_script_instance()->has_method("get_gizmo")) {
@@ -5924,6 +5982,7 @@ void EditorSpatialGizmoPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_material", "name", "gizmo"), &EditorSpatialGizmoPlugin::get_material); //, DEFVAL(Ref<EditorSpatialGizmo>()));
BIND_VMETHOD(MethodInfo(Variant::STRING, "get_name"));
+ BIND_VMETHOD(MethodInfo(Variant::STRING, "get_priority"));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_be_hidden"));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "is_selectable_when_hidden"));
@@ -6023,6 +6082,10 @@ void EditorSpatialGizmoPlugin::set_state(int p_state) {
}
}
+int EditorSpatialGizmoPlugin::get_state() const {
+ return current_state;
+}
+
void EditorSpatialGizmoPlugin::unregister_gizmo(EditorSpatialGizmo *p_gizmo) {
current_gizmos.erase(p_gizmo);
}
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index 2dc627cb27..4a9d34a7f7 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -60,6 +60,7 @@ public:
RID instance;
Ref<ArrayMesh> mesh;
+ Ref<Material> material;
RID skeleton;
bool billboard;
bool unscaled;
@@ -103,7 +104,7 @@ protected:
public:
void add_lines(const Vector<Vector3> &p_lines, const Ref<Material> &p_material, bool p_billboard = false);
- void add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard = false, const RID &p_skeleton = RID());
+ void add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard = false, const RID &p_skeleton = RID(), const Ref<Material> &p_material = Ref<Material>());
void add_collision_segments(const Vector<Vector3> &p_lines);
void add_collision_triangles(const Ref<TriangleMesh> &p_tmesh);
void add_unscaled_billboard(const Ref<Material> &p_material, float p_scale = 1);
@@ -618,6 +619,7 @@ private:
void _instance_scene();
void _init_indicators();
void _update_gizmos_menu();
+ void _update_gizmos_menu_theme();
void _init_grid();
void _finish_indicators();
void _finish_grid();
@@ -637,7 +639,8 @@ private:
static SpatialEditor *singleton;
void _node_removed(Node *p_node);
- Vector<Ref<EditorSpatialGizmoPlugin> > gizmo_plugins;
+ Vector<Ref<EditorSpatialGizmoPlugin> > gizmo_plugins_by_priority;
+ Vector<Ref<EditorSpatialGizmoPlugin> > gizmo_plugins_by_name;
void _register_all_gizmos();
@@ -780,6 +783,7 @@ public:
Ref<SpatialMaterial> get_material(const String &p_name, const Ref<EditorSpatialGizmo> &p_gizmo = Ref<EditorSpatialGizmo>());
virtual String get_name() const;
+ virtual int get_priority() const;
virtual bool can_be_hidden() const;
virtual bool is_selectable_when_hidden() const;
@@ -792,6 +796,7 @@ public:
Ref<EditorSpatialGizmo> get_gizmo(Spatial *p_spatial);
void set_state(int p_state);
+ int get_state() const;
void unregister_gizmo(EditorSpatialGizmo *p_gizmo);
EditorSpatialGizmoPlugin();
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index c1718dd8bf..3854d27567 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -91,6 +91,8 @@ Vector<Vector2> expand(const Vector<Vector2> &points, const Rect2i &rect, float
Vector<Vector2> outPoints;
ClipperLib::PolyNode *p2 = out.GetFirst();
+ ERR_FAIL_COND_V(!p2, points);
+
while (p2->IsHole()) {
p2 = p2->GetNext();
}
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index b712cfc9d3..89bb7440fe 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -40,10 +40,8 @@ void SpriteFramesEditor::_gui_input(Ref<InputEvent> p_event) {
void SpriteFramesEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
- }
-
if (p_what == NOTIFICATION_ENTER_TREE) {
+
load->set_icon(get_icon("Load", "EditorIcons"));
copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
paste->set_icon(get_icon("ActionPaste", "EditorIcons"));
@@ -54,14 +52,9 @@ void SpriteFramesEditor::_notification(int p_what) {
_delete->set_icon(get_icon("Remove", "EditorIcons"));
new_anim->set_icon(get_icon("New", "EditorIcons"));
remove_anim->set_icon(get_icon("Remove", "EditorIcons"));
- }
-
- if (p_what == NOTIFICATION_READY) {
+ } else if (p_what == NOTIFICATION_READY) {
- //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true);
- }
-
- if (p_what == NOTIFICATION_DRAW) {
+ add_constant_override("autohide", 1); // Fixes the dragger always showing up.
}
}
@@ -649,7 +642,6 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
void SpriteFramesEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &SpriteFramesEditor::_gui_input);
ClassDB::bind_method(D_METHOD("_load_pressed"), &SpriteFramesEditor::_load_pressed);
ClassDB::bind_method(D_METHOD("_empty_pressed"), &SpriteFramesEditor::_empty_pressed);
ClassDB::bind_method(D_METHOD("_empty2_pressed"), &SpriteFramesEditor::_empty2_pressed);
@@ -673,31 +665,25 @@ void SpriteFramesEditor::_bind_methods() {
SpriteFramesEditor::SpriteFramesEditor() {
- //add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("panel","Panel"));
-
- split = memnew(HSplitContainer);
- add_child(split);
-
VBoxContainer *vbc_animlist = memnew(VBoxContainer);
- split->add_child(vbc_animlist);
+ add_child(vbc_animlist);
vbc_animlist->set_custom_minimum_size(Size2(150, 0) * EDSCALE);
- //vbc_animlist->set_v_size_flags(SIZE_EXPAND_FILL);
VBoxContainer *sub_vb = memnew(VBoxContainer);
- vbc_animlist->add_margin_child(TTR("Animations"), sub_vb, true);
+ vbc_animlist->add_margin_child(TTR("Animations:"), sub_vb, true);
sub_vb->set_v_size_flags(SIZE_EXPAND_FILL);
HBoxContainer *hbc_animlist = memnew(HBoxContainer);
sub_vb->add_child(hbc_animlist);
- new_anim = memnew(Button);
- new_anim->set_flat(true);
+ new_anim = memnew(ToolButton);
+ new_anim->set_tooltip(TTR("New Animation"));
hbc_animlist->add_child(new_anim);
new_anim->set_h_size_flags(SIZE_EXPAND_FILL);
new_anim->connect("pressed", this, "_animation_add");
- remove_anim = memnew(Button);
- remove_anim->set_flat(true);
+ remove_anim = memnew(ToolButton);
+ remove_anim->set_tooltip(TTR("Remove Animation"));
hbc_animlist->add_child(remove_anim);
remove_anim->connect("pressed", this, "_animation_remove");
@@ -722,56 +708,47 @@ SpriteFramesEditor::SpriteFramesEditor() {
anim_loop->connect("pressed", this, "_animation_loop_changed");
VBoxContainer *vbc = memnew(VBoxContainer);
- split->add_child(vbc);
+ add_child(vbc);
vbc->set_h_size_flags(SIZE_EXPAND_FILL);
sub_vb = memnew(VBoxContainer);
- vbc->add_margin_child(TTR("Animation Frames"), sub_vb, true);
+ vbc->add_margin_child(TTR("Animation Frames:"), sub_vb, true);
HBoxContainer *hbc = memnew(HBoxContainer);
sub_vb->add_child(hbc);
- //animations = memnew( ItemList );
-
- load = memnew(Button);
- load->set_flat(true);
+ load = memnew(ToolButton);
load->set_tooltip(TTR("Load Resource"));
hbc->add_child(load);
- copy = memnew(Button);
- copy->set_flat(true);
+ copy = memnew(ToolButton);
copy->set_tooltip(TTR("Copy"));
hbc->add_child(copy);
- paste = memnew(Button);
- paste->set_flat(true);
+ paste = memnew(ToolButton);
paste->set_tooltip(TTR("Paste"));
hbc->add_child(paste);
- empty = memnew(Button);
- empty->set_flat(true);
+ empty = memnew(ToolButton);
empty->set_tooltip(TTR("Insert Empty (Before)"));
hbc->add_child(empty);
- empty2 = memnew(Button);
- empty2->set_flat(true);
+ empty2 = memnew(ToolButton);
empty2->set_tooltip(TTR("Insert Empty (After)"));
hbc->add_child(empty2);
hbc->add_spacer(false);
- move_up = memnew(Button);
- move_up->set_flat(true);
+ move_up = memnew(ToolButton);
move_up->set_tooltip(TTR("Move (Before)"));
hbc->add_child(move_up);
- move_down = memnew(Button);
- move_down->set_flat(true);
+ move_down = memnew(ToolButton);
move_down->set_tooltip(TTR("Move (After)"));
hbc->add_child(move_down);
- _delete = memnew(Button);
- _delete->set_flat(true);
+ _delete = memnew(ToolButton);
+ _delete->set_tooltip(TTR("Delete"));
hbc->add_child(_delete);
file = memnew(EditorFileDialog);
@@ -787,7 +764,6 @@ SpriteFramesEditor::SpriteFramesEditor() {
tree->set_fixed_column_width(thumbnail_size * 3 / 2);
tree->set_max_text_lines(2);
tree->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
- //tree->set_min_icon_size(Size2(thumbnail_size,thumbnail_size));
tree->set_drag_forwarding(this);
sub_vb->add_child(tree);
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 3ef4ba290b..55dd10074e 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -39,25 +39,25 @@
#include "scene/gui/split_container.h"
#include "scene/gui/tree.h"
-class SpriteFramesEditor : public PanelContainer {
-
- GDCLASS(SpriteFramesEditor, PanelContainer);
-
- Button *load;
- Button *_delete;
- Button *copy;
- Button *paste;
- Button *empty;
- Button *empty2;
- Button *move_up;
- Button *move_down;
+class SpriteFramesEditor : public HSplitContainer {
+
+ GDCLASS(SpriteFramesEditor, HSplitContainer);
+
+ ToolButton *load;
+ ToolButton *_delete;
+ ToolButton *copy;
+ ToolButton *paste;
+ ToolButton *empty;
+ ToolButton *empty2;
+ ToolButton *move_up;
+ ToolButton *move_down;
ItemList *tree;
bool loading_scene;
int sel;
HSplitContainer *split;
- Button *new_anim;
- Button *remove_anim;
+ ToolButton *new_anim;
+ ToolButton *remove_anim;
Tree *animations;
SpinBox *anim_speed;
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 0482ae86f3..0aa4a7662c 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -138,39 +138,33 @@ TextureEditor::TextureEditor() {
set_custom_minimum_size(Size2(1, 150));
}
-void TextureEditorPlugin::edit(Object *p_object) {
-
- Texture *s = Object::cast_to<Texture>(p_object);
- if (!s)
- return;
-
- texture_editor->edit(Ref<Texture>(s));
+TextureEditor::~TextureEditor() {
+ if (!texture.is_null()) {
+ texture->remove_change_receptor(this);
+ }
}
+//
+bool EditorInspectorPluginTexture::can_handle(Object *p_object) {
-bool TextureEditorPlugin::handles(Object *p_object) const {
-
- return p_object->is_class("Texture");
+ return Object::cast_to<ImageTexture>(p_object) != NULL || Object::cast_to<AtlasTexture>(p_object) != NULL || Object::cast_to<StreamTexture>(p_object) != NULL || Object::cast_to<LargeTexture>(p_object) != NULL || Object::cast_to<AnimatedTexture>(p_object) != NULL;
}
-void TextureEditorPlugin::make_visible(bool p_visible) {
+void EditorInspectorPluginTexture::parse_begin(Object *p_object) {
- if (p_visible) {
- texture_editor->show();
- //texture_editor->set_process(true);
- } else {
-
- texture_editor->hide();
- //texture_editor->set_process(false);
+ Texture *texture = Object::cast_to<Texture>(p_object);
+ if (!texture) {
+ return;
}
+ Ref<Texture> m(texture);
+
+ TextureEditor *editor = memnew(TextureEditor);
+ editor->edit(m);
+ add_custom_control(editor);
}
TextureEditorPlugin::TextureEditorPlugin(EditorNode *p_node) {
- editor = p_node;
- texture_editor = memnew(TextureEditor);
- add_control_to_container(CONTAINER_PROPERTY_EDITOR_BOTTOM, texture_editor);
- texture_editor->hide();
-}
-
-TextureEditorPlugin::~TextureEditorPlugin() {
+ Ref<EditorInspectorPluginTexture> plugin;
+ plugin.instance();
+ add_inspector_plugin(plugin);
}
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 80ff4d6416..bcbda1fbd7 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -50,24 +50,24 @@ protected:
public:
void edit(Ref<Texture> p_texture);
TextureEditor();
+ ~TextureEditor();
+};
+
+class EditorInspectorPluginTexture : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginTexture, EditorInspectorPlugin)
+public:
+ virtual bool can_handle(Object *p_object);
+ virtual void parse_begin(Object *p_object);
};
class TextureEditorPlugin : public EditorPlugin {
GDCLASS(TextureEditorPlugin, EditorPlugin);
- TextureEditor *texture_editor;
- EditorNode *editor;
-
public:
virtual String get_name() const { return "Texture"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_object);
- virtual bool handles(Object *p_object) const;
- virtual void make_visible(bool p_visible);
TextureEditorPlugin(EditorNode *p_node);
- ~TextureEditorPlugin();
};
#endif // TEXTURE_EDITOR_PLUGIN_H
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index a967374eb9..1a367b61dd 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -477,17 +477,17 @@ void TileMapEditor::_update_palette() {
if (sel_tile != TileMap::INVALID_CELL) {
if ((manual_autotile && tileset->tile_get_tile_mode(sel_tile) == TileSet::AUTO_TILE) || tileset->tile_get_tile_mode(sel_tile) == TileSet::ATLAS_TILE) {
- const Map<Vector2, uint16_t> &tiles = tileset->autotile_get_bitmask_map(sel_tile);
+ const Map<Vector2, uint16_t> &tiles2 = tileset->autotile_get_bitmask_map(sel_tile);
- Vector<Vector2> entries;
- for (const Map<Vector2, uint16_t>::Element *E = tiles.front(); E; E = E->next()) {
- entries.push_back(E->key());
+ Vector<Vector2> entries2;
+ for (const Map<Vector2, uint16_t>::Element *E = tiles2.front(); E; E = E->next()) {
+ entries2.push_back(E->key());
}
- entries.sort();
+ entries2.sort();
Ref<Texture> tex = tileset->tile_get_texture(sel_tile);
- for (int i = 0; i < entries.size(); i++) {
+ for (int i = 0; i < entries2.size(); i++) {
manual_palette->add_item(String());
@@ -496,7 +496,7 @@ void TileMapEditor::_update_palette() {
Rect2 region = tileset->tile_get_region(sel_tile);
int spacing = tileset->autotile_get_spacing(sel_tile);
region.size = tileset->autotile_get_size(sel_tile); // !!
- region.position += (region.size + Vector2(spacing, spacing)) * entries[i];
+ region.position += (region.size + Vector2(spacing, spacing)) * entries2[i];
if (!region.has_no_area())
manual_palette->set_item_icon_region(manual_palette->get_item_count() - 1, region);
@@ -504,16 +504,16 @@ void TileMapEditor::_update_palette() {
manual_palette->set_item_icon(manual_palette->get_item_count() - 1, tex);
}
- manual_palette->set_item_metadata(manual_palette->get_item_count() - 1, entries[i]);
+ manual_palette->set_item_metadata(manual_palette->get_item_count() - 1, entries2[i]);
}
}
}
if (manual_palette->get_item_count() > 0) {
// Only show the manual palette if at least tile exists in it
- int selected = manual_palette->get_current();
- if (selected == -1) selected = 0;
- manual_palette->set_current(selected);
+ int selected2 = manual_palette->get_current();
+ if (selected2 == -1) selected2 = 0;
+ manual_palette->set_current(selected2);
manual_palette->show();
}
@@ -1157,7 +1157,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (points.size() == 0)
return false;
- undo_redo->create_action("Bucket Fill");
+ undo_redo->create_action(TTR("Bucket Fill"));
undo_redo->add_do_method(this, "_erase_points", points);
undo_redo->add_undo_method(this, "_fill_points", points, pop);
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 1a687a4009..dc099b84a7 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -201,11 +201,13 @@ void TileSetEditor::_bind_methods() {
ClassDB::bind_method("_zoom_out", &TileSetEditor::_zoom_out);
ClassDB::bind_method("_zoom_reset", &TileSetEditor::_zoom_reset);
ClassDB::bind_method("_select_edited_shape_coord", &TileSetEditor::_select_edited_shape_coord);
+ ClassDB::bind_method("_sort_tiles", &TileSetEditor::_sort_tiles);
ClassDB::bind_method("edit", &TileSetEditor::edit);
ClassDB::bind_method("add_texture", &TileSetEditor::add_texture);
ClassDB::bind_method("remove_texture", &TileSetEditor::remove_texture);
ClassDB::bind_method("update_texture_list_icon", &TileSetEditor::update_texture_list_icon);
+ ClassDB::bind_method("update_workspace_minsize", &TileSetEditor::update_workspace_minsize);
}
void TileSetEditor::_notification(int p_what) {
@@ -232,6 +234,9 @@ void TileSetEditor::_notification(int p_what) {
tools[BITMASK_PASTE]->set_icon(get_icon("Override", "EditorIcons"));
tools[BITMASK_CLEAR]->set_icon(get_icon("Clear", "EditorIcons"));
tools[SHAPE_NEW_POLYGON]->set_icon(get_icon("CollisionPolygon2D", "EditorIcons"));
+ tools[SHAPE_NEW_RECTANGLE]->set_icon(get_icon("CollisionShape2D", "EditorIcons"));
+ tools[SELECT_PREVIOUS]->set_icon(get_icon("ArrowLeft", "EditorIcons"));
+ tools[SELECT_NEXT]->set_icon(get_icon("ArrowRight", "EditorIcons"));
tools[SHAPE_DELETE]->set_icon(get_icon("Remove", "EditorIcons"));
tools[SHAPE_KEEP_INSIDE_TILE]->set_icon(get_icon("Snap", "EditorIcons"));
tools[TOOL_GRID_SNAP]->set_icon(get_icon("SnapGrid", "EditorIcons"));
@@ -239,6 +244,7 @@ void TileSetEditor::_notification(int p_what) {
tools[ZOOM_1]->set_icon(get_icon("ZoomReset", "EditorIcons"));
tools[ZOOM_IN]->set_icon(get_icon("ZoomMore", "EditorIcons"));
tools[VISIBLE_INFO]->set_icon(get_icon("InformationSign", "EditorIcons"));
+ _update_toggle_shape_button();
tool_editmode[EDITMODE_REGION]->set_icon(get_icon("RegionEdit", "EditorIcons"));
tool_editmode[EDITMODE_COLLISION]->set_icon(get_icon("StaticBody2D", "EditorIcons"));
@@ -322,11 +328,29 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tool_workspacemode[i]->connect("pressed", this, "_on_workspace_mode_changed", varray(i));
tool_hb->add_child(tool_workspacemode[i]);
}
+
Control *spacer = memnew(Control);
spacer->set_h_size_flags(Control::SIZE_EXPAND_FILL);
tool_hb->add_child(spacer);
tool_hb->move_child(spacer, WORKSPACE_CREATE_SINGLE);
+ tools[SELECT_NEXT] = memnew(ToolButton);
+ tool_hb->add_child(tools[SELECT_NEXT]);
+ tool_hb->move_child(tools[SELECT_NEXT], WORKSPACE_CREATE_SINGLE);
+ tools[SELECT_NEXT]->set_shortcut(ED_SHORTCUT("tileset_editor/next_shape", TTR("Next Coordinate"), KEY_PAGEDOWN));
+ tools[SELECT_NEXT]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_NEXT));
+ tools[SELECT_NEXT]->set_tooltip(TTR("Select the next shape, subtile, or Tile."));
+ tools[SELECT_PREVIOUS] = memnew(ToolButton);
+ tool_hb->add_child(tools[SELECT_PREVIOUS]);
+ tool_hb->move_child(tools[SELECT_PREVIOUS], WORKSPACE_CREATE_SINGLE);
+ tools[SELECT_PREVIOUS]->set_shortcut(ED_SHORTCUT("tileset_editor/previous_shape", TTR("Previous Coordinate"), KEY_PAGEUP));
+ tools[SELECT_PREVIOUS]->set_tooltip(TTR("Select the previous shape, subtile, or Tile."));
+ tools[SELECT_PREVIOUS]->connect("pressed", this, "_on_tool_clicked", varray(SELECT_PREVIOUS));
+
+ VSeparator *separator_shape_selection = memnew(VSeparator);
+ tool_hb->add_child(separator_shape_selection);
+ tool_hb->move_child(separator_shape_selection, WORKSPACE_CREATE_SINGLE);
+
tool_workspacemode[WORKSPACE_EDIT]->set_pressed(true);
workspace_mode = WORKSPACE_EDIT;
@@ -377,12 +401,24 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[BITMASK_CLEAR]->connect("pressed", this, "_on_tool_clicked", varray(BITMASK_CLEAR));
toolbar->add_child(tools[BITMASK_CLEAR]);
+ tools[SHAPE_NEW_RECTANGLE] = memnew(ToolButton);
+ toolbar->add_child(tools[SHAPE_NEW_RECTANGLE]);
+ tools[SHAPE_NEW_RECTANGLE]->set_toggle_mode(true);
+ tools[SHAPE_NEW_RECTANGLE]->set_button_group(tg);
+ tools[SHAPE_NEW_RECTANGLE]->set_tooltip(TTR("Create a new rectangle."));
+
tools[SHAPE_NEW_POLYGON] = memnew(ToolButton);
toolbar->add_child(tools[SHAPE_NEW_POLYGON]);
tools[SHAPE_NEW_POLYGON]->set_toggle_mode(true);
tools[SHAPE_NEW_POLYGON]->set_button_group(tg);
tools[SHAPE_NEW_POLYGON]->set_tooltip(TTR("Create a new polygon."));
+ separator_shape_toggle = memnew(VSeparator);
+ toolbar->add_child(separator_shape_toggle);
+ tools[SHAPE_TOGGLE_TYPE] = memnew(ToolButton);
+ tools[SHAPE_TOGGLE_TYPE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_TOGGLE_TYPE));
+ toolbar->add_child(tools[SHAPE_TOGGLE_TYPE]);
+
separator_delete = memnew(VSeparator);
toolbar->add_child(separator_delete);
tools[SHAPE_DELETE] = memnew(ToolButton);
@@ -583,16 +619,15 @@ void TileSetEditor::_on_texture_list_selected(int p_index) {
if (get_current_texture().is_valid()) {
current_item_index = p_index;
preview->set_texture(get_current_texture());
- workspace->set_custom_minimum_size(get_current_texture()->get_size() + WORKSPACE_MARGIN * 2);
- workspace_container->set_custom_minimum_size(get_current_texture()->get_size() + WORKSPACE_MARGIN * 2);
- workspace_overlay->set_custom_minimum_size(get_current_texture()->get_size() + WORKSPACE_MARGIN * 2);
update_workspace_tile_mode();
+ update_workspace_minsize();
} else {
current_item_index = -1;
preview->set_texture(NULL);
workspace->set_custom_minimum_size(Size2i());
update_workspace_tile_mode();
}
+
set_current_tile(-1);
workspace->update();
}
@@ -637,6 +672,7 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
tools[BITMASK_PASTE]->hide();
tools[BITMASK_CLEAR]->hide();
tools[SHAPE_NEW_POLYGON]->hide();
+ tools[SHAPE_NEW_RECTANGLE]->hide();
if (workspace_mode == WORKSPACE_EDIT) {
separator_delete->show();
@@ -666,6 +702,7 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
tools[BITMASK_PASTE]->hide();
tools[BITMASK_CLEAR]->hide();
tools[SHAPE_NEW_POLYGON]->show();
+ tools[SHAPE_NEW_RECTANGLE]->show();
separator_delete->show();
tools[SHAPE_DELETE]->show();
@@ -689,6 +726,7 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
tools[BITMASK_PASTE]->show();
tools[BITMASK_CLEAR]->show();
tools[SHAPE_NEW_POLYGON]->hide();
+ tools[SHAPE_NEW_RECTANGLE]->hide();
separator_delete->hide();
tools[SHAPE_DELETE]->hide();
@@ -709,6 +747,7 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
tools[BITMASK_PASTE]->hide();
tools[BITMASK_CLEAR]->hide();
tools[SHAPE_NEW_POLYGON]->hide();
+ tools[SHAPE_NEW_RECTANGLE]->hide();
separator_delete->hide();
tools[SHAPE_DELETE]->hide();
@@ -733,6 +772,7 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
} break;
default: {}
}
+ _update_toggle_shape_button();
workspace->update();
}
@@ -1071,7 +1111,23 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
undo_redo->create_action(TTR("Set Tile Region"));
undo_redo->add_do_method(tileset.ptr(), "tile_set_region", get_current_tile(), edited_region);
undo_redo->add_undo_method(tileset.ptr(), "tile_set_region", get_current_tile(), tileset->tile_get_region(get_current_tile()));
+
+ Size2 tile_workspace_size = edited_region.position + edited_region.size + WORKSPACE_MARGIN * 2;
+ Size2 workspace_minsize = workspace->get_custom_minimum_size();
+ if (tile_workspace_size.x > workspace_minsize.x && tile_workspace_size.y > workspace_minsize.y) {
+ undo_redo->add_do_method(workspace, "set_custom_minimum_size", tile_workspace_size);
+ undo_redo->add_undo_method(workspace, "set_custom_minimum_size", workspace_minsize);
+ undo_redo->add_do_method(workspace_container, "set_custom_minimum_size", tile_workspace_size);
+ undo_redo->add_undo_method(workspace_container, "set_custom_minimum_size", workspace_minsize);
+ undo_redo->add_do_method(workspace_overlay, "set_custom_minimum_size", tile_workspace_size);
+ undo_redo->add_undo_method(workspace_overlay, "set_custom_minimum_size", workspace_minsize);
+ } else if (workspace_minsize.x > get_current_texture()->get_size().x + WORKSPACE_MARGIN.x * 2 || workspace_minsize.y > get_current_texture()->get_size().y + WORKSPACE_MARGIN.y * 2) {
+ undo_redo->add_do_method(this, "update_workspace_minsize");
+ undo_redo->add_undo_method(this, "update_workspace_minsize");
+ }
+
edited_region = Rect2();
+
undo_redo->add_do_method(workspace, "update");
undo_redo->add_undo_method(workspace, "update");
undo_redo->add_do_method(workspace_overlay, "update");
@@ -1095,6 +1151,19 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
tool_workspacemode[WORKSPACE_EDIT]->set_pressed(true);
tool_editmode[EDITMODE_COLLISION]->set_pressed(true);
edit_mode = EDITMODE_COLLISION;
+
+ Size2 tile_workspace_size = edited_region.position + edited_region.size + WORKSPACE_MARGIN * 2;
+ Size2 workspace_minsize = workspace->get_custom_minimum_size();
+ if (tile_workspace_size.x > workspace_minsize.x || tile_workspace_size.y > workspace_minsize.y) {
+ Size2 new_workspace_minsize = Size2(MAX(tile_workspace_size.x, workspace_minsize.x), MAX(tile_workspace_size.y, workspace_minsize.y));
+ undo_redo->add_do_method(workspace, "set_custom_minimum_size", new_workspace_minsize);
+ undo_redo->add_undo_method(workspace, "set_custom_minimum_size", workspace_minsize);
+ undo_redo->add_do_method(workspace_container, "set_custom_minimum_size", new_workspace_minsize);
+ undo_redo->add_undo_method(workspace_container, "set_custom_minimum_size", workspace_minsize);
+ undo_redo->add_do_method(workspace_overlay, "set_custom_minimum_size", new_workspace_minsize);
+ undo_redo->add_undo_method(workspace_overlay, "set_custom_minimum_size", workspace_minsize);
+ }
+
edited_region = Rect2();
undo_redo->add_do_method(workspace, "update");
@@ -1335,8 +1404,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
}
undo_redo->create_action(TTR("Edit Collision Polygon"));
- undo_redo->add_do_method(edited_collision_shape.ptr(), "set_points", points);
- undo_redo->add_undo_method(edited_collision_shape.ptr(), "set_points", edited_collision_shape->get_points());
+ _set_edited_shape_points(points);
undo_redo->add_do_method(this, "_select_edited_shape_coord");
undo_redo->add_undo_method(this, "_select_edited_shape_coord");
undo_redo->commit_action();
@@ -1414,6 +1482,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
workspace->update();
} else {
creating_shape = true;
+ _set_edited_collision_shape(Ref<ConvexPolygonShape2D>());
current_shape.resize(0);
current_shape.push_back(snap_point(pos));
workspace->update();
@@ -1430,6 +1499,21 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
workspace->update();
}
}
+ } else if (tools[SHAPE_NEW_RECTANGLE]->is_pressed()) {
+ if (mb.is_valid()) {
+ if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+ _set_edited_collision_shape(Ref<ConvexPolygonShape2D>());
+ current_shape.resize(0);
+ current_shape.push_back(snap_point(shape_anchor));
+ current_shape.push_back(snap_point(shape_anchor + Vector2(current_tile_region.size.x, 0)));
+ current_shape.push_back(snap_point(shape_anchor + current_tile_region.size));
+ current_shape.push_back(snap_point(shape_anchor + Vector2(0, current_tile_region.size.y)));
+ close_shape(shape_anchor);
+ workspace->update();
+ } else if (mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) {
+ workspace->update();
+ }
+ }
}
} break;
default: {}
@@ -1463,6 +1547,49 @@ void TileSetEditor::_on_tool_clicked(int p_tool) {
undo_redo->add_do_method(workspace, "update");
undo_redo->add_undo_method(workspace, "update");
undo_redo->commit_action();
+ } else if (p_tool == SHAPE_TOGGLE_TYPE) {
+ if (edited_collision_shape.is_valid()) {
+ Ref<ConvexPolygonShape2D> convex = edited_collision_shape;
+ Ref<ConcavePolygonShape2D> concave = edited_collision_shape;
+ Ref<Shape2D> previous_shape = edited_collision_shape;
+ Array sd = tileset->call("tile_get_shapes", get_current_tile());
+
+ if (convex.is_valid()) {
+ // Make concave
+ undo_redo->create_action(TTR("Make Polygon Concave"));
+ Ref<ConcavePolygonShape2D> _concave = memnew(ConcavePolygonShape2D);
+ edited_collision_shape = _concave;
+ _set_edited_shape_points(_get_collision_shape_points(convex));
+ } else if (concave.is_valid()) {
+ // Make convex
+ undo_redo->create_action(TTR("Make Polygon Convex"));
+ Ref<ConvexPolygonShape2D> _convex = memnew(ConvexPolygonShape2D);
+ edited_collision_shape = _convex;
+ _set_edited_shape_points(_get_collision_shape_points(concave));
+ } else {
+ // Shoudn't haphen
+ }
+ for (int i = 0; i < sd.size(); i++) {
+ if (sd[i].get("shape") == previous_shape) {
+ undo_redo->add_undo_method(tileset.ptr(), "tile_set_shapes", get_current_tile(), sd.duplicate());
+ sd.remove(i);
+ sd.insert(i, edited_collision_shape);
+ undo_redo->add_do_method(tileset.ptr(), "tile_set_shapes", get_current_tile(), sd);
+ undo_redo->add_do_method(this, "_select_edited_shape_coord");
+ undo_redo->add_undo_method(this, "_select_edited_shape_coord");
+ undo_redo->commit_action();
+ break;
+ }
+ }
+ _update_toggle_shape_button();
+ workspace->update();
+ workspace_container->update();
+ helper->_change_notify("");
+ }
+ } else if (p_tool == SELECT_NEXT) {
+ _select_next_shape();
+ } else if (p_tool == SELECT_PREVIOUS) {
+ _select_previous_shape();
} else if (p_tool == SHAPE_DELETE) {
if (creating_shape) {
creating_shape = false;
@@ -1477,6 +1604,14 @@ void TileSetEditor::_on_tool_clicked(int p_tool) {
undo_redo->add_do_method(tileset.ptr(), "remove_tile", t_id);
_undo_tile_removal(t_id);
undo_redo->add_do_method(this, "_validate_current_tile_id");
+
+ Rect2 tile_region = tileset->tile_get_region(get_current_tile());
+ Size2 tile_workspace_size = tile_region.position + tile_region.size;
+ if (tile_workspace_size.x > get_current_texture()->get_size().x || tile_workspace_size.y > get_current_texture()->get_size().y) {
+ undo_redo->add_do_method(this, "update_workspace_minsize");
+ undo_redo->add_undo_method(this, "update_workspace_minsize");
+ }
+
undo_redo->add_do_method(workspace, "update");
undo_redo->add_undo_method(workspace, "update");
undo_redo->add_do_method(workspace_overlay, "update");
@@ -1577,6 +1712,378 @@ void TileSetEditor::_on_grid_snap_toggled(bool p_val) {
workspace->update();
}
+Vector<Vector2> TileSetEditor::_get_collision_shape_points(const Ref<Shape2D> &p_shape) {
+ Ref<ConvexPolygonShape2D> convex = p_shape;
+ Ref<ConcavePolygonShape2D> concave = p_shape;
+ if (convex.is_valid()) {
+ return convex->get_points();
+ } else if (concave.is_valid()) {
+ Vector<Vector2> points;
+ for (int i = 0; i < concave->get_segments().size(); i += 2) {
+ points.push_back(concave->get_segments()[i]);
+ }
+ return points;
+ } else {
+ return Vector<Vector2>();
+ }
+}
+
+Vector<Vector2> TileSetEditor::_get_edited_shape_points() {
+ return _get_collision_shape_points(edited_collision_shape);
+}
+
+void TileSetEditor::_set_edited_shape_points(const Vector<Vector2> points) {
+ Ref<ConvexPolygonShape2D> convex = edited_collision_shape;
+ Ref<ConcavePolygonShape2D> concave = edited_collision_shape;
+ if (convex.is_valid()) {
+ undo_redo->add_do_method(convex.ptr(), "set_points", points);
+ undo_redo->add_undo_method(convex.ptr(), "set_points", _get_edited_shape_points());
+ } else if (concave.is_valid()) {
+ PoolVector2Array segments;
+ for (int i = 0; i < points.size() - 1; i++) {
+ segments.push_back(points[i]);
+ segments.push_back(points[i + 1]);
+ }
+ segments.push_back(points[points.size() - 1]);
+ segments.push_back(points[0]);
+ concave->set_segments(segments);
+ undo_redo->add_do_method(concave.ptr(), "set_segments", segments);
+ undo_redo->add_undo_method(concave.ptr(), "set_segments", concave->get_segments());
+ } else {
+ // Invalid shape
+ }
+}
+
+void TileSetEditor::_update_tile_data() {
+ current_tile_data.clear();
+ if (get_current_tile() < 0)
+ return;
+
+ Vector<TileSet::ShapeData> sd = tileset->tile_get_shapes(get_current_tile());
+ if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
+ SubtileData data;
+ for (int i = 0; i < sd.size(); i++) {
+ data.collisions.push_back(sd[i].shape);
+ }
+ data.navigation_shape = tileset->tile_get_navigation_polygon(get_current_tile());
+ data.occlusion_shape = tileset->tile_get_light_occluder(get_current_tile());
+ current_tile_data[Vector2i()] = data;
+ } else {
+ int spacing = tileset->autotile_get_spacing(get_current_tile());
+ Vector2 size = tileset->tile_get_region(get_current_tile()).size;
+ Vector2i cell_count = size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing));
+ for (int y = 0; y < cell_count.y; y++) {
+ for (int x = 0; x < cell_count.x; x++) {
+ SubtileData data;
+ Vector2i coord(x, y);
+ for (int i = 0; i < sd.size(); i++) {
+ if (sd[i].autotile_coord == coord) {
+ data.collisions.push_back(sd[i].shape);
+ }
+ }
+ data.navigation_shape = tileset->autotile_get_navigation_polygon(get_current_tile(), coord);
+ data.occlusion_shape = tileset->tile_get_light_occluder(get_current_tile());
+ current_tile_data[coord] = data;
+ }
+ }
+ }
+}
+
+void TileSetEditor::_update_toggle_shape_button() {
+ Ref<ConvexPolygonShape2D> convex = edited_collision_shape;
+ Ref<ConcavePolygonShape2D> concave = edited_collision_shape;
+ separator_shape_toggle->show();
+ tools[SHAPE_TOGGLE_TYPE]->show();
+ if (edit_mode != EDITMODE_COLLISION || !edited_collision_shape.is_valid()) {
+ separator_shape_toggle->hide();
+ tools[SHAPE_TOGGLE_TYPE]->hide();
+ } else if (concave.is_valid()) {
+ tools[SHAPE_TOGGLE_TYPE]->set_icon(get_icon("ConvexPolygonShape2D", "EditorIcons"));
+ tools[SHAPE_TOGGLE_TYPE]->set_text("Make Convex");
+ } else if (convex.is_valid()) {
+ tools[SHAPE_TOGGLE_TYPE]->set_icon(get_icon("ConcavePolygonShape2D", "EditorIcons"));
+ tools[SHAPE_TOGGLE_TYPE]->set_text("Make Concave");
+ } else {
+ // Shoudn't happen
+ separator_shape_toggle->hide();
+ tools[SHAPE_TOGGLE_TYPE]->hide();
+ }
+}
+
+void TileSetEditor::_select_next_tile() {
+ Array tiles = _get_tiles_in_current_texture(true);
+ if (tiles.size() == 0) {
+ set_current_tile(-1);
+ } else if (get_current_tile() == -1) {
+ set_current_tile(tiles[0]);
+ } else {
+ int index = tiles.find(get_current_tile());
+ if (index < 0) {
+ set_current_tile(tiles[0]);
+ } else if (index == tiles.size() - 1) {
+ set_current_tile(tiles[0]);
+ } else {
+ set_current_tile(tiles[index + 1]);
+ }
+ }
+ if (get_current_tile() == -1) {
+ return;
+ } else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
+ return;
+ } else {
+ switch (edit_mode) {
+ case EDITMODE_COLLISION:
+ case EDITMODE_OCCLUSION:
+ case EDITMODE_NAVIGATION:
+ case EDITMODE_PRIORITY:
+ case EDITMODE_Z_INDEX: {
+ edited_shape_coord = Vector2();
+ _select_edited_shape_coord();
+ } break;
+ default: {}
+ }
+ }
+}
+
+void TileSetEditor::_select_previous_tile() {
+ Array tiles = _get_tiles_in_current_texture(true);
+ if (tiles.size() == 0) {
+ set_current_tile(-1);
+ } else if (get_current_tile() == -1) {
+ set_current_tile(tiles[tiles.size() - 1]);
+ } else {
+ int index = tiles.find(get_current_tile());
+ if (index <= 0) {
+ set_current_tile(tiles[tiles.size() - 1]);
+ } else {
+ set_current_tile(tiles[index - 1]);
+ }
+ }
+ if (get_current_tile() == -1) {
+ return;
+ } else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
+ return;
+ } else {
+ switch (edit_mode) {
+ case EDITMODE_COLLISION:
+ case EDITMODE_OCCLUSION:
+ case EDITMODE_NAVIGATION:
+ case EDITMODE_PRIORITY:
+ case EDITMODE_Z_INDEX: {
+ int spacing = tileset->autotile_get_spacing(get_current_tile());
+ Vector2 size = tileset->tile_get_region(get_current_tile()).size;
+ Vector2i cell_count = size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing));
+ cell_count -= Vector2(1, 1);
+ edited_shape_coord = cell_count;
+ _select_edited_shape_coord();
+ } break;
+ default: {}
+ }
+ }
+}
+
+Array TileSetEditor::_get_tiles_in_current_texture(bool sorted) {
+ Array a;
+ List<int> all_tiles;
+ if (!get_current_texture().is_valid()) {
+ return a;
+ }
+ tileset->get_tile_list(&all_tiles);
+ for (int i = 0; i < all_tiles.size(); i++) {
+ if (tileset->tile_get_texture(all_tiles[i]) == get_current_texture()) {
+ a.push_back(all_tiles[i]);
+ }
+ }
+ if (sorted) {
+ a.sort_custom(this, "_sort_tiles");
+ }
+ return a;
+}
+
+bool TileSetEditor::_sort_tiles(Variant p_a, Variant p_b) {
+ int a = p_a;
+ int b = p_b;
+
+ Vector2 pos_a = tileset->tile_get_region(a).position;
+ Vector2 pos_b = tileset->tile_get_region(b).position;
+ if (pos_a.y < pos_b.y) {
+ return true;
+
+ } else if (pos_a.y == pos_b.y) {
+ if (pos_a.x < pos_b.x) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+}
+
+void TileSetEditor::_select_next_subtile() {
+ if (get_current_tile() == -1) {
+ _select_next_tile();
+ return;
+ }
+ if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
+ _select_next_tile();
+ } else if (edit_mode == EDITMODE_REGION || edit_mode == EDITMODE_BITMASK || edit_mode == EDITMODE_ICON) {
+ _select_next_tile();
+ } else {
+ int spacing = tileset->autotile_get_spacing(get_current_tile());
+ Vector2 size = tileset->tile_get_region(get_current_tile()).size;
+ Vector2i cell_count = size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing));
+ if (edited_shape_coord.x >= cell_count.x - 1 && edited_shape_coord.y >= cell_count.y - 1) {
+ _select_next_tile();
+ } else {
+ edited_shape_coord.x++;
+ if (edited_shape_coord.x >= cell_count.x) {
+ edited_shape_coord.x = 0;
+ edited_shape_coord.y++;
+ }
+ _select_edited_shape_coord();
+ }
+ }
+}
+
+void TileSetEditor::_select_previous_subtile() {
+ if (get_current_tile() == -1) {
+ _select_previous_tile();
+ return;
+ }
+ if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
+ _select_previous_tile();
+ } else if (edit_mode == EDITMODE_REGION || edit_mode == EDITMODE_BITMASK || edit_mode == EDITMODE_ICON) {
+ _select_previous_tile();
+ } else {
+ int spacing = tileset->autotile_get_spacing(get_current_tile());
+ Vector2 size = tileset->tile_get_region(get_current_tile()).size;
+ Vector2i cell_count = size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing));
+ if (edited_shape_coord.x <= 0 && edited_shape_coord.y <= 0) {
+ _select_previous_tile();
+ } else {
+ edited_shape_coord.x--;
+ if (edited_shape_coord.x == -1) {
+ edited_shape_coord.x = cell_count.x - 1;
+ edited_shape_coord.y--;
+ }
+ _select_edited_shape_coord();
+ }
+ }
+}
+
+void TileSetEditor::_select_next_shape() {
+ if (get_current_tile() == -1) {
+ _select_next_subtile();
+ } else if (edit_mode != EDITMODE_COLLISION) {
+ _select_next_subtile();
+ } else {
+ Vector2i edited_coord = Vector2();
+ if (tileset->tile_get_tile_mode(get_current_tile()) != TileSet::SINGLE_TILE) {
+ edited_coord = edited_shape_coord;
+ }
+ SubtileData data = current_tile_data[edited_coord];
+ if (data.collisions.size() == 0) {
+ _select_next_subtile();
+ } else {
+ int index = data.collisions.find(edited_collision_shape);
+ if (index < 0) {
+ _set_edited_collision_shape(data.collisions[0]);
+ } else if (index == data.collisions.size() - 1) {
+ _select_next_subtile();
+ } else {
+ _set_edited_collision_shape(data.collisions[index + 1]);
+ }
+ }
+ current_shape.resize(0);
+ Rect2 current_tile_region = tileset->tile_get_region(get_current_tile());
+ current_tile_region.position += WORKSPACE_MARGIN;
+
+ int spacing = tileset->autotile_get_spacing(get_current_tile());
+ Vector2 size = tileset->autotile_get_size(get_current_tile());
+ Vector2 shape_anchor = edited_shape_coord;
+ shape_anchor.x *= (size.x + spacing);
+ shape_anchor.y *= (size.y + spacing);
+ current_tile_region.position += shape_anchor;
+
+ if (edited_collision_shape.is_valid()) {
+ for (int i = 0; i < _get_edited_shape_points().size(); i++) {
+ current_shape.push_back(_get_edited_shape_points()[i] + current_tile_region.position);
+ }
+ }
+ workspace->update();
+ workspace_container->update();
+ helper->_change_notify("");
+ }
+}
+
+void TileSetEditor::_select_previous_shape() {
+ if (get_current_tile() == -1) {
+ _select_previous_subtile();
+ if (get_current_tile() != -1 && edit_mode == EDITMODE_COLLISION) {
+ SubtileData data = current_tile_data[Vector2i(edited_shape_coord)];
+ if (data.collisions.size() > 1) {
+ _set_edited_collision_shape(data.collisions[data.collisions.size() - 1]);
+ }
+ } else {
+ return;
+ }
+ } else if (edit_mode != EDITMODE_COLLISION) {
+ _select_previous_subtile();
+ } else {
+ Vector2i edited_coord = Vector2();
+ if (tileset->tile_get_tile_mode(get_current_tile()) != TileSet::SINGLE_TILE) {
+ edited_coord = edited_shape_coord;
+ }
+ SubtileData data = current_tile_data[edited_coord];
+ if (data.collisions.size() == 0) {
+ _select_previous_subtile();
+ data = current_tile_data[Vector2i(edited_shape_coord)];
+ if (data.collisions.size() > 1) {
+ _set_edited_collision_shape(data.collisions[data.collisions.size() - 1]);
+ }
+ } else {
+ int index = data.collisions.find(edited_collision_shape);
+ if (index < 0) {
+ _set_edited_collision_shape(data.collisions[data.collisions.size() - 1]);
+ } else if (index == 0) {
+ _select_previous_subtile();
+ data = current_tile_data[Vector2i(edited_shape_coord)];
+ if (data.collisions.size() > 1) {
+ _set_edited_collision_shape(data.collisions[data.collisions.size() - 1]);
+ }
+ } else {
+ _set_edited_collision_shape(data.collisions[index - 1]);
+ }
+ }
+
+ current_shape.resize(0);
+ Rect2 current_tile_region = tileset->tile_get_region(get_current_tile());
+ current_tile_region.position += WORKSPACE_MARGIN;
+
+ int spacing = tileset->autotile_get_spacing(get_current_tile());
+ Vector2 size = tileset->autotile_get_size(get_current_tile());
+ Vector2 shape_anchor = edited_shape_coord;
+ shape_anchor.x *= (size.x + spacing);
+ shape_anchor.y *= (size.y + spacing);
+ current_tile_region.position += shape_anchor;
+
+ if (edited_collision_shape.is_valid()) {
+ for (int i = 0; i < _get_edited_shape_points().size(); i++) {
+ current_shape.push_back(_get_edited_shape_points()[i] + current_tile_region.position);
+ }
+ }
+ workspace->update();
+ workspace_container->update();
+ helper->_change_notify("");
+ }
+}
+
+void TileSetEditor::_set_edited_collision_shape(const Ref<Shape2D> &p_shape) {
+ edited_collision_shape = p_shape;
+ _update_toggle_shape_button();
+}
+
void TileSetEditor::_set_snap_step(Vector2 p_val) {
snap_step.x = CLAMP(p_val.x, 0, 256);
snap_step.y = CLAMP(p_val.y, 0, 256);
@@ -1873,16 +2380,29 @@ void TileSetEditor::draw_polygon_shapes() {
}
anchor += WORKSPACE_MARGIN;
anchor += tileset->tile_get_region(t_id).position;
- Ref<ConvexPolygonShape2D> shape = sd[i].shape;
+ Ref<Shape2D> shape = sd[i].shape;
if (shape.is_valid()) {
Color c_bg;
Color c_border;
+ Ref<ConvexPolygonShape2D> convex = shape;
+ bool is_convex = convex.is_valid();
if ((tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE || coord == edited_shape_coord) && sd[i].shape == edited_collision_shape) {
- c_bg = Color(0, 1, 1, 0.5);
- c_border = Color(0, 1, 1);
+ if (is_convex) {
+ c_bg = Color(0, 1, 1, 0.5);
+ c_border = Color(0, 1, 1);
+ } else {
+ c_bg = Color(0.8, 0, 1, 0.5);
+ c_border = Color(0.8, 0, 1);
+ }
} else {
- c_bg = Color(0.9, 0.7, 0.07, 0.5);
- c_border = Color(0.9, 0.7, 0.07, 1);
+ if (is_convex) {
+ c_bg = Color(0.9, 0.7, 0.07, 0.5);
+ c_border = Color(0.9, 0.7, 0.07, 1);
+
+ } else {
+ c_bg = Color(0.9, 0.45, 0.075, 0.5);
+ c_border = Color(0.9, 0.45, 0.075);
+ }
}
Vector<Vector2> polygon;
Vector<Color> colors;
@@ -1892,8 +2412,8 @@ void TileSetEditor::draw_polygon_shapes() {
colors.push_back(c_bg);
}
} else {
- for (int j = 0; j < shape->get_points().size(); j++) {
- polygon.push_back(shape->get_points()[j] + anchor);
+ for (int j = 0; j < _get_collision_shape_points(shape).size(); j++) {
+ polygon.push_back(_get_collision_shape_points(shape)[j] + anchor);
colors.push_back(c_bg);
}
}
@@ -1940,10 +2460,12 @@ void TileSetEditor::draw_polygon_shapes() {
workspace->draw_polygon(polygon, colors);
if (!creating_shape) {
- for (int j = 0; j < polygon.size() - 1; j++) {
- workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
+ if (polygon.size() > 1) {
+ for (int j = 0; j < polygon.size() - 1; j++) {
+ workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
+ }
+ workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
}
- workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
}
if (shape == edited_occlusion_shape) {
draw_handles = true;
@@ -2110,11 +2632,11 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
if (current_shape.size() >= 3) {
Ref<ConvexPolygonShape2D> shape = memnew(ConvexPolygonShape2D);
- Vector<Vector2> segments;
+ Vector<Vector2> points;
float p_total = 0;
for (int i = 0; i < current_shape.size(); i++) {
- segments.push_back(current_shape[i] - shape_anchor);
+ points.push_back(current_shape[i] - shape_anchor);
if (i != current_shape.size() - 1)
p_total += ((current_shape[i + 1].x - current_shape[i].x) * (-current_shape[i + 1].y + (-current_shape[i].y)));
@@ -2123,9 +2645,9 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
}
if (p_total < 0)
- segments.invert();
+ points.invert();
- shape->set_points(segments);
+ shape->set_points(points);
undo_redo->create_action(TTR("Create Collision Polygon"));
// Necessary to get the version that returns a Array instead of a Vector.
@@ -2210,6 +2732,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
}
void TileSetEditor::select_coord(const Vector2 &coord) {
+ _update_tile_data();
current_shape = PoolVector2Array();
if (get_current_tile() == -1)
return;
@@ -2217,7 +2740,7 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
current_tile_region.position += WORKSPACE_MARGIN;
if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
if (edited_collision_shape != tileset->tile_get_shape(get_current_tile(), 0))
- edited_collision_shape = tileset->tile_get_shape(get_current_tile(), 0);
+ _set_edited_collision_shape(tileset->tile_get_shape(get_current_tile(), 0));
if (edited_occlusion_shape != tileset->tile_get_light_occluder(get_current_tile()))
edited_occlusion_shape = tileset->tile_get_light_occluder(get_current_tile());
if (edited_navigation_shape != tileset->tile_get_navigation_polygon(get_current_tile()))
@@ -2226,8 +2749,8 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
if (edit_mode == EDITMODE_COLLISION) {
current_shape.resize(0);
if (edited_collision_shape.is_valid()) {
- for (int i = 0; i < edited_collision_shape->get_points().size(); i++) {
- current_shape.push_back(edited_collision_shape->get_points()[i] + current_tile_region.position);
+ for (int i = 0; i < _get_edited_shape_points().size(); i++) {
+ current_shape.push_back(_get_edited_shape_points()[i] + current_tile_region.position);
}
}
} else if (edit_mode == EDITMODE_OCCLUSION) {
@@ -2254,13 +2777,13 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
for (int i = 0; i < sd.size(); i++) {
if (sd[i].autotile_coord == coord) {
if (edited_collision_shape != sd[i].shape)
- edited_collision_shape = sd[i].shape;
+ _set_edited_collision_shape(sd[i].shape);
found_collision_shape = true;
break;
}
}
if (!found_collision_shape)
- edited_collision_shape = Ref<ConvexPolygonShape2D>(NULL);
+ _set_edited_collision_shape(Ref<ConvexPolygonShape2D>(NULL));
if (edited_occlusion_shape != tileset->autotile_get_light_occluder(get_current_tile(), coord))
edited_occlusion_shape = tileset->autotile_get_light_occluder(get_current_tile(), coord);
if (edited_navigation_shape != tileset->autotile_get_navigation_polygon(get_current_tile(), coord))
@@ -2275,8 +2798,8 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
if (edit_mode == EDITMODE_COLLISION) {
current_shape.resize(0);
if (edited_collision_shape.is_valid()) {
- for (int j = 0; j < edited_collision_shape->get_points().size(); j++) {
- current_shape.push_back(edited_collision_shape->get_points()[j] + shape_anchor);
+ for (int j = 0; j < _get_edited_shape_points().size(); j++) {
+ current_shape.push_back(_get_edited_shape_points()[j] + shape_anchor);
}
}
} else if (edit_mode == EDITMODE_OCCLUSION) {
@@ -2397,7 +2920,8 @@ void TileSetEditor::update_texture_list_icon() {
for (int current_idx = 0; current_idx < texture_list->get_item_count(); current_idx++) {
RID rid = texture_list->get_item_metadata(current_idx);
texture_list->set_item_icon(current_idx, texture_map[rid]);
- texture_list->set_item_icon_region(current_idx, Rect2(0, 0, 150, 100));
+ Size2 texture_size = texture_map[rid]->get_size();
+ texture_list->set_item_icon_region(current_idx, Rect2(0, 0, MIN(texture_size.x, 150), MIN(texture_size.y, 100)));
}
texture_list->update();
}
@@ -2410,10 +2934,14 @@ void TileSetEditor::update_workspace_tile_mode() {
for (int i = 1; i < WORKSPACE_MODE_MAX; i++) {
tool_workspacemode[i]->set_disabled(true);
}
+ tools[SELECT_NEXT]->set_disabled(true);
+ tools[SELECT_PREVIOUS]->set_disabled(true);
} else {
for (int i = 1; i < WORKSPACE_MODE_MAX; i++) {
tool_workspacemode[i]->set_disabled(false);
}
+ tools[SELECT_NEXT]->set_disabled(false);
+ tools[SELECT_PREVIOUS]->set_disabled(false);
}
if (workspace_mode != WORKSPACE_EDIT) {
@@ -2431,7 +2959,7 @@ void TileSetEditor::update_workspace_tile_mode() {
for (int i = 0; i < EDITMODE_MAX; i++) {
tool_editmode[i]->hide();
}
- for (int i = 0; i < ZOOM_OUT; i++) {
+ for (int i = TOOL_SELECT; i < ZOOM_OUT; i++) {
tools[i]->hide();
}
@@ -2479,6 +3007,26 @@ void TileSetEditor::update_workspace_tile_mode() {
_on_edit_mode_changed(edit_mode);
}
+void TileSetEditor::update_workspace_minsize() {
+ Size2 workspace_min_size = get_current_texture()->get_size();
+ RID current_texture_rid = get_current_texture()->get_rid();
+ List<int> *tiles = new List<int>();
+ tileset->get_tile_list(tiles);
+ for (List<int>::Element *E = tiles->front(); E; E = E->next()) {
+ if (tileset->tile_get_texture(E->get())->get_rid() == current_texture_rid) {
+ Rect2i region = tileset->tile_get_region(E->get());
+ if (region.position.x + region.size.x > workspace_min_size.x)
+ workspace_min_size.x = region.position.x + region.size.x;
+ if (region.position.y + region.size.y > workspace_min_size.y)
+ workspace_min_size.y = region.position.y + region.size.y;
+ }
+ }
+
+ workspace->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2);
+ workspace_container->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2);
+ workspace_overlay->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2);
+}
+
void TileSetEditor::update_edited_region(const Vector2 &end_point) {
edited_region = Rect2(region_from, Size2());
if (tools[TOOL_GRID_SNAP]->is_pressed()) {
@@ -2511,6 +3059,11 @@ void TileSetEditor::set_current_tile(int p_id) {
helper->_change_notify("");
select_coord(Vector2(0, 0));
update_workspace_tile_mode();
+ if (p_id == -1) {
+ editor->get_inspector()->edit(tileset.ptr());
+ } else {
+ editor->get_inspector()->edit(helper);
+ }
}
}
@@ -2548,20 +3101,20 @@ bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value
tileset_editor->_set_snap_sep(snap);
return true;
} else if (p_name.operator String().left(5) == "tile_") {
- String name = p_name.operator String().right(5);
+ String name2 = p_name.operator String().right(5);
bool v = false;
if (tileset_editor->get_current_tile() < 0 || tileset.is_null())
return false;
- if (name == "autotile_bitmask_mode") {
+ if (name2 == "autotile_bitmask_mode") {
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/bitmask_mode", p_value, &v);
- } else if (name == "subtile_size") {
+ } else if (name2 == "subtile_size") {
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/tile_size", p_value, &v);
- } else if (name == "subtile_spacing") {
+ } else if (name2 == "subtile_spacing") {
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/autotile/spacing", p_value, &v);
} else {
- tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/" + name, p_value, &v);
+ tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/" + name2, p_value, &v);
}
if (v) {
tileset->_change_notify("");
@@ -2572,6 +3125,24 @@ bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value
} else if (name == "tileset_script") {
tileset->set_script(p_value);
return true;
+ } else if (name == "selected_collision_one_way") {
+ Vector<TileSet::ShapeData> sd = tileset->tile_get_shapes(tileset_editor->get_current_tile());
+ for (int index = 0; index < sd.size(); index++) {
+ if (sd[index].shape == tileset_editor->edited_collision_shape) {
+ tileset->tile_set_shape_one_way(tileset_editor->get_current_tile(), index, p_value);
+ return true;
+ }
+ }
+ return false;
+ } else if (name == "selected_collision_one_way_margin") {
+ Vector<TileSet::ShapeData> sd = tileset->tile_get_shapes(tileset_editor->get_current_tile());
+ for (int index = 0; index < sd.size(); index++) {
+ if (sd[index].shape == tileset_editor->edited_collision_shape) {
+ tileset->tile_set_shape_one_way_margin(tileset_editor->get_current_tile(), index, p_value);
+ return true;
+ }
+ }
+ return false;
}
tileset_editor->err_dialog->set_text(TTR("This property can't be changed."));
@@ -2614,6 +3185,24 @@ bool TilesetEditorContext::_get(const StringName &p_name, Variant &r_ret) const
} else if (name == "selected_collision") {
r_ret = tileset_editor->edited_collision_shape;
v = true;
+ } else if (name == "selected_collision_one_way") {
+ Vector<TileSet::ShapeData> sd = tileset->tile_get_shapes(tileset_editor->get_current_tile());
+ for (int index = 0; index < sd.size(); index++) {
+ if (sd[index].shape == tileset_editor->edited_collision_shape) {
+ r_ret = sd[index].one_way_collision;
+ v = true;
+ break;
+ }
+ }
+ } else if (name == "selected_collision_one_way_margin") {
+ Vector<TileSet::ShapeData> sd = tileset->tile_get_shapes(tileset_editor->get_current_tile());
+ for (int index = 0; index < sd.size(); index++) {
+ if (sd[index].shape == tileset_editor->edited_collision_shape) {
+ r_ret = sd[index].one_way_collision_margin;
+ v = true;
+ break;
+ }
+ }
} else if (name == "selected_navigation") {
r_ret = tileset_editor->edited_navigation_shape;
v = true;
@@ -2660,6 +3249,10 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const
}
if (tileset_editor->edit_mode == TileSetEditor::EDITMODE_COLLISION && tileset_editor->edited_collision_shape.is_valid()) {
p_list->push_back(PropertyInfo(Variant::OBJECT, "selected_collision", PROPERTY_HINT_RESOURCE_TYPE, tileset_editor->edited_collision_shape->get_class()));
+ if (tileset_editor->edited_collision_shape.is_valid()) {
+ p_list->push_back(PropertyInfo(Variant::BOOL, "selected_collision_one_way", PROPERTY_HINT_NONE));
+ p_list->push_back(PropertyInfo(Variant::REAL, "selected_collision_one_way_margin", PROPERTY_HINT_NONE));
+ }
}
if (tileset_editor->edit_mode == TileSetEditor::EDITMODE_NAVIGATION && tileset_editor->edited_navigation_shape.is_valid()) {
p_list->push_back(PropertyInfo(Variant::OBJECT, "selected_navigation", PROPERTY_HINT_RESOURCE_TYPE, tileset_editor->edited_navigation_shape->get_class()));
@@ -2680,13 +3273,13 @@ void TilesetEditorContext::_bind_methods() {
TilesetEditorContext::TilesetEditorContext(TileSetEditor *p_tileset_editor) {
tileset_editor = p_tileset_editor;
+ snap_options_visible = false;
}
void TileSetEditorPlugin::edit(Object *p_node) {
if (Object::cast_to<TileSet>(p_node)) {
tileset_editor->edit(Object::cast_to<TileSet>(p_node));
- editor->get_inspector()->edit(tileset_editor->helper);
}
}
@@ -2715,6 +3308,7 @@ Dictionary TileSetEditorPlugin::get_state() const {
state["snap_separation"] = tileset_editor->snap_separation;
state["snap_enabled"] = tileset_editor->tools[TileSetEditor::TOOL_GRID_SNAP]->is_pressed();
state["keep_inside_tile"] = tileset_editor->tools[TileSetEditor::SHAPE_KEEP_INSIDE_TILE]->is_pressed();
+ state["show_information"] = tileset_editor->tools[TileSetEditor::VISIBLE_INFO]->is_pressed();
return state;
}
@@ -2735,11 +3329,18 @@ void TileSetEditorPlugin::set_state(const Dictionary &p_state) {
if (state.has("snap_enabled")) {
tileset_editor->tools[TileSetEditor::TOOL_GRID_SNAP]->set_pressed(state["snap_enabled"]);
+ if (tileset_editor->helper) {
+ tileset_editor->_on_grid_snap_toggled(state["snap_enabled"]);
+ }
}
if (state.has("keep_inside_tile")) {
tileset_editor->tools[TileSetEditor::SHAPE_KEEP_INSIDE_TILE]->set_pressed(state["keep_inside_tile"]);
}
+
+ if (state.has("show_information")) {
+ tileset_editor->tools[TileSetEditor::VISIBLE_INFO]->set_pressed(state["show_information"]);
+ }
}
TileSetEditorPlugin::TileSetEditorPlugin(EditorNode *p_node) {
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index 1a6b51cdd3..2827964592 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -34,6 +34,7 @@
#include "editor/editor_name_dialog.h"
#include "editor/editor_node.h"
#include "scene/2d/sprite.h"
+#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/tile_set.h"
@@ -76,11 +77,15 @@ class TileSetEditor : public HSplitContainer {
};
enum TileSetTools {
+ SELECT_PREVIOUS,
+ SELECT_NEXT,
TOOL_SELECT,
BITMASK_COPY,
BITMASK_PASTE,
BITMASK_CLEAR,
SHAPE_NEW_POLYGON,
+ SHAPE_NEW_RECTANGLE,
+ SHAPE_TOGGLE_TYPE,
SHAPE_DELETE,
SHAPE_KEEP_INSIDE_TILE,
TOOL_GRID_SNAP,
@@ -91,6 +96,12 @@ class TileSetEditor : public HSplitContainer {
TOOL_MAX
};
+ struct SubtileData {
+ Array collisions;
+ Ref<OccluderPolygon2D> occlusion_shape;
+ Ref<NavigationPolygon> navigation_shape;
+ };
+
Ref<TileSet> tileset;
TilesetEditorContext *helper;
EditorNode *editor;
@@ -114,13 +125,14 @@ class TileSetEditor : public HSplitContainer {
bool draw_edited_region;
Vector2 edited_shape_coord;
PoolVector2Array current_shape;
+ Map<Vector2i, SubtileData> current_tile_data;
Map<Vector2, uint16_t> bitmask_map_copy;
Vector2 snap_step;
Vector2 snap_offset;
Vector2 snap_separation;
- Ref<ConvexPolygonShape2D> edited_collision_shape;
+ Ref<Shape2D> edited_collision_shape;
Ref<OccluderPolygon2D> edited_occlusion_shape;
Ref<NavigationPolygon> edited_navigation_shape;
@@ -136,6 +148,7 @@ class TileSetEditor : public HSplitContainer {
HSeparator *separator_editmode;
HBoxContainer *toolbar;
ToolButton *tools[TOOL_MAX];
+ VSeparator *separator_shape_toggle;
VSeparator *separator_bitmask;
VSeparator *separator_delete;
VSeparator *separator_grid;
@@ -187,6 +200,20 @@ private:
void _on_priority_changed(float val);
void _on_z_index_changed(float val);
void _on_grid_snap_toggled(bool p_val);
+ Vector<Vector2> _get_collision_shape_points(const Ref<Shape2D> &p_shape);
+ Vector<Vector2> _get_edited_shape_points();
+ void _set_edited_shape_points(const Vector<Vector2> points);
+ void _update_tile_data();
+ void _update_toggle_shape_button();
+ void _select_next_tile();
+ void _select_previous_tile();
+ Array _get_tiles_in_current_texture(bool sorted = false);
+ bool _sort_tiles(Variant p_a, Variant p_b);
+ void _select_next_subtile();
+ void _select_previous_subtile();
+ void _select_next_shape();
+ void _select_previous_shape();
+ void _set_edited_collision_shape(const Ref<Shape2D> &p_shape);
void _set_snap_step(Vector2 p_val);
void _set_snap_off(Vector2 p_val);
void _set_snap_sep(Vector2 p_val);
@@ -209,6 +236,7 @@ private:
void select_coord(const Vector2 &coord);
Vector2 snap_point(const Vector2 &point);
void update_workspace_tile_mode();
+ void update_workspace_minsize();
void update_edited_region(const Vector2 &end_point);
int get_current_tile() const;
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 628c2f714c..7bd26de092 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -393,7 +393,7 @@ void VisualShaderEditor::_preview_select_port(int p_node, int p_port) {
if (node->get_output_port_for_preview() == p_port) {
p_port = -1; //toggle it
}
- undo_redo->create_action("Set Uniform Name");
+ undo_redo->create_action(TTR("Set Uniform Name"));
undo_redo->add_do_method(node.ptr(), "set_output_port_for_preview", p_port);
undo_redo->add_undo_method(node.ptr(), "set_output_port_for_preview", node->get_output_port_for_preview());
undo_redo->add_do_method(this, "_update_graph");
@@ -411,7 +411,7 @@ void VisualShaderEditor::_line_edit_changed(const String &p_text, Object *line_e
String validated_name = visual_shader->validate_uniform_name(p_text, node);
updating = true;
- undo_redo->create_action("Set Uniform Name");
+ undo_redo->create_action(TTR("Set Uniform Name"));
undo_redo->add_do_method(node.ptr(), "set_uniform_name", validated_name);
undo_redo->add_undo_method(node.ptr(), "set_uniform_name", node->get_uniform_name());
undo_redo->add_do_method(this, "_update_graph");
@@ -436,7 +436,7 @@ void VisualShaderEditor::_port_edited() {
Ref<VisualShaderNode> vsn = visual_shader->get_node(type, editing_node);
ERR_FAIL_COND(!vsn.is_valid());
- undo_redo->create_action("Set Input Default Port");
+ undo_redo->create_action(TTR("Set Input Default Port"));
undo_redo->add_do_method(vsn.ptr(), "set_input_port_default_value", editing_port, value);
undo_redo->add_undo_method(vsn.ptr(), "set_input_port_default_value", editing_port, vsn->get_input_port_default_value(editing_port));
undo_redo->add_do_method(this, "_update_graph");
@@ -487,7 +487,7 @@ void VisualShaderEditor::_add_node(int p_idx) {
int id_to_use = visual_shader->get_valid_node_id(type);
- undo_redo->create_action("Add Node to Visual Shader");
+ undo_redo->create_action(TTR("Add Node to Visual Shader"));
undo_redo->add_do_method(visual_shader.ptr(), "add_node", type, vsnode, position, id_to_use);
undo_redo->add_undo_method(visual_shader.ptr(), "remove_node", type, id_to_use);
undo_redo->add_do_method(this, "_update_graph");
@@ -500,7 +500,7 @@ void VisualShaderEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_t
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
updating = true;
- undo_redo->create_action("Node Moved");
+ undo_redo->create_action(TTR("Node Moved"));
undo_redo->add_do_method(visual_shader.ptr(), "set_node_position", type, p_node, p_to);
undo_redo->add_undo_method(visual_shader.ptr(), "set_node_position", type, p_node, p_from);
undo_redo->add_do_method(this, "_update_graph");
@@ -521,7 +521,7 @@ void VisualShaderEditor::_connection_request(const String &p_from, int p_from_in
return;
}
- undo_redo->create_action("Nodes Connected");
+ undo_redo->create_action(TTR("Nodes Connected"));
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
@@ -550,7 +550,7 @@ void VisualShaderEditor::_disconnection_request(const String &p_from, int p_from
int to = p_to.to_int();
//updating = true; seems graph edit can handle this, no need to protect
- undo_redo->create_action("Nodes Disconnected");
+ undo_redo->create_action(TTR("Nodes Disconnected"));
undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from, p_from_index, to, p_to_index);
undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, from, p_from_index, to, p_to_index);
undo_redo->add_do_method(this, "_update_graph");
@@ -566,7 +566,7 @@ void VisualShaderEditor::_delete_request(int which) {
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
- undo_redo->create_action("Delete Node");
+ undo_redo->create_action(TTR("Delete Node"));
undo_redo->add_do_method(visual_shader.ptr(), "remove_node", type, which);
undo_redo->add_undo_method(visual_shader.ptr(), "add_node", type, visual_shader->get_node(type, which), visual_shader->get_node_position(type, which), which);
@@ -671,7 +671,7 @@ void VisualShaderEditor::_duplicate_nodes() {
if (nodes.empty())
return;
- undo_redo->create_action("Duplicate Nodes");
+ undo_redo->create_action(TTR("Duplicate Nodes"));
int base_id = visual_shader->get_valid_node_id(type);
int id_from = base_id;
@@ -732,7 +732,7 @@ void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> input, St
bool type_changed = input->get_input_type_by_name(name) != input->get_input_type_by_name(prev_name);
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
- undo_redo->create_action("Visual Shader Input Type Changed");
+ undo_redo->create_action(TTR("Visual Shader Input Type Changed"));
undo_redo->add_do_method(input.ptr(), "set_input_name", name);
undo_redo->add_undo_method(input.ptr(), "set_input_name", prev_name);
@@ -972,7 +972,7 @@ public:
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
updating = true;
- undo_redo->create_action("Edit Visual Property: " + prop, UndoRedo::MERGE_ENDS);
+ undo_redo->create_action(TTR("Edit Visual Property") + ": " + prop, UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(node.ptr(), prop, p_value);
undo_redo->add_undo_property(node.ptr(), prop, node->get(prop));
undo_redo->commit_action();
@@ -1093,7 +1093,7 @@ void EditorPropertyShaderMode::_option_selected(int p_which) {
return;
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
- undo_redo->create_action("Visual Shader Mode Changed");
+ undo_redo->create_action(TTR("Visual Shader Mode Changed"));
//do is easy
undo_redo->add_do_method(visual_shader.ptr(), "set_mode", p_which);
undo_redo->add_undo_method(visual_shader.ptr(), "set_mode", visual_shader->get_mode());
@@ -1116,8 +1116,8 @@ void EditorPropertyShaderMode::_option_selected(int p_which) {
VisualShader::Type type = VisualShader::Type(i);
Vector<int> nodes = visual_shader->get_node_list(type);
- for (int i = 0; i < nodes.size(); i++) {
- Ref<VisualShaderNodeInput> input = visual_shader->get_node(type, nodes[i]);
+ for (int j = 0; j < nodes.size(); j++) {
+ Ref<VisualShaderNodeInput> input = visual_shader->get_node(type, nodes[j]);
if (!input.is_valid()) {
continue;
}
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index ec64d76b18..82a6a07805 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -972,10 +972,15 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
Error err = platform->export_project(current, export_debug->is_pressed(), p_path, 0);
if (err != OK) {
- error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " " + platform->get_name());
+ if (err == ERR_FILE_NOT_FOUND) {
+ error_dialog->set_text(vformat(TTR("Failed to export the project for platform '%s'.\nExport templates seem to be missing or invalid."), platform->get_name()));
+ } else { // Assume misconfiguration. FIXME: Improve error handling and preset config validation.
+ error_dialog->set_text(vformat(TTR("Failed to export the project for platform '%s'.\nThis might be due to a configuration issue in the export preset or your export settings."), platform->get_name()));
+ }
+
+ ERR_PRINTS(vformat("Failed to export the project for platform '%s'.", platform->get_name()));
error_dialog->show();
error_dialog->popup_centered_minsize(Size2(300, 80));
- ERR_PRINT("Failed to export project");
}
}
@@ -1007,7 +1012,11 @@ void ProjectExportDialog::_export_all(bool p_debug) {
Error err = platform->export_project(preset, p_debug, preset->get_export_path(), 0);
if (err != OK) {
- error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " " + platform->get_name());
+ if (err == ERR_FILE_BAD_PATH) {
+ error_dialog->set_text(TTR("The given export path doesn't exist:") + "\n" + preset->get_export_path().get_base_dir());
+ } else {
+ error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " " + platform->get_name());
+ }
error_dialog->show();
error_dialog->popup_centered_minsize(Size2(300, 80));
ERR_PRINT("Failed to export project");
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 7ce4029476..a3bcfa6e70 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -434,22 +434,22 @@ private:
if (mode == MODE_RENAME) {
- String dir = _test_path();
- if (dir == "") {
+ String dir2 = _test_path();
+ if (dir2 == "") {
set_message(TTR("Invalid project path (changed anything?)."), MESSAGE_ERROR);
return;
}
ProjectSettings *current = memnew(ProjectSettings);
- int err = current->setup(dir, "");
+ int err = current->setup(dir2, "");
if (err != OK) {
set_message(vformat(TTR("Couldn't load project.godot in project path (error %d). It may be missing or corrupted."), err), MESSAGE_ERROR);
} else {
ProjectSettings::CustomMap edited_settings;
edited_settings["application/config/name"] = project_name->get_text();
- if (current->save_custom(dir.plus_file("project.godot"), edited_settings, Vector<String>(), true) != OK) {
+ if (current->save_custom(dir2.plus_file("project.godot"), edited_settings, Vector<String>(), true) != OK) {
set_message(TTR("Couldn't edit project.godot in project path."), MESSAGE_ERROR);
}
}
@@ -1422,6 +1422,7 @@ void ProjectManager::_on_projects_updated() {
}
void ProjectManager::_on_project_created(const String &dir) {
+ project_filter->clear();
bool has_already = false;
for (int i = 0; i < scroll_children->get_child_count(); i++) {
HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_children->get_child(i));
@@ -1526,6 +1527,13 @@ void ProjectManager::_open_selected_projects_ask() {
}
int config_version = (int)cf->get_value("", "config_version", 0);
+
+ // Check if the config_version property was empty or 0
+ if (config_version == 0) {
+ ask_update_settings->set_text(vformat(TTR("The following project settings file does not specify the version of Godot through which it was created.\n\n%s\n\nIf you proceed with opening it, it will be converted to Godot's current configuration file format.\nWarning: You will not be able to open the project with previous versions of the engine anymore."), conf));
+ ask_update_settings->popup_centered_minsize();
+ return;
+ }
// Check if we need to convert project settings from an earlier engine version
if (config_version < ProjectSettings::CONFIG_VERSION) {
ask_update_settings->set_text(vformat(TTR("The following project settings file was generated by an older engine version, and needs to be converted for this version:\n\n%s\n\nDo you want to convert it?\nWarning: You will not be able to open the project with previous versions of the engine anymore."), conf));
@@ -1888,13 +1896,12 @@ ProjectManager::ProjectManager() {
Panel *panel = memnew(Panel);
gui_base->add_child(panel);
panel->set_anchors_and_margins_preset(Control::PRESET_WIDE);
+ panel->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
VBoxContainer *vb = memnew(VBoxContainer);
panel->add_child(vb);
- vb->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 20 * EDSCALE);
- vb->set_margin(MARGIN_TOP, 4 * EDSCALE);
- vb->set_margin(MARGIN_BOTTOM, -4 * EDSCALE);
- vb->add_constant_override("separation", 15 * EDSCALE);
+ vb->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 8 * EDSCALE);
+ vb->add_constant_override("separation", 8 * EDSCALE);
String cp;
cp += 0xA9;
@@ -1902,11 +1909,9 @@ ProjectManager::ProjectManager() {
HBoxContainer *top_hb = memnew(HBoxContainer);
vb->add_child(top_hb);
- CenterContainer *ccl = memnew(CenterContainer);
Label *l = memnew(Label);
l->set_text(VERSION_NAME + String(" - ") + TTR("Project Manager"));
- ccl->add_child(l);
- top_hb->add_child(ccl);
+ top_hb->add_child(l);
top_hb->add_spacer();
l = memnew(Label);
String hash = String(VERSION_HASH);
@@ -2053,6 +2058,8 @@ ProjectManager::ProjectManager() {
settings_hb->set_h_grow_direction(Control::GROW_DIRECTION_BEGIN);
language_btn = memnew(OptionButton);
+ language_btn->set_flat(true);
+ language_btn->set_focus_mode(Control::FOCUS_NONE);
Vector<String> editor_languages;
List<PropertyInfo> editor_settings_properties;
@@ -2230,3 +2237,9 @@ ProjectListFilter::ProjectListFilter() {
has_search_box = false;
}
+
+void ProjectListFilter::clear() {
+ if (has_search_box) {
+ search_box->clear();
+ }
+}
diff --git a/editor/project_manager.h b/editor/project_manager.h
index 6eb55871e4..1fdd7dbe06 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -154,6 +154,7 @@ public:
FilterOption get_filter_option();
void set_filter_option(FilterOption);
ProjectListFilter();
+ void clear();
};
#endif // PROJECT_MANAGER_H
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index cc33550ac9..21ba6efb82 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -703,7 +703,7 @@ void ProjectSettingsEditor::_update_actions() {
item->add_button(2, get_icon("Add", "EditorIcons"), 1, false, TTR("Add Event"));
if (!ProjectSettings::get_singleton()->get_input_presets().find(pi.name)) {
item->add_button(2, get_icon("Remove", "EditorIcons"), 2, false, TTR("Remove"));
- item->set_editable(2, true);
+ item->set_editable(0, true);
}
for (int i = 0; i < events.size(); i++) {
@@ -712,7 +712,7 @@ void ProjectSettingsEditor::_update_actions() {
if (event.is_null())
continue;
- TreeItem *action = input_editor->create_item(item);
+ TreeItem *action2 = input_editor->create_item(item);
Ref<InputEventKey> k = event;
if (k.is_valid()) {
@@ -727,8 +727,8 @@ void ProjectSettingsEditor::_update_actions() {
if (k->get_control())
str = TTR("Control+") + str;
- action->set_text(0, str);
- action->set_icon(0, get_icon("Keyboard", "EditorIcons"));
+ action2->set_text(0, str);
+ action2->set_icon(0, get_icon("Keyboard", "EditorIcons"));
}
Ref<InputEventJoypadButton> jb = event;
@@ -741,8 +741,8 @@ void ProjectSettingsEditor::_update_actions() {
else
str += ".";
- action->set_text(0, str);
- action->set_icon(0, get_icon("JoyButton", "EditorIcons"));
+ action2->set_text(0, str);
+ action2->set_icon(0, get_icon("JoyButton", "EditorIcons"));
}
Ref<InputEventMouseButton> mb = event;
@@ -758,8 +758,8 @@ void ProjectSettingsEditor::_update_actions() {
default: str += TTR("Button") + " " + itos(mb->get_button_index()) + ".";
}
- action->set_text(0, str);
- action->set_icon(0, get_icon("Mouse", "EditorIcons"));
+ action2->set_text(0, str);
+ action2->set_icon(0, get_icon("Mouse", "EditorIcons"));
}
Ref<InputEventJoypadMotion> jm = event;
@@ -770,14 +770,14 @@ void ProjectSettingsEditor::_update_actions() {
int n = 2 * ax + (jm->get_axis_value() < 0 ? 0 : 1);
String desc = _axis_names[n];
String str = _get_device_string(jm->get_device()) + ", " + TTR("Axis") + " " + itos(ax) + " " + (jm->get_axis_value() < 0 ? "-" : "+") + desc + ".";
- action->set_text(0, str);
- action->set_icon(0, get_icon("JoyAxis", "EditorIcons"));
+ action2->set_text(0, str);
+ action2->set_icon(0, get_icon("JoyAxis", "EditorIcons"));
}
- action->set_metadata(0, i);
- action->set_meta("__input", event);
+ action2->set_metadata(0, i);
+ action2->set_meta("__input", event);
- action->add_button(2, get_icon("Edit", "EditorIcons"), 3, false, TTR("Edit"));
- action->add_button(2, get_icon("Remove", "EditorIcons"), 2, false, TTR("Remove"));
+ action2->add_button(2, get_icon("Edit", "EditorIcons"), 3, false, TTR("Edit"));
+ action2->add_button(2, get_icon("Remove", "EditorIcons"), 2, false, TTR("Remove"));
}
}
@@ -1034,8 +1034,8 @@ void ProjectSettingsEditor::_copy_to_platform_about_to_show() {
String custom = EditorExport::get_singleton()->get_export_preset(i)->get_custom_features();
Vector<String> custom_list = custom.split(",");
- for (int i = 0; i < custom_list.size(); i++) {
- String f = custom_list[i].strip_edges();
+ for (int j = 0; j < custom_list.size(); j++) {
+ String f = custom_list[j].strip_edges();
if (f != String()) {
presets.insert(f);
}
@@ -1543,10 +1543,10 @@ void ProjectSettingsEditor::_update_translations() {
PoolStringArray selected = remaps[keys[i]];
for (int j = 0; j < selected.size(); j++) {
- String s = selected[j];
- int qp = s.find_last(":");
- String path = s.substr(0, qp);
- String locale = s.substr(qp + 1, s.length());
+ String s2 = selected[j];
+ int qp = s2.find_last(":");
+ String path = s2.substr(0, qp);
+ String locale = s2.substr(qp + 1, s2.length());
TreeItem *t2 = translation_remap_options->create_item(root2);
t2->set_editable(0, false);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 46e2bb18fe..c45a97800c 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -905,8 +905,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
List<StringName> inheritors;
ClassDB::get_inheriters_from_class(base.strip_edges(), &inheritors);
- for (int i = 0; i < custom_resources.size(); i++) {
- inheritors.push_back(custom_resources[i].name);
+ for (int j = 0; j < custom_resources.size(); j++) {
+ inheritors.push_back(custom_resources[j].name);
}
List<StringName>::Element *E = inheritors.front();
@@ -915,17 +915,17 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
E = E->next();
}
- for (Set<String>::Element *E = valid_inheritors.front(); E; E = E->next()) {
- String t = E->get();
+ for (Set<String>::Element *j = valid_inheritors.front(); j; j = j->next()) {
+ String t = j->get();
bool is_custom_resource = false;
Ref<Texture> icon;
if (!custom_resources.empty()) {
- for (int i = 0; i < custom_resources.size(); i++) {
- if (custom_resources[i].name == t) {
+ for (int k = 0; k < custom_resources.size(); k++) {
+ if (custom_resources[k].name == t) {
is_custom_resource = true;
- if (custom_resources[i].icon.is_valid())
- icon = custom_resources[i].icon;
+ if (custom_resources[k].icon.is_valid())
+ icon = custom_resources[k].icon;
break;
}
}
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 738d747956..19b46ef90f 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -336,9 +336,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_ATTACH_SCRIPT: {
+ List<Node *> selection = editor_selection->get_selected_node_list();
+ if (selection.empty())
+ break;
+
Node *selected = scene_tree->get_selected();
if (!selected)
- break;
+ selected = selection.front()->get();
Ref<Script> existing = selected->get_script();
@@ -373,7 +377,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_CLEAR_SCRIPT: {
- List<Node *> selection = editor_selection->get_selected_node_list();
+ Array selection = editor_selection->get_selected_nodes();
if (selection.empty())
return;
@@ -381,13 +385,14 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().create_action(TTR("Clear Script"));
editor_data->get_undo_redo().add_do_method(editor, "push_item", (Script *)NULL);
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ for (int i = 0; i < selection.size(); i++) {
- Ref<Script> existing = E->get()->get_script();
+ Node *n = Object::cast_to<Node>(selection[i]);
+ Ref<Script> existing = n->get_script();
if (existing.is_valid()) {
const RefPtr empty;
- editor_data->get_undo_redo().add_do_method(E->get(), "set_script", empty);
- editor_data->get_undo_redo().add_undo_method(E->get(), "set_script", existing);
+ editor_data->get_undo_redo().add_do_method(n, "set_script", empty);
+ editor_data->get_undo_redo().add_undo_method(n, "set_script", existing);
}
}
@@ -583,7 +588,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
return;
}
- editor_data->get_undo_redo().create_action("Make node as Root");
+ editor_data->get_undo_redo().create_action(TTR("Make node as Root"));
editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node);
editor_data->get_undo_redo().add_do_method(root->get_parent(), "remove_child", root);
editor_data->get_undo_redo().add_do_method(node, "add_child", root);
@@ -823,7 +828,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (TOOL_CREATE_FAVORITE == p_tool) {
String name = selected_favorite_root.get_slicec(' ', 0);
if (ScriptServer::is_global_class(name)) {
- new_node = Object::cast_to<Node>(ClassDB::instance(ScriptServer::get_global_class_base(name)));
+ new_node = Object::cast_to<Node>(ClassDB::instance(ScriptServer::get_global_class_native_base(name)));
Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(name), "Script");
if (new_node && script.is_valid()) {
new_node->set_script(script.get_ref_ptr());
@@ -849,7 +854,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
}
- editor_data->get_undo_redo().create_action("New Scene Root");
+ editor_data->get_undo_redo().create_action(TTR("New Scene Root"));
editor_data->get_undo_redo().add_do_method(editor, "set_edited_scene", new_node);
editor_data->get_undo_redo().add_do_method(scene_tree, "update_tree");
editor_data->get_undo_redo().add_do_reference(new_node);
@@ -1152,17 +1157,17 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
if (p.get_type() == Variant::NODE_PATH) {
// Goes through all paths to check if its matching
- for (List<Pair<NodePath, NodePath> >::Element *E = p_renames->front(); E; E = E->next()) {
+ for (List<Pair<NodePath, NodePath> >::Element *F = p_renames->front(); F; F = F->next()) {
NodePath root_path = p_base->get_path();
- NodePath rel_path_old = root_path.rel_path_to(E->get().first);
+ NodePath rel_path_old = root_path.rel_path_to(F->get().first);
- NodePath rel_path_new = E->get().second;
+ NodePath rel_path_new = F->get().second;
// if not empty, get new relative path
- if (E->get().second != NodePath()) {
- rel_path_new = root_path.rel_path_to(E->get().second);
+ if (F->get().second != NodePath()) {
+ rel_path_new = root_path.rel_path_to(F->get().second);
}
// if old path detected, then it needs to be replaced with the new one
@@ -1233,11 +1238,11 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
if (!ran.has(i))
continue; //channel was removed
- for (List<Pair<NodePath, NodePath> >::Element *E = p_renames->front(); E; E = E->next()) {
+ for (List<Pair<NodePath, NodePath> >::Element *F = p_renames->front(); F; F = F->next()) {
- if (E->get().first == old_np) {
+ if (F->get().first == old_np) {
- if (E->get().second == NodePath()) {
+ if (F->get().second == NodePath()) {
//will be erased
int idx = 0;
@@ -1262,7 +1267,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
} else {
//will be renamed
- NodePath rel_path = new_root_path.rel_path_to(E->get().second);
+ NodePath rel_path = new_root_path.rel_path_to(F->get().second);
NodePath new_path = NodePath(rel_path.get_names(), track_np.get_subnames(), false);
if (new_path == track_np)
@@ -1602,9 +1607,9 @@ void SceneTreeDock::_delete_confirm() {
List<Node *> owned;
n->get_owned_by(n->get_owner(), &owned);
Array owners;
- for (List<Node *>::Element *E = owned.front(); E; E = E->next()) {
+ for (List<Node *>::Element *F = owned.front(); F; F = F->next()) {
- owners.push_back(E->get());
+ owners.push_back(F->get());
}
editor_data->get_undo_redo().add_do_method(n->get_parent(), "remove_child", n);
@@ -1649,9 +1654,9 @@ void SceneTreeDock::_update_script_button() {
}
} else {
button_create_script->show();
- List<Node *> selection = EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list();
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Node *n = E->get();
+ Array selection = editor_selection->get_selected_nodes();
+ for (int i = 0; i < selection.size(); i++) {
+ Node *n = Object::cast_to<Node>(selection[i]);
if (!n->get_script().is_null()) {
button_clear_script->show();
return;
@@ -2290,7 +2295,7 @@ void SceneTreeDock::_update_create_root_dialog() {
button->set_text(TTR(l));
String name = l.get_slicec(' ', 0);
if (ScriptServer::is_global_class(name))
- name = ScriptServer::get_global_class_base(name);
+ name = ScriptServer::get_global_class_native_base(name);
button->set_icon(EditorNode::get_singleton()->get_class_icon(name));
button->connect("pressed", this, "_favorite_root_selected", make_binds(l));
}
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 6602d2974f..8cfc6d4e8e 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -549,32 +549,28 @@ void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_
void SceneTreeEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE) {
-
- get_tree()->connect("tree_changed", this, "_tree_changed");
- get_tree()->connect("node_removed", this, "_node_removed");
- get_tree()->connect("node_configuration_warning_changed", this, "_warning_changed");
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
- tree->connect("item_collapsed", this, "_cell_collapsed");
+ get_tree()->connect("tree_changed", this, "_tree_changed");
+ get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_configuration_warning_changed", this, "_warning_changed");
- EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
- _editor_settings_changed();
+ tree->connect("item_collapsed", this, "_cell_collapsed");
- //get_scene()->connect("tree_changed",this,"_tree_changed",Vector<Variant>(),CONNECT_DEFERRED);
- //get_scene()->connect("node_removed",this,"_node_removed",Vector<Variant>(),CONNECT_DEFERRED);
- _update_tree();
- }
- if (p_what == NOTIFICATION_EXIT_TREE) {
+ _update_tree();
+ } break;
+ case NOTIFICATION_EXIT_TREE: {
- get_tree()->disconnect("tree_changed", this, "_tree_changed");
- get_tree()->disconnect("node_removed", this, "_node_removed");
- tree->disconnect("item_collapsed", this, "_cell_collapsed");
- get_tree()->disconnect("node_configuration_warning_changed", this, "_warning_changed");
- EditorSettings::get_singleton()->disconnect("settings_changed", this, "_editor_settings_changed");
- }
- if (p_what == NOTIFICATION_THEME_CHANGED) {
+ get_tree()->disconnect("tree_changed", this, "_tree_changed");
+ get_tree()->disconnect("node_removed", this, "_node_removed");
+ tree->disconnect("item_collapsed", this, "_cell_collapsed");
+ get_tree()->disconnect("node_configuration_warning_changed", this, "_warning_changed");
+ } break;
+ case NOTIFICATION_THEME_CHANGED: {
- _update_tree();
+ _update_tree();
+ } break;
}
}
@@ -978,20 +974,6 @@ void SceneTreeEditor::_warning_changed(Node *p_for_node) {
update_timer->start();
}
-void SceneTreeEditor::_editor_settings_changed() {
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- tree->add_constant_override("draw_relationship_lines", 1);
- tree->add_color_override("relationship_line_color", rl_color);
- tree->add_constant_override("draw_guides", 0);
- } else {
- tree->add_constant_override("draw_relationship_lines", 0);
- tree->add_constant_override("draw_guides", 1);
- }
-}
-
void SceneTreeEditor::_bind_methods() {
ClassDB::bind_method("_tree_changed", &SceneTreeEditor::_tree_changed);
@@ -1012,8 +994,6 @@ void SceneTreeEditor::_bind_methods() {
ClassDB::bind_method("_node_script_changed", &SceneTreeEditor::_node_script_changed);
ClassDB::bind_method("_node_visibility_changed", &SceneTreeEditor::_node_visibility_changed);
- ClassDB::bind_method("_editor_settings_changed", &SceneTreeEditor::_editor_settings_changed);
-
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &SceneTreeEditor::drop_data_fw);
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 9b87c0981d..aa4d4dd58a 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -124,8 +124,6 @@ class SceneTreeEditor : public Control {
void _warning_changed(Node *p_for_node);
- void _editor_settings_changed();
-
Timer *update_timer;
List<StringName> *script_types;
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 6a3ed1c5e0..5ab0efaee3 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -255,8 +255,8 @@ void ScriptCreateDialog::_lang_changed(int l) {
// change extension by selected language
List<String> extensions;
// get all possible extensions for script
- for (int l = 0; l < language_menu->get_item_count(); l++) {
- ScriptServer::get_language(l)->get_recognized_extensions(&extensions);
+ for (int m = 0; m < language_menu->get_item_count(); m++) {
+ ScriptServer::get_language(m)->get_recognized_extensions(&extensions);
}
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index 5f6459045a..dda46d2414 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -777,7 +777,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
for (int i = 0; i < scc; i += 3) {
String script = p_data[2 + i];
- String method = p_data[3 + i];
+ String method2 = p_data[3 + i];
int line = p_data[4 + i];
TreeItem *stack_trace = error_tree->create_item(error);
@@ -791,7 +791,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
stack_trace->set_text_align(0, TreeItem::ALIGN_LEFT);
error->set_metadata(0, meta);
}
- stack_trace->set_text(1, script.get_file() + ":" + itos(line) + " @ " + method + "()");
+ stack_trace->set_text(1, script.get_file() + ":" + itos(line) + " @ " + method2 + "()");
}
if (warning)
@@ -859,18 +859,18 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
c.items.resize(values.size() / 2);
c.total_time = 0;
c.signature = "categ::" + name;
- for (int i = 0; i < values.size(); i += 2) {
+ for (int j = 0; j < values.size(); j += 2) {
EditorProfiler::Metric::Category::Item item;
item.calls = 1;
item.line = 0;
- item.name = values[i];
- item.self = values[i + 1];
+ item.name = values[j];
+ item.self = values[j + 1];
item.total = item.self;
item.signature = "categ::" + name + "::" + item.name;
item.name = item.name.capitalize();
c.total_time += item.total;
- c.items.write[i / 2] = item;
+ c.items.write[j / 2] = item;
}
metric.categories.push_back(c);
}
@@ -1002,13 +1002,13 @@ void ScriptEditorDebugger::_performance_draw() {
float m = perf_max[pi];
if (m == 0)
m = 0.00001;
- float h = E->get()[pi] / m;
- h = (1.0 - h) * r.size.y;
+ float h2 = E->get()[pi] / m;
+ h2 = (1.0 - h2) * r.size.y;
c.a = 0.7;
if (E != perf_history.front())
- perf_draw->draw_line(r.position + Point2(from, h), r.position + Point2(from + spacing, prev), c, 2.0);
- prev = h;
+ perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, 2.0);
+ prev = h2;
E = E->next();
from -= spacing;
}
@@ -1040,17 +1040,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
reason->add_color_override("font_color", get_color("error_color", "Editor"));
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- inspect_scene_tree->add_constant_override("draw_relationship_lines", 1);
- inspect_scene_tree->add_color_override("relationship_line_color", rl_color);
- inspect_scene_tree->add_constant_override("draw_guides", 0);
- } else {
- inspect_scene_tree->add_constant_override("draw_relationship_lines", 0);
- inspect_scene_tree->add_constant_override("draw_guides", 1);
- }
} break;
case NOTIFICATION_PROCESS: {
@@ -1084,19 +1073,19 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (error_count != last_error_count || warning_count != last_warning_count) {
if (error_count == 0 && warning_count == 0) {
- error_tree->set_name(TTR("Errors"));
+ errors_tab->set_name(TTR("Errors"));
debugger_button->set_text(TTR("Debugger"));
debugger_button->set_icon(Ref<Texture>());
- tabs->set_tab_icon(error_tree->get_index(), Ref<Texture>());
+ tabs->set_tab_icon(errors_tab->get_index(), Ref<Texture>());
} else {
- error_tree->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")");
+ errors_tab->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")");
debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")");
if (error_count == 0) {
debugger_button->set_icon(get_icon("Warning", "EditorIcons"));
- tabs->set_tab_icon(error_tree->get_index(), get_icon("Warning", "EditorIcons"));
+ tabs->set_tab_icon(errors_tab->get_index(), get_icon("Warning", "EditorIcons"));
} else {
debugger_button->set_icon(get_icon("Error", "EditorIcons"));
- tabs->set_tab_icon(error_tree->get_index(), get_icon("Error", "EditorIcons"));
+ tabs->set_tab_icon(errors_tab->get_index(), get_icon("Error", "EditorIcons"));
}
}
last_error_count = error_count;
@@ -1226,24 +1215,15 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (OS::get_singleton()->get_ticks_msec() > until)
break;
}
-
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+
tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles"));
tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles"));
tabs->set_margin(MARGIN_LEFT, -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
tabs->set_margin(MARGIN_RIGHT, EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- inspect_scene_tree->add_constant_override("draw_relationship_lines", 1);
- inspect_scene_tree->add_color_override("relationship_line_color", rl_color);
- } else
- inspect_scene_tree->add_constant_override("draw_relationship_lines", 0);
-
copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
step->set_icon(get_icon("DebugStep", "EditorIcons"));
next->set_icon(get_icon("DebugNext", "EditorIcons"));
@@ -1252,7 +1232,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
dobreak->set_icon(get_icon("Pause", "EditorIcons"));
docontinue->set_icon(get_icon("DebugContinue", "EditorIcons"));
vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
-
} break;
}
}
@@ -1536,14 +1515,14 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
int pathid = _get_res_path_cache(respath);
if (p_value.is_ref()) {
- Ref<Resource> res = p_value;
- if (res.is_valid() && res->get_path() != String()) {
+ Ref<Resource> res2 = p_value;
+ if (res2.is_valid() && res2->get_path() != String()) {
Array msg;
msg.push_back("live_res_prop_res");
msg.push_back(pathid);
msg.push_back(p_property);
- msg.push_back(res->get_path());
+ msg.push_back(res2->get_path());
ppeer->put_var(msg);
}
} else {
@@ -2054,11 +2033,11 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
}
{ //errors
- VBoxContainer *errvb = memnew(VBoxContainer);
- errvb->set_name(TTR("Errors"));
+ errors_tab = memnew(VBoxContainer);
+ errors_tab->set_name(TTR("Errors"));
HBoxContainer *errhb = memnew(HBoxContainer);
- errvb->add_child(errhb);
+ errors_tab->add_child(errhb);
Button *expand_all = memnew(Button);
expand_all->set_text(TTR("Expand All"));
@@ -2093,13 +2072,13 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
error_tree->set_v_size_flags(SIZE_EXPAND_FILL);
error_tree->set_allow_rmb_select(true);
error_tree->connect("item_rmb_selected", this, "_error_tree_item_rmb_selected");
- errvb->add_child(error_tree);
+ errors_tab->add_child(error_tree);
item_menu = memnew(PopupMenu);
item_menu->connect("id_pressed", this, "_item_menu_id_pressed");
error_tree->add_child(item_menu);
- tabs->add_child(errvb);
+ tabs->add_child(errors_tab);
}
{ // remote scene tree
diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h
index 49651ad9c9..fb1545559c 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/script_editor_debugger.h
@@ -87,7 +87,7 @@ class ScriptEditorDebugger : public Control {
Map<ObjectID, ScriptEditorDebuggerInspectedObject *> remote_objects;
Set<ObjectID> unfold_cache;
- HSplitContainer *error_split;
+ VBoxContainer *errors_tab;
Tree *error_tree;
Tree *inspect_scene_tree;
Button *clearbutton;
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index ecd35cb930..611067214d 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -282,7 +282,7 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
if (!sc.is_valid())
return; //pointless, there is nothing
- undo_redo->create_action("Erase Shortcut");
+ undo_redo->create_action(TTR("Erase Shortcut"));
undo_redo->add_do_method(sc.ptr(), "set_shortcut", Ref<InputEvent>());
undo_redo->add_undo_method(sc.ptr(), "set_shortcut", sc->get_shortcut());
undo_redo->add_do_method(this, "_update_shortcuts");
@@ -296,7 +296,7 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
Ref<InputEvent> original = sc->get_meta("original");
- undo_redo->create_action("Restore Shortcut");
+ undo_redo->create_action(TTR("Restore Shortcut"));
undo_redo->add_do_method(sc.ptr(), "set_shortcut", original);
undo_redo->add_undo_method(sc.ptr(), "set_shortcut", sc->get_shortcut());
undo_redo->add_do_method(this, "_update_shortcuts");
@@ -344,7 +344,7 @@ void EditorSettingsDialog::_press_a_key_confirm() {
Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(shortcut_configured);
- undo_redo->create_action("Change Shortcut '" + shortcut_configured + "'");
+ undo_redo->create_action(TTR("Change Shortcut") + " '" + shortcut_configured + "'");
undo_redo->add_do_method(sc.ptr(), "set_shortcut", ie);
undo_redo->add_undo_method(sc.ptr(), "set_shortcut", sc->get_shortcut());
undo_redo->add_do_method(this, "_update_shortcuts");
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index f62391e436..2e06a903aa 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -179,7 +179,7 @@ void EditorSpatialGizmo::Instance::create_instance(Spatial *p_base, bool p_hidde
VS::get_singleton()->instance_set_layer_mask(instance, layer); //gizmos are 26
}
-void EditorSpatialGizmo::add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard, const RID &p_skeleton) {
+void EditorSpatialGizmo::add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard, const RID &p_skeleton, const Ref<Material> &p_material) {
ERR_FAIL_COND(!spatial_node);
Instance ins;
@@ -187,9 +187,13 @@ void EditorSpatialGizmo::add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard
ins.billboard = p_billboard;
ins.mesh = p_mesh;
ins.skeleton = p_skeleton;
+ ins.material = p_material;
if (valid) {
ins.create_instance(spatial_node, hidden);
VS::get_singleton()->instance_set_transform(ins.instance, spatial_node->get_global_transform());
+ if (ins.material.is_valid()) {
+ VS::get_singleton()->instance_geometry_set_material_override(ins.instance, p_material->get_rid());
+ }
}
instances.push_back(ins);
@@ -551,7 +555,10 @@ bool EditorSpatialGizmo::intersect_ray(Camera *p_camera, const Point2 &p_point,
Transform t = spatial_node->get_global_transform();
t.orthonormalize();
- t.set_look_at(t.origin, p_camera->get_camera_transform().origin, Vector3(0, 1, 0));
+ Vector3 camera_position = p_camera->get_camera_transform().origin;
+ if (camera_position.distance_squared_to(t.origin) > 0.01) {
+ t.set_look_at(t.origin, camera_position, Vector3(0, 1, 0));
+ }
float scale = t.origin.distance_to(p_camera->get_camera_transform().origin);
@@ -563,16 +570,18 @@ bool EditorSpatialGizmo::intersect_ray(Camera *p_camera, const Point2 &p_point,
Point2 center = p_camera->unproject_position(t.origin);
- Transform oct = p_camera->get_camera_transform();
+ Transform orig_camera_transform = p_camera->get_camera_transform();
- p_camera->look_at(t.origin, Vector3(0, 1, 0));
+ if (orig_camera_transform.origin.distance_squared_to(t.origin) > 0.01) {
+ p_camera->look_at(t.origin, Vector3(0, 1, 0));
+ }
Vector3 c0 = t.xform(Vector3(selectable_icon_size, selectable_icon_size, 0) * scale);
Vector3 c1 = t.xform(Vector3(-selectable_icon_size, -selectable_icon_size, 0) * scale);
Point2 p0 = p_camera->unproject_position(c0);
Point2 p1 = p_camera->unproject_position(c1);
- p_camera->set_global_transform(oct);
+ p_camera->set_global_transform(orig_camera_transform);
Rect2 rect(p0, p1 - p0);
@@ -721,7 +730,7 @@ void EditorSpatialGizmo::set_plugin(EditorSpatialGizmoPlugin *p_plugin) {
void EditorSpatialGizmo::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_lines", "lines", "material", "billboard"), &EditorSpatialGizmo::add_lines, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("add_mesh", "mesh", "billboard", "skeleton"), &EditorSpatialGizmo::add_mesh, DEFVAL(false), DEFVAL(RID()));
+ ClassDB::bind_method(D_METHOD("add_mesh", "mesh", "billboard", "skeleton", "material"), &EditorSpatialGizmo::add_mesh, DEFVAL(false), DEFVAL(RID()), DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("add_collision_segments", "segments"), &EditorSpatialGizmo::add_collision_segments);
ClassDB::bind_method(D_METHOD("add_collision_triangles", "triangles"), &EditorSpatialGizmo::add_collision_triangles);
ClassDB::bind_method(D_METHOD("add_unscaled_billboard", "material", "default_scale"), &EditorSpatialGizmo::add_unscaled_billboard, DEFVAL(1));
@@ -796,6 +805,10 @@ String LightSpatialGizmoPlugin::get_name() const {
return "Lights";
}
+int LightSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
String LightSpatialGizmoPlugin::get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const {
if (p_idx == 0)
@@ -1053,6 +1066,10 @@ String AudioStreamPlayer3DSpatialGizmoPlugin::get_name() const {
return "AudioStreamPlayer3D";
}
+int AudioStreamPlayer3DSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
String AudioStreamPlayer3DSpatialGizmoPlugin::get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const {
return "Emission Radius";
@@ -1193,6 +1210,10 @@ String CameraSpatialGizmoPlugin::get_name() const {
return "Camera";
}
+int CameraSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
String CameraSpatialGizmoPlugin::get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const {
Camera *camera = Object::cast_to<Camera>(p_gizmo->get_spatial_node());
@@ -1230,8 +1251,8 @@ void CameraSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, int p_idx
Vector3 s[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
if (camera->get_projection() == Camera::PROJECTION_PERSPECTIVE) {
- Transform gt = camera->get_global_transform();
- float a = _find_closest_angle_to_half_pi_arc(s[0], s[1], 1.0, gt);
+ Transform gt2 = camera->get_global_transform();
+ float a = _find_closest_angle_to_half_pi_arc(s[0], s[1], 1.0, gt2);
camera->set("fov", a * 2.0);
} else {
@@ -1416,6 +1437,10 @@ String MeshInstanceSpatialGizmoPlugin::get_name() const {
return "MeshInstance";
}
+int MeshInstanceSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
bool MeshInstanceSpatialGizmoPlugin::can_be_hidden() const {
return false;
}
@@ -1449,6 +1474,10 @@ String Sprite3DSpatialGizmoPlugin::get_name() const {
return "Sprite3D";
}
+int Sprite3DSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
bool Sprite3DSpatialGizmoPlugin::can_be_hidden() const {
return false;
}
@@ -1508,6 +1537,10 @@ String Position3DSpatialGizmoPlugin::get_name() const {
return "Position3D";
}
+int Position3DSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void Position3DSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
p_gizmo->clear();
@@ -1531,6 +1564,10 @@ String SkeletonSpatialGizmoPlugin::get_name() const {
return "Skeleton";
}
+int SkeletonSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void SkeletonSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Skeleton *skel = Object::cast_to<Skeleton>(p_gizmo->get_spatial_node());
@@ -1734,6 +1771,10 @@ String PhysicalBoneSpatialGizmoPlugin::get_name() const {
return "PhysicalBones";
}
+int PhysicalBoneSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void PhysicalBoneSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
p_gizmo->clear();
@@ -1973,6 +2014,10 @@ String RayCastSpatialGizmoPlugin::get_name() const {
return "RayCast";
}
+int RayCastSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void RayCastSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
RayCast *raycast = Object::cast_to<RayCast>(p_gizmo->get_spatial_node());
@@ -2022,6 +2067,10 @@ String SpringArmSpatialGizmoPlugin::get_name() const {
return "SpringArm";
}
+int SpringArmSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
/////
VehicleWheelSpatialGizmoPlugin::VehicleWheelSpatialGizmoPlugin() {
@@ -2038,6 +2087,10 @@ String VehicleWheelSpatialGizmoPlugin::get_name() const {
return "VehicleWheel";
}
+int VehicleWheelSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void VehicleWheelSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
VehicleWheel *car_wheel = Object::cast_to<VehicleWheel>(p_gizmo->get_spatial_node());
@@ -2108,6 +2161,10 @@ String SoftBodySpatialGizmoPlugin::get_name() const {
return "SoftBody";
}
+int SoftBodySpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
bool SoftBodySpatialGizmoPlugin::is_selectable_when_hidden() const {
return true;
}
@@ -2180,6 +2237,10 @@ String VisibilityNotifierGizmoPlugin::get_name() const {
return "VisibilityNotifier";
}
+int VisibilityNotifierGizmoPlugin::get_priority() const {
+ return -1;
+}
+
String VisibilityNotifierGizmoPlugin::get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const {
switch (p_idx) {
@@ -2330,6 +2391,10 @@ String ParticlesGizmoPlugin::get_name() const {
return "Particles";
}
+int ParticlesGizmoPlugin::get_priority() const {
+ return -1;
+}
+
bool ParticlesGizmoPlugin::is_selectable_when_hidden() const {
return true;
}
@@ -2409,8 +2474,8 @@ void ParticlesGizmoPlugin::commit_handle(EditorSpatialGizmo *p_gizmo, int p_idx,
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
ur->create_action(TTR("Change Particles AABB"));
- ur->add_do_method(particles, "set_custom_aabb", particles->get_visibility_aabb());
- ur->add_undo_method(particles, "set_custom_aabb", p_restore);
+ ur->add_do_method(particles, "set_visibility_aabb", particles->get_visibility_aabb());
+ ur->add_undo_method(particles, "set_visibility_aabb", p_restore);
ur->commit_action();
}
@@ -2489,6 +2554,10 @@ String ReflectionProbeGizmoPlugin::get_name() const {
return "ReflectionProbe";
}
+int ReflectionProbeGizmoPlugin::get_priority() const {
+ return -1;
+}
+
String ReflectionProbeGizmoPlugin::get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const {
switch (p_idx) {
@@ -2665,6 +2734,10 @@ String GIProbeGizmoPlugin::get_name() const {
return "GIProbe";
}
+int GIProbeGizmoPlugin::get_priority() const {
+ return -1;
+}
+
String GIProbeGizmoPlugin::get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const {
switch (p_idx) {
@@ -2899,6 +2972,10 @@ String BakedIndirectLightGizmoPlugin::get_name() const {
return "BakedLightmap";
}
+int BakedIndirectLightGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void BakedIndirectLightGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
BakedLightmap *baker = Object::cast_to<BakedLightmap>(p_gizmo->get_spatial_node());
@@ -2956,6 +3033,10 @@ String CollisionShapeSpatialGizmoPlugin::get_name() const {
return "CollisionShape";
}
+int CollisionShapeSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
String CollisionShapeSpatialGizmoPlugin::get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const {
const CollisionShape *cs = Object::cast_to<CollisionShape>(p_gizmo->get_spatial_node());
@@ -3014,20 +3095,20 @@ Variant CollisionShapeSpatialGizmoPlugin::get_handle_value(EditorSpatialGizmo *p
if (Object::cast_to<CapsuleShape>(*s)) {
- Ref<CapsuleShape> cs = s;
- return p_idx == 0 ? cs->get_radius() : cs->get_height();
+ Ref<CapsuleShape> cs2 = s;
+ return p_idx == 0 ? cs2->get_radius() : cs2->get_height();
}
if (Object::cast_to<CylinderShape>(*s)) {
- Ref<CylinderShape> cs = s;
- return p_idx == 0 ? cs->get_radius() : cs->get_height();
+ Ref<CylinderShape> cs2 = s;
+ return p_idx == 0 ? cs2->get_radius() : cs2->get_height();
}
if (Object::cast_to<RayShape>(*s)) {
- Ref<RayShape> cs = s;
- return cs->get_length();
+ Ref<RayShape> cs2 = s;
+ return cs2->get_length();
}
return Variant();
@@ -3093,26 +3174,26 @@ void CollisionShapeSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, i
Vector3 axis;
axis[p_idx == 0 ? 0 : 2] = 1.0;
- Ref<CapsuleShape> cs = s;
+ Ref<CapsuleShape> cs2 = s;
Vector3 ra, rb;
Geometry::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
float d = axis.dot(ra);
if (p_idx == 1)
- d -= cs->get_radius();
+ d -= cs2->get_radius();
if (d < 0.001)
d = 0.001;
if (p_idx == 0)
- cs->set_radius(d);
+ cs2->set_radius(d);
else if (p_idx == 1)
- cs->set_height(d * 2.0);
+ cs2->set_height(d * 2.0);
}
if (Object::cast_to<CylinderShape>(*s)) {
Vector3 axis;
axis[p_idx == 0 ? 0 : 1] = 1.0;
- Ref<CylinderShape> cs = s;
+ Ref<CylinderShape> cs2 = s;
Vector3 ra, rb;
Geometry::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
float d = axis.dot(ra);
@@ -3121,9 +3202,9 @@ void CollisionShapeSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, i
d = 0.001;
if (p_idx == 0)
- cs->set_radius(d);
+ cs2->set_radius(d);
else if (p_idx == 1)
- cs->set_height(d * 2.0);
+ cs2->set_height(d * 2.0);
}
}
void CollisionShapeSpatialGizmoPlugin::commit_handle(EditorSpatialGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
@@ -3323,9 +3404,9 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
if (Object::cast_to<CapsuleShape>(*s)) {
- Ref<CapsuleShape> cs = s;
- float radius = cs->get_radius();
- float height = cs->get_height();
+ Ref<CapsuleShape> cs2 = s;
+ float radius = cs2->get_radius();
+ float height = cs2->get_height();
Vector<Vector3> points;
@@ -3391,16 +3472,16 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
p_gizmo->add_collision_segments(collision_segments);
Vector<Vector3> handles;
- handles.push_back(Vector3(cs->get_radius(), 0, 0));
- handles.push_back(Vector3(0, 0, cs->get_height() * 0.5 + cs->get_radius()));
+ handles.push_back(Vector3(cs2->get_radius(), 0, 0));
+ handles.push_back(Vector3(0, 0, cs2->get_height() * 0.5 + cs2->get_radius()));
p_gizmo->add_handles(handles, handles_material);
}
if (Object::cast_to<CylinderShape>(*s)) {
- Ref<CylinderShape> cs = s;
- float radius = cs->get_radius();
- float height = cs->get_height();
+ Ref<CylinderShape> cs2 = s;
+ float radius = cs2->get_radius();
+ float height = cs2->get_height();
Vector<Vector3> points;
@@ -3452,8 +3533,8 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
p_gizmo->add_collision_segments(collision_segments);
Vector<Vector3> handles;
- handles.push_back(Vector3(cs->get_radius(), 0, 0));
- handles.push_back(Vector3(0, cs->get_height() * 0.5, 0));
+ handles.push_back(Vector3(cs2->get_radius(), 0, 0));
+ handles.push_back(Vector3(0, cs2->get_height() * 0.5, 0));
p_gizmo->add_handles(handles, handles_material);
}
@@ -3498,25 +3579,24 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Geometry::MeshData md;
Error err = QuickHull::build(varr, md);
if (err == OK) {
- Vector<Vector3> points;
- points.resize(md.edges.size() * 2);
+ Vector<Vector3> points2;
+ points2.resize(md.edges.size() * 2);
for (int i = 0; i < md.edges.size(); i++) {
- points.write[i * 2 + 0] = md.vertices[md.edges[i].a];
- points.write[i * 2 + 1] = md.vertices[md.edges[i].b];
+ points2.write[i * 2 + 0] = md.vertices[md.edges[i].a];
+ points2.write[i * 2 + 1] = md.vertices[md.edges[i].b];
}
- p_gizmo->add_lines(points, material);
- p_gizmo->add_collision_segments(points);
+ p_gizmo->add_lines(points2, material);
+ p_gizmo->add_collision_segments(points2);
}
}
}
if (Object::cast_to<ConcavePolygonShape>(*s)) {
- Ref<ConcavePolygonShape> cs = s;
- Ref<ArrayMesh> mesh = cs->get_debug_mesh()->duplicate();
- mesh->surface_set_material(0, material);
- p_gizmo->add_mesh(mesh);
+ Ref<ConcavePolygonShape> cs2 = s;
+ Ref<ArrayMesh> mesh = cs2->get_debug_mesh();
+ p_gizmo->add_mesh(mesh, false, RID(), material);
}
if (Object::cast_to<RayShape>(*s)) {
@@ -3549,6 +3629,10 @@ String CollisionPolygonSpatialGizmoPlugin::get_name() const {
return "CollisionPolygon";
}
+int CollisionPolygonSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void CollisionPolygonSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
CollisionPolygon *polygon = Object::cast_to<CollisionPolygon>(p_gizmo->get_spatial_node());
@@ -3579,10 +3663,10 @@ void CollisionPolygonSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
////
NavigationMeshSpatialGizmoPlugin::NavigationMeshSpatialGizmoPlugin() {
- create_material("navigation_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge", Color(0.5, 1, 1)));
- create_material("navigation_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge_disabled", Color(0.7, 0.7, 0.7)));
- create_material("navigation_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid", Color(0.5, 1, 1, 0.4)));
- create_material("navigation_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid_disabled", Color(0.7, 0.7, 0.7, 0.4)));
+ create_material("navigation_edge_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge", Color(0.5, 1, 1)));
+ create_material("navigation_edge_material_disabled", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge_disabled", Color(0.7, 0.7, 0.7)));
+ create_material("navigation_solid_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid", Color(0.5, 1, 1, 0.4)));
+ create_material("navigation_solid_material_disabled", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid_disabled", Color(0.7, 0.7, 0.7, 0.4)));
}
bool NavigationMeshSpatialGizmoPlugin::has_gizmo(Spatial *p_spatial) {
@@ -3593,14 +3677,18 @@ String NavigationMeshSpatialGizmoPlugin::get_name() const {
return "NavigationMeshInstance";
}
+int NavigationMeshSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void NavigationMeshSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
NavigationMeshInstance *navmesh = Object::cast_to<NavigationMeshInstance>(p_gizmo->get_spatial_node());
- Ref<Material> edge_material = get_material("navigation_material", p_gizmo);
- Ref<Material> edge_material_disabled = get_material("navigation_material", p_gizmo);
- Ref<Material> solid_material = get_material("navigation_material", p_gizmo);
- Ref<Material> solid_material_disabled = get_material("navigation_material", p_gizmo);
+ Ref<Material> edge_material = get_material("navigation_edge_material", p_gizmo);
+ Ref<Material> edge_material_disabled = get_material("navigation_edge_material_disabled", p_gizmo);
+ Ref<Material> solid_material = get_material("navigation_solid_material", p_gizmo);
+ Ref<Material> solid_material_disabled = get_material("navigation_solid_material_disabled", p_gizmo);
p_gizmo->clear();
Ref<NavigationMesh> navmeshie = navmesh->get_navigation_mesh();
@@ -3647,11 +3735,11 @@ void NavigationMeshSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
if (ek.from < ek.to)
SWAP(ek.from, ek.to);
- Map<_EdgeKey, bool>::Element *E = edge_map.find(ek);
+ Map<_EdgeKey, bool>::Element *F = edge_map.find(ek);
- if (E) {
+ if (F) {
- E->get() = false;
+ F->get() = false;
} else {
@@ -3953,6 +4041,10 @@ String JointSpatialGizmoPlugin::get_name() const {
return "Joints";
}
+int JointSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
void JointSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Joint *joint = Object::cast_to<Joint>(p_gizmo->get_spatial_node());
diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h
index 0d89fb0f03..3661df4bad 100644
--- a/editor/spatial_editor_gizmos.h
+++ b/editor/spatial_editor_gizmos.h
@@ -43,6 +43,7 @@ class LightSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
Variant get_handle_value(EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -60,6 +61,7 @@ class AudioStreamPlayer3DSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
Variant get_handle_value(EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -77,6 +79,7 @@ class CameraSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
Variant get_handle_value(EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -94,6 +97,7 @@ class MeshInstanceSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
bool can_be_hidden() const;
void redraw(EditorSpatialGizmo *p_gizmo);
@@ -107,6 +111,7 @@ class Sprite3DSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
bool can_be_hidden() const;
void redraw(EditorSpatialGizmo *p_gizmo);
@@ -123,6 +128,7 @@ class Position3DSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
Position3DSpatialGizmoPlugin();
@@ -135,6 +141,7 @@ class SkeletonSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
SkeletonSpatialGizmoPlugin();
@@ -147,6 +154,7 @@ class PhysicalBoneSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
PhysicalBoneSpatialGizmoPlugin();
@@ -172,6 +180,7 @@ class RayCastSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
RayCastSpatialGizmoPlugin();
@@ -184,6 +193,7 @@ class SpringArmSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
SpringArmSpatialGizmoPlugin();
@@ -196,6 +206,7 @@ class VehicleWheelSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
VehicleWheelSpatialGizmoPlugin();
@@ -208,6 +219,7 @@ class SoftBodySpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
bool is_selectable_when_hidden() const;
void redraw(EditorSpatialGizmo *p_gizmo);
@@ -226,6 +238,7 @@ class VisibilityNotifierGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -243,6 +256,7 @@ class ParticlesGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
bool is_selectable_when_hidden() const;
void redraw(EditorSpatialGizmo *p_gizmo);
@@ -261,6 +275,7 @@ class ReflectionProbeGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -278,6 +293,7 @@ class GIProbeGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -295,6 +311,7 @@ class BakedIndirectLightGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -312,6 +329,7 @@ class CollisionShapeSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
String get_handle_name(const EditorSpatialGizmo *p_gizmo, int p_idx) const;
@@ -328,6 +346,7 @@ class CollisionPolygonSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
CollisionPolygonSpatialGizmoPlugin();
};
@@ -347,6 +366,7 @@ class NavigationMeshSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
NavigationMeshSpatialGizmoPlugin();
@@ -374,6 +394,7 @@ class JointSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
void redraw(EditorSpatialGizmo *p_gizmo);
static void CreatePinJointGizmo(const Transform &p_offset, Vector<Vector3> &r_cursor_points);
diff --git a/editor/translations/af.po b/editor/translations/af.po
index 58d83b6c78..f548d9067c 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -87,6 +87,15 @@ msgstr "Dupliseer Seleksie"
msgid "Delete Selected Key(s)"
msgstr "Skrap gekose lêers?"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Skuif Gunsteling Op"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Dupliseer Sleutels"
@@ -118,6 +127,16 @@ msgid "Anim Change Call"
msgstr "Anim Verander Roep"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Verander Anim Lente"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -170,6 +189,11 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Verander Skikking Waarde"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -196,6 +220,10 @@ msgid "Time (s): "
msgstr "Tree (s):"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Deurlopend"
@@ -248,6 +276,21 @@ msgid "Delete Key(s)"
msgstr "Anim Skrap Sleutels"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Verander Woordeboek Waarde"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Verander Woordeboek Waarde"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Verander Anim Herspeel"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Verwyder Anim Baan"
@@ -289,6 +332,16 @@ msgid "Anim Insert Key"
msgstr "Anim Voeg Sleutel by"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Verander Anim Lente"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Herrangskik AutoLaaie"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -313,6 +366,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Anim Voeg Baan By"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -321,10 +379,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Anim Voeg Baan & Sleutel By"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Anim Voeg Baan By"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim Voeg Baan & Sleutel By"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -337,6 +410,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Skaal Sleutels"
@@ -382,10 +459,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Skaal Seleksie"
@@ -488,6 +561,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Anim Voeg Baan By"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Herskaleer Skikking"
@@ -552,22 +638,14 @@ msgstr "Zoem Uit"
msgid "Reset Zoom"
msgstr "Herset Zoem"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Reël:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kol:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "Metode in teiken Nodus moet gespesifiseer word!"
@@ -878,8 +956,8 @@ msgstr "Skrap gekose lêers?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Skrap"
@@ -1138,8 +1216,9 @@ msgid "Add Bus"
msgstr "Voeg Bus By"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Skep 'n nuwe Bus Uitleg."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Stoor Oudio-Bus Uitleg As..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1168,6 +1247,10 @@ msgstr "Laai Verstek"
msgid "Load the default Bus Layout."
msgstr "Laai die verstek Bus Uitleg."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Skep 'n nuwe Bus Uitleg."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ongeldige naam."
@@ -1313,6 +1396,26 @@ msgstr ""
msgid "Packing"
msgstr "Verpak"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1364,7 +1467,7 @@ msgstr "Open 'n Lêer"
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Verfris"
@@ -1439,10 +1542,33 @@ msgstr "Skuif Gunsteling Op"
msgid "Move Favorite Down"
msgstr "Skuif Gunsteling Af"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Voorskou:"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Skep Vouer"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Gaan na ouer vouer"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Kon nie vouer skep nie."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Gidse & Lêers:"
@@ -1683,9 +1809,9 @@ msgstr "Afvoer:"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Fout tydens storing van hulpbron!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1693,6 +1819,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Fout tydens storing van hulpbron!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Stoor Hulpbron As..."
@@ -1884,6 +2020,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2375,7 +2519,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2927,14 +3071,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3082,10 +3218,6 @@ msgid "Search files"
msgstr "Deursoek Klasse"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3445,23 +3577,6 @@ msgid "Create Polygon"
msgstr "Skep Intekening"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Skep Intekening"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3480,6 +3595,23 @@ msgstr ""
msgid "Erase points."
msgstr ""
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Skep Intekening"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr ""
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3498,12 +3630,46 @@ msgstr "Laai"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Skuif Gunsteling Op"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Skuif Gunsteling Op"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Animasie Zoem."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3545,6 +3711,27 @@ msgid "Triangle already exists"
msgstr "AutoLaai '%s' bestaan reeds!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Anim Voeg Baan By"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3553,6 +3740,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Wissel AutoLaai Globale"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3570,6 +3762,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3579,11 +3775,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Nodus Naam:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Koppel"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Ontkoppel"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Optimaliseer Animasie"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Skrap"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Wissel Gunsteling"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Verander Anim Lente"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3599,6 +3838,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nodus Naam:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3832,6 +4077,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Skuif Byvoeg Sleutel"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Oorgang"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3861,6 +4121,20 @@ msgid "No playback resource set at path: %s."
msgstr "Nie in hulpbron pad nie."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Verwyder"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Oorgang"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4279,6 +4553,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4661,6 +4945,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4917,19 +5205,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5020,11 +5308,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5181,6 +5469,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5822,6 +6116,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
msgid "Skeleton2D"
msgstr "EnkelHouer"
@@ -5933,10 +6235,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5981,7 +6279,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6073,6 +6371,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6081,6 +6385,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6293,7 +6601,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6359,10 +6667,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6371,8 +6675,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Animasie Zoem."
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Optimaliseer Animasie"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6383,8 +6693,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Animasie Zoem."
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6678,6 +6989,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6691,6 +7018,11 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Skep Nuwe"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Skep Intekening"
@@ -6824,6 +7156,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Skep Intekening"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Verwyder"
@@ -6867,6 +7208,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Anim Dupliseer Sleutels"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6882,6 +7244,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6895,7 +7265,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6907,6 +7286,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7185,6 +7572,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7882,6 +8282,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7916,6 +8320,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "Skep Vouer"
@@ -8332,6 +8740,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8538,6 +8958,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8677,10 +9101,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8839,10 +9259,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8925,6 +9341,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9319,6 +9739,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9448,6 +9875,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9462,6 +9895,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9474,6 +9913,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9504,21 +9950,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9542,6 +9973,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9587,11 +10033,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9602,6 +10064,11 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Gaan na ouer vouer"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9674,6 +10141,12 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "Reël:"
+
+#~ msgid "Col:"
+#~ msgstr "Kol:"
+
#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "AutoLaai '%s' bestaan reeds!"
@@ -9771,12 +10244,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "Uit-In"
-#~ msgid "Change Anim Len"
-#~ msgstr "Verander Anim Lente"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "Verander Anim Herspeel"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "Anim Skep Soort-Waarde Sleutel"
@@ -9835,8 +10302,5 @@ msgstr ""
#~ msgid "Skip"
#~ msgstr "Spring Oor"
-#~ msgid "Move Add Key"
-#~ msgstr "Skuif Byvoeg Sleutel"
-
#~ msgid "List:"
#~ msgstr "Lys:"
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 83a9c0b676..c1ceebcedc 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -14,7 +14,7 @@
# omar anwar aglan <omar.aglan91@yahoo.com>, 2017-2018.
# OWs Tetra <owstetra@gmail.com>, 2017.
# Rached Noureddine <rached.noureddine@gmail.com>, 2018.
-# Rex_sa <asd1234567890m@gmail.com>, 2017, 2018.
+# Rex_sa <asd1234567890m@gmail.com>, 2017, 2018, 2019.
# Wajdi Feki <wajdi.feki@gmail.com>, 2017.
# Omar Aglan <omar.aglan91@yahoo.com>, 2018, 2019.
# Codes Otaku <ilyas.gamerz@gmail.com>, 2018.
@@ -22,12 +22,13 @@
# Mohamed El-Baz <albaz2000eg@gmail.com>, 2018.
# عاصم شكر - Aasem shokr <aasemshokr@gmail.com>, 2018.
# Mohammad Fares <mhdchehade@gmail.com>, 2018.
+# NewFriskFan26 <newfriskfan26@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-21 19:30+0000\n"
-"Last-Translator: Omar Aglan <omar.aglan91@yahoo.com>\n"
+"PO-Revision-Date: 2019-02-18 08:54+0000\n"
+"Last-Translator: Rex_sa <asd1234567890m@gmail.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot/ar/>\n"
"Language: ar\n"
@@ -36,7 +37,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Weblate 3.4-dev\n"
+"X-Generator: Weblate 3.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -51,7 +52,7 @@ msgstr "لا يوجد ما يكÙÙŠ من البايتات من أجل ÙÙƒ الØ
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr ""
+msgstr "Ù…ÙØ¯Ø®Ù„ غير صالح \"i%\" (لم يتم تمريره) ÙÙŠ السطر"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -103,6 +104,16 @@ msgstr "تكرار Ø§Ù„Ù…ÙØ§ØªÙŠØ­ المحدد(Ø©)"
msgid "Delete Selected Key(s)"
msgstr "إمسح Ø§Ù„Ù…ÙØ§ØªÙŠØ­ المحدد(Ø©)"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Ø¥Ø¶Ø§ÙØ© نقطة"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "مسح النقطة"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "تكرار Ù…ÙØ§ØªÙŠØ­ التحريك"
@@ -132,6 +143,16 @@ msgid "Anim Change Call"
msgstr "نداء تغيير التحريك"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "تغيير إسم الحركة:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "خط الخاصية"
@@ -141,11 +162,11 @@ msgstr "خط التحريك ثلاثي الأبعاد"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr ""
+msgstr "استدعاء أسلوب المسار"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr ""
+msgstr "مسار منحنى بيزيه"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
@@ -181,12 +202,17 @@ msgid "Anim Clips:"
msgstr "مقاطع الحركة:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "تغيير قيمة ÙÙŠ المصÙÙˆÙØ©"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "تمكين/إيقا٠هذا المسار."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "وضع التحديث (كي٠يتم تعيين هذه الخاصية)"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -208,6 +234,10 @@ msgid "Time (s): "
msgstr "وقت التلاشي X (ثواني):"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "متواصل"
@@ -226,7 +256,7 @@ msgstr "المستقبل"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr ""
+msgstr "أقرب"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
@@ -235,7 +265,7 @@ msgstr "خطي"
#: editor/animation_track_editor.cpp
msgid "Cubic"
-msgstr ""
+msgstr "مكعب"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
@@ -261,6 +291,21 @@ msgid "Delete Key(s)"
msgstr "Ù…ÙØ§ØªÙŠØ­ حذ٠التحريك"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "تغيير إسم الحركة:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "عقدة الحركة"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "تغيير تكرير الحركة"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "حذ٠مسار التحريك"
@@ -302,6 +347,16 @@ msgid "Anim Insert Key"
msgstr "Ø£Ø¶Ù Ù…ÙØªØ§Ø­ حركة"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "تغيير إسم الحركة:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "اعادة ترتيب التحميلات التلقائية"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -326,6 +381,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Ø¥Ø¶Ø§ÙØ© مسار"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -334,10 +394,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "خط التحريك ثلاثي الأبعاد"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Ø¥Ø¶Ø§ÙØ© مسار"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "استدعاء أسلوب المسار"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -350,6 +425,11 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "لصق Ø§Ù„Ù…ÙØ¹Ø§Ù…Ù„"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Ù…ÙØªØ§Ø­ تكبير حركة"
@@ -396,11 +476,6 @@ msgid "Copy Tracks"
msgstr "إنسخ Ø§Ù„Ù…ÙØ¹Ø§Ù…Ù„"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "لصق Ø§Ù„Ù…ÙØ¹Ø§Ù…Ù„"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "تكبير المحدد"
@@ -503,6 +578,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "مقاطع الصوت:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "تغيير حجم المصÙÙˆÙØ©"
@@ -567,22 +655,13 @@ msgstr "إبعاد"
msgid "Reset Zoom"
msgstr "إرجاع التكبير"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "حجم الخطوط:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "الخط:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "العمود:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -890,8 +969,8 @@ msgstr "إمسح Ø§Ù„Ù…Ù„ÙØ§Øª المحددة؟"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "مسح"
@@ -1148,8 +1227,9 @@ msgid "Add Bus"
msgstr "أض٠بيوس"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "أنشئ نسق بيوس جديد."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Ø¥Ø­ÙØ¸ نسق بيوس الصوت كـ..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1177,6 +1257,10 @@ msgstr "تحميل Ø§Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠ"
msgid "Load the default Bus Layout."
msgstr "تحميل نسق البيوس Ø§Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠ."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "أنشئ نسق بيوس جديد."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "اسم غير صالح."
@@ -1320,6 +1404,26 @@ msgstr ""
msgid "Packing"
msgstr "يَحزم\"ينتج المل٠المضغوط\""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1369,7 +1473,7 @@ msgstr "أظهر ÙÙŠ مدير Ø§Ù„Ù…Ù„ÙØ§Øª"
msgid "New Folder..."
msgstr "مجلد جديد..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "تحديث"
@@ -1444,10 +1548,35 @@ msgstr "حرك المÙÙØ¶Ù„Ø© للأعلي"
msgid "Move Favorite Down"
msgstr "حرك المÙÙØ¶Ù„Ø© للأسÙÙ„"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "التبويب السابق"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "أنشئ مجلد"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "إذهب إلي المجلد السابق"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "لا يمكن إنشاء المجلد."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "أظهر العناصر كشبكة من الصور المصغرة"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "أظهر العناصر كقائمة"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "الوجهات ÙˆØ§Ù„Ù…Ù„ÙØ§Øª:"
@@ -1688,9 +1817,9 @@ msgstr "أخلاء الخرج"
msgid "Project export failed with error code %d."
msgstr "تصدير المشروع ÙØ´Ù„, رمز الخطأ % d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "خطأ ÙÙŠ Ø­ÙØ¸ المورد!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1698,6 +1827,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "خطأ ÙÙŠ Ø­ÙØ¸ المورد!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Ø­ÙØ¸ المورد باسم..."
@@ -1909,6 +2048,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "هل تريد Ø­ÙØ¸ التغييرات إلي'%s' قبل الإغلاق؟"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "ÙØ´Ù„ تحميل المورد."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Ø­ÙØ¸ المشهد كـ..."
@@ -2435,7 +2583,8 @@ msgid "Save & Restart"
msgstr "Ø­ÙØ¸ Ùˆ خروج"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "يدور حينما Ù†Ø§ÙØ°Ø© Ø§Ù„Ù…ÙØ¹Ø¯Ù„ يتم إعادة دهانة!"
#: editor/editor_node.cpp
@@ -2999,16 +3148,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "لا يمكن التنقل إلي '%s' حيث لم يتم العثور عليها ÙÙŠ نظام Ø§Ù„Ù…Ù„ÙØ§Øª!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "أظهر العناصر كشبكة من الصور المصغرة"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "أظهر العناصر كقائمة"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr "الحالة: إستيراد Ø§Ù„Ù…Ù„Ù ÙØ´Ù„. من ÙØ¶Ù„Ùƒ أصلح المل٠و أعد إستيراده يدوياً."
@@ -3152,10 +3291,6 @@ msgid "Search files"
msgstr "إبحث ÙÙŠ الأصناÙ"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "نمذج المشهد(المشاهد) المحددة كطÙÙ„ للعقدة المحددة."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3524,25 +3659,6 @@ msgid "Create Polygon"
msgstr "إنشاء بولي"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "تعديل البولي"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "إدخال نقطة"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "تعديل البولي (مسح النقطة)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "مسح البولي والنقطة"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3567,6 +3683,25 @@ msgstr ""
msgid "Erase points."
msgstr "زر Ø§Ù„ÙØ£Ø±Ø© الأيمن: مسح النقطة."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "تعديل البولي"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "إدخال نقطة"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "تعديل البولي (مسح النقطة)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "مسح البولي والنقطة"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3585,12 +3720,49 @@ msgstr "تحميل"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "مسح النقطة"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "تغيير وقت الدمج"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "تغيير وقت الدمج"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Ø¥Ø¶Ø§ÙØ© نقطة"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "أض٠حركة"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "مسح البولي والنقطة"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3632,6 +3804,30 @@ msgid "Triangle already exists"
msgstr "خطأ: إسم الحركة موجود Ø¨Ø§Ù„ÙØ¹Ù„!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Ø¥Ø¶Ø§ÙØ© مسار"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "تغيير وقت الدمج"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "تغيير وقت الدمج"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "مسح البولي والنقطة"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3640,6 +3836,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "تبديل التحميل التلقائي العام"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3657,6 +3858,11 @@ msgid "Blend:"
msgstr "الدمج:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "تحديث التغييرات"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "تعديل المصاÙÙŠ"
@@ -3666,11 +3872,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "وضع التحريك"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "متصل"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "غير متصل"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "صورة متحركة"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "إنشاء عقدة"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "تمكين/إيقا٠هذا المسار."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "تغيير خط الحركة"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3686,6 +3935,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "إسم العقدة:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3920,6 +4175,21 @@ msgid "Cross-Animation Blend Times"
msgstr "وقت الدمج عبر الحركة"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "وضع التحريك"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "تحول"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3949,6 +4219,20 @@ msgid "No playback resource set at path: %s."
msgstr "ليس ÙÙŠ مسار الموارد."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Ù…ÙØ³ÙØ­:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "عقدة التنقل"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4380,6 +4664,16 @@ msgid "Move CanvasItem"
msgstr "تعديل العنصر القماشي"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "المرتكزات Ùقط"
@@ -4771,6 +5065,10 @@ msgstr "إبقي ضاغطاً علي Shift لتعديل المماس ÙØ±Ø¯ÙŠØ§Ù
msgid "Bake GI Probe"
msgstr "طبخ مجس GI"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "العنصر %d"
@@ -5029,6 +5327,10 @@ msgid "Generating Visibility Rect"
msgstr "توليد Rect الرؤية"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "توليد Rect الرؤية"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "لا يمكن إنشاء سوى نقطة وحيدة داخل ParticlesMaterial معالج المواد"
@@ -5041,10 +5343,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "لا بيكسل Ø¨Ø´ÙØ§Ùية > 128 ÙÙŠ الصورة..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "توليد Rect الرؤية"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "حمل قناع الانبعاث"
@@ -5133,13 +5431,13 @@ msgid "Generating AABB"
msgstr "توليد AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "ولد AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "ولد رؤية AABB"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "ولد AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "إزالة نقطة من المنحنى"
@@ -5296,6 +5594,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "إنشاء بولي"
@@ -5953,6 +6257,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "أنشئ نقاط إنبعاث من الشبكة"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Ø§Ù„ÙØ±Ø¯ÙŠØ©"
@@ -6065,10 +6378,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6113,7 +6422,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6206,6 +6515,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6214,6 +6529,11 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "الكبس إلي الشبكة"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "تحديد الوضع (ض)"
@@ -6426,7 +6746,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6495,10 +6815,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6507,8 +6823,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "صورة متحركة"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "صورة متحركة"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6519,8 +6841,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "إسم الحركة:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6825,6 +7148,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "التبويب السابق"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6840,6 +7180,11 @@ msgstr "زر Ø§Ù„ÙØ£Ø±Ø© الأيمن: مسح النقطة."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "إنشاء %s جديد"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "أنشئ شكل جديد من لا شئ."
@@ -6975,6 +7320,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "إنشاء بولي"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "مسح القالب"
@@ -7024,6 +7378,28 @@ msgid "TileSet"
msgstr "مجموعة البلاط"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "حدد ÙƒØ¥ÙØªØ±Ø§Ø¶ÙŠ Ù…Ù† أجل '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Ù…ÙØ§ØªÙŠØ­ نسخ التحريك"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7040,6 +7416,15 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "تعديل المصاÙÙŠ"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -7053,7 +7438,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7066,6 +7460,15 @@ msgid "Exporting All"
msgstr "التصدير كـ %s"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "هذا المسار غير موجود."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7346,6 +7749,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8046,6 +8462,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Ø­ÙØ¸ المشهد"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8082,6 +8503,11 @@ msgstr "أنشئ عظام"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Ø­ÙØ¸ المشهد"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "إنشاء عقدة"
@@ -8504,6 +8930,20 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "تخÙي٠للخارج"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "تغيير المرتكزات"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8720,6 +9160,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8857,10 +9301,6 @@ msgid "Build Project"
msgstr "بناء المشروع"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "إظهار Ø§Ù„Ù…Ù„ÙØ§Øª"
@@ -9020,10 +9460,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9106,6 +9542,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "تعديل العنصر القماشي"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9501,6 +9942,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9630,6 +10078,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9644,6 +10098,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9656,6 +10116,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9686,21 +10153,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9724,6 +10176,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9770,13 +10237,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "أض٠اللون الحالي كإعداد مسبق"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "تنبيه!"
@@ -9785,6 +10269,11 @@ msgstr "تنبيه!"
msgid "Please Confirm..."
msgstr "يرجى التاكيد..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "إذهب إلي المجلد السابق"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9859,6 +10348,19 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "نمذج المشهد(المشاهد) المحددة كطÙÙ„ للعقدة المحددة."
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "حجم الخطوط:"
+
+#~ msgid "Line:"
+#~ msgstr "الخط:"
+
+#~ msgid "Col:"
+#~ msgstr "العمود:"
+
#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "التحميل التلقائي '%s' موجود اصلا!"
@@ -9967,10 +10469,6 @@ msgstr ""
#~ msgid "Search in files"
#~ msgstr "إبحث ÙÙŠ الأصناÙ"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "الكبس إلي الشبكة"
-
#~ msgid "Bake!"
#~ msgstr "طبخ!"
@@ -10022,12 +10520,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "خارج-داخل"
-#~ msgid "Change Anim Len"
-#~ msgstr "تغيير خط الحركة"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "تغيير تكرير الحركة"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "أنشي Ù…ÙØªØ§Ø­ حركة ذا قيمة مكتوبة"
@@ -10181,9 +10673,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "تم Ø¥Ø¶Ø§ÙØªÙ‡:"
-#~ msgid "Removed:"
-#~ msgstr "Ù…ÙØ³ÙØ­:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "لا يمكن Ø­ÙØ¸ النسيج Ø§Ù„ÙØ±Ø¹ÙŠ Ù„Ù„Ø£Ø·Ù„Ø³:"
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 02907898dd..c4f1718ebb 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -7,12 +7,13 @@
# Любомир ВаÑилев <lyubomirv@abv.bg>, 2018.
# MaresPW <marespw206@gmail.com>, 2018.
# PakoSt <kokotekilata@gmail.com>, 2018.
+# Damyan Dichev <mwshock2@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:38+0100\n"
-"Last-Translator: PakoSt <kokotekilata@gmail.com>\n"
+"PO-Revision-Date: 2019-02-13 07:10+0000\n"
+"Last-Translator: Damyan Dichev <mwshock2@gmail.com>\n"
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/bg/>\n"
"Language: bg\n"
@@ -20,7 +21,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -45,11 +46,12 @@ msgstr ""
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr ""
+msgstr "Ðевалидни операнди към оператор %s, %s и %s."
#: core/math/expression.cpp
+#, fuzzy
msgid "Invalid index of type %s for base type %s"
-msgstr ""
+msgstr "Ðевалиден Ð¸Ð½Ð´ÐµÐºÑ Ð¾Ñ‚ тип %s за базов тип %s"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
@@ -90,6 +92,15 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "LMB: ПремеÑти Точка."
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -119,6 +130,16 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Промени Името на ÐнимациÑта:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -170,6 +191,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -196,6 +221,10 @@ msgid "Time (s): "
msgstr "Стъпка (Ñек.):"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -248,6 +277,21 @@ msgid "Delete Key(s)"
msgstr "Изтрий Key(s)"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Промени Името на ÐнимациÑта:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Промени Името на ÐнимациÑта:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Промени Името на ÐнимациÑта:"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -289,6 +333,16 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Промени Името на ÐнимациÑта:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "ПоÑтавÑне на възелите"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -313,6 +367,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "ДобавÑне на нови пътечки."
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -321,10 +380,24 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "ДобавÑне на нови пътечки."
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "ДобавÑне на нови пътечки."
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -337,6 +410,11 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "ПоÑтавÑне на възелите"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -381,11 +459,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "ПоÑтавÑне на възелите"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -487,6 +560,19 @@ msgstr ""
msgid "Copy"
msgstr "Копиране"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "ДобавÑне на нови пътечки."
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "ПреоразмерÑване на маÑива"
@@ -552,22 +638,13 @@ msgstr "Отдалечи"
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "ПредупреждениÑ:"
-
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Изглед Отпред."
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Ред:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Колона:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -863,8 +940,8 @@ msgstr "Изтрий избраните файлове?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Изтрий"
@@ -1117,7 +1194,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1146,6 +1223,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1290,6 +1371,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1338,7 +1439,7 @@ msgstr "Покажи във Файлов Мениджър"
msgid "New Folder..."
msgstr "Ðова папка..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1413,10 +1514,33 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Предишен подпрозорец"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Създаване на папка"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Към горната папка"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "ÐеуÑпешно Ñъздаване на папка."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Папки и файлове:"
@@ -1649,8 +1773,8 @@ msgstr "Ðова Ñцена"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1659,6 +1783,16 @@ msgid "OK"
msgstr "Добре"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1851,6 +1985,15 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "ÐеуÑпешно зареждане на реÑурÑите."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Запазване на Ñцената като..."
@@ -2351,7 +2494,7 @@ msgid "Save & Restart"
msgstr "Запазване и повторно внаÑÑне"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2915,14 +3058,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3071,10 +3206,6 @@ msgid "Search files"
msgstr "ТърÑене"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3450,24 +3581,6 @@ msgid "Create Polygon"
msgstr "Създаване на папка"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "ПриÑтавки"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "ПремеÑтване на Полигон"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3490,6 +3603,24 @@ msgstr ""
msgid "Erase points."
msgstr "Изтрий точки."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "ПриÑтавки"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "ПремеÑтване на Полигон"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3508,12 +3639,47 @@ msgstr "Зареди..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "LMB: ПремеÑти Точка."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Добави Възел..."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Добави ÐнимациÑ"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "ПремеÑтване на Полигон"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3556,6 +3722,28 @@ msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
+msgid "Add Triangle"
+msgstr "ДобавÑне на нови пътечки."
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "ПремеÑтване на Полигон"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D не принадлежи на възел тип AnimationTree."
@@ -3564,6 +3752,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Покажи Любими"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3581,6 +3774,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3591,11 +3788,53 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Режим на ПремеÑтване"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "ИзрÑзване на възелите"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Разкачи"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Ðово Име на ÐнимациÑ:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Избиране на вÑичко"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Покажи Любими"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3611,6 +3850,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Възел"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3844,6 +4089,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Режим на ПремеÑтване"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "ДобавÑне на превод"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3873,6 +4133,20 @@ msgid "No playback resource set at path: %s."
msgstr "Обектът не е базиран на реÑурÑен файл"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Премахни"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Преход"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4294,6 +4568,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4682,6 +4966,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4938,19 +5226,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5041,11 +5329,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5200,6 +5488,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5842,6 +6136,15 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Възпроизвеждане на Ñцена по избор"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5951,10 +6254,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Изглед Отгоре."
@@ -5999,8 +6298,9 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr ""
+#, fuzzy
+msgid "Align with View"
+msgstr "Изглед ОтдÑÑно."
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6092,6 +6392,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6100,6 +6406,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Режим на Селектиране (Q)"
@@ -6313,7 +6623,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6380,10 +6690,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6392,8 +6698,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Ðнимационни ИнÑтрументи"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Ðово Име на ÐнимациÑ:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6404,8 +6716,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Ðово Име на ÐнимациÑ:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6703,6 +7016,24 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Следващ Ñкрипт"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Предишен подпрозорец"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6718,6 +7049,11 @@ msgstr "Изтрий точки."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Създай нови възли."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Създай нов полигон от нулата."
@@ -6855,6 +7191,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "ПремеÑтване на Полигон"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "ПремеÑтване на Полигон"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "ЗатварÑне на вÑичко"
@@ -6902,6 +7248,28 @@ msgid "TileSet"
msgstr "Файл:"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Задай по Подразбиране за '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Ðаправи дупликат на Key(s)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6917,6 +7285,15 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Промени Филтрите"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6930,7 +7307,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6943,6 +7329,14 @@ msgid "Exporting All"
msgstr "ИзнаÑÑне за %s"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7233,6 +7627,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7938,6 +8345,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Запазване на Ñцената"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7973,6 +8385,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Запазване на Ñцената"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Създаване на папка"
@@ -8402,6 +8819,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8624,6 +9053,11 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "ÐаÑтройки"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8768,10 +9202,6 @@ msgid "Build Project"
msgstr "Проект"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Преглед на файловете"
@@ -8931,10 +9361,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9019,6 +9445,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Вкарай Коментар"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9436,6 +9867,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr "ParallaxLayer работи Ñамо когато е наÑледник на ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9567,6 +10005,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9581,6 +10025,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9593,6 +10043,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9627,21 +10084,6 @@ msgstr ""
"Параметърът 'Path' трÑбва да Ñочи към дейÑтвителен възел Particles2D, за да "
"работи."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9665,6 +10107,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9706,11 +10163,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9721,6 +10194,11 @@ msgstr "Тревога!"
msgid "Please Confirm..."
msgstr "МолÑ, потвърдете..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Към горната папка"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9793,6 +10271,19 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Warnings:"
+#~ msgstr "ПредупреждениÑ:"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Изглед Отпред."
+
+#~ msgid "Line:"
+#~ msgstr "Ред:"
+
+#~ msgid "Col:"
+#~ msgstr "Колона:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "PathFollow2D работи Ñамо когато е наÑледник на Path2D."
@@ -9809,9 +10300,6 @@ msgstr ""
#~ msgid "Select a split to erase it."
#~ msgstr "Избери разделение и го изтрий"
-#~ msgid "Add Node.."
-#~ msgstr "Добави Възел..."
-
#~ msgid "Zoom out"
#~ msgstr "Отдалечи"
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index fb4979b319..e397b1648d 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -93,6 +93,16 @@ msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অনà§à¦²à¦¿à¦ªà¦¿ করà§
msgid "Delete Selected Key(s)"
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "ইনপà§à¦Ÿ যোগ করà§à¦¨"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "বিনà§à¦¦à§ সরান"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) কি ডà§à¦ªà§à¦²à¦¿à¦•েট করà§à¦¨"
@@ -125,6 +135,16 @@ msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) কল পরিবরà§à¦¤à¦¨ à¦
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Animation Length"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° লà§à¦ª পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° লà§à¦ª পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Property Track"
msgstr "পà§à¦°à¦ªà¦¾à¦°à§à¦Ÿà¦¿:"
@@ -182,6 +202,11 @@ msgstr "কà§à¦²à¦¿à¦ªà¦¸à¦®à§‚হ"
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Track Path"
+msgstr "শà§à¦°à§‡à¦£à§€à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸/সারির মান পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
msgstr "বিকà§à¦·à§‡à¦ª-হীন মোড"
@@ -209,6 +234,11 @@ msgid "Time (s): "
msgstr "X-ফেড/বিলীন সময় (সেঃ):"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "সকà§à¦°à¦¿à¦¯à¦¼ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "অবিচà§à¦›à¦¿à¦¨à§à¦¨/নিরবচà§à¦›à¦¿à¦¨à§à¦¨"
@@ -262,6 +292,21 @@ msgid "Delete Key(s)"
msgstr "নোড(সমূহ) অপসারণ করà§à¦¨"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° নাম পরিবরà§à¦¤à¦¨ করà§à¦¨:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° নোড"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° লà§à¦ª পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à§à¦¯à¦¾à¦• রিমà§à¦­ করà§à¦¨"
@@ -303,6 +348,16 @@ msgid "Anim Insert Key"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡ (Anim) চাবি যোগ করà§à¦¨"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° FPS পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Autoload সমূহ পà§à¦¨à¦°à§à¦¬à¦¿à¦¨à§à¦¯à¦¸à§à¦¤ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -327,6 +382,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à§à¦¯à¦¾à¦• যোগ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -335,11 +395,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "রà§à¦ªà¦¾à¦¨à§à¦¤à¦°à§‡à¦° ধরণ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à§à¦¯à¦¾à¦• যোগ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Add Method Track Key"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡ (Anim) টà§à¦°à§à¦¯à¦¾à¦•/পথ à¦à¦¬à¦‚ চাবি যোগ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
msgstr "সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿà§‡ চলক-পà§à¦°à¦¾à¦ªà¦• (VariableGet) পাওয়া যায়নি: "
@@ -353,6 +428,11 @@ msgid "Clipboard is empty"
msgstr "রিসোরà§à¦¸à§‡à¦° কà§à¦²à§€à¦ªà¦¬à§‹à¦°à§à¦¡ খালি!"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à§‡à¦ªà¦¨/পেসà§à¦Ÿ করà§à¦¨"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° (Anim) চাবিসমূহের আকার পরিবরà§à¦¤à¦¨ করà§à¦¨"
@@ -399,11 +479,6 @@ msgid "Copy Tracks"
msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿/কপি করà§à¦¨"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à§‡à¦ªà¦¨/পেসà§à¦Ÿ করà§à¦¨"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহের আকার পরিবরà§à¦¤à¦¨ করà§à¦¨"
@@ -506,6 +581,19 @@ msgstr ""
msgid "Copy"
msgstr "পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿/কপি করà§à¦¨"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "অডিও শà§à¦°à§‹à¦¤à¦¾"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "শà§à¦°à§‡à¦£à§€à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸/সারি পà§à¦¨à¦°à§à¦®à¦¾à¦ªà¦¨ করà§à¦¨"
@@ -570,23 +658,14 @@ msgstr "সংকà§à¦šà¦¿à¦¤ করà§à¦¨ (জà§à¦®à§ আউট)"
msgid "Reset Zoom"
msgstr "সমà§à¦ªà§à¦°à¦¸à¦¾à¦°à¦¨/সংকোচন অপসারণ করà§à¦¨ (রিসেট জà§à¦®à§)"
-#: editor/code_editor.cpp
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
-msgid "Warnings:"
+msgid "Warnings"
msgstr "সতরà§à¦•তা"
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "উৎস ফনà§à¦Ÿà§‡à¦° আকার:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "লাইন:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "কলাম:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -900,8 +979,8 @@ msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ ফাইলসমূহ অপসারণ
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "অপসারণ করà§à¦¨"
@@ -1159,8 +1238,9 @@ msgid "Add Bus"
msgstr "বাস যোগ করà§à¦¨"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "নতà§à¦¨ বাস লেআউট তৈরি করà§à¦¨à¥¤"
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "অডিও বাস লেআউট সেভ করà§à¦¨..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1188,6 +1268,10 @@ msgstr "লোড ডিফলà§à¦Ÿ"
msgid "Load the default Bus Layout."
msgstr "ডিফলà§à¦Ÿ বাস লেআউট লোড করà§à¦¨à¥¤"
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "নতà§à¦¨ বাস লেআউট তৈরি করà§à¦¨à¥¤"
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ নাম।"
@@ -1342,6 +1426,26 @@ msgstr ""
msgid "Packing"
msgstr "পà§à¦¯à¦¾à¦•/গà§à¦šà§à¦›à¦¿à¦¤ করা"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1395,7 +1499,7 @@ msgstr "ফাইল-মà§à¦¯à¦¾à¦¨à§‡à¦œà¦¾à¦°à§‡ দেখà§à¦¨"
msgid "New Folder..."
msgstr "ফোলà§à¦¡à¦¾à¦° তৈরি করà§à¦¨"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "রিফà§à¦°à§‡à¦¸ করà§à¦¨"
@@ -1470,11 +1574,36 @@ msgstr "ফেবরিট/পà§à¦°à¦¿à¦¯à¦¼à¦•ে উপরের দিকে
msgid "Move Favorite Down"
msgstr "ফেবরিট/পà§à¦°à¦¿à¦¯à¦¼à¦•ে নিচের দিকে নামান"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "পূরà§à¦¬à§‡à¦° টà§à¦¯à¦¾à¦¬"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "ফোলà§à¦¡à¦¾à¦° তৈরি করà§à¦¨"
+
+#: editor/editor_file_dialog.cpp
#, fuzzy
msgid "Go to parent folder"
msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦­à¦¬ হয়নি।"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦­à¦¬ হয়নি।"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "থামà§à¦¬à¦¨à§‡à¦‡à¦² গà§à¦°à¦¿à¦¡ হিসাবে আইটেম দেখà§à¦¨"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "লিসà§à¦Ÿ হিসেবে আইটেম দেখà§à¦¨"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "পথ à¦à¦¬à¦‚ ফাইল:"
@@ -1727,9 +1856,9 @@ msgstr "আউটপà§à¦Ÿ/ফলাফল"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "রিসোরà§à¦¸ সংরকà§à¦·à¦£à§‡ সমসà§à¦¯à¦¾ হয়েছে!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1737,6 +1866,16 @@ msgid "OK"
msgstr "সঠিক"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "রিসোরà§à¦¸ সংরকà§à¦·à¦£à§‡ সমসà§à¦¯à¦¾ হয়েছে!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "রিসোরà§à¦¸ à¦à¦‡à¦°à§‚পে সংরকà§à¦·à¦£ করà§à¦¨..."
@@ -1959,6 +2098,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "'%s' বনà§à¦§ করার পূরà§à¦¬à§‡ পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ সংরকà§à¦·à¦£ করবেন?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "রিসোরà§à¦¸ লোড বà§à¦¯à¦°à§à¦¥ হয়েছে।"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "বৃহৎ গঠনবিনà§à¦¯à¦¾à¦¸à§‡à¦° জনà§à¦¯ শà§à¦§à§à¦®à¦¾à¦¤à§à¦° à¦à¦•টি ফাইল পà§à¦°à§Ÿà§‹à¦œà¦¨à¥¤"
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "দৃশà§à¦¯ à¦à¦‡à¦°à§‚পে সংরকà§à¦·à¦£ করà§à¦¨..."
@@ -2501,7 +2650,8 @@ msgid "Save & Restart"
msgstr "সংরকà§à¦·à¦£ à¦à¦¬à¦‚ পà§à¦¨-ইমà§à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "à¦à¦¡à¦¿à¦Ÿà¦°à§‡à¦° পà§à¦¨-অঙà§à¦•নে à¦à¦Ÿà¦¿ ঘূরà§à¦£à¦¨ করে!"
#: editor/editor_node.cpp
@@ -3114,16 +3264,6 @@ msgstr "'% s' তে নেভিগেট করা যাবে না কাà
#: editor/filesystem_dock.cpp
#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "থামà§à¦¬à¦¨à§‡à¦‡à¦² গà§à¦°à¦¿à¦¡ হিসাবে আইটেম দেখà§à¦¨"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "লিসà§à¦Ÿ হিসেবে আইটেম দেখà§à¦¨"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"\n"
@@ -3285,10 +3425,6 @@ msgid "Search files"
msgstr "কà§à¦²à¦¾à¦¸à§‡à¦° অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ দৃশà§à¦¯(সমূহ)-কে নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ নোডের অংশ হিসেবে ইনসà§à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸ করà§à¦¨à¥¤"
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3669,26 +3805,6 @@ msgid "Create Polygon"
msgstr "Poly তৈরি করà§à¦¨"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Poly সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Insert Point"
-msgstr "সনà§à¦¨à¦¿à¦¬à§‡à¦¶à¦¿à¦¤ হচà§à¦›à§‡"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Poly সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨ (বিনà§à¦¦à§ অপসারণ করà§à¦¨)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "পলি à¦à¦¬à¦‚ বিনà§à¦¦à§ অপসারণ করà§à¦¨"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3713,6 +3829,26 @@ msgstr ""
msgid "Erase points."
msgstr "মাউসের ডান বোতাম: বিনà§à¦¦à§ মà§à¦›à§‡ ফেলà§à¦¨à¥¤"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Poly সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Insert Point"
+msgstr "সনà§à¦¨à¦¿à¦¬à§‡à¦¶à¦¿à¦¤ হচà§à¦›à§‡"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Poly সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨ (বিনà§à¦¦à§ অপসারণ করà§à¦¨)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "পলি à¦à¦¬à¦‚ বিনà§à¦¦à§ অপসারণ করà§à¦¨"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3731,12 +3867,49 @@ msgstr "লোড"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "বিনà§à¦¦à§ সরান"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "বà§à¦²à§‡à¦¨à§à¦¡-à¦à¦° সময় পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "বà§à¦²à§‡à¦¨à§à¦¡-à¦à¦° সময় পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "নোড সংযোজন করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ যà§à¦•à§à¦¤ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "পথের বিনà§à¦¦à§ অপসারণ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3779,6 +3952,31 @@ msgid "Triangle already exists"
msgstr "'%s' অà§à¦¯à¦¾à¦•শন ইতিমধà§à¦¯à§‡à¦‡ বিদà§à¦¯à¦®à¦¾à¦¨!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "চলক/ভেরিয়েবল সংযোজন করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "বà§à¦²à§‡à¦¨à§à¦¡-à¦à¦° সময় পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "বà§à¦²à§‡à¦¨à§à¦¡-à¦à¦° সময় পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "পথের বিনà§à¦¦à§ অপসারণ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "চলক/ভেরিয়েবল অপসারণ করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3787,6 +3985,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "AutoLoad à¦à¦° সারà§à¦¬à¦œà¦¨à§€à¦¨ মানসমূহ অদলবদল/টগল করà§à¦¨"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3805,6 +4008,11 @@ msgid "Blend:"
msgstr "বà§à¦²à§‡à¦¨à§à¦¡/মিশà§à¦°à¦£:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ হাল-নাগাদ করà§à¦¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3815,11 +4023,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "শাখা (tree) হতে নোড (সমূহ) যà§à¦•à§à¦¤ করà§à¦¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "মোড (Mode) সরান"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "সংযোগ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "সংযোগ বিচà§à¦›à¦¿à¦¨à§à¦¨ করà§à¦¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "নোড(সমূহ) অপসারণ করà§à¦¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "বিকà§à¦·à§‡à¦ª-হীন মোড"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "বà§à¦²à§‡à¦¨à§à¦¡-à¦à¦° সময় পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3835,6 +4087,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "নোডের নাম:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -4076,6 +4334,21 @@ msgstr "আনà§à¦¤-অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ বà§à¦²à§‡à¦¨à§à¦¡ সম
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
+msgid "Move Node"
+msgstr "মোড (Mode) সরান"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "অনà§à¦¬à¦¾à¦¦ সংযোগ করà§à¦¨"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "নোড সংযোজন করà§à¦¨"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "End"
msgstr "সমাপà§à¦¤à¦¿(সমূহ)"
@@ -4105,6 +4378,20 @@ msgid "No playback resource set at path: %s."
msgstr "রিসোরà§à¦¸à§‡à¦° পথে নয়।"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "অপসারিত:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "টà§à¦°à§à¦¯à¦¾à¦¨à¦œà¦¿à¦¶à¦¨ নোড"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4544,6 +4831,16 @@ msgid "Move CanvasItem"
msgstr "CanvasItem সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Anchors only"
msgstr "অà§à¦¯à¦¾à¦‚কর"
@@ -4960,6 +5257,10 @@ msgstr "টà§à¦¯à¦¾à¦¨à¦œà§‡à¦¨à§à¦Ÿà¦—à§à¦²à¦¿ আলাদা আলাদà
msgid "Bake GI Probe"
msgstr "জি আই পà§à¦°à§‹à¦¬ বেক করà§à¦¨"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "বসà§à¦¤à§ %d"
@@ -5219,6 +5520,10 @@ msgid "Generating Visibility Rect"
msgstr "ভিজিবিলিটি রেকà§à¦Ÿ তৈরি করà§à¦¨"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "ভিজিবিলিটি রেকà§à¦Ÿ তৈরি করà§à¦¨"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "শà§à¦§à§à¦®à¦¾à¦¤à§à¦° ParticlesMaterial পà§à¦°à¦¸à§‡à¦¸ মà§à¦¯à¦¾à¦Ÿà§‡à¦°à¦¿à§Ÿà¦¾à¦²à§‡ বিনà§à¦¦à§ সà§à¦¥à¦¾à¦ªà¦¨ সমà§à¦­à¦¬"
@@ -5231,10 +5536,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "সà§à¦¬à¦šà§à¦›à¦¤à¦¾à¦¸à¦¹ কোনো পিকà§à¦¸à§‡à¦² নেই > ছবিতে ১২৮..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "ভিজিবিলিটি রেকà§à¦Ÿ তৈরি করà§à¦¨"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Emission Mask লোড করà§à¦¨"
@@ -5332,12 +5633,12 @@ msgid "Generating AABB"
msgstr "AABB উৎপনà§à¦¨ করà§à¦¨"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+#, fuzzy
+msgid "Generate Visibility AABB"
msgstr "AABB উৎপনà§à¦¨ করà§à¦¨"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr "AABB উৎপনà§à¦¨ করà§à¦¨"
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5503,6 +5804,12 @@ msgid "Create UV Map"
msgstr "UV Map তৈরি করà§à¦¨"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Poly তৈরি করà§à¦¨"
@@ -6177,6 +6484,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Mesh হতে Emitter তৈরি করà§à¦¨"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "সà§à¦•েলেটন/কাঠাম..."
@@ -6295,10 +6611,6 @@ msgid "Vertices"
msgstr "ভারটেকà§à¦¸"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "à¦à¦« পি à¦à¦¸"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "শীরà§à¦· দরà§à¦¶à¦¨à¥¤"
@@ -6343,7 +6655,8 @@ msgid "Rear"
msgstr "পশà§à¦šà¦¾à§Ž"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "দরà§à¦¶à¦¨à§‡à¦° সাথে সারিবদà§à¦§ করà§à¦¨"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6446,6 +6759,12 @@ msgid "Freelook Speed Modifier"
msgstr "ফà§à¦°à¦¿ লà§à¦• সà§à¦ªà¦¿à¦¡ মডিফায়ার"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "তথà§à¦¯ দেখà§à¦¨"
@@ -6456,6 +6775,11 @@ msgstr "XForm à¦à¦° সংলাপ"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª মোড:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Select Mode (Q)"
msgstr "মোড (Mode) বাছাই করà§à¦¨"
@@ -6677,7 +7001,7 @@ msgid "Post"
msgstr "পরবরà§à¦¤à§€ (Post)"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6748,10 +7072,6 @@ msgid "Add Empty"
msgstr "খালি বসà§à¦¤à§ যোগ করà§à¦¨"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° লà§à¦ª পরিবরà§à¦¤à¦¨ করà§à¦¨"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° FPS পরিবরà§à¦¤à¦¨ করà§à¦¨"
@@ -6760,10 +7080,16 @@ msgid "(empty)"
msgstr "(খালি/শূনà§à¦¯)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à¦¸à¦®à§‚হ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "গতি (FPS):"
@@ -6772,7 +7098,8 @@ msgid "Loop"
msgstr "লà§à¦ª"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° ফà§à¦°à§‡à¦®à¦¸à¦®à§‚হ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -7087,6 +7414,24 @@ msgid "Merge from Scene"
msgstr "দৃশà§à¦¯ হতে à¦à¦•তà§à¦°à¦¿à¦¤ করবেন"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "পরবরà§à¦¤à§€ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "পূরà§à¦¬à§‡à¦° টà§à¦¯à¦¾à¦¬"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -7102,6 +7447,11 @@ msgstr "মাউসের ডান বোতাম: বিনà§à¦¦à§ মà§à
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "নতà§à¦¨ তৈরি করà§à¦¨"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "আরমà§à¦­ হতে নতà§à¦¨ polygon তৈরি করà§à¦¨à¥¤"
@@ -7239,6 +7589,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "পলিগন সরান"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "পলিগন সরান"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "বসà§à¦¤à§ অপসারণ করà§à¦¨"
@@ -7287,6 +7647,29 @@ msgid "TileSet"
msgstr "TileSet (টাইল-সেট)..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "'% s' à¦à¦° জনà§à¦¯ ডিফলà§à¦Ÿ হিসাবে সেট করà§à¦¨"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "শেডার"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "নোড(সমূহ) পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿ করà§à¦¨"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "ভারটেকà§à¦¸"
@@ -7305,6 +7688,16 @@ msgstr "ডান"
msgid "VisualShader"
msgstr "শেডার"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "নোড ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ হাল-নাগাদ করà§à¦¨"
+
#: editor/project_export.cpp
#, fuzzy
msgid "Runnable"
@@ -7321,10 +7714,17 @@ msgid "Delete preset '%s'?"
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ ফাইলসমূহ অপসারণ করবেন?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
-"à¦à¦‡ পà§à¦²à§à¦¯à¦¾à¦Ÿà¦«à¦°à§à¦®à§‡à¦° জনà§à¦¯ দরকারি à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ টেমপà§à¦²à§‡à¦Ÿà¦—à§à¦²à¦¿ কà§à¦·à¦¤à¦¿à¦—à§à¦°à¦¸à§à¦¥ হয়েছে অথবা খà§à¦à¦œà§‡ পাওয়া "
-"যাচà§à¦›à§‡ না:"
#: editor/project_export.cpp
#, fuzzy
@@ -7338,6 +7738,17 @@ msgstr "%s à¦à¦° জনà§à¦¯ à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ (export) হচà§à¦›
#: editor/project_export.cpp
#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "ফাইলটি বিদà§à¦¯à¦®à¦¾à¦¨ নয়।"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"à¦à¦‡ পà§à¦²à§à¦¯à¦¾à¦Ÿà¦«à¦°à§à¦®à§‡à¦° জনà§à¦¯ দরকারি à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ টেমপà§à¦²à§‡à¦Ÿà¦—à§à¦²à¦¿ কà§à¦·à¦¤à¦¿à¦—à§à¦°à¦¸à§à¦¥ হয়েছে অথবা খà§à¦à¦œà§‡ পাওয়া "
+"যাচà§à¦›à§‡ না:"
+
+#: editor/project_export.cpp
+#, fuzzy
msgid "Presets"
msgstr "পà§à¦°à¦¿à¦¸à§‡à¦Ÿ..."
@@ -7645,6 +8056,19 @@ msgstr "à¦à¦•ধিক পà§à¦°à¦•লà§à¦ª খোলায় আপনি সà§
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8385,6 +8809,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "অরà§à¦¥à¦ªà§‚রà§à¦¨!"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "নোড(সমূহ) অপসারণ করবেন?"
@@ -8420,6 +8849,11 @@ msgstr "সà§à¦¥à¦¾à¦¨à§€à§Ÿ করà§à¦¨"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "অরà§à¦¥à¦ªà§‚রà§à¦¨!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "নোড তৈরি করà§à¦¨"
@@ -8880,6 +9314,21 @@ msgid "Set From Tree"
msgstr "শাখা হতে সà§à¦¥à¦¾à¦ªà¦¨ করà§à¦¨"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "বহিঃ-সহজাগমন"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "শরà§à¦Ÿà¦•াটসমূহ"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "অà§à¦¯à¦¾à¦‚করসমূহ পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "শরà§à¦Ÿà¦•াটসমূহ"
@@ -9105,6 +9554,11 @@ msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অনà§à¦²à¦¿à¦ªà¦¿ করà§
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
+msgid "GridMap Paint"
+msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª সেটিংস"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Grid Map"
msgstr "গà§à¦°à¦¿à¦¡ সà§à¦¨à§à¦¯à¦¾à¦ª"
@@ -9261,11 +9715,6 @@ msgstr "নতà§à¦¨ পà§à¦°à¦•লà§à¦ª"
#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
-msgid "Warnings"
-msgstr "সতরà§à¦•তা"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
-#, fuzzy
msgid "View log"
msgstr "ফাইল"
@@ -9443,10 +9892,6 @@ msgid "Change Expression"
msgstr "অভিবà§à¦¯à¦•à§à¦¤à¦¿ (Expression) পরিবরà§à¦¤à¦¨ করà§à¦¨"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "নোড সংযোজন করà§à¦¨"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove VisualScript Nodes"
msgstr "অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ চাবিসমূহ অপসারণ করà§à¦¨"
@@ -9547,6 +9992,11 @@ msgstr "ইনপà§à¦Ÿ নাম পরিবরà§à¦¤à¦¨ করà§à¦¨"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Resize Comment"
+msgstr "CanvasItem সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Can't copy the function node."
msgstr "'..' তে পরিচালনা করা সমà§à¦­à¦¬ নয়"
@@ -9966,6 +10416,13 @@ msgid ""
msgstr ""
"ParallaxLayer à¦à¦•মাতà§à¦° ParallaxBackground à¦à¦° অংশ হিসেবে নিরà§à¦§à¦¾à¦°à¦¨ করলেই কাজ করে।"
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -10108,6 +10565,12 @@ msgstr ""
"সফলà§à¦­à¦¾à¦¬à§‡ কাজ করতে CollisionShape à¦à¦° à¦à¦•টি আকৃতি পà§à¦°à§Ÿà§‹à¦œà¦¨à¥¤ অনà§à¦—à§à¦°à¦¹ করে তার জনà§à¦¯ à¦à¦•টি "
"আকৃতি তৈরি করà§à¦¨!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -10123,6 +10586,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "ছবিসমূহ বà§à¦²à¦¿à¦Ÿà¦¿à¦‚ (Blitting) করা হচà§à¦›à§‡"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -10139,6 +10608,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -10170,23 +10646,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Path à¦à¦° দিক অবশà§à¦¯à¦‡ à¦à¦•টি কারà§à¦¯à¦•র Spatial নোডের à¦à¦° দিকে নিরà§à¦¦à§‡à¦¶ করাতে হবে।"
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"পà§à¦°à¦¤à¦¿ দৃশà§à¦¯à§‡ (অথবা ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸à¦¡ দৃশà§à¦¯à§‡à¦° সমà§à¦®à§‡à¦²à¦¨à§‡) সরà§à¦¬à§‹à¦šà§à¦š à¦à¦•টি দৃশà§à¦¯à¦®à¦¾à¦¨ WorldEnvironment "
-"সমà§à¦­à¦¬à¥¤"
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -10212,6 +10671,23 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"পà§à¦°à¦¤à¦¿ দৃশà§à¦¯à§‡ (অথবা ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸à¦¡ দৃশà§à¦¯à§‡à¦° সমà§à¦®à§‡à¦²à¦¨à§‡) সরà§à¦¬à§‹à¦šà§à¦š à¦à¦•টি দৃশà§à¦¯à¦®à¦¾à¦¨ WorldEnvironment "
+"সমà§à¦­à¦¬à¥¤"
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -10259,12 +10735,28 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
#, fuzzy
msgid "Raw Mode"
msgstr "পà§à¦¯à¦¾à¦¨ মোড"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -10275,6 +10767,11 @@ msgstr "সতরà§à¦•তা!"
msgid "Please Confirm..."
msgstr "অনà§à¦—à§à¦°à¦¹ করে নিশà§à¦šà¦¿à¦¤ করà§à¦¨..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦­à¦¬ হয়নি।"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10356,6 +10853,26 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ দৃশà§à¦¯(সমূহ)-কে নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ নোডের অংশ হিসেবে ইনসà§à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸ করà§à¦¨à¥¤"
+
+#~ msgid "FPS"
+#~ msgstr "à¦à¦« পি à¦à¦¸"
+
+#, fuzzy
+#~ msgid "Warnings:"
+#~ msgstr "সতরà§à¦•তা"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "উৎস ফনà§à¦Ÿà§‡à¦° আকার:"
+
+#~ msgid "Line:"
+#~ msgstr "লাইন:"
+
+#~ msgid "Col:"
+#~ msgstr "কলাম:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "PathFollow2D à¦à¦•মাতà§à¦° Path2D à¦à¦° অংশ হিসেবে নিরà§à¦§à¦¾à¦°à¦¨ করালেই কাজ করে।"
@@ -10518,10 +11035,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "à¦à¦¤à§‡ রূপানà§à¦¤à¦° করà§à¦¨..."
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª মোড:"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "০ ডিগà§à¦°à¦¿ ঘোরানà§"
@@ -11054,9 +11567,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "সংযোজিত:"
-#~ msgid "Removed:"
-#~ msgstr "অপসারিত:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "à¦à¦Ÿà¦²à¦¾à¦¸/মানচিতà§à¦°à¦¾à¦¬à¦²à§€à¦° উপ-গঠনবিনà§à¦¯à¦¾à¦¸ (subtexture) সংরকà§à¦·à¦£ অসমরà§à¦¥ হয়েছে:"
@@ -11317,9 +11827,6 @@ msgstr ""
#~ msgid "Error importing:"
#~ msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿà§‡ সমসà§à¦¯à¦¾ হয়েছে:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "বৃহৎ গঠনবিনà§à¦¯à¦¾à¦¸à§‡à¦° জনà§à¦¯ শà§à¦§à§à¦®à¦¾à¦¤à§à¦° à¦à¦•টি ফাইল পà§à¦°à§Ÿà§‹à¦œà¦¨à¥¤"
-
#~ msgid "Max Texture Size:"
#~ msgstr "গঠনবিনà§à¦¯à¦¾à¦¸à§‡à¦° সরà§à¦¬à§‡à¦¾à¦šà§à¦š আকার:"
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 156368509a..57d80a8342 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -85,6 +85,16 @@ msgstr "Duplica les Claus seleccionades"
msgid "Delete Selected Key(s)"
msgstr "Elimina les Claus seleccionades"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Afegeix un punt"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Mou el Punt"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Duplica les Claus"
@@ -114,6 +124,16 @@ msgid "Anim Change Call"
msgstr "Modifica la Crida"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Modifica el bucle d'Animació"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Modifica el bucle d'Animació"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Pista de Propietats"
@@ -163,6 +183,11 @@ msgid "Anim Clips:"
msgstr "Talls d'Animació:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Modifica el Valor de la Taula"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Activa/Desactiva la Pista."
@@ -187,6 +212,11 @@ msgid "Time (s): "
msgstr "Temps (s): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Activa Doppler"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Continu"
@@ -237,6 +267,21 @@ msgid "Delete Key(s)"
msgstr "Elimina les Claus"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Modifica el Nom de l'Animació:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Mode d'Interpolació"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Modifica el bucle d'Animació"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Treu la Pista"
@@ -279,6 +324,16 @@ msgid "Anim Insert Key"
msgstr "Insereix una Clau"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Modifica els FPS de l'Animació"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Reorganitza AutoCàrregues"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
"Les pistes de Transformació només s'apliquen a nodes del tipus Espacial."
@@ -310,6 +365,11 @@ msgid "Not possible to add a new track without a root"
msgstr "No es pot afegir una nova pista sense cap arrel"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Afegeix una Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "El camí de la Pista no és vàlid i per tant no s'hi poden afegir claus."
@@ -318,11 +378,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "No s'hi pot inserir cap Clau. La pista no és del tipus \"Spatial\""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Pista de Transformació 3D"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Afegeix una Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
"No s'hi pot afegit cap clau de mètode. El camí de la pista no és vàlid."
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Pista de Crida de Mètodes"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "No s'ha trobat el mètode en l'objecte: "
@@ -335,6 +410,10 @@ msgid "Clipboard is empty"
msgstr "El porta-retalls és buit"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Enganxa les Pistes"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Escala les Claus"
@@ -378,10 +457,6 @@ msgid "Copy Tracks"
msgstr "Còpia les Pistes"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Enganxa les Pistes"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Escala la Selecció"
@@ -483,6 +558,19 @@ msgstr "Tria les Pistes per copiar:"
msgid "Copy"
msgstr "Copia"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Talls d'Àudio:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Redimensiona la Matriu"
@@ -547,22 +635,13 @@ msgstr "Allunya"
msgid "Reset Zoom"
msgstr "Reinicia el Zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Avisos:"
-
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Mida de la lletra:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Línia:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Avisos"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Col:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -866,8 +945,8 @@ msgstr "Voleu Esborrar els fitxers seleccionats?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Esborra"
@@ -1124,8 +1203,9 @@ msgid "Add Bus"
msgstr "Afegeix Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Crea un nou Disseny de Bus."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Anomena i Desa el Disseny del Bus d'Àudio..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1153,6 +1233,10 @@ msgstr "Carrega Valors predeterminats"
msgid "Load the default Bus Layout."
msgstr "Carrega el disseny del Bus predeterminat."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Crea un nou Disseny de Bus."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nom no vàlid."
@@ -1305,6 +1389,26 @@ msgstr ""
msgid "Packing"
msgstr "Compressió"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1355,7 +1459,7 @@ msgstr "Mostra en el Gestor de Fitxers"
msgid "New Folder..."
msgstr "Nou Directori..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Refresca"
@@ -1430,10 +1534,33 @@ msgstr "Mou Favorit Amunt"
msgid "Move Favorite Down"
msgstr "Mou Favorit Avall"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Planta Anterior"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Planta Següent"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Vés al directori principal"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "No s'ha pogut crear el directori."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Visualitza en una graella de miniatures."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Mostra'ls en una llista."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Directoris i Fitxers:"
@@ -1674,9 +1801,9 @@ msgstr "Buida la Sortida"
msgid "Project export failed with error code %d."
msgstr "L'exportació del projecte ha fallat amb el codi d'error %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Error en desar recurs!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1684,6 +1811,16 @@ msgid "OK"
msgstr "D'acord"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Error en desar recurs!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Anomena i Desa el Recurs..."
@@ -1900,6 +2037,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Desar els canvis a '%s' abans de tancar?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "No s'ha pogut carregar el recurs."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Anomena i Desa l'Escena..."
@@ -2429,7 +2575,8 @@ msgid "Save & Restart"
msgstr "Desa i Reinicia"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Gira i Gira mentre l'editor es repinta!"
#: editor/editor_node.cpp
@@ -2988,14 +3135,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "No es pot accedir a '%s'. No es troba en el sistema de fitxers!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Visualitza en una graella de miniatures."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Mostra'ls en una llista."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr "Estat: No s'ha pogut importar. Corregiu el fitxer i torneu a importar."
@@ -3136,10 +3275,6 @@ msgid "Search files"
msgstr "Cerca Fitxers"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instancia les escenes seleccionades com a filles del node seleccionat."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3492,25 +3627,6 @@ msgid "Create Polygon"
msgstr "Crea Polígon"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Edita Polígon"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Insereix un Punt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Edita el Polígon (Elimina un Punt)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Elimina el Polígon i el Punt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3533,6 +3649,25 @@ msgstr ""
msgid "Erase points."
msgstr "Elimina un Punt."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Edita Polígon"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Insereix un Punt"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Edita el Polígon (Elimina un Punt)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Elimina el Polígon i el Punt"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3551,6 +3686,22 @@ msgstr "Carrega..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Mou el Punt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Modifica el Temps de Mescla"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Modifica el Temps de Mescla"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3559,6 +3710,27 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Afegeix un Node"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Afegeix una Animació"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Elimina un Punt del Camí"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3600,6 +3772,31 @@ msgid "Triangle already exists"
msgstr "El triangle ja existeix"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Afegeix una Variable"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Modifica el Temps de Mescla"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Modifica el Temps de Mescla"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Elimina un Punt del Camí"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Elimina la Variable"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D no pertany a cap node AnimationTree."
@@ -3608,6 +3805,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "En no haver-hi cap triangle, no es pot mesclar res."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Commuta les Globals d'AutoCàrrega"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Crea triangles connectant punts."
@@ -3625,6 +3827,11 @@ msgid "Blend:"
msgstr "Mescla:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Canvis de Material"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Edita Filtres"
@@ -3634,11 +3841,55 @@ msgid "Output node can't be added to the blend tree."
msgstr "No es pot afegir el node de sortida a l'arbre de mescla."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Afegeix Nodes des d'Arbre"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Mode de moviment"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr "No es pot connectar. El port és en ús o la connexió no és vàlida."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Connectat"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Desconnectat"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animació"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Elimina els Nodes"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Activa/Desactiva la Pista."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "S'ha Modificat el Filtre de Locale"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"En no haver-se establert cap reproductor d'animacions, no es poden recuperar "
@@ -3656,6 +3907,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nom del node:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3894,6 +4151,21 @@ msgstr "Temps de mescla entre Animacions"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
+msgid "Move Node"
+msgstr "Mode de moviment"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Afegeix una Traducció"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Afegeix un Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "End"
msgstr "Final/s"
@@ -3923,6 +4195,20 @@ msgid "No playback resource set at path: %s."
msgstr "Fora del camí dels recursos."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Eliminat:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Node de Transició"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4356,6 +4642,16 @@ msgid "Move CanvasItem"
msgstr "Modifica el elementCanvas"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Només Ancoratges"
@@ -4749,6 +5045,10 @@ msgstr "Prem Maj. per editar les tangents individualment"
msgid "Bake GI Probe"
msgstr "Precalcula la Sonda d'IG"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Element %d"
@@ -5006,6 +5306,10 @@ msgid "Generating Visibility Rect"
msgstr "Genera un Rectangle de Visibilitat"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Genera un Rectangle de Visibilitat"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Només es poden establir punts en materials de procés ParticlesMaterial"
@@ -5018,10 +5322,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Cap píxel amb transparència > 128 en la imatge..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Genera un Rectangle de Visibilitat"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Carrega una Màscara d'Emissió"
@@ -5110,13 +5410,13 @@ msgid "Generating AABB"
msgstr "Generant AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Genera AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Genera un AABB de Visibilitat"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Genera AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Elimina un Punt de la Corba"
@@ -5273,6 +5573,12 @@ msgid "Create UV Map"
msgstr "Crea un Mapa UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Crea Polígon"
@@ -5934,6 +6240,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Crea Punts d'Emissió des d'una Malla"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Singleton"
@@ -6047,10 +6362,6 @@ msgid "Vertices"
msgstr "Vèrtexs"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Vista superior."
@@ -6095,7 +6406,8 @@ msgid "Rear"
msgstr "Darrere"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Alinea amb la Vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6189,6 +6501,12 @@ msgid "Freelook Speed Modifier"
msgstr "Modificador de la Velocitat de la Vista Lliure"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Mostra la Informació"
@@ -6198,6 +6516,11 @@ msgid "XForm Dialog"
msgstr "Diàleg XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Alinea-ho amb la graella"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Mode Selecció (Q)"
@@ -6414,7 +6737,7 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6484,10 +6807,6 @@ msgid "Add Empty"
msgstr "Afegeix un element Buit"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Modifica el bucle d'Animació"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Modifica els FPS de l'Animació"
@@ -6496,10 +6815,16 @@ msgid "(empty)"
msgstr "(buit)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Animacions"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animació"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "Velocitat (FPS):"
@@ -6508,7 +6833,8 @@ msgid "Loop"
msgstr "Bucle"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Fotogrames d'Animació"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6809,6 +7135,24 @@ msgid "Merge from Scene"
msgstr "Combina-ho a partir de l'Escena"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Planta Següent"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Planta Anterior"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6824,6 +7168,11 @@ msgstr "Elimina un Punt."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Crea Nou %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Crea un nou Polígon del no-res."
@@ -6967,6 +7316,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Mou el Polígon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Mou el Polígon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Elimina la Plantilla"
@@ -7015,6 +7374,29 @@ msgid "TileSet"
msgstr "Tile Set"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Establir com a valor Predeterminat per a '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "Ombreig"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplica els Nodes"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "Vèrtexs"
@@ -7034,6 +7416,16 @@ msgstr "Dreta"
msgid "VisualShader"
msgstr "Ombreig"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Edita Filtres"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Canvis de Ombreig"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Executable"
@@ -7047,8 +7439,17 @@ msgid "Delete preset '%s'?"
msgstr "Esborrar la configuració '%s' ?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Manquen d'exportació per aquesta plataforma o s'han malmès:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
#, fuzzy
@@ -7061,6 +7462,15 @@ msgid "Exporting All"
msgstr "Exportació per a %s"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "El camí no existeix."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Manquen d'exportació per aquesta plataforma o s'han malmès:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Configuracions prestablertes"
@@ -7350,6 +7760,19 @@ msgstr "Esteu segur que voleu obrir més d'un projecte de cop?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8077,6 +8500,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Entesos!"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Elimina els Nodes?"
@@ -8113,6 +8541,11 @@ msgstr "Local"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Entesos!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Crea un Node"
@@ -8554,6 +8987,21 @@ msgid "Set From Tree"
msgstr "Estableix des de l'Arbre"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Sortida Lenta"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "Dreceres"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Modifica Ancoratges"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Dreceres"
@@ -8771,6 +9219,11 @@ msgid "GridMap Duplicate Selection"
msgstr "Duplica la Selecció del GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "Configuració del GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Mapa de Graella"
@@ -8908,10 +9361,6 @@ msgid "Build Project"
msgstr "Munta el Projecte"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Avisos"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Mostra el Registre"
@@ -9078,10 +9527,6 @@ msgid "Change Expression"
msgstr "Modifica l'Expressió"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Afegeix un Node"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Elimina els Nodes de VisualScript"
@@ -9168,6 +9613,11 @@ msgid "Change Input Value"
msgstr "Modifica el Valor de l'Entrada"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Modifica el elementCanvas"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "No es pot copiar el node de funció."
@@ -9593,6 +10043,13 @@ msgstr ""
"Un node ParallaxLayer només funciona quan s'estableix com a fill d'un node "
"ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9745,6 +10202,12 @@ msgstr ""
"Cal proveir una forma perquè CollisionShape funcioni. Creeu-li un recurs de "
"forma!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
@@ -9760,6 +10223,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "S'estàn traçant les Malles"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9776,6 +10245,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr "Res és visible perquè no s'ha assignat cap Malla a cap pas de Dibuix."
@@ -9811,25 +10287,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Cal que la propietat Camí assenyali cap a un node Spatial vàlid."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment necessita un recurs Ambiental."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Només es permet un sol WorldEnvironment per escena ( o conjunt d'escenes "
-"instanciades)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Aquest WorldEnvironment s'ignora. Afegiu una càmera (per a escenes 3D) o "
-"configureu el Background Mode a Canvas (per a escenes 2D)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9862,6 +10319,25 @@ msgstr ""
"RigidBody(Caràcter o Rígid). \n"
"Modifica la mida de les Formes de Col·lisió Filles."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment necessita un recurs Ambiental."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Només es permet un sol WorldEnvironment per escena ( o conjunt d'escenes "
+"instanciades)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Aquest WorldEnvironment s'ignora. Afegiu una càmera (per a escenes 3D) o "
+"configureu el Background Mode a Canvas (per a escenes 2D)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9909,13 +10385,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Mode Cru"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Afegeix el Color actual com a predeterminat"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Ep!"
@@ -9924,6 +10417,11 @@ msgstr "Ep!"
msgid "Please Confirm..."
msgstr "Confirmeu..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Vés al directori principal"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10010,6 +10508,26 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Instancia les escenes seleccionades com a filles del node seleccionat."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Avisos:"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Mida de la lletra:"
+
+#~ msgid "Line:"
+#~ msgstr "Línia:"
+
+#~ msgid "Col:"
+#~ msgstr "Col:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
@@ -10174,10 +10692,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Converteix en minúscules"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Alinea-ho amb la graella"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Gira-ho 0 graus"
@@ -10689,9 +11203,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "Afegit:"
-#~ msgid "Removed:"
-#~ msgstr "Eliminat:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "No s'ha pogut desar la subtextura de l'atles:"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index aa82d935de..a9834cd05f 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -5,16 +5,17 @@
# Fadex <vitekpaulik@gmail.com>, 2017.
# Jan 'spl!te' Kondelík <j.kondelik@centrum.cz>, 2016, 2018.
# Jiri Hysek <contact@jirihysek.com>, 2017.
-# Josef KuchaÅ™ <josef.kuchar267@gmail.com>, 2018.
+# Josef KuchaÅ™ <josef.kuchar267@gmail.com>, 2018, 2019.
# Luděk Novotný <gladosicek@gmail.com>, 2016, 2018.
# Martin Novák <maidx@seznam.cz>, 2017.
# zxey <r.hozak@seznam.cz>, 2018.
-# Vojtěch Šamla <auzkok@seznam.cz>, 2018.
+# Vojtěch Šamla <auzkok@seznam.cz>, 2018, 2019.
+# Peeter Angelo <contact@peeterangelo.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:38+0100\n"
+"PO-Revision-Date: 2019-03-12 15:25+0000\n"
"Last-Translator: Vojtěch Šamla <auzkok@seznam.cz>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/"
"cs/>\n"
@@ -23,7 +24,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -39,7 +40,7 @@ msgstr "Nedostatek bytů pro dekódování bytů, nebo špatný formát."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr ""
+msgstr "Neplatný vstup %i (neprošel) ve výrazu"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -67,13 +68,12 @@ msgstr "Při volání '%s':"
#: editor/animation_bezier_editor.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Free"
-msgstr "Uvolnit"
+msgstr "Volný"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr ""
+msgstr "Vyvážený"
#: editor/animation_bezier_editor.cpp
#, fuzzy
@@ -85,14 +85,22 @@ msgid "Insert Key Here"
msgstr "Vložit klÃ­Ä zde"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Duplicate Selected Key(s)"
-msgstr "Duplikovat výběr"
+msgstr "Duplikovat klíÄ(e)"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Delete Selected Key(s)"
-msgstr "Smazat vybraný"
+msgstr "Smazat klíÄ(e)"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Přidat bod"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Přesunout body"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
@@ -123,6 +131,15 @@ msgid "Anim Change Call"
msgstr "Animace: změna volání"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Změnit délku animace"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "ZmÄ›nit smyÄku animace"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Stopa vlastnosti"
@@ -172,12 +189,16 @@ msgid "Anim Clips:"
msgstr "AnimaÄní klipy:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Změnit cestu stopy"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Aktivovat/Deaktivovat tuto stopu."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Režim aktualizece (jak je tato vlastnost nastavena)"
#: editor/animation_track_editor.cpp
msgid "Interpolation Mode"
@@ -196,6 +217,11 @@ msgid "Time (s): "
msgstr "ÄŒas (s): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Povolit"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Spojité"
@@ -246,6 +272,19 @@ msgid "Delete Key(s)"
msgstr "Odstranit klíÄ(e)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Změnit režim aktualizace animace"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Změnit režim interpolace animace"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "ZmÄ›nit smyÄku animace"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Odstranit stopu animace"
@@ -287,6 +326,14 @@ msgid "Anim Insert Key"
msgstr "Animace: vložit klíÄ"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Změnit krok animace"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Přeskupit stopy"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -304,7 +351,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr "Stopa animae může odkazovat pouze na uzly AnimationPlayer."
+msgstr "Stopa animace může odkazovat pouze na uzly AnimationPlayer."
#: editor/animation_track_editor.cpp
msgid "An animation player can't animate itself, only other players."
@@ -315,6 +362,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Není možné přidat novou stopu bez kořenového uzlu"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Přidat Bézierovu stopu"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -323,10 +374,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Stopa není typu Spatial, nelze vložit klíÄ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Stopa 3D transformace"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Přidat stopu"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Stopa volání metody"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Tato metoda nebyla v objektu nalezena: "
@@ -339,6 +405,10 @@ msgid "Clipboard is empty"
msgstr "Schránka je prázdná"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Vložit stopy"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Animace: zmÄ›nit měřítko klíÄů"
@@ -381,10 +451,6 @@ msgid "Copy Tracks"
msgstr "Kopírovat stopy"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Vložit stopy"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Změnit měřítko výběru"
@@ -405,14 +471,12 @@ msgid "Delete Selection"
msgstr "Smazat vyběr"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Next Step"
-msgstr "Jít k dalšímu kroku"
+msgstr "Přejít k dalšímu kroku"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Previous Step"
-msgstr "Jít k předchozímu kroku"
+msgstr "Přejít k předchozímu kroku"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -486,6 +550,19 @@ msgstr "Zvolte stopy ke zkopírování:"
msgid "Copy"
msgstr "Kopírovat"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Audio klipy:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Změnit velikost pole"
@@ -550,22 +627,13 @@ msgstr "Oddálit"
msgid "Reset Zoom"
msgstr "Obnovit původní přiblížení"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Varování:"
-
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Pohled zepředu"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Řádek:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Varování"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Sloupec:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -662,9 +730,8 @@ msgid "Disconnect"
msgstr "Odpojit"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect Signal: "
-msgstr "Připojuji signál:"
+msgstr "Připojit Signál: "
#: editor/connections_dialog.cpp
msgid "Edit Connection: "
@@ -869,8 +936,8 @@ msgstr "Odstranit vybrané soubory?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Odstranit"
@@ -1127,8 +1194,9 @@ msgid "Add Bus"
msgstr "Přidat bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr ""
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Uložit rozložení Audio Busu jako..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1156,6 +1224,10 @@ msgstr "NaÄíst výchozí"
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Neplatný název."
@@ -1294,29 +1366,48 @@ msgid "Storing File:"
msgstr "Ukládám soubor:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "No export template found at the expected path:"
-msgstr ""
-"Nebyly nalezeny žádné exportní šablony.\n"
-"Stáhněte a nainstalujte exportní šablony."
+msgstr "Na oÄekávané cestÄ› nebyly nalezeny žádné exportní Å¡ablony:"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "Balím"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"Cílová platforma vyžaduje kompresi textur 'ETC' pro GLES2. Povolte 'Import "
+"Etc' v nastaveních projektu."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"Cílová platforma vyžaduje kompresi textur 'ETC2' pro GLES3. Povolte 'Import "
+"Etc 2' v nastaveních projektu."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom debug template not found."
-msgstr "Vlastní ladící balíÄek nebyl nalezen."
+msgstr "Vlastní ladící šablona nebyla nalezena."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom release template not found."
-msgstr "Vlastní balíÄek k uveÅ™ejnÄ›ní nebyl nalezen."
+msgstr "Vlastní šablona k uveřejnění nebyla nalezena."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
@@ -1351,7 +1442,7 @@ msgstr "Zobrazit ve správci souborů"
msgid "New Folder..."
msgstr "Nová složka..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Obnovit"
@@ -1426,10 +1517,31 @@ msgstr "Přesunout oblíbenou položku nahoru"
msgid "Move Favorite Down"
msgstr "Přesunout oblíbenou položku dolů"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr "Předchozí složka"
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr "Další složka"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Jít na nadřazenou složku"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Nelze vytvořit složku."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Zobrazit položky jako mřížku náhledů."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Zobrazit položky jako seznam."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Složky a soubory:"
@@ -1457,7 +1569,7 @@ msgstr "(Re)Importování assetů"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
-msgstr ""
+msgstr "Horní"
#: editor/editor_help.cpp
msgid "Class:"
@@ -1629,7 +1741,7 @@ msgstr "Nastavit"
#: editor/editor_inspector.cpp
msgid "Set Multiple:"
-msgstr ""
+msgstr "Nastavit více:"
#: editor/editor_log.cpp
msgid "Output:"
@@ -1653,9 +1765,9 @@ msgstr "Vymazat výstup"
msgid "Project export failed with error code %d."
msgstr "Export projektu selhal s chybovým kódem %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Chyba při ukládání zdrojů!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr "Nelze uložit importované zdroje."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1663,6 +1775,16 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Chyba při ukládání zdrojů!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Uložit zdroj jako..."
@@ -1870,6 +1992,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Uložit změny '%s' před zavřením?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Selhalo nahrání zdroje."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Pro uložení scény je vyžadován kořenový uzel."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Uložit scénu jako..."
@@ -2389,8 +2520,8 @@ msgid "Save & Restart"
msgstr "Uložit a restartovat"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "ToÄí se, když se okno pÅ™ekresluje!"
+msgid "Spins when the editor window redraws."
+msgstr "ToÄí se, když se okno editoru pÅ™ekresluje."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2596,20 +2727,20 @@ msgid "[Empty]"
msgstr "[Prázdné]"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
-#, fuzzy
msgid "Assign..."
-msgstr "Přiřadit.."
+msgstr "Přiřadit..."
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr "Neplatná cesta"
+msgstr "Neplatné RID"
#: editor/editor_properties.cpp
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
msgstr ""
+"Vybraný zdroj (%s) neodpovídá žádnému oÄekávanému typu pro tuto vlastnost "
+"(%s)."
#: editor/editor_properties.cpp
msgid ""
@@ -2948,14 +3079,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "Nelze přejít k '%s', protože nebylo nalezeno v souborovém systému!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Zobrazit položky jako mřížku náhledů."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Zobrazit položky jako seznam."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Status: import souboru selhal. Opravte, prosím, soubor a naimportujte ho "
@@ -3074,11 +3197,11 @@ msgstr "Přejmenovat"
#: editor/filesystem_dock.cpp
msgid "Previous Directory"
-msgstr "Předchozí adresář"
+msgstr "Předchozí složka"
#: editor/filesystem_dock.cpp
msgid "Next Directory"
-msgstr "Následující adresář"
+msgstr "Následující složka"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
@@ -3094,10 +3217,6 @@ msgid "Search files"
msgstr "Hledat soubory"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3175,7 +3294,6 @@ msgid "Group name already exists."
msgstr "Název skupiny již existuje."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Invalid group name."
msgstr "Neplatný název skupiny."
@@ -3286,11 +3404,11 @@ msgstr "Ukládání..."
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr ""
+msgstr "Nastavit jako výchozí pro '%s'"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr ""
+msgstr "VyÄistit výchozí pro '%s'"
#: editor/import_dock.cpp
msgid " Files"
@@ -3377,9 +3495,8 @@ msgid "Load an existing resource from disk and edit it."
msgstr "Nahrát existující zdroj z disku a editovat ho."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Save the currently edited resource."
-msgstr "Uložit vybranou animaci"
+msgstr "Uložit právě editovaný zdroj."
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
@@ -3447,47 +3564,42 @@ msgid "Create Polygon"
msgstr "Vytvořit polygon"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Editovat polygon"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Vložit polygon"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Upravit polygon (Odstranit bod)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Odstranit polygon a bod"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
msgstr "Vytvořit body."
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid ""
"Edit points.\n"
"LMB: Move Point\n"
"RMB: Erase Point"
msgstr ""
-"Upravit existující polygon:\n"
-"LMB: Přesunout bod.\n"
-"Ctrl+LMB: Rozdělit segment.\n"
-"RMB: Vymazat bod."
+"Upravit body.\n"
+"LMB: Přesunout bod\n"
+"RMB: Vymazat bod"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Erase points."
msgstr "Vymazat body."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Upravit polygon"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Vložit polygon"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Upravit polygon (odstranit bod)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Odstranit polygon a bod"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3500,9 +3612,22 @@ msgstr "Přidat animaci"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Load..."
-msgstr "NaÄíst.."
+msgstr "NaÄíst..."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Přesunout body"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -3512,6 +3637,27 @@ msgstr "Tento typ uzlu nelze použít. Jsou povoleny pouze kořenové uzly."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Přidat uzel"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Přidat animaci"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Odstranit bod cesty"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3532,7 +3678,7 @@ msgstr "Zvolte a přesuňte body. Nové uzly vytvořte pomocí RMB."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
msgid "Enable snap and show grid."
-msgstr ""
+msgstr "Aktivovat přichytávání a zobrazit mřížku."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -3551,6 +3697,28 @@ msgid "Triangle already exists"
msgstr "Trojúhelník již existuje"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Přidat trojúhelník"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Odstranit bod cesty"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Odstranit proměnnou"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3559,12 +3727,17 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Zobrazit oblíbené"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
-msgstr ""
+msgstr "Vytvořit trojúhelníky spojováním bodů."
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Erase points and triangles."
-msgstr ""
+msgstr "Odstranit body a trojúhelníky."
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Generate blend triangles automatically (instead of manually)"
@@ -3576,6 +3749,10 @@ msgid "Blend:"
msgstr "Prolínání:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Parametr změněn"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Editovat filtry"
@@ -3585,9 +3762,46 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Přidat uzel do BlendTree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Uzel přesunut"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
-msgstr ""
+msgstr "Nelze se připojit, port může být používán nebo připojení není platné."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Připojené uzly"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Odpojené uzly"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Nastavit animaci"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Smazat uzel"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Aktivovat/Deaktivovat tuto stopu."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Změnit filtr"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
@@ -3605,10 +3819,14 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Uzel přejmenován"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Add Node..."
-msgstr "Přidat uzel.."
+msgstr "Přidat uzel..."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/root_motion_editor_plugin.cpp
@@ -3617,7 +3835,7 @@ msgstr "Upravit filtrované stopy:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Enable filtering"
-msgstr ""
+msgstr "Povolit filtrování"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Toggle Autoplay"
@@ -3678,9 +3896,8 @@ msgid "No animation to copy!"
msgstr "Žádná animace pro kopírování!"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "No animation resource on clipboard!"
-msgstr "Není v cestě ke zdroji."
+msgstr "Ve schránce není žádný zdroj animace!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pasted Animation"
@@ -3696,11 +3913,11 @@ msgstr "Žádná animace pro úpravu!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from current pos. (A)"
-msgstr ""
+msgstr "PÅ™ehrát zvolenou animaci pozpátku ze souÄasné pozice. (A)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from end. (Shift+A)"
-msgstr ""
+msgstr "Přehrát zvolenou animaci pozpátku od konce. (A)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Stop animation playback. (S)"
@@ -3745,7 +3962,7 @@ msgstr "Otevřít v inspektoru"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Display list of animations in player."
-msgstr ""
+msgstr "Zobrazit seznam animací v pÅ™ehrávaÄi."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Autoplay on Load"
@@ -3833,6 +4050,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Přesunout uzel"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Přidat překlad"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Přidat uzel"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Konec"
@@ -3842,7 +4073,7 @@ msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Sync"
-msgstr ""
+msgstr "Synchronizovat"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "At End"
@@ -3862,6 +4093,18 @@ msgid "No playback resource set at path: %s."
msgstr "Není v cestě ke zdroji."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Uzel odebrán"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Přechod odebrán"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -3877,9 +4120,8 @@ msgid "Connect nodes."
msgstr "Připojit uzly."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Remove selected node or transition."
-msgstr "Odstranit vybranou stopu."
+msgstr "Odstranit vybraný uzel nebo přechod."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Toggle autoplay this animation on start, restart or seek to zero."
@@ -3949,7 +4191,6 @@ msgid "Blend 0:"
msgstr "Prolínání 0:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
-#, fuzzy
msgid "Blend 1:"
msgstr "Prolínání 1:"
@@ -3987,39 +4228,39 @@ msgstr "Strom animace je neplatný."
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Animation Node"
-msgstr "Uzel animace"
+msgstr "Uzel Animation"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "OneShot Node"
-msgstr ""
+msgstr "Uzel OneShot"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Mix Node"
-msgstr ""
+msgstr "Uzel Mix"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend2 Node"
-msgstr ""
+msgstr "Uzel Blend2"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend3 Node"
-msgstr ""
+msgstr "Uzel Blend3"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend4 Node"
-msgstr ""
+msgstr "Uzel Blend4"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeScale Node"
-msgstr ""
+msgstr "Uzel TimeScale"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeSeek Node"
-msgstr ""
+msgstr "Uzel TimeSeek"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Transition Node"
-msgstr ""
+msgstr "Uzel Transition"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Import Animations..."
@@ -4268,15 +4509,24 @@ msgid "Resize CanvasItem"
msgstr "Změnit velikost CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Scale CanvasItem"
-msgstr "Rotovat CanvasItem"
+msgstr "Škálovat CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move CanvasItem"
msgstr "Přemístit CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Pouze kotvy"
@@ -4301,9 +4551,8 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Reset"
-msgstr "Oddálit"
+msgstr "Resetovat zoom"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Select Mode"
@@ -4335,9 +4584,8 @@ msgid "Rotate Mode"
msgstr "Režim otáÄení"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Scale Mode"
-msgstr "Režim zvětšování (R)"
+msgstr "Režim škálování"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4434,9 +4682,8 @@ msgid "Restores the object's children's ability to be selected."
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Skeleton Options"
-msgstr "Kostra"
+msgstr "Možnosti kostry"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Bones"
@@ -4462,7 +4709,7 @@ msgstr "Vymazat kosti"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View"
-msgstr "Zobrazit"
+msgstr "Zobrazení"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -4562,9 +4809,8 @@ msgid ""
msgstr ""
#: editor/plugins/collision_polygon_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon3D"
-msgstr "Vytvořit polygon"
+msgstr "Vytvořit Polygon3D"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Edit Poly"
@@ -4662,6 +4908,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Položka %d"
@@ -4921,6 +5171,10 @@ msgid "Generating Visibility Rect"
msgstr "Generování C# projektu..."
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
@@ -4933,16 +5187,12 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Žádný pixel s průhledností > 128 v obrázku..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr ""
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
-msgstr ""
+msgstr "NaÄíst emisní masku"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Clear Emission Mask"
-msgstr ""
+msgstr "VyÄistit emisní masku"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -4965,7 +5215,7 @@ msgstr "Čas generování (sec):"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Mask"
-msgstr ""
+msgstr "Emisní maska"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Capture from Pixel"
@@ -5024,13 +5274,13 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Vygenerovat AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr ""
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Vygenerovat AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Odstranit bod z křivky"
@@ -5049,9 +5299,8 @@ msgid "Add Point to Curve"
msgstr "Přidat bod do křivky"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Split Curve"
-msgstr "Uzavřít křivku"
+msgstr "Rozdělit křivku"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move Point in Curve"
@@ -5174,7 +5423,6 @@ msgid ""
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Sync Bones"
msgstr "Synchronizovat kosti"
@@ -5189,42 +5437,42 @@ msgid "Create UV Map"
msgstr "Vytvořit UV mapu"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
-msgstr "Vytvořit Poly3D"
+msgstr "Vytvořit polygon a UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Internal Vertex"
-msgstr "Vytvořit nové vodorovné vodítko"
+msgstr "Vytvořit vnitřní vrchol"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Internal Vertex"
-msgstr "Odstranit položku"
+msgstr "Odstranit vnitřní vrchol"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Invalid Polygon (need 3 different vertices)"
-msgstr ""
+msgstr "Neplatný polygon (jsou třeba 3 různé vrcholy)"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Add Custom Polygon"
-msgstr "Editovat polygon"
+msgstr "Přidat vlastní polygon"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Polygon"
-msgstr "Odstranit polygon a bod"
+msgstr "Odstranit vlastní polygon"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
msgstr "Transformovat UV mapu"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Transform Polygon"
-msgstr "Typ transformace"
+msgstr "Transformovat polygon"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Paint Bone Weights"
@@ -5241,26 +5489,23 @@ msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "UV"
-msgstr ""
+msgstr "UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Points"
-msgstr "Bod"
+msgstr "Body"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Polygons"
-msgstr "Polygon->UV"
+msgstr "Polygony"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Bones"
msgstr "Kosti"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Move Points"
-msgstr "Přesunout bod"
+msgstr "Přesunout body"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Ctrl: Rotate"
@@ -5288,13 +5533,15 @@ msgstr "Změnit měřítko mnohoúhelníku"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create a custom polygon. Enables custom polygon rendering."
-msgstr ""
+msgstr "Vytvořit vlastní polygon. Aktivuje renderování vlastních polygonů."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
"Remove a custom polygon. If none remain, custom polygon rendering is "
"disabled."
msgstr ""
+"Odstranit vlastní polygon. Pokud žádný nezbývá, je renderování vlastních "
+"polygonů deaktivováno."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Paint weights with specified intensity."
@@ -5306,7 +5553,7 @@ msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Radius:"
-msgstr ""
+msgstr "Poloměr:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon->UV"
@@ -5438,31 +5685,27 @@ msgstr "Chyba: nelze naÄíst soubor."
#: editor/plugins/script_editor_plugin.cpp
msgid "Error could not load file."
-msgstr "Chyba nelze naÄíst soubor."
+msgstr "Chyba: nelze naÄíst soubor."
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving file!"
msgstr "Chyba při ukládání souboru!"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error while saving theme."
-msgstr "Chyba při ukládání motivu"
+msgstr "Chyba při ukládání motivu."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Saving"
-msgstr "Chyba při ukládání"
+msgstr "Chyba ukládání"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error importing theme."
-msgstr "Chyba při importu motivu"
+msgstr "Chyba při importu motivu."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Error Importing"
-msgstr "Chyba při importu"
+msgstr "Chyba importu"
#: editor/plugins/script_editor_plugin.cpp
msgid "New TextFile..."
@@ -5498,7 +5741,7 @@ msgstr " Reference třídy"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle alphabetical sorting of the method list."
-msgstr ""
+msgstr "Přepnout abecední řazení seznamu metod."
#: editor/plugins/script_editor_plugin.cpp
msgid "Sort"
@@ -5529,9 +5772,8 @@ msgid "File"
msgstr "Soubor"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open..."
-msgstr "Otevřít"
+msgstr "Otevřít..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
@@ -5560,9 +5802,8 @@ msgid "Theme"
msgstr "Téma"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Import Theme..."
-msgstr "Importovat motiv"
+msgstr "Importovat motiv..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload Theme"
@@ -5823,6 +6064,15 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Vytvořit ze scény"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Skeleton2D"
@@ -5883,9 +6133,8 @@ msgid "Scaling: "
msgstr "Škálování: "
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translating: "
-msgstr "Přechod"
+msgstr "Posun: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -5932,10 +6181,6 @@ msgid "Vertices"
msgstr "Vrcholy"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Pohled shora."
@@ -5980,7 +6225,8 @@ msgid "Rear"
msgstr "Zadní"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Zarovnat s výhledem"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6074,6 +6320,12 @@ msgid "Freelook Speed Modifier"
msgstr "Rychlost volného pohledu"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Zobrazit informace"
@@ -6083,6 +6335,11 @@ msgid "XForm Dialog"
msgstr "XForm Dialog"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Přichytit k mřížce"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Režim výběru (Q)"
@@ -6299,7 +6556,7 @@ msgid "Post"
msgstr "Po"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6363,10 +6620,6 @@ msgid "Add Empty"
msgstr "Přidat prázdný"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "ZmÄ›nit smyÄku animace"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Změnit FPS animace"
@@ -6375,8 +6628,12 @@ msgid "(empty)"
msgstr "(prázdný)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animace"
+msgid "Animations:"
+msgstr "Animace:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Nová animace"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6387,7 +6644,8 @@ msgid "Loop"
msgstr "SmyÄka"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Snímky animace"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6542,9 +6800,8 @@ msgid "Many"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Has,Many,Options"
-msgstr "Možnosti"
+msgstr "Má,mnoho,možností"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 1"
@@ -6587,9 +6844,8 @@ msgid "Erase Selection"
msgstr "Vymazat oznaÄené"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Fix Invalid Tiles"
-msgstr "Neplatný název."
+msgstr "Opravit neplatné dlaždice"
#: editor/plugins/tile_map_editor_plugin.cpp
#, fuzzy
@@ -6684,23 +6940,43 @@ msgid "Merge from Scene"
msgstr "SlouÄit ze scény"
#: editor/plugins/tile_set_editor_plugin.cpp
-msgid "Copy bitmask."
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Další skript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Předchozí skript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Copy bitmask."
+msgstr "Kopírovat bitovou masku."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Paste bitmask."
-msgstr "Vložit animaci"
+msgstr "Vložit bitovou masku."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Erase bitmask."
-msgstr "Vymazat body."
+msgstr "Vymazat bitovou masku."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Vytvořit nové uzly."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
-msgstr "Vytvořit polygon"
+msgstr "Vytvořit nový polygon."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Keep polygon inside region Rect."
@@ -6715,13 +6991,14 @@ msgid "Display Tile Names (Hold Alt Key)"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected texture? This will remove all tiles which use it."
-msgstr "Odstranit aktuální texturu z TileSetu"
+msgstr ""
+"Odstranit vybranou texturu? Toto odstraní všechny dlaždice, které ji "
+"používají."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "You haven't selected a texture to remove."
-msgstr ""
+msgstr "Nevybrali jste texturu k odstranění."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from scene? This will overwrite all current tiles."
@@ -6732,9 +7009,8 @@ msgid "Merge from scene?"
msgstr "SlouÄit ze scény?"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Texture"
-msgstr "Odstranit šablonu"
+msgstr "Odstranit texturu"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "%s file(s) were not added because was already on the list."
@@ -6759,9 +7035,8 @@ msgid ""
msgstr "Vytvořit složku"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Delete polygon."
-msgstr "Odstranit body"
+msgstr "Smazat polygon."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -6797,18 +7072,16 @@ msgid "Set Tile Region"
msgstr "Oblast textury"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Tile"
-msgstr "Vytvořit složku"
+msgstr "Vytvořit dlaždici"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Icon"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Tile Bitmask"
-msgstr "Editovat filtry"
+msgstr "Upravit bitovou masku dlaždice"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -6826,9 +7099,8 @@ msgid "Edit Navigation Polygon"
msgstr "VytvoÅ™it navigaÄní polygon"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Paste Tile Bitmask"
-msgstr "Vložit animaci"
+msgstr "Vložit bitovou masku dlaždice"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Clear Tile Bitmask"
@@ -6836,8 +7108,17 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Přesunout polygon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Přesunout polygon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
-msgstr "Odstranit šablonu"
+msgstr "Odstranit dlaždici"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -6878,9 +7159,30 @@ msgid "This property can't be changed."
msgstr "Tato vlastnost nemůže být změněna."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "TileSet"
-msgstr "Soubor:"
+msgstr "TileSet"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "VisualShader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplikovat uzel/uzly"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
@@ -6898,6 +7200,16 @@ msgstr "Světlo"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Editovat filtry"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Změny shaderu"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Spustitelný"
@@ -6912,8 +7224,17 @@ msgid "Delete preset '%s'?"
msgstr "Odstranit předvolbu '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Exportní šablony pro tuto platformu chybí nebo jsou poškozené:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
msgid "Release"
@@ -6924,6 +7245,15 @@ msgid "Exporting All"
msgstr "Exportování všeho"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "Cesta neexistuje."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Exportní šablony pro tuto platformu chybí nebo jsou poškozené:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Předvolby"
@@ -6932,9 +7262,8 @@ msgid "Add..."
msgstr "Přidat..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Path"
-msgstr "Exportovat projekt"
+msgstr "Exportovat cestu"
#: editor/project_export.cpp
msgid "Resources"
@@ -6981,33 +7310,31 @@ msgstr ""
#: editor/project_export.cpp
msgid "Features"
-msgstr ""
+msgstr "Funkce"
#: editor/project_export.cpp
msgid "Custom (comma-separated):"
-msgstr ""
+msgstr "Vlastní (oddÄ›lené Äárkou):"
#: editor/project_export.cpp
msgid "Feature List:"
msgstr "Seznam funkcí:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Script"
-msgstr "Nový skript"
+msgstr "Skript"
#: editor/project_export.cpp
-#, fuzzy
msgid "Script Export Mode:"
-msgstr "Expertní režim:"
+msgstr "Režim exportu skriptů:"
#: editor/project_export.cpp
msgid "Text"
-msgstr ""
+msgstr "Text"
#: editor/project_export.cpp
msgid "Compiled"
-msgstr ""
+msgstr "Zkompilovaný"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
@@ -7015,7 +7342,7 @@ msgstr ""
#: editor/project_export.cpp
msgid "Invalid Encryption Key (must be 64 characters long)"
-msgstr ""
+msgstr "Neplatný Å¡ifrovací klÃ­Ä (musí být dlouhý 64 znaků)"
#: editor/project_export.cpp
msgid "Script Encryption Key (256-bits as hex):"
@@ -7023,17 +7350,15 @@ msgstr ""
#: editor/project_export.cpp
msgid "Export PCK/Zip"
-msgstr ""
+msgstr "Exportovat PCK/Zip"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export mode?"
-msgstr "Expertní režim:"
+msgstr "Režim exportu?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All"
-msgstr "Exportovat"
+msgstr "Exportovat vše"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
@@ -7049,15 +7374,15 @@ msgstr "Cesta neexistuje."
#: editor/project_manager.cpp
msgid "Invalid '.zip' project file, does not contain a 'project.godot' file."
-msgstr ""
+msgstr "Neplatný projektový '.zip' soubor; neobsahuje soubor 'project.godot'."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
-msgstr ""
+msgstr "Zvolte prosím prázdnou složku."
#: editor/project_manager.cpp
msgid "Please choose a 'project.godot' or '.zip' file."
-msgstr ""
+msgstr "Zvolte prosím soubor 'project.godot' nebo '.zip'."
#: editor/project_manager.cpp
msgid "Directory already contains a Godot project."
@@ -7068,9 +7393,8 @@ msgid "Imported Project"
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid Project Name."
-msgstr "Jméno projektu:"
+msgstr "Neplatný název projektu."
#: editor/project_manager.cpp
msgid "Couldn't create folder."
@@ -7196,9 +7520,8 @@ msgid "Unnamed Project"
msgstr "Nepojmenovaný projekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project at '%s'."
-msgstr "Nelze otevřít projekt"
+msgstr "Nelze otevřít projekt v '%s'."
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -7206,6 +7529,19 @@ msgstr "Jste si jisti, že chcete otevřit více než jeden projekt?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7316,7 +7652,6 @@ msgid "Mouse Button"
msgstr "TlaÄítko myÅ¡i"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid ""
"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'"
@@ -7342,9 +7677,8 @@ msgid "Add Input Action Event"
msgstr ""
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "All Devices"
-msgstr "Zařízení"
+msgstr "Všechna zařízení"
#: editor/project_settings_editor.cpp
msgid "Device"
@@ -7480,13 +7814,12 @@ msgid "Delete Item"
msgstr "Odstranit položku"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid ""
"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'."
msgstr ""
"Neplatné jméno akce. Nesmí být prázdné nebo obsahovat '/', ':', '=', '\\' "
-"nebo '\"'"
+"nebo '\"'."
#: editor/project_settings_editor.cpp
msgid "Already existing"
@@ -7570,9 +7903,8 @@ msgid "Action:"
msgstr "Akce:"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Action"
-msgstr "Akce:"
+msgstr "Akce"
#: editor/project_settings_editor.cpp
msgid "Deadzone"
@@ -7707,9 +8039,8 @@ msgid "Can't load back converted image using PVRTC tool:"
msgstr ""
#: editor/rename_dialog.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Batch Rename"
-msgstr "Rozlišovat malá/velká"
+msgstr "Dávkové přejmenování"
#: editor/rename_dialog.cpp
msgid "Prefix"
@@ -7720,9 +8051,8 @@ msgid "Suffix"
msgstr "Sufix"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Advanced options"
-msgstr "Možnosti přichytávání"
+msgstr "PokroÄilé možnosti"
#: editor/rename_dialog.cpp
msgid "Substitute"
@@ -7764,7 +8094,7 @@ msgstr ""
#: editor/rename_dialog.cpp
msgid "Initial value for the counter"
-msgstr ""
+msgstr "PoÄáteÄní hodnota pro poÄítadlo"
#: editor/rename_dialog.cpp
msgid "Step"
@@ -7783,6 +8113,8 @@ msgid ""
"Minimum number of digits for the counter.\n"
"Missing digits are padded with leading zeros."
msgstr ""
+"Minimální poÄet Äíslic poÄítadla.\n"
+"ChybÄ›jící Äíslice budou nahrazeny nulami."
#: editor/rename_dialog.cpp
msgid "Regular Expressions"
@@ -7817,9 +8149,8 @@ msgid "To Uppercase"
msgstr "Na velká písmena"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Reset"
-msgstr "Obnovit původní přiblížení"
+msgstr "Resetovat"
#: editor/rename_dialog.cpp
msgid "Error"
@@ -7916,6 +8247,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Dává smysl!"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Odstranit uzel/uzly?"
@@ -7951,28 +8287,28 @@ msgid "Make Local"
msgstr "Místní"
#: editor/scene_tree_dock.cpp
-#, fuzzy
+msgid "New Scene Root"
+msgstr "Nový kořen scény"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
-msgstr "Vytvořit uzel"
+msgstr "Vytvořit kořenový uzel:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "2D Scene"
-msgstr "Scéna"
+msgstr "2D scéna"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "3D Scene"
-msgstr "Scéna"
+msgstr "3D scéna"
#: editor/scene_tree_dock.cpp
msgid "User Interface"
-msgstr ""
+msgstr "Uživatelské rozhraní"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Custom Node"
-msgstr "Vyjmout uzly"
+msgstr "Vlastní uzel"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
@@ -8013,9 +8349,8 @@ msgid "Clear Inheritance"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Open documentation"
-msgstr "Otevřít Godot online dokumentaci"
+msgstr "Otevřít dokumentaci"
#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
@@ -8113,7 +8448,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp editor/script_create_dialog.cpp
-#, fuzzy
msgid "Open Script"
msgstr "Otevřít skript"
@@ -8185,9 +8519,8 @@ msgid "Path is empty"
msgstr "Cesta je prázdná"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Filename is empty"
-msgstr "Sprite je prázdný!"
+msgstr "Název souboru je prázdný"
#: editor/script_create_dialog.cpp
msgid "Path is not local"
@@ -8244,7 +8577,7 @@ msgstr "Vytvořit nový soubor skriptu"
#: editor/script_create_dialog.cpp
msgid "Load existing script file"
-msgstr ""
+msgstr "NaÄíst existující soubor skriptu"
#: editor/script_create_dialog.cpp
msgid "Language"
@@ -8375,6 +8708,21 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Zkratky"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "Zkratky"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Upravit kotvy"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Zkratky"
@@ -8589,6 +8937,11 @@ msgid "GridMap Duplicate Selection"
msgstr "GridMap Duplikovat výběr"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "Nastavení GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8727,13 +9080,8 @@ msgid "Build Project"
msgstr "Sestavit projekt"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Varování"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
-#, fuzzy
msgid "View log"
-msgstr "Zobrazit soubory"
+msgstr "Zobrazit logy"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -8897,10 +9245,6 @@ msgid "Change Expression"
msgstr "Změnit výraz"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Přidat uzel"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Odstranit uzly VisualScriptu"
@@ -8989,6 +9333,11 @@ msgid "Change Input Value"
msgstr "Změnit vstupní hodnotu"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Změnit velikost CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9407,6 +9756,13 @@ msgid ""
msgstr ""
"Uzel ParallaxLayer funguje pouze když je dítětem uzlu ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9551,6 +9907,12 @@ msgstr ""
"Aby CollisionShape mohl fungovat, musí mu být poskytnut tvar. Vytvořte mu "
"prosím zdroj tvar!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9565,6 +9927,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9581,6 +9949,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9614,23 +9989,6 @@ msgstr ""
"Aby ParticleAttractor2D fungoval, musí vlastnost path ukazovat na platný "
"uzel Particles2D."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Na každou scénu (nebo skupinu instancovaných scén) je povolen pouze jeden "
-"WorldEnvironment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9660,6 +10018,23 @@ msgstr ""
"VehicleWheel slouží jako systém kol pro VehicleBody. Použijte ho prosím jako "
"potomka VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Na každou scénu (nebo skupinu instancovaných scén) je povolen pouze jeden "
+"WorldEnvironment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9704,13 +10079,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "RAW mód"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Přidat aktuální barvu jako předvolbu"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Pozor!"
@@ -9719,6 +10111,11 @@ msgstr "Pozor!"
msgid "Please Confirm..."
msgstr "PotvrÄte prosím..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Jít na nadřazenou složku"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9801,6 +10198,22 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Varování:"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Pohled zepředu"
+
+#~ msgid "Line:"
+#~ msgstr "Řádek:"
+
+#~ msgid "Col:"
+#~ msgstr "Sloupec:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "OrientedPathFollow funguje pouze když je dítětem uzlu Path."
@@ -9932,10 +10345,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Konvertovat na malá písmena"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Přichytit k mřížce"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "OtoÄit o 0 stupňů"
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 6c6f3152db..e803f4826f 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -91,6 +91,16 @@ msgstr "Duplikér valgte nøgle(r)"
msgid "Delete Selected Key(s)"
msgstr "Slet valgte nøgle(r)"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Tilføj punkt"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Fjern punkt"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Dublikér Nøgle"
@@ -120,6 +130,16 @@ msgid "Anim Change Call"
msgstr "Anim Skift Call"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Ændre Animation Navn:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Egenskabsbane"
@@ -169,6 +189,11 @@ msgid "Anim Clips:"
msgstr "Anim klip:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Ændre Array-Værdi"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Slå spor til/fra."
@@ -193,6 +218,10 @@ msgid "Time (s): "
msgstr "Tid (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Kontinuerlig"
@@ -243,6 +272,21 @@ msgid "Delete Key(s)"
msgstr "Slet nøgle(r)"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Ændre Animation Navn:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Interpolationsmetode"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Ændre Anim Løkke"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Fjern Anim Spor"
@@ -284,6 +328,16 @@ msgid "Anim Insert Key"
msgstr "Anim Indsæt Nøgle"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Ændre Animation Navn:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Flytte om på Autoloads"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Transformeringsspor kan kun anvendes på rumlige noder."
@@ -313,6 +367,11 @@ msgid "Not possible to add a new track without a root"
msgstr "Det er ikke muligt at tilføje et nyt spor uden en rod"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Tilføj Spor"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Sporstien er ugyldig, så kan ikke tilføje en nøgle."
@@ -321,10 +380,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Spor er ikke af typen Spatial, kan ikke indsætte nøgle"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3D-transformationsspor"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Tilføj Spor"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "Sporstien er ugyldig, så kan ikke tilføje en metode nøgle."
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Kald metode spor"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Metode ikke fundet i objekt: "
@@ -337,6 +411,10 @@ msgid "Clipboard is empty"
msgstr "Udklipsholder er tom"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Indsæt Spor"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Skaler Nøgler"
@@ -381,10 +459,6 @@ msgid "Copy Tracks"
msgstr "Kopier Spor"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Indsæt Spor"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Skalér Valgte"
@@ -484,6 +558,19 @@ msgstr "Vælg spor til kopiering:"
msgid "Copy"
msgstr "Kopier"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Lydklip:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Ændre størrelsen på Array"
@@ -548,21 +635,13 @@ msgstr "Zoom Ud"
msgid "Reset Zoom"
msgstr "Nulstil Zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Advarsler:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Skrifttype Størrelse:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linje:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kol:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -864,8 +943,8 @@ msgstr "Slet markerede filer?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Slet"
@@ -1121,8 +1200,9 @@ msgid "Add Bus"
msgstr "Tilføj Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Opret et nyt Bus Layout."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Gem Audio Bus Layout Som..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1150,6 +1230,10 @@ msgstr "Indlæs Default"
msgid "Load the default Bus Layout."
msgstr "Indlæs standard Bus Layout."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Opret et nyt Bus Layout."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ugyldigt navn."
@@ -1298,6 +1382,26 @@ msgstr ""
msgid "Packing"
msgstr "Pakker"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1344,7 +1448,7 @@ msgstr "Vis i Filhåndtering"
msgid "New Folder..."
msgstr "Opret mappe..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Opdater"
@@ -1419,10 +1523,35 @@ msgstr "Flyt Favorit Op"
msgid "Move Favorite Down"
msgstr "Flyt Favorit Ned"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Forrige fane"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Opret Mappe"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "GÃ¥ til overliggende mappe"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Kunne ikke oprette mappe."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Vis emner som et gitter af miniaturebilleder"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Vis emner som en liste"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Mapper & Filer:"
@@ -1646,9 +1775,9 @@ msgstr "Ryd Output"
msgid "Project export failed with error code %d."
msgstr "Projekt eksport fejlede med fejlkode %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Fejl, kan ikke gemme ressource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1656,6 +1785,16 @@ msgid "OK"
msgstr "Ok"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Fejl, kan ikke gemme ressource!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Gem Ressource Som..."
@@ -1873,6 +2012,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Gem ændringer til '%s' før lukning?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Fejler med at indlæse ressource."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Gem Scene Som..."
@@ -2392,7 +2540,8 @@ msgid "Save & Restart"
msgstr "Gem & genstart"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Snurrer når editor vinduer gentegnes!"
#: editor/editor_node.cpp
@@ -2946,16 +3095,6 @@ msgstr "Kan ikke navigere til '%s' da det ikke blev fundet i filsystemet!"
#: editor/filesystem_dock.cpp
#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Vis emner som et gitter af miniaturebilleder"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Vis emner som en liste"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"\n"
@@ -3110,10 +3249,6 @@ msgid "Search files"
msgstr "Søg Classes"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3481,25 +3616,6 @@ msgid "Create Polygon"
msgstr "Opret Poly"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Rediger Poly"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Indsæt Punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Rediger Poly (Fjern Punkt)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Fjern Poly og Punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3524,6 +3640,25 @@ msgstr ""
msgid "Erase points."
msgstr "Slet points"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Rediger Poly"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Indsæt Punkt"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Rediger Poly (Fjern Punkt)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Fjern Poly og Punkt"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3542,12 +3677,47 @@ msgstr "Indlæs"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Fjern punkt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Tilføj Node"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Tilføj animation"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Fjern Poly og Punkt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3589,6 +3759,29 @@ msgid "Triangle already exists"
msgstr "FEJL: Animationsnavn eksisterer allerede!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Tilføj variabel"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Fjern Poly og Punkt"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Fjern Variabel"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3597,6 +3790,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Skift AutoIndlæs Globalt"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3614,6 +3812,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Skift Shader"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Rediger filtre"
@@ -3623,11 +3826,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Tilføj Node(r) fra Tree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Node Navn:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Tilsluttet"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Afbrudt"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Ny Animation Navn:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Vælg Node"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Slå spor til/fra."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Ændret Lokalfilter"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3643,6 +3890,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Node Navn:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3880,6 +4133,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Flyt Node(s)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Overgang"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Tilføj Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3909,6 +4177,20 @@ msgid "No playback resource set at path: %s."
msgstr "Ikke i stien for ressource."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Fjern"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Overgang"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4329,6 +4611,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4715,6 +5007,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4973,19 +5269,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5077,11 +5373,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5242,6 +5538,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Opret Poly"
@@ -5895,6 +6197,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Spil Brugerdefineret Scene"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Singleton"
@@ -6006,10 +6317,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6054,7 +6361,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6147,6 +6454,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6155,6 +6468,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "Vælg Mode (Q)\n"
@@ -6369,7 +6686,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6437,10 +6754,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6449,8 +6762,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Tilføj animation"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Ny Animation Navn:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6461,8 +6780,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Ny Animation Navn:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6757,6 +7077,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Forrige fane"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6772,6 +7109,11 @@ msgstr "Slet points"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Opret Ny %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Opret Poly"
@@ -6907,6 +7249,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Opret Poly"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Fjern Template"
@@ -6956,6 +7307,28 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Sæt som Standard for '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Dublikér nøgle(r)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6972,6 +7345,16 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Rediger filtre"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Skift Shader"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6985,7 +7368,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6998,6 +7390,14 @@ msgid "Exporting All"
msgstr "Eksporter"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7283,6 +7683,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7990,6 +8403,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Gem Scene"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8025,6 +8443,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Gem Scene"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Opret Mappe"
@@ -8450,6 +8873,19 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Slet valgte"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8660,6 +9096,10 @@ msgid "GridMap Duplicate Selection"
msgstr "GridMap Duplikér Markerede"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8802,10 +9242,6 @@ msgid "Build Project"
msgstr "Projekt"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Vis filer"
@@ -8972,10 +9408,6 @@ msgid "Change Expression"
msgstr "Skift udtryk"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Tilføj Node"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Fjern VisualScript Nodes"
@@ -9058,6 +9490,10 @@ msgid "Change Input Value"
msgstr "Ændre Input Værdi"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9481,6 +9917,13 @@ msgstr ""
"ParallaxLayer node virker kun, når den angives som barn af en "
"ParallaxBackground node."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9621,6 +10064,12 @@ msgstr ""
"En figur skal gives for at CollisionShape fungerer. Opret en figur ressource "
"til det!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9635,6 +10084,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9651,6 +10106,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9683,23 +10145,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Stien skal pege på en gyldig fysisk node for at virke."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Kun én WorldEnvironment er tilladt pr. scene (eller et sæt af instanserede "
-"scener)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9725,6 +10170,23 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Kun én WorldEnvironment er tilladt pr. scene (eller et sæt af instanserede "
+"scener)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9771,11 +10233,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9786,6 +10264,11 @@ msgstr "Advarsel!"
msgid "Please Confirm..."
msgstr "Bekræft venligst..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "GÃ¥ til overliggende mappe"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9866,6 +10349,18 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Warnings:"
+#~ msgstr "Advarsler:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Skrifttype Størrelse:"
+
+#~ msgid "Line:"
+#~ msgstr "Linje:"
+
+#~ msgid "Col:"
+#~ msgstr "Kol:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
@@ -10010,9 +10505,6 @@ msgstr ""
#~ msgid "Change Anim Len"
#~ msgstr "Ændre Anim Længde"
-#~ msgid "Change Anim Loop"
-#~ msgstr "Ændre Anim Løkke"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "Anim Opret Indtastet Værdi Nøgle"
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 38f480d548..81a69d2add 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -36,11 +36,14 @@
# asyncial <mahlburg@posteo.de>, 2018.
# ssantos <ssantos@web.de>, 2018.
# Rémi Verschelde <akien@godotengine.org>, 2019.
+# Martin <martinreininger@gmx.net>, 2019.
+# Andreas During <anduring@web.de>, 2019.
+# Arthur S. Muszynski <artism90@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
"Last-Translator: So Wieso <sowieso@dukun.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
@@ -49,7 +52,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -66,7 +69,7 @@ msgstr ""
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr "Ungültige Eingabe %i (nicht bestanden) in Ausdruck"
+msgstr "Ungültige Eingabe %i (nicht übergeben) im Ausdruck"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -117,6 +120,14 @@ msgstr "Ausgewählte Schlüssel duplizieren"
msgid "Delete Selected Key(s)"
msgstr "Ausgewählte Schlüssel löschen"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Bezierpunkt hinzufügen"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Bezierpunkt verschieben"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Schlüsselbild duplizieren"
@@ -146,6 +157,15 @@ msgid "Anim Change Call"
msgstr "Aufruf ändern"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Animationslänge ändern"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Bearbeite Animationsschleife"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Eigenschaftenspur"
@@ -195,6 +215,10 @@ msgid "Anim Clips:"
msgstr "Animationsschnipsel:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Spurpfad ändern"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Diese Spur an-/abschalten."
@@ -219,6 +243,10 @@ msgid "Time (s): "
msgstr "Zeit (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Spur ein-/ausschalten"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Fortlaufend"
@@ -269,6 +297,18 @@ msgid "Delete Key(s)"
msgstr "Schlüsselbilder entfernen"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Animationsaktualisierungsmoduls ändern"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Animationsinterpolationsmodus ändern"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Animationswiederholungsmodus ändern"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Spur entfernen"
@@ -310,6 +350,14 @@ msgid "Anim Insert Key"
msgstr "Schlüsselbild einfügen"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Animationsschrittweite ändern"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Spuren neu anordnen"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Transformationsspuren gelten nur für Nodes die auf Spatial basieren."
@@ -339,6 +387,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Ohne eine Wurzel kann keine neue Spur hinzugefügt werden"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Bezierspur hinzufügen"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Spurpfad ist ungültig, Schlüssel kann nicht hinzugefügt werden."
@@ -348,11 +400,23 @@ msgstr ""
"Spur ist nicht vom Typ Spatial, Schlüssel kann nicht hinzugefügt werden"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Transformationsspurschlüssel hinzufügen"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Spurschlüssel hinzufügen"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
"Spurpfad ist ungültig, Methoden-Schlüssel kann nicht hinzugefügt werden."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Methodenaufrufsspurschlüssel hinzufügen"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Methode nicht im Objekt gefunden: "
@@ -365,6 +429,10 @@ msgid "Clipboard is empty"
msgstr "Zwischenablage ist leer"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Spuren einfügen"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Schlüsselbilder skalieren"
@@ -409,10 +477,6 @@ msgid "Copy Tracks"
msgstr "Spuren kopieren"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Spuren einfügen"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Auswahl skalieren"
@@ -512,6 +576,18 @@ msgstr "Zu kopierende Spuren auswählen:"
msgid "Copy"
msgstr "Kopieren"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Tonspurclip hinzufügen"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Tonspurclip-Startversatz ändern"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Tonspurclip-Endversatz ändern"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Größe des Arrays ändern"
@@ -576,33 +652,25 @@ msgstr "Verkleinern"
msgid "Reset Zoom"
msgstr "Vergrößerung zurücksetzen"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Warnungen:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Schriftgröße:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Zeile:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Warnungen"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Spalte:"
+msgid "Line and column numbers."
+msgstr "Zeilen- und Spaltennummern."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
-msgstr "In der Ziel-Node muss eine Methode angegeben werden!"
+msgstr "Im Ziel-Node muss eine Methode angegeben werden!"
#: editor/connections_dialog.cpp
msgid ""
"Target method not found! Specify a valid method or attach a script to target "
"Node."
msgstr ""
-"Zielmethode nicht gefunden! Bitte geben Sie eine gültige Methode an oder "
-"fügen Sie ein Skript zur Ziel-Node hinzu."
+"Zielmethode nicht gefunden! Bitte eine gültige Methode angeben oder ein "
+"Skript dem Ziel-Node anhängen."
#: editor/connections_dialog.cpp
msgid "Connect To Node:"
@@ -633,7 +701,7 @@ msgstr "Zusätzliche Aufrufparameter:"
#: editor/connections_dialog.cpp
msgid "Path to Node:"
-msgstr "Pfad zur Node:"
+msgstr "Pfad zum Node:"
#: editor/connections_dialog.cpp
msgid "Make Function"
@@ -895,8 +963,8 @@ msgstr "Ausgewählte Dateien löschen?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Löschen"
@@ -1007,12 +1075,12 @@ msgstr "Inhalte werden entpackt"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Package installed successfully!"
-msgstr "Paket erfolgreich installiert!"
+msgstr "Paket wurde erfolgreich installiert!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr "Erfolgreich!"
+msgstr "Geschafft!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1153,8 +1221,8 @@ msgid "Add Bus"
msgstr "Audiobus hinzufügen"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Neues Audiobus-Layout erstellen."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Neuen Audio-Bus diesem Layout hinzufügen."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1182,6 +1250,10 @@ msgstr "Standard laden"
msgid "Load the default Bus Layout."
msgstr "Standard Bus-Layout laden."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Neues Audiobus-Layout erstellen."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ungültiger Name."
@@ -1331,6 +1403,33 @@ msgstr "Keine Exportvorlagen am erwarteten Pfad gefunden:"
msgid "Packing"
msgstr "Packe"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"Die Zielplattform benötigt ‚ETC‘-Texturkompression für GLES2. Bitte in den "
+"Projekteinstellungen ‚Import Etc‘ aktivieren."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"Die Zielplattform benötigt ‚ETC2‘-Texturkompression für GLES2. Bitte in den "
+"Projekteinstellungen aktivieren."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"Die Zielplattform benötigt ‚ETC‘-Texturkompression für den Treiber-Fallback "
+"auf GLES2. Bitte ‚Import Etc‘ in den Projekteinstellungen aktivieren oder ‚"
+"Driver Fallback Enabled‘ ausschalten."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1376,7 +1475,7 @@ msgstr "Im Dateimanager anzeigen"
msgid "New Folder..."
msgstr "Neuer Ordner..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Aktualisieren"
@@ -1451,10 +1550,30 @@ msgstr "Favorit nach oben schieben"
msgid "Move Favorite Down"
msgstr "Favorit nach unten schieben"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr "Vorheriger Ordner"
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr "Nächster Ordner"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Gehe zu übergeordnetem Ordner"
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr "Gegenwärtigen Ordner (de)favorisieren."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Einträge in Vorschaugitter anzeigen."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Einträge als Liste anzeigen."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Verzeichnisse & Dateien:"
@@ -1653,7 +1772,7 @@ msgstr "Setze"
#: editor/editor_inspector.cpp
msgid "Set Multiple:"
-msgstr "Setze mehrere:"
+msgstr "Mehrfach einstellen:"
#: editor/editor_log.cpp
msgid "Output:"
@@ -1677,9 +1796,9 @@ msgstr "Ausgabe löschen"
msgid "Project export failed with error code %d."
msgstr "Projekt-Export ist fehlgeschlagen mit Fehlercode %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Fehler beim speichern der Ressource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr "Importierte Ressourcen können nicht abgespeichert werden."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1687,6 +1806,18 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Fehler beim speichern der Ressource!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+"Diese Ressource kann nicht abgespeichert werden, da sie nicht Teil der "
+"bearbeiteten Szene ist. Ressource muss vorher einzigartig gemacht werden."
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Speichere Ressource als..."
@@ -1910,6 +2041,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "Änderungen in ‚%s‘ vor dem Schließen speichern?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "%s veränderte Ressource(n) gespeichert."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Ein Wurzel-Node wird benötigt um diese Szene zu speichern."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Szene speichern als..."
@@ -2189,7 +2328,7 @@ msgstr "Mesh-Bibliothek..."
#: editor/editor_node.cpp
msgid "TileSet..."
-msgstr "Tile Set…"
+msgstr "TileSet…"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
@@ -2440,8 +2579,8 @@ msgid "Save & Restart"
msgstr "Speichern & Neu starten"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "Dreht sich, wenn das Editorfenster neu gezeichnet wird!"
+msgid "Spins when the editor window redraws."
+msgstr "Dreht sich, wenn das Editorfenster neu gezeichnet wird."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2648,7 +2787,7 @@ msgstr "[leer]"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
msgid "Assign..."
-msgstr "Zuweisen.."
+msgstr "Zuweisen..."
#: editor/editor_properties.cpp
msgid "Invalid RID"
@@ -3007,14 +3146,6 @@ msgstr ""
"wurde!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Einträge in Vorschaugitter anzeigen."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Einträge als Liste anzeigen."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Status: Dateiimport fehlgeschlagen. Manuelle Reparatur und Neuimport nötig."
@@ -3151,10 +3282,6 @@ msgid "Search files"
msgstr "Dateien suchen"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instantiiere gewählte Szene(n) als Unterobjekt des ausgewählten Nodes."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3368,17 +3495,20 @@ msgstr "Neuimport"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Szenen speichern, reimportieren und neu starten"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Das Ändern des Video-Treibers erfordert einen Neustart des Editors."
+msgstr ""
+"Den Typ einer importierten Datei zu ändern erfordert einen Neustart des "
+"Editors."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"ACHTUNG: Es existieren Inhalte die diese Ressource nutzen und nachher "
+"möglicherweise nicht mehr ordnungsgemäß laden können."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3503,22 +3633,6 @@ msgid "Create Polygon"
msgstr "Polygon erstellen"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Polygon bearbeiten"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Punkt einfügen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Polygon bearbeiten (Punkt entfernen)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Polygon und Punkt entfernen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3539,6 +3653,22 @@ msgstr ""
msgid "Erase points."
msgstr "Punkte löschen."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Polygon bearbeiten"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Punkt einfügen"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Polygon bearbeiten (Punkt entfernen)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Polygon und Punkt entfernen"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3556,10 +3686,41 @@ msgstr "Lade..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "Node-Punkt verschieben"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "BlendSpace1D-Grenzwerte ändern"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "BlendSpace1D-Beschriftungen ändern"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
-"Dieser Node-Type kann nicht verwendet werden. Nur Wurzel-Nodes sind möglich."
+"Dieser Node-Typ kann nicht verwendet werden. Nur Wurzel-Nodes sind möglich."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "Node-Punkt hinzufügen"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "Animationspunkt hinzufügen"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "BlendSpace1D-Punkt entfernen"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "BlendSpace1D-Node-Punkt verschieben"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -3605,6 +3766,26 @@ msgid "Triangle already exists"
msgstr "Dreieck existiert bereits"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Dreieck hinzufügen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "BlendSpace2D-Grenzwerte ändern"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "BlendSpace2D-Beschriftungen ändern"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "BlendSpace2D-Punkt entfernen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "BlendSpace2D-Dreieck entfernen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D gehört nicht zu einem AnimationTree-Node."
@@ -3613,6 +3794,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Es existieren keine Dreiecke, Vermischen nicht möglich."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "Automatische Dreiecke umschalten"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Dreiecke durch Punkteverbinden herstellen."
@@ -3630,6 +3815,10 @@ msgid "Blend:"
msgstr "Blende:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Parameter geändert"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Filter bearbeiten"
@@ -3639,6 +3828,15 @@ msgid "Output node can't be added to the blend tree."
msgstr "Ausgabe-Node kann nicht zum Mischungsbaum hinzugefügt werden."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Node zu BlendTree hinzufügen"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Node verschoben"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3646,6 +3844,33 @@ msgstr ""
"Verbindung ist ungültig."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Nodes verbunden"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Nodes getrennt"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Animation setzen"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Node löschen"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "Filter ein-/ausschalten"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Filter ändern"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Kein Animationsspieler festgelegt, Spurnamen können nicht abgerufen werden."
@@ -3665,9 +3890,14 @@ msgstr ""
"nicht abgerufen werden."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Node umbenannt"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
-msgstr "Knoten hinzufügen....."
+msgstr "Knoten hinzufügen..."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/root_motion_editor_plugin.cpp
@@ -3778,7 +4008,7 @@ msgstr "Position der Animation (in Sekunden)."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Scale animation playback globally for the node."
-msgstr "Animationsablauf für dieses Node global skalieren."
+msgstr "Animationsablauf für diesen Node global skalieren."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Tools"
@@ -3890,6 +4120,19 @@ msgid "Cross-Animation Blend Times"
msgstr "Übergangszeiten kreuzender Animationen"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Node verschieben"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Übergang hinzufügen"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Node hinzufügen"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Ende"
@@ -3918,6 +4161,18 @@ msgid "No playback resource set at path: %s."
msgstr "Keine Abspiel-Ressource festgelegt im Pfad: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Node entfernt"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Übergang entfernt"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Start-Node setzen (Automatisches Abspielen)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -3937,7 +4192,7 @@ msgstr "Nodes verbinden."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Remove selected node or transition."
-msgstr "Ausgewähltes Node oder Übergang entfernen."
+msgstr "Ausgewählten Node oder Übergang entfernen."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Toggle autoplay this animation on start, restart or seek to zero."
@@ -4058,15 +4313,15 @@ msgstr "Misch-Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend2 Node"
-msgstr "Blende2-Node"
+msgstr "Blend2-Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend3 Node"
-msgstr "Blende3-Node"
+msgstr "Blend3-Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend4 Node"
-msgstr "Blende4-Node"
+msgstr "Blend4-Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeScale Node"
@@ -4078,7 +4333,7 @@ msgstr "Zeitsuch-Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Transition Node"
-msgstr "Übergangs-Node"
+msgstr "Übergang-Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Import Animations..."
@@ -4342,6 +4597,18 @@ msgid "Move CanvasItem"
msgstr "CanvasItem verschieben"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Voreinstellungen für die Anker- und Ränderwerte eines Kontroll-Nodes."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Bei Containern für Kinder werden die Anker- und Randwerte von ihren Eltern "
+"überschrieben."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "nur Anker"
@@ -4629,7 +4896,7 @@ msgid ""
"Drag & drop + Alt : Change node type"
msgstr ""
"Ziehen + Umschalt: Node auf gleicher Ebene einfügen\n"
-"Ziehen + Alt: Nodetyp ändern"
+"Ziehen + Alt: Node-Typ ändern"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Polygon3D"
@@ -4729,6 +4996,10 @@ msgstr "Umsch halten um Tangenten einzeln zu bearbeiten"
msgid "Bake GI Probe"
msgstr "GI Sonde vorrendern"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Gradient bearbeitet"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Element %d"
@@ -4987,6 +5258,10 @@ msgid "Generating Visibility Rect"
msgstr "Generiere Sichtbarkeits-Rechteck"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Generiere Sichtbarkeits-Rechteck"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Punkt kann nur in ein Prozessmaterial des Typs ParticlesMaterial gesetzt "
@@ -5001,10 +5276,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Keine Pixel mit einer Transparenz > 128 im Bild..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Generiere Sichtbarkeits-Rechteck"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Emissionsmaske laden"
@@ -5092,13 +5363,13 @@ msgid "Generating AABB"
msgstr "Erzeuge AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Erzeuge AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Erzeuge Sichtbarkeits-AABB"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Erzeuge AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Punkt von Kurve entfernen"
@@ -5235,7 +5506,7 @@ msgstr "Gelenk verschieben"
msgid ""
"The skeleton property of the Polygon2D does not point to a Skeleton2D node"
msgstr ""
-"Die Skeleton-Eigenschaft des Polygon2Ds zeigt nicht auf ein Skeleton2D-Node"
+"Die Skeleton-Eigenschaft des Polygon2D zeigt nicht auf ein Skeleton2D-Node"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Sync Bones"
@@ -5254,6 +5525,14 @@ msgid "Create UV Map"
msgstr "Erzeuge UV-Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"Dieses Polygon2D enthält interne Vertices, es kann nicht mehr im Viewport "
+"bearbeitet werden."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Polygon und UV erstellen"
@@ -5874,6 +6153,14 @@ msgstr ""
"hinzugefügt werden."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Ruhe-Pose aus Knochen erstellen"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Knochen in Ruhe-Pose setzen"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Skeleton2D"
@@ -5982,10 +6269,6 @@ msgid "Vertices"
msgstr "Vertices"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Sicht von oben."
@@ -6030,16 +6313,17 @@ msgid "Rear"
msgstr "Hinten"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr "Auf Sicht ausrichten"
+msgid "Align with View"
+msgstr "Mit Sicht ausrichten"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
-msgstr "Kein Node unter dem Unterobjekt instantiiert werden könnte vorhanden."
+msgstr ""
+"Kein Node, unter dem Unterobjekt instantiiert werden könnte, vorhanden."
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "This operation requires a single selected node."
-msgstr "Diese Aktion benötigt ein einzelnes ausgewähltes Node."
+msgstr "Diese Aktion benötigt einen einzelnen ausgewählten Node."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
@@ -6122,6 +6406,14 @@ msgid "Freelook Speed Modifier"
msgstr "Freisicht Geschwindigkeitsregler"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"Hinweis: Die FPS-Anzeige stellt die Editor-Framerate dar.\n"
+"Sie ist kein zuverlässiger Vergleichswert für die In-Spiel-Leistung."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Sichtrotation gesperrt"
@@ -6130,6 +6422,10 @@ msgid "XForm Dialog"
msgstr "Transformationsdialog"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Nodes am Boden einrasten"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Auswahlmodus (Q)"
@@ -6345,7 +6641,7 @@ msgid "Post"
msgstr "Nachher"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr "Namenloser Anfasser"
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6411,10 +6707,6 @@ msgid "Add Empty"
msgstr "Empty einfügen"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Bearbeite Animationsschleife"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Ändere FPS-Wert der Animation"
@@ -6423,8 +6715,12 @@ msgid "(empty)"
msgstr "(leer)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animationen"
+msgid "Animations:"
+msgstr "Animationen:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Neue Animation"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6435,8 +6731,8 @@ msgid "Loop"
msgstr "Wiederholung"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Animationsframes"
+msgid "Animation Frames:"
+msgstr "Animationsbilder:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6724,6 +7020,22 @@ msgid "Merge from Scene"
msgstr "Aus Szene zusammenführen"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr "Nächste Koordinate"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr "Die nächste Form oder Kachel auswählen."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "Vorherige Koordinate"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr "Die vorherige Form oder Kachel auswählen."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Bitmaske kopieren."
@@ -6736,6 +7048,10 @@ msgid "Erase bitmask."
msgstr "Bitmaske löschen."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Neues Rechteck erstellen."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Neues Polygon erstellen."
@@ -6763,7 +7079,7 @@ msgstr "Keine Textur zum Entfernen ausgewählt."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from scene? This will overwrite all current tiles."
-msgstr "Aus Szene erstellen? Alle gegenwärtigen Kacheln werden überschrieben."
+msgstr "Aus Szene erstellen? Alle aktuellen Kacheln werden überschrieben!"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from scene?"
@@ -6849,7 +7165,7 @@ msgstr "Kachel erstellen"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Icon"
-msgstr "Kachel-Icon setzen"
+msgstr "Kachel Icon zuweisen"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Bitmask"
@@ -6873,7 +7189,15 @@ msgstr "Kachel-Bitmaske einfügen"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Clear Tile Bitmask"
-msgstr "Kachel-Bitmaske leeren"
+msgstr "Kachel Bitmaske löschen"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr "Polygon konkav machen"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr "Polygon konvex machen"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
@@ -6916,6 +7240,26 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "Uniform-Name festlegen"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "Eingabestandardport festlegen"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Visual Shader-Node hinzufügen"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Nodes duplizieren"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "Visual-Shader-Eingabetyp geändert"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Vertex"
@@ -6931,6 +7275,14 @@ msgstr "Licht"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Visuelle Eigenschaft bearbeiten"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Visual-Shader-Modus geändert"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "ausführbar"
@@ -6944,8 +7296,22 @@ msgid "Delete preset '%s'?"
msgstr "Vorlage ‚%s‘ löschen?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Export-Vorlagen für dieses Systeme fehlen / sind fehlerhaft:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+"Export des Projekts für die Plattform ‚%s‘ fehlgeschlagen.\n"
+"Exportvorlagen scheinen zu fehlen oder ungültig zu sein."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"Export des Projekts für die Plattform ‚%s‘ fehlgeschlagen.\n"
+"Es könnte an einen fehlerhaften Einstellung in den Voreinstellungen oder den "
+"individuellen Exporteinstellugen liegen."
#: editor/project_export.cpp
msgid "Release"
@@ -6956,6 +7322,14 @@ msgid "Exporting All"
msgstr "Exportiere alles"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "Der angegebene Export-Pfad existiert nicht:"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Export-Vorlagen für dieses Systeme fehlen / sind fehlerhaft:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Vorlagen"
@@ -7188,15 +7562,15 @@ msgstr "Projektinstallationspfad:"
#: editor/project_manager.cpp
msgid "Browse"
-msgstr "Durchstöbern"
+msgstr "Durchsuchen"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Renderer:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7205,10 +7579,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Höhere Grafikqualität\n"
+"Alle Funktionen verfügbar\n"
+"Inkompatibel mit älterer Hardware\n"
+"Nicht empfohlen für Webanwendungen"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7217,10 +7595,16 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Geringere Grafikqualität\n"
+"Einige Funktionen sind nicht vorhanden\n"
+"Läuft auf fast jeder Hardware\n"
+"Empfohlen für Webanwendungen"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"Der Renderer kann auch später noch ausgetauscht werden, allerdings kann es "
+"sein, dass dann manche Szenen angepasst werden müssen."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7236,6 +7620,28 @@ msgstr "Sollen wirklich mehrere Projekte geöffnet werden?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"Die folgenden Projekteinstellungsdatei enthält keine Information darüber, "
+"mit welcher Version von Godot sie erstellt wurde.\n"
+"\n"
+"%s\n"
+"\n"
+"Wenn Sie mit dem Öffnen fortfahren, wird die Datei in das aktuelle "
+"Konfigurationsdateiformat von Godot konvertiert.\n"
+"Warnung: Das Projekt kann nach der Konvertierung nicht mehr mit einer "
+"älteren Version geöffnet werden."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7245,14 +7651,14 @@ msgid ""
"Warning: You will not be able to open the project with previous versions of "
"the engine anymore."
msgstr ""
-"Die folgende Projekteinstellungsdatei wurde mit einer älteren Godot-Version "
-"erzeugt und muss für die gegenwärtige Version angepasst werden:\n"
+"Die Projekteinstellungsdatei ist mit einer älteren Version erstellt worden "
+"und muss in die folgende Version konvertiert werden:\n"
"\n"
"%s\n"
"\n"
-"Sollen die Anpassungen vorgenommen werden?\n"
-"Achtung: Das Projekt kann nach der Anpassung nicht mehr mit einer älteren "
-"Godot-Version geöffnet werden."
+"Möchten Sie die Konvertierung durchführen?\n"
+"Warnung: Das Projekt kann nach der Konvertierung nicht mehr mit einer "
+"älteren Version geöffnet werden."
#: editor/project_manager.cpp
msgid ""
@@ -7480,7 +7886,7 @@ msgstr "Ereignis hinzufügen"
#: editor/project_settings_editor.cpp
msgid "Button"
-msgstr "Knopf"
+msgstr "Taste"
#: editor/project_settings_editor.cpp
msgid "Left Button."
@@ -7953,6 +8359,7 @@ msgstr "Dupliziere Node(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"Nodes in geerbtet Szenen können nicht umgehängt oder umgeordnet werden."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -7963,6 +8370,10 @@ msgid "Instantiated scenes can't become root"
msgstr "Instantiierte Szenen können keine Wurzel werden"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Node zur Szenenwurzel machen"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Node(s) wirklich löschen?"
@@ -7999,6 +8410,10 @@ msgid "Make Local"
msgstr "Lokal machen"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Neue Szenenwurzel"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Erzeuge Wurzel-Node:"
@@ -8428,6 +8843,18 @@ msgid "Set From Tree"
msgstr "Nach Szenenbaum einstellen"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Tastenkürzel entfernen"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Tastenkürzel wiederherstellen"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Tastenkürzel ändern"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Tastenkürzel"
@@ -8634,6 +9061,10 @@ msgid "GridMap Duplicate Selection"
msgstr "GridMap-Auswahl duplizieren"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "GridMap zeichnen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Gitterkarte"
@@ -8770,10 +9201,6 @@ msgid "Build Project"
msgstr "Projekt bauen"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Warnungen"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Log anschauen"
@@ -8940,10 +9367,6 @@ msgid "Change Expression"
msgstr "Ausdruck ändern"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Node hinzufügen"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "VisualScript-Nodes entfernen"
@@ -9028,6 +9451,10 @@ msgid "Change Input Value"
msgstr "Eingabewert ändern"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Kommentargröße ändern"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Das Function-Node kann nicht kopiert werden."
@@ -9457,6 +9884,16 @@ msgstr ""
"Das ParallaxLayer-Node lässt sich nur als Unterobjekt eines "
"ParallaxBackground-Node verwenden."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"GPU-basierte Partikel werden vom GLES2-Grafiktreiber nicht unterstützt.\n"
+"Stattdessen bitte CPUParticles2D-Nodes verwenden. Die „In CPU-Partikel "
+"konvertieren“-Funktion kann dazu verwendet werden."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9620,6 +10057,14 @@ msgstr ""
"Damit CollisionShape funktionieren kann, muss eine Form vorhanden sein. "
"Bitte erzeuge eine shape Ressource dafür!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+"Plane-Shapes funktionieren nicht gut und werden in einer zukünftigen Version "
+"entfernt. Von der Nutzung wird abgeraten."
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nichts ist sichtbar da kein Mesh zugewiesen wurden."
@@ -9636,6 +10081,14 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Plotte Mesh"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+"GIProbes werden vom GLES2-Videotreiber nicht unterstützt.\n"
+"BakedLightmaps können als Alternative verwendet werden."
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9652,6 +10105,16 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"GPU-basierte Partikel werden vom GLES2-Grafiktreiber nicht unterstützt.\n"
+"Stattdessen bitte CPUParticles-Nodes verwenden. Die „In CPU-Partikel "
+"konvertieren“-Funktion kann dazu verwendet werden."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Nichts ist sichtbar da keine Meshe den Zeichendurchläufen zugewiesen wurden."
@@ -9693,26 +10156,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Die Pfad-Eigenschaft muss auf ein gültiges Spatial-Node verweisen."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "Ein WorldEnvironment benötigt eine Environment-Ressource."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Pro Szene (oder einem Satz von instanzierten Szenen) ist nur ein einziges "
-"WorldEnvironment erlaubt."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Dieses WorldEnvironment wird ignoriert. Entweder füge eine Kamera (für 3D-"
-"Szenen) hinzu oder setze den Hintergrund-Modus des Environments nach Canvas "
-"(für 2D-Szenen)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Diese Körper wird ignoriert werden bis ein Mesh gesetzt wurde"
@@ -9745,6 +10188,26 @@ msgstr ""
"implementieren. Es kann ausschließlich als Unterobjekt von VehicleBody "
"verwendet werden."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "Ein WorldEnvironment benötigt eine Environment-Ressource."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Pro Szene (oder einem Satz von instanzierten Szenen) ist nur ein einziges "
+"WorldEnvironment erlaubt."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Dieses WorldEnvironment wird ignoriert. Entweder füge eine Kamera (für 3D-"
+"Szenen) hinzu oder setze den Hintergrund-Modus des Environments nach Canvas "
+"(für 2D-Szenen)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "In BlendTree-Node ‚%s‘, Animation nicht gefunden: ‚%s‘"
@@ -9792,12 +10255,32 @@ msgstr ""
"AnimationTree."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Wählt eine Farbe vom Bildschirm aus."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Rohdatenmodus"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Füge aktuelle Farbe als Vorlage hinzu"
+msgid "Switch between hexadecimal and code values."
+msgstr "Wechselt zwischen Hexadezimal- und Zahlenwerten."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Aktuelle Farbe als Vorlage hinzufügen."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+"Einfache Container sind unnötig solange ihnen kein Skript angehängt ist das "
+"die Platzierung der Inhalte vornimmt.\n"
+"Falls kein Skript angehängt werden soll wird empfohlen ein einfaches "
+"‚Control‘-Node zu verwenden."
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9807,6 +10290,10 @@ msgstr "Warnung!"
msgid "Please Confirm..."
msgstr "Bitte bestätigen..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "Gehe zu übergeordnetem Ordner."
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9895,6 +10382,25 @@ msgstr "Zuweisung an Uniform."
msgid "Varyings can only be assigned in vertex function."
msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Instantiiere gewählte Szene(n) als Unterobjekt des ausgewählten Nodes."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Warnungen:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Schriftgröße:"
+
+#~ msgid "Line:"
+#~ msgstr "Zeile:"
+
+#~ msgid "Col:"
+#~ msgstr "Spalte:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "OrientedPathFollow funktioniert nur, wenn es als Unterobjekt eines Path-"
@@ -10056,9 +10562,6 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden."
#~ msgid "Convert To Lowercase"
#~ msgstr "In Kleinbuchstaben konvertieren"
-#~ msgid "Snap To Floor"
-#~ msgstr "Am Boden einrasten"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Drehe auf 0 Grad"
@@ -10596,9 +11099,6 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden."
#~ msgid "Added:"
#~ msgstr "Hinzugefügt:"
-#~ msgid "Removed:"
-#~ msgstr "Entfernt:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Atlas Untertextur konnte nicht gespeichert werden:"
@@ -10867,9 +11367,6 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden."
#~ msgid "Error importing:"
#~ msgstr "Fehler beim importieren:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Es ist nur eine Datei für eine große Textur erforderlich."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Maximale Texturgröße:"
@@ -11096,9 +11593,6 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden."
#~ msgid "Resource Tools"
#~ msgstr "Ressourcenwerkzeuge"
-#~ msgid "GridMap Paint"
-#~ msgstr "GridMap zeichnen"
-
#~ msgid "Tiles"
#~ msgstr "Kacheln"
@@ -11427,9 +11921,6 @@ msgstr "Varyings können nur in Vertex-Funktion zugewiesen werden."
#~ msgid "Cannot go into subdir:"
#~ msgstr "Unterordner kann nicht geöffnet werden:"
-#~ msgid "Imported Resources"
-#~ msgstr "Importierte Ressourcen"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "Schlüsselbilder einfügen (Einfg)"
diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po
index 1c7fce5965..4e1936ff60 100644
--- a/editor/translations/de_CH.po
+++ b/editor/translations/de_CH.po
@@ -87,6 +87,16 @@ msgstr "Node(s) duplizieren"
msgid "Delete Selected Key(s)"
msgstr "Node(s) löschen"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Script hinzufügen"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Ungültige Bilder löschen"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Bilder duplizieren"
@@ -116,6 +126,16 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Typ ändern"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -168,6 +188,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -194,6 +218,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -246,6 +274,21 @@ msgid "Delete Key(s)"
msgstr "Node(s) löschen"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Typ ändern"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Animations-Node"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Animations-Node"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -287,6 +330,16 @@ msgid "Anim Insert Key"
msgstr "Anim Bild einfügen"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Bild einfügen"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Node erstellen"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -311,6 +364,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -319,10 +376,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Transformationstyp"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Anim Ebene und Bild einfügen"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim Ebene und Bild einfügen"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -335,6 +407,11 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Node erstellen"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim verlängern"
@@ -380,11 +457,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Node erstellen"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -485,6 +557,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -549,20 +633,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -863,8 +939,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1124,7 +1200,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1153,6 +1229,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1296,6 +1376,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1345,7 +1445,7 @@ msgstr "Datei öffnen"
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1420,10 +1520,32 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Node(s) löschen"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Node erstellen"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1648,8 +1770,8 @@ msgstr "Script hinzufügen"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1658,6 +1780,16 @@ msgid "OK"
msgstr "Okay"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1854,6 +1986,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2357,7 +2497,7 @@ msgid "Save & Restart"
msgstr "Datei speichern"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2922,14 +3062,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3075,10 +3207,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3435,25 +3563,6 @@ msgid "Create Polygon"
msgstr "Node erstellen"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Script hinzufügen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Insert Point"
-msgstr "Bild einfügen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Ungültige Bilder löschen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3473,6 +3582,25 @@ msgstr ""
msgid "Erase points."
msgstr "Oberfläche %d"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Script hinzufügen"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Insert Point"
+msgstr "Bild einfügen"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Ungültige Bilder löschen"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3490,12 +3618,47 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Ungültige Bilder löschen"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Node"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Animations-Node"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Ungültige Bilder löschen"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3536,6 +3699,29 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Script hinzufügen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Ungültige Bilder löschen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Ungültige Bilder löschen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3544,6 +3730,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Autoplay Umschalten"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3561,6 +3752,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Typ ändern"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3571,11 +3767,53 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Node von Szene"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Bild bewegen/einfügen"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Verbindung zu Node:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Bild einfügen"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Node(s) löschen"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Typ ändern"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3591,6 +3829,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Node"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3829,6 +4073,22 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Bild bewegen/einfügen"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Transition-Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Add Node"
+msgstr "Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3857,6 +4117,20 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Transition-Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4282,6 +4556,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4670,6 +4954,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4929,19 +5217,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5038,11 +5326,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5202,6 +5490,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5839,6 +6133,15 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Spiele angepasste Szene"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5951,10 +6254,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5999,7 +6298,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6092,6 +6391,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6100,6 +6405,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "Selektiere Node(s) zum Importieren aus"
@@ -6315,7 +6624,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6382,10 +6691,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6394,8 +6699,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Animations-Node"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Bild einfügen"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6406,8 +6717,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Animations-Node"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6705,6 +7017,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6720,6 +7048,11 @@ msgstr "Oberfläche %d"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Node erstellen"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Node erstellen"
@@ -6856,6 +7189,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Node erstellen"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Ungültige Bilder löschen"
@@ -6903,6 +7245,27 @@ msgid "TileSet"
msgstr "Datei(en) öffnen"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Node(s) duplizieren"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6918,6 +7281,16 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Node Filter editieren"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Typ ändern"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6931,7 +7304,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6943,6 +7325,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7235,6 +7625,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7941,6 +8344,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Node(s) löschen?"
@@ -7975,6 +8382,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "Node erstellen"
@@ -8404,6 +8815,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8610,6 +9033,11 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "Projekteinstellungen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8752,10 +9180,6 @@ msgid "Build Project"
msgstr "Projektname:"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Datei(en) öffnen"
@@ -8920,11 +9344,6 @@ msgstr "Typ ändern"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Add Node"
-msgstr "Node"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Remove VisualScript Nodes"
msgstr "Ungültige Bilder löschen"
@@ -9015,6 +9434,10 @@ msgid "Change Input Value"
msgstr "Typ ändern"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9426,6 +9849,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9562,6 +9992,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9576,6 +10012,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9588,6 +10030,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9622,21 +10071,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Die Pfad-Variable muss auf einen gültigen Particles2D Node verweisen."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9660,6 +10094,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9702,12 +10151,28 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
#, fuzzy
msgid "Raw Mode"
msgstr "Node erstellen"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9718,6 +10183,11 @@ msgstr "Alert!"
msgid "Please Confirm..."
msgstr "Bitte bestätigen..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Node erstellen"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index 0b271f2739..e4f8311ba2 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -76,6 +76,14 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -105,6 +113,15 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -154,6 +171,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -178,6 +199,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -228,6 +253,18 @@ msgid "Delete Key(s)"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -269,6 +306,14 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -293,6 +338,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -301,10 +350,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -317,6 +378,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -359,10 +424,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -462,6 +523,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -526,20 +599,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -833,8 +898,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1086,7 +1151,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1115,6 +1180,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1258,6 +1327,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1303,7 +1392,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1378,10 +1467,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1597,8 +1706,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1607,6 +1716,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1798,6 +1917,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2285,7 +2412,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2833,14 +2960,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2976,10 +3095,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3323,37 +3438,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3373,12 +3488,43 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3418,6 +3564,26 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3426,6 +3592,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3443,6 +3613,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3452,11 +3626,47 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3472,6 +3682,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3697,6 +3912,19 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3725,6 +3953,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4136,6 +4376,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4513,6 +4763,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4769,19 +5023,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4872,11 +5126,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5031,6 +5285,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5644,6 +5904,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5752,10 +6020,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5800,7 +6064,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5892,6 +6156,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5900,6 +6170,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6112,7 +6386,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6176,19 +6450,19 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
+msgid "Change Animation FPS"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation FPS"
+msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "(empty)"
+msgid "Animations:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6200,7 +6474,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6489,6 +6763,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6501,6 +6791,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6623,6 +6917,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6663,6 +6965,26 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6678,6 +7000,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6691,7 +7021,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6703,6 +7042,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6976,6 +7323,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7666,6 +8026,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7700,6 +8064,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8112,6 +8480,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8316,6 +8696,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8452,10 +8836,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8614,10 +8994,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8698,6 +9074,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9081,6 +9461,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9210,6 +9597,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9224,6 +9617,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9236,6 +9635,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9266,21 +9672,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9304,6 +9695,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9345,11 +9751,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9360,6 +9782,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/el.po b/editor/translations/el.po
index 28fc945310..8feb019a6f 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -3,12 +3,13 @@
# Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
# George Tsiamasiotis <gtsiam@windowslive.com>, 2017-2018.
+# Georgios Katsanakis <geo.elgeo@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:39+0100\n"
-"Last-Translator: George Tsiamasiotis <gtsiam@windowslive.com>\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
+"Last-Translator: Georgios Katsanakis <geo.elgeo@gmail.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
"Language: el\n"
@@ -16,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -85,6 +86,14 @@ msgstr "Διπλασιασμός επιλογής"
msgid "Delete Selected Key(s)"
msgstr "ΔιαγÏαφή επιλογής"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "ΠÏοσθήκη σημείου Bezier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Μετακίνηση σημείου Bezier"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Διπλασιασμός κλειδιών"
@@ -114,6 +123,16 @@ msgid "Anim Change Call"
msgstr "Anim Αλλαγή κλήσης"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Αλλαγή βÏόχου κίνησης"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Αλλαγή βÏόχου κίνησης"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Κομμάτι Ιδιότητας"
@@ -163,6 +182,11 @@ msgid "Anim Clips:"
msgstr "Αποσπάσματα κίνησης:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Αλλαγή τιμής πίνακα"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Εναλλαγή ÎºÎ¿Î¼Î¼Î±Ï„Î¹Î¿Ï on/off."
@@ -187,6 +211,11 @@ msgid "Time (s): "
msgstr "ΧÏόνος (s): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Φαινόμενο ÎτόπλεÏ"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Συνεχόμενη"
@@ -237,6 +266,21 @@ msgid "Delete Key(s)"
msgstr "ΔιαγÏαφή κλειδιών"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Αλλαγή ονόματος κίνησης:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Μέθοδος παÏεμβολής"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Αλλαγή βÏόχου κίνησης"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Anim ΑφαίÏεση κομματιοÏ"
@@ -278,6 +322,16 @@ msgid "Anim Insert Key"
msgstr "Anim εισαγωγή κλειδιοÏ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Αλλαγή FPS κίνησης"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Αναδιάταξη των AutoLoad"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
"Τα κομμάτια Î¼ÎµÏ„Î±ÏƒÏ‡Î·Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÎµÏ†Î±Ïμόζονται μόνο σε κόμβους βασισμένους σε "
@@ -309,6 +363,11 @@ msgid "Not possible to add a new track without a root"
msgstr "ΑδÏνατη η Ï€Ïοσθήκη ÎºÎ¿Î¼Î¼Î±Ï„Î¹Î¿Ï Ï‡Ï‰Ïίς Ïίζα"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "ΠÏοσθήκη κομματιοÏ"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "ΑδÏνατη η Ï€Ïοσθήκη κλειδιοÏ, λόγω άκυÏης διαδÏομής κομματιοÏ."
@@ -317,10 +376,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "ΑδÏνατη η Ï€Ïοσθήκη κλειδιοÏ, το κομμάτι δεν είναι Ï„Ïπου Spatial"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Κομμάτι 3D μετασχηματισμοÏ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "ΠÏοσθήκη κομματιοÏ"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "ΑδÏνατη η Ï€Ïοσθήκη ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Î¼ÎµÎ¸ÏŒÎ´Î¿Ï…, λόγω άκυÏης διαδÏομής κομματιοÏ."
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Κομμάτι κλήσης μεθόδου"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Δεν βÏέθηκε η μέθοδος στο αντικείμενο: "
@@ -333,6 +407,10 @@ msgid "Clipboard is empty"
msgstr "Το Ï€ÏόχειÏο είναι άδειο"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Επικόλληση κομματιών"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Μεγέθυνση κλειδιών"
@@ -377,10 +455,6 @@ msgid "Copy Tracks"
msgstr "ΑντιγÏαφή κομματιών"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Επικόλληση κομματιών"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Μεγέθυνση επιλογής"
@@ -482,6 +556,19 @@ msgstr "Επιλογή κομματιών για αντιγÏαφή:"
msgid "Copy"
msgstr "ΑντιγÏαφή"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Αποσπάσματα ήχου:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Αλλαγή μεγέθους πίνακα"
@@ -546,22 +633,13 @@ msgstr "ΣμÏκÏινση"
msgid "Reset Zoom"
msgstr "ΕπαναφοÏά μεγέθυνσης"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "ΠÏοειδοποιήσεις:"
-
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Μέγεθος πηγαίας γÏαμματοσειÏάς:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "ΓÏαμμή:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "ΠÏοειδοποιήσεις"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Στήλη:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -866,8 +944,8 @@ msgstr "ΔιαγÏαφή επιλεγμένων αÏχείων;"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "ΔιαγÏαφή"
@@ -1125,8 +1203,9 @@ msgid "Add Bus"
msgstr "ΠÏοσθήκη διαÏλου"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "ΔημιουÏγία νέας διάταξης διαÏλων ήχου."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Αποθήκευση διάταξης διαÏλων ήχου ÏŽÏ‚..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1154,6 +1233,10 @@ msgstr "ΦόÏτωση Ï€Ïοεπιλογής"
msgid "Load the default Bus Layout."
msgstr "ΦόÏτωση Ï€Ïοεπιλεγμένης διάταξης διαÏλων ήχου."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "ΔημιουÏγία νέας διάταξης διαÏλων ήχου."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Μη έγκυÏο όνομα."
@@ -1302,6 +1385,26 @@ msgstr ""
msgid "Packing"
msgstr "ΠακετάÏισμα"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1352,7 +1455,7 @@ msgstr "Εμφάνιση στη διαχείÏιση αÏχείων"
msgid "New Folder..."
msgstr "Îέος φάκελος..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Αναναίωση"
@@ -1427,10 +1530,33 @@ msgstr "Μετακίνηση αγαπημένου πάνω"
msgid "Move Favorite Down"
msgstr "Μετακίνηση αγαπημένου κάτω"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "ΠÏοηγοÏμενο πάτωμα"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Επόμενο πάτωμα"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Πήγαινε στον γονικό φάκελο"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "ΑδÏνατη η δημιουÏγία φακέλου."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Εμφάνιση αντικειμένων σε πλέγμα μικÏγÏαφιών."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Εμφάνιση αντικειμένων σε λίστα."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Φάκελοι & ΑÏχεία:"
@@ -1671,9 +1797,9 @@ msgstr "ΕκκαθάÏιση εξόδου"
msgid "Project export failed with error code %d."
msgstr "Η εξαγωγή του έÏγου απέτυχε με κωδικό %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Σφάλμα κατά την αποθήκευση πόÏου!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1681,6 +1807,16 @@ msgid "OK"
msgstr "Εντάξει"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Σφάλμα κατά την αποθήκευση πόÏου!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Αποθήκευση πόÏου ως..."
@@ -1903,6 +2039,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "Αποθήκευση αλλαγών στο '%s' Ï€Ïιν το κλείσιμο;"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Απέτυχε η φόÏτωση πόÏου."
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "Μόνο ένα αÏχείο είναι απαÏαίτητη για μεγάλη υφή."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Αποθήκευση σκηνή ως..."
@@ -2436,7 +2582,8 @@ msgid "Save & Restart"
msgstr "Αποθήκευση & Επανεκκίνηση"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "ΠεÏιστÏέφεται όταν το παÏάθυÏο του επεξεÏγαστή επαναχÏωματίζεται!"
#: editor/editor_node.cpp
@@ -2998,14 +3145,6 @@ msgstr ""
"Δεν ήταν δυνατή η πλοήγηση στο '%s', καθώς δεν βÏέθηκε στο σÏστημα αÏχείων!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Εμφάνιση αντικειμένων σε πλέγμα μικÏγÏαφιών."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Εμφάνιση αντικειμένων σε λίστα."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Κατάσταση: Η εισαγωγή απέτυχε. ΠαÏακαλοÏμε διοÏθώστε το αÏχείο και "
@@ -3148,12 +3287,6 @@ msgid "Search files"
msgstr "Αναζήτηση αÏχείων"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-"ΔημιουÏγία στιγμιοτÏπων των επιλεγμένων σκηνών ως παιδιά του επιλεγμένου "
-"κόμβου."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3510,25 +3643,6 @@ msgid "Create Polygon"
msgstr "Δημιουγία πολυγώνου"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "ΕπεγεÏγασία πολυγώνου"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Εισαγωγή σημείου"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "ΕπεγεÏγασία πολυγώνου (ΑφαίÏεση σημείου)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "ΑφαίÏεση πολυγώνου και σημείου"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3551,6 +3665,25 @@ msgstr ""
msgid "Erase points."
msgstr "ΔιαγÏαφή σημείων."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "ΕπεγεÏγασία πολυγώνου"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Εισαγωγή σημείου"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "ΕπεγεÏγασία πολυγώνου (ΑφαίÏεση σημείου)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "ΑφαίÏεση πολυγώνου και σημείου"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3569,12 +3702,49 @@ msgstr "ΦόÏτωσε.."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Μετακίνηση σημείου"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Αλλαγή χÏόνου ανάμειξης"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Αλλαγή χÏόνου ανάμειξης"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr "ΆκυÏος Ï„Ïπος κόμβου. ΕπιτÏέπονται μόνο Ïιζικοί κόμβοι."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "ΠÏοσθήκη κόμβου"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "ΠÏοσθήκη κίνησης"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "ΑφαίÏεση σημείου διαδÏομής"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3617,6 +3787,31 @@ msgid "Triangle already exists"
msgstr "Το Ï„Ïίγωνο υπάÏχει ήδη"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "ΠÏοσθήκη μεταβλητής"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Αλλαγή χÏόνου ανάμειξης"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Αλλαγή χÏόνου ανάμειξης"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "ΑφαίÏεση σημείου διαδÏομής"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "ΑφαίÏεση μεταβλητής"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "Το BlendSpace2D δεν ανήκει σε κόμβο AnimationTree."
@@ -3625,6 +3820,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Δεν υπάÏχουν Ï„Ïίγωνα, οπότε είναι αδÏνατη η μίξη."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Εναλλαγή καθολικών υπογÏαφών AutoLoad"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "ΔημιουÏγία Ï„Ïιγώνων με την ένωση σημείων."
@@ -3642,6 +3842,11 @@ msgid "Blend:"
msgstr "Ανάμειξη:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Αλλαγές υλικοÏ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "ΕπεξεÏγασία φίλτÏων"
@@ -3651,6 +3856,17 @@ msgid "Output node can't be added to the blend tree."
msgstr "Ο κόμβος εξόδου δεν μποÏεί να Ï€Ïοστεθεί στο δέντÏο μίξης."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "ΠÏοσθέστε κόμβο/-ους από δέντÏο"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "ΛειτουÏγία μετακίνησης"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3658,6 +3874,39 @@ msgstr ""
"άκυÏη."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Συνδέθηκε"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Αποσυνδέθηκε"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Κίνηση"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "ΔιαγÏαφή Κόμβων"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Εναλλαγή ÎºÎ¿Î¼Î¼Î±Ï„Î¹Î¿Ï on/off."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Αλλαγή φίλτÏου τοπικών Ïυθμίσεων"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Δεν οÏίστηκε AnimationPlayer, άÏα αδÏνατη η ανάκτηση των ονομάτων των "
@@ -3679,6 +3928,12 @@ msgstr ""
"ανάκτηση των ονομάτων των κομματιών."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Όνομα κόμβου:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3905,6 +4160,21 @@ msgid "Cross-Animation Blend Times"
msgstr "ΧÏόνοι ανάμειξης κινήσεων"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "ΛειτουÏγία μετακίνησης"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "ΠÏοσθήκη μετάφÏασης"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "ΠÏοσθήκη κόμβου"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Τέλος"
@@ -3933,6 +4203,20 @@ msgid "No playback resource set at path: %s."
msgstr "Κανένας πόÏος αναπαÏαγωγής στη διαδÏομή: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "ΑφαιÏέθηκαν:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Κόμβος μετάβασης"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4360,6 +4644,16 @@ msgid "Move CanvasItem"
msgstr "Μετακίνηση CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Μόνο άγκυÏες"
@@ -4747,6 +5041,10 @@ msgstr "Πατήστε το Shift για να επεξεÏγαστείτε εφÎ
msgid "Bake GI Probe"
msgstr "ΠÏοετοιμασία διεÏεÏνησης GI"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Στοιχείο %d"
@@ -5006,6 +5304,10 @@ msgid "Generating Visibility Rect"
msgstr "ΔημιουÏγία οÏθογωνίου οÏατότητας"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "ΔημιουÏγία οÏθογωνίου οÏατότητας"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Ο οÏισμός σημείου είναι δυνατός μόνο σε ένα υλικό επεξεÏγασίας "
@@ -5020,10 +5322,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Δεν υπάÏχουν εικονοστοιχεία με διαφάνεια >128 στην εικόνα..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "ΔημιουÏγία οÏθογωνίου οÏατότητας"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "ΦόÏτωση μάσκας εκπομπής"
@@ -5111,13 +5409,13 @@ msgid "Generating AABB"
msgstr "ΔημιουÏία AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "ΔημιουÏία AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "ΔημιουÏία AABB οÏατότητας"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "ΔημιουÏία AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "ΑφαίÏεση σημείου από την καμπÏλη"
@@ -5274,6 +5572,12 @@ msgid "Create UV Map"
msgstr "ΔημιουÏγία χάÏτη UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Δημιουγία πολυγώνου"
@@ -5935,6 +6239,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "ΔημιουÏγία σημείων εκπομπής από πλέγμα"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Σκελετός..."
@@ -6048,10 +6361,6 @@ msgid "Vertices"
msgstr "ΚοÏυφές"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Πάνω όψη."
@@ -6096,7 +6405,8 @@ msgid "Rear"
msgstr "Πίσω"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Στοίχηση με την Ï€Ïοβολή"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6191,6 +6501,12 @@ msgid "Freelook Speed Modifier"
msgstr "ΤαχÏτητα ελεÏθεÏου κοιτάγματος"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Εμφάνιση πληÏοφοÏιών"
@@ -6200,6 +6516,11 @@ msgid "XForm Dialog"
msgstr "Διάλογος XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "κουμπώματος στο πλέγμα"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Επιλογή λειτουÏγίας (Q)"
@@ -6416,7 +6737,7 @@ msgid "Post"
msgstr "Μετά"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6487,10 +6808,6 @@ msgid "Add Empty"
msgstr "ΠÏοσθήκη άδειου"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Αλλαγή βÏόχου κίνησης"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Αλλαγή FPS κίνησης"
@@ -6499,10 +6816,16 @@ msgid "(empty)"
msgstr "(άδειο)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Κινήσεις"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Κίνηση"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "ΤαχÏτητα (FPS):"
@@ -6511,7 +6834,8 @@ msgid "Loop"
msgstr "Επανάληψη"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "ΚαÏέ κίνησης"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6812,6 +7136,24 @@ msgid "Merge from Scene"
msgstr "Συγχώνευση από σκηνή"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Επόμενο πάτωμα"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "ΠÏοηγοÏμενο πάτωμα"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6827,6 +7169,11 @@ msgstr "ΔιαγÏαφή σημείων."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "ΔημιουÏγία νέων κόμβων."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "ΔημιουÏγία νέου πολυγώνου από την αÏχή."
@@ -6970,6 +7317,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Μετακίνηση πολυγώνου"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Μετακίνηση πολυγώνου"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "ΑφαίÏεση Ï€ÏοτÏπου"
@@ -7018,6 +7375,29 @@ msgid "TileSet"
msgstr "ΣÏνολο πλακιδίων"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "ΟÏισμός ως Ï€Ïοεπιλογής για '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "ΠÏόγÏαμμα σκίασης"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Διπλασιασμός κόμβων"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "ΚοÏυφές"
@@ -7037,6 +7417,16 @@ msgstr "Δεξιά"
msgid "VisualShader"
msgstr "ΠÏόγÏαμμα σκίασης"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "ΕπεξεÏγασία φίλτÏων"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Αλλαγές Ï€ÏογÏάμματος σκίασης"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Εκτελέσιμο"
@@ -7050,9 +7440,17 @@ msgid "Delete preset '%s'?"
msgstr "ΔιαγÏαφή διαμόÏφωσης '%s';"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
-"Τα Ï€Ïότυπα εξαγωγής για αυτή την πλατφόÏτμα λείπουν ή είναι κατεστÏαμμένα:"
#: editor/project_export.cpp
#, fuzzy
@@ -7065,6 +7463,16 @@ msgid "Exporting All"
msgstr "Εξαγωγή για %s"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "Η διαδÏομή δεν υπάÏχει."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"Τα Ï€Ïότυπα εξαγωγής για αυτή την πλατφόÏτμα λείπουν ή είναι κατεστÏαμμένα:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "ΔιαμοÏφώσεις"
@@ -7357,6 +7765,19 @@ msgstr "Είστε σίγουÏοι πως θέλετε να ανοίξετε Ï€
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8088,6 +8509,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Βγάζει νόημα!"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "ΔιαγÏαφή κόμβων;"
@@ -8125,6 +8551,11 @@ msgstr "Κάνε τοπικό"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Βγάζει νόημα!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "ΔημιουÏγία κόμβου"
@@ -8571,6 +9002,21 @@ msgid "Set From Tree"
msgstr "ΟÏισμός από το δέντÏο"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Ομαλά έξω"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "ΣυντομεÏσεις"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Αλλαγή αγκυÏών"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "ΣυντομεÏσεις"
@@ -8786,6 +9232,10 @@ msgid "GridMap Duplicate Selection"
msgstr "GridMap Διπλασιασμός επιλογής"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "GridMap ΖωγÏαφική"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "ΧάÏτης δικτÏου"
@@ -8923,10 +9373,6 @@ msgid "Build Project"
msgstr "Δόμηση έÏγου"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "ΠÏοειδοποιήσεις"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "ΠÏοβολή αÏχείου καταγÏαφής"
@@ -9093,10 +9539,6 @@ msgid "Change Expression"
msgstr "Αλλαγή έκφÏασης"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "ΠÏοσθήκη κόμβου"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "ΑφαίÏεση κόμβων VisualScript"
@@ -9185,6 +9627,11 @@ msgid "Change Input Value"
msgstr "Αλλαγή τιμής εισόδου"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Αλλαγή μεγέθους CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "ΑδÏνατη η αντιγÏαφή του κόμβου συνάÏτησης."
@@ -9607,6 +10054,13 @@ msgstr ""
"Ένας κόμβος ParallaxLayer δουλεÏει μόνο όταν κληÏονομεί έναν κόμβο Ï„Ïπου "
"ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9764,6 +10218,12 @@ msgstr ""
"Ένα σχήμα Ï€Ïέπει να δοθεί στο CollisionShape για να λειτουÏγήσει. "
"ΔημιουÏγήστε ένα πόÏο σχήματος για αυτό!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
@@ -9780,6 +10240,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Τοποθέτηση πλεγμάτων"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9796,6 +10262,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Τίποτα δεν είναι οÏατό, επειδή δεν έχουν οÏιστεί πεÏάσματα για τα πλέγματα."
@@ -9833,25 +10306,6 @@ msgstr ""
"Η ιδιότητα Path Ï€Ïέπει να δείχνει σε έναν έγκυÏο κόμβο Spatial για να "
"δουλέψει αυτός ο κόμβος."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "Το WorldEnvironment χÏειάζεται έναν πόÏο Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Μόνο ένα WorldEnvironment επιτÏέπεται σε κάθε σκηνή (ή σÏνολο στιγμιοτÏπων "
-"σκηνών)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Αυτό το WorldEnvironment θα αγνοηθεί. ΠÏοσθέστε μια κάμεÏα (για 3d) ή οÏίστε "
-"το Background Mode Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… πεÏιβάλλοντος σε Canvas (για 2d)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9883,6 +10337,25 @@ msgstr ""
"Το VehicleWheel δίνει ένα σÏστημα Ï„Ïοχών για το VehicleBody. ΠαÏακαλοÏμε "
"χÏησιμοποιήστε το ως παιδί του VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "Το WorldEnvironment χÏειάζεται έναν πόÏο Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Μόνο ένα WorldEnvironment επιτÏέπεται σε κάθε σκηνή (ή σÏνολο στιγμιοτÏπων "
+"σκηνών)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Αυτό το WorldEnvironment θα αγνοηθεί. ΠÏοσθέστε μια κάμεÏα (για 3d) ή οÏίστε "
+"το Background Mode Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… πεÏιβάλλοντος σε Canvas (για 2d)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9931,13 +10404,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Ωμή λειτουÏγία"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "ΠÏοσθήκη του Ï„Ïέχοντος χÏώματος ως Ï€ÏοκαθοÏισμένο"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Ειδοποίηση!"
@@ -9946,6 +10436,11 @@ msgstr "Ειδοποίηση!"
msgid "Please Confirm..."
msgstr "ΠαÏακαλώ επιβεβαιώστε..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Πήγαινε στον γονικό φάκελο"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10033,6 +10528,27 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "ΔημιουÏγία στιγμιοτÏπων των επιλεγμένων σκηνών ως παιδιά του επιλεγμένου "
+#~ "κόμβου."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "ΠÏοειδοποιήσεις:"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Μέγεθος πηγαίας γÏαμματοσειÏάς:"
+
+#~ msgid "Line:"
+#~ msgstr "ΓÏαμμή:"
+
+#~ msgid "Col:"
+#~ msgstr "Στήλη:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "Το PathFollow2D δουλεÏει μόνο όταν κληÏονομεί έναν κόμβο Path2D."
@@ -10194,10 +10710,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "ΜετατÏοπή σε πεζά"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "κουμπώματος στο πλέγμα"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "ΠεÏιστÏοφή 0 μοίÏες"
@@ -10727,9 +11239,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "ΠÏοστέθηκαν:"
-#~ msgid "Removed:"
-#~ msgstr "ΑφαιÏέθηκαν:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "ΑδÏνατη η αποθήκευση υπό-εικόνας άτλαντα:"
@@ -11001,9 +11510,6 @@ msgstr ""
#~ msgid "Error importing:"
#~ msgstr "Σφάλμα κατά την εισαγωγή:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Μόνο ένα αÏχείο είναι απαÏαίτητη για μεγάλη υφή."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Μέγιστο μέγεθος υφής:"
@@ -11226,9 +11732,6 @@ msgstr ""
#~ msgid "Resource Tools"
#~ msgstr "ΕÏγαλεία πόÏων"
-#~ msgid "GridMap Paint"
-#~ msgstr "GridMap ΖωγÏαφική"
-
#~ msgid "Tiles"
#~ msgstr "Πλακίδια"
diff --git a/editor/translations/es.po b/editor/translations/es.po
index b00045e09c..cfa46ff602 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -5,16 +5,16 @@
# Addiel Lucena Perez <addiell2017@gmail.com>, 2017.
# Aleix Sanchis <aleixsanchis@hotmail.com>, 2017, 2018.
# Alejandro Alvarez <eliluminado00@gmail.com>, 2017.
-# Avocado <avocadosan42@gmail.com>, 2018.
+# Avocado <avocadosan42@gmail.com>, 2018, 2019.
# BLaDoM GUY <simplybladom@gmail.com>, 2017.
# Carlos López <genetita@gmail.com>, 2016.
# David Arranz <davarrcal@hotmail.com>, 2018.
# David Couto <davidcouto@gmail.com>, 2017.
# Dharkael <izhe@hotmail.es>, 2017, 2019.
# Diego López <diegodario21@gmail.com>, 2017.
-# eon-s <emanuel.segretin@gmail.com>, 2018.
+# eon-s <emanuel.segretin@gmail.com>, 2018, 2019.
# Gustavo Leon <gleondiaz@gmail.com>, 2017-2018.
-# Javier Ocampos <xavier.ocampos@gmail.com>, 2018.
+# Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019.
# Jose Maria Martinez <josemar1992@hotmail.com>, 2018.
# Juan Quiroga <juanquiroga9@gmail.com>, 2017.
# Kiji Pixel <raccoon.fella@gmail.com>, 2017.
@@ -42,8 +42,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
-"Last-Translator: Dharkael <izhe@hotmail.es>\n"
+"PO-Revision-Date: 2019-03-06 00:10+0000\n"
+"Last-Translator: eon-s <emanuel.segretin@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -51,7 +51,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -68,12 +68,11 @@ msgstr ""
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr "Entrada inválida %i (no pasado) en expresión"
+msgstr "Entrada inválida %i (no se transmitió) en la expresión"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
-"self no puede ser usado ya que la instancia es nula (no ha sido pasada)"
+msgstr "self no puede ser usado ya que la instancia es nula (no pasó)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -120,6 +119,14 @@ msgstr "Duplicar Clave(s) Seleccionada(s)"
msgid "Delete Selected Key(s)"
msgstr "Eliminar Clave(s) Seleccionada(s)"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Añadir Punto Bezier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Mover Puntos Bezier"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Duplicar claves de animación"
@@ -149,6 +156,15 @@ msgid "Anim Change Call"
msgstr "Cambiar llamada de animación"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Cambiar duración de la animación"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Cambiar repetición de animación"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Pista de Propiedades"
@@ -198,6 +214,10 @@ msgid "Anim Clips:"
msgstr "Clips de Anim:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Cambiar ruta de la pista"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Act./Desact. esta pista."
@@ -222,6 +242,10 @@ msgid "Time (s): "
msgstr "Tiempo (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Pista de Conmutación Activada"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Continuo"
@@ -272,6 +296,18 @@ msgid "Delete Key(s)"
msgstr "Eliminar Clave(s)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Cambiar Modo de Actualización de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Cambiar Modo de Interpolación de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Cambiar Modo Loop de Animación"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Quitar pista de animación"
@@ -313,6 +349,14 @@ msgid "Anim Insert Key"
msgstr "Insertar clave de animación"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Cambiar Step de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Reordenar Pistas"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Las pistas Transform solo aplican a nodos de tipo Spatial."
@@ -343,6 +387,10 @@ msgid "Not possible to add a new track without a root"
msgstr "No es posible agregar una nueva pista sin una raíz"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Añadir Pista Bezier"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
"La ruta de la pista es inválida, por lo tanto no se pueden agregar claves."
@@ -352,10 +400,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "La pista no es de tipo Spatial, no se puede insertar la clave"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Añadir Clave de Pista de Transformación"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Añadir Clave de Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
-"La ruta de la pista es inválida, por ende no se pueden agregar claves de "
-"métodos."
+"La ruta de la pista es inválida, por lo que no se puede añadir una clave de "
+"método."
+
+#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Añadir Clave de Pista de Método"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
@@ -370,6 +430,10 @@ msgid "Clipboard is empty"
msgstr "El portapapeles está vacío"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Pegar Pistas"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Escalar claves de animación"
@@ -414,10 +478,6 @@ msgid "Copy Tracks"
msgstr "Copiar Pistas"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Pegar Pistas"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Escalar selección"
@@ -463,7 +523,7 @@ msgstr "Usar Curvas Bezier"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
-msgstr "Optimizar animación"
+msgstr "Optimizador de animación"
#: editor/animation_track_editor.cpp
msgid "Max. Linear Error:"
@@ -517,6 +577,18 @@ msgstr "Elegir pistas a copiar:"
msgid "Copy"
msgstr "Copiar"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Añadir Clip de Pista de Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Cambiar Desplazamiento de Inicio de Clip de Pista de Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Cambiar Desplazamiento Final del Clip de Pista de Audio"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Redimensionar array"
@@ -581,21 +653,13 @@ msgstr "Alejar"
msgid "Reset Zoom"
msgstr "Restablecer zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Advertencias:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Tamaño de la tipografía:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Línea:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Advertencias"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Columna:"
+msgid "Line and column numbers."
+msgstr "Números de línea y columna."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -630,7 +694,7 @@ msgstr "Quitar"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
-msgstr "Añadir argumento extra de llamada:"
+msgstr "Añadir Argumento de Llamada Extra:"
#: editor/connections_dialog.cpp
msgid "Extra Call Arguments:"
@@ -701,7 +765,8 @@ msgstr "Editar Conexión: "
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
-msgstr "¿Está seguro/a que quiere quitar todas las conexiones de esta señal?"
+msgstr ""
+"¿Estás seguro/a que quieres quitar todas las conexiones de la señal \"%s\"?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
@@ -856,7 +921,7 @@ msgstr "Error al cargar:"
#: editor/dependency_editor.cpp
msgid "Load failed due to missing dependencies:"
-msgstr "Fallo la carga debido a dependencias faltantes:"
+msgstr "Falló la carga debido a dependencias faltantes:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Open Anyway"
@@ -897,8 +962,8 @@ msgstr "¿Eliminar los archivos seleccionados?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Eliminar"
@@ -1008,7 +1073,7 @@ msgstr "Descomprimiendo assets"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Package installed successfully!"
-msgstr "¡Paquete instalado exitosamente!"
+msgstr "¡Paquete instalado con éxito!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1131,7 +1196,7 @@ msgstr "Mover bus de audio"
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As..."
-msgstr "Guardar configuración de bus de audio como..."
+msgstr "Guardar configuración de Bus de Audio como..."
#: editor/editor_audio_buses.cpp
msgid "Location for New Layout..."
@@ -1154,8 +1219,8 @@ msgid "Add Bus"
msgstr "Añadir bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Crear nueva configuración de bus."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Añade un nuevo Bus de Audio a esta configuración."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1183,6 +1248,10 @@ msgstr "Cargar ajuste predeterminado"
msgid "Load the default Bus Layout."
msgstr "Cargar configuración de bus por defecto."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Crear nueva configuración de bus."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nombre inválido."
@@ -1325,29 +1394,54 @@ msgid "Storing File:"
msgstr "Archivo de almacenamiento:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "No export template found at the expected path:"
msgstr ""
-"No se han encontrado plantillas de exportación.\n"
-"Tienes que descargar e instalarlas para continuar."
+"No se ha encontrado ninguna plantilla de exportación en la ruta esperada:"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "Empaquetando"
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"La plataforma de destino requiere compresión de texturas 'ETC' para GLES2. "
+"Activa el soporte en Ajustes del Proyecto."
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"La plataforma de destino requiere compresión de texturas 'ETC' para GLES2. "
+"Activa el soporte en Ajustes del Proyecto."
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"La plataforma de destino requiere compresión de texturas 'ETC' para GLES2. "
+"Activa el soporte en Ajustes del Proyecto."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom debug template not found."
-msgstr "No se ha encontrado ningún paquete de depuración personalizado."
+msgstr "No se ha encontrado la plantilla de depuración personalizada."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom release template not found."
-msgstr "No se ha encontrado ningún paquete final personalizado."
+msgstr "No se ha encontrado ninguna plantilla de lanzamineto personalizada."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
@@ -1382,7 +1476,7 @@ msgstr "Mostrar en Explorador de Archivos"
msgid "New Folder..."
msgstr "Nueva carpeta..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Recargar"
@@ -1443,7 +1537,7 @@ msgstr "Añadir/quitar favorito"
#: editor/editor_file_dialog.cpp
msgid "Toggle Mode"
-msgstr "Cambiar modo"
+msgstr "Cambiar Modo"
#: editor/editor_file_dialog.cpp
msgid "Focus Path"
@@ -1457,10 +1551,33 @@ msgstr "Subir Favorito"
msgid "Move Favorite Down"
msgstr "Bajar Favorito"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Suelo anterior"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Siguiente suelo"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Ir a la carpeta principal"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "No se pudo crear la carpeta."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Ver ítems como una cuadrícula de miniaturas."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Ver ítems como una lista."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Directorios y archivos:"
@@ -1556,7 +1673,7 @@ msgstr "Constantes:"
#: editor/editor_help.cpp
msgid "Class Description"
-msgstr "Descripción de Clase"
+msgstr "Descripción de la Clase"
#: editor/editor_help.cpp
msgid "Class Description:"
@@ -1683,9 +1800,10 @@ msgstr "Borrar salida"
msgid "Project export failed with error code %d."
msgstr "La exportación del proyecto falló con el código de error %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "¡Error al guardar el recurso!"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Imported resources can't be saved."
+msgstr "Importar Recursos"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1693,6 +1811,16 @@ msgid "OK"
msgstr "Aceptar"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "¡Error al guardar el recurso!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Guardar recurso como..."
@@ -1764,7 +1892,7 @@ msgstr ""
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "Can't overwrite scene that is still open!"
-msgstr "¡No se puede sobreescribir una escena que está abierta!"
+msgstr "¡No se puede sobrescribir una escena que todavía está abierta!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
@@ -1916,6 +2044,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "¿Guardar cambios de '%s' antes de cerrar?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Guardado %s recurso(s) modificado(s)."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Se necesita un nodo raíz para guardar la escena."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Guardar escena como..."
@@ -2344,7 +2480,7 @@ msgstr "Ajustes de diseño del editor"
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr "Act/desact. pantalla completa"
+msgstr "Act/desact. Pantalla Completa"
#: editor/editor_node.cpp
msgid "Open Editor Data/Settings Folder"
@@ -2444,8 +2580,8 @@ msgid "Save & Restart"
msgstr "Guardar y Reiniciar"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "¡Gira cuando la ventana del editor redibuja!"
+msgid "Spins when the editor window redraws."
+msgstr "Gira cuando la ventana del editor se redibuja."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2466,7 +2602,7 @@ msgstr "Importar"
#: editor/editor_node.cpp
msgid "FileSystem"
-msgstr "Sistema de archivos"
+msgstr "Sistema de Archivos"
#: editor/editor_node.cpp
msgid "Inspector"
@@ -3013,14 +3149,6 @@ msgstr ""
"archivos!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Ver ítems como una cuadrícula de miniaturas."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Ver ítems como una lista."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Estado: No se pudo importar el archivo. Por favor, arregla el archivo y "
@@ -3151,18 +3279,13 @@ msgstr "Re-escanear sistema de archivos"
#: editor/filesystem_dock.cpp
msgid "Toggle split mode"
-msgstr "Act/Desact. Modo Partido"
+msgstr "Act/Desact. Modo Dividido"
#: editor/filesystem_dock.cpp
msgid "Search files"
msgstr "Buscar archivos"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-"Instanciar la(s) escena(s) seleccionadas como hijas del nodo seleccionado."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3375,17 +3498,18 @@ msgstr "Reimportar"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Guardar escenas, reimportar y reiniciar"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Cambiar el driver de video requiere reiniciar el editor."
+msgstr "Cambiar el tipo de un archivo importado requiere reiniciar el editor."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"ADVERTENCIA: Existen recursos que utilizan este recurso, pueden dejar de "
+"cargar correctamente."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3510,22 +3634,6 @@ msgid "Create Polygon"
msgstr "Crear polígono"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Editar Polígono"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Insertar punto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Editar Polígono (Remover Punto)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Remover Polígono y Punto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3546,6 +3654,22 @@ msgstr ""
msgid "Erase points."
msgstr "Borrar puntos."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Editar Polígono"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Insertar punto"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Editar Polígono (Remover Punto)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Remover Polígono y Punto"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3563,6 +3687,19 @@ msgstr "Cargar..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "Mover Punto de Nodo"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "Cambiar Límites de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "Cambiar Etiquetas de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3570,6 +3707,24 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "Añadir Punto de Nodo"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "Añadir Punto de Animación"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "Eliminar Punto BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "Mover Punto de Nodo de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3612,6 +3767,26 @@ msgid "Triangle already exists"
msgstr "El triángulo ya existe"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Añadir Triángulo"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "Cambiar Límites de BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "Cambiar Etiquetas de BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "Eliminar Punto BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Eliminar Triángulo BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D no pertenece a un nodo AnimationTree."
@@ -3620,6 +3795,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "No hay ningún triángulo, así que no se puede hacer blending."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "Act/desact. Auto Triángulos"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Crear triángulos conectando puntos."
@@ -3637,6 +3816,10 @@ msgid "Blend:"
msgstr "Mezcla:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Parámetro Modificado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Editar filtros"
@@ -3646,6 +3829,15 @@ msgid "Output node can't be added to the blend tree."
msgstr "El nodo de salida no puede ser agregado al blend tree."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Añadir Nodo a BlendTree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Nodo Movido"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3653,6 +3845,33 @@ msgstr ""
"inválida."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Nodos Conectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Nodos Desconectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Establecer Animación"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Eliminar Nodo"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "Act./Desact. Filtro On/Off"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Cambiar Filtro"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"No se asigno ningún reproductor de animación, así que no se pudieron obtener "
@@ -3674,6 +3893,11 @@ msgstr ""
"no se pudieron obtener los nombres de las pistas."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Nodo Renombrado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Agregar Nodo..."
@@ -3689,7 +3913,7 @@ msgstr "Habilitar filtrado"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Toggle Autoplay"
-msgstr "Act/desact. reproducción automática"
+msgstr "Act/desact. Reproducción Automática"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Animation Name:"
@@ -3901,6 +4125,19 @@ msgid "Cross-Animation Blend Times"
msgstr "Cross-Animation Blend Times"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Mover Nodo"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Añadir Transición"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Añadir nodo"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Fin"
@@ -3929,6 +4166,18 @@ msgid "No playback resource set at path: %s."
msgstr "Ningún recurso de reproducción asignado en la ruta: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Nodo Eliminado"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Transición Eliminada"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Establecer Nodo de Inicio (Reproducción Automática)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -3967,7 +4216,7 @@ msgstr "Transición: "
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "AnimationTree"
-msgstr "Ãrbol de animación"
+msgstr "AnimationTree"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "New name:"
@@ -4285,7 +4534,7 @@ msgstr "Configurar Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Offset:"
-msgstr "Desplazamiento de cuadrícula:"
+msgstr "Desplazamiento de Cuadrícula:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Step:"
@@ -4293,7 +4542,7 @@ msgstr "Step de cuadrícula:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
-msgstr "Desplazamiento de rotación:"
+msgstr "Desplazamiento de Rotación:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Step:"
@@ -4352,6 +4601,18 @@ msgid "Move CanvasItem"
msgstr "Mover CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Presets para los valores de anclajes y márgenes de un nodo Control."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Los hijos de los contenedores tienen sus anclas y valores de márgenes "
+"anulados por sus padres."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Sólo anclado"
@@ -4738,6 +4999,10 @@ msgstr "Mantén Mayús para editar las tangentes individualmente"
msgid "Bake GI Probe"
msgstr "Precalcular GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Degradado Editado"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Elemento %d"
@@ -5000,6 +5265,10 @@ msgid "Generating Visibility Rect"
msgstr "Generando Rect. de Visibilidad"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Generar rectángulo de visibilidad"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Solo se puede asignar un punto a un material de procesado ParticlesMaterial"
@@ -5013,10 +5282,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "No hay píxeles con transparencia > 128 en la imagen..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Generar rectángulo de visibilidad"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Cargar máscara de emisión"
@@ -5104,13 +5369,13 @@ msgid "Generating AABB"
msgstr "Generando AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Generar AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Generar AABB de visibilidad"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Generar AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Borrar punto de la curva"
@@ -5265,6 +5530,14 @@ msgid "Create UV Map"
msgstr "Crear mapa UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"El polígono 2D tiene vértices internos, por lo que ya no se puede editar en "
+"el viewport."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Crear Polígono y UV"
@@ -5413,11 +5686,11 @@ msgstr "Configurar cuadrícula:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Offset X:"
-msgstr "Desplazamiento de cuadrícula en X:"
+msgstr "Desplazamiento de Cuadrícula en X:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Offset Y:"
-msgstr "Desplazamiento de cuadrícula en Y:"
+msgstr "Desplazamiento de Cuadrícula en Y:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Step X:"
@@ -5884,6 +6157,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "Este esqueleto no tiene huesos, crea algunos nodos Bone2D hijos."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Crear Pose de Descanso a partir de los Huesos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Establecer Pose de Descanso en los Huesos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Skeleton2D"
@@ -5945,7 +6226,7 @@ msgstr "Escalado: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translating: "
-msgstr "Traduciendo: "
+msgstr "Trasladando: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -5992,10 +6273,6 @@ msgid "Vertices"
msgstr "Vértices"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Vista superior."
@@ -6040,8 +6317,8 @@ msgid "Rear"
msgstr "Detrás"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr "Alinear con vista"
+msgid "Align with View"
+msgstr "Alinear con Vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6132,6 +6409,14 @@ msgid "Freelook Speed Modifier"
msgstr "Modificador de velocidad de vista libre"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"Nota: El valor FPS que se muestra es la velocidad de fotogramas del editor.\n"
+"No se puede utilizar como un indicador fiable del rendimiento en el juego."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Bloquear Rotación de Vista"
@@ -6140,6 +6425,10 @@ msgid "XForm Dialog"
msgstr "Diálogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Ajustar Nodos al Suelo"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Modo de selección (Q)"
@@ -6251,31 +6540,31 @@ msgstr "Ajustar objeto al suelo"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
-msgstr "Dialogo de transformación..."
+msgstr "Dialogo de Transformación..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "1 Viewport"
-msgstr "1 viewport"
+msgstr "1 Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports"
-msgstr "2 viewports"
+msgstr "2 Viewports"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports (Alt)"
-msgstr "2 viewports (Alt)"
+msgstr "2 Viewports (Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports"
-msgstr "3 viewports"
+msgstr "3 Viewports"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports (Alt)"
-msgstr "3 viewports (Alt)"
+msgstr "3 Viewports (Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "4 Viewports"
-msgstr "4 viewports"
+msgstr "4 Viewports"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Gizmos"
@@ -6355,7 +6644,7 @@ msgid "Post"
msgstr "Posterior"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr "Gizmo sin nombre"
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6419,10 +6708,6 @@ msgid "Add Empty"
msgstr "Añadir elemento vacío"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Cambiar repetición de animación"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Cambiar FPS de animación"
@@ -6431,8 +6716,12 @@ msgid "(empty)"
msgstr "(vacío)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animaciones"
+msgid "Animations:"
+msgstr "Animaciones:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Nueva Animación"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6443,8 +6732,8 @@ msgid "Loop"
msgstr "Repetir"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Fotogramas de animación"
+msgid "Animation Frames:"
+msgstr "Fotogramas de animación:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6732,6 +7021,24 @@ msgid "Merge from Scene"
msgstr "Unir desde escena"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Siguiente suelo"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Suelo anterior"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Copiar bitmask."
@@ -6744,6 +7051,10 @@ msgid "Erase bitmask."
msgstr "Borrar bitmask."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Cree un nuevo rectángulo."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Crear un nuevo polígono."
@@ -6847,7 +7158,7 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Region"
-msgstr "Establecer región del Tile"
+msgstr "Establecer Región de Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Tile"
@@ -6855,31 +7166,41 @@ msgstr "Crear Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Icon"
-msgstr "Establecer icono del Tile"
+msgstr "Establecer Icono de Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Bitmask"
-msgstr "Editar máscara de bits del Tile"
+msgstr "Editar Máscara de Bits de Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Collision Polygon"
-msgstr "Editar polígono de colisión"
+msgstr "Editar Polígono de Colisión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Occlusion Polygon"
-msgstr "Editar Polígono de oclusión"
+msgstr "Editar Polígono de Oclusión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Navigation Polygon"
-msgstr "Editar polígono de navegación"
+msgstr "Editar Polígono de Navegación"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Paste Tile Bitmask"
-msgstr "Pegar máscara de bits del Tile"
+msgstr "Pegar Máscara de Bits de Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Clear Tile Bitmask"
-msgstr "Eliminar máscara de bits del Tile"
+msgstr "Reestablecer Máscara de Bits de Tile"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Mover polígono"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Mover polígono"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
@@ -6887,31 +7208,31 @@ msgstr "Eliminar Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Collision Polygon"
-msgstr "Eliminar polígono de colisión"
+msgstr "Eliminar Polígono de Colisión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Occlusion Polygon"
-msgstr "Crear polígono de oclusión"
+msgstr "Eliminar Polígono de Oclusión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Navigation Polygon"
-msgstr "Crear polígono de navegación"
+msgstr "Crear Polígono de Navegación"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Priority"
-msgstr "Editar prioridad del Tile"
+msgstr "Editar Prioridad del Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Z Index"
-msgstr "Editar Indice-Z del Tile"
+msgstr "Editar Z Index de Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Collision Polygon"
-msgstr "Crear polígono de colisión"
+msgstr "Crear Polígono de Colisión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Occlusion Polygon"
-msgstr "Crear polígono de oclusión"
+msgstr "Crear Polígono de Oclusión"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "This property can't be changed."
@@ -6922,6 +7243,26 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "Establecer Nombre Uniforme"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "Establecer Puerto Predeterminado de Entrada"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Añadir Nodo al Visual Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Duplicar Nodos"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "Cambiar Tipo de Entrada del Visual Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Vértice"
@@ -6937,6 +7278,14 @@ msgstr "Luz"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Editar Propiedad Visual"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Se ha cambiado el Modo de Visual Shader"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Ejecutable"
@@ -6950,9 +7299,22 @@ msgid "Delete preset '%s'?"
msgstr "¿Eliminar preajuste '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
msgstr ""
-"Las plantillas de exportación para esta plataforma faltan/están corruptas:"
+"No se pudo exportar el proyecto para la plataforma '%s'.\n"
+"Las plantillas de exportación parecen faltar o ser inválidas."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"No se pudo exportar el proyecto para la plataforma '%s'.\n"
+"Esto puede ser debido a un problema de configuración en el preset de "
+"exportación o en los ajustes de exportación."
#: editor/project_export.cpp
msgid "Release"
@@ -6963,6 +7325,16 @@ msgid "Exporting All"
msgstr "Exportar Todo"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "La ruta no existe."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"Las plantillas de exportación para esta plataforma faltan/están corruptas:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Ajustes preestablecidos"
@@ -7199,11 +7571,11 @@ msgstr "Examinar"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Renderizador:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7212,10 +7584,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Mayor calidad visual\n"
+"Todas las características disponibles\n"
+"Incompatible con hardware antiguo\n"
+"No recomendado para juegos web"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7224,10 +7600,16 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Baja calidad visual\n"
+"Algunas características no disponibles\n"
+"Funciona en la mayoría de hardware\n"
+"Recomendado para juegos web"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"El renderizador se puede cambiar más tarde, pero es posible que las escenas "
+"deban ajustarse."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7243,6 +7625,28 @@ msgstr "¿Seguro que quieres abrir más de un proyecto?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"El siguiente archivo de configuración del proyecto no especifica la versión "
+"de Godot con la que fue creado.\n"
+"\n"
+"%s\n"
+"\n"
+"Si procedes a abrirlo, se convertirá al formato de archivo de configuración "
+"actual de Godot.\n"
+"Advertencia: Ya no podrá abrir el proyecto con versiones anteriores del "
+"motor."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7959,16 +8363,22 @@ msgstr "Duplicar nodo(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"No se pueden reparar los nodos en las escenas heredadas, el orden de los "
+"nodos no puede cambiar."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
-msgstr ""
+msgstr "El nodo debe pertenecer a la escena editada para convertirse en raíz."
#: editor/scene_tree_dock.cpp
msgid "Instantiated scenes can't become root"
msgstr "Las escenas instanciadas no pueden ser raíz"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Convertir nodo como Raíz"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "¿Eliminar nodo(s)?"
@@ -8005,6 +8415,10 @@ msgid "Make Local"
msgstr "Crear local"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Nueva Raíz de Escena"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Crear Nodo Raíz:"
@@ -8034,7 +8448,7 @@ msgstr "¡No se puede operar sobre los nodos heredados por la escena actual!"
#: editor/scene_tree_dock.cpp
msgid "Attach Script"
-msgstr "Añadir script"
+msgstr "Añadir Script"
#: editor/scene_tree_dock.cpp
msgid "Remove Node(s)"
@@ -8434,6 +8848,18 @@ msgid "Set From Tree"
msgstr "Establecer desde árbol"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Eliminar Atajo"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Restaurar Atajo"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Cambiar Atajo"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Atajos"
@@ -8642,6 +9068,10 @@ msgid "GridMap Duplicate Selection"
msgstr "GridMap Duplicar selección"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "Pintar GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Mapa de cuadrícula"
@@ -8778,10 +9208,6 @@ msgid "Build Project"
msgstr "Compilar proyecto"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Advertencias"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Ver registro"
@@ -8807,7 +9233,7 @@ msgstr "Calculando tamaño de cuadrícula..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating heightfield..."
-msgstr "Creando heightfield..."
+msgstr "Creando campo de alturas..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Marking walkable triangles..."
@@ -8831,7 +9257,7 @@ msgstr "Creando contornos..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating polymesh..."
-msgstr "Crear polymesh..."
+msgstr "Creando polymesh..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Converting to native navigation mesh..."
@@ -8948,10 +9374,6 @@ msgid "Change Expression"
msgstr "Cambiar expresión"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Añadir nodo"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Quitar nodos de VisualScript"
@@ -9036,6 +9458,10 @@ msgid "Change Input Value"
msgstr "Cambiar valor de entrada"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Redimensionar Comentario"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "No se puede copiar el nodo de función."
@@ -9137,7 +9563,7 @@ msgstr "¡El objeto base no es un nodo!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Path does not lead Node!"
-msgstr "¡La ruta no apunta a un nodo!"
+msgstr "¡La ruta no apunta a un Nodo!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
@@ -9187,11 +9613,11 @@ msgstr "Establecer %s"
#: platform/android/export/export.cpp
msgid "Package name is missing."
-msgstr ""
+msgstr "Nombre de paquete faltante."
#: platform/android/export/export.cpp
msgid "Package segments must be of non-zero length."
-msgstr ""
+msgstr "Los segmentos del paquete deben ser de largo no nulo."
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
@@ -9201,11 +9627,12 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
-msgstr ""
+msgstr "Un dígito no puede ser el primer carácter en un segmento de paquete."
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
+"El carácter '%s' no puede ser el primer carácter en un segmento de paquete."
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
@@ -9221,16 +9648,15 @@ msgstr "OpenJDK jarsigner no configurado en Ajustes del Editor."
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
-msgstr ""
+msgstr "Keystore debug no configurada en Ajustes del Editor ni en el preset."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
msgstr "Clave pública inválida para la expansión de APK."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid package name:"
-msgstr "El nombre de clase no es correcto"
+msgstr "Nombre de paquete inválido:"
#: platform/iphone/export/export.cpp
msgid "Identifier is missing."
@@ -9238,21 +9664,23 @@ msgstr "Identificador no encontrado."
#: platform/iphone/export/export.cpp
msgid "Identifier segments must be of non-zero length."
-msgstr ""
+msgstr "Los segmentos de un identificador deben ser de largo no nulo."
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "The character '%s' is not allowed in Identifier."
-msgstr "El nombre no es un identificador válido:"
+msgstr "El carácter '%s' no esta permitido como identificador."
#: platform/iphone/export/export.cpp
msgid "A digit cannot be the first character in a Identifier segment."
msgstr ""
+"Un dígito no puede ser el primer carácter en un segmento Identificador."
#: platform/iphone/export/export.cpp
msgid ""
"The character '%s' cannot be the first character in a Identifier segment."
msgstr ""
+"El carácter '%s' no puede ser el primer carácter en un segmento "
+"Identificador."
#: platform/iphone/export/export.cpp
msgid "The Identifier must have at least one '.' separator."
@@ -9264,13 +9692,12 @@ msgstr ""
"App Store Team ID no especificado - no se puede configurar el proyecto."
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Invalid Identifier:"
-msgstr "El nombre no es un identificador válido:"
+msgstr "Identificador inválido:"
#: platform/iphone/export/export.cpp
msgid "Required icon is not specified in the preset."
-msgstr ""
+msgstr "El icono requerido no está especificado en el preset."
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
@@ -9305,65 +9732,61 @@ msgid "Using default boot splash image."
msgstr "Usando la imagen de carga por defecto."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid package unique name."
-msgstr "El nombre no es correcto."
+msgstr "Nombre único de paquete inválido."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid product GUID."
-msgstr "Tamaño de tipografía incorrecto."
+msgstr "GUID de producto inválido."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid publisher GUID."
-msgstr "Ruta base incorrecta"
+msgstr "GUID de publisher inválido."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid background color."
-msgstr "El origen personalizado de tipografía no es correcto."
+msgstr "Color de fondo inválido."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "El logo de la tienda no es del tamaño adecuado (debe ser de 50x50)."
+msgstr ""
+"Las dimensiones de la imagen para el Store Logo son inválidas (debería ser "
+"50x50)."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
msgstr ""
-"El logo cuadrado de 44x44 no es del tamaño adecuado (debe ser de 44x44)."
+"Las dimensiones de la imagen para el logo cuadrado de 44x44 son inválidas "
+"(debería ser 44x44)."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
msgstr ""
-"El logo cuadrado de 71x71 no es del tamaño adecuado (debe ser de 71x71)."
+"Las dimensiones de la imagen para el logo cuadrado de 71x71 son inválidas "
+"(debería ser 71x71)."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
msgstr ""
-"El logo cuadrado de 150x150 no es del tamaño adecuado (debe ser de 150x150)."
+"Las dimensiones de la imagen para el logo cuadrado de 150x150 son inválidas "
+"(debería ser 150x150)."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
msgstr ""
-"El logo cuadrado de 310x310 no es del tamaño adecuado (debe ser de 310x310)."
+"Las dimensiones de la imagen para el logo cuadrado de 310x310 son inválidas "
+"(debería ser 310x310)."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
msgstr ""
-"El logo ancho de 310x150 no es del tamaño adecuado (debe ser de 310x150)."
+"Las dimensiones de la imagen para el logo ancho de 310x150 son inválidas "
+"(debería ser 310x150)."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid splash screen image dimensions (should be 620x300)."
msgstr ""
-"El tamaño de la imagen de arranque no es correcto (debe ser de 620x300)."
+"Las dimensiones de la imagen del splash son inválidas (debería ser 620x300)."
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -9477,6 +9900,17 @@ msgstr ""
"En nodo ParallaxLayer solo funciona cuando esta posicionado como hijo de un "
"nodo ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"Las partículas basadas en la GPU no son compatibles con el controlador de "
+"vídeo GLES2.\n"
+"En su lugar, utiliza el nodo CPUParticles2D. Para ello puedes utilizar la "
+"opción \"Convertir a CPUParticles\"."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9636,6 +10070,12 @@ msgstr ""
"Se debe proveer de una forma a CollisionShape para que funcione. Por favor, "
"¡crea un recurso \"shape\"!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nada visible ya que no se asignó ningún mesh."
@@ -9652,6 +10092,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Trazando mallas"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9668,6 +10114,17 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"Las partículas basadas en la GPU no son compatibles con el controlador de "
+"vídeo GLES2.\n"
+"En su lugar, utiliza el nodo CPUParticles. Para ello puedes utilizar la "
+"opción \"Convertir a CPUParticles\"."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Nada es visible porque las mallas no se han asignado a los pases de dibujo."
@@ -9686,13 +10143,12 @@ msgstr ""
"PathFollow solo funciona cuando está asignado como hijo de un nodo Path."
#: scene/3d/path.cpp
-#, fuzzy
msgid ""
"PathFollow ROTATION_ORIENTED requires \"Up Vector\" enabled in its parent "
"Path's Curve resource."
msgstr ""
-"OrientedPathFollow requiere que \"Up Vector\" esté activo en el recurso "
-"Curve de su Path padre."
+"PathFollow ROTATION_ORIENTED requiere que \"Up Vector\" esté activo en el "
+"recurso Curve de su Path padre."
#: scene/3d/physics_body.cpp
msgid ""
@@ -9709,26 +10165,6 @@ msgid "Path property must point to a valid Spatial node to work."
msgstr ""
"La propiedad Path debe apuntar a un nodo Spatial válido para funcionar."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment necesita un recurso Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Solo se permite un WorldEnvironment por escena (o conjunto de escenas "
-"instanciadas)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Este WorldEnvironment está siendo ignorado. Agrega un nodo Camera (para "
-"escenas 3D) o configura el Background Mode de este entorno en modo Canvas "
-"(para escenas 2D)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Este cuerpo sera ignorado hasta que le asignes un mesh"
@@ -9759,6 +10195,26 @@ msgstr ""
"VehicleWheel sirve para proporcionar un sistema de ruedas a un VehicleBody. "
"Por favor, úselo como hijo de un VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment necesita un recurso Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Solo se permite un WorldEnvironment por escena (o conjunto de escenas "
+"instanciadas)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Este WorldEnvironment está siendo ignorado. Agrega un nodo Camera (para "
+"escenas 3D) o configura el Background Mode de este entorno en modo Canvas "
+"(para escenas 2D)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "En el nodo BlendTree '%s', no se encontró la animación: '%s'"
@@ -9802,12 +10258,28 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Este nodo ha quedado obsoleto. Usa AnimationTree en su lugar."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Selecciona un color de la pantalla."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Modo Raw"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Añadir el color actual como predeterminado"
+msgid "Switch between hexadecimal and code values."
+msgstr "Cambiar entre valores hexadecimales y de código."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Añadir el color actual como preset."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9817,6 +10289,11 @@ msgstr "¡Alerta!"
msgid "Please Confirm..."
msgstr "Por favor, confirma..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Ir a la carpeta principal"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9901,6 +10378,25 @@ msgstr "Asignación a uniform."
msgid "Varyings can only be assigned in vertex function."
msgstr "Solo se pueden asignar variaciones en funciones de vértice."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Instanciar la(s) escena(s) seleccionadas como hijas del nodo seleccionado."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Advertencias:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Tamaño de la tipografía:"
+
+#~ msgid "Line:"
+#~ msgstr "Línea:"
+
+#~ msgid "Col:"
+#~ msgstr "Columna:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "OrientedPathFollow solo funciona cuando esta asignado como hijo de un "
@@ -10062,9 +10558,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Convert To Lowercase"
#~ msgstr "Convertir a minúsculas"
-#~ msgid "Snap To Floor"
-#~ msgstr "Ajustar al suelo"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Rotar 0 grados"
@@ -10611,9 +11104,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Added:"
#~ msgstr "Añadido:"
-#~ msgid "Removed:"
-#~ msgstr "Eliminado:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "No se pudo guardar la subtextura del altas:"
@@ -10885,9 +11375,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Error importing:"
#~ msgstr "Hubo un error al importar:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Solo se requiere un archivo para textura grande."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Tamaño máximo de textura:"
@@ -11123,10 +11610,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgstr "Editar grupos"
#, fuzzy
-#~ msgid "GridMap Paint"
-#~ msgstr "Coloreado de GridMap"
-
-#, fuzzy
#~ msgid "Tiles"
#~ msgstr "Archivo"
@@ -11474,9 +11957,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Cannot go into subdir:"
#~ msgstr "No se puede acceder al subdir:"
-#~ msgid "Imported Resources"
-#~ msgstr "Importar Recursos"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "Insertar Claves (Ins)"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index 86f1e6a72d..cf5679d972 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -8,12 +8,13 @@
# Sebastian Silva <sebastian@sugarlabs.org>, 2016.
# Jose Luis Bossio <joseluisbossio@gmail.com>, 2018.
# Reynaldo Cruz <rcruz60@gmail.com>, 2018.
-# Javier Ocampos <xavier.ocampos@gmail.com>, 2018.
+# Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019.
+# Andrés S <andres.segovia.dev@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
+"PO-Revision-Date: 2019-03-08 15:04+0000\n"
"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
@@ -22,7 +23,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -89,6 +90,14 @@ msgstr "Duplicar Clave(s) Seleccionada(s)"
msgid "Delete Selected Key(s)"
msgstr "Eliminar Clave(s) Seleccionada(s)"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Agregar Punto Bezier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Mover Puntos Bezier"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Duplicar Claves de Anim"
@@ -118,6 +127,15 @@ msgid "Anim Change Call"
msgstr "Cambiar Call de Anim"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Cambiar Duración de la Animación"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Cambiar Loop de Animación"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Pista de Propiedades"
@@ -167,6 +185,10 @@ msgid "Anim Clips:"
msgstr "Clips de Anim:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Cambiar Ruta de la Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Act./Desact. esta pista."
@@ -191,6 +213,10 @@ msgid "Time (s): "
msgstr "Tiempo (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Activar/Desactivar Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Contínuo"
@@ -241,6 +267,18 @@ msgid "Delete Key(s)"
msgstr "Eliminar Clave(s)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Cambiar Modo de Actualización de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Cambiar Modo de Interpolación de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Cambiar Modo de Bucle de Animación"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Quitar pista de animación"
@@ -282,6 +320,14 @@ msgid "Anim Insert Key"
msgstr "Insertar Clave de Animación"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Cambiar Step de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Reordenar Pistas"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Las pistas Transform solo aplican a nodos de tipo Spatial."
@@ -312,6 +358,10 @@ msgid "Not possible to add a new track without a root"
msgstr "No es posible agregar una nueva pista sin una raíz"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Agregar Pista Bezier"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "La ruta de la pista es inválida, por ende no se pueden agregar claves."
@@ -320,12 +370,24 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "La pista no es de tipo Spatial, no se puede insertar la clave"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Añadir Clave de Pista de Transformación"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Añadir Clave de Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
"La ruta de la pista es inválida, por ende no se pueden agregar claves de "
"métodos."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Agregar Clave de Pista de Método"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Método no encontrado en el objeto: "
@@ -338,6 +400,10 @@ msgid "Clipboard is empty"
msgstr "El portapapeles está vacío"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Pegar Pistas"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Escalar Keys de Anim"
@@ -382,10 +448,6 @@ msgid "Copy Tracks"
msgstr "Copiar Pistas"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Pegar Pistas"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Escalar Selección"
@@ -485,6 +547,18 @@ msgstr "Elegir pistas a copiar:"
msgid "Copy"
msgstr "Copiar"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Agregar Clip de Pista de Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Cambiar Offset Inicial de Clip de Pista de Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Cambiar Offset Final de Clip de Pista de Audio"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Redimencionar Array"
@@ -549,21 +623,13 @@ msgstr "Zoom Out"
msgid "Reset Zoom"
msgstr "Resetear el Zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Advertencias:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Tamaño de Tipografía:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linea:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Advertencias"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Col:"
+msgid "Line and column numbers."
+msgstr "Números de línea y columna."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -864,8 +930,8 @@ msgstr "Eliminar archivos seleccionados?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Eliminar"
@@ -1121,8 +1187,8 @@ msgid "Add Bus"
msgstr "Agregar Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Crear un nuevo Layout Bus."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Agregar un nuevo Bus de Audio a este layout."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1150,6 +1216,10 @@ msgstr "Cargar Valores por Defecto"
msgid "Load the default Bus Layout."
msgstr "Cargar el Bus Layout predeterminado."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Crear un nuevo Layout Bus."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nombre inválido."
@@ -1299,6 +1369,35 @@ msgstr "No se encontraron plantillas de exportación en la ruta esperada:"
msgid "Packing"
msgstr "Empaquetando"
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"La plataforma de destino requiere compresión de texturas 'ETC' para GLES2. "
+"Activá el soporte en Ajustes del Proyecto."
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"La plataforma de destino requiere compresión de texturas 'ETC' para GLES2. "
+"Activá el soporte en Ajustes del Proyecto."
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"La plataforma de destino requiere compresión de texturas 'ETC' para GLES2. "
+"Activá el soporte en Ajustes del Proyecto."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1344,7 +1443,7 @@ msgstr "Mostrar en Explorador de Archivos"
msgid "New Folder..."
msgstr "Nueva Carpeta..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Refrescar"
@@ -1419,10 +1518,33 @@ msgstr "Subir Favorito"
msgid "Move Favorite Down"
msgstr "Bajar Favorito"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Piso Anterior"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Piso Siguiente"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Ir a carpeta padre"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "No se pudo crear la carpeta."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Ver ítems como una grilla de miniaturas."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Ver ítems como una lista."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Directorios y Archivos:"
@@ -1645,9 +1767,10 @@ msgstr "Limpiar Salida"
msgid "Project export failed with error code %d."
msgstr "La exportación del proyecto falló con el código de error %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Error al guardar el recurso!"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Imported resources can't be saved."
+msgstr "Importar Recursos"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1655,6 +1778,16 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Error al guardar el recurso!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Guardar Recurso Como..."
@@ -1879,6 +2012,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "Guardar cambios a '%s' antes de cerrar?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Se guardaron %s recurso(s) modificado(s)."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Se necesita un nodo raíz para guardar la escena."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Guardar Escena Como..."
@@ -2406,8 +2547,8 @@ msgid "Save & Restart"
msgstr "Guardar y Reiniciar"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "Gira cuando la ventana del editor repinta!"
+msgid "Spins when the editor window redraws."
+msgstr "Gira cuando la ventana del editor se redibuja."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2973,14 +3114,6 @@ msgstr ""
"No se puede navegar a '%s' ya que no se encontro en el sistema de archivos!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Ver ítems como una grilla de miniaturas."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Ver ítems como una lista."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Estado: Falló la importación del archivo. Por favor arreglá el archivo y "
@@ -3118,11 +3251,6 @@ msgid "Search files"
msgstr "Buscar archivos"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-"Instanciar la(s) escena(s) seleccionadas como hijas del nodo seleccionado."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3334,17 +3462,20 @@ msgstr "Reimportar"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Guardar escenas, reimportar y reiniciar"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Cambiar el driver de video requiere reiniciar el editor."
+msgstr ""
+"Para cambiar el tipo de un archivo importado es necesario reiniciar el "
+"editor."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"ADVERTENCIA: Existen elementos que utilizan este recurso, podrían dejar de "
+"cargar correctamente."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3469,22 +3600,6 @@ msgid "Create Polygon"
msgstr "Crear Polígono"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Editar Polígono"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Insertar Punto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Editar Polígono (Remover Punto)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Remover Polígono y Punto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3505,6 +3620,22 @@ msgstr ""
msgid "Erase points."
msgstr "Borrar puntos."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Editar Polígono"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Insertar Punto"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Editar Polígono (Remover Punto)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Remover Polígono y Punto"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3522,6 +3653,19 @@ msgstr "Cargar..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "Mover Punto de Nodo"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "Cambiar Límites de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "Cambiar Etiquetas de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3529,6 +3673,24 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "Agregar Punto de Nodo"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "Añadir Punto de Animación"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "Eliminar Punto BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "Mover Punto de Nodo de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3571,6 +3733,26 @@ msgid "Triangle already exists"
msgstr "El triángulo ya existe"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Agregar Triángulo"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "Cambiar Límites de BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "Cambiar Etiquetas de BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "Quitar Punto BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Quitar Triángulo BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D no pertenece a un nodo AnimationTree."
@@ -3579,6 +3761,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "No hay ningún triángulo, así que no se puede hacer blending."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "Act/Desact. Auto Triángulos"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Crear triángulos conectando puntos."
@@ -3596,6 +3782,10 @@ msgid "Blend:"
msgstr "Blend:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Parámetro Modificado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Editar Filtros"
@@ -3605,6 +3795,15 @@ msgid "Output node can't be added to the blend tree."
msgstr "El nodo de salida no puede ser agregado al blend tree."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Agregar Nodo al BlendTree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Nodo Movido"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3612,6 +3811,33 @@ msgstr ""
"inválida."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Nodos Conectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Nodos Desconectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Establecer Animación"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Eliminar Nodo"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "Act./Desact. Filtro On/Off"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Cambiar Filtro"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"No se asigno ningún reproductor de animación, así que no se pudieron obtener "
@@ -3633,6 +3859,11 @@ msgstr ""
"no se pudieron obtener los nombres de las pistas."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Nodo Renombrado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Agregar Nodo..."
@@ -3860,6 +4091,19 @@ msgid "Cross-Animation Blend Times"
msgstr "Cross-Animation Blend Times"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Mover Nodo"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Agregar Transición"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Agregar Nodo"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Fin"
@@ -3888,6 +4132,18 @@ msgid "No playback resource set at path: %s."
msgstr "Ningún recurso de reproducción asignado en la ruta: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Nodo Eliminado"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Transición Eliminada"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Establecer Nodo de Inicio (Reproducción Automática)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4311,6 +4567,18 @@ msgid "Move CanvasItem"
msgstr "Mover CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Presets para los valores de anclajes y márgenes de un nodo Control."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Los hijos de contenedores tienen su anclas y margenes determinados por sus "
+"padres."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Solo anclas"
@@ -4497,7 +4765,7 @@ msgstr "Restablecer Huesos Personalizados"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View"
-msgstr "Ver"
+msgstr "Vista"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -4696,6 +4964,10 @@ msgstr "Mantené Shift para editar tangentes individualmente"
msgid "Bake GI Probe"
msgstr "Hacer Bake de GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Degradado Editado"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Item %d"
@@ -4953,6 +5225,10 @@ msgid "Generating Visibility Rect"
msgstr "Generando Rect. de Visibilidad"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Generar Rect. de Visibilidad"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Solo se puede setear un punto en un material de proceso ParticlesMaterial"
@@ -4966,10 +5242,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Sin pixeles con transparencia > 128 en imagen..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Generar Rect. de Visibilidad"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Cargar Máscara de Emisión"
@@ -5057,13 +5329,13 @@ msgid "Generating AABB"
msgstr "Generando AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Generar AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Generar AABB de Visibilidad"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Generar AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Remover Punto de Curva"
@@ -5218,6 +5490,14 @@ msgid "Create UV Map"
msgstr "Crear Mapa UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"El polígono 2D tiene vértices internos, por lo que ya no se puede editar en "
+"el viewport."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Crear Polígono y UV"
@@ -5837,6 +6117,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "Este esqueleto no tiene huesos, crea algunos nodos Bone2D hijos."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Crear Pose de Descanso a partir de Huesos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Asignar Pose de Descanso a Huesos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Skeleton2D"
@@ -5894,15 +6182,15 @@ msgstr "Ver Transformación en Plano."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
-msgstr "Escalado: "
+msgstr "Escalando: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translating: "
-msgstr "Traducciones: "
+msgstr "Trasladando: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
-msgstr "Torando %s grados."
+msgstr "Rotando %s grados."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Keying is disabled (no key inserted)."
@@ -5945,10 +6233,6 @@ msgid "Vertices"
msgstr "Vértices"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Vista Superior."
@@ -5993,8 +6277,8 @@ msgid "Rear"
msgstr "Detrás"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr "Alinear con vista"
+msgid "Align with View"
+msgstr "Alinear con Vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6085,6 +6369,14 @@ msgid "Freelook Speed Modifier"
msgstr "Modificador de Velocidad de Vista Libre"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"Nota: El valor FPS que se muestra es la velocidad de fotogramas del editor.\n"
+"No se puede utilizar como un indicador fiable del rendimiento en el juego."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Rotación de Vista Trabada"
@@ -6093,6 +6385,10 @@ msgid "XForm Dialog"
msgstr "Dialogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Ajustar Nodos al Suelo"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Modo Seleccionar (Q)"
@@ -6116,7 +6412,7 @@ msgstr "Modo Rotar (E)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode (R)"
-msgstr "Modo de Escalado (R)"
+msgstr "Modo Escalar (R)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Local Coords"
@@ -6204,7 +6500,7 @@ msgstr "Ajustar objeto al suelo"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
-msgstr "Dialogo de Transformación..."
+msgstr "Cuadro de diálogo de Transform..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "1 Viewport"
@@ -6308,7 +6604,7 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr "Gizmo sin nombre"
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6372,10 +6668,6 @@ msgid "Add Empty"
msgstr "Agregar Vacío"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Cambiar Loop de Animación"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Cambiar FPS de Animación"
@@ -6384,8 +6676,12 @@ msgid "(empty)"
msgstr "(vacío)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animaciones"
+msgid "Animations:"
+msgstr "Animaciones:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Nueva Animación"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6396,8 +6692,8 @@ msgid "Loop"
msgstr "Loop"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Cuadros de Animación"
+msgid "Animation Frames:"
+msgstr "Fotogramas de animación:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6685,6 +6981,24 @@ msgid "Merge from Scene"
msgstr "Mergear desde Escena"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Piso Siguiente"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Piso Anterior"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Copiar bitmask."
@@ -6697,6 +7011,10 @@ msgid "Erase bitmask."
msgstr "Borrar bitmask."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Crear un rectángulo nuevo."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Crear un nuevo polígono."
@@ -6834,6 +7152,16 @@ msgid "Clear Tile Bitmask"
msgstr "Reestablecer Máscara de Bits de Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Mover Polígono"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Mover Polígono"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "Remover Tile"
@@ -6874,6 +7202,26 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "Asignar Nombre a Uniform"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "Establecer Puerto Predeterminado de Entrada"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Agregar Nodo al Visual Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Duplicar Nodos"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "Se cambió el Tipo de Entrada de Visual Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Vértice"
@@ -6889,6 +7237,14 @@ msgstr "Luz"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Editar Propiedad Visual"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Se cambió el Modo de Visual Shader"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Ejecutable"
@@ -6902,10 +7258,22 @@ msgid "Delete preset '%s'?"
msgstr "Eliminar preset '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
msgstr ""
-"Las plantillas de exportación para esta plataforma están faltando o "
-"corruptas:"
+"No se pudo exportar el proyecto para la plataforma '%s'.\n"
+"Las plantillas de exportación parecen faltar o ser inválidas."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"No se pudo exportar el proyecto para la plataforma '%s'.\n"
+"Esto puede ser debido a un problema de configuración en el preset de "
+"exportación o en los ajustes de exportación."
#: editor/project_export.cpp
msgid "Release"
@@ -6916,6 +7284,17 @@ msgid "Exporting All"
msgstr "Exportar Todo"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "La ruta no existe."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"Las plantillas de exportación para esta plataforma están faltando o "
+"corruptas:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Presets"
@@ -7152,11 +7531,11 @@ msgstr "Examinar"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Renderizador:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7165,10 +7544,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Mayor calidad visual\n"
+"Todas las características disponibles\n"
+"Incompatible con hardware antiguo\n"
+"No recomendado para juegos web"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7177,10 +7560,16 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Baja calidad visual\n"
+"Algunas características no disponibles\n"
+"Funciona en la mayoría de hardware\n"
+"Recomendado para juegos web"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"El renderizador se puede cambiar luego, pero es posible que sea necesario "
+"ajustar las escenas."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7196,6 +7585,28 @@ msgstr "¿Estás seguro/a que quieres abrir más de un proyecto?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"El siguiente archivo de configuración del proyecto no especifica la versión "
+"de Godot con la que fue creado.\n"
+"\n"
+"%s\n"
+"\n"
+"Si procedés a abrirlo, sera convertido al formato actual de configuración de "
+"Godot. \n"
+"Advertencia: Ya no vas a poder volver a abrir el proyecto con versiones "
+"anteriores del motor."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7912,6 +8323,8 @@ msgstr "Duplicar Nodo(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"No se puede reemparentar nodos en escenas heredadas, el orden de nodos no "
+"puede cambiar."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -7922,6 +8335,10 @@ msgid "Instantiated scenes can't become root"
msgstr "Las escenas instanciadas no pueden convertirse en raíz"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Convertir nodo en Raíz"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Eliminar Nodo(s)?"
@@ -7958,6 +8375,10 @@ msgid "Make Local"
msgstr "Crear Local"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Nueva Raíz de Escena"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Crear Nodo Raíz:"
@@ -8388,6 +8809,18 @@ msgid "Set From Tree"
msgstr "Setear Desde Arbol"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Eliminar Atajo"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Restaurar Atajo"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Cambiar Atajo"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Atajos"
@@ -8595,6 +9028,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Duplicar Selección en GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "Pintar GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Mapa de Grilla"
@@ -8731,10 +9168,6 @@ msgid "Build Project"
msgstr "Construir Proyecto"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Advertencias"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Ver registro"
@@ -8900,10 +9333,6 @@ msgid "Change Expression"
msgstr "Cambiar Expresión"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Agregar Nodo"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Quitar Nodos VisualScript"
@@ -8988,6 +9417,10 @@ msgid "Change Input Value"
msgstr "Cambiar Valor de Entrada"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Redimensionar Comentario"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "No se puede copiar el nodo de función."
@@ -9311,7 +9744,7 @@ msgstr ""
#: platform/uwp/export/export.cpp
msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Dimensiones de la imagen del splash inválidas (debería ser 620x400)."
+msgstr "Dimensiones de la imagen del splash inválidas (debería ser 620x300)."
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -9422,6 +9855,17 @@ msgstr ""
"El nodo ParallaxLayer sólo funciona cuando está seteado como hijo de un nodo "
"ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"Las partículas basadas en la GPU no son compatibles con el controlador de "
+"vídeo GLES2.\n"
+"En su lugar, utiliza el nodo CPUParticles2D. Para ello podés utilizar la "
+"opción \"Convertir a CPUParticles\"."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9580,6 +10024,12 @@ msgstr ""
"Se debe proveer un shape para que CollisionShape funcione. Creale un recurso "
"shape!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nada visible ya que no se asignó ningún mesh."
@@ -9596,6 +10046,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Ploteando Meshes"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9611,6 +10067,17 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"Las partículas basadas en la GPU no son compatibles con el controlador de "
+"vídeo GLES2.\n"
+"En su lugar, utilizá el nodo CPUParticles. Para ello podés utilizar la "
+"opción \"Convertir a CPUParticles\"."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr "Nada visible ya que no se asigno pasadas de dibujado a los meshes."
@@ -9650,26 +10117,6 @@ msgid "Path property must point to a valid Spatial node to work."
msgstr ""
"La propiedad Path debe apuntar a un nodo Spatial valido para funcionar."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment necesita un recurso Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Solo se permite un WorldEnvironment por escena (o conjunto de escenas "
-"instanciadas)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Este WorldEnvironment esta siendo ignorado. Agregá un nodo Camera (para "
-"escenas 3D) o configurá el Background Mode de este entorno en modo Canvas "
-"(para escenas 2D)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Este cuerpo sera ignorado hasta que le asignes un mesh"
@@ -9700,6 +10147,26 @@ msgstr ""
"VehicleWheel sirve para proveer un sistema de ruedas a VehicleBody. Por "
"favor usálo como hijo de VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment necesita un recurso Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Solo se permite un WorldEnvironment por escena (o conjunto de escenas "
+"instanciadas)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Este WorldEnvironment esta siendo ignorado. Agregá un nodo Camera (para "
+"escenas 3D) o configurá el Background Mode de este entorno en modo Canvas "
+"(para escenas 2D)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "En el nodo BlendTree '%s', no se encontró la animación: '%s'"
@@ -9743,12 +10210,28 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Este nodo ha sido deprecado. Usá AnimationTree."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Elegir un color de la pantalla."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Modo Raw"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Agregar color actual como preset"
+msgid "Switch between hexadecimal and code values."
+msgstr "Cambiar entre valores hexadecimales y de código."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Agregar color actual como preset."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9758,6 +10241,11 @@ msgstr "Alerta!"
msgid "Please Confirm..."
msgstr "Confirmá, por favor..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Ir a carpeta padre"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9842,6 +10330,25 @@ msgstr "Asignación a uniform."
msgid "Varyings can only be assigned in vertex function."
msgstr "Solo se pueden asignar variaciones en funciones de vértice."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Instanciar la(s) escena(s) seleccionadas como hijas del nodo seleccionado."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Advertencias:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Tamaño de Tipografía:"
+
+#~ msgid "Line:"
+#~ msgstr "Linea:"
+
+#~ msgid "Col:"
+#~ msgstr "Col:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "OrientedPathFollow solo funciona cuando esta asignado como hijo de un "
@@ -10003,9 +10510,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Convert To Lowercase"
#~ msgstr "Convertir A Minúscula"
-#~ msgid "Snap To Floor"
-#~ msgstr "Ajustar al suelo"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Rotar 0 grados"
@@ -10544,9 +11048,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Added:"
#~ msgstr "Agregado:"
-#~ msgid "Removed:"
-#~ msgstr "Removido:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "No se pudo guardar la subtextura de altas:"
@@ -10815,9 +11316,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Error importing:"
#~ msgstr "Error al importar:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Solo se requiere un archivo para textura grande."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Tamaño Max. de Textura:"
@@ -11049,9 +11547,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Edit Groups"
#~ msgstr "Editar Grupos"
-#~ msgid "GridMap Paint"
-#~ msgstr "Pintar GridMap"
-
#~ msgid "Tiles"
#~ msgstr "Tiles"
@@ -11390,9 +11885,6 @@ msgstr "Solo se pueden asignar variaciones en funciones de vértice."
#~ msgid "Cannot go into subdir:"
#~ msgstr "No se puede acceder al subdir:"
-#~ msgid "Imported Resources"
-#~ msgstr "Importar Recursos"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "Insertar Claves (Ins)"
diff --git a/editor/translations/et.po b/editor/translations/et.po
index 948c2861b7..092ddb5568 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -76,6 +76,14 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -105,6 +113,15 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -154,6 +171,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -178,6 +199,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -228,6 +253,18 @@ msgid "Delete Key(s)"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -269,6 +306,14 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -293,6 +338,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -301,10 +350,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -317,6 +378,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -359,10 +424,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -462,6 +523,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -526,20 +599,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -833,8 +898,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1086,7 +1151,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1115,6 +1180,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1258,6 +1327,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1303,7 +1392,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1378,10 +1467,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1597,8 +1706,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1607,6 +1716,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1798,6 +1917,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2285,7 +2412,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2833,14 +2960,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2976,10 +3095,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3323,37 +3438,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3373,12 +3488,43 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3418,6 +3564,26 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3426,6 +3592,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3443,6 +3613,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3452,11 +3626,47 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3472,6 +3682,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3697,6 +3912,19 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3725,6 +3953,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4136,6 +4376,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4513,6 +4763,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4769,19 +5023,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4872,11 +5126,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5031,6 +5285,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5644,6 +5904,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5752,10 +6020,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5800,7 +6064,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5892,6 +6156,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5900,6 +6170,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6112,7 +6386,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6176,19 +6450,19 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
+msgid "Change Animation FPS"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation FPS"
+msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "(empty)"
+msgid "Animations:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6200,7 +6474,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6489,6 +6763,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6501,6 +6791,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6623,6 +6917,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6663,6 +6965,26 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6678,6 +7000,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6691,7 +7021,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6703,6 +7042,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6976,6 +7323,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7666,6 +8026,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7700,6 +8064,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8112,6 +8480,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8316,6 +8696,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8452,10 +8836,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8614,10 +8994,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8698,6 +9074,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9081,6 +9461,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9210,6 +9597,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9224,6 +9617,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9236,6 +9635,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9266,21 +9672,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9304,6 +9695,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9345,11 +9751,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9360,6 +9782,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index 0eec8c6d9d..2e54086c17 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -96,6 +96,16 @@ msgstr "کلید تکراری درست کن"
msgid "Delete Selected Key(s)"
msgstr "کلید‌ها را پاک کن"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Ø§ÙØ²ÙˆØ¯Ù† نقطه"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "برداشتن نقطه"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "تکرار کلید‌های انیمیشن"
@@ -126,6 +136,16 @@ msgstr "ÙØ±Ø§Ø®ÙˆØ§Ù†ÛŒ را در انیمیشن تغییر بده"
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Animation Length"
+msgstr "طول انیمیشن را تغییر بده"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Property Track"
msgstr "ویژگی:"
@@ -175,6 +195,11 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "مقدار آرایه را تغییر بده"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -201,6 +226,10 @@ msgid "Time (s): "
msgstr "زمان:"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "مستمر"
@@ -253,6 +282,21 @@ msgid "Delete Key(s)"
msgstr "حذ٠گره(ها)"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "تغییر مقدار دیکشنری"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "گره انیمیشن"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "حلقه انیمیشن را تغییر بده"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "حذ٠ترک انیمشین"
@@ -294,6 +338,16 @@ msgid "Anim Insert Key"
msgstr "کلید را در انیمیشن درج کن"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "طول انیمیشن را تغییر بده"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "مسیر به سمت گره:"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -318,6 +372,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "ترک را اضاÙÙ‡ Ú©Ù†"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -326,11 +385,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "درج ترک و کلید در انیمیشن"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "ترک را اضاÙÙ‡ Ú©Ù†"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Add Method Track Key"
+msgstr "درج ترک و کلید در انیمیشن"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
msgstr "VariableGet در اسکریپت پیدا نشد: "
@@ -344,6 +418,11 @@ msgid "Clipboard is empty"
msgstr "Ø­Ø§ÙØ¸Ù‡ پنهان خالی است!"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "مسیر به سمت گره:"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "کلیدها را در انیمیشن تغییر مقیاس بده"
@@ -389,11 +468,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "مسیر به سمت گره:"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "انتخاب شده را تغییر مقیاس بده"
@@ -496,6 +570,19 @@ msgstr ""
msgid "Copy"
msgstr "کپی کردن"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "ترک را اضاÙÙ‡ Ú©Ù†"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "آرایه را تغییر اندازه بده"
@@ -560,22 +647,14 @@ msgstr "بزرگنمایی کمتر"
msgid "Reset Zoom"
msgstr "بازنشانی بزرگنمایی"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "خط:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "ستون:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "متد در گره مقصد باید مشخص شده باشد!"
@@ -883,8 +962,8 @@ msgstr "آیا پرونده‌های انتخاب شده حذ٠شود؟"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "حذ٠کن"
@@ -1143,7 +1222,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1172,6 +1251,10 @@ msgstr "بارگیری پیش ÙØ±Ø¶"
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "نام نامعتبر."
@@ -1316,6 +1399,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1365,7 +1468,7 @@ msgstr "باز شدن مدیر پروژه؟"
msgid "New Folder..."
msgstr "ساختن پوشه..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1440,10 +1543,33 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "زبانه قبلی"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "ساختن پوشه"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Ø±ÙØªÙ† به پوشه والد"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "ناتوان در ساختن پوشه."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "پوشه‌ها و پرونده‌ها:"
@@ -1677,8 +1803,8 @@ msgstr "خروجی"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1687,6 +1813,16 @@ msgid "OK"
msgstr "مواÙقت"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "ذخیره منبع از ..."
@@ -1880,6 +2016,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "ذخیره صحنه در ..."
@@ -2378,7 +2522,7 @@ msgid "Save & Restart"
msgstr "ذخیره و خروج"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2940,14 +3084,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3098,10 +3234,6 @@ msgid "Search files"
msgstr "جستجوی کلاسها"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3463,24 +3595,6 @@ msgid "Create Polygon"
msgstr "انتخاب شده را تغییر مقیاس بده"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "ویرایش سیگنال"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "برداشتن نقش"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3500,6 +3614,24 @@ msgstr ""
msgid "Erase points."
msgstr "Ú©Ùندی در آغاز"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "ویرایش سیگنال"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "برداشتن نقش"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3518,12 +3650,47 @@ msgstr "بارگیری"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "برداشتن نقطه"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Ø§ÙØ²ÙˆØ¯Ù† گره"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "تکرار انیمیشن"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "برداشتن نقش"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3565,6 +3732,29 @@ msgid "Triangle already exists"
msgstr "بارگذاری خودکار 's%' هم اکنون موجود است!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Ø§ÙØ²ÙˆØ¯Ù† متغیر"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "برداشتن نقش"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "حذ٠متغیر"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3573,6 +3763,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3590,6 +3784,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "تغییر بده"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "ویرایش صاÙÛŒ ها"
@@ -3599,11 +3798,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "گره(ها) را از درخت اضاÙÙ‡ Ú©Ù†"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "نام گره:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "وصل شده"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "اتصال قطع شده"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "تغییر نام انیمیشن"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "حذ٠گره(ها)"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "صاÙÛŒ بومی‌سازی تغییر کرد"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3619,6 +3861,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "نام گره:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3857,6 +4105,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "حرکت دادن گره(ها)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Ø§ÙØ²ÙˆØ¯Ù† ترجمه"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Ø§ÙØ²ÙˆØ¯Ù† گره"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3886,6 +4149,20 @@ msgid "No playback resource set at path: %s."
msgstr "در مسیر٠منبع نیست."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "برداشته شده:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "گره جابجای"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4310,6 +4587,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4697,6 +4984,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4955,19 +5246,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5059,11 +5350,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5224,6 +5515,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5879,6 +6176,15 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "پخش Ø³ÙØ§Ø±Ø´ÛŒ صحنه"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5992,10 +6298,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6040,7 +6342,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6137,6 +6439,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "بومی‌سازی"
@@ -6146,6 +6454,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "انتخاب حالت"
@@ -6361,7 +6673,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6430,10 +6742,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6442,8 +6750,14 @@ msgid "(empty)"
msgstr "(خالی)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "گره انیمیشن"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "تغییر نام انیمیشن"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6454,8 +6768,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "گره انیمیشن"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6756,6 +7071,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "زبانه قبلی"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6771,6 +7103,11 @@ msgstr "Ú©Ùندی در آغاز"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "ساختن %s جدید"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "انتخاب شده را تغییر مقیاس بده"
@@ -6906,6 +7243,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "انتخاب شده را تغییر مقیاس بده"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "حذ٠قالب"
@@ -6954,6 +7300,27 @@ msgid "TileSet"
msgstr "صدور مجموعه کاشی"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "تکرار کلید‌های انیمیشن"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6970,6 +7337,16 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "ویرایش صاÙÛŒ ها"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "تغییر بده"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6985,7 +7362,16 @@ msgid "Delete preset '%s'?"
msgstr "آیا پرونده‌های انتخاب شده حذ٠شود؟"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6998,6 +7384,15 @@ msgid "Exporting All"
msgstr "صدور"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "پرونده موجود نیست."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7286,6 +7681,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7998,6 +8406,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "حذ٠گره(ها)؟"
@@ -8034,6 +8446,11 @@ msgstr "محلی"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "صحنه جدید"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "ساختن گره"
@@ -8469,6 +8886,19 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Ú©Ùندی در پایان"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8688,6 +9118,11 @@ msgid "GridMap Duplicate Selection"
msgstr "انتخاب شده را به دو تا تکثیر کن"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "ترجیحات"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8832,10 +9267,6 @@ msgid "Build Project"
msgstr "پروژه"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "نمایش پرونده ها"
@@ -9008,10 +9439,6 @@ msgid "Change Expression"
msgstr "انتقال را در انیمیشن تغییر بده"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Ø§ÙØ²ÙˆØ¯Ù† گره"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove VisualScript Nodes"
msgstr "کلیدهای نامعتبر را حذ٠کن"
@@ -9096,6 +9523,10 @@ msgid "Change Input Value"
msgstr "تغییر مقدار ورودی"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9525,6 +9956,13 @@ msgstr ""
"گره ParallaxLayer تنها در زمانی Ú©Ù‡ به عنوان ÙØ±Ø²Ù†Ø¯ یک گره ParallaxBackground "
"تنظیم شود کار می‌کند."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9668,6 +10106,12 @@ msgstr ""
"باید یک Ø´Ú©Ù„ برای CollisionShape ÙØ±Ø§Ù‡Ù… شده باشد تا عمل کند. Ù„Ø·ÙØ§ یک منبع Ø´Ú©Ù„ "
"برای آن ایجاد کنید!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9682,6 +10126,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr "یک منبع NavigationMesh باید برای یک گره تنظیم یا ایجاد شود تا کار کند."
@@ -9696,6 +10146,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9730,23 +10187,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "دارایی Path باید به یک گره Particles2D معتبر اشاره کند تا کار کند."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Ùقط یک WorldEnvironment در هر صحنه (یا مجموعه ای از صحنه های نمونه‌گذاری شده) "
-"مجاز است."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9772,6 +10212,23 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Ùقط یک WorldEnvironment در هر صحنه (یا مجموعه ای از صحنه های نمونه‌گذاری شده) "
+"مجاز است."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9818,11 +10275,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9833,6 +10306,11 @@ msgstr "هشدار!"
msgid "Please Confirm..."
msgstr "Ù„Ø·ÙØ§Ù‹ تأیید کنید…"
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Ø±ÙØªÙ† به پوشه والد"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9913,6 +10391,12 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "خط:"
+
+#~ msgid "Col:"
+#~ msgstr "ستون:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
@@ -10037,12 +10521,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "خارج-داخل"
-#~ msgid "Change Anim Len"
-#~ msgstr "طول انیمیشن را تغییر بده"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "حلقه انیمیشن را تغییر بده"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "کلید مقدار دارای نوع را در انیمیشن ایجاد کن"
@@ -10192,9 +10670,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "Ø§ÙØ²ÙˆØ¯Ù‡ شده:"
-#~ msgid "Removed:"
-#~ msgstr "برداشته شده:"
-
#~ msgid "Re-Importing"
#~ msgstr "در حال وارد کردن دوباره..."
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index 094baf8c80..b956ffac52 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
+"PO-Revision-Date: 2019-03-12 15:25+0000\n"
"Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
@@ -22,7 +22,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -89,6 +89,14 @@ msgstr "Kahdenna valitut avaimet"
msgid "Delete Selected Key(s)"
msgstr "Poista valitut avaimet"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Lisää Bezier-piste"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Siirrä Bezier-pisteitä"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Animaatio: Monista avaimet"
@@ -118,6 +126,15 @@ msgid "Anim Change Call"
msgstr "Animaatio: muuta kutsua"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Muuta animaation pituutta"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Vaihda animaation luuppia"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Ominaisuusraita"
@@ -167,8 +184,12 @@ msgid "Anim Clips:"
msgstr "Animaatioleikkeet:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Muuta raidan polkua"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
-msgstr "Käytä tämä raita päälle/pois."
+msgstr "Kytke tämä raita päälle/pois."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
@@ -191,6 +212,10 @@ msgid "Time (s): "
msgstr "Aika (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Aseta raita päälle"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Jatkuva"
@@ -241,6 +266,18 @@ msgid "Delete Key(s)"
msgstr "Poista avainruudut"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Vaihda animaation päivitystilaa"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Vaihda animaation interpolaatiotilaa"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Vaihda animaation toistotilaa"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Poista animaatioraita"
@@ -282,6 +319,14 @@ msgid "Anim Insert Key"
msgstr "Animaatio: Lisää avain"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Vaihda animaation askelta"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Järjestele uudelleen raidat"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Raitojen muunnos toimii vain Spatial-pohjaisille solmuille."
@@ -310,6 +355,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Uutta raitaa ei voida lisätä ilman juurta"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Lisää Bezier-raita"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Raidan polku on virheellinen, joten ei voida lisätä avainruutua."
@@ -318,10 +367,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Raita ei ole Spatial-tyyppinen, joten ei voida lisätä avainruutua"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Lisää muunnosraidan avainruutu"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Lisää raidan avainruutu"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "Raidan polku on virheellinen, joten ei voida lisätä metodin avainta."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Lisää metodikutsuraidan avainruutu"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Metodia ei löydy objektista: "
@@ -334,6 +395,10 @@ msgid "Clipboard is empty"
msgstr "Leikepöytä on tyhjä"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Liitä raidat"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Animaatio: Skaalaa avaimia"
@@ -376,10 +441,6 @@ msgid "Copy Tracks"
msgstr "Kopioi raidat"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Liitä raidat"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Skaalaa valintaa"
@@ -479,6 +540,18 @@ msgstr "Valitse kopioitavat raidat:"
msgid "Copy"
msgstr "Kopioi"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Lisää ääniraidan leike"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Muuta ääniraidan leikkeen alkusiirrosta"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Muuta ääniraidan leikkeen loppusiirrosta"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Muuta taulukon kokoa"
@@ -543,21 +616,13 @@ msgstr "Loitonna"
msgid "Reset Zoom"
msgstr "Palauta oletuslähennystaso"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Varoitukset:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Fontin koko:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Rivi:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Varoitukset"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Sarake:"
+msgid "Line and column numbers."
+msgstr "Rivi- ja sarakenumerot."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -859,8 +924,8 @@ msgstr "Poista valitut tiedostot?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Poista"
@@ -1116,8 +1181,8 @@ msgid "Add Bus"
msgstr "Lisää väylä"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Luo uusi ääniväylän asettelu."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Lisää tähän asetteluun uusi ääniväylä."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1145,6 +1210,10 @@ msgstr "Lataa oletus"
msgid "Load the default Bus Layout."
msgstr "Lataa väylän oletusasettelu."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Luo uusi ääniväylän asettelu."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Virheellinen nimi."
@@ -1294,6 +1363,33 @@ msgstr "Vientimallia ei löytynyt odotetusta polusta:"
msgid "Packing"
msgstr "Pakataan"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"GLES2 tarvitsee kohdealustalla 'ETC' tekstuuripakkausta. Kytke 'Import Etc' "
+"päälle projektin asetuksista."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"GLES3 tarvitsee kohdealustalla 'ETC' tekstuuripakkausta. Kytke 'Import Etc "
+"2' päälle projektin asetuksista."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"GLES2 vara-ajuri tarvitsee kohdealustalla 'ETC' tekstuuripakkausta. Kytke "
+"'Import Etc' päälle projektin asetuksista tai poista 'Driver Fallback "
+"Enabled' asetus."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1339,7 +1435,7 @@ msgstr "Näytä tiedostonhallinnassa"
msgid "New Folder..."
msgstr "Uusi kansio..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Päivitä"
@@ -1414,10 +1510,30 @@ msgstr "Siirrä suosikkia ylös"
msgid "Move Favorite Down"
msgstr "Siirrä suosikkia alas"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr "Edellinen kansio"
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr "Seuraava kansio"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Siirry yläkansioon"
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr "Kansio suosikkeihin."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Ruudukkonäkymä esikatselukuvilla."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Listanäkymä."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Hakemistot ja tiedostot:"
@@ -1640,9 +1756,9 @@ msgstr "Tyhjennä tuloste"
msgid "Project export failed with error code %d."
msgstr "Projektin vienti epäonnistui virhekoodilla %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Virhe tallennettaessa resurssia!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr "Tuotuja resursseja ei voida tallentaa."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1650,6 +1766,18 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Virhe tallennettaessa resurssia!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+"Resurssia ei voida tallentaa, koska se ei kuulu muokattavana olevaan "
+"skeneen. Tee siitä ensin yksilöllinen."
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Tallenna resurssi nimellä..."
@@ -1867,6 +1995,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "Tallennetaanko muutokset tiedostoon '%s' ennen sulkemista?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Tallennettiin %s muokattua resurssia."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Skenen tallentaminen edellyttää, että sillä on juurisolmu."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Tallenna skene nimellä..."
@@ -2383,8 +2519,8 @@ msgid "Save & Restart"
msgstr "Tallenna & käynnistä uudelleen"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "Pyörii kun editorin ikkuna päivittyy!"
+msgid "Spins when the editor window redraws."
+msgstr "Pyörii kun editorin ikkuna päivittyy."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2950,14 +3086,6 @@ msgstr ""
"tiedostojärjestelmästäsi!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Ruudukkonäkymä esikatselukuvilla."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Listanäkymä."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Tila: Tuonti epäonnistui. Ole hyvä, korjaa tiedosto ja tuo se uudelleen."
@@ -3094,10 +3222,6 @@ msgid "Search files"
msgstr "Etsi tiedostoista"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Luo valituista skeneistä ilmentymä valitun solmun alle."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3310,17 +3434,20 @@ msgstr "Tuo uudelleen"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Tallenna skenet, tuo uudelleen ja käynnistä uudelleen"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Näyttöajurin vaihtaminen edellyttää editorin uudelleenkäynnistystä."
+msgstr ""
+"Tuodun tiedoston tyypin muuttaminen edellyttää editorin "
+"uudelleenkäynnistystä."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"VAROITUS: Tällä resurssilla on sitä käyttäviä assetteja, ne voivat lakata "
+"latautumasta kunnolla."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3445,22 +3572,6 @@ msgid "Create Polygon"
msgstr "Luo polygoni"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Muokkaa polygonia"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Lisää piste"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Muokkaa polygonia (poista piste)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Poista polygoni ja piste"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3481,6 +3592,22 @@ msgstr ""
msgid "Erase points."
msgstr "Pyyhi pisteitä."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Muokkaa polygonia"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Lisää piste"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Muokkaa polygonia (poista piste)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Poista polygoni ja piste"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3498,6 +3625,19 @@ msgstr "Lataa..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "Siirrä solmupistettä"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "Muuta BlendSpace1D rajoja"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "Muuta BlendSpace1D nimikkeitä"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3505,6 +3645,24 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "Lisää solmupiste"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "Lisää animaatiopiste"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "Poista BlendSpace1D piste"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "Siirrä BlendSpace1D solmupistettä"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3547,6 +3705,26 @@ msgid "Triangle already exists"
msgstr "Kolmio on jo olemassa"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Lisää kolmio"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "Muuta BlendSpace2D rajoja"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "Muuta BlendSpace2D nimikkeitä"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "Poista BlendSpace2D piste"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Poista BlendSpace2D kolmio"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D ei kuulu AnimationTree solmuun."
@@ -3555,6 +3733,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Kolmioita ei ole olemassa, joten mitään sulautusta ei tapahdu."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "Aseta automaattiset kolmiot"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Luo kolmiot yhdistämällä pisteet."
@@ -3572,6 +3754,10 @@ msgid "Blend:"
msgstr "Sulautus:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Parametri muutettu"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Muokkaa suodattimia"
@@ -3581,12 +3767,48 @@ msgid "Output node can't be added to the blend tree."
msgstr "Lähtösolmua ei voida lisätä sulautuspuuhun."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Lisää BlendTree solmu"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Solmu siirretty"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
"Ei voida yhdistää, portti voi olla käytössä tai yhteys voi olla virheellinen."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Solmuja yhdistetty"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Solmujen yhteyksiä katkaistu"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Aseta animaatio"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Poista solmu"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "Kytke suodin päälle/pois"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Muuta suodinta"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Animaatiotoistinta ei ole asetettu, joten raitojen nimien haku ei onnistu."
@@ -3606,6 +3828,11 @@ msgstr ""
"nimien haku ei onnistu."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Solmu uudelleennimetty"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Lisää solmu..."
@@ -3831,6 +4058,19 @@ msgid "Cross-Animation Blend Times"
msgstr "Lomittautuvien animaatioiden sulautusajat"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Siirrä solmua"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Lisää siirtymä"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Lisää solmu"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "End"
@@ -3859,6 +4099,18 @@ msgid "No playback resource set at path: %s."
msgstr "Polulle ei ole asetettu toistoresurssia: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Solmu poistettu"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Siirtymä poistettu"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Aseta alkusolmu (automaattitoisto)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4283,6 +4535,18 @@ msgid "Move CanvasItem"
msgstr "Siirrä CanvasItemiä"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Control solmun ankkureiden ja marginaalien arvojen esiasetukset."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Säilön alisolmujen ankkurien ja marginaalien arvot ylikirjoittuvat niiden "
+"isäntäsolmun toimesta."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Vain ankkurit"
@@ -4668,6 +4932,10 @@ msgstr "Pidä shift pohjassa muokataksesi tangentteja yksitellen"
msgid "Bake GI Probe"
msgstr "Kehitä GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Liukuväriä muokattu"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Kohde %d"
@@ -4926,6 +5194,10 @@ msgid "Generating Visibility Rect"
msgstr "Kartoitetaan näkyvää aluetta"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Kartoita näkyvä alue"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Piste voidaan asettaa ainoastaan ParticlesMaterial käsittelyn materiaaliin"
@@ -4939,10 +5211,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Kuvassa ei ole pikseleitä, joiden läpinäkyvyys on enemmän kuin 128…"
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Kartoita näkyvä alue"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Lataa emissiomaski"
@@ -5030,13 +5298,13 @@ msgid "Generating AABB"
msgstr "Luodaan AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Luo AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Kartoita näkyvä alue"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Luo AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Poista pisteet käyrästä"
@@ -5191,6 +5459,14 @@ msgid "Create UV Map"
msgstr "Luo UV kartta"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"2D-polygonilla on sisäisiä kärkipisteitä, joten sitä ei voi enää muokata "
+"näyttöruudussa."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Luo polygoni ja UV"
@@ -5809,6 +6085,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "Tällä luurangolla ei ole luita, luo joitakin Bone2D alisolmuja."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Luo lepoasento luista"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Aseta lepoasento luille"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Skeleton2D"
@@ -5917,10 +6201,6 @@ msgid "Vertices"
msgstr "Kärkipisteet"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Pintanäkymä."
@@ -5965,7 +6245,7 @@ msgid "Rear"
msgstr "Taka"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr "Kohdista näkymään"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6057,6 +6337,14 @@ msgid "Freelook Speed Modifier"
msgstr "Liikkumisen nopeussäädin"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"Huom: näytetty FPS-lukema on editorin kuvataajuus.\n"
+"Sitä ei voi käyttää luotettavana pelin sisäisenä tehokkuuden ilmaisimena."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Näkymän kierto lukittu"
@@ -6065,6 +6353,10 @@ msgid "XForm Dialog"
msgstr "XForm-ikkuna"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Tarraa solmut lattiaan"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Valintatila (Q)"
@@ -6229,7 +6521,7 @@ msgstr "Siirrettäessä:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
-msgstr "Käännettäessä (aste):"
+msgstr "Käännettäessä (asteina):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
@@ -6241,7 +6533,7 @@ msgstr "Näyttöruudun asetukset"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective FOV (deg.):"
-msgstr "Näkökentän perspektiivi (ast.):"
+msgstr "Näkökentän perspektiivi (asteina):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Near:"
@@ -6261,7 +6553,7 @@ msgstr "Siirrä:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate (deg.):"
-msgstr "Kierrä (ast.):"
+msgstr "Kierrä (asteina):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale (ratio):"
@@ -6280,7 +6572,7 @@ msgid "Post"
msgstr "Jälki"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr "Nimetön muokkain"
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6344,10 +6636,6 @@ msgid "Add Empty"
msgstr "Lisää tyhjä"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Vaihda animaation luuppia"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Vaihda animaation nopeutta"
@@ -6356,8 +6644,12 @@ msgid "(empty)"
msgstr "(tyhjä)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animaatiot"
+msgid "Animations:"
+msgstr "Animaatiot:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Uusi animaatio"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6368,8 +6660,8 @@ msgid "Loop"
msgstr "Toista"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Animaatioruudut"
+msgid "Animation Frames:"
+msgstr "Animaatioruudut:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6657,6 +6949,22 @@ msgid "Merge from Scene"
msgstr "Yhdistä skenestä"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr "Seuraava koordinaatti"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr "Valitse seuraava muoto, aliruutu tai ruutu."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "Edellinen koordinaatti"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr "Valitse edellinen muoto, aliruutu tai ruutu."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Kopioi bittimaski."
@@ -6669,6 +6977,10 @@ msgid "Erase bitmask."
msgstr "Pyyhi bittimaski."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Luo uusi suorakulmio."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Luo uusi polygoni."
@@ -6806,6 +7118,14 @@ msgid "Clear Tile Bitmask"
msgstr "Tyhjennä ruudun bittimaski"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr "Tee polygonista konkaavi"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr "Tee polygonista konveksi"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "Poista ruutu"
@@ -6846,12 +7166,32 @@ msgid "TileSet"
msgstr "Ruutuvalikoima"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "Aseta uniformin nimi"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "Aseta syötteen oletusportti"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Lisää solmu Visual Shaderiin"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Kahdenna solmut"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "Visual Shaderin syötteen tyyppi vaihdettu"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
-msgstr "Vertex"
+msgstr "Kärkipiste"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Fragment"
-msgstr "Fragment"
+msgstr "Fragmentti"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Light"
@@ -6861,6 +7201,14 @@ msgstr "Valo"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Muokkaa visuaalista ominaisuutta"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Visual Shaderin tila vaihdettu"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Suoritettava"
@@ -6874,8 +7222,22 @@ msgid "Delete preset '%s'?"
msgstr "Poista esiasetus '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Vientimallit tälle alustalle puuttuvat tai ovat viallisia:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+"Projektin vienti alustalle '%s' epäonnistui.\n"
+"Vientimallit näyttävät puuttuvan tai olevan virheellisiä."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"Projektin vienti alustalle '%s' epäonnistui.\n"
+"Tämä saattaa johtua asetusongelmista viennin esiasetuksissa tai vientisi "
+"asetuksissa."
#: editor/project_export.cpp
msgid "Release"
@@ -6886,6 +7248,14 @@ msgid "Exporting All"
msgstr "Viedään kaikki"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "Annettu vientipolku ei ole olemassa:"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Vientimallit tälle alustalle puuttuvat tai ovat viallisia:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Esiasetukset"
@@ -7123,11 +7493,11 @@ msgstr "Selaa"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Renderöijä:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7136,10 +7506,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Korkea visuaalinen laatu\n"
+"Kaikki ominaisuudet käytettävissä\n"
+"Epäyhteensopiva vanhojen laitteiden kanssa\n"
+"Ei suositeltu web-peleille"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7148,10 +7522,15 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Matalampi visuaalinen laatu\n"
+"Jotkin ominaisuudet eivät ole käytettävissä\n"
+"Toimii useimmilla laitteilla\n"
+"Suositeltu web-peleille"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"Renderöijä voidaan vaihtaa myöhemmin, mutta skenejä voi joutua mukauttamaan."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7167,6 +7546,27 @@ msgstr "Haluatko varmasti avata useamman kuin yhden projektin?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"Seuraava projektin asetustiedosto ei määrittele Godotin versiota, jolla se "
+"on luotu.\n"
+"\n"
+"%s\n"
+"\n"
+"Jos haluat jatkaa sen avaamista, se muunnetaan nykyiseen Godotin "
+"asetustiedostomuotoon.\n"
+"Varoitus: et voi avata projektia tämän jälkeen enää vanhemmilla versioilla."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7876,6 +8276,8 @@ msgstr "Kahdenna solmu(t)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"Perittyjen skenejen solmujen isäntää ei voi vaihtaa, solmujen järjestys ei "
+"voi muuttua."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -7888,6 +8290,10 @@ msgid "Instantiated scenes can't become root"
msgstr "Skenejen ilmentymiä ei voi asettaa juureksi"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Tee solmusta juurisolmu"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Poista solmu(t)?"
@@ -7924,6 +8330,10 @@ msgid "Make Local"
msgstr "Tee paikallinen"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Uusi skenen juuri"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Luo juurisolmu:"
@@ -8273,7 +8683,7 @@ msgstr "Aliprosessi yhdistetty"
#: editor/script_editor_debugger.cpp
msgid "Copy Error"
-msgstr "Kopiointivirhe"
+msgstr "Kopioi virhe"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
@@ -8352,6 +8762,18 @@ msgid "Set From Tree"
msgstr "Aseta puusta"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Poista pikanäppäin"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Palauta pikanäppäin"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Muuta pikanäppäintä"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Pikanäppäimet"
@@ -8560,6 +8982,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Kahdenna valinta"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "Ruudukon maalaus"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Ruudukko"
@@ -8696,10 +9122,6 @@ msgid "Build Project"
msgstr "Käännä projekti"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Varoitukset"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Näytä loki"
@@ -8864,10 +9286,6 @@ msgid "Change Expression"
msgstr "Vaihda lauseketta"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Lisää solmu"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Poista VisualScript solmut"
@@ -8953,6 +9371,10 @@ msgid "Change Input Value"
msgstr "Vaihda syötteen arvo"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Muokkaa kommentin kokoa"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Ei voida kopioida funktiosolmua."
@@ -9369,6 +9791,16 @@ msgstr ""
"ParallaxLayer solmu toimii ainoastaan, jos se on ParallaxBackground solmun "
"alla."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"GPU-pohjaiset partikkelit eivät ole tuettuja GLES2 näyttöajurilla.\n"
+"Käytä sen sijaan CPUParticles2D solmua. Voit käyttää \"Muunna "
+"CPUPartikkeleiksi\" toimintoa tähän tarkoitukseen."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9528,6 +9960,14 @@ msgstr ""
"CollisionShape solmulle täytyy antaa muoto, jotta se toimisi. Ole hyvä ja "
"luo sille muotoresurssi!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+"Tasomuodot eivät toimi hyvin ja ne tullaan poistaamaan tulevissa versioissa. "
+"Ole hyvä ja älä käytä niitä."
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Mitään ei näy, koska meshiä ei ole asetettu."
@@ -9544,6 +9984,14 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Piirretään meshejä"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+"GIProbe ei ole tuettu GLES2 näyttöajurissa.\n"
+"Käytä sen sijaan BakedLightmap resurssia."
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9560,6 +10008,16 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"GPU-pohjaiset partikkelit eivät ole tuettuja GLES2 näyttöajurilla.\n"
+"Käytä sen sijaan CPUParticles solmua. Voit käyttää \"Muunna CPUPartikkeleiksi"
+"\" toimintoa tähän tarkoitukseen."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Mitään ei näy, koska mesheille ei ole asetettu piirtopyyhkäisyjä (draw "
@@ -9599,26 +10057,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Polkuominaisuuden täytyy osoittaa Spatial solmuun toimiakseen."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment tarvitsee Environment resurssin."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Vain yksi WorldEnvironment on sallittu per skene (tai per skeneilmentymien "
-"joukko)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Tämä WorldEnvironment jätetään huomioimatta. Lisää joko Camera (3D-"
-"skeneille) tai aseta tälle ympäristölle Background Mode asetukseksi Canvas "
-"(2D-skeneille)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Tämä kappale sivuutetaan, kunnes asetat meshin"
@@ -9648,6 +10086,26 @@ msgstr ""
"VehicleWheel solmu tarjoaa rengasjärjestelmän VehicleBody solmulle. Ole hyvä "
"ja käytä sitä VehicleBody solmun alla."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment tarvitsee Environment resurssin."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Vain yksi WorldEnvironment on sallittu per skene (tai per skeneilmentymien "
+"joukko)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Tämä WorldEnvironment jätetään huomioimatta. Lisää joko Camera (3D-"
+"skeneille) tai aseta tälle ympäristölle Background Mode asetukseksi Canvas "
+"(2D-skeneille)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "BlendTree solmusta '%' ei löytynyt animaatiota: '%s'"
@@ -9678,8 +10136,7 @@ msgstr "Polku animaatiot sisältävään AnimationPlayer solmuun on asettamatta.
#: scene/animation/animation_tree.cpp
msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node."
-msgstr ""
-"AnimationPlayer solmulle asetettu polku ei johda AnimationPlayer solmuun."
+msgstr "AnimationPlayerille asetettu polku ei johda AnimationPlayer solmuun."
#: scene/animation/animation_tree.cpp
msgid "AnimationPlayer root is not a valid node."
@@ -9691,12 +10148,32 @@ msgstr ""
"Tämä solmu on poistettu käytöstä. Käytä sen sijaan AnimationTree solmua."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Valitse väri ruudulta."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Raakatila"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Lisää nykyinen väri esiasetukseksi"
+msgid "Switch between hexadecimal and code values."
+msgstr "Vaihda heksadesimaali- ja koodiarvojen välillä."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Lisää nykyinen väri esiasetukseksi."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+"Säilöllä ei ole itsessään mitään merkitystä ellei jokin skripti säädä sen "
+"alisolmujen sijoitustapaa.\n"
+"Jos et aio lisätä skriptiä, ole hyvä ja käytä sen sijaan tavallista "
+"'Control' solmua."
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9706,6 +10183,10 @@ msgstr "Huomio!"
msgid "Please Confirm..."
msgstr "Ole hyvä ja vahvista..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "Siirry yläkansioon."
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9790,6 +10271,24 @@ msgstr "Sijoitus uniformille."
msgid "Varyings can only be assigned in vertex function."
msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Luo valituista skeneistä ilmentymä valitun solmun alle."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Varoitukset:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Fontin koko:"
+
+#~ msgid "Line:"
+#~ msgstr "Rivi:"
+
+#~ msgid "Col:"
+#~ msgstr "Sarake:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "OrientedPathFollow toimii ainoastaan ollessaan asetettuna Path solmun "
@@ -9948,9 +10447,6 @@ msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa."
#~ msgid "Convert To Lowercase"
#~ msgstr "Muunna pieniksi kirjaimiksi"
-#~ msgid "Snap To Floor"
-#~ msgstr "Tartu lattiaan"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Käännä 0 astetta"
@@ -10443,9 +10939,6 @@ msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa."
#~ msgid "Added:"
#~ msgstr "Lisätty:"
-#~ msgid "Removed:"
-#~ msgstr "Poistettu:"
-
#~ msgid "Error loading scene."
#~ msgstr "Virhe ladatessa Sceneä."
@@ -10612,9 +11105,6 @@ msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa."
#~ msgid "Error importing:"
#~ msgstr "Virhe tuotaessa:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Vain yksi tiedosto vaaditaan suurikokoiselle tekstuurille."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Tekstuurin enimmäiskoko:"
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index 3827c3f40b..b1bb5be97a 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -53,12 +53,14 @@
# Rémi Bintein <reminus5@hotmail.fr>, 2018, 2019.
# Sylvain Corsini <sylvain.corsini@gmail.com>, 2018.
# Caye Pierre <pierrecaye@laposte.net>, 2019.
+# Peter Kent <0.peter.kent@gmail.com>, 2019.
+# jef dered <themen098s@vivaldi.net>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
-"Last-Translator: Rémi Bintein <reminus5@hotmail.fr>\n"
+"PO-Revision-Date: 2019-03-12 15:25+0000\n"
+"Last-Translator: Caye Pierre <pierrecaye@laposte.net>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -66,7 +68,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -102,11 +104,11 @@ msgstr "Index nommé %s invalide pour le type de base %s"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "Arguments invalides pour construire '%s'"
+msgstr "Arguments invalides pour construire « %s »"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr "Sur appel à '%s' :"
+msgstr "Sur appel à « %s » :"
#: editor/animation_bezier_editor.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -133,6 +135,14 @@ msgstr "Dupliquer les clé(s) sélectionnée(s)"
msgid "Delete Selected Key(s)"
msgstr "Supprimer les clé(s) sélectionnée(s)"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Ajouter un point de Bézier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Déplacer des points de Bézier"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Dupliquer les clés d'animation"
@@ -147,7 +157,7 @@ msgstr "Modifier le temps d'image-clé"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "Modifier la transition"
+msgstr "Changement de transition de l'animation"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
@@ -162,6 +172,15 @@ msgid "Anim Change Call"
msgstr "Anim: Change l'Appel"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Modifier la longueur de l'animation"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Modifier la boucle d'animation"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Piste de propriété"
@@ -211,6 +230,10 @@ msgid "Anim Clips:"
msgstr "Clips d'animation :"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Modifier le chemin de la piste"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Activer/désactiver cette piste."
@@ -235,6 +258,10 @@ msgid "Time (s): "
msgstr "Temps (s) : "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Activer le basculement de piste"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Continu"
@@ -285,6 +312,18 @@ msgid "Delete Key(s)"
msgstr "Supprimer clé(s)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Modifier le mode de mise à jour de l'animation"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Modifier le mode d'interpolation de l'animation"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Modifier le mode de boucle d'animation"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Supprimer la piste d'animation"
@@ -327,6 +366,14 @@ msgid "Anim Insert Key"
msgstr "Insérer une clé d'animation"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Modifier l'étape d'animation"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Réorganiser les pistes"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
"Les pistes de transformation ne s'appliquent qu'aux nœuds basés sur Spatial."
@@ -359,6 +406,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Impossible d'ajouter une nouvelle piste sans racine"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Ajouter une piste de Bézier"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Le chemin de la piste est invalide, impossible d'ajouter une clé."
@@ -367,12 +418,24 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "La piste n'est pas de type Spatial, impossible d'insérer une clé"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Ajouter une clé de transformation"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Ajoutez une clé de piste"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
"Le chemin de la piste est invalide, impossible d'ajouter une clé d'appel de "
"méthode."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Ajouter une clé de méthode"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Méthode introuvable dans l'objet : "
@@ -385,6 +448,10 @@ msgid "Clipboard is empty"
msgstr "Le presse-papiers est vide"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Coller pistes"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Mettre à l'échelle les clés d'animation"
@@ -431,10 +498,6 @@ msgid "Copy Tracks"
msgstr "Copier pistes"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Coller pistes"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Mettre à l'échelle la sélection"
@@ -534,6 +597,18 @@ msgstr "Sélectionner les pistes à copier :"
msgid "Copy"
msgstr "Copier"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Ajouter un clip audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Modifier Le Décalage De Début De Clip De Piste Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Modifier Le Décalage De Fin De Clip De Piste Audio"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Redimensionner le tableau"
@@ -598,21 +673,13 @@ msgstr "Dézoomer"
msgid "Reset Zoom"
msgstr "Réinitialiser le zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Avertissements :"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Taille de police :"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Ligne :"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Avertissements"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Colonne :"
+msgid "Line and column numbers."
+msgstr "Numéros de ligne et de colonne."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -697,7 +764,7 @@ msgstr "Déconnecter « %s » de « %s »"
#: editor/connections_dialog.cpp
msgid "Disconnect all from signal: '%s'"
-msgstr "Tout déconnecter au signal : '%s'"
+msgstr "Tout déconnecter du signal : « %s »"
#: editor/connections_dialog.cpp
msgid "Connect..."
@@ -825,7 +892,7 @@ msgstr "Dépendances :"
#: editor/dependency_editor.cpp
msgid "Fix Broken"
-msgstr "Corriger les dép. cassées"
+msgstr "Corriger les dépendances cassées"
#: editor/dependency_editor.cpp
msgid "Dependency Editor"
@@ -915,8 +982,8 @@ msgstr "Supprimer les fichiers sélectionnés ?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Supprimer"
@@ -999,10 +1066,10 @@ msgid ""
"is an exhaustive list of all such thirdparty components with their "
"respective copyright statements and license terms."
msgstr ""
-"Le moteur Godot s'appuie sur un certain nombre de bibliothèques gratuites et "
-"open source tierce parties, toutes compatibles avec les termes de sa licence "
-"MIT. Voici une liste exhaustive de tous ces composants tiers avec leurs "
-"énoncés de droits d'auteur respectifs ainsi que les termes de leurs licences."
+"Le moteur Godot s'appuie sur un certain nombre de bibliothèques libres et "
+"open source tierces, toutes compatibles avec les termes de sa licence MIT. "
+"Voici une liste exhaustive de ces composants tiers avec leurs énoncés de "
+"droits d'auteur respectifs ainsi que les termes de leurs licences."
#: editor/editor_about.cpp
msgid "All Components"
@@ -1161,7 +1228,7 @@ msgstr "Ouvrir une disposition de bus audio"
#: editor/editor_audio_buses.cpp
msgid "There is no 'res://default_bus_layout.tres' file."
-msgstr "Il n'existe aucun 'res://default_bus_layout.tres'."
+msgstr "Il n'existe aucun fichier « res://default_bus_layout.tres »."
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -1172,8 +1239,8 @@ msgid "Add Bus"
msgstr "Ajouter un bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Créer une nouvel agencement de tranport."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Ajoutez un nouveau bus audio à cette disposition."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1201,6 +1268,10 @@ msgstr "Charger défaut"
msgid "Load the default Bus Layout."
msgstr "Charger l'agencement de transport par défaut."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Créer une nouvel agencement de tranport."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nom invalide."
@@ -1344,12 +1415,40 @@ msgstr "Stockage du fichier :"
#: editor/editor_export.cpp
msgid "No export template found at the expected path:"
-msgstr "Aucun modèle d'exportation n'a été trouvé au chemin prévu :"
+msgstr "Aucun modèle d'exportation n'a été trouvé au chemin prévu :"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "Empaquetage"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"La plate-forme cible nécessite une compression de texture 'ETC' pour GLES2. "
+"Activez 'Import Etc' dans les paramètres du projet."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"La plate-forme cible nécessite une compression de texture 'ETC2' pour GLES3. "
+"Activez 'Import Etc 2' dans les Paramètres du projet."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"La plate-forme cible nécessite une compression de texture ' ETC ' pour le "
+"fallback pilote de GLES2.\n"
+"Activez 'Import Etc' dans les paramètres du projet, ou désactivez 'Driver "
+"Fallback Enabled'."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1395,7 +1494,7 @@ msgstr "Montrer dans le gestionnaire de fichiers"
msgid "New Folder..."
msgstr "Nouveau dossier..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Rafraîchir"
@@ -1470,10 +1569,30 @@ msgstr "Déplacer le favori vers le haut"
msgid "Move Favorite Down"
msgstr "Déplacer le favori vers le bas"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr "Dossier précédent"
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr "Dossier suivant"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Aller au dossier parent"
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr "Ajouter ou supprimer des favoris le dossier courant."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Afficher les éléments sous forme de grille de vignettes."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Afficher les éléments sous forme de liste."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Répertoires et fichiers :"
@@ -1696,9 +1815,9 @@ msgstr "Effacer la sortie"
msgid "Project export failed with error code %d."
msgstr "L'export du projet a échoué avec le code erreur %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Erreur d'enregistrement de la ressource !"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr "Les ressources importés ne peuvent pas être sauvegarder."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1706,6 +1825,18 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Erreur d'enregistrement de la ressource !"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+"Cette ressource ne peut pas être sauvegardée parce qu’elle n'appartient pas "
+"à la scène éditer. Soyez sûr qu'elle soit unique."
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Enregistrer la ressource sous…"
@@ -1723,23 +1854,23 @@ msgstr "Erreur lors de l'enregistrement."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr "Impossible d'ouvrir '%s'. Le fichier a pu être déplacé ou supprimé."
+msgstr "Impossible d'ouvrir « %s ». Le fichier a pu être déplacé ou supprimé."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
-msgstr "Erreur lors de l'analyse syntaxique de '%s'."
+msgstr "Erreur lors de l'analyse syntaxique de « %s »."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr "Fin de fichier inattendue '%s'."
+msgstr "Fin de fichier inattendue « %s »."
#: editor/editor_node.cpp
msgid "Missing '%s' or its dependencies."
-msgstr "La scène '%s' ou ses dépendances sont introuvables."
+msgstr "La scène « %s » ou ses dépendances sont introuvables."
#: editor/editor_node.cpp
msgid "Error while loading '%s'."
-msgstr "Erreur lors du chargement de '%s'."
+msgstr "Erreur lors du chargement de « %s »."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1834,8 +1965,8 @@ msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
msgstr ""
-"Cette ressource a été importée, elle n'est donc pas éditable. Modifiez ses "
-"paramètres dans le panneau d'importation et, ensuite, réimportez-la."
+"Cette ressource a été importée, elle n'est donc pas modifiable. Modifiez ses "
+"paramètres dans le panneau d'importation et réimportez-la ensuite."
#: editor/editor_node.cpp
msgid ""
@@ -1844,8 +1975,9 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
-"Cette scène a été importée, les changements ne seront donc pas conservés.\n"
-"L'instancier ou l'hériter permettra de faire ces changements.\n"
+"Cette scène a été importée, les modifications ne seront donc pas "
+"conservées.\n"
+"L'instancier ou l'hériter permettra de conserver les modifications.\n"
"Veuillez lire la documentation concernant l'importation des scènes afin de "
"mieux comprendre ce processus."
@@ -1927,7 +2059,15 @@ msgstr "Enregistrer & fermer"
#: editor/editor_node.cpp
msgid "Save changes to '%s' before closing?"
-msgstr "Sauvegarder modifications de '%s' avant de quitter ?"
+msgstr "Sauvegarder les modifications effectuées à « %s » avant de quitter ?"
+
+#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Sauvegardé %s des ressources modifiées."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Un nœud racine est nécessaire pour sauvegarder la scène."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -1944,7 +2084,7 @@ msgstr "Oui"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr ""
-"Cette scène n'a jamais été enregistrée. L'enregistrer avant de la lancer ?"
+"Cette scène n'a jamais été enregistrée. L'enregistrer avant de la lancer ?"
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "This operation can't be done without a scene."
@@ -2030,39 +2170,39 @@ msgstr "Choisir une scène principale"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
-"Impossible d'activer le greffon depuis : '%s' l’analyse syntaxique de la "
+"Impossible d'activer le greffon depuis : « %s », l’analyse syntaxique de la "
"configuration a échoué."
#: editor/editor_node.cpp
msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
-"Impossible de trouver le champ de script pour le plugin dans : 'res://addons/"
-"%s'."
+"Impossible de trouver le champ de script pour le plugin dans : « res://"
+"addons/%s »."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s'."
msgstr ""
-"Impossible de charger le script de l’extension depuis le chemin : '%s'."
+"Impossible de charger le script de l’extension depuis le chemin : « %s »."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' There seems to be an error in "
"the code, please check the syntax."
msgstr ""
-"Impossible de charger le script de l’extension depuis le chemin : '%s' Il "
+"Impossible de charger le script de l’extension depuis le chemin : « %s ». Il "
"semble y avoir une erreur dans le code, merci de vérifier la syntaxe."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
-"Impossible de charger le script de l'addon depuis le chemin : '%s' Le type "
-"de base n'est pas EditorPlugin."
+"Impossible de charger le script de l'addon depuis le chemin : « %s ». Le "
+"type de base n'est pas EditorPlugin."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
-"Impossible de charger le script de l’extension depuis le chemin : '%s' Le "
+"Impossible de charger le script de l’extension depuis le chemin : « %s ». Le "
"script n'est pas en mode outil."
#: editor/editor_node.cpp
@@ -2089,7 +2229,7 @@ msgstr "La scène « %s » a des dépendences cassées :"
#: editor/editor_node.cpp
msgid "Clear Recent Scenes"
-msgstr "Vider la liste des scènes récentes"
+msgstr "Effacer la liste des scènes récentes"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -2319,7 +2459,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Sync Scene Changes"
-msgstr "Synchroniser les changements de scène"
+msgstr "Synchroniser les modifications des scènes"
#: editor/editor_node.cpp
msgid ""
@@ -2330,12 +2470,12 @@ msgid ""
msgstr ""
"Lorsque cette option est activée, toutes les modifications apportées à la "
"scène dans l'éditeur seront reproduites en jeu.\n"
-"Lorsqu'elle est utilisée à distance sur un périphérique, l'efficacité est "
-"meilleure avec le système de fichiers réseau."
+"Lorsqu'elle est utilisée à distance sur un périphérique, cette option est "
+"plus efficace avec le système de fichiers réseau."
#: editor/editor_node.cpp
msgid "Sync Script Changes"
-msgstr "Synchroniser les modifications de script"
+msgstr "Synchroniser les modifications des scripts"
#: editor/editor_node.cpp
msgid ""
@@ -2460,11 +2600,11 @@ msgstr "Changer le pilote vidéo nécessite le redémarrage de l'éditeur."
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
msgid "Save & Restart"
-msgstr "Enregistrer et Redémarrer"
+msgstr "Enregistrer et redémarrer"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "Tourne lorsque la fenêtre de l'éditeur est repainte !"
+msgid "Spins when the editor window redraws."
+msgstr "Tourne lorsque la fenêtre de l'éditeur est redessinée."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2602,7 +2742,7 @@ msgstr "État :"
#: editor/editor_plugin_settings.cpp
msgid "Edit:"
-msgstr "Éditer :"
+msgstr "Modifier :"
#: editor/editor_profiler.cpp editor/plugins/animation_state_machine_editor.cpp
#: editor/rename_dialog.cpp
@@ -2703,7 +2843,7 @@ msgid ""
msgstr ""
"Impossible de créer un ViewportTexture sur cette ressource car elle n'est "
"pas définie comme locale à la scène.\n"
-"Merci de changer la propriété \"Local To Scene\" de cette ressource (et des "
+"Merci de changer la propriété « Local To Scene » de cette ressource (et des "
"ressources intermédiaires la contenant, jusqu'au nœud qui l'utilise)."
#: editor/editor_properties.cpp editor/property_editor.cpp
@@ -2855,11 +2995,12 @@ msgstr "Récupération des miroirs, veuillez patienter..."
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
-msgstr "Supprimer la version '%s' du modèle ?"
+msgstr "Supprimer la version « %s » du modèle ?"
#: editor/export_template_manager.cpp
msgid "Can't open export templates zip."
-msgstr "Impossible d'ouvrir le ZIP de modèles d'exportation."
+msgstr ""
+"Impossible d'ouvrir le fichier ZIP contenant les modèles d'exportation."
#: editor/export_template_manager.cpp
msgid "Invalid version.txt format inside templates: %s."
@@ -2917,7 +3058,7 @@ msgstr "Boucle de Redirection."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr "Échec:"
+msgstr "Échec :"
#: editor/export_template_manager.cpp
msgid "Download Complete."
@@ -2928,8 +3069,8 @@ msgid ""
"Templates installation failed. The problematic templates archives can be "
"found at '%s'."
msgstr ""
-"L'installation des modèles à échoué. Les archives des modèles posant "
-"problème peuvent être trouvées ici : '%s'."
+"L'installation des modèles a échoué. Les archives des modèles posant "
+"problème peuvent être trouvées à « %s »."
#: editor/export_template_manager.cpp
msgid "Error requesting url: "
@@ -3028,16 +3169,8 @@ msgstr "Favoris"
#: editor/filesystem_dock.cpp
msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
-"Impossible d'accédez à '%s' car celui-ci n'existe pas dans le système de "
-"fichiers !"
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Afficher les éléments sous forme de grille de vignettes."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Afficher les éléments sous forme de liste."
+"Impossible d'accéder à « %s » car celui-ci n'existe pas dans le système de "
+"fichiers !"
#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
@@ -3135,11 +3268,11 @@ msgstr "Déplacer vers…"
#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
msgid "New Script..."
-msgstr "Nouveau Script..."
+msgstr "Nouveau script…"
#: editor/filesystem_dock.cpp
msgid "New Resource..."
-msgstr "Nouvelle Ressource…"
+msgstr "Nouvelle ressource…"
#: editor/filesystem_dock.cpp editor/script_editor_debugger.cpp
msgid "Expand All"
@@ -3177,12 +3310,6 @@ msgid "Search files"
msgstr "Rechercher des fichiers"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-"Instancie la(les) scène(s) sélectionnée(s) en tant qu'enfant(s) du nœud "
-"sélectionné."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3209,11 +3336,11 @@ msgstr "Créer un script"
#: editor/find_in_files.cpp
msgid "Find in Files"
-msgstr "Trouver dans les fichiers"
+msgstr "Rechercher dans les fichiers"
#: editor/find_in_files.cpp
msgid "Find:"
-msgstr "Trouver :"
+msgstr "Rechercher :"
#: editor/find_in_files.cpp
msgid "Folder:"
@@ -3226,7 +3353,7 @@ msgstr "Filtres :"
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find..."
-msgstr "Trouver…"
+msgstr "Rechercher…"
#: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp
msgid "Replace..."
@@ -3238,7 +3365,7 @@ msgstr "Annuler"
#: editor/find_in_files.cpp
msgid "Find: "
-msgstr "Trouver : "
+msgstr "Rechercher : "
#: editor/find_in_files.cpp
msgid "Replace: "
@@ -3372,11 +3499,11 @@ msgstr "Enregistrement…"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr "Définir comme défaut pour '%s'"
+msgstr "Définir comme défaut pour « %s »"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr "Effacer défaut pour '%s'"
+msgstr "Effacer le préréglage par défaut pour « %s »"
#: editor/import_dock.cpp
msgid " Files"
@@ -3392,21 +3519,23 @@ msgstr "Pré-réglage…"
#: editor/import_dock.cpp
msgid "Reimport"
-msgstr "Ré-importer"
+msgstr "Réimporter"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Sauvegarde des scènes, réimportation et redémarrage"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Changer le pilote vidéo nécessite le redémarrage de l'éditeur."
+msgstr ""
+"Modifier le type d'un fichier importé nécessite un redémarrage de l'éditeur."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"AVERTISSEMENT : Il existe des atout qui utilisent cette ressource, elles "
+"pourraient cesser de charger correctement."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3495,7 +3624,7 @@ msgstr "Ensemble multi-nœud"
#: editor/node_dock.cpp
msgid "Select a Node to edit Signals and Groups."
-msgstr "Sélectionnez un nœud pour editer des signaux et des groupes."
+msgstr "Sélectionnez un nœud pour modifier les signaux et groupes."
#: editor/plugin_config_dialog.cpp
msgid "Edit a Plugin"
@@ -3531,22 +3660,6 @@ msgid "Create Polygon"
msgstr "Créer un polygone"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Modifier le polygone"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Insérer un point"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Modifier le polygone (supprimer un point)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Supprimer le polygone et le point"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3558,7 +3671,7 @@ msgid ""
"LMB: Move Point\n"
"RMB: Erase Point"
msgstr ""
-"Éditer les points.\n"
+"Modifier les points.\n"
"Bouton gauche : Déplacer le point\n"
"Bouton droit : Effacer le point"
@@ -3567,6 +3680,22 @@ msgstr ""
msgid "Erase points."
msgstr "Effacer des points."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Modifier le polygone"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Insérer un point"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Modifier le polygone (supprimer un point)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Supprimer le polygone et le point"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3584,6 +3713,19 @@ msgstr "Charger..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "Déplacer le point de nœud"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "Modifier les limites de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "Modifier les étiquettes de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3592,6 +3734,24 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "Ajouter point de nœud"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "Ajouter un point d'animation"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "Supprimer le point BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "Bouger le nœud BlendSpace1d"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3599,7 +3759,7 @@ msgid ""
"Activate to enable playback, check node warnings if activation fails."
msgstr ""
"AnimationTree est inactif.\n"
-"Activez le pour permettre la lecture, vérifier les avertissements des nœuds "
+"Activez-le pour permettre la lecture, vérifier les avertissements des nœuds "
"en cas d'échec de l'activation."
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3635,6 +3795,26 @@ msgid "Triangle already exists"
msgstr "Le triangle existe déjà"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Ajouter un triangle"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "Modifier les limites de BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "Modifier les étiquettes de BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "Supprimer le point BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Supprimer le triangle BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D n'appartient pas à un nœud AnimationTree."
@@ -3643,6 +3823,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Il n'existe pas de triangles, donc aucun mélange ne peut avoir lieu."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "Commutation automatique des triangles"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Créer des triangles en reliant les points."
@@ -3661,15 +3845,28 @@ msgid "Blend:"
msgstr "Mélange :"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Paramètre modifié"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
-msgstr "Editer les filtres"
+msgstr "Modifier les filtres"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Output node can't be added to the blend tree."
msgstr "Un nœud de sortie ne peut être ajouté à l'arborescence du mélange."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Ajouter un nœud au BlendTree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Nœud déplacé"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3677,10 +3874,37 @@ msgstr ""
"connexion peut être invalide."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Nœuds connectés"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Nœuds déconnectés"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Définir l'animation"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Supprimer un nœud"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "Activer/désactiver le filtre"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Changer le filtre"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
-"Aucun lecteur d'animation défini, dès lors impossible de retrouver les noms "
-"des pistes."
+"Aucun lecteur d'animation défini, il est donc impossible de retrouver les "
+"noms des pistes."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Player path set is invalid, so unable to retrieve track names."
@@ -3694,10 +3918,15 @@ msgid ""
"Animation player has no valid root node path, so unable to retrieve track "
"names."
msgstr ""
-"Le lecteur d'animation n'a pas un chemin de nœud racine valide, dès lors "
+"Le lecteur d'animation n'a pas un chemin de nœud racine valide, il est donc "
"impossible de récupérer les noms des pistes."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Nœud renommé"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Ajouter un nœud..."
@@ -3705,7 +3934,7 @@ msgstr "Ajouter un nœud..."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "Edit Filtered Tracks:"
-msgstr "Éditer Pistes Filtrées :"
+msgstr "Modifier les pistes filtrées :"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Enable filtering"
@@ -3849,7 +4078,7 @@ msgstr "Effet pelure d'oignon"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Enable Onion Skinning"
-msgstr "Activer l'effet pelure d'oignon"
+msgstr "Activer l'effet « pelure d'oignon »"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Directions"
@@ -3924,6 +4153,19 @@ msgid "Cross-Animation Blend Times"
msgstr "Temps de mélange des entre animations"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Déplacer le nœud"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Ajouter une transition"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Ajouter un nœud"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Fin"
@@ -3953,6 +4195,18 @@ msgid "No playback resource set at path: %s."
msgstr "Aucune ressource de lecture définie sur le chemin : %s."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Nœud supprimé"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Transition supprimée"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Définir le nœud de démarrage (Lecture automatique)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4129,7 +4383,7 @@ msgstr "Filtres…"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
-msgstr "Contenu:"
+msgstr "Contenu :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "View Files"
@@ -4137,7 +4391,7 @@ msgstr "Voir Fichiers"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr "Impossible de résoudre le nom de l'hôte:"
+msgstr "Impossible de résoudre le nom de l'hôte :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
@@ -4145,15 +4399,15 @@ msgstr "Erreur de connection, veuillez essayer à nouveau."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect to host:"
-msgstr "Connection à l'hôte impossible:"
+msgstr "Connexion à l'hôte impossible :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr "Pas de réponse de l'hôte:"
+msgstr "Pas de réponse de l'hôte :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, return code:"
-msgstr "La requête a échoué, code retourné:"
+msgstr "La requête a échoué, code retourné :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
@@ -4165,7 +4419,7 @@ msgstr "Vérification du téléchargement échouée, le fichier a été altéré
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr "Attendu:"
+msgstr "Attendu :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Got:"
@@ -4177,7 +4431,7 @@ msgstr "Vérification de brouillage sha256 échouée"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr "Erreur dans le téléchargement d'une ressource:"
+msgstr "Erreur dans le téléchargement d'une ressource :"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading (%s / %s)..."
@@ -4209,7 +4463,7 @@ msgstr "Erreur de téléchargement"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr "Le téléchargement de cette ressource est déjà en cours!"
+msgstr "Le téléchargement de cette ressource est déjà en cours !"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "First"
@@ -4286,8 +4540,8 @@ msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
msgstr ""
-"Aucun mesh à transférer. Assurez-vous qu'ils contiennent un canal UV2 et que "
-"l'indicateur \"Bake Light\" est activé."
+"Aucun maillage à transférer. Assurez-vous qu'ils contiennent un canal UV2 et "
+"que l'indicateur « Bake Light » est activé."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
@@ -4377,6 +4631,18 @@ msgid "Move CanvasItem"
msgstr "Déplacer l'élément de canevas"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Préréglages pour les ancres et les marges d'un nœud Control."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Les nœuds enfants de conteneurs ont leurs ancres et marges redéfinies par "
+"leur parent."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Uniquement les ancres"
@@ -4682,7 +4948,7 @@ msgstr "Définir la poignée"
#: editor/plugins/cpu_particles_editor_plugin.cpp
msgid "CPUParticles"
-msgstr "ParticulesCPU"
+msgstr "CPUParticles"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -4756,12 +5022,16 @@ msgstr "Basculer vers tangente linéaire de courbe"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Hold Shift to edit tangents individually"
-msgstr "Maintenez l'appui sur Maj pour éditer les tangentes individuellement"
+msgstr "Maintenez Maj. appuyée pour modifier les tangentes individuellement"
#: editor/plugins/gi_probe_editor_plugin.cpp
msgid "Bake GI Probe"
msgstr "Créer sonde IG (Illumination Globale)"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Dégradé édité"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Objet %d"
@@ -4812,7 +5082,9 @@ msgstr "Le maillage contenu n'est pas de type ArrayMesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr "L'ouverture du UV a échoué, le maillage n'est peut-être pas multiple ?"
+msgstr ""
+"Le dépliage UV a échoué, le maillage n'est peut-être pas multiple "
+"(« manifold ») ?"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "No mesh to debug."
@@ -4960,11 +5232,11 @@ msgstr "Impossible de cartographier la zone."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Source Mesh:"
-msgstr "Sélectionner un maillage source :"
+msgstr "Sélectionnez un maillage source :"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Target Surface:"
-msgstr "Sélectionner une surface cible :"
+msgstr "Sélectionnez une surface cible :"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate Surface"
@@ -5024,6 +5296,10 @@ msgid "Generating Visibility Rect"
msgstr "Génération du rectangle de visibilité"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Générer Rect de Visibilité"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Ne peut définir qu'un point dans un matériau de processus ParticlesMaterial"
@@ -5037,10 +5313,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Pas de pixels avec transparence > 128 dans l'image..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Générer Rect de Visibilité"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Charger Masque d'Émission"
@@ -5051,7 +5323,7 @@ msgstr "Effacer Masque d'Émission"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Convert to CPUParticles"
-msgstr "Convertir en ParticulesCPU"
+msgstr "Convertir en CPUParticles"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -5065,7 +5337,7 @@ msgstr "Compte de Points Générés :"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generation Time (sec):"
-msgstr "Temps de Génération (sec):"
+msgstr "Temps de Génération (sec) :"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Mask"
@@ -5085,7 +5357,7 @@ msgstr "Des faces ne contiennent pas de zone !"
#: editor/plugins/particles_editor_plugin.cpp
msgid "No faces!"
-msgstr "Pas de faces!"
+msgstr "Pas de faces !"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
@@ -5101,7 +5373,7 @@ msgstr "Créer Émetteur"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Points:"
-msgstr "Points d'Émission:"
+msgstr "Points d'Émission :"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points"
@@ -5121,20 +5393,20 @@ msgstr "Source d'Émission: "
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
-msgstr "Un matériel processeur de type 'ParticlesMaterial' est requis."
+msgstr "Un matériel processeur de type « ParticlesMaterial » est nécessaire."
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generating AABB"
msgstr "Générer AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Générer AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Générer AABB de Visibilité"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Générer AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Supprimer Point de la Courbe"
@@ -5283,13 +5555,21 @@ msgid ""
"Set a texture to be able to edit UV."
msgstr ""
"Pas de texture dans ce polygone.\n"
-"Sélectionnez une texture pour pouvoir éditer les UV."
+"Sélectionnez une texture afin de pouvoir modifier les coordonnées UV."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
msgstr "Créer une carte UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"Polygon 2D a des sommets internes, donc il ne peut plus être édité dans la "
+"fenêtre d'affichage."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Créer un polygone & UV"
@@ -5681,7 +5961,7 @@ msgstr "Afficher/Cacher le panneau des scripts"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Next"
-msgstr "Trouver le suivant"
+msgstr "Correspondance suivante"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
@@ -5786,19 +6066,19 @@ msgstr "Modifier la casse"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Uppercase"
-msgstr "Majuscule"
+msgstr "Tout en majuscule"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Lowercase"
-msgstr "Minuscule"
+msgstr "Tout en minuscule"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Capitalize"
-msgstr "Capitaliser"
+msgstr "Majuscule à chaque mot"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Syntax Highlighter"
-msgstr "Surligneur de syntaxe"
+msgstr "Coloration syntaxique"
#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
#: scene/gui/text_edit.cpp
@@ -5881,11 +6161,11 @@ msgstr "Aller au point d'arrêt précédent"
#: editor/plugins/script_text_editor.cpp
msgid "Find Previous"
-msgstr "Trouver le précédent"
+msgstr "Correspondance précédente"
#: editor/plugins/script_text_editor.cpp
msgid "Find in Files..."
-msgstr "Trouver dans les fichiers..."
+msgstr "Rechercher dans les fichiers…"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function..."
@@ -5908,6 +6188,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "Ce squelette n'a pas d'os, créez des nœuds Bone2D enfants."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Créer la position de repos d'après les os"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Régler la position de repos sur les os"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Squelette 2D"
@@ -6016,10 +6304,6 @@ msgid "Vertices"
msgstr "Vertex"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "IPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Vue de dessus."
@@ -6064,7 +6348,7 @@ msgid "Rear"
msgstr "Arrière"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr "Aligner avec la vue"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6158,6 +6442,15 @@ msgid "Freelook Speed Modifier"
msgstr "Modificateur de vitesse de la vue libre"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"Note : La valeur FPS affichée est la fréquence d'images de l'éditeur.\n"
+"Il ne doit pas être utilisé comme un indicateur fiable de la performance en "
+"jeu."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Verrouiller la rotation de la vue"
@@ -6166,6 +6459,10 @@ msgid "XForm Dialog"
msgstr "Dialogue XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Aligner les nœuds au sol"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Sélectionner le mode (Q)"
@@ -6381,7 +6678,7 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr "Gadget sans nom"
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6447,10 +6744,6 @@ msgid "Add Empty"
msgstr "Ajouter vide"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Modifier la boucle d'animation"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Modifier le taux d'IPS de l'animation"
@@ -6459,8 +6752,12 @@ msgid "(empty)"
msgstr "(vide)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animations"
+msgid "Animations:"
+msgstr "Animations :"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Nouvelle animation"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6471,8 +6768,8 @@ msgid "Loop"
msgstr "Boucle"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Trames d'animation"
+msgid "Animation Frames:"
+msgstr "Trames d'animation :"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6561,7 +6858,7 @@ msgstr "Supprimer tout"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Edit theme..."
-msgstr "Éditer le thème..."
+msgstr "Modifier le thème…"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme editing menu."
@@ -6697,7 +6994,7 @@ msgstr "Supprimer la TileMap"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Find Tile"
-msgstr "Trouver une tuile"
+msgstr "Rechercher une tuile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Transpose"
@@ -6760,6 +7057,22 @@ msgid "Merge from Scene"
msgstr "Fusionner depuis la scène"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr "Coordonnée suivante"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr "Sélectionnez la forme suivante, sous-tuile, ou tuile."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "Coordonnée précédente"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr "Sélectionner la forme précédente, sous-tuile, ou tuile."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Copier le masque de bit."
@@ -6772,6 +7085,10 @@ msgid "Erase bitmask."
msgstr "Effacer le masque de bit."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Créer un nouveau rectangle."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Créer un nouveau polygone."
@@ -6832,7 +7149,7 @@ msgid ""
"Click on another Tile to edit it."
msgstr ""
"Sélectionner la sous-tuile en cours d'édition.\n"
-"Cliquer sur une autre tuile pour l'éditer."
+"Cliquez sur une autre tuile pour la modifier."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Delete polygon."
@@ -6846,7 +7163,7 @@ msgid ""
msgstr ""
"Bouton gauche : Activer le bit.\n"
"Bouton droit : Désactiver le bit.\n"
-"Cliquer sur une autre tuile pour l'éditer."
+"Cliquez sur une autre tuile pour la modifier."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -6863,16 +7180,16 @@ msgid ""
"Select sub-tile to change its priority.\n"
"Click on another Tile to edit it."
msgstr ""
-"Sélectionner une sous-tuile pour changer sa priorité.\n"
-"Cliquer sur une autre tuile pour l'éditer."
+"Sélectionnez une sous-tuile pour changer sa priorité.\n"
+"Cliquez sur une autre tuile pour la modifier."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
"Select sub-tile to change its z index.\n"
"Click on another Tile to edit it."
msgstr ""
-"Sélectionner une sous-tuile pour changer son index Z.\n"
-"Cliquer sur une autre tuile pour l'éditer."
+"Sélectionnez une sous-tuile pour changer son index Z.\n"
+"Cliquez sur une autre tuile pour la modifier."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Region"
@@ -6911,6 +7228,14 @@ msgid "Clear Tile Bitmask"
msgstr "Supprimer le masque de bit de la tuile"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr "Rendre le polygone concave"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr "Rendre le polygon Convex"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "Supprimer la tuile"
@@ -6951,6 +7276,26 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "Définir le nom de l'uniforme"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "Définir le port d'entrée par défaut"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Ajouter un nœud au Visual Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Dupliquer le(s) nœud(s)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "Type d’entrée Visual Shader changée"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Vertex"
@@ -6966,21 +7311,43 @@ msgstr "Lumière"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Modifier la propriété visuelle"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Mode Visual Shader changé"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Exécutable"
#: editor/project_export.cpp
msgid "Delete patch '%s' from list?"
-msgstr "Supprimer le patch '%s' de la liste ?"
+msgstr "Supprimer le patch « %s » de la liste ?"
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
-msgstr "Supprimer pré-réglage '%s' ?"
+msgstr "Supprimer le pré-réglage « %s » ?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Modèles d'exportation manquants ou corrompus pour cette plateforme :"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+"Échec de l'exportation du projet pour la plate-forme « %s ».\n"
+"Les modèles d'exportation semblent être manquants ou invalides."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"Échec de l'exportation du projet pour la plate-forme « %s ».\n"
+"Cela peut être dû à un problème de configuration dans le préréglage "
+"d'exportation ou dans vos paramètres d'exportation."
#: editor/project_export.cpp
msgid "Release"
@@ -6991,6 +7358,14 @@ msgid "Exporting All"
msgstr "Tout exporter"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "Le chemin de l'exportation donné n'existe pas :"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Modèles d'exportation manquants ou corrompus pour cette plateforme :"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Pré-réglages"
@@ -7094,7 +7469,7 @@ msgstr "Exporter le PCK/ZIP"
#: editor/project_export.cpp
msgid "Export mode?"
-msgstr "Mode d'exportation?"
+msgstr "Mode d'exportation ?"
#: editor/project_export.cpp
msgid "Export All"
@@ -7115,8 +7490,8 @@ msgstr "Le chemin vers ce fichier n'existe pas."
#: editor/project_manager.cpp
msgid "Invalid '.zip' project file, does not contain a 'project.godot' file."
msgstr ""
-"Fichier de projet '.zip' invalide, il ne contient pas de fichier 'project."
-"godot'."
+"Fichier de projet « .zip » invalide, il ne contient pas de fichier « project."
+"godot »."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
@@ -7124,7 +7499,7 @@ msgstr "Veuillez choisir un dossier vide."
#: editor/project_manager.cpp
msgid "Please choose a 'project.godot' or '.zip' file."
-msgstr "Veuillez choisir un fichier 'project.godot' ou '.zip'."
+msgstr "Veuillez choisir un fichier « project.godot » ou « .zip »."
#: editor/project_manager.cpp
msgid "Directory already contains a Godot project."
@@ -7201,7 +7576,7 @@ msgstr "Créer et ouvrir"
#: editor/project_manager.cpp
msgid "Install Project:"
-msgstr "Installer projet :"
+msgstr "Installer le projet :"
#: editor/project_manager.cpp
msgid "Install & Edit"
@@ -7229,11 +7604,11 @@ msgstr "Parcourir"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Moteur de rendu :"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7242,10 +7617,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Meilleure qualité visuelle\n"
+"Toutes les fonctions disponibles\n"
+"Incompatible avec du matériel plus ancien\n"
+"Non recommandé pour les jeux web"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7254,10 +7633,16 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Qualité visuelle inférieure\n"
+"Certaines fonctions ne sont pas disponibles\n"
+"Fonctionne sur la plupart du matériel\n"
+"Recommandé pour les jeux en ligne"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"Le rendu peut être modifié ultérieurement, mais les scènes peuvent avoir "
+"besoin d'être ajustées."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7273,6 +7658,28 @@ msgstr "Voulez-vous vraiment ouvrir plus d'un projet à la fois ?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"Le fichier de configuration de projet ci-dessous n'indique pas par quelle "
+"version de Godot il a été généré.\n"
+"\n"
+"%s\n"
+"\n"
+"Si vous choisissez de l'ouvrir, il sera converti vers l'actuel format de "
+"fichier de configuration de Godot.\n"
+"Attention : Il ne sera plus possible d'ouvrir ce projet avec les précédentes "
+"versions du moteur."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7283,7 +7690,7 @@ msgid ""
"the engine anymore."
msgstr ""
"Le fichier de configuration de projet ci-dessous a été généré par une "
-"précédente version du moteur, et doit être mis à nouveau pour cette "
+"précédente version du moteur, et doit être mis à niveau pour cette "
"version :\n"
"\n"
"%s\n"
@@ -7306,17 +7713,17 @@ msgid ""
"Please edit the project and set the main scene in \"Project Settings\" under "
"the \"Application\" category."
msgstr ""
-"Impossible de lancer le projet : Pas de scène principale définie\n"
-"Veuillez éditer le projet et définir la scène principale dans \"Paramètres "
-"du projet\" sous la catégorie \"Application\"."
+"Impossible de lancer le projet : pas de scène principale définie.\n"
+"Veuillez modifier le projet et définir la scène principale dans « Paramètres "
+"du projet » sous la catégorie « Application »."
#: editor/project_manager.cpp
msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
-"Impossible d'exécuter le projet: Des ressources doivent être importées. \n"
-"Veuillez éditer le projet pour déclencher l'importation initiale."
+"Impossible d'exécuter le projet : des ressources doivent être importées. \n"
+"Veuillez cliquer sur « Édition » pour déclencher l'importation initiale."
#: editor/project_manager.cpp
msgid "Are you sure to run more than one project?"
@@ -7332,7 +7739,7 @@ msgid ""
"Language changed.\n"
"The UI will update next time the editor or project manager starts."
msgstr ""
-"La langue à été modifiée.\n"
+"La langue a été modifiée.\n"
"L'interface utilisateur sera mise à jour au prochain démarrage de l'éditeur "
"ou du gestionnaire de projets."
@@ -7385,9 +7792,8 @@ msgid ""
"You don't currently have any projects.\n"
"Would you like to explore the official example projects in the Asset Library?"
msgstr ""
-"Vous n'avez pour l'instant aucun projets.\n"
-"Aimeriez-vous explorer les exemples de projets officiels dans l'Asset "
-"Library ?"
+"Vous n'avez pour l'instant aucun projet.\n"
+"Voulez-vous explorer les exemples de projets officiels dans l'Asset Library ?"
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -7410,8 +7816,8 @@ msgid ""
"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'"
msgstr ""
-"Nom d'action invalide. Il ne peux être vide ni contenir '/', ':', '=', '\\' "
-"ou '\"'"
+"Nom d'action invalide. Il ne peut être vide ni contenir « / », « : », « = », "
+"« \\ » ou « \" »"
#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
@@ -7551,11 +7957,11 @@ msgstr "Sélectionnez d'abord un élément à configurer !"
#: editor/project_settings_editor.cpp
msgid "No property '%s' exists."
-msgstr "Il n'y a pas de propriété '%s'."
+msgstr "Il n'y a pas de propriété « %s »."
#: editor/project_settings_editor.cpp
msgid "Setting '%s' is internal, and it can't be deleted."
-msgstr "Le paramètre '%s' est interne et ne peut être effacé."
+msgstr "Le paramètre « %s » est interne et ne peut être effacé."
#: editor/project_settings_editor.cpp
msgid "Delete Item"
@@ -7566,8 +7972,8 @@ msgid ""
"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
"'\"'."
msgstr ""
-"Nom d'action invalide. Il ne peux être vide ou contenir '/', ':', '=', '\\' "
-"ou '\"'."
+"Nom d'action invalide. Il ne peut être vide ou contenir « / », « : », « = », "
+"« \\ » ou « \" »."
#: editor/project_settings_editor.cpp
msgid "Already existing"
@@ -7779,12 +8185,12 @@ msgstr "Sélectionner une méthode"
#: editor/pvrtc_compress.cpp
msgid "Could not execute PVRTC tool:"
-msgstr "Impossible d'exécuter l'outil PVRTC :"
+msgstr "Impossible d'exécuter l'outil PVRTC :"
#: editor/pvrtc_compress.cpp
msgid "Can't load back converted image using PVRTC tool:"
msgstr ""
-"L'image convertie n'a pas pu être rechargée en utilisant l'outil PVRTC :"
+"L'image convertie n'a pas pu être rechargée en utilisant l'outil PVRTC :"
#: editor/rename_dialog.cpp editor/scene_tree_dock.cpp
msgid "Batch Rename"
@@ -7989,6 +8395,8 @@ msgstr "Dupliquer le(s) nœud(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"Impossible de reparenter les nœuds dans les scènes héritées, l'ordre des "
+"nœuds ne peut pas changer."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -7999,6 +8407,10 @@ msgid "Instantiated scenes can't become root"
msgstr "Les scènes instanciées ne peuvent pas devenir la racine"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Choisir le nœud comme racine de scène"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Supprimer le(s) nœud(s) ?"
@@ -8035,6 +8447,10 @@ msgid "Make Local"
msgstr "Rendre local"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Nouvelle racine de scène"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Créer un nœud racine :"
@@ -8149,7 +8565,7 @@ msgstr ""
#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
-"Attacher un nouveau script ou un script existant pour le nœud sélectionné ."
+"Attacher un nouveau script ou un script existant pour le nœud sélectionné."
#: editor/scene_tree_dock.cpp
msgid "Clear a script for the selected node."
@@ -8253,7 +8669,7 @@ msgstr "Sélectionner un nœud"
#: editor/script_create_dialog.cpp
msgid "Error loading template '%s'"
-msgstr "Erreur de chargement de modèle '%s'"
+msgstr "Erreur lors du chargement du modèle « %s »"
#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
@@ -8386,7 +8802,7 @@ msgstr "Processus enfant connecté"
#: editor/script_editor_debugger.cpp
msgid "Copy Error"
-msgstr "Erreurs de copie"
+msgstr "Copier l'erreur"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
@@ -8465,6 +8881,18 @@ msgid "Set From Tree"
msgstr "Définir depuis l'arbre"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Effacer le raccourci"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Restaurer le raccourci"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Modifier le raccourci"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Raccourcis"
@@ -8506,11 +8934,11 @@ msgstr "Changer le rayon d'une forme en sphère"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Box Shape Extents"
-msgstr "Changer les extents d'une forme en boîte"
+msgstr "Changer l'étendue de la forme rectangulaire"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Radius"
-msgstr "Changer le rayon d'une forme en capsule"
+msgstr "Changer le rayon de la forme capsule"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Height"
@@ -8673,6 +9101,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Sélection de la duplication de GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "Peinture GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Grille"
@@ -8694,15 +9126,15 @@ msgstr "Agrafe ci-dessous"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit X Axis"
-msgstr "Editer axe X"
+msgstr "Modifier l'axe X"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Y Axis"
-msgstr "Editer axe Y"
+msgstr "Modifier l'axe Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Z Axis"
-msgstr "Editer axe Z"
+msgstr "Modifier l'axe Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate X"
@@ -8809,10 +9241,6 @@ msgid "Build Project"
msgstr "Compiler le projet"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Avertissements"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Voir les fichiers log"
@@ -8979,10 +9407,6 @@ msgid "Change Expression"
msgstr "Changer l'expression"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Ajouter un nœud"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Supprimer nœuds VisualScript"
@@ -9060,13 +9484,17 @@ msgstr "Séquence de connexion du nœud"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
-msgstr "Le script a déjà une fonction '%s'"
+msgstr "Le script a déjà une fonction « %s »"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Input Value"
msgstr "Changer nom de l'entrée"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Redimensionner le commentaire"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Impossible de copier le nœud de fonction."
@@ -9112,7 +9540,7 @@ msgstr "Nœuds disponibles :"
#: modules/visual_script/visual_script_editor.cpp
msgid "Select or create a function to edit graph"
-msgstr "Sélectionner ou créer une fonction pour éditer le graphe"
+msgstr "Sélectionnez ou créez une fonction pour modifier le graphe"
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit Signal Arguments:"
@@ -9128,7 +9556,7 @@ msgstr "Supprimer la selection"
#: modules/visual_script/visual_script_editor.cpp
msgid "Find Node Type"
-msgstr "Trouver le type du nœud"
+msgstr "Rechercher le type de nœud"
#: modules/visual_script/visual_script_editor.cpp
msgid "Copy Nodes"
@@ -9164,7 +9592,7 @@ msgstr "Indice de nom de propriété invalide."
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Base object is not a Node!"
-msgstr "L'objet de base n'est pas un nœud !"
+msgstr "L'objet de base n'est pas un nœud !"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Path does not lead Node!"
@@ -9172,7 +9600,7 @@ msgstr "Le chemin ne mène pas au nœud !"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
-msgstr "Nom de propriété invalide '%s' dans le nœud %s."
+msgstr "Nom de propriété invalide « %s » dans le nœud %s."
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
@@ -9227,8 +9655,8 @@ msgstr "Les segments du paquet doivent être de longueur non nulle."
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-"Le caractère '%s' n'est pas autorisé dans les noms de paquet d'applications "
-"Android."
+"Le caractère « %s » n'est pas autorisé dans les noms de paquet "
+"d'applications Android."
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
@@ -9243,23 +9671,22 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
-msgstr "Le paquet doit comporter au moins un séparateur '.'."
+msgstr "Le paquet doit comporter au moins un séparateur « . »."
#: platform/android/export/export.cpp
msgid "ADB executable not configured in the Editor Settings."
-msgstr "L'exécutable ADB n'est pas configuré dans les paramètres de l'éditeur."
+msgstr "L'exécutable ADB n'est pas configuré dans les Paramètres de l'éditeur."
#: platform/android/export/export.cpp
msgid "OpenJDK jarsigner not configured in the Editor Settings."
msgstr ""
-"OpenJDK jarsigner n'est pas configuré dans les paramètres de l'éditeur."
+"Le jarsigner OpenJDK n'est pas configuré dans les Paramètres de l'éditeur."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-"Debug keystore n'est pas configuré dans les paramètres de l'éditeur ni dans "
-"le préréglage."
+"Le Debug keystore n'est pas configuré dans les Paramètres de l'éditeur, ni "
+"dans le préréglage."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -9276,11 +9703,11 @@ msgstr "L'identifiant est manquant."
#: platform/iphone/export/export.cpp
msgid "Identifier segments must be of non-zero length."
msgstr ""
-"Les segments de l'identifiant doivent être d'une longueur différente de zéro."
+"Les segments de l'identifiant doivent être d'une longueur supérieure à zéro."
#: platform/iphone/export/export.cpp
msgid "The character '%s' is not allowed in Identifier."
-msgstr "Le caractère'%s' n'est pas autorisé dans l'identifiant."
+msgstr "Le caractère « %s » n'est pas autorisé dans l'identifiant."
#: platform/iphone/export/export.cpp
msgid "A digit cannot be the first character in a Identifier segment."
@@ -9291,12 +9718,12 @@ msgstr ""
msgid ""
"The character '%s' cannot be the first character in a Identifier segment."
msgstr ""
-"Le caractère'%s' ne peut pas être le premier caractère d'un segment "
+"Le caractère « %s » ne peut pas être le premier caractère d'un segment "
"d'identifiant."
#: platform/iphone/export/export.cpp
msgid "The Identifier must have at least one '.' separator."
-msgstr "L'identifiant doit avoir au moins un séparateur '.'."
+msgstr "L'identifiant doit avoir au moins un séparateur « . »."
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
@@ -9464,7 +9891,7 @@ msgid ""
"\"Particles Animation\" enabled."
msgstr ""
"L'animation de CPUParticles2D a besoin d'un CanvasItemMaterial avec "
-"\"Animation de Particules\" activé."
+"« Particles Animation » activé."
#: scene/2d/light_2d.cpp
msgid ""
@@ -9511,21 +9938,32 @@ msgstr ""
"Le nœud ParallaxLayer ne fonctionne que s'il est défini en tant qu'enfant "
"d'un nœud de type ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"Les particules de type GPU ne sont pas supportées par le pilote graphique "
+"GLES2.\n"
+"Utilisez le nœud CPUParticles2D à la place. Vous pouvez utiliser l'option « "
+"Convertir en CPUParticles » pour ce faire."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
msgstr ""
"Un matériau de traitement des particules n'est pas assigné, aucun "
-"comportement n'est donc imprimé."
+"comportement n'est donc visible."
#: scene/2d/particles_2d.cpp
msgid ""
"Particles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
msgstr ""
-"L'animation de Particles2D a besoin d'un CanvasItemMaterial avec \"Animation "
-"de Particules\" activé."
+"L'animation de Particles2D a besoin d'un CanvasItemMaterial avec « Particles "
+"Animation » activé."
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
@@ -9671,6 +10109,14 @@ msgstr ""
"Une CollisionShape nécessite une forme pour fonctionner. Créez une ressource "
"de forme pour cette CollisionShape !"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+"Les formes planes ne fonctionnent pas bien et seront supprimées dans les "
+"versions futures. S'il vous plaît, ne les utilisez pas."
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Rien n'est visible car aucun maillage n'a été assigné."
@@ -9680,13 +10126,21 @@ msgid ""
"CPUParticles animation requires the usage of a SpatialMaterial with "
"\"Billboard Particles\" enabled."
msgstr ""
-"L'animation de CPUParticles a besoin d'un SpatialMaterial avec \"Billboard "
-"Particles\" activé."
+"L'animation de CPUParticles a besoin d'un SpatialMaterial avec « Billboard "
+"Particles » activé."
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
msgstr "Tracer les maillages"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+"Les GIProps ne sont pas supporter par le pilote de vidéos GLES2.\n"
+"A la place utilisez une BakedLightMap."
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9703,6 +10157,17 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"Les particules de type GPU ne sont pas supportées par le pilote graphique "
+"GLES2.\n"
+"Utilisez le nœud CPUParticles à la place. Vous pouvez utiliser l'option « "
+"Convertir en CPUParticles » pour ce faire."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Rien n'est visible car les maillages n'ont pas été assignés au tirage des "
@@ -9713,8 +10178,8 @@ msgid ""
"Particles animation requires the usage of a SpatialMaterial with \"Billboard "
"Particles\" enabled."
msgstr ""
-"L'animation de Particles a besoin d'un SpatialMaterial avec \"Billboard "
-"Particles\" activé."
+"L'animation de Particles a besoin d'un SpatialMaterial avec « Billboard "
+"Particles » activé."
#: scene/3d/path.cpp
msgid "PathFollow only works when set as a child of a Path node."
@@ -9727,8 +10192,8 @@ msgid ""
"PathFollow ROTATION_ORIENTED requires \"Up Vector\" enabled in its parent "
"Path's Curve resource."
msgstr ""
-"PathFollow ROTATION_ORIENTED nécessite l'activation de \"Up Vector\" dans la "
-"ressource Path's Curve de son parent."
+"L'option ROTATION_ORIENTED de PathFollow nécessite l'activation de « Up "
+"Vector » dans la ressource Curve de son parent Path."
#: scene/3d/physics_body.cpp
msgid ""
@@ -9745,26 +10210,6 @@ msgid "Path property must point to a valid Spatial node to work."
msgstr ""
"La propriété Path doit pointer vers un nœud Spatial valide pour fonctionner."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment requiert une ressource de type Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Seul un WorldEnvironnement ne peut être utilisé par scène (ou ensemble de "
-"scènes instanciées)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Ce WorldEnvironment est ignoré. Ajoutez une caméra (pour les scènes 3D) ou "
-"définissez la propriété \"Background Mode\" de cet environnement sur \"Canvas"
-"\" (pour les scènes 2D)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Ce corps sera ignoré jusqu'à ce que vous définissiez un maillage"
@@ -9795,25 +10240,45 @@ msgstr ""
"VehicleWheel permet de fournir un système de roue à un VehicleBody. Merci de "
"l'utiliser comme enfant d'un VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment requiert une ressource de type Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Seul un WorldEnvironnement ne peut être utilisé par scène (ou ensemble de "
+"scènes instanciées)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Ce WorldEnvironment est ignoré. Ajoutez une caméra (pour les scènes 3D) ou "
+"définissez la propriété \"Background Mode\" de cet environnement sur \"Canvas"
+"\" (pour les scènes 2D)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
-msgstr "Sur le nœud BlendTree '%s', animation introuvable : '%s'"
+msgstr "Sur le nœud BlendTree « %s », animation introuvable : « %s »"
#: scene/animation/animation_blend_tree.cpp
msgid "Animation not found: '%s'"
-msgstr "Animation introuvable : '%s'"
+msgstr "Animation introuvable : « %s »"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
-msgstr "Dans le nœud '%s', animation non valide : '%s'."
+msgstr "Dans le nœud « %s », animation non valide : « %s »."
#: scene/animation/animation_tree.cpp
msgid "Invalid animation: '%s'."
-msgstr "Animation invalide : '%s'."
+msgstr "Animation invalide : « %s »."
#: scene/animation/animation_tree.cpp
msgid "Nothing connected to input '%s' of node '%s'."
-msgstr "Rien n'est connecté à l'entrée '%s' du nœud '%s'."
+msgstr "Rien n'est connecté à l'entrée « %s » du nœud « %s »."
#: scene/animation/animation_tree.cpp
msgid "A root AnimationNode for the graph is not set."
@@ -9839,12 +10304,32 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Ce nœud est désormais déprécié. Utilisez AnimationTree à la place."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Échantillonner une couleur depuis l'écran."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Mode brut"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Ajouter la couleur courante comme pré-réglage"
+msgid "Switch between hexadecimal and code values."
+msgstr "Alterner entre les valeurs hexadécimales ou brutes."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Ajouter la couleur courante comme pré-réglage."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+"Le conteneur en lui-même ne sert à rien à moins qu'un script ne configure "
+"son comportement de placement de ses enfants.\n"
+"Si vous n'avez pas l'intention d'ajouter un script, utilisez plutôt un nœud "
+"'Control'."
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9854,6 +10339,10 @@ msgstr "Alerte !"
msgid "Please Confirm..."
msgstr "Veuillez confirmer…"
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "Aller au dossier parent."
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9940,6 +10429,26 @@ msgstr "Affectation à l'uniforme."
msgid "Varyings can only be assigned in vertex function."
msgstr "Les variations ne peuvent être affectées que dans la fonction vertex."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Instancie la(les) scène(s) sélectionnée(s) en tant qu'enfant(s) du nœud "
+#~ "sélectionné."
+
+#~ msgid "FPS"
+#~ msgstr "IPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Avertissements :"
+
+#~ msgid "Font Size:"
+#~ msgstr "Taille de police :"
+
+#~ msgid "Line:"
+#~ msgstr "Ligne :"
+
+#~ msgid "Col:"
+#~ msgstr "Colonne :"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "Le nœud OrientedPathFollow ne fonctionne que s'il est défini en tant "
diff --git a/editor/translations/he.po b/editor/translations/he.po
index 09d368d4e3..6883709a0d 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -91,6 +91,15 @@ msgstr "למחוק ×ת ×”×§×‘×¦×™× ×”× ×‘×—×¨×™×?"
msgid "Delete Selected Key(s)"
msgstr "למחוק ×ת ×”×§×‘×¦×™× ×”× ×‘×—×¨×™×?"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "הזזת נקודה"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -120,6 +129,16 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "החלפת ערך מילון"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -175,6 +194,11 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "החלפת ערך המערך"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -201,6 +225,10 @@ msgid "Time (s): "
msgstr "זמן:"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "מתמשך"
@@ -253,6 +281,21 @@ msgid "Delete Key(s)"
msgstr "מחיקת שורה"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "החלפת ערך מילון"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "החלפת ערך מילון"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "×©× ×”× ×¤×©×” חדשה:"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -294,6 +337,16 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "ניקוי ההנפשה"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "סידור טעינות ×וטומטית מחדש"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -318,6 +371,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "הוספת רצועות חדשות."
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -326,11 +384,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "התמרה"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "הוספת רצועות חדשות."
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Add Method Track Key"
+msgstr "הוספת רצועות חדשות."
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
msgstr "×œ× × ×ž×¦× VariableGet בסקריפט: "
@@ -344,6 +417,11 @@ msgid "Clipboard is empty"
msgstr "לוח גזירי המש××‘×™× ×¨×™×§!"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "הדבקת משתני×"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -390,11 +468,6 @@ msgid "Copy Tracks"
msgstr "העתקת משתני×"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "הדבקת משתני×"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -497,6 +570,19 @@ msgstr ""
msgid "Copy"
msgstr "העתקה"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "מ×זין לשמע"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "שינוי גודל המערך"
@@ -561,23 +647,13 @@ msgstr "להתרחק"
msgid "Reset Zoom"
msgstr "×יפוס התקריב"
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr "×זהרות"
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "מבט קדמי"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "שורה:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "עמודה:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -876,8 +952,8 @@ msgstr "למחוק ×ת ×”×§×‘×¦×™× ×”× ×‘×—×¨×™×?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "למחוק"
@@ -1130,8 +1206,9 @@ msgid "Add Bus"
msgstr "הוספת ×פיק"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "יצירת פריסת ××¤×™×§×™× ×—×“×©×”."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "שמירת פריסת ×פיקי השמע בתור…"
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1159,6 +1236,10 @@ msgstr "טעינת בררת המחדל"
msgid "Load the default Bus Layout."
msgstr "טעינת בררת המחדל של פריסת ×פיקי השמע."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "יצירת פריסת ××¤×™×§×™× ×—×“×©×”."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "×©× ×©×’×•×™."
@@ -1302,6 +1383,26 @@ msgstr ""
msgid "Packing"
msgstr "×ריזה"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1351,7 +1452,7 @@ msgstr "הצגה במנהל הקבצי×"
msgid "New Folder..."
msgstr "תיקייה חדשה…"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "רענון"
@@ -1426,10 +1527,35 @@ msgstr "העברת מועדף למעלה"
msgid "Move Favorite Down"
msgstr "העברת מועדף למטה"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "המישור הקוד×"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "יצירת תיקייה"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "מעבר לתיקייה שמעל"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "×œ× × ×™×ª×Ÿ ליצור תיקייה."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "צפייה ×‘×¤×¨×™×˜×™× ×›×¨×©×ª של תמונות ממוזערות"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "הצגת ×¤×¨×™×˜×™× ×›×¨×©×™×ž×”"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "תיקיות וקבצי×:"
@@ -1663,9 +1789,9 @@ msgstr "מחיקת הפלט"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "שגי××” בשמירת המש×ב!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1673,6 +1799,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "שגי××” בשמירת המש×ב!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "שמירת המש×ב בתור…"
@@ -1868,6 +2004,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "לשמור ×ת ×”×©×™× ×•×™×™× ×œÖ¾â€š%s’ לפני הסגירה?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "טעינת המש×ב נכשלה."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "שמירת סצנה בש×…"
@@ -2367,7 +2512,8 @@ msgid "Save & Restart"
msgstr "לשמור ולצ×ת"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "מסתובב ×›×שר חלון העורך מצויר מחדש!"
#: editor/editor_node.cpp
@@ -2924,16 +3070,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "×œ× × ×™×ª×Ÿ לנווט ×ל ‚%s’ כיוון ×©×œ× × ×ž×¦× ×‘×ž×¢×¨×›×ª הקבצי×!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "צפייה ×‘×¤×¨×™×˜×™× ×›×¨×©×ª של תמונות ממוזערות"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "הצגת ×¤×¨×™×˜×™× ×›×¨×©×™×ž×”"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr "מצב: ×™×™×‘×•× ×”×§×•×‘×¥ נכשל. × × ×œ×ª×§×Ÿ ×ת הקובץ ×•×œ×™×™×‘× ×ž×—×“×© ידנית."
@@ -3077,10 +3213,6 @@ msgid "Search files"
msgstr "חיפוש במחלקות"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3447,25 +3579,6 @@ msgid "Create Polygon"
msgstr "יצירת מצולע"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "עריכת מצולע"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "הוספת נקודה"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "עריכת מצולע (הסרת נקודה)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "הסרת מצולע ונקודה"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3485,6 +3598,25 @@ msgstr ""
msgid "Erase points."
msgstr "מחיקת נקודות"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "עריכת מצולע"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "הוספת נקודה"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "עריכת מצולע (הסרת נקודה)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "הסרת מצולע ונקודה"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3503,12 +3635,47 @@ msgstr "טעינה"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "הזזת נקודה"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "הזזת נקודה"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "תקריב הנפשה."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "הסרת נקודה בנתיב"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3551,6 +3718,28 @@ msgid "Triangle already exists"
msgstr "הפעולה ‚%s’ כבר קיימת!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "הוספת רצועות חדשות."
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "הסרת נקודה בנתיב"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3559,6 +3748,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "החלפת מצב מועדפי×"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3576,6 +3770,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "שינויי חומרי×"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3585,11 +3784,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "×©× ×”×ž×¤×¨×§:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "מחובר"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "מנותק"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "×©× ×”× ×¤×©×” חדשה:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "מחיקת שורה"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "החלפת מצב מועדפי×"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "שינוי"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3605,6 +3847,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "×©× ×”×ž×¤×¨×§:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3838,6 +4086,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "מצב הזזה (W)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "מעברון"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3867,6 +4130,20 @@ msgid "No playback resource set at path: %s."
msgstr "×œ× ×‘× ×ª×™×‘ המש×ב."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "הסרה"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "מעברון"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4287,6 +4564,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4672,6 +4959,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4929,19 +5220,19 @@ msgid "Generating Visibility Rect"
msgstr "נוצר ×ž×™×–× C#‎…"
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5033,11 +5324,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5194,6 +5485,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "יצירת מצולע"
@@ -5846,6 +6143,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "נגינת סצנה בהת×מה ×ישית"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "יחידני"
@@ -5957,10 +6263,6 @@ msgid "Vertices"
msgstr "קודקודי×"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "מבט על."
@@ -6005,7 +6307,8 @@ msgid "Rear"
msgstr "×חורי"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "יישור ×¢× ×”×ª×¦×•×’×”"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6098,6 +6401,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "הצגת מידע"
@@ -6107,6 +6416,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "בחירת מצב (Q)"
@@ -6322,7 +6635,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6390,10 +6703,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6402,10 +6711,16 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "×נימציות"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "×©× ×”× ×¤×©×” חדשה:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "מהירות (FPS):"
@@ -6414,7 +6729,8 @@ msgid "Loop"
msgstr "לול××”"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "שקופיות ההנפשה"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6711,6 +7027,24 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "הסקריפט הב×"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "הסקריפט הקוד×"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6726,6 +7060,11 @@ msgstr "מחיקת נקודות"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "יצירת %s חדש"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "יצירת מצולע"
@@ -6858,6 +7197,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "הזזת מצולע"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "הזזת מצולע"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "הסרת תבנית"
@@ -6904,6 +7253,28 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "הגדרה כבררת מחדל עבור ‚%s’"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "שכפול"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "קודקודי×"
@@ -6921,6 +7292,15 @@ msgstr "ימין"
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "הוספת מ×פיין גלובלי"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6934,7 +7314,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6947,6 +7336,14 @@ msgid "Exporting All"
msgstr "ייצו×"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7227,6 +7624,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7935,6 +8345,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "שמירת סצנה"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7970,6 +8385,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "שמירת סצנה"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "יצירת תיקייה"
@@ -8392,6 +8812,19 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "שינוי הערה"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8597,6 +9030,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8734,10 +9171,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "×זהרות"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8896,10 +9329,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8982,6 +9411,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "החלפת מצב הערה"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9374,6 +9808,13 @@ msgid ""
msgstr ""
"מפרק ParallaxLayer עובד רק ×›×שר ×”×•× ×ž×•×’×“×¨ כצ××¦× ×©×œ מפרק ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9503,6 +9944,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9517,6 +9964,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9529,6 +9982,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9560,21 +10020,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9598,6 +10043,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9641,13 +10101,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "מצב גולמי"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "הוספת הצבע הנוכחי כערכה"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr ""
@@ -9656,6 +10133,11 @@ msgstr ""
msgid "Please Confirm..."
msgstr "× × ×œ×מת…"
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "מעבר לתיקייה שמעל"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9730,6 +10212,20 @@ msgid "Varyings can only be assigned in vertex function."
msgstr ""
#, fuzzy
+#~ msgid "Warnings:"
+#~ msgstr "×זהרות"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "מבט קדמי"
+
+#~ msgid "Line:"
+#~ msgstr "שורה:"
+
+#~ msgid "Col:"
+#~ msgstr "עמודה:"
+
+#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "PathFollow2D עובד רק ×›×שר ×”×•× ×ž×•×’×“×¨ כצ××¦× ×©×œ מפרק Path2D."
@@ -9832,9 +10328,6 @@ msgstr ""
#~ msgid "Change Default Value"
#~ msgstr "שינוי ערך בררת המחדל"
-#~ msgid "Change Comment"
-#~ msgstr "שינוי הערה"
-
#~ msgid "Change Input Name"
#~ msgstr "שינוי ×©× ×§×œ×˜"
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index 687665d165..7f0bba57d7 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -85,6 +85,14 @@ msgstr "चयनित चाबी (फ़ाइलें) डà¥à¤ªà¥à¤²à¤¿à
msgid "Delete Selected Key(s)"
msgstr "चयनित फ़ाइलें हटाà¤à¤‚?"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim डà¥à¤ªà¥à¤²à¤¿à¤•ेट चाबी"
@@ -118,6 +126,16 @@ msgid "Anim Change Call"
msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ बà¥à¤²à¤¾à¤µà¤¾"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "शबà¥à¤¦ बदलें मूलà¥à¤¯"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "गà¥à¤£(Property) टà¥à¤°à¥ˆà¤•"
@@ -168,6 +186,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -192,6 +214,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -244,6 +270,21 @@ msgid "Delete Key(s)"
msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ को हटाने के लिठकà¥à¤‚जी"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "शबà¥à¤¦ बदलें मूलà¥à¤¯"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "शबà¥à¤¦ बदलें मूलà¥à¤¯"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -285,6 +326,15 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "शबà¥à¤¦à¤•ोश कà¥à¤‚जी बदलें"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -309,6 +359,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "टà¥à¤°à¥ˆà¤• जोड़ें"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -317,10 +372,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3 डी टà¥à¤°à¥ˆà¤• रूपांतरण"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "टà¥à¤°à¥ˆà¤• जोड़ें"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "कॉल मेथड टà¥à¤°à¥ˆà¤•"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -333,6 +403,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -375,10 +449,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -480,6 +550,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "टà¥à¤°à¥ˆà¤• जोड़ें"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -544,22 +627,14 @@ msgstr "छोटा करो"
msgid "Reset Zoom"
msgstr "रीसेट आकार"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "रेखा:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "सà¥à¤¤à¤‚भ:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "लकà¥à¤·à¥à¤¯ नोड में विधि निरà¥à¤¦à¤¿à¤·à¥à¤Ÿ किया जाना चाहिà¤!"
@@ -877,8 +952,8 @@ msgstr "चयनित फ़ाइलें हटाà¤à¤‚?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "को हटा दें"
@@ -1143,7 +1218,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1172,6 +1247,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1315,6 +1394,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1361,7 +1460,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1436,10 +1535,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1662,8 +1781,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1672,6 +1791,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1863,6 +1992,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2352,7 +2489,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2904,14 +3041,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3056,10 +3185,6 @@ msgid "Search files"
msgstr "खोज कर:"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3408,23 +3533,6 @@ msgid "Create Polygon"
msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3443,6 +3551,23 @@ msgstr ""
msgid "Erase points."
msgstr ""
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr ""
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3460,12 +3585,45 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "पसंदीदा:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3505,6 +3663,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "टà¥à¤°à¥ˆà¤• जोड़ें"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3513,6 +3692,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3530,6 +3713,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3539,11 +3726,51 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "जà¥à¤¡à¤¿à¤¯à¥‡"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "डिसà¥à¤•नेकà¥à¤Ÿ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "को हटा दें"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3559,6 +3786,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3786,6 +4018,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "अनà¥à¤µà¤¾à¤¦ में बदलाव करें:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3814,6 +4060,20 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "मिटाना"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "अनà¥à¤µà¤¾à¤¦ में बदलाव करें:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4229,6 +4489,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4608,6 +4878,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4864,19 +5138,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4967,11 +5241,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5127,6 +5401,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5755,6 +6035,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5864,10 +6152,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5912,7 +6196,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6004,6 +6288,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6012,6 +6302,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6224,7 +6518,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6289,10 +6583,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6301,8 +6591,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "कारà¥à¤¯à¥‹à¤‚:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6313,7 +6609,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6606,6 +6902,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6619,6 +6931,11 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "à¤à¤• नया बनाà¤à¤‚"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚"
@@ -6749,6 +7066,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "मिटाना"
@@ -6792,6 +7118,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "पà¥à¤°à¤¤à¤¿à¤²à¤¿à¤ªà¤¿"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6807,6 +7154,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6820,7 +7175,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6832,6 +7196,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7108,6 +7480,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7801,6 +8186,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7835,6 +8224,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "à¤à¤• नया बनाà¤à¤‚"
@@ -8249,6 +8642,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8454,6 +8859,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8592,10 +9001,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8754,10 +9159,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8838,6 +9239,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9226,6 +9631,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9355,6 +9767,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9369,6 +9787,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9381,6 +9805,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9411,21 +9842,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9449,6 +9865,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9492,11 +9923,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9507,6 +9954,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9580,6 +10031,12 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "रेखा:"
+
+#~ msgid "Col:"
+#~ msgstr "सà¥à¤¤à¤‚भ:"
+
#, fuzzy
#~ msgid "Remove Split"
#~ msgstr "मिटाना"
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index 36017a4f78..82c9382625 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -81,6 +81,14 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -110,6 +118,15 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -159,6 +176,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -183,6 +204,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -233,6 +258,18 @@ msgid "Delete Key(s)"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -274,6 +311,14 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -298,6 +343,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -306,10 +355,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -322,6 +383,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -364,10 +429,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -467,6 +528,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -531,20 +604,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -838,8 +903,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1091,7 +1156,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1120,6 +1185,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1263,6 +1332,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1308,7 +1397,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1383,10 +1472,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1602,8 +1711,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1612,6 +1721,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1803,6 +1922,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2290,7 +2417,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2838,14 +2965,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2981,10 +3100,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3328,37 +3443,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3378,12 +3493,43 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3423,6 +3569,26 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3431,6 +3597,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3448,6 +3618,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3457,11 +3631,47 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3477,6 +3687,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3702,6 +3917,19 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3730,6 +3958,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4141,6 +4381,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4518,6 +4768,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4774,19 +5028,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4877,11 +5131,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5036,6 +5290,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5649,6 +5909,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5757,10 +6025,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5805,7 +6069,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5897,6 +6161,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5905,6 +6175,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6117,7 +6391,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6181,19 +6455,19 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
+msgid "Change Animation FPS"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation FPS"
+msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "(empty)"
+msgid "Animations:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6205,7 +6479,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6494,6 +6768,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6506,6 +6796,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6628,6 +6922,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6668,6 +6970,26 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6683,6 +7005,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6696,7 +7026,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6708,6 +7047,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6981,6 +7328,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7671,6 +8031,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7705,6 +8069,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8117,6 +8485,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8321,6 +8701,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8457,10 +8841,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8619,10 +8999,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8703,6 +9079,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9086,6 +9466,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9215,6 +9602,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9229,6 +9622,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9241,6 +9640,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9271,21 +9677,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9309,6 +9700,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9350,11 +9756,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9365,6 +9787,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 15932c95bf..7d61ceec08 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -94,6 +94,16 @@ msgstr "Kiválasztás megkettőzés"
msgid "Delete Selected Key(s)"
msgstr "Törli a kiválasztott fájlokat?"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Pont hozzáadása"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Pont Mozgatása"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Animáció kulcsok megkettőzése"
@@ -123,6 +133,16 @@ msgid "Anim Change Call"
msgstr "Animáció hívás változtatás"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Animáció Nevének Megváltoztatása:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -178,6 +198,11 @@ msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Track Path"
+msgstr "Tömb Értékének Megváltoztatása"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
msgstr "Zavarmentes mód váltása."
@@ -205,6 +230,11 @@ msgid "Time (s): "
msgstr "Ãttűnési IdÅ‘ (mp):"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Doppler engedélyezése"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Folyamatos"
@@ -258,6 +288,21 @@ msgid "Delete Key(s)"
msgstr "Animáció kulcs törlés"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Animáció Nevének Megváltoztatása:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Animáció Node"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Animáció hurok változtatás"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Animáció nyomvonal eltávolítás"
@@ -299,6 +344,16 @@ msgid "Anim Insert Key"
msgstr "Animáció kulcs beillesztés"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Animáció Nevének Megváltoztatása:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "AutoLoad-ok Ãtrendezése"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -323,6 +378,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Animáció nyomvonal hozzáadás"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -331,10 +391,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "UV Térkép Transzformálása"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Animáció nyomvonal hozzáadás"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Animáció nyomvonal és kulcs beillesztés"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -348,6 +423,11 @@ msgid "Clipboard is empty"
msgstr "Az erőforrás vágólap üres!"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Paraméterek Beillesztése"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Animáció kulcsok nyújtás"
@@ -394,11 +474,6 @@ msgid "Copy Tracks"
msgstr "Paraméterek Másolása"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Paraméterek Beillesztése"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Kiválasztás átméretezés"
@@ -501,6 +576,19 @@ msgstr ""
msgid "Copy"
msgstr "Másolás"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Animáció nyomvonal hozzáadás"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Tömb Ãtméretezése"
@@ -565,22 +653,13 @@ msgstr "Kicsinyítés"
msgid "Reset Zoom"
msgstr "Nagyítás Visszaállítása"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Körvonal Mérete:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Sor:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Oszlop:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -888,8 +967,8 @@ msgstr "Törli a kiválasztott fájlokat?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Törlés"
@@ -1146,8 +1225,9 @@ msgid "Add Bus"
msgstr "Busz Hozzáadása"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Új Buszelrendezés létrehozása."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Hangbusz Elrendezés Mentése Másként..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1175,6 +1255,10 @@ msgstr "Alapértelmezett Betöltése"
msgid "Load the default Bus Layout."
msgstr "Betölti az alapértelmezett Busz Elrendezést."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Új Buszelrendezés létrehozása."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Érvénytelen név."
@@ -1319,6 +1403,26 @@ msgstr ""
msgid "Packing"
msgstr "Csomagolás"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1368,7 +1472,7 @@ msgstr "Mutat Fájlkezelőben"
msgid "New Folder..."
msgstr "Új Mappa..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Frissítés"
@@ -1443,10 +1547,35 @@ msgstr "Kedvenc Felfelé Mozgatása"
msgid "Move Favorite Down"
msgstr "Kedvenc Lefelé Mozgatása"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Előző Sík"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Mappa Létrehozása"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Ugrás a szülőmappába"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Nem sikerült létrehozni a mappát."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Elemek kirajzolása indexképek rácsába"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Elemek listázása"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Könyvtárak és Fájlok:"
@@ -1687,9 +1816,9 @@ msgstr "Kimenet Törlése"
msgid "Project export failed with error code %d."
msgstr "Projekt export nem sikerült, hibakód %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Hiba történt az erőforrás mentésekor!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1697,6 +1826,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Hiba történt az erőforrás mentésekor!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Erőforrás Mentése Másként..."
@@ -1920,6 +2059,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Bezárás előtt menti a '%s'-n végzett módosításokat?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Nem sikerült betölteni az erőforrást."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Scene mentés másként..."
@@ -2455,7 +2603,8 @@ msgid "Save & Restart"
msgstr "Mentés és Kilépés"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Fordul egyet, amikor a szerkesztőablak újrarajzolódik!"
#: editor/editor_node.cpp
@@ -3020,16 +3169,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "Nem lehet '%s'-t elérni, mivel nem létezik a fájlrendszerben!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Elemek kirajzolása indexképek rácsába"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Elemek listázása"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Ãllapot: Fájl importálása sikertelen. Javítsa a fájlt majd importálja be "
@@ -3175,10 +3314,6 @@ msgid "Search files"
msgstr "Osztályok Keresése"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Kiválasztott Scene(k) példányosítása a kiválasztott Node gyermekeként."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3548,25 +3683,6 @@ msgid "Create Polygon"
msgstr "Sokszög Létrehozása"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Sokszög Szerkesztése"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Pont Beszúrása"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Sokszög Szerkesztése (Pont Eltávolítása)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Sokszög és Pont Eltávolítása"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3591,6 +3707,25 @@ msgstr ""
msgid "Erase points."
msgstr "Jobb Egérgomb: Pont Törlése."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Sokszög Szerkesztése"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Pont Beszúrása"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Sokszög Szerkesztése (Pont Eltávolítása)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Sokszög és Pont Eltávolítása"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3609,12 +3744,49 @@ msgstr "Betöltés"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Pont Mozgatása"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Keverési Idő Módosítása"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Keverési Idő Módosítása"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Pont hozzáadása"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Animáció Hozzáadása"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Útvonal Pont Eltávolítása"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3657,6 +3829,30 @@ msgid "Triangle already exists"
msgstr "HIBA: Animáció név már létezik!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Animáció nyomvonal hozzáadás"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Keverési Idő Módosítása"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Keverési Idő Módosítása"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Útvonal Pont Eltávolítása"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3665,6 +3861,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "AutoLoad Globálisok Kapcsolása"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3682,6 +3883,11 @@ msgid "Blend:"
msgstr "Keverés:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Változások Frissítése"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Szűrők Szerkesztése"
@@ -3691,11 +3897,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Mozgás Mód"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Csatlakozva"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Kapcsolat bontva"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animáció"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Node létrehozás"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Zavarmentes mód váltása."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Animáció hossz változtatás"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3711,6 +3960,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Node neve:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3946,6 +4201,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Animációk Közötti Keverési Idők"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Mozgás Mód"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Ãtmenet"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3975,6 +4245,20 @@ msgid "No playback resource set at path: %s."
msgstr "Nincs az erőforrás elérési útban."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Eltávolít"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Ãtmenet Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4411,6 +4695,16 @@ msgid "Move CanvasItem"
msgstr "CanvasItem Szerkesztése"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Csak Horgonyok"
@@ -4804,6 +5098,10 @@ msgstr "Tartsa lenyomva a Shift gombot az érintők egyenkénti szerkesztéséhe
msgid "Bake GI Probe"
msgstr "GI Szonda Besütése"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "%d elem"
@@ -5063,6 +5361,10 @@ msgid "Generating Visibility Rect"
msgstr "Láthatósági Téglalap Generálása"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Láthatósági Téglalap Generálása"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Csak egy ParticlesMaterial feldolgozó anyagba állíthat pontot"
@@ -5075,10 +5377,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Nem létezik egyetlen pixel sem >128-as átlátszósággal a képben..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Láthatósági Téglalap Generálása"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Kibocsátási Maszk Betöltése"
@@ -5167,13 +5465,13 @@ msgid "Generating AABB"
msgstr "AABB Generálása"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "AABB Generálása"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Láthatósági AABB Generálása"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "AABB Generálása"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Pont Eltávolítása Görbéről"
@@ -5330,6 +5628,12 @@ msgid "Create UV Map"
msgstr "UV Térkép Létrehozása"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Sokszög Létrehozása"
@@ -5991,6 +6295,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Kibocsátási Pontok Létrehozása A Mesh Alapján"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Egyke"
@@ -6102,10 +6415,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6150,7 +6459,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6243,6 +6552,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6251,6 +6566,11 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Rácshoz illesztés"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6463,7 +6783,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6532,10 +6852,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6544,8 +6860,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Animáció"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animáció"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6556,8 +6878,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Animáció Neve:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6854,6 +7177,24 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Következő Szkript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Előző Szkript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6869,6 +7210,11 @@ msgstr "Jobb Egérgomb: Pont Törlése."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Új %s Létrehozása"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Új sokszög létrehozása a semmiből."
@@ -7002,6 +7348,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Sokszög Mozgatása"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Sokszög Mozgatása"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Sablon Eltávolítása"
@@ -7050,6 +7406,29 @@ msgid "TileSet"
msgstr "TileSet-re..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Beállítás Alapértelmezettként '%s'-hez"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "Ãrnyaló"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Animáció kulcsok megkettőzése"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7066,6 +7445,16 @@ msgstr ""
msgid "VisualShader"
msgstr "Ãrnyaló"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Szűrők Szerkesztése"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Ãrnyaló"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -7079,7 +7468,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7092,6 +7490,14 @@ msgid "Exporting All"
msgstr "Exportálás"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7371,6 +7777,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8073,6 +8492,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Scene mentés"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8109,6 +8533,11 @@ msgstr "Csontok Létrehozása"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Scene mentés"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Node létrehozás"
@@ -8531,6 +8960,20 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Lassan Ki"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Horgonyok Módosítása"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8739,6 +9182,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8876,10 +9323,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Fájlok Megtekintése"
@@ -9045,10 +9488,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9131,6 +9570,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "CanvasItem Szerkesztése"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9522,6 +9966,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9651,6 +10102,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9665,6 +10122,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9677,6 +10140,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9707,21 +10177,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9745,6 +10200,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9793,11 +10263,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9808,6 +10294,11 @@ msgstr "Figyelem!"
msgid "Please Confirm..."
msgstr "Kérem Erősítse Meg..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Ugrás a szülőmappába"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9886,6 +10377,20 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Kiválasztott Scene(k) példányosítása a kiválasztott Node gyermekeként."
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Körvonal Mérete:"
+
+#~ msgid "Line:"
+#~ msgstr "Sor:"
+
+#~ msgid "Col:"
+#~ msgstr "Oszlop:"
+
#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "Már létezik '%s' AutoLoad!"
@@ -10010,10 +10515,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Konvertálás Kisbetűsre"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Rácshoz illesztés"
-
#~ msgid "Bake!"
#~ msgstr "Besütés!"
@@ -10110,12 +10611,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "Ki-Be"
-#~ msgid "Change Anim Len"
-#~ msgstr "Animáció hossz változtatás"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "Animáció hurok változtatás"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "Animáció típusos érték kulcs létrehozás"
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 6f399a2ae3..8635cf10a7 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -17,12 +17,13 @@
# yursan9 <rizal.sagi@gmail.com>, 2016.
# Evan Hyacinth <muhammad.ivan669@gmail.com>, 2018, 2019.
# Guntur Sarwohadi <gsarwohadi@gmail.com>, 2019.
+# Alphin Albukhari <alphinalbukhari5@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-13 15:07+0000\n"
-"Last-Translator: Guntur Sarwohadi <gsarwohadi@gmail.com>\n"
+"PO-Revision-Date: 2019-03-08 15:04+0000\n"
+"Last-Translator: Evan Hyacinth <muhammad.ivan669@gmail.com>\n"
"Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/"
"godot/id/>\n"
"Language: id\n"
@@ -30,7 +31,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.4-dev\n"
+"X-Generator: Weblate 3.5.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -98,6 +99,14 @@ msgstr "Duplikat Key Terpilih"
msgid "Delete Selected Key(s)"
msgstr "Hapus Key Terpilih"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Tambahkan Titik Bezier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Pindah Titik-titik Bezier"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Tombol Duplikat Anim"
@@ -127,6 +136,15 @@ msgid "Anim Change Call"
msgstr "Ubah Panggilan Anim"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Ubah Panjang Animasi"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Ubah Perulangan Animasi"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Track Properti"
@@ -176,6 +194,10 @@ msgid "Anim Clips:"
msgstr "Klip-klip Animasi:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Ubah Jalan Trek"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Alihkan track ini ke nyala/mati."
@@ -200,6 +222,10 @@ msgid "Time (s): "
msgstr "Waktu (d): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Aktifkan Trek Beralih"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Lanjut"
@@ -250,6 +276,18 @@ msgid "Delete Key(s)"
msgstr "Hapus Key"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Ubah Mode Pembaruan Animasi"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Ubah Mode Interpolasi Animasi"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Ubah Mode Perulangan Animasi"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Hapus Trek Anim"
@@ -292,6 +330,14 @@ msgid "Anim Insert Key"
msgstr "Sisipkan Key Anim"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Ubah Langkah Animasi"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Susun ulang Trek-trek"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Track transformasi hanya berlaku untuk node berbasis ruangan."
@@ -321,6 +367,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Tidak memungkinkan untuk menambah track baru tanpa akar"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Tambah Track Bezier"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Tidak bisa menambahkan key karena path pada track tidak sah."
@@ -329,11 +379,23 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Track bukan tipe Spatial, tidak bisa menambahkan key"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Tambah Kunci Trek Transformasi"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Tambah Kunci Track"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
"Tidak bisa menambahkan key untuk metode karena path pada track tidak sah."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Tambah Kunci Track Metode"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Metode tidak ditemukan dalam objek: "
@@ -346,6 +408,10 @@ msgid "Clipboard is empty"
msgstr "Papan klip kosong"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Tempel Trek-trek"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Skala Kunci Anim"
@@ -380,19 +446,12 @@ msgid "Edit"
msgstr "Sunting"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation properties."
-msgstr "PohonAnimasi"
+msgstr "Properti Animasi."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Copy Tracks"
-msgstr "Salin Parameter"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Tempel Parameter"
+msgstr "Salin Trek-trek"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
@@ -411,19 +470,16 @@ msgid "Duplicate Transposed"
msgstr "Duplikat Dialihkan"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Delete Selection"
-msgstr "Hapus yang Dipilih"
+msgstr "Hapus Pilihan"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Next Step"
-msgstr "Lanjut ke Langkah Berikutnya"
+msgstr "Menuju Langkah Berikutnya"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Go to Previous Step"
-msgstr "Lanjut ke Langkah Sebelumnya"
+msgstr "Menuju Langkah Sebelumnya"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -443,15 +499,15 @@ msgstr "Gunakan Lengkungan Bezier"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
-msgstr "Anim. Optimisasi"
+msgstr "Pengoptimal Animasi"
#: editor/animation_track_editor.cpp
msgid "Max. Linear Error:"
-msgstr "Maks. Linier Error:"
+msgstr "Error Linier Maksimum:"
#: editor/animation_track_editor.cpp
msgid "Max. Angular Error:"
-msgstr "Maks. Angular Error:"
+msgstr "Error Angular Maksimum:"
#: editor/animation_track_editor.cpp
msgid "Max Optimizable Angle:"
@@ -459,7 +515,7 @@ msgstr "Maksimal Angle yang dapat Dioptimalkan:"
#: editor/animation_track_editor.cpp
msgid "Optimize"
-msgstr "Optimasi"
+msgstr "Optimalkan"
#: editor/animation_track_editor.cpp
msgid "Remove invalid keys"
@@ -483,7 +539,7 @@ msgstr "Bersihkan"
#: editor/animation_track_editor.cpp
msgid "Scale Ratio:"
-msgstr "Skala Rasio:"
+msgstr "Rasio Skala:"
#: editor/animation_track_editor.cpp
msgid "Select tracks to copy:"
@@ -497,6 +553,18 @@ msgstr "Pilih track untuk disalin:"
msgid "Copy"
msgstr "Kopy"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Tambah Clip Trek Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Seimbangkan Awalan Klip Trek Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Seimbangkan Akhiran Klip Trek Audio"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Ubah ukuran Array"
@@ -523,7 +591,7 @@ msgstr "Tidak ada yang cocok"
#: editor/code_editor.cpp
msgid "Replaced %d occurrence(s)."
-msgstr "%d kejadian diganti."
+msgstr "kejadian %d diganti."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
@@ -561,22 +629,13 @@ msgstr "Perkecil Pandangan"
msgid "Reset Zoom"
msgstr "Kebalikan Semula Pandangan"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Peringatan:"
-
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Tampilan Depan."
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Baris:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Peringatan"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kolom:"
+msgid "Line and column numbers."
+msgstr "Nomor baris dan kolom."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -660,18 +719,17 @@ msgid "Disconnect '%s' from '%s'"
msgstr "Memutuskan '%s' dari '%s'"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Disconnect all from signal: '%s'"
-msgstr "Memutuskan '%s' dari '%s'"
+msgstr "Memutuskan semua dari sinyal '%s'"
#: editor/connections_dialog.cpp
msgid "Connect..."
-msgstr "Menyambungkan..."
+msgstr "Sambungkan..."
#: editor/connections_dialog.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Disconnect"
-msgstr "Tidak tersambung"
+msgstr "Putuskan"
#: editor/connections_dialog.cpp
msgid "Connect Signal: "
@@ -838,9 +896,8 @@ msgid "Error loading:"
msgstr "Error saat memuat:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Load failed due to missing dependencies:"
-msgstr "Scene gagal dimuat disebabkan oleh dependensi yang hilang:"
+msgstr "Gagal dimuat disebabkan oleh dependensi yang hilang:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Open Anyway"
@@ -881,8 +938,8 @@ msgstr "Hapus file yang dipilih?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Hapus"
@@ -991,7 +1048,6 @@ msgid "Uncompressing Assets"
msgstr "Membuka Aset Terkompresi"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Package installed successfully!"
msgstr "Paket Sukses Terpasang!"
@@ -1099,7 +1155,6 @@ msgid "Master bus can't be deleted!"
msgstr "Master Bus tidak dapat dihapus!"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Audio Bus"
msgstr "Hapus Bus Audio"
@@ -1140,8 +1195,8 @@ msgid "Add Bus"
msgstr "Tambahkan Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Buat Layout Bus Baru."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Tambah Bus Audio baru ke layout ini."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1169,6 +1224,10 @@ msgstr "Muat Default"
msgid "Load the default Bus Layout."
msgstr "Muat default Layout Bus."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Buat Layout Bus Baru."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nama tidak sah."
@@ -1308,24 +1367,52 @@ msgstr "Menyimpan File:"
#: editor/editor_export.cpp
msgid "No export template found at the expected path:"
-msgstr ""
+msgstr "Templat ekspor tidak ditemukan di tempat yg diharapkan:"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "Mengemas"
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"Platform target membutuhkan kompressi tekstur 'ETC' untuk GLES2. Aktifkan "
+"dukungan di Pengaturan Proyek."
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"Platform target membutuhkan kompressi tekstur 'ETC' untuk GLES2. Aktifkan "
+"dukungan di Pengaturan Proyek."
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"Platform target membutuhkan kompressi tekstur 'ETC' untuk GLES2. Aktifkan "
+"dukungan di Pengaturan Proyek."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom debug template not found."
-msgstr "Templat berkas tidak ditemukan:"
+msgstr "Debug template kustom tidak ditemukan."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
-msgstr ""
+msgstr "Templat rilis kustom tidak ditemukan."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
@@ -1340,9 +1427,8 @@ msgid "File Exists, Overwrite?"
msgstr "File telah ada, Overwrite?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Select This Folder"
-msgstr "Pilih Folder ini"
+msgstr "Pilih Folder Ini"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "Copy Path"
@@ -1354,7 +1440,6 @@ msgstr "Tampilkan di Pengelola Berkas"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
#: editor/project_manager.cpp
-#, fuzzy
msgid "Show in File Manager"
msgstr "Tampilkan di Manajer Berkas"
@@ -1362,7 +1447,7 @@ msgstr "Tampilkan di Manajer Berkas"
msgid "New Folder..."
msgstr "Buat Direktori..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Segarkan"
@@ -1437,10 +1522,35 @@ msgstr "Pindahkan Favorit Keatas"
msgid "Move Favorite Down"
msgstr "Pindahkan Favorit Kebawah"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Tab sebelumnya"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Buat Folder"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Pergi ke direktori induk"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Tidak dapat membuat folder."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Tampilkan item sebagai grid thumbnail"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Tampilkan item sebagai daftar"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Direktori-direktori & File-file:"
@@ -1499,19 +1609,16 @@ msgid "Methods"
msgstr "Fungsi"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods:"
-msgstr "Fungsi"
+msgstr "Metode-metode:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Theme Properties"
-msgstr "Properti Objek"
+msgstr "Properti-properti Tema"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Theme Properties:"
-msgstr "Properti Objek"
+msgstr "Properti-properti Tema:"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Signals:"
@@ -1538,14 +1645,12 @@ msgid "Constants:"
msgstr "Konstanta:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Class Description"
-msgstr "Deskripsi"
+msgstr "Deskripsi Kelas"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Class Description:"
-msgstr "Deskripsi:"
+msgstr "Deskripsi Kelas:"
#: editor/editor_help.cpp
msgid "Online Tutorials:"
@@ -1562,14 +1667,12 @@ msgstr ""
"$url2]memberikan usulan[/url][/color]."
#: editor/editor_help.cpp
-#, fuzzy
msgid "Property Descriptions"
-msgstr "Deskripsi Properti Objek:"
+msgstr "Deskripsi Properti"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Property Descriptions:"
-msgstr "Deskripsi Properti Objek:"
+msgstr "Deskripsi Properti:"
#: editor/editor_help.cpp
msgid ""
@@ -1580,12 +1683,10 @@ msgstr ""
"dengan[color=$color][url=$url]kontribusi[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Method Descriptions"
-msgstr "Deskripsi Metode:"
+msgstr "Deskripsi Metode"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Method Descriptions:"
msgstr "Deskripsi Metode:"
@@ -1603,24 +1704,20 @@ msgid "Search Help"
msgstr "Mencari Bantuan"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Display All"
-msgstr "Ganti Semua"
+msgstr "Tampilkan Semua"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Classes Only"
-msgstr "Kelas"
+msgstr "Hanya Kelas"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Methods Only"
-msgstr "Fungsi"
+msgstr "Hanya Fungsi"
#: editor/editor_help_search.cpp
-#, fuzzy
msgid "Signals Only"
-msgstr "Sinyal-sinyal"
+msgstr "Hanya Sinyal"
#: editor/editor_help_search.cpp
msgid "Constants Only"
@@ -1676,9 +1773,9 @@ msgstr "Bersihkan Luaran"
msgid "Project export failed with error code %d."
msgstr "Ekspor proyek gagal dengan kode kesalahan% d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Error menyimpan resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1686,6 +1783,16 @@ msgid "OK"
msgstr "Oke"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Error menyimpan resource!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Simpan Resource Sebagai..."
@@ -1908,6 +2015,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "Simpan perubahan '%s' sebelum tutup?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Tersimpan %s resource berubah."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Node akar diperlukan untuk menyimpan scene."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Simpan Scene Sebagai..."
@@ -2015,12 +2130,12 @@ msgid "Unable to load addon script from path: '%s'."
msgstr "Tidak bisa memuat script addon dari lokasi: '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"Unable to load addon script from path: '%s' There seems to be an error in "
"the code, please check the syntax."
msgstr ""
-"Tidak dapat memuat addon script dari jalur: '%s' Script tidak pada mode tool."
+"Tidak dapat memuat script addon dari path: '%s' Mungkin ada kesalahan dalam "
+"kode, mohon periksa sintaks."
#: editor/editor_node.cpp
msgid ""
@@ -2073,19 +2188,16 @@ msgstr "Bawaan"
#: editor/editor_node.cpp editor/editor_properties.cpp
#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Show in FileSystem"
-msgstr "Tampilkan dalam Manajer Berkas"
+msgstr "Tampilkan dalam FileSystem"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Play This Scene"
-msgstr "Mainkan Scene"
+msgstr "Mainkan Scene Ini"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Close Tab"
-msgstr "Tutup"
+msgstr "Tutup Tab"
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
@@ -2112,9 +2224,8 @@ msgid "Distraction Free Mode"
msgstr "Mode Tanpa Gangguan"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Toggle distraction-free mode."
-msgstr "Mode Tanpa Gangguan"
+msgstr "Toggle mode tanpa gangguan."
#: editor/editor_node.cpp
msgid "Add a new scene."
@@ -2161,9 +2272,8 @@ msgid "Save Scene"
msgstr "Simpan Scene"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save All Scenes"
-msgstr "Simpan semua Scene"
+msgstr "Simpan Semua Scene"
#: editor/editor_node.cpp
msgid "Close Scene"
@@ -2217,7 +2327,7 @@ msgstr "Ekspor"
#: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp
msgid "Tools"
-msgstr "Alat"
+msgstr "Alat-alat"
#: editor/editor_node.cpp
#, fuzzy
@@ -2247,7 +2357,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Small Deploy with Network FS"
-msgstr "Deploy kecil dengan jaringan FS"
+msgstr "Deploy Kecil dengan Jaringan FS"
#: editor/editor_node.cpp
msgid ""
@@ -2266,7 +2376,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr "Collision Shapes terlihat"
+msgstr "Collision Shapes Terlihat"
#: editor/editor_node.cpp
msgid ""
@@ -2278,7 +2388,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Navigation"
-msgstr "Navigasi terlihat"
+msgstr "Navigasi Terlihat"
#: editor/editor_node.cpp
msgid ""
@@ -2290,7 +2400,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Sync Scene Changes"
-msgstr "Sinkronasi Perubahan Scene"
+msgstr "Sinkronkan Perubahan Scene"
#: editor/editor_node.cpp
msgid ""
@@ -2306,7 +2416,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Sync Script Changes"
-msgstr "Sinkronasi Perubahan Script"
+msgstr "Sinkronkan Perubahan Script"
#: editor/editor_node.cpp
msgid ""
@@ -2437,7 +2547,8 @@ msgid "Save & Restart"
msgstr "Simpan & Keluar"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Putar ketika jendela editor cat ulang!"
#: editor/editor_node.cpp
@@ -2548,7 +2659,7 @@ msgstr "Buat Pratinjau Mesh"
#: editor/editor_plugin.cpp
msgid "Thumbnail..."
-msgstr "Thumbnail..."
+msgstr "Gambar Kecil..."
#: editor/editor_plugin_settings.cpp
#, fuzzy
@@ -2682,6 +2793,10 @@ msgid ""
"Please switch on the 'local to scene' property on it (and all resources "
"containing it up to a node)."
msgstr ""
+"Tidak dapat membuat ViewportTexture karena resource ini tidak dibuat lokal "
+"untuk scene.\n"
+"Mohon ubah properti 'lokal untuk scene' resource ini (dan semua resource "
+"yang memuatnya sampai satu node ke atas)."
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Pick a Viewport"
@@ -3016,16 +3131,6 @@ msgstr ""
"'%s' tidak bisa ditelusuri karena tidak bisa ditemukan dalam berkas sistem!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Tampilkan item sebagai grid thumbnail"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Tampilkan item sebagai daftar"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Status: Gagal mengimpor berkas. Mohon perbaiki berkas dan impor ulang secara "
@@ -3089,7 +3194,7 @@ msgstr "Buka Scene"
#: editor/filesystem_dock.cpp
msgid "Instance"
-msgstr "Instance"
+msgstr "Instansi"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -3171,10 +3276,6 @@ msgid "Search files"
msgstr "Cari Kelas"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instance scene terpilih sebagai anak node saat ini."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3269,7 +3370,7 @@ msgstr "Nama tidak sah."
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
-msgstr "Grup"
+msgstr "Kelompok"
#: editor/groups_editor.cpp
#, fuzzy
@@ -3354,7 +3455,7 @@ msgstr "Membuat Pemetaan Cahaya"
#: editor/import/resource_importer_scene.cpp
msgid "Generating for Mesh: "
-msgstr "Menghasilkan untuk Mesh:"
+msgstr "Menghasilkan untuk Mesh: "
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -3402,7 +3503,7 @@ msgstr "Impor ulang"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Simpan scene-scene, impor ulang dan mulai ulang"
#: editor/import_dock.cpp
#, fuzzy
@@ -3413,6 +3514,8 @@ msgstr "Mengubah driver video harus memulai ulang editor."
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"PERINGATAN: Ada aset-aset yang menggunakan resource ini, mereka mungkin akan "
+"berhenti untuk termuat secara sempurna."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3546,25 +3649,6 @@ msgid "Create Polygon"
msgstr "Buat Bidang"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Sunting Bidang"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Tambah Titik"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Sunting Bidang (Hapus Titik)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Hapus Bidang dan Titik"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3589,6 +3673,25 @@ msgstr ""
msgid "Erase points."
msgstr "Beri Skala Seleksi"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Sunting Bidang"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Tambah Titik"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Sunting Bidang (Hapus Titik)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Hapus Bidang dan Titik"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3607,12 +3710,49 @@ msgstr "Muat"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Hapus Sinyal"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Ubah Waktu Blend"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Ubah Waktu Blend"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr "Node tipe ini tidak dapat digunakan. Hanya node utama yang diijinkan."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Tambahkan Node"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Tambah Animasi"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Hapus Bidang dan Titik"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "Pindahkan Titik Node BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3657,6 +3797,31 @@ msgid "Triangle already exists"
msgstr "KESALAHAN: Nama animasi sudah ada!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Tambahkan Variabel"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Ubah Waktu Blend"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Ubah Waktu Blend"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Hapus Bidang dan Titik"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Hapus Variabel"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D tidak dimiliki oleh sebuah node AnimationTree."
@@ -3665,6 +3830,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Tidak ada segi tiga, pembauran tidak di terapkan."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Beralih AutoLoad Globals"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Buat segi tiga dengan menghubungkan titik-titik."
@@ -3679,7 +3849,12 @@ msgstr "Buat segi tiga pembauran secara otomatis (sebagai ganti cara manual)"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend:"
-msgstr ""
+msgstr "Campur:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Menyimpan perubahan-perubahan lokal..."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -3689,7 +3864,18 @@ msgstr "Sunting Filter"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Output node can't be added to the blend tree."
-msgstr ""
+msgstr "Node keluaran tidak bisa ditambahkan ke pohon campur."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Tambahkan Node (Node-node) dari Tree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Nama Node:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -3698,6 +3884,39 @@ msgstr ""
"Tidak dapat terhubung, port mungkin sedang digunakan atau hubungan tidak sah."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Terhubung"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Terputus"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animasi"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Metode Publik:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Alihkan track ini ke nyala/mati."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Ganti Ukuran Kamera"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Tidak ada pemutar animasi disetel, jadi tidak bisa mendapatkan nama track."
@@ -3717,6 +3936,12 @@ msgstr ""
"nama track."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nama Node:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3898,11 +4123,11 @@ msgstr "Tempel"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Future"
-msgstr ""
+msgstr "Masa depan"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Depth"
-msgstr ""
+msgstr "Kedalaman"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "1 step"
@@ -3961,6 +4186,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Waktu Berbaur Animasi-silang"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Salin Resource"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Transisi"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Tambahkan Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Akhir"
@@ -3990,6 +4230,20 @@ msgid "No playback resource set at path: %s."
msgstr "Tidak didalam path resource."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Dihapus:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Node Transisi"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Tetapkan Node Awalan (Mulai sendiri)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4128,19 +4382,19 @@ msgstr "Node sekali tembak"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Mix Node"
-msgstr ""
+msgstr "Aduk Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend2 Node"
-msgstr ""
+msgstr "Campur 2 Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend3 Node"
-msgstr ""
+msgstr "Campur 3 Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend4 Node"
-msgstr ""
+msgstr "Campur 4 Node"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeScale Node"
@@ -4332,10 +4586,12 @@ msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
msgstr ""
+"Tidak ada mesh-mesh untuk di bake. Pastikan mereka punya kanal UV2 dan 'Bake "
+"Cahaya' menyala."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
-msgstr ""
+msgstr "Gagal membuat gambar lightmap, pastikan path dapat ditulis."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
#, fuzzy
@@ -4353,23 +4609,23 @@ msgstr "Atur Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Offset:"
-msgstr ""
+msgstr "Offset Kotak-kotak:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Step:"
-msgstr ""
+msgstr "Jangkah Kotak-kotak:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
-msgstr ""
+msgstr "Offset Perputaran:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Step:"
-msgstr ""
+msgstr "Jangkah Perputaran:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move vertical guide"
-msgstr ""
+msgstr "Pindahkan garis-bantu vertikal"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4383,7 +4639,7 @@ msgstr "Hapus Variabel"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move horizontal guide"
-msgstr ""
+msgstr "Pindahkan garis-bantu horisontal"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4397,7 +4653,7 @@ msgstr "Hapus Tombol-tombol yang tidak sah"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Create new horizontal and vertical guides"
-msgstr ""
+msgstr "Buat garis-bantu vertikal dan horisontal baru"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4411,7 +4667,7 @@ msgstr "Sunting CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move anchor"
-msgstr ""
+msgstr "Pindahkan jangkar"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4429,26 +4685,40 @@ msgid "Move CanvasItem"
msgstr "Sunting CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Anchors only"
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Preset-preset untuk nilai jangkar dan pinggiran node Control."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
msgstr ""
+"Nilai jangkar dan pinggiran milik anak dari sebuah kontainer akan di timpa "
+"dengan milik orang-tua nya."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Anchors only"
+msgstr "Hanya jangkar-jangkar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors and Margins"
-msgstr ""
+msgstr "Ubah jangkar-jangkar dan pinggiran"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
-msgstr ""
+msgstr "Ubah Jangkar-jangkar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Paste Pose"
-msgstr ""
+msgstr "Tempel Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Warning: Children of a container get their position and size determined only "
"by their parent."
msgstr ""
+"Peringatan: Posisi milik anak dari sebuah kontainer ditentukan oleh orang-"
+"tua nya."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
@@ -4459,31 +4729,32 @@ msgstr "Perkecil Pandangan"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Select Mode"
-msgstr ""
+msgstr "Mode Seleksi"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
-msgstr ""
+msgstr "Geser: Putar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Alt+Drag: Move"
-msgstr ""
+msgstr "Alt+Geser: Pindah"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)."
msgstr ""
+"Tekan 'v' untuk Ganti Pivot, 'Shift+v' untuk Geser Pivot (ketika bergerak)."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Alt+RMB: Depth list selection"
-msgstr ""
+msgstr "Alt+Klik kanan: Daftar seleksi kedalaman"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move Mode"
-msgstr ""
+msgstr "Mode Pindah"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotate Mode"
-msgstr ""
+msgstr "Mode Putar"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4496,14 +4767,16 @@ msgid ""
"Show a list of all objects at the position clicked\n"
"(same as Alt+RMB in select mode)."
msgstr ""
+"Tampilkan semua objek dalam posisi klik ke sebuah daftar\n"
+"(sama seperti Alt+Klik kanan dalam mode seleksi)."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Click to change object's rotation pivot."
-msgstr ""
+msgstr "Klik untuk mengubah pivot perputaran objek."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Pan Mode"
-msgstr ""
+msgstr "Mode Geser Pandangan"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4512,78 +4785,78 @@ msgstr "Beralih Breakpoint"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Snap"
-msgstr ""
+msgstr "Gunakan Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snapping Options"
-msgstr ""
+msgstr "Opsi-opsi Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to grid"
-msgstr ""
+msgstr "Snap ke kotak-kotak"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
-msgstr ""
+msgstr "Gunakan Snap Rotasi"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Configure Snap..."
-msgstr ""
+msgstr "Atur Snap..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
-msgstr ""
+msgstr "Snap Relatif"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Pixel Snap"
-msgstr ""
+msgstr "Gunakan Snap Piksel"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Smart snapping"
-msgstr ""
+msgstr "Snap pintar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to parent"
-msgstr ""
+msgstr "Snap ke orang-tua"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node anchor"
-msgstr ""
+msgstr "Snap ke jangkar node"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node sides"
-msgstr ""
+msgstr "Snap ke sisi-sisi node"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node center"
-msgstr ""
+msgstr "Snap ke tengah node"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to other nodes"
-msgstr ""
+msgstr "Snape ke node-node lain"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to guides"
-msgstr ""
+msgstr "Snape ke garis-bantu"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
-msgstr ""
+msgstr "Kunci objek terpilih di tempat (tidak dapat di pindah)."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unlock the selected object (can be moved)."
-msgstr ""
+msgstr "Buka kunci objek terpilih (dapat di pindah)."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Makes sure the object's children are not selectable."
-msgstr ""
+msgstr "Pastikan anak-anak objek tidak dapat diseleksi."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Restores the object's children's ability to be selected."
-msgstr ""
+msgstr "Jadikan anak-anak object dapat di seleksi kembali."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4592,19 +4865,19 @@ msgstr "Singleton"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Bones"
-msgstr ""
+msgstr "Tampilkan Tulang-tulang"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Make IK Chain"
-msgstr ""
+msgstr "Buat Rantai IK"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear IK Chain"
-msgstr ""
+msgstr "Bersihkan Rantai IK"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Make Custom Bone(s) from Node(s)"
-msgstr ""
+msgstr "Buat Tulang Kustom(satu/lebih) dari Node(satu/lebih)"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -4614,36 +4887,36 @@ msgstr "Mainkan Custom Scene"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View"
-msgstr ""
+msgstr "Pandangan"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Show Grid"
-msgstr ""
+msgstr "Tampilkan Kotak-kotak"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Helpers"
-msgstr ""
+msgstr "Tampilkan Bantuan-bantuan"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Rulers"
-msgstr ""
+msgstr "Tampilkan Penggaris-penggaris"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Guides"
-msgstr ""
+msgstr "Tampilkan Garis-bantu"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Origin"
-msgstr ""
+msgstr "Tampilkan Pangkal"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Viewport"
-msgstr ""
+msgstr "Tampilkan Viewport"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Group And Lock Icons"
-msgstr ""
+msgstr "Tampilkan Ikon Kunci Dan Grup"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -4823,6 +5096,10 @@ msgstr "Tahan Shift untuk menyunting tangen kurva satu-persatu"
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -5082,6 +5359,10 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
@@ -5094,10 +5375,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr ""
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr ""
@@ -5186,11 +5463,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5351,6 +5628,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Buat Bidang"
@@ -6014,6 +6297,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Mainkan Custom Scene"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Singleton"
@@ -6128,10 +6420,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Tampilan Atas."
@@ -6176,8 +6464,9 @@ msgid "Rear"
msgstr "Belakang"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr ""
+#, fuzzy
+msgid "Align with View"
+msgstr "Tampilan Kanan."
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6275,6 +6564,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6283,6 +6578,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "Metode Publik:"
@@ -6499,7 +6798,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6567,10 +6866,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6579,8 +6874,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Animasi"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animasi"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6591,8 +6892,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Nama Animasi:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6895,6 +7197,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Tab sebelumnya"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6910,6 +7229,11 @@ msgstr "Beri Skala Seleksi"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Buat Baru %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Buat Bidang"
@@ -7046,6 +7370,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Buat Bidang"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Hapus Templat"
@@ -7095,6 +7428,28 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Jadikan Baku untuk '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplikat Key"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7112,6 +7467,16 @@ msgstr "Kanan"
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Sunting Filter"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Ubah"
+
#: editor/project_export.cpp
#, fuzzy
msgid "Runnable"
@@ -7128,7 +7493,16 @@ msgid "Delete preset '%s'?"
msgstr "Hapus file yang dipilih?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7141,6 +7515,15 @@ msgid "Exporting All"
msgstr "Mengekspor untuk %s"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "File tidak ada."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7431,6 +7814,19 @@ msgstr "Apakah Anda yakin membuka lebih dari satu projek?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8158,6 +8554,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Simpan Scene"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8193,6 +8594,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Simpan Scene"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Buat Folder"
@@ -8632,6 +9038,19 @@ msgid "Set From Tree"
msgstr "Menyetel Dari Keturunan"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Beri Skala Seleksi"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8855,6 +9274,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Duplikat Pilihan"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -9000,10 +9423,6 @@ msgid "Build Project"
msgstr "Proyek"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "File:"
@@ -9176,10 +9595,6 @@ msgid "Change Expression"
msgstr "Ubah Pernyataan"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Tambahkan Node"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove VisualScript Nodes"
msgstr "Hapus Tombol-tombol yang tidak sah"
@@ -9272,6 +9687,11 @@ msgid "Change Input Value"
msgstr "Ubah Nilai Array"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Sunting CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9703,6 +10123,13 @@ msgstr ""
"Node ParallaxLayer hanya bekerja ketika diatur sebagai child dari sebuah "
"node ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9847,6 +10274,12 @@ msgstr ""
"Sebuah bentuk harus disediakan untuk CollisionShape untuk fungsi. Mohon "
"ciptakan sebuah resource bentuk untuk itu!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9861,6 +10294,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9877,6 +10316,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9913,23 +10359,6 @@ msgstr ""
"Properti path harus menunjuk ke sebuah node Particles2D yang sah agar "
"bekerja."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Hanya satu WorldEnvironment yang diizinkan per scene (atau atur scene-scene "
-"yang diacu)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9955,6 +10384,23 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Hanya satu WorldEnvironment yang diizinkan per scene (atau atur scene-scene "
+"yang diacu)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -10000,13 +10446,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Tambahkan warna yang sekarang sebagai preset"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Peringatan!"
@@ -10015,6 +10478,11 @@ msgstr "Peringatan!"
msgid "Please Confirm..."
msgstr "Mohon konfirmasi..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Pergi ke direktori induk"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10100,6 +10568,22 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Instance scene terpilih sebagai anak node saat ini."
+
+#~ msgid "Warnings:"
+#~ msgstr "Peringatan:"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Tampilan Depan."
+
+#~ msgid "Line:"
+#~ msgstr "Baris:"
+
+#~ msgid "Col:"
+#~ msgstr "Kolom:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
@@ -10264,9 +10748,6 @@ msgstr ""
#~ msgid "Change Anim Len"
#~ msgstr "Ubah Panjang Animasi"
-#~ msgid "Change Anim Loop"
-#~ msgstr "Ubah Perulangan Animasi"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "Buat Nilai Kunci Animasi Tertulis"
@@ -10474,9 +10955,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "Ditambahkan:"
-#~ msgid "Removed:"
-#~ msgstr "Dihapus:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Tidak dapat menyimpan sub tekstur atlas:"
diff --git a/editor/translations/is.po b/editor/translations/is.po
index 0f42409c0d..1bc85f8a2f 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -84,6 +84,14 @@ msgstr "Afrita val"
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Tvíteknir lyklar"
@@ -118,6 +126,15 @@ msgid "Anim Change Call"
msgstr "Útkall breyting símtal"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -168,6 +185,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -193,6 +214,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Continuous"
msgstr "Samfellt"
@@ -248,6 +273,19 @@ msgid "Delete Key(s)"
msgstr "Anim DELETE-lyklar"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Breytingar á Anim track"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Remove Anim Track"
msgstr "Fjarlægja Anim track"
@@ -290,6 +328,15 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Anim breyting umskipti"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -314,6 +361,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Anim bæta við lag"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -322,10 +374,24 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Anim bæta við lag"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim bæta við lag"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -339,6 +405,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -381,10 +451,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Scale Selection"
msgstr "Val á kvarða"
@@ -488,6 +554,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Anim bæta við lag"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -552,20 +631,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -859,8 +930,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1112,7 +1183,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1141,6 +1212,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1284,6 +1359,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1330,7 +1425,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1405,10 +1500,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1624,8 +1739,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1634,6 +1749,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1825,6 +1950,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2313,7 +2446,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2861,14 +2994,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3005,10 +3130,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3352,38 +3473,38 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Breyta Viðbót"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
+msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr ""
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Breyta Viðbót"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3403,12 +3524,44 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Stillið breyting á:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3448,6 +3601,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Anim bæta við lag"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3456,6 +3630,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3473,6 +3651,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3482,11 +3664,49 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Stillið breyting á:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Anim DELETE-lyklar"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3502,6 +3722,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3728,6 +3953,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Hreyfa Viðbótar Lykil"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Stillið breyting á:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3756,6 +3996,19 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Stillið breyting á:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4169,6 +4422,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4546,6 +4809,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4802,19 +5069,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4905,11 +5172,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5065,6 +5332,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5680,6 +5953,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5788,10 +6069,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5836,7 +6113,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5928,6 +6205,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5936,6 +6219,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6148,7 +6435,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6212,10 +6499,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6224,7 +6507,12 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
+msgstr "Stillið breyting á:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6236,7 +6524,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6529,6 +6817,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6541,6 +6845,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6670,6 +6978,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Fjarlægja val"
@@ -6711,6 +7027,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Tvíteknir lyklar"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6726,6 +7063,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6739,7 +7084,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6751,6 +7105,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7024,6 +7386,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7718,6 +8093,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7752,6 +8131,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8164,6 +8547,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8369,6 +8764,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8506,10 +8905,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8668,10 +9063,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8752,6 +9143,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9135,6 +9530,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9264,6 +9666,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9278,6 +9686,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9290,6 +9704,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9320,21 +9741,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9358,6 +9764,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9399,11 +9820,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9414,6 +9851,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9503,10 +9944,6 @@ msgstr ""
#~ msgstr "Færa Anim track niður"
#, fuzzy
-#~ msgid "Anim Track Change Interpolation"
-#~ msgstr "Breytingar á Anim track"
-
-#, fuzzy
#~ msgid "Anim Track Change Value Mode"
#~ msgstr "Breyta gildisstilling í Anim track"
@@ -9517,6 +9954,3 @@ msgstr ""
#, fuzzy
#~ msgid "Anim Add Key"
#~ msgstr "Anim bæta við lykli"
-
-#~ msgid "Move Add Key"
-#~ msgstr "Hreyfa Viðbótar Lykil"
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 693e07ba94..a3b8481d30 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -12,7 +12,7 @@
# Matteo <matteo.guglielmetti@hotmail.it>, 2018.
# Myself <whatamidoing.wt@gmail.com>, 2017-2018.
# RealAquilus <JamesHeller@live.it>, 2017.
-# Samuele Zolfanelli <samdazel@gmail.com>, 2018.
+# Samuele Zolfanelli <samdazel@gmail.com>, 2018, 2019.
# Sean Bone <seanbone@zumguy.com>, 2017.
# Red Pill <redpill902@gmail.com>, 2018.
# iRadEntertainment <devitadario@gmail.com>, 2018.
@@ -27,12 +27,13 @@
# Hairic95 <hairic95@gmail.com>, 2019.
# Christian Biffi <creixx@virgilio.it>, 2019.
# Giuseppe Guerra <me@nyodev.xyz>, 2019.
+# RHC <rhc.throwaway@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 13:31+0000\n"
-"Last-Translator: Giuseppe Guerra <me@nyodev.xyz>\n"
+"PO-Revision-Date: 2019-02-18 08:54+0000\n"
+"Last-Translator: RHC <rhc.throwaway@gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
"Language: it\n"
@@ -66,7 +67,7 @@ msgstr "self non può essere usato perché l'istanza è nulla (non passata)"
#: core/math/expression.cpp
#, fuzzy
msgid "Invalid operands to operator %s, %s and %s."
-msgstr "Nome proprietà indice invalido '%s' nel nodo %s."
+msgstr "Utilizzo errato dell'operatore %s, operandi %s e %s non validi."
#: core/math/expression.cpp
#, fuzzy
@@ -110,6 +111,16 @@ msgstr "Duplicare la(e) chiave selezionata(e)"
msgid "Delete Selected Key(s)"
msgstr "Eliminare la(e) Chiave(i) Selezionata(e)"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Aggiungi punto"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Sposta Punto"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Duplica Key Animazione"
@@ -140,6 +151,16 @@ msgstr "Anim Cambia Chiamata"
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Animation Length"
+msgstr "Cambia Loop Animazione"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Cambia Loop Animazione"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Property Track"
msgstr "Proprietà:"
@@ -157,8 +178,9 @@ msgid "Bezier Curve Track"
msgstr "Traccia Curva di Bezier"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Audio Playback Track"
-msgstr ""
+msgstr "Traccia di Riproduzione Audio"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -193,12 +215,18 @@ msgid "Anim Clips:"
msgstr "Clips"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Cambia Valore Array"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Attiva/Disattiva la traccia."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Modalità di Aggiornamento (come viene impostata questa proprietà)"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -218,6 +246,11 @@ msgid "Time (s): "
msgstr "Tempo (s): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Abilita Doppler"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Continuo"
@@ -272,6 +305,21 @@ msgid "Delete Key(s)"
msgstr "Elimina Nodo(i)"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Cambia Nome Animazione:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Nodo Animazione"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Cambia Loop Animazione"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Rimuovi Traccia Animazione"
@@ -313,6 +361,16 @@ msgid "Anim Insert Key"
msgstr "Anim Inserisci Key"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Cambia FPS ANimazione"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Riordina gli Autoload"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -323,6 +381,10 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"Le tracce audio possono puntare solo a nodi di tipo:\n"
+"-AudioStreamPlayer\n"
+"-AudioStreamPlayer2D\n"
+"-AudioStreamPlayer3D"
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
@@ -337,12 +399,29 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Aggiungi Traccia"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track path is invalid, so can't add a key."
-msgstr ""
+msgstr "Il tracciato non è valido, non è possibile aggiungere una chiave."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
+msgstr "La traccia non è di tipo Spatial, impossibile aggiungere la chiave."
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Trasformazione 3D"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Aggiungi Traccia"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
@@ -350,6 +429,11 @@ msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim Inserisci Traccia e Key"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
msgstr "Metodo non trovato nell'oggetto: "
@@ -363,6 +447,11 @@ msgid "Clipboard is empty"
msgstr "Gli appunti sono vuoti"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Incolla Parametri"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Scala Key"
@@ -408,11 +497,6 @@ msgid "Copy Tracks"
msgstr "Copia parametri"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Incolla Parametri"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Scala Selezione"
@@ -512,6 +596,19 @@ msgstr ""
msgid "Copy"
msgstr "Copia"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Audio Listener"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Ridimensiona Array"
@@ -576,22 +673,14 @@ msgstr "Zoom Out"
msgid "Reset Zoom"
msgstr "Resetta Zoom"
-#: editor/code_editor.cpp
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
-msgid "Warnings:"
+msgid "Warnings"
msgstr "Avvertimento"
#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Dimensione Font:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Riga:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Col:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -897,8 +986,8 @@ msgstr "Eliminare i file selezionati?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Elimina"
@@ -1155,8 +1244,9 @@ msgid "Add Bus"
msgstr "Aggiungi Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Crea nuovo layout di tipo bus."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Salva Layout Bus Audio Come..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1184,6 +1274,10 @@ msgstr "Carica predefiniti"
msgid "Load the default Bus Layout."
msgstr "Carica il layout di tipo bus predefinito."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Crea nuovo layout di tipo bus."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nome Invalido."
@@ -1336,6 +1430,26 @@ msgstr ""
msgid "Packing"
msgstr "Impacchettando"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1384,7 +1498,7 @@ msgstr "Mostra nel File Manager"
msgid "New Folder..."
msgstr "Nuova Cartella..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Aggiorna"
@@ -1459,10 +1573,35 @@ msgstr "Sposta Preferito Su"
msgid "Move Favorite Down"
msgstr "Sposta Preferito Giù"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Scheda precedente"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Prossimo Piano"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Vai nella cartella padre"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Impossibile creare cartella."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Visualizza elementi come una griglia di miniature"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Visualizza elementi come una lista"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Directory e File:"
@@ -1686,9 +1825,10 @@ msgstr "Svuota output"
msgid "Project export failed with error code %d."
msgstr "Esportazione progetto fallita con codice di errore %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Errore salvando la Risorsa!"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Imported resources can't be saved."
+msgstr "Risorse Importate"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1696,6 +1836,16 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Errore salvando la Risorsa!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Salva Risorsa Come..."
@@ -1918,6 +2068,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "Salvare le modifiche a '%s' prima di chiudere?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Caricamento della risorsa fallito."
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "Solo un file è richiesto per una texture grande."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Salva Scena Come..."
@@ -2445,7 +2605,8 @@ msgid "Save & Restart"
msgstr "Salva e Re-Importa"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Gira quando la finestra dell'editor viene ridisegnata!"
#: editor/editor_node.cpp
@@ -3019,16 +3180,6 @@ msgstr ""
"Impossibile navigare a '%s' perché non è stato trovato nel file system!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Visualizza elementi come una griglia di miniature"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Visualizza elementi come una lista"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Stato: Importazione file fallita. Si prega di riparare il file e "
@@ -3174,10 +3325,6 @@ msgid "Search files"
msgstr "Cerca Classi"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Istanzia le scene selezionate come figlie del nodo selezionato."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3549,25 +3696,6 @@ msgid "Create Polygon"
msgstr "Crea Poly"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Modifica Poly"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Inserisci Punto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Modifica Poly (Rimuovi Punto)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Rimuovi Poligono e Punto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3592,6 +3720,25 @@ msgstr ""
msgid "Erase points."
msgstr "RMB: Elimina Punto."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Modifica Poly"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Inserisci Punto"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Modifica Poly (Rimuovi Punto)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Rimuovi Poligono e Punto"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3610,12 +3757,49 @@ msgstr "Carica"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Sposta Punto"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Cambia tempo di Blend"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Cambia tempo di Blend"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Aggiungi Nodo"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Aggiungi Animazione"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Rimuovi Punto Percorso"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3658,6 +3842,31 @@ msgid "Triangle already exists"
msgstr "L'Azione '%s' esiste già!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Aggiungi Variabile"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Cambia tempo di Blend"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Cambia tempo di Blend"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Rimuovi Punto Percorso"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Rimuovi Variabile"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3666,6 +3875,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Abilita AutoLoad Globals"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3684,6 +3898,11 @@ msgid "Blend:"
msgstr "Blend:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Cambiamenti dei Materiali"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Modifica Filtri"
@@ -3693,11 +3912,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Aggiungi Nodo(i) Da Albero"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Modalità Movimento"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Connesso"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Disconnesso"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animazione"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Elimina Nodo(i)"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Attiva/Disattiva la traccia."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Cambia tempo di Blend"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3713,6 +3976,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nome Nodo:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3951,6 +4220,21 @@ msgstr "Tempi di Blend Cross-Animation"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
+msgid "Move Node"
+msgstr "Modalità Movimento"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Aggiungi Traduzione"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Aggiungi Nodo"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "End"
msgstr "Fine(i)"
@@ -3980,6 +4264,20 @@ msgid "No playback resource set at path: %s."
msgstr "Non è nel percorso risorse."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Rimosso:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Nodo Transizione"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4413,6 +4711,16 @@ msgid "Move CanvasItem"
msgstr "Modifica CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Solo ancore"
@@ -4812,6 +5120,10 @@ msgstr "Tenere Premuto Shift per modificare le tangenti singolarmente"
msgid "Bake GI Probe"
msgstr "Cuoci GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Elemento %d"
@@ -5073,6 +5385,10 @@ msgid "Generating Visibility Rect"
msgstr "Genera Rect Visibilità"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Genera Rect Visibilità"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"É solamente possibile impostare il punto in un materiale di processo "
@@ -5087,10 +5403,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Nessun pixel con trasparenza >128 nell'immagine..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Genera Rect Visibilità"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Carica Maschera Emissione"
@@ -5179,13 +5491,13 @@ msgid "Generating AABB"
msgstr "Generando AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Genera AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Genera Visibilità AABB"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Genera AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Rimuovi Punto da Curva"
@@ -5345,6 +5657,12 @@ msgid "Create UV Map"
msgstr "Crea UV Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Crea Poly"
@@ -6008,6 +6326,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Crea Punti Emissione Da Mesh"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Scheletro..."
@@ -6121,10 +6448,6 @@ msgid "Vertices"
msgstr "Vertici"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Vista dall'Alto."
@@ -6169,7 +6492,8 @@ msgid "Rear"
msgstr "Retro"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Allinea a vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6263,6 +6587,12 @@ msgid "Freelook Speed Modifier"
msgstr "Modificatore Velocità Vista Libera"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Visualizza Informazioni"
@@ -6272,6 +6602,11 @@ msgid "XForm Dialog"
msgstr "Finestra di XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Allinea alla griglia"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Modalità di Selezione (Q)"
@@ -6488,7 +6823,7 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6559,10 +6894,6 @@ msgid "Add Empty"
msgstr "Aggiungi vuoto"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Cambia Loop Animazione"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Cambia FPS ANimazione"
@@ -6571,10 +6902,16 @@ msgid "(empty)"
msgstr "(vuoto)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Animazioni"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animazione"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "Velocità (FPS):"
@@ -6583,7 +6920,8 @@ msgid "Loop"
msgstr "Loop"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Frames Animazione"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6887,6 +7225,24 @@ msgid "Merge from Scene"
msgstr "Unisci da Scena"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Prossimo Piano"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Scheda precedente"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6902,6 +7258,11 @@ msgstr "RMB: Elimina Punto."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Crea Nuovo %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Crea un nuovo poligono dal nulla."
@@ -7039,6 +7400,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Sposta Poligono"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Sposta Poligono"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Rimuovi Template"
@@ -7087,6 +7458,29 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Imposta come Default per '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplica Nodo(i)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "Vertici"
@@ -7105,6 +7499,16 @@ msgstr "Destra"
msgid "VisualShader"
msgstr "Shader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Modifica Filtri"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Cambiamenti delle Shader"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Eseguibile"
@@ -7119,9 +7523,17 @@ msgid "Delete preset '%s'?"
msgstr "Eliminare preset '%s'?"
#: editor/project_export.cpp
-#, fuzzy
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Le export templates per questa piattaforma sono mancanti:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
#, fuzzy
@@ -7134,6 +7546,16 @@ msgid "Exporting All"
msgstr "Esportando per %s"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "File non esistente."
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Le export templates per questa piattaforma sono mancanti:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Presets"
@@ -7433,6 +7855,19 @@ msgstr "Sei sicuro di voler aprire più di un progetto?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8171,6 +8606,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Nuova Scena di Root"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Elimina Nodo(i)?"
@@ -8206,6 +8646,11 @@ msgstr "Rendi Locale"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Nuova Scena di Root"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Crea Nodo"
@@ -8656,6 +9101,21 @@ msgid "Set From Tree"
msgstr "Imposta da Tree"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Ease Out"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "Scorciatoie"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Cambia Ancore"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Scorciatoie"
@@ -8882,6 +9342,11 @@ msgstr "Duplica Selezione"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
+msgid "GridMap Paint"
+msgstr "Impostazioni Snap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Grid Map"
msgstr "Snap Griglia"
@@ -9045,11 +9510,6 @@ msgstr "Progetto"
#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
-msgid "Warnings"
-msgstr "Avvertimento"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
-#, fuzzy
msgid "View log"
msgstr "Vedi Files"
@@ -9221,10 +9681,6 @@ msgid "Change Expression"
msgstr "Cambia Espressione"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Aggiungi Nodo"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove VisualScript Nodes"
msgstr "Rimuovi key invalidi"
@@ -9322,6 +9778,11 @@ msgstr "Cambia Nome Input"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Resize Comment"
+msgstr "Modifica CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Can't copy the function node."
msgstr "Non posso operare su '..'"
@@ -9765,6 +10226,13 @@ msgstr ""
"Il nodo ParallaxLayer funziona solamente quando impostato come figlio di un "
"nodo ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9922,6 +10390,12 @@ msgstr ""
"Perché CollisionShape funzioni deve essere fornita una forma. Si prega di "
"creare una risorsa forma (shape)!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
@@ -9938,6 +10412,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Bliting Immagini"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9954,6 +10434,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr "Nulla é visibile perché le mesh non sono state assegnate ai draw pass."
@@ -9992,23 +10479,6 @@ msgstr ""
"La proprietà path deve puntare ad un nodo Spaziale (Spatial) valido per "
"poter funzionare."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Solamente un WorldEnvironment è consentito per scena (o insieme di scene "
-"istanziate)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -10040,6 +10510,23 @@ msgstr ""
"VehicleWheel serve a provvedere un sistema di ruote a VehicleBody. Per "
"favore usalo come figlio di VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Solamente un WorldEnvironment è consentito per scena (o insieme di scene "
+"istanziate)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -10087,14 +10574,31 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
#, fuzzy
msgid "Raw Mode"
msgstr "Modalità di Pan"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Aggiungi colore attuale come preset"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Attenzione!"
@@ -10103,6 +10607,11 @@ msgstr "Attenzione!"
msgid "Please Confirm..."
msgstr "Per Favore Conferma..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Vai nella cartella padre"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10190,6 +10699,25 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Istanzia le scene selezionate come figlie del nodo selezionato."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#, fuzzy
+#~ msgid "Warnings:"
+#~ msgstr "Avvertimento"
+
+#~ msgid "Font Size:"
+#~ msgstr "Dimensione Font:"
+
+#~ msgid "Line:"
+#~ msgstr "Riga:"
+
+#~ msgid "Col:"
+#~ msgstr "Col:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
@@ -10351,10 +10879,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Converti In Minuscolo"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Allinea alla griglia"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Ruota a 0 gradi"
@@ -10895,9 +11419,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "Agginto:"
-#~ msgid "Removed:"
-#~ msgstr "Rimosso:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Impossibile salvare la substruttura dell'atlas:"
@@ -11169,9 +11690,6 @@ msgstr ""
#~ msgid "Error importing:"
#~ msgstr "Errore di importazione:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Solo un file è richiesto per una texture grande."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Dimensione Texture Massima:"
@@ -11733,9 +12251,6 @@ msgstr ""
#~ msgid "Cannot go into subdir:"
#~ msgstr "Impossibile accedere alla subdirectory:"
-#~ msgid "Imported Resources"
-#~ msgstr "Risorse Importate"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "Inserisci Keys (Ins)"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index 20966bda3a..63b562f74c 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -18,15 +18,16 @@
# sugusan <sugusan.development@gmail.com>, 2018.
# Nathan Lovato <nathan.lovato.art@gmail.com>, 2018.
# nyanode <akaruooyagi@yahoo.co.jp>, 2018.
-# nitenook <admin@alterbaum.net>, 2018.
+# nitenook <admin@alterbaum.net>, 2018, 2019.
# Rob Matych <robertsmatych@gmail.com>, 2018.
# Hidetsugu Takahashi <manzyun@gmail.com>, 2019.
+# Wataru Onuki <watonu@magadou.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-19 19:21+0000\n"
-"Last-Translator: Hidetsugu Takahashi <manzyun@gmail.com>\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
+"Last-Translator: Wataru Onuki <watonu@magadou.com>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
"Language: ja\n"
@@ -34,12 +35,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.4-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr "Convert()ã«å¯¾ã—ã¦ç„¡åйãªåž‹ã®å¼•æ•°ã§ã™ã€‚TYPE_ 定数を使ã£ã¦ãã ã•ã„。"
+msgstr "convert() ã®å¼•æ•°ã®åž‹ãŒç„¡åйã§ã™ã€‚TYPE_* 定数を使ã£ã¦ãã ã•ã„。"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -100,6 +101,14 @@ msgstr "é¸æŠžä¸­ã®ã‚­ãƒ¼ã‚’複製"
msgid "Delete Selected Key(s)"
msgstr "é¸æŠžä¸­ã®ã‚­ãƒ¼ã‚’削除"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "ベジェãƒã‚¤ãƒ³ãƒˆã‚’追加"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "ベジェãƒã‚¤ãƒ³ãƒˆã‚’移動"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "アニメーションã®ã‚­ãƒ¼ã‚’複製"
@@ -129,6 +138,15 @@ msgid "Anim Change Call"
msgstr "アニメーション呼出ã—ã®å¤‰æ›´"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "アニメーションã®é•·ã•を変更"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "アニメーションã®ãƒ«ãƒ¼ãƒ—を変更"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "プロパティトラック"
@@ -178,6 +196,11 @@ msgid "Anim Clips:"
msgstr "アニメーションクリップ:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "é…列ã®å€¤ã‚’変更"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "ã“ã®ãƒˆãƒ©ãƒƒã‚¯ã® オン/オフ を切り替ãˆã€‚"
@@ -202,6 +225,11 @@ msgid "Time (s): "
msgstr "時間 (秒): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "有効ã«ã™ã‚‹"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "継続的"
@@ -252,6 +280,21 @@ msgid "Delete Key(s)"
msgstr "キーを削除"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "アニメーションåを変更:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "補間モード"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "アニメーションã®ãƒ«ãƒ¼ãƒ—を変更"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "アニメーショントラックを除去"
@@ -295,6 +338,16 @@ msgid "Anim Insert Key"
msgstr "アニメーションキーを挿入"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "アニメーションã®FPSを変更"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "自動読込ã¿ã®ä¸¦ã¹æ›¿ãˆ"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "トランスフォームトラックã¯ç©ºé–“ベースã®ãƒŽãƒ¼ãƒ‰ã«ã®ã¿é©ç”¨ã•れã¾ã™ã€‚"
@@ -326,6 +379,11 @@ msgid "Not possible to add a new track without a root"
msgstr "root ãŒç„¡ã‘ã‚Œã°æ–°è¦ãƒˆãƒ©ãƒƒã‚¯ã¯è¿½åŠ ã§ãã¾ã›ã‚“"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "トラックを追加"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "トラックã®ãƒ‘スãŒç„¡åйãªãŸã‚ã€ã‚­ãƒ¼ã‚’追加ã§ãã¾ã›ã‚“。"
@@ -334,10 +392,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "トラック㌠spatial åž‹ã§ã¯ãªã„ãŸã‚ã€ã‚­ãƒ¼ã‚’挿入ã§ãã¾ã›ã‚“"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3Dトランスフォームトラック"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "トラックを追加"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "トラックã®ãƒ‘スãŒç„¡åйãªãŸã‚ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚­ãƒ¼ã‚’追加ã§ãã¾ã›ã‚“。"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "メソッド呼出ã—トラック"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "オブジェクトã«ãƒ¡ã‚½ãƒƒãƒ‰ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“: "
@@ -350,6 +423,10 @@ msgid "Clipboard is empty"
msgstr "クリップボードãŒç©ºã§ã™"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "トラックを貼り付ã‘"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚­ãƒ¼ã®æ‹¡ç¸®"
@@ -393,10 +470,6 @@ msgid "Copy Tracks"
msgstr "トラックをコピー"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "トラックを貼り付ã‘"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "スケールã®é¸æŠž"
@@ -474,7 +547,7 @@ msgstr "ã™ã¹ã¦ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’クリーンアップ"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation(s) (NO UNDO!)"
-msgstr "アニメーションをクリーンアップ(アンドゥä¸å¯ï¼ï¼‰"
+msgstr "ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ï¼ˆã€Œå…ƒã«æˆ»ã™ã€ä¸å¯!)"
#: editor/animation_track_editor.cpp
msgid "Clean-Up"
@@ -496,6 +569,19 @@ msgstr "コピーã™ã‚‹ãƒˆãƒ©ãƒƒã‚¯ã‚’é¸æŠž:"
msgid "Copy"
msgstr "コピー"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "オーディオクリップ:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "é…列ã®ã‚µã‚¤ã‚ºã‚’変更"
@@ -560,21 +646,13 @@ msgstr "ズームアウト"
msgid "Reset Zoom"
msgstr "ズームをリセット"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "警告:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "フォントサイズ:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "行:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "警告"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "列:"
+msgid "Line and column numbers."
+msgstr "行番å·ã¨åˆ—番å·ã€‚"
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -676,7 +754,7 @@ msgstr "ã‚·ã‚°ãƒŠãƒ«ã®æŽ¥ç¶š: "
#: editor/connections_dialog.cpp
msgid "Edit Connection: "
-msgstr "接続を編集 "
+msgstr "接続を編集: "
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
@@ -813,7 +891,7 @@ msgstr "次ã®ã‚ªãƒ¼ãƒŠãƒ¼:"
#: editor/dependency_editor.cpp
msgid "Remove selected files from the project? (no undo)"
-msgstr "é¸æŠžã—ãŸãƒ•ァイルをプロジェクトã‹ã‚‰é™¤åŽ»ã—ã¾ã™ã‹ï¼Ÿï¼ˆã‚¢ãƒ³ãƒ‰ã‚¥ä¸å¯ï¼‰"
+msgstr "é¸æŠžã—ãŸãƒ•ァイルをプロジェクトã‹ã‚‰é™¤åŽ»ã—ã¾ã™ã‹ï¼Ÿï¼ˆã€Œå…ƒã«æˆ»ã™ã€ä¸å¯ï¼‰"
#: editor/dependency_editor.cpp
msgid ""
@@ -822,7 +900,7 @@ msgid ""
"Remove them anyway? (no undo)"
msgstr ""
"除去ã—よã†ã¨ã—ã¦ã„るファイルã¯ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ã®å‹•作ã«å¿…è¦ã§ã™ã€‚\n"
-"無視ã—ã¦é™¤åŽ»ã—ã¾ã™ã‹ï¼Ÿï¼ˆã‚¢ãƒ³ãƒ‰ã‚¥ä¸å¯ï¼‰"
+"無視ã—ã¦é™¤åŽ»ã—ã¾ã™ã‹ï¼Ÿï¼ˆã€Œå…ƒã«æˆ»ã™ã€ä¸å¯ï¼‰"
#: editor/dependency_editor.cpp editor/export_template_manager.cpp
msgid "Cannot remove:"
@@ -854,7 +932,7 @@ msgstr "読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ï¼"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr "%d 個ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’完全ã«å‰Šé™¤ã—ã¾ã™ã‹ï¼Ÿï¼ˆã‚¢ãƒ³ãƒ‰ã‚¥ä¸å¯ï¼‰"
+msgstr "%d 個ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’完全ã«å‰Šé™¤ã—ã¾ã™ã‹?ï¼ˆã€Œå…ƒã«æˆ»ã™ã€ä¸å¯!)"
#: editor/dependency_editor.cpp
msgid "Owns"
@@ -866,7 +944,7 @@ msgstr "æ‰€æœ‰æ¨©ãŒæ˜Žç¤ºã•れã¦ã„ãªã„リソース:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Orphan Resource Explorer"
-msgstr "孤立リソース用エクスプローラー"
+msgstr "孤立リソース エクスプローラー"
#: editor/dependency_editor.cpp
msgid "Delete selected files?"
@@ -875,8 +953,8 @@ msgstr "é¸æŠžã—ãŸãƒ•ァイルを削除ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "削除"
@@ -984,9 +1062,8 @@ msgid "Uncompressing Assets"
msgstr "アセットを展開"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Package installed successfully!"
-msgstr "パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«æˆåŠŸã—ã¾ã—ãŸï¼"
+msgstr "パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«æˆåŠŸã—ã¾ã—ãŸ!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1132,8 +1209,8 @@ msgid "Add Bus"
msgstr "ãƒã‚¹ã‚’追加"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "æ–°è¦ãƒã‚¹ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’作æˆã€‚"
+msgid "Add a new Audio Bus to this layout."
+msgstr "æ–°è¦ã‚ªãƒ¼ãƒ‡ã‚£ã‚ªãƒã‚¹ã‚’ã“ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã«è¿½åŠ ã™ã‚‹ã€‚"
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1161,6 +1238,10 @@ msgstr "デフォルトを読込む"
msgid "Load the default Bus Layout."
msgstr "デフォルトã®ãƒã‚¹ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’読込ã¿ã¾ã™ã€‚"
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "æ–°è¦ãƒã‚¹ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’作æˆã€‚"
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "無効ãªåå‰ã§ã™ã€‚"
@@ -1297,29 +1378,53 @@ msgid "Storing File:"
msgstr "ファイルã®ä¿å­˜:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "No export template found at the expected path:"
-msgstr ""
-"エクスãƒãƒ¼ãƒˆã™ã‚‹ãƒ†ãƒ³ãƒ—レートãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“.\n"
-"ダウンロードã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¦ãã ã•ã„."
+msgstr "エクスãƒãƒ¼ãƒˆ テンプレートãŒäºˆæƒ³ã•れãŸãƒ‘スã«è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“:"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "パックã™ã‚‹"
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"対象プラットフォームã§ã¯GLES2ã®ãŸã‚ã«'ETC'テクスãƒãƒ£åœ§ç¸®ãŒå¿…è¦ã§ã™ã€‚プロジェ"
+"クト設定より有効ã«ã—ã¦ãã ã•ã„。"
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"対象プラットフォームã§ã¯GLES2ã®ãŸã‚ã«'ETC'テクスãƒãƒ£åœ§ç¸®ãŒå¿…è¦ã§ã™ã€‚プロジェ"
+"クト設定より有効ã«ã—ã¦ãã ã•ã„。"
+
+#: editor/editor_export.cpp
+#, fuzzy
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"対象プラットフォームã§ã¯GLES2ã®ãŸã‚ã«'ETC'テクスãƒãƒ£åœ§ç¸®ãŒå¿…è¦ã§ã™ã€‚プロジェ"
+"クト設定より有効ã«ã—ã¦ãã ã•ã„。"
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom debug template not found."
-msgstr "カスタム デãƒãƒƒã‚°ãƒ‘ッケージãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
+msgstr "カスタム デãƒãƒƒã‚°ãƒ†ãƒ³ãƒ—レートãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom release template not found."
-msgstr "カスタム リリースパッケージãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“."
+msgstr "カスタム リリーステンプレートãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
@@ -1354,7 +1459,7 @@ msgstr "ファイルマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã§è¡¨ç¤º"
msgid "New Folder..."
msgstr "æ–°è¦ãƒ•ォルダ..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "å†èª­è¾¼"
@@ -1429,10 +1534,33 @@ msgstr "ãŠæ°—ã«å…¥ã‚Šã‚’上ã¸"
msgid "Move Favorite Down"
msgstr "ãŠæ°—ã«å…¥ã‚Šã‚’下ã¸"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "å‰ã®åºŠé¢"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "次ã®åºŠé¢"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "親フォルダã¸"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "アイテムをサムãƒã‚¤ãƒ«ã§ã‚°ãƒªãƒƒãƒ‰è¡¨ç¤ºã™ã‚‹ã€‚"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "アイテムを一覧ã§è¡¨ç¤ºã™ã‚‹ã€‚"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "ディレクトリã¨ãƒ•ァイル:"
@@ -1544,7 +1672,7 @@ msgid ""
"$url]contribute one[/url][/color] or [color=$color][url=$url2]request one[/"
"url][/color]."
msgstr ""
-"ç¾åœ¨ã€ã“ã®ã‚¯ãƒ©ã‚¹ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ã‚りã¾ã›ã‚“ãŒã€[color=$color][url=$url]寄付"
+"ç¾åœ¨ã€ã“ã®ã‚¯ãƒ©ã‚¹ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ã‚りã¾ã›ã‚“ãŒã€[color=$color][url=$url]貢献"
"[/url][/color]ã€ã¾ãŸã¯[color=$color][url=$url2]リクエスト[/url][/color]ã¯å¯èƒ½"
"ã§ã™ã€‚"
@@ -1561,8 +1689,8 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"ç¾åœ¨ã€ã“ã®ãƒ—ロパティã®èª¬æ˜Žã¯ã‚りã¾ã›ã‚“。[color=$color][url=$url]寄付[/url][/"
-"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„ï¼"
+"ç¾åœ¨ã€ã“ã®ãƒ—ロパティã®èª¬æ˜Žã¯ã‚りã¾ã›ã‚“。[color=$color][url=$url]貢献[/url][/"
+"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„!"
#: editor/editor_help.cpp
msgid "Method Descriptions"
@@ -1577,8 +1705,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
-"ç¾åœ¨ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®èª¬æ˜Žã¯ã‚りã¾ã›ã‚“。[color=$color][url=$url]寄付[/url][/"
-"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„ï¼"
+"ç¾åœ¨ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®èª¬æ˜Žã¯ã‚りã¾ã›ã‚“。[color=$color][url=$url]貢献[/url][/"
+"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„!"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -1655,9 +1783,9 @@ msgstr "出力をクリア"
msgid "Project export failed with error code %d."
msgstr "プロジェクトã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆãŒã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ %d ã§å¤±æ•—ã—ã¾ã—ãŸã€‚"
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "リソースä¿å­˜ä¸­ã®ã‚¨ãƒ©ãƒ¼ï¼"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1665,6 +1793,16 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "リソースä¿å­˜ä¸­ã®ã‚¨ãƒ©ãƒ¼ï¼"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "リソースを別åã§ä¿å­˜..."
@@ -1722,6 +1860,8 @@ msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
+"ã“ã®ã‚·ãƒ¼ãƒ³ã«ã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®å¾ªç’°å‚ç…§ãŒå«ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ä¿å­˜ã§ãã¾ã›ã‚“。\n"
+"ãれをã¾ãšè§£æ¶ˆã—ã¦ã‹ã‚‰ã€ã¾ãŸä¿å­˜ã—ã¦ã¿ã¦ãã ã•ã„。"
#: editor/editor_node.cpp
msgid ""
@@ -1881,6 +2021,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "é–‰ã˜ã‚‹å‰ã«ã€'%s' ã¸ã®å¤‰æ›´ã‚’ä¿å­˜ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "リソースã®èª­è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸã€‚"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "大ããªãƒ†ã‚¯ã‚¹ãƒãƒ£ã®ãŸã‚ã«ä¸€ã¤ãƒ•ァイルãŒå¿…è¦ã§ã™"
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "åå‰ã‚’付ã‘ã¦ã‚·ãƒ¼ãƒ³ã‚’ä¿å­˜..."
@@ -1930,7 +2080,7 @@ msgstr "å…ƒã«æˆ»ã™"
#: editor/editor_node.cpp
msgid "This action cannot be undone. Revert anyway?"
-msgstr "ã“ã®æ“作ã¯ã‚¢ãƒ³ãƒ‰ã‚¥ã§ãã¾ã›ã‚“。ãれã§ã‚‚å…ƒã«æˆ»ã—ã¾ã™ã‹ï¼Ÿ"
+msgstr "ã“ã®æ“作ã¯ã€Œå…ƒã«æˆ»ã™ã€ã¯ã§ãã¾ã›ã‚“。ãれã§ã‚‚å…ƒã«æˆ»ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2394,7 +2544,7 @@ msgstr "カスタムシーンを実行"
#: editor/editor_node.cpp
msgid "Changing the video driver requires restarting the editor."
-msgstr "ビデオドライãƒã‚’変更ã™ã‚‹ã«ã¯ã€ã‚¨ãƒ‡ã‚£ã‚¿ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚"
+msgstr "ビデオドライãƒã®å¤‰æ›´ã«ã¯ã‚¨ãƒ‡ã‚£ã‚¿ã®å†èµ·å‹•ãŒå¿…è¦ã§ã™ã€‚"
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
@@ -2402,8 +2552,8 @@ msgid "Save & Restart"
msgstr "ä¿å­˜ã—ã¦å†èµ·å‹•"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "エディタウィンドウã®å†æç”»æ™‚ã«ã‚¹ãƒ”ンã—ã¾ã™ï¼"
+msgid "Spins when the editor window redraws."
+msgstr "エディタ ウィンドウã®å†æç”»æ™‚ã«ã‚¹ãƒ”ンã—ã¾ã™ã€‚"
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2609,20 +2759,20 @@ msgid "[Empty]"
msgstr "[空]"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
-#, fuzzy
msgid "Assign..."
-msgstr "アサイン.."
+msgstr "割り当ã¦.."
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr "無効ãªãƒ‘ス"
+msgstr "無効㪠RID"
#: editor/editor_properties.cpp
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
msgstr ""
+"é¸æŠžã•れãŸãƒªã‚½ãƒ¼ã‚¹ (%s) ã¯ã€ã“ã®ãƒ—ロパティ (%s) ãŒæ±‚ã‚ã‚‹åž‹ã«ä¸€è‡´ã—ã¦ã„ã¾ã›"
+"ん。"
#: editor/editor_properties.cpp
msgid ""
@@ -2964,14 +3114,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "ファイルシステム上㧠'%s' を見ã¤ã‘られãªã„ãŸã‚移動ã§ãã¾ã›ã‚“ï¼"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "アイテムをサムãƒã‚¤ãƒ«ã§ã‚°ãƒªãƒƒãƒ‰è¡¨ç¤ºã™ã‚‹ã€‚"
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "アイテムを一覧ã§è¡¨ç¤ºã™ã‚‹ã€‚"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"ステータス: ファイルã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã«å¤±æ•—ã—ã¾ã—ãŸã€‚ファイルを修正ã—ã¦æ‰‹å‹•ã§å†ã‚¤"
@@ -3051,7 +3193,7 @@ msgstr "ä¾å­˜é–¢ä¿‚ã®ç·¨é›†..."
#: editor/filesystem_dock.cpp
msgid "View Owners..."
-msgstr "所有者を見る..."
+msgstr "オーナーを見る..."
#: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Rename..."
@@ -3109,10 +3251,6 @@ msgid "Search files"
msgstr "ファイル検索"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³ã‚’é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã®å­ã¨ã—ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã—ã¾ã™ã€‚"
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3138,7 +3276,7 @@ msgstr "スクリプト作æˆ"
#: editor/find_in_files.cpp
msgid "Find in Files"
-msgstr "ファイル内検索"
+msgstr "複数ファイル内を検索"
#: editor/find_in_files.cpp
msgid "Find:"
@@ -3175,7 +3313,7 @@ msgstr "ç½®æ›: "
#: editor/find_in_files.cpp
msgid "Replace all (no undo)"
-msgstr "ã™ã¹ã¦ç½®æ›ï¼ˆã‚¢ãƒ³ãƒ‰ã‚¥ä¸å¯ï¼‰"
+msgstr "ã™ã¹ã¦ç½®æ›ï¼ˆã€Œå…ƒã«æˆ»ã™ã€ä¸å¯ï¼‰"
#: editor/find_in_files.cpp
msgid "Searching..."
@@ -3323,13 +3461,13 @@ msgid "Reimport"
msgstr "å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/import_dock.cpp
+#, fuzzy
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "シーンをä¿å­˜ã—ã€å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¦å†èµ·å‹•"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "ビデオドライãƒã‚’変更ã™ã‚‹ã«ã¯ã€ã‚¨ãƒ‡ã‚£ã‚¿ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚"
+msgstr "インãƒãƒ¼ãƒˆã—ãŸãƒ•ァイルã®ã‚¿ã‚¤ãƒ—ã®å¤‰æ›´ã«ã¯ã‚¨ãƒ‡ã‚£ã‚¿ã®å†èµ·å‹•ãŒå¿…è¦ã§ã™ã€‚"
#: editor/import_dock.cpp
msgid ""
@@ -3390,9 +3528,8 @@ msgid "Load an existing resource from disk and edit it."
msgstr "既存ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’ディスクã‹ã‚‰èª­è¾¼ã¿ç·¨é›†ã™ã‚‹ã€‚"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Save the currently edited resource."
-msgstr "ç¾åœ¨ç·¨é›†ä¸­ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’ä¿å­˜ã™ã‚‹"
+msgstr "ç¾åœ¨ç·¨é›†ä¸­ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’ä¿å­˜ã™ã‚‹ã€‚"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
@@ -3460,22 +3597,6 @@ msgid "Create Polygon"
msgstr "ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "ãƒã‚¤ãƒ³ãƒˆæŒ¿å…¥"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集(点を除去)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "ãƒãƒªã‚´ãƒ³ã¨ç‚¹ã‚’除去"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3496,6 +3617,22 @@ msgstr ""
msgid "Erase points."
msgstr "点を消ã™ã€‚"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "ãƒã‚¤ãƒ³ãƒˆæŒ¿å…¥"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集(点を除去)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "ãƒãƒªã‚´ãƒ³ã¨ç‚¹ã‚’除去"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3508,9 +3645,24 @@ msgstr "アニメーションを追加"
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Load..."
-msgstr "読込む.."
+msgstr "読ã¿è¾¼ã‚€.."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "ãƒã‚¤ãƒ³ãƒˆã‚’移動"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "ブレンド時間ã®å¤‰æ›´"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "ブレンド時間ã®å¤‰æ›´"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -3520,6 +3672,27 @@ msgstr "ã“ã®ã‚¿ã‚¤ãƒ—ã®ãƒŽãƒ¼ãƒ‰ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。ルートノード
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "ノードを追加"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "アニメーションを追加"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "パスã®ãƒã‚¤ãƒ³ãƒˆã‚’除去"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3562,6 +3735,31 @@ msgid "Triangle already exists"
msgstr "ä¸‰è§’å½¢ãŒæ—¢ã«å­˜åœ¨ã—ã¾ã™"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "変数を追加"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "ブレンド時間ã®å¤‰æ›´"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "ブレンド時間ã®å¤‰æ›´"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "パスã®ãƒã‚¤ãƒ³ãƒˆã‚’除去"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "無効ãªã‚­ãƒ¼ã‚’削除"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "ブレンドシェイプ2Dã¯ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒ„リー ノードã«å±žã—ã¾ã›ã‚“。"
@@ -3570,6 +3768,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "三角形ãŒå­˜åœ¨ã—ãªã„ãŸã‚ã€ãƒ–レンドã§ãã¾ã›ã‚“。"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "グローãƒãƒ«ã®è‡ªå‹•読込ã¿ã‚’切り替ãˆ"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "点を繋ã„ã§ä¸‰è§’形を作æˆã™ã‚‹ã€‚"
@@ -3587,6 +3790,11 @@ msgid "Blend:"
msgstr "ブレンド:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "マテリアルã®å¤‰æ›´"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "フィルタã®ç·¨é›†"
@@ -3596,11 +3804,55 @@ msgid "Output node can't be added to the blend tree."
msgstr "出力ノードをブレンドツリーã«è¿½åŠ ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "シーンã‹ã‚‰ã®ãƒŽãƒ¼ãƒ‰"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "追加ã—ãŸã‚­ãƒ¼ã‚’移動"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr "接続ã§ãã¾ã›ã‚“。ãƒãƒ¼ãƒˆãŒä½¿ç”¨ä¸­ã‹ã€æŽ¥ç¶šãŒç„¡åйã§ã‚ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "接続ã—ã¾ã—ãŸ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "切断ã•れã¾ã—ãŸ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "æ–°è¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "ノードを削除"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "ã“ã®ãƒˆãƒ©ãƒƒã‚¯ã® オン/オフ を切り替ãˆã€‚"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "ブレンドã™ã‚‹æ™‚間を変更"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"アニメーションプレイヤーãŒè¨­å®šã•れã¦ã„ãªã„ãŸã‚ã€ãƒˆãƒ©ãƒƒã‚¯åã‚’å–å¾—ã§ãã¾ã›ã‚“。"
@@ -3619,6 +3871,12 @@ msgstr ""
"å¾—ã§ãã¾ã›ã‚“。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "ノードå"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "ノードを追加..."
@@ -3844,6 +4102,21 @@ msgid "Cross-Animation Blend Times"
msgstr "アニメーション間ã®ãƒ–レンド時間"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "追加ã—ãŸã‚­ãƒ¼ã‚’移動"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "翻訳を追加"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "ノードを追加"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "終り"
@@ -3872,6 +4145,20 @@ msgid "No playback resource set at path: %s."
msgstr "パス( %s )ã«å†ç”Ÿãƒªã‚½ãƒ¼ã‚¹ãŒè¨­å®šã•れã¦ã„ã¾ã›ã‚“。"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "å–り除ã„ãŸã®ã¯:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "トランジション ノード"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -3890,9 +4177,8 @@ msgid "Connect nodes."
msgstr "ノードを接続。"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Remove selected node or transition."
-msgstr "é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã¾ãŸã¯ãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚’除去"
+msgstr "é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã¾ãŸã¯ãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚’除去。"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
@@ -4207,6 +4493,8 @@ msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
msgstr ""
+"ベイクã™ã‚‹ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚りã¾ã›ã‚“。メッシュ㫠UV2ãƒãƒ£ãƒ³ãƒãƒ«ãŒå«ã¾ã‚Œã¦ãŠ"
+"りã€'Bake Light' フラグãŒã‚ªãƒ³ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
@@ -4297,6 +4585,16 @@ msgid "Move CanvasItem"
msgstr "CanvasItemを移動"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "アンカーã®ã¿"
@@ -4309,9 +4607,8 @@ msgid "Change Anchors"
msgstr "アンカーを変更"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Paste Pose"
-msgstr "ãƒãƒ¼ã‚ºã‚’貼り付ã‘ã‚‹"
+msgstr "ãƒãƒ¼ã‚ºã‚’貼り付ã‘"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -4359,7 +4656,7 @@ msgstr "回転モード"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale Mode"
-msgstr "スケール(拡大縮å°ï¼‰ãƒ¢ãƒ¼ãƒ‰"
+msgstr "スケールモード"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4375,9 +4672,8 @@ msgid "Click to change object's rotation pivot."
msgstr "クリックã§ã‚ªãƒ–ジェクトã®å›žè»¢ãƒ”ボットを変更ã™ã‚‹ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Pan Mode"
-msgstr "パン・モード"
+msgstr "パンモード"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle snapping."
@@ -4451,14 +4747,12 @@ msgid "Unlock the selected object (can be moved)."
msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをアンロック (移動å¯èƒ½ã«ã™ã‚‹)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Makes sure the object's children are not selectable."
-msgstr "ã“ã®ã‚ªãƒ–ジェクトã®å­ï¼ˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆï¼‰ã‚’é¸æŠžä¸å¯ã¨ã™ã‚‹."
+msgstr "オブジェクトã®å­ã‚’é¸æŠžä¸å¯ã«ã™ã‚‹ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Restores the object's children's ability to be selected."
-msgstr "ã“ã®ã‚ªãƒ–ジェクトã®å­ï¼ˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆï¼‰ã‚’é¸æŠžå¯èƒ½ã¨ã™ã‚‹."
+msgstr "オブジェクトã®å­ã‚’é¸æŠžå¯èƒ½ã«æˆ»ã™ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton Options"
@@ -4481,9 +4775,8 @@ msgid "Make Custom Bone(s) from Node(s)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Custom Bones"
-msgstr "ボーンをクリアã™ã‚‹"
+msgstr "カスタム ボーンをクリア"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4698,6 +4991,10 @@ msgstr "接線を個別ã«ç·¨é›†ã™ã‚‹ã«ã¯ã‚·ãƒ•トを押ã™"
msgid "Bake GI Probe"
msgstr "グローãƒãƒ«ã‚¤ãƒ«ãƒŸãƒãƒ¼ã‚·ãƒ§ãƒ³ã®äº‹å‰è¨ˆç®—"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "アイテム%d"
@@ -4711,12 +5008,10 @@ msgid "Item List Editor"
msgstr "アイテムリストã®ã‚¨ãƒ‡ã‚£ã‚¿"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Occluder Polygon"
-msgstr "オクルージョンを生ã˜ã‚‹ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
+msgstr "オクルーダーãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Mesh is empty!"
msgstr "メッシュãŒã‚りã¾ã›ã‚“!"
@@ -4977,6 +5272,11 @@ msgid "Generating Visibility Rect"
msgstr "å¯è¦–性ã®çŸ©å½¢ã‚’生æˆ"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Generate Visibility Rect"
+msgstr "å¯è¦–性ã®çŸ©å½¢ã‚’生æˆ"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
@@ -4990,11 +5290,6 @@ msgstr "ç”»åƒå†…ã«é€æ˜Žåº¦ãŒ128以上ã®ãƒ”クセルãŒã‚りã¾ã›ã‚“..."
#: editor/plugins/particles_2d_editor_plugin.cpp
#, fuzzy
-msgid "Generate Visibility Rect"
-msgstr "å¯è¦–性ã®çŸ©å½¢ã‚’生æˆ"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Load Emission Mask"
msgstr "発光(Emission)マスクを読ã¿è¾¼ã‚€"
@@ -5088,14 +5383,14 @@ msgid "Generating AABB"
msgstr "AABBを生æˆä¸­"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "軸平行境界ボックス(AABB)を生æˆ"
-
-#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
msgid "Generate Visibility AABB"
msgstr "å¯è¦–性ã®è»¸å¹³è¡Œå¢ƒç•Œãƒœãƒƒã‚¯ã‚¹ã‚’生æˆ"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "軸平行境界ボックス(AABB)を生æˆ"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "曲線ã‹ã‚‰ãƒã‚¤ãƒ³ãƒˆã‚’除去"
@@ -5238,9 +5533,8 @@ msgid "Split Segment (in curve)"
msgstr "分割ã™ã‚‹(曲線を)"
#: editor/plugins/physical_bone_plugin.cpp
-#, fuzzy
msgid "Move joint"
-msgstr "ãƒã‚¤ãƒ³ãƒˆã‚’移動"
+msgstr "ジョイントを移動"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
@@ -5248,9 +5542,8 @@ msgid ""
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Sync Bones"
-msgstr "ボーンを表示ã™ã‚‹"
+msgstr "ãƒœãƒ¼ãƒ³ã‚’åŒæœŸ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
@@ -5265,32 +5558,34 @@ msgid "Create UV Map"
msgstr "UVマップを生æˆ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "ãƒãƒªã‚´ãƒ³ã¨UVを生æˆ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Internal Vertex"
-msgstr "水平ガイドを作æˆ"
+msgstr "内部頂点を作æˆ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Internal Vertex"
-msgstr "曲線ã®In-ãƒãƒ³ãƒ‰ãƒ«ã‚’除去"
+msgstr "内部頂点を除去"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Invalid Polygon (need 3 different vertices)"
-msgstr ""
+msgstr "無効ãªãƒãƒªã‚´ãƒ³ (3ã¤ã®ç•°ãªã‚‹é ‚点ãŒå¿…è¦ã§ã™)"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Add Custom Polygon"
-msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集"
+msgstr "カスタム ãƒãƒªã‚´ãƒ³ã‚’追加"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Polygon"
-msgstr "ãƒãƒªã‚´ãƒ³ã¨ç‚¹ã‚’除去"
+msgstr "カスタム ãƒãƒªã‚´ãƒ³ã‚’除去"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
@@ -5318,19 +5613,16 @@ msgid "UV"
msgstr "UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Points"
msgstr "点"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Polygons"
-msgstr "ãƒãƒªã‚´ãƒ³->UV"
+msgstr "ãƒãƒªã‚´ãƒ³"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Bones"
-msgstr "ボーンを生æˆ"
+msgstr "ボーン"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
@@ -5346,9 +5638,8 @@ msgid "Shift: Move All"
msgstr "Shift: ã™ã¹ã¦ç§»å‹•"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Shift+Ctrl: Scale"
-msgstr "Shift+Ctrl: 縮尺(Scale)"
+msgstr "Shift+Ctrl: スケール"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Move Polygon"
@@ -5365,13 +5656,15 @@ msgstr "ãƒãƒªã‚´ãƒ³ã®ç¸®å°ºã‚’変更"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create a custom polygon. Enables custom polygon rendering."
-msgstr ""
+msgstr "カスタムãƒãƒªã‚´ãƒ³ã‚’生æˆã—ã€ã‚«ã‚¹ã‚¿ãƒ ãƒãƒªã‚´ãƒ³ã®æç”»ã‚’有効ã«ã™ã‚‹ã€‚"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
"Remove a custom polygon. If none remain, custom polygon rendering is "
"disabled."
msgstr ""
+"カスタムãƒãƒªã‚´ãƒ³ã‚’削除ã™ã‚‹ã€‚ä»–ã«æ®‹ã£ã¦ã„ãªã„å ´åˆã€ã‚«ã‚¹ã‚¿ãƒ ãƒãƒªã‚´ãƒ³ã®æç”»ã¯ç„¡"
+"効ã«ãªã‚Šã¾ã™ã€‚"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Paint weights with specified intensity."
@@ -5442,9 +5735,8 @@ msgid "Sync Bones to Polygon"
msgstr "ãƒãƒªã‚´ãƒ³ã®ç¸®å°ºã‚’変更"
#: editor/plugins/resource_preloader_editor_plugin.cpp
-#, fuzzy
msgid "ERROR: Couldn't load resource!"
-msgstr "エラー:リソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ!"
+msgstr "エラー: リソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Add Resource"
@@ -5500,14 +5792,12 @@ msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
#: editor/plugins/root_motion_editor_plugin.cpp
-#, fuzzy
msgid "Path to AnimationPlayer is invalid"
-msgstr "アニメーションツリーã«å•題ãŒã‚りã¾ã™."
+msgstr "AnimationPlayer ã¸ã®ãƒ‘スãŒç„¡åйã§ã™"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "最近開ã„ãŸãƒ•ァイルã®è¨˜éŒ²ã‚’クリア"
+msgstr "最近開ã„ãŸãƒ•ァイルã®å±¥æ­´ã‚’クリア"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close and save changes?"
@@ -5723,9 +6013,8 @@ msgid "Go to next edited document."
msgstr "次ã®ç·¨é›†ã—ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¸ç§»å‹•。"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Discard"
-msgstr "離散"
+msgstr "破棄"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -5774,9 +6063,8 @@ msgid "Only resources from filesystem can be dropped."
msgstr "ファイルシステムã®ãƒªã‚½ãƒ¼ã‚¹ã®ã¿ãƒ‰ãƒ­ãƒƒãƒ—ã§ãã¾ã™."
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Lookup Symbol"
-msgstr "記å·ã™ã¹ã¦"
+msgstr "シンボルを検索"
#: editor/plugins/script_text_editor.cpp
msgid "Pick Color"
@@ -5845,9 +6133,8 @@ msgid "Clone Down"
msgstr "下ã«è¤‡å†™"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Complete Symbol"
-msgstr "記å·ã™ã¹ã¦"
+msgstr "シンボルを補完"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
@@ -5887,9 +6174,8 @@ msgid "Find Previous"
msgstr "å‰ã‚’検索"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Find in Files..."
-msgstr "ファイルを絞り込む..."
+msgstr "複数ファイル内を検索..."
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function..."
@@ -5914,6 +6200,15 @@ msgstr "ã“ã®skeletonã«ã¯ãƒœãƒ¼ãƒ³ãŒã‚りã¾ã›ã‚“。å­Bone2Dノードをè
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "メッシュã‹ã‚‰æ”¾å‡ºç‚¹ã‚’生æˆ"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "スケルトン..."
@@ -5951,7 +6246,7 @@ msgstr "平行投影"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective"
-msgstr "é€è¦–投影(é è¿‘法)"
+msgstr "é€è¦–投影"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -6030,10 +6325,6 @@ msgid "Vertices"
msgstr "頂点"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "フレームレート"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "上é¢å›³."
@@ -6078,7 +6369,8 @@ msgid "Rear"
msgstr "後é¢"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "シーンビューã«ã‚«ãƒ¡ãƒ©ã‚’åˆã‚ã›ã‚‹ï¼ˆAlign With View)"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6129,7 +6421,6 @@ msgid "View FPS"
msgstr "フレームレートを表示"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Half Resolution"
msgstr "åŠè§£åƒåº¦"
@@ -6177,6 +6468,12 @@ msgid "Freelook Speed Modifier"
msgstr "フリールックã®é€Ÿåº¦ã‚’調整"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "情報を表示"
@@ -6186,6 +6483,11 @@ msgid "XForm Dialog"
msgstr "Xformダイアログ"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Snapモード:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "é¸æŠžãƒ¢ãƒ¼ãƒ‰ (Q)"
@@ -6207,7 +6509,7 @@ msgstr "回転モード (E)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode (R)"
-msgstr "スケール(拡大縮å°ï¼‰ãƒ¢ãƒ¼ãƒ‰(R)"
+msgstr "スケールモード (R)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Local Coords"
@@ -6270,24 +6572,20 @@ msgid "Tool Select"
msgstr "é¸æŠžãƒ„ãƒ¼ãƒ«"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Move"
msgstr "移動ツール"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Rotate"
msgstr "回転ツール"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "拡大縮å°ãƒ„ール"
+msgstr "スケールツール"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Freelook"
-msgstr "フルスクリーンã®åˆ‡ã‚Šæ›¿ãˆ"
+msgstr "フリールックã®åˆ‡ã‚Šæ›¿ãˆ"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -6408,7 +6706,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6477,10 +6775,6 @@ msgid "Add Empty"
msgstr "空を追加"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "アニメーションã®ãƒ«ãƒ¼ãƒ—を変更"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "アニメーションã®FPSを変更"
@@ -6489,8 +6783,12 @@ msgid "(empty)"
msgstr "(空)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "アニメーション"
+msgid "Animations:"
+msgstr "アニメーション:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "æ–°è¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6501,8 +6799,8 @@ msgid "Loop"
msgstr "ループ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "アニメーションã®ãƒ•レーム"
+msgid "Animation Frames:"
+msgstr "アニメーション フレーム:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6816,6 +7114,24 @@ msgid "Merge from Scene"
msgstr "シーンã‹ã‚‰ãƒžãƒ¼ã‚¸"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "次ã®åºŠé¢"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "å‰ã®åºŠé¢"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6830,8 +7146,12 @@ msgstr "点を消ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "æ–°è¦ãƒŽãƒ¼ãƒ‰ã‚’作æˆã€‚"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
-msgstr "æ–°è¦ã«ãƒãƒªã‚´ãƒ³ã‚’生æˆã™ã‚‹"
+msgstr "æ–°è¦ãƒãƒªã‚´ãƒ³ã‚’生æˆã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Keep polygon inside region Rect."
@@ -6846,9 +7166,10 @@ msgid "Display Tile Names (Hold Alt Key)"
msgstr "タイルåを表示 (Altキーを長押ã—)"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected texture? This will remove all tiles which use it."
-msgstr "パスã®ãƒã‚¤ãƒ³ãƒˆã‚’除去"
+msgstr ""
+"é¸æŠžã—ãŸãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’除去ã—ã¾ã™ã‹? ã“れを使用ã—ã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ«ã¯é™¤åŽ»ã•れ"
+"ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "You haven't selected a texture to remove."
@@ -6928,18 +7249,16 @@ msgid "Set Tile Region"
msgstr "テクスãƒãƒ£ã€€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Tile"
-msgstr "フォルダーを作æˆ"
+msgstr "タイルを生æˆ"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Icon"
-msgstr ""
+msgstr "タイル アイコンを設定"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Tile Bitmask"
-msgstr "フィルタã®ç·¨é›†"
+msgstr "タイル ビットマスクを編集"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -6947,28 +7266,34 @@ msgid "Edit Collision Polygon"
msgstr "既存ã®ãƒãƒªã‚´ãƒ³ã‚’編集:"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Occlusion Polygon"
-msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集"
+msgstr "オクルージョン ãƒãƒªã‚´ãƒ³ã‚’編集"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Navigation Polygon"
-msgstr "ナビゲーションãƒãƒªã‚´ãƒ³ã‚’生æˆ"
+msgstr "ナビゲーション ãƒãƒªã‚´ãƒ³ã‚’編集"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Paste Tile Bitmask"
-msgstr "ビットマスクを貼り付ã‘。"
+msgstr "タイル ビットマスクを貼り付ã‘"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Clear Tile Bitmask"
-msgstr ""
+msgstr "タイル ビットマスクをクリア"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’移動"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’移動"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
-msgstr "テンプレートを除去"
+msgstr "タイルを除去"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -6976,38 +7301,32 @@ msgid "Remove Collision Polygon"
msgstr "ãƒãƒªã‚´ãƒ³ã¨ç‚¹ã‚’除去"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Occlusion Polygon"
-msgstr "オクルージョンを生ã˜ã‚‹ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
+msgstr "オクルージョン ãƒãƒªã‚´ãƒ³ã‚’除去"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Navigation Polygon"
-msgstr "ナビゲーションãƒãƒªã‚´ãƒ³ã‚’生æˆ"
+msgstr "ナビゲーション ãƒãƒªã‚´ãƒ³ã‚’除去"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Tile Priority"
-msgstr "フィルタã®ç·¨é›†"
+msgstr "タイル プロパティを編集"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Z Index"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Collision Polygon"
-msgstr "ナビゲーションãƒãƒªã‚´ãƒ³ã‚’生æˆ"
+msgstr "コリジョン ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Occlusion Polygon"
-msgstr "オクルージョンを生ã˜ã‚‹ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
+msgstr "オクルージョン ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "This property can't be changed."
-msgstr "ã“ã®å‡¦ç†ã«ã¯ã‚·ãƒ¼ãƒ³ãŒå¿…è¦ã§ã™."
+msgstr "ã“ã®ãƒ—ロパティã¯å¤‰æ›´ã§ãã¾ã›ã‚“。"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -7015,6 +7334,29 @@ msgid "TileSet"
msgstr "タイルセット..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "'%s' ã®ãƒ‡ãƒ•ォルトã¨ã—ã¦è¨­å®š"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "シェーダー"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "ノードを複製"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "頂点"
@@ -7033,6 +7375,16 @@ msgstr "å³å´é¢"
msgid "VisualShader"
msgstr "シェーダー"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "タイル プロパティを編集"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "シェーダーã®å¤‰æ›´"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "実行å¯èƒ½"
@@ -7046,10 +7398,17 @@ msgid "Delete preset '%s'?"
msgstr "プリセット '%s' を削除ã—ã¾ã™ã‹?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
-"ã“ã®ãƒ—ラットフォームã«å¯¾ã™ã‚‹ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ テンプレートãŒè¦‹ã¤ã‹ã‚‰ãªã„ã‹ã€ç ´æã—"
-"ã¦ã„ã¾ã™:"
#: editor/project_export.cpp
#, fuzzy
@@ -7062,6 +7421,17 @@ msgid "Exporting All"
msgstr "%sã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆä¸­"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "存在ã—ãªã„パスã§ã™ã€‚"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"ã“ã®ãƒ—ラットフォームã«å¯¾ã™ã‚‹ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ テンプレートãŒè¦‹ã¤ã‹ã‚‰ãªã„ã‹ã€ç ´æã—"
+"ã¦ã„ã¾ã™:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "åˆæœŸè¨­å®šå€¤"
@@ -7133,19 +7503,16 @@ msgid "Feature List:"
msgstr "メソッド一覧:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Script"
-msgstr "æ–°è¦ã‚¹ã‚¯ãƒªãƒ—ト"
+msgstr "スクリプト"
#: editor/project_export.cpp
-#, fuzzy
msgid "Script Export Mode:"
-msgstr "エクスãƒãƒ¼ãƒˆã®ãƒ¢ãƒ¼ãƒ‰:"
+msgstr "スクリプトã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Text"
-msgstr "テクスãƒãƒ£"
+msgstr "テキスト"
#: editor/project_export.cpp
#, fuzzy
@@ -7169,9 +7536,8 @@ msgid "Export PCK/Zip"
msgstr "PCK/Zipã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export mode?"
-msgstr "エクスãƒãƒ¼ãƒˆã®ãƒ¢ãƒ¼ãƒ‰:"
+msgstr "エクスãƒãƒ¼ãƒˆ モード?"
#: editor/project_export.cpp
msgid "Export All"
@@ -7233,21 +7599,20 @@ msgid "Invalid project path (changed anything?)."
msgstr "䏿­£ãªãƒ—ロジェクトã®ãƒ‘ス(何ã‹å¤‰ãˆã¾ã—ãŸã‹ï¼Ÿï¼‰"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
-msgstr "project.godotをプロジェクトパスã«ç”Ÿæˆã§ãã¾ã›ã‚“ã§ã—ãŸ"
+msgstr ""
+"プロジェクトパス㮠project.godot を読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚ (エラー %d)。見ã¤ã‹"
+"らãªã„ã‹ç ´æã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't edit project.godot in project path."
-msgstr "project.godotをプロジェクトパスã«ç”Ÿæˆã§ãã¾ã›ã‚“ã§ã—ãŸ"
+msgstr "プロジェクトパス㮠project.godot を編集ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "project.godotをプロジェクトパスã«ç”Ÿæˆã§ãã¾ã›ã‚“ã§ã—ãŸ"
+msgstr "project.godot をプロジェクトパスã«ç”Ÿæˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
@@ -7307,11 +7672,11 @@ msgstr "å‚ç…§"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "レンダラー:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7320,10 +7685,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"高ã„ビジュアルクオリティ\n"
+"ã™ã¹ã¦ã®æ©Ÿèƒ½ã‚’利用å¯èƒ½\n"
+"å¤ã„ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã¨ã®äº’æ›æ€§ãªã—\n"
+"Webゲームã«ã¯éžæŽ¨å¥¨"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7332,10 +7701,15 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"低ã„ビジュアルクオリティ\n"
+"一部機能ã¯åˆ©ç”¨ä¸å¯\n"
+"ã»ã¨ã‚“ã©ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã§å‹•作\n"
+"Webã‚²ãƒ¼ãƒ ã«æŽ¨å¥¨"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"レンダラーã¯å¾Œã§å¤‰æ›´ã§ãã¾ã™ãŒã€ã‚·ãƒ¼ãƒ³ã®èª¿æ•´ãŒå¿…è¦ã¨ãªã‚‹å ´åˆãŒã‚りã¾ã™ã€‚"
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7352,6 +7726,19 @@ msgstr "複数ã®ãƒ—ロジェクトを開ã„ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7361,6 +7748,13 @@ msgid ""
"Warning: You will not be able to open the project with previous versions of "
"the engine anymore."
msgstr ""
+"以下ã®ãƒ—ロジェクト設定ファイルã¯ã€å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¨ãƒ³ã‚¸ãƒ³ã«ã‚ˆã‚Šç”Ÿæˆã•れã¦ãŠ"
+"りã€ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç”¨ã«å¤‰æ›ãŒå¿…è¦ã§ã™:\n"
+"\n"
+"%s\n"
+"\n"
+"変æ›ã—ã¾ã™ã‹?\n"
+"警告: ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã¯æ—§ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¨ãƒ³ã‚¸ãƒ³ã§é–‹ãã“ã¨ãŒã§ããªããªã‚Šã¾ã™ã€‚"
#: editor/project_manager.cpp
msgid ""
@@ -7515,7 +7909,6 @@ msgid "Control+"
msgstr "Control+"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
-#, fuzzy
msgid "Press a Key..."
msgstr "キーを押ã—ã¦ãã ã•ã„..."
@@ -7980,14 +8373,12 @@ msgid "Case"
msgstr ""
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "To Lowercase"
-msgstr "å°æ–‡å­—ã«ã™ã‚‹"
+msgstr "å°æ–‡å­—ã«"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "To Uppercase"
-msgstr "大文字ã«ã™ã‚‹"
+msgstr "大文字ã«"
#: editor/rename_dialog.cpp
msgid "Reset"
@@ -8096,6 +8487,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "シーンをルートã«ã™ã‚‹"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "ノードを削除ã—ã¾ã™ã‹?"
@@ -8120,7 +8516,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Editable Children"
msgstr "編集å¯èƒ½ãªå­"
@@ -8134,6 +8529,11 @@ msgid "Make Local"
msgstr "ロケール"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "New Scene Root"
+msgstr "シーンをルートã«ã™ã‚‹"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "ルートノードを生æˆ:"
@@ -8154,6 +8554,7 @@ msgid "Custom Node"
msgstr "カスタムノード"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can't operate on nodes from a foreign scene!"
msgstr "ç•°ãªã‚‹ã‚·ãƒ¼ãƒ³ã®ãƒŽãƒ¼ãƒ‰ã‚’処ç†ã§ãã¾ã›ã‚“!"
@@ -8266,14 +8667,13 @@ msgid "Local"
msgstr "ローカル"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Clear Inheritance? (No Undo!)"
-msgstr "継承をクリアã—ã¾ã™ã‹ï¼Ÿï¼ˆundoã§ãã¾ã›ã‚“!)"
+msgstr "継承をクリアã—ã¾ã™ã‹?ï¼ˆã€Œå…ƒã«æˆ»ã™ã€ã§ãã¾ã›ã‚“!)"
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Toggle Visible"
-msgstr "å¯è¦–性(Visibility)を変更"
+msgstr "å¯è¦–性ã®åˆ‡ã‚Šæ›¿ãˆ"
#: editor/scene_tree_editor.cpp
#, fuzzy
@@ -8281,22 +8681,20 @@ msgid "Node configuration warning:"
msgstr "ノードã®è¨­å®šã«é–¢ã™ã‚‹è­¦å‘Š:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid ""
"Node has connection(s) and group(s).\n"
"Click to show signals dock."
msgstr ""
-"ノードãŒã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã¨ã‚°ãƒ«ãƒ¼ãƒ—ã‚’ä¿æŒã—ã¦ã„ã¾ã™\n"
-"クリックã—ã¦ã‚·ã‚°ãƒŠãƒ«ãƒ‰ãƒƒã‚¯ã‚’表示ã—ã¦ãã ã•ã„"
+"ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶šã¨ã‚°ãƒ«ãƒ¼ãƒ—ãŒã‚りã¾ã™ã€‚\n"
+"クリックã§ã‚·ã‚°ãƒŠãƒ« ドックを表示。"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
-"ノードã¯ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¿æŒã—ã¦ã„ã¾ã™\n"
-"クリックã—ã¦ã‚·ã‚°ãƒŠãƒ«ãƒ‰ãƒƒã‚¯ã‚’表示ã—ã¦ãã ã•ã„"
+"ãƒŽãƒ¼ãƒ‰ã«æŽ¥ç¶šãŒã‚りã¾ã™ã€‚\n"
+"クリックã§ã‚·ã‚°ãƒŠãƒ« ドックを表示。"
#: editor/scene_tree_editor.cpp
#, fuzzy
@@ -8329,9 +8727,8 @@ msgstr ""
"クリックã—ã¦é¸æŠžå¯èƒ½ã«ã—ã¦ãã ã•ã„"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "å¯è¦–性(Visibility)を変更"
+msgstr "å¯è¦–性ã®åˆ‡ã‚Šæ›¿ãˆ"
#: editor/scene_tree_editor.cpp
msgid ""
@@ -8396,9 +8793,8 @@ msgid "Path is not local"
msgstr "パスã¯ãƒ­ãƒ¼ã‚«ãƒ«ã§ã¯ã‚りã¾ã›ã‚“"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid base path"
-msgstr "䏿­£ãªãƒ™ãƒ¼ã‚¹ï¼ˆbase)パス"
+msgstr "無効ãªãƒ™ãƒ¼ã‚¹ パス"
#: editor/script_create_dialog.cpp
msgid "Directory of the same name exists"
@@ -8583,6 +8979,21 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "イージング(Ease Out)"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "ショートカット"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "アンカーを変更"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "ショートカット"
@@ -8699,18 +9110,16 @@ msgid "Platform"
msgstr "プラットフォーム"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "Dynamic Library"
-msgstr "メッシュライブラリ..."
+msgstr "ダイナミック ライブラリ"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Add an architecture entry"
msgstr ""
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "GDNativeLibrary"
-msgstr "メッシュライブラリ..."
+msgstr "GDNative ライブラリ"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Library"
@@ -8812,8 +9221,12 @@ msgstr "é¸æŠžç¯„å›²ã‚’è¤‡è£½"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
+msgid "GridMap Paint"
+msgstr "グリッドマップã®è¨­å®š"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
-msgstr "グリッドSnap"
+msgstr "グリッドマップ"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
@@ -8901,9 +9314,8 @@ msgid "Fill Selection"
msgstr "ã™ã¹ã¦é¸æŠž"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Settings"
-msgstr "Snapã®è¨­å®š"
+msgstr "グリッドマップã®è¨­å®š"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
@@ -8961,10 +9373,6 @@ msgid "Build Project"
msgstr "プロジェクトをビルド"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "警告"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "ログを表示"
@@ -9141,10 +9549,6 @@ msgid "Change Expression"
msgstr "å¼ã‚’変更"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "ノードを追加"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "VisualScriptノードを除去"
@@ -9242,6 +9646,11 @@ msgstr "入力ã®åå‰ã‚’変更"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Resize Comment"
+msgstr "CanvasItemをリサイズ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Can't copy the function node."
msgstr "'..'を処ç†ã§ãã¾ã›ã‚“"
@@ -9406,7 +9815,7 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "Package name is missing."
-msgstr ""
+msgstr "パッケージåãŒã‚りã¾ã›ã‚“。"
#: platform/android/export/export.cpp
msgid "Package segments must be of non-zero length."
@@ -9414,7 +9823,7 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
-msgstr ""
+msgstr "文字 '%s' ã¯Androidアプリケーション パッケージåã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
@@ -9422,11 +9831,11 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
-msgstr ""
+msgstr "文字 '%s' ã¯ãƒ‘ッケージ セグメントã®å…ˆé ­ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
-msgstr ""
+msgstr "パッケージã«ã¯ä¸€ã¤ä»¥ä¸Šã®åŒºåˆ‡ã‚Šæ–‡å­— '.' ãŒå¿…è¦ã§ã™ã€‚"
#: platform/android/export/export.cpp
msgid "ADB executable not configured in the Editor Settings."
@@ -9434,7 +9843,7 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "OpenJDK jarsigner not configured in the Editor Settings."
-msgstr ""
+msgstr "OpenJDK jarsignerãŒã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼è¨­å®šã§è¨­å®šã•れã¦ã„ã¾ã›ã‚“。"
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
@@ -9442,25 +9851,23 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
-msgstr ""
+msgstr "APK expansion ã®å…¬é–‹éµãŒç„¡åйã§ã™ã€‚"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid package name:"
-msgstr "䏿­£ãªã‚¯ãƒ©ã‚¹å"
+msgstr "無効ãªãƒ‘ッケージå:"
#: platform/iphone/export/export.cpp
msgid "Identifier is missing."
-msgstr ""
+msgstr "識別å­ãŒã‚りã¾ã›ã‚“。"
#: platform/iphone/export/export.cpp
msgid "Identifier segments must be of non-zero length."
msgstr ""
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "The character '%s' is not allowed in Identifier."
-msgstr "ã“ã®åå‰ã¯ä¸æ­£ãªè­˜åˆ¥å­ã§ã™:"
+msgstr "文字 '%s' ã¯è­˜åˆ¥å­ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
#: platform/iphone/export/export.cpp
msgid "A digit cannot be the first character in a Identifier segment."
@@ -9469,20 +9876,19 @@ msgstr ""
#: platform/iphone/export/export.cpp
msgid ""
"The character '%s' cannot be the first character in a Identifier segment."
-msgstr ""
+msgstr "文字 '%s' ã¯è­˜åˆ¥å­ セグメントã®å…ˆé ­ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
#: platform/iphone/export/export.cpp
msgid "The Identifier must have at least one '.' separator."
-msgstr ""
+msgstr "識別å­ã«ã¯ä¸€ã¤ä»¥ä¸Šã®åŒºåˆ‡ã‚Šæ–‡å­— '.' ãŒå¿…è¦ã§ã™ã€‚"
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
-msgstr ""
+msgstr "App Store ãƒãƒ¼ãƒ ID ãŒæœªæŒ‡å®š - プロジェクトを構æˆã§ãã¾ã›ã‚“。"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Invalid Identifier:"
-msgstr "ã“ã®åå‰ã¯ä¸æ­£ãªè­˜åˆ¥å­ã§ã™:"
+msgstr "無効ãªè­˜åˆ¥å­:"
#: platform/iphone/export/export.cpp
msgid "Required icon is not specified in the preset."
@@ -9528,19 +9934,16 @@ msgid "Invalid package unique name."
msgstr "無効ãªãƒ•ォント サイズã§ã™ã€‚"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid product GUID."
-msgstr "無効ãªãƒ•ォント サイズã§ã™ã€‚"
+msgstr "無効ãªãƒ—ロダクト GUIDã§ã™ã€‚"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid publisher GUID."
-msgstr "パブリッシャã®GUIDãŒä¸æ­£ã§ã™."
+msgstr "無効ãªãƒ‘ブリッシャー GUIDã§ã™ã€‚"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid background color."
-msgstr "䏿­£ãªèƒŒæ™¯è‰²"
+msgstr "無効ãªèƒŒæ™¯è‰²ã§ã™ã€‚"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -9683,6 +10086,13 @@ msgstr ""
"ParallaxLayer ノードã¯ã€ParallaxBackground ノードã®å­ã¨ã—ã¦è¨­å®šã•れã¦ã„ã‚‹å ´åˆ"
"ã®ã¿å‹•作ã—ã¾ã™ã€‚"
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
#, fuzzy
msgid ""
@@ -9770,7 +10180,7 @@ msgstr "%d%%"
#: scene/3d/baked_lightmap.cpp
msgid "(Time Left: %d:%02d s)"
-msgstr ""
+msgstr "(Time Left: %d分%02d秒)"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -9832,6 +10242,12 @@ msgstr ""
"関数㮠CollisionShape ã®å½¢çŠ¶ã‚’æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ãれã®ãŸã‚ã®ã‚·ã‚§ã‚¤ãƒ—リ"
"ソースを作æˆã—ã¦ãã ã•ã„!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
@@ -9848,6 +10264,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "イメージをé…ç½®(Blit)"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9863,6 +10285,13 @@ msgstr ""
"ã“れã¯ãƒŠãƒ“ゲーションデータã®ã¿æä¾›ã—ã¾ã™ã€‚"
#: scene/3d/particles.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
#, fuzzy
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
@@ -9875,10 +10304,8 @@ msgid ""
msgstr ""
#: scene/3d/path.cpp
-#, fuzzy
msgid "PathFollow only works when set as a child of a Path node."
-msgstr ""
-"PathFollow2D ã¯ã€Path2D ノードã®å­ã¨ã—ã¦è¨­å®šã•れã¦ã„ã‚‹å ´åˆã®ã¿å‹•作ã—ã¾ã™ã€‚"
+msgstr "PathFollow ã¯ã€Path ノードã®å­ã¨ã—ã¦è¨­å®šã•れã¦ã„ã‚‹å ´åˆã®ã¿å‹•作ã—ã¾ã™ã€‚"
#: scene/3d/path.cpp
msgid ""
@@ -9900,27 +10327,6 @@ msgstr ""
"Path プロパティã¯ã€å‹•作ã™ã‚‹ã‚ˆã†ã«æœ‰åŠ¹ãª Particles2D ノードを示ã™å¿…è¦ãŒã‚りã¾"
"ã™ã€‚"
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-#, fuzzy
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"WorldEnvironment ã¯ã€ã‚·ãƒ¼ãƒ³ (ã¾ãŸã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れãŸã‚·ãƒ¼ãƒ³ã®ã‚»ãƒƒãƒˆ) ã”ã¨ã«"
-"1ã¤ã ã‘許å¯ã•れã¾ã™ã€‚"
-
-#: scene/3d/scenario_fx.cpp
-#, fuzzy
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"ã“ã®WorldEnvironmentã¯ç„¡è¦–ã•れã¾ã—ãŸã€‚カメラを追加ã™ã‚‹ã‹(3Dシーンã®å ´åˆ)ã€ã“"
-"ã®Environmentã® Backgroundモード ã‚’ Canvas ã«è¨­å®šã—ã¾ã™(2Dシーンã®å ´åˆ)。"
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9946,6 +10352,27 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+#, fuzzy
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"WorldEnvironment ã¯ã€ã‚·ãƒ¼ãƒ³ (ã¾ãŸã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れãŸã‚·ãƒ¼ãƒ³ã®ã‚»ãƒƒãƒˆ) ã”ã¨ã«"
+"1ã¤ã ã‘許å¯ã•れã¾ã™ã€‚"
+
+#: scene/3d/world_environment.cpp
+#, fuzzy
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"ã“ã®WorldEnvironmentã¯ç„¡è¦–ã•れã¾ã—ãŸã€‚カメラを追加ã™ã‚‹ã‹(3Dシーンã®å ´åˆ)ã€ã“"
+"ã®Environmentã® Backgroundモード ã‚’ Canvas ã«è¨­å®šã—ã¾ã™(2Dシーンã®å ´åˆ)。"
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9956,7 +10383,7 @@ msgstr "見ã¤ã‹ã‚‰ãªã„アニメーション: '%s'"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
-msgstr ""
+msgstr "ノード '%s', 無効ãªã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³: '%s'。"
#: scene/animation/animation_tree.cpp
msgid "Invalid animation: '%s'."
@@ -9972,9 +10399,9 @@ msgid "A root AnimationNode for the graph is not set."
msgstr ""
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Path to an AnimationPlayer node containing animations is not set."
-msgstr "シーンツリーã‹ã‚‰ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ãƒ¬ã‚¤ãƒ¤ãƒ¼ã‚’é¸æŠžã—アニメーション編集"
+msgstr ""
+"アニメーションをå«ã‚“ã  AnimationPlayer ノードã¸ã®ãƒ‘スãŒè¨­å®šã•れã¦ã„ã¾ã›ã‚“。"
#: scene/animation/animation_tree.cpp
msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node."
@@ -9991,14 +10418,31 @@ msgstr ""
"ã“ã®ãƒŽãƒ¼ãƒ‰ã¯éžæŽ¨å¥¨ã«ãªã‚Šã¾ã—ãŸã€‚代ã‚りã«AnimationTreeを使用ã—ã¦ãã ã•ã„。"
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "スクリーンã‹ã‚‰è‰²ã‚’é¸æŠžã—ã¦ãã ã•ã„。"
+
+#: scene/gui/color_picker.cpp
#, fuzzy
msgid "Raw Mode"
msgstr "パン・モード"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "ç¾åœ¨ã®è‰²ã‚’プリセットã¨ã—ã¦è¿½åŠ "
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "警告!"
@@ -10007,6 +10451,11 @@ msgstr "警告!"
msgid "Please Confirm..."
msgstr "確èª..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "親フォルダã¸"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10019,7 +10468,7 @@ msgstr ""
#: scene/gui/range.cpp
msgid "If exp_edit is true min_value must be > 0."
-msgstr ""
+msgstr "exp_edit ãŒtrueã®å ´åˆã€min_value ã¯0より大ãã„å¿…è¦ãŒã‚りã¾ã™ã€‚"
#: scene/gui/scroll_container.cpp
msgid ""
@@ -10045,6 +10494,7 @@ msgstr ""
"ã„る環境(Environment)ã¯èª­ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ."
#: scene/main/viewport.cpp
+#, fuzzy
msgid ""
"This viewport is not set as render target. If you intend for it to display "
"its contents directly to the screen, make it a child of a Control so it can "
@@ -10086,11 +10536,30 @@ msgstr ""
#: servers/visual/shader_language.cpp
msgid "Assignment to uniform."
-msgstr ""
+msgstr "uniform ã¸ã®å‰²ã‚Šå½“ã¦ã€‚"
#: servers/visual/shader_language.cpp
+#, fuzzy
msgid "Varyings can only be assigned in vertex function."
-msgstr ""
+msgstr "Varyingã¯é ‚点関数ã«ã®ã¿å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
+
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³ã‚’é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã®å­ã¨ã—ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã—ã¾ã™ã€‚"
+
+#~ msgid "FPS"
+#~ msgstr "フレームレート"
+
+#~ msgid "Warnings:"
+#~ msgstr "警告:"
+
+#~ msgid "Font Size:"
+#~ msgstr "フォントサイズ:"
+
+#~ msgid "Line:"
+#~ msgstr "行:"
+
+#~ msgid "Col:"
+#~ msgstr "列:"
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
@@ -10251,10 +10720,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "å°æ–‡å­—ã«å¤‰æ›"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Snapモード:"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "0度回転"
@@ -10826,9 +11291,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "加ãˆãŸã®ã¯:"
-#~ msgid "Removed:"
-#~ msgstr "å–り除ã„ãŸã®ã¯:"
-
#, fuzzy
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "アトラスã®è¦ç´ ã§ã‚るテクスãƒãƒ£ã®ä¿å­˜ãŒã§ãã¾ã›ã‚“:"
@@ -11158,10 +11620,6 @@ msgstr ""
#~ msgstr "エラーをインãƒãƒ¼ãƒˆä¸­:"
#, fuzzy
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "大ããªãƒ†ã‚¯ã‚¹ãƒãƒ£ã®ãŸã‚ã«ä¸€ã¤ãƒ•ァイルãŒå¿…è¦ã§ã™"
-
-#, fuzzy
#~ msgid "Max Texture Size:"
#~ msgstr "最大テクスãƒãƒ£ã‚µã‚¤ã‚º:"
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index d14fe2be04..e7fbffc52a 100644
--- a/editor/translations/ka.po
+++ b/editor/translations/ka.po
@@ -4,12 +4,14 @@
# This file is distributed under the same license as the Godot source code.
# Giorgi Beriashvili <giorgi.beriashvili@outlook.com>, 2018.
# George Dzavashvili <dzavashviligeorge@gmail.com>, 2018.
+# დემეტრე შáƒáƒœáƒ˜áƒ <blender.animation.maker@gmail.com>, 2019.
+# Rati Nikolaishvili <rati.nikolaishvili@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:41+0100\n"
-"Last-Translator: George Dzavashvili <dzavashviligeorge@gmail.com>\n"
+"PO-Revision-Date: 2019-03-10 09:58+0000\n"
+"Last-Translator: Rati Nikolaishvili <rati.nikolaishvili@gmail.com>\n"
"Language-Team: Georgian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ka/>\n"
"Language: ka\n"
@@ -17,7 +19,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -61,31 +63,39 @@ msgstr ""
#: editor/animation_bezier_editor.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "თáƒáƒ•ისუფáƒáƒšáƒ˜"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr ""
+msgstr "დáƒáƒ‘áƒáƒšáƒáƒœáƒ¡áƒ”ბული"
#: editor/animation_bezier_editor.cpp
msgid "Mirror"
-msgstr ""
+msgstr "სáƒáƒ áƒ™áƒ”"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Insert Key Here"
-msgstr "áƒáƒœáƒ˜áƒ› გáƒáƒ¡áƒáƒ¦áƒ”ბის ჩáƒáƒ§áƒ”ნებáƒ"
+msgstr "áƒáƒ¥ ჩáƒáƒ¡áƒ•ით გáƒáƒ¡áƒáƒ¦áƒ”ბი"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Duplicate Selected Key(s)"
-msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის áƒáƒ¡áƒšáƒ˜áƒ¡ შექმნáƒ"
+msgstr "მáƒáƒœáƒ˜áƒ¨áƒœáƒ£áƒšáƒ˜ გáƒáƒ¡áƒáƒ¦áƒ”ბ(ებ)ის áƒáƒ¡áƒšáƒ˜áƒ¡ შექმნáƒ"
#: editor/animation_bezier_editor.cpp
#, fuzzy
msgid "Delete Selected Key(s)"
msgstr "წáƒáƒ•შáƒáƒšáƒáƒ— მáƒáƒœáƒ˜áƒ¨áƒœáƒ£áƒšáƒ˜ ფáƒáƒ˜áƒšáƒ”ბი?"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ¡áƒáƒ¦áƒ”ბების áƒáƒ¡áƒšáƒ˜áƒ¡ შექმნáƒ"
@@ -100,7 +110,7 @@ msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ¡áƒáƒ¦áƒ”ბური კáƒáƒ“რá
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ áƒ“áƒáƒ›áƒáƒ›áƒ•ლáƒáƒ‘ის ცვლილებáƒ"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ áƒ“áƒáƒ›áƒáƒ›áƒ•ლáƒáƒ‘ის შეცვლáƒ"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
@@ -115,16 +125,29 @@ msgid "Anim Change Call"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ძáƒáƒ®áƒ˜áƒšáƒ˜áƒ¡ ცვლილებáƒ"
#: editor/animation_track_editor.cpp
-msgid "Property Track"
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "áƒáƒœáƒ˜áƒ› სიგრძის შეცვლáƒ"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Property Track"
+msgstr "áƒáƒ‘იექტზე დáƒáƒ™áƒ•ირვებáƒ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "3D Transform Track"
-msgstr ""
+msgstr "3D გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ დáƒáƒ™áƒ•ირვებáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Call Method Track"
-msgstr ""
+msgstr "მეთáƒáƒ“ის გáƒáƒ›áƒáƒ«áƒáƒ®áƒ”ბის დáƒáƒ™áƒ•ირვებáƒ"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
@@ -139,7 +162,6 @@ msgid "Animation Playback Track"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ"
@@ -151,32 +173,40 @@ msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ხáƒáƒœáƒ’რძლივáƒáƒ‘რ(წáƒ
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Animation Looping"
-msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ზუმი."
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ბრუნვáƒ"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
-msgstr ""
+msgstr "ფუნქციები:"
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
-msgstr ""
+msgstr "ხმáƒáƒ•áƒáƒœáƒ˜ მáƒáƒœáƒáƒ™áƒ•ეთები:"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
-msgstr ""
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ მáƒáƒœáƒáƒ™áƒ•ეთები:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "მáƒáƒ¡áƒ˜áƒ•ის მნიშვნელáƒáƒ‘ის ცვლილებáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
-msgstr ""
+msgstr "ჩáƒáƒœáƒáƒ¬áƒ”რის ჩáƒáƒ áƒ—ვრ/ გáƒáƒ›áƒáƒ áƒ—ვáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "გáƒáƒœáƒáƒ®áƒšáƒ”ბის რეჟიმი (რáƒáƒ’áƒáƒ áƒáƒª ეს პáƒáƒ áƒáƒ›áƒ”ტრირდáƒáƒ§áƒ”ნებული)"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Interpolation Mode"
-msgstr ""
+msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
@@ -185,12 +215,16 @@ msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Remove this track."
-msgstr "მáƒáƒœáƒ˜áƒ¨áƒœáƒ£áƒšáƒ˜ თრექის წáƒáƒ¨áƒšáƒ."
+msgstr "მáƒáƒœáƒ˜áƒ¨áƒœáƒ£áƒšáƒ˜ ჩáƒáƒœáƒáƒ¬áƒ”რის წáƒáƒ¨áƒšáƒ."
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Time (s): "
-msgstr "ნáƒáƒ‘იჯი (წáƒáƒ›áƒ˜):"
+msgstr "დრრ(წáƒáƒ›áƒ˜): "
+
+#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -206,11 +240,11 @@ msgstr "სáƒáƒ¡áƒ®áƒšáƒ”ტი"
#: editor/animation_track_editor.cpp
msgid "Capture"
-msgstr ""
+msgstr "გáƒáƒ“áƒáƒ¦áƒ”ბáƒ"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr ""
+msgstr "უáƒáƒ®áƒšáƒáƒ”სი"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
@@ -219,7 +253,7 @@ msgstr "წრფივი"
#: editor/animation_track_editor.cpp
msgid "Cubic"
-msgstr ""
+msgstr "კუბური"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
@@ -232,7 +266,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr ""
+msgstr "ჩáƒáƒ¡áƒ•ით გáƒáƒ¡áƒáƒ¦áƒ”ბი"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -245,16 +279,32 @@ msgid "Delete Key(s)"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ¡áƒáƒ¦áƒ”ბების წáƒáƒ¨áƒšáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "ლექსიკáƒáƒœáƒ˜áƒ¡ მნიშვნელáƒáƒ‘ის შეცვლáƒ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "áƒáƒœáƒ˜áƒ› ლუპის შეცვლáƒ"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის წáƒáƒ¨áƒšáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Create NEW track for %s and insert key?"
-msgstr "áƒáƒ®áƒáƒšáƒ˜ თრექის შექმნრ%s სთვის დრგáƒáƒ¡áƒáƒ¦áƒ”ბის ჩáƒáƒ¡áƒ›áƒ?"
+msgstr "შევქმნრáƒáƒ®áƒáƒšáƒ˜ მáƒáƒœáƒáƒ™áƒ•ეთი %s-თვის დრჩáƒáƒ•სვრგáƒáƒ¡áƒáƒ¦áƒ”ბი?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
-msgstr "áƒáƒ®áƒáƒšáƒ˜ %d თრექების შექმნრდრგáƒáƒ¡áƒáƒ¦áƒ”ბების ჩáƒáƒ¡áƒ›áƒ?"
+msgstr "áƒáƒ®áƒáƒšáƒ˜ %d ჩáƒáƒœáƒáƒ¬áƒ”რების შექმნრდრგáƒáƒ¡áƒáƒ¦áƒ”ბების ჩáƒáƒ¡áƒ›áƒ?"
#: editor/animation_track_editor.cpp editor/create_dialog.cpp
#: editor/editor_audio_buses.cpp editor/editor_plugin_settings.cpp
@@ -270,8 +320,11 @@ msgid "Anim Insert"
msgstr "áƒáƒœáƒ˜áƒ› ჩáƒáƒ§áƒ”ნებáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "AnimationPlayer can't animate itself, only other players."
msgstr ""
+"áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ›áƒ¨áƒ•ები ვერ ჩáƒáƒáƒ¢áƒáƒ áƒ”ბს ცდებს სáƒáƒ™áƒ£áƒ—áƒáƒ  თáƒáƒ•ზე, მხáƒáƒšáƒáƒ“ სხვრ"
+"მáƒáƒ—áƒáƒ›áƒáƒ¨áƒ”ებზე."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -279,13 +332,22 @@ msgstr "áƒáƒœáƒ˜áƒ› შექმნრ& ჩáƒáƒ§áƒ”ნებáƒ"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Track & Key"
-msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დრგáƒáƒ¡áƒáƒ¦áƒ”ბის ჩáƒáƒ›áƒáƒ¢áƒ”ბáƒ"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ჩáƒáƒœáƒáƒ¬áƒ”რის დრგáƒáƒ¡áƒáƒ¦áƒ”ბის ჩáƒáƒ›áƒáƒ¢áƒ”ბáƒ"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Key"
msgstr "áƒáƒœáƒ˜áƒ› გáƒáƒ¡áƒáƒ¦áƒ”ბის ჩáƒáƒ§áƒ”ნებáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "áƒáƒœáƒ˜áƒ› სიგრძის შეცვლáƒ"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -307,35 +369,63 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr ""
+msgstr "შეუძლებელირდáƒáƒáƒ›áƒáƒ¢áƒ áƒáƒ®áƒáƒšáƒ˜ ჩáƒáƒœáƒáƒ¬áƒ”რი ფესვის გáƒáƒ áƒ”შე"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track path is invalid, so can't add a key."
-msgstr ""
+msgstr "ჩáƒáƒœáƒáƒ¬áƒ”რის მისáƒáƒ›áƒáƒ áƒ—ი áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜áƒ, áƒáƒ¡áƒ” რáƒáƒ› შეუძლებელირგáƒáƒ¡áƒáƒ¦áƒ”ბის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ"
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
+msgstr "ჩáƒáƒœáƒáƒ¬áƒ”რი áƒáƒ  áƒáƒ áƒ˜áƒ¡ სივრცის სáƒáƒ®áƒ˜áƒ¡, ვერ ჩáƒáƒ¡áƒ•áƒáƒ›áƒ— გáƒáƒ¡áƒáƒ¦áƒ”ბს"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3D გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ დáƒáƒ™áƒ•ირვებáƒ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
+"ჩáƒáƒœáƒáƒ¬áƒ”რის მისáƒáƒ›áƒáƒ áƒ—ი áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜áƒ, áƒáƒ¡áƒ” რáƒáƒ› შეუძლებელირმეთáƒáƒ“ური გáƒáƒ¡áƒáƒ¦áƒ”ბის "
+"დáƒáƒ›áƒáƒ¢áƒ”ბáƒ."
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "მეთáƒáƒ“ის გáƒáƒ›áƒáƒ«áƒáƒ®áƒ”ბის დáƒáƒ™áƒ•ირვებáƒ"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
-msgstr ""
+msgstr "მეთáƒáƒ“ი ვერ მáƒáƒ˜áƒ«áƒ”ბნრáƒáƒ‘იექტში: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ¡áƒáƒ¦áƒ”ბების გáƒáƒ“áƒáƒáƒ“გილებáƒ"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Clipboard is empty"
+msgstr "ბუფერი ცáƒáƒ áƒ˜áƒ”ლიáƒ"
+
+#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
-msgstr "áƒáƒœáƒ˜áƒ› გáƒáƒ¡áƒáƒ¦áƒ”ბების შკáƒáƒšáƒ˜áƒ áƒ”ბáƒ"
+msgstr "áƒáƒœáƒ˜áƒ› გáƒáƒ¡áƒáƒ¦áƒ”ბების ზáƒáƒ›áƒ˜áƒ¡ შეცვლáƒ"
#: editor/animation_track_editor.cpp
msgid ""
@@ -344,21 +434,19 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
-msgstr ""
+msgstr "მხáƒáƒšáƒáƒ“ áƒáƒ©áƒ•ენე ჩáƒáƒœáƒáƒ¬áƒ”რები კვáƒáƒœáƒ«áƒ”ბიდáƒáƒœ მáƒáƒœáƒ˜áƒ¨áƒœáƒ£áƒšáƒ˜ ხეში."
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
-msgstr ""
+msgstr "დáƒáƒáƒ¯áƒ’უფე ჩáƒáƒœáƒáƒ¬áƒ”რები კვáƒáƒœáƒ«áƒ”ბის მიხედვით áƒáƒœ áƒáƒ©áƒ•ენე რáƒáƒ’áƒáƒ áƒª უბრáƒáƒšáƒ სიáƒ."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Snap (s): "
-msgstr "ნáƒáƒ‘იჯი (წáƒáƒ›áƒ˜):"
+msgstr "ნáƒáƒ‘იჯი (s): "
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation step value."
-msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ზუმი."
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ნáƒáƒ‘იჯის ღირებულებáƒ."
#: editor/animation_track_editor.cpp editor/editor_properties.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -367,22 +455,17 @@ msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ზუმი."
#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/property_editor.cpp modules/visual_script/visual_script_editor.cpp
msgid "Edit"
-msgstr ""
+msgstr "შეცვლáƒ"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation properties."
-msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ზუმი."
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ . პáƒáƒ áƒáƒ›áƒ”ტრები."
#: editor/animation_track_editor.cpp
msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის მáƒáƒ¡áƒ¨áƒ¢áƒáƒ‘ის ცვლილებáƒ"
@@ -485,6 +568,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "ხმáƒáƒ•áƒáƒœáƒ˜ მáƒáƒœáƒáƒ™áƒ•ეთები:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "მáƒáƒ¡áƒ˜áƒ•ის ზáƒáƒ›áƒ˜áƒ¡ ცვლილებáƒ"
@@ -549,22 +645,14 @@ msgstr "ზუმის დáƒáƒžáƒáƒ¢áƒáƒ áƒáƒ•ებáƒ"
msgid "Reset Zoom"
msgstr "ზუმის სáƒáƒ¬áƒ§áƒ˜áƒ¡áƒ–ე დáƒáƒ§áƒ”ნებáƒ"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "ხáƒáƒ–ი:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "სვეტი:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "სáƒáƒ›áƒ˜áƒ–ნე კვáƒáƒœáƒ«áƒ¨áƒ˜ მეთáƒáƒ“ი უნდრიყáƒáƒ¡ გáƒáƒœáƒ¡áƒáƒ–ღვრული!"
@@ -869,8 +957,8 @@ msgstr "წáƒáƒ•შáƒáƒšáƒáƒ— მáƒáƒœáƒ˜áƒ¨áƒœáƒ£áƒšáƒ˜ ფáƒáƒ˜áƒšáƒ”ბá
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "წáƒáƒ¨áƒšáƒ"
@@ -1127,7 +1215,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1156,6 +1244,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1299,6 +1391,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1345,7 +1457,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1420,10 +1532,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1649,8 +1781,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1659,6 +1791,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1850,6 +1992,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2339,7 +2489,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2890,14 +3040,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3037,10 +3179,6 @@ msgid "Search files"
msgstr "ძებნáƒ:"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3389,39 +3527,39 @@ msgid "Create Polygon"
msgstr "შექმნáƒ"
#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
-msgid "Edit Polygon"
+msgid "Create points."
msgstr "შექმნáƒ"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
-msgid "Create points."
+msgid "Edit Polygon"
msgstr "შექმნáƒ"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3441,12 +3579,45 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "სáƒáƒ§áƒ•áƒáƒ áƒšáƒ”ბი:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ბრუნვáƒ"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3487,6 +3658,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ თრექის დáƒáƒ›áƒáƒ¢áƒ”ბáƒ"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3495,6 +3687,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3512,6 +3708,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3521,11 +3721,53 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "დáƒáƒ™áƒáƒ•შირებáƒ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "კáƒáƒ•შირის გáƒáƒ¬áƒ§áƒ•ეტáƒ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ áƒáƒžáƒ¢áƒ˜áƒ›áƒ˜áƒ–áƒáƒªáƒ˜áƒ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "წáƒáƒ¨áƒšáƒ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "ჩáƒáƒœáƒáƒ¬áƒ”რის ჩáƒáƒ áƒ—ვრ/ გáƒáƒ›áƒáƒ áƒ—ვáƒ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "áƒáƒœáƒ˜áƒ› სიგრძის შეცვლáƒ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3541,6 +3783,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3768,6 +4015,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "გáƒáƒ áƒ“áƒáƒ¡áƒ•ლáƒ"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3796,6 +4057,20 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "მáƒáƒ¨áƒáƒ áƒ”ბáƒ"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "გáƒáƒ áƒ“áƒáƒ¡áƒ•ლáƒ"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4211,6 +4486,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4593,6 +4878,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4849,19 +5138,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4952,11 +5241,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5112,6 +5401,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5743,6 +6038,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5851,10 +6154,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5899,7 +6198,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5991,6 +6290,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5999,6 +6304,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6211,7 +6520,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6276,10 +6585,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6288,8 +6593,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "ფუნქციები:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ áƒáƒžáƒ¢áƒ˜áƒ›áƒ˜áƒ–áƒáƒªáƒ˜áƒ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6300,8 +6611,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ . პáƒáƒ áƒáƒ›áƒ”ტრები."
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6593,6 +6905,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6606,6 +6934,11 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "áƒáƒ®áƒáƒšáƒ˜ %s შექმნáƒ"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "შექმნáƒ"
@@ -6736,6 +7069,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "შექმნáƒ"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "მáƒáƒ¨áƒáƒ áƒ”ბáƒ"
@@ -6779,6 +7121,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ¡áƒáƒ¦áƒ”ბების áƒáƒ¡áƒšáƒ˜áƒ¡ შექმნáƒ"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6794,6 +7157,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6807,7 +7178,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6819,6 +7199,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7092,6 +7480,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7787,6 +8188,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7821,6 +8226,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "კვáƒáƒœáƒ«áƒ—áƒáƒœ დáƒáƒ™áƒáƒ•შირებáƒ:"
@@ -8234,6 +8643,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8439,6 +8860,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8576,10 +9001,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8738,10 +9159,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8824,6 +9241,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9212,6 +9633,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9341,6 +9769,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9355,6 +9789,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9367,6 +9807,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9397,21 +9844,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9435,6 +9867,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9480,11 +9927,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9495,6 +9958,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9568,6 +10035,12 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "ხáƒáƒ–ი:"
+
+#~ msgid "Col:"
+#~ msgstr "სვეტი:"
+
#, fuzzy
#~ msgid "Remove Split"
#~ msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის მáƒáƒ¨áƒáƒ áƒ”ბáƒ"
@@ -9631,12 +10104,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "გáƒáƒ áƒ”დáƒáƒœ-შიგნით"
-#~ msgid "Change Anim Len"
-#~ msgstr "áƒáƒœáƒ˜áƒ› სიგრძის შეცვლáƒ"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "áƒáƒœáƒ˜áƒ› ლუპის შეცვლáƒ"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ტიპირებული გáƒáƒ¡áƒáƒ¦áƒ”ბის შექმნáƒ"
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index 23e4633092..79597943ab 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
"Last-Translator: 송태섭 <xotjq237@gmail.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
@@ -25,7 +25,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -49,23 +49,23 @@ msgstr "ì¸ìŠ¤í„´ìŠ¤ê°€ 비어있기 ë•Œë¬¸ì— Self를 사용할 수 없습니ë‹
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr "ì—°ì‚°ìž %s, %s ë° %s ì˜ ì—°ì‚° 대ìƒì´ 유효하지 않습니다."
+msgstr "ì—°ì‚°ìž %s, %s 그리고 %sì˜ ì—°ì‚° 대ìƒì´ 유효하지 않습니다."
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
-msgstr "ë² ì´ìФ 타입 %s ì— ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ë±ìФ 타입 %s"
+msgstr "ë² ì´ìФ 타입 %sì— ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ë±ìФ 타입 %s"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr "ë² ì´ìФ 타입 %s ì— ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ë±ìФ ì´ë¦„ %s"
+msgstr "ë² ì´ìФ 타입 %sì— ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ë±ìФ ì´ë¦„ %s"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "'%s' ì„ êµ¬ì„±í•˜ê¸°ì— ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ìˆ˜"
+msgstr "'%s'ì„(를) êµ¬ì„±í•˜ê¸°ì— ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ìˆ˜"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr "'%s' 를 호출 시:"
+msgstr "'%s'ì„(를) 호출 시:"
#: editor/animation_bezier_editor.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -92,6 +92,14 @@ msgstr "ì„ íƒí•œ 키를 복제"
msgid "Delete Selected Key(s)"
msgstr "ì„ íƒí•œ 키를 ì‚­ì œ"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "베지어 í¬ì¸íЏ 추가"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "베지어 í¬ì¸íЏ ì´ë™"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "애니메ì´ì…˜ 키 복제"
@@ -121,6 +129,15 @@ msgid "Anim Change Call"
msgstr "애니메ì´ì…˜ 호출 변경"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "애니메ì´ì…˜ ê¸¸ì´ ë³€ê²½"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "애니메ì´ì…˜ 루프 변경"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "ì†ì„± 트랙"
@@ -170,6 +187,10 @@ msgid "Anim Clips:"
msgstr "애니메ì´ì…˜ í´ë¦½:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "트랙 경로 변경"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "ì´ íŠ¸ëž™ì„ í‚¤ê±°ë‚˜ ë•니다."
@@ -194,6 +215,10 @@ msgid "Time (s): "
msgstr "시간 (초): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "트랙 활성화 토글"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "ì—°ì†ì "
@@ -244,12 +269,24 @@ msgid "Delete Key(s)"
msgstr "키 삭제"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "애니메ì´ì…˜ ì—…ë°ì´íЏ 모드 변경"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "애니메ì´ì…˜ ë³´ê°„ 모드 변경"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "애니메ì´ì…˜ 루프 모드 변경"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "애니메ì´ì…˜ 트랙 ì‚­ì œ"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr "%s (ì„)를 위해 새 íŠ¸ëž™ì„ ë§Œë“¤ê³  키를 삽입하시겠습니까?"
+msgstr "%sì„(를) 위해 새 íŠ¸ëž™ì„ ë§Œë“¤ê³  키를 삽입하시겠습니까?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
@@ -286,6 +323,14 @@ msgid "Anim Insert Key"
msgstr "애니메ì´ì…˜ 키 삽입"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "애니메ì´ì…˜ ìŠ¤í… ë³€ê²½"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "트랙 재정렬"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "변형 íŠ¸ëž™ì€ ì˜¤ì§ Spatial 기반 노드ì—ë§Œ ì ìš©ë©ë‹ˆë‹¤."
@@ -315,6 +360,10 @@ msgid "Not possible to add a new track without a root"
msgstr "루트 ì—†ì´ ìƒˆ íŠ¸ëž™ì„ ì¶”ê°€í•  수 ì—†ìŒ"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "베지어 트랙 추가"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "트랙 경로가 유효하지 않습니다, 키를 추가하실 수 없습니다."
@@ -323,10 +372,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "íŠ¸ëž™ì´ Spatial íƒ€ìž…ì´ ì•„ë‹™ë‹ˆë‹¤, 키를 삽입하실 수 없습니다"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "변형 트랙 키 추가"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "트랙 키 추가"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "트랙 경로가 유효하지 않습니다, 메서드 키를 추가하실 수 없습니다."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "메서드 트랙 키 추가"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "ê°ì²´ì— 메서드가 없습니다: "
@@ -339,6 +400,10 @@ msgid "Clipboard is empty"
msgstr "í´ë¦½ë³´ë“œê°€ 비었습니다"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "트랙 붙여넣기"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "애니메ì´ì…˜ 키 í¬ê¸° ì¡°ì ˆ"
@@ -381,10 +446,6 @@ msgid "Copy Tracks"
msgstr "트랙 복사"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "트랙 붙여넣기"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "ì„ íƒ í¬ê¸° ì¡°ì ˆ"
@@ -418,7 +479,7 @@ msgstr "애니메ì´ì…˜ 최ì í™”"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation"
-msgstr "애니메ì´ì…˜ 정리"
+msgstr "애니메ì´ì…˜ 없애기"
#: editor/animation_track_editor.cpp
msgid "Pick the node that will be animated:"
@@ -484,6 +545,18 @@ msgstr "복사할 트랙 ì„ íƒ:"
msgid "Copy"
msgstr "복사하기"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "오디오 트랙 í´ë¦½ 추가"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "오디오 트랙 í´ë¦½ 시작 오프셋 변경"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "오디오 트랙 í´ë¦½ 종료 오프셋 변경"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "ë°°ì—´ í¬ê¸° 변경"
@@ -548,21 +621,13 @@ msgstr "축소"
msgid "Reset Zoom"
msgstr "줌 리셋"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "경고:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "í°íЏ í¬ê¸°:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "ë¼ì¸:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "경고"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "칼럼:"
+msgid "Line and column numbers."
+msgstr "ë¼ì¸ ë° ì»¬ëŸ¼ 번호."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -639,11 +704,11 @@ msgstr "ì—°ê²°"
#: editor/connections_dialog.cpp
msgid "Connect '%s' to '%s'"
-msgstr "'%s'를 '%s'ì— ì—°ê²°"
+msgstr "'%s'ì„(를) '%s'ì— ì—°ê²°"
#: editor/connections_dialog.cpp
msgid "Disconnect '%s' from '%s'"
-msgstr "'%s'와 '%s'ì˜ ì—°ê²° í•´ì œ"
+msgstr "'%s'와(ê³¼) '%s'ì˜ ì—°ê²° í•´ì œ"
#: editor/connections_dialog.cpp
msgid "Disconnect all from signal: '%s'"
@@ -672,7 +737,7 @@ msgstr "\"%s\" 시그ë„ì—서 모든 ì—°ê²°ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
-msgstr "시그ë„(Signal)"
+msgstr "시그ë„"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
@@ -692,7 +757,7 @@ msgstr "메서드로 ì´ë™"
#: editor/create_dialog.cpp
msgid "Change %s Type"
-msgstr "%s로 타입 변경"
+msgstr "%s(으)로 타입 변경"
#: editor/create_dialog.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -744,7 +809,7 @@ msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will not take effect unless reloaded."
msgstr ""
-"씬 '%s'(ì´)ê°€ 현재 편집 중입니다.\n"
+"씬 '%s'ì´(ê°€) 현재 편집 중입니다.\n"
"다시 불러올 때 변경 ì‚¬í•­ì´ ì ìš©ë©ë‹ˆë‹¤."
#: editor/dependency_editor.cpp
@@ -818,7 +883,7 @@ msgstr "삭제할 수 없습니다:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
-msgstr "불러오기 중 ì—러:"
+msgstr "불러오기 중 오류:"
#: editor/dependency_editor.cpp
msgid "Load failed due to missing dependencies:"
@@ -838,7 +903,7 @@ msgstr "ì¢…ì† ê´€ê³„ 수정"
#: editor/dependency_editor.cpp
msgid "Errors loading!"
-msgstr "불러오기 중 ì—러 ë°œìƒ!"
+msgstr "불러오기 중 오류 ë°œìƒ!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
@@ -863,8 +928,8 @@ msgstr "ì„ íƒëœ 파ì¼ë“¤ì„ 삭제하시겠습니까?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "삭제"
@@ -1119,8 +1184,8 @@ msgid "Add Bus"
msgstr "버스 추가"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "새로운 버스 ë ˆì´ì•„ì›ƒì„ ë§Œë“­ë‹ˆë‹¤."
+msgid "Add a new Audio Bus to this layout."
+msgstr "ì´ ë ˆì´ì•„ì›ƒì— ìƒˆ 오디오 버스를 추가합니다."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1148,6 +1213,10 @@ msgstr "기본값 불러오기"
msgid "Load the default Bus Layout."
msgstr "기본 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "새로운 버스 ë ˆì´ì•„ì›ƒì„ ë§Œë“­ë‹ˆë‹¤."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "유효하지 ì•Šì€ ì´ë¦„."
@@ -1293,6 +1362,29 @@ msgstr "ì˜ˆìƒ ê²½ë¡œì—서 내보내기 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다:"
msgid "Packing"
msgstr "패킹 중"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr "ëŒ€ìƒ í”Œëž«í¼ì€ GLES2를 위해 'ETC' í…ìŠ¤ì³ ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì íЏ 설정ì—서 'Import Etc'ì„ ì‚¬ìš©í•˜ì„¸ìš”."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"ëŒ€ìƒ í”Œëž«í¼ì€ GLES3를 위해 'ETC2' í…ìŠ¤ì³ ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì íЏ 설정ì—서 'Import Etc 2'를 사용하세요."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"ëŒ€ìƒ í”Œëž«í¼ì€ 드ë¼ì´ë²„ê°€ GLES2로 í´ë°±í•˜ê¸° 위해 'ETC' í…ìŠ¤ì³ ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤.\n"
+"프로ì íЏ 설정ì—서 'Import Etc'ì„ í‚¤ê±°ë‚˜, 'Driver Fallback Enabled'를 비활성화하세요."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1338,7 +1430,7 @@ msgstr "íŒŒì¼ íƒìƒ‰ê¸°ì—서 보기"
msgid "New Folder..."
msgstr "새 í´ë”..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "새로고침"
@@ -1413,10 +1505,30 @@ msgstr "ì¦ê²¨ì°¾ê¸° 위로 ì´ë™"
msgid "Move Favorite Down"
msgstr "ì¦ê²¨ì°¾ê¸° 아래로 ì´ë™"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr "ì´ì „ í´ë”"
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr "ë‹¤ìŒ í´ë”"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "부모 í´ë”로 ì´ë™"
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr "현재 í´ë”를 ì¦ê²¨ì°¾ê¸° (안) 합니다."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "ì¸ë„¤ì¼ 바둑íŒìœ¼ë¡œ 보기."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "리스트로 보기."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "디렉토리와 파ì¼:"
@@ -1639,9 +1751,9 @@ msgstr "출력 지우기"
msgid "Project export failed with error code %d."
msgstr "프로ì íЏ 내보내기가 오류 코드 %d 로 실패했습니다."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "리소스 저장 중 ì—러!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr "가져온 리소스를 저장할 수 없습니다."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1649,6 +1761,16 @@ msgid "OK"
msgstr "확ì¸"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "리소스 저장 중 오류!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr "ì´ ë¦¬ì†ŒìŠ¤ëŠ” íŽ¸ì§‘ëœ ì”¬ì— ì†í•´ìžˆì§€ 않기 ë•Œë¬¸ì— ì €ìž¥í•  수 없습니다. 먼저 리소스를 유ì¼í•˜ê²Œ 만드세요."
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "리소스를 다른 ì´ë¦„으로 저장..."
@@ -1662,27 +1784,27 @@ msgstr "요청한 íŒŒì¼ í˜•ì‹ì„ 알 수 ì—†ìŒ:"
#: editor/editor_node.cpp
msgid "Error while saving."
-msgstr "저장 중 ì—러."
+msgstr "저장 중 오류."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr "'%s' 를 ì—´ 수 없습니다. 파ì¼ì´ 존재하지 않습니다."
+msgstr "'%s'ì„(를) ì—´ 수 없습니다. 파ì¼ì´ 존재하지 않습니다."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
-msgstr "'%s' 파싱 중 ì—러."
+msgstr "'%s' 구문 ë¶„ì„ ì¤‘ 오류."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr "예ìƒì¹˜ 못한 파ì¼ì˜ ë '%s' 입니다..."
+msgstr "예ìƒì¹˜ 못한 '%s' 파ì¼ì˜ ë."
#: editor/editor_node.cpp
msgid "Missing '%s' or its dependencies."
-msgstr "'%s' 없거나 ì¢…ì† í•­ëª©ì´ ì—†ìŠµë‹ˆë‹¤."
+msgstr "'%s'ì´(ê°€) 없거나 ì¢…ì† í•­ëª©ì´ ì—†ìŠµë‹ˆë‹¤."
#: editor/editor_node.cpp
msgid "Error while loading '%s'."
-msgstr "'%s' 로딩 중 ì—러."
+msgstr "'%s' 로딩 중 오류."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1726,7 +1848,7 @@ msgstr "병합할 메시 ë¼ì´ë¸ŒëŸ¬ë¦¬ë¥¼ 불러올 수 없습니다!"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
-msgstr "메시 ë¼ì´ë¸ŒëŸ¬ë¦¬ 저장 중 ì—러!"
+msgstr "메시 ë¼ì´ë¸ŒëŸ¬ë¦¬ 저장 중 오류!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
@@ -1734,11 +1856,11 @@ msgstr "병합할 타ì¼ì…‹ì„ 불러올 수 없습니다!"
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
-msgstr "타ì¼ì…‹ 저장 중 ì—러!"
+msgstr "타ì¼ì…‹ 저장 중 오류!"
#: editor/editor_node.cpp
msgid "Error trying to save layout!"
-msgstr "ë ˆì´ì•„웃 저장 ì‹œë„ ì¤‘ ì—러!"
+msgstr "ë ˆì´ì•„웃 저장 ì‹œë„ ì¤‘ 오류!"
#: editor/editor_node.cpp
msgid "Default editor layout overridden."
@@ -1861,7 +1983,15 @@ msgstr "저장 ë° ë‹«ê¸°"
#: editor/editor_node.cpp
msgid "Save changes to '%s' before closing?"
-msgstr "닫기 ì „ì— '%s' ì— ë³€ê²½ì‚¬í•­ì„ ì €ìž¥í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
+msgstr "닫기 ì „ì— '%s'ì— ë³€ê²½ì‚¬í•­ì„ ì €ìž¥í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
+
+#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "%s ìˆ˜ì •ëœ ë¦¬ì†ŒìŠ¤ê°€ 저장ë˜ì—ˆìŠµë‹ˆë‹¤."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "ì”¬ì„ ì €ìž¥í•˜ê¸° 위해 루트 노드가 필요합니다."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -1957,35 +2087,35 @@ msgstr "ë©”ì¸ ì”¬ ì„ íƒ"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
-msgstr "애드온 플러그ì¸ì„ 활성화할 수 없습니다: '%s' 설정 í•´ì„ ì‹¤íŒ¨."
+msgstr "애드온 플러그ì¸ì„ 활성화할 수 없습니다: '%s' 구성 구문 ë¶„ì„ ì‹¤íŒ¨."
#: editor/editor_node.cpp
msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
-msgstr "애드온 플러그ì¸ì„ ì°¾ì„ ìˆ˜ 없습니다: 'res://addons/%s'."
+msgstr "ë‹¤ìŒ ê²½ë¡œì—서 애드온 플러그ì¸ì„ ì°¾ì„ ìˆ˜ 없습니다: 'res://addons/%s'."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s'."
-msgstr "애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s'."
+msgstr "ë‹¤ìŒ ê²½ë¡œì—서 애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s'."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' There seems to be an error in "
"the code, please check the syntax."
msgstr ""
-"해당 경로ì—서 애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s' ì½”ë“œì— ì˜¤ë¥˜ê°€ 있는 "
+"ë‹¤ìŒ ê²½ë¡œì—서 애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s' ì½”ë“œì— ì˜¤ë¥˜ê°€ 있는 "
"것 같습니다, êµ¬ë¬¸ì„ í™•ì¸í•´ 보십시오."
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
-"해당 경로ì—서 애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s' 기본 íƒ€ìž…ì´ "
+"ë‹¤ìŒ ê²½ë¡œì—서 애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s' 기본 íƒ€ìž…ì´ "
"EditorPluginì´ ì•„ë‹™ë‹ˆë‹¤."
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
-"해당 경로ì—서 애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s' 스í¬ë¦½íŠ¸ê°€ tool 모드"
+"ë‹¤ìŒ ê²½ë¡œì—서 애드온 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 없습니다: '%s' 스í¬ë¦½íŠ¸ê°€ tool 모드"
"가 아닙니다."
#: editor/editor_node.cpp
@@ -2001,12 +2131,12 @@ msgid ""
"Error loading scene, it must be inside the project path. Use 'Import' to "
"open the scene, then save it inside the project path."
msgstr ""
-"씬 로딩 중 ì—러가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. 프로ì íЏ 경로 ì•ˆì— ì¡´ìž¬í•´ì•¼ 합니다. '가져오"
+"씬 로딩 중 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. 프로ì íЏ 경로 ì•ˆì— ì¡´ìž¬í•´ì•¼ 합니다. '가져오"
"기'로 ì”¬ì„ ì—° 후ì—, 프로ì íЏ 경로 ì•ˆì— ì €ìž¥í•˜ì„¸ìš”."
#: editor/editor_node.cpp
msgid "Scene '%s' has broken dependencies:"
-msgstr "'%s' ì”¬ì˜ ì¢…ì† í•­ëª©ì´ ê¹¨ì ¸ìžˆìŠµë‹ˆë‹¤:"
+msgstr "'%s' ì”¬ì˜ ì¢…ì† í•­ëª©ì´ ê¹¨ì ¸ 있습니다:"
#: editor/editor_node.cpp
msgid "Clear Recent Scenes"
@@ -2227,14 +2357,14 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Navigation"
-msgstr "네비게ì´ì…˜ ë³´ì´ê¸°"
+msgstr "내비게ì´ì…˜ ë³´ì´ê¸°"
#: editor/editor_node.cpp
msgid ""
"Navigation meshes and polygons will be visible on the running game if this "
"option is turned on."
msgstr ""
-"ì´ ì˜µì…˜ì´ í™œì„±í™” ë˜ì–´ ìžˆì„ ê²½ìš°, ê²Œìž„ì´ ì‹¤í–‰ë˜ëŠ” ë™ì•ˆ 네비게ì´ì…˜ 메시가 표시"
+"ì´ ì˜µì…˜ì´ í™œì„±í™” ë˜ì–´ ìžˆì„ ê²½ìš°, ê²Œìž„ì´ ì‹¤í–‰ë˜ëŠ” ë™ì•ˆ 내비게ì´ì…˜ 메시가 표시"
"ë©ë‹ˆë‹¤."
#: editor/editor_node.cpp
@@ -2383,8 +2513,8 @@ msgid "Save & Restart"
msgstr "저장 & 다시 시작"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "ì—디터 윈ë„ìš°ê°€ 다시 그려질 때 회전!"
+msgid "Spins when the editor window redraws."
+msgstr "ì—디터 윈ë„ìš°ê°€ 다시 그려질 때 회전합니다."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2457,7 +2587,7 @@ msgstr "새 ìƒì† 씬"
#: editor/editor_node.cpp
msgid "Load Errors"
-msgstr "불러오기 ì—러"
+msgstr "불러오기 오류"
#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Select"
@@ -2601,7 +2731,7 @@ msgstr "유효하지 ì•Šì€ RID"
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
-msgstr "ì„ íƒëœ 리소스(%s)ê°€ ì´ ì†ì„±(%s)ì— ì•Œë§žì€ íƒ€ìž…ì´ ì•„ë‹™ë‹ˆë‹¤."
+msgstr "ì„ íƒëœ 리소스 (%s)ê°€ ì´ ì†ì„± (%s)ì— ì•Œë§žì€ íƒ€ìž…ì´ ì•„ë‹™ë‹ˆë‹¤."
#: editor/editor_properties.cpp
msgid ""
@@ -2743,7 +2873,7 @@ msgstr "노드ì—서 가져오기:"
#: editor/export_template_manager.cpp
msgid "Re-Download"
-msgstr "다시 다운불러오기"
+msgstr "다시 다운로드"
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -2788,7 +2918,7 @@ msgstr "í…œí”Œë¦¿ì— version.txt를 ì°¾ì„ ìˆ˜ 없습니다."
#: editor/export_template_manager.cpp
msgid "Error creating path for templates:"
-msgstr "템플릿 경로 ìƒì„± ì—러:"
+msgstr "템플릿 경로 ìƒì„± 오류:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -2850,7 +2980,7 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Error requesting url: "
-msgstr "url 요청 ì—러: "
+msgstr "url 요청 오류: "
#: editor/export_template_manager.cpp
msgid "Connecting to Mirror..."
@@ -2892,11 +3022,11 @@ msgstr "다운로드 중"
#: editor/export_template_manager.cpp
msgid "Connection Error"
-msgstr "ì—°ê²° ì—러"
+msgstr "연결 오류"
#: editor/export_template_manager.cpp
msgid "SSL Handshake Error"
-msgstr "SSL 핸드ì‰ì´í¬ ì—러"
+msgstr "SSL 핸드ì‰ì´í¬ 오류"
#: editor/export_template_manager.cpp
msgid "Current Version:"
@@ -2940,15 +3070,7 @@ msgstr "ì¦ê²¨ì°¾ê¸°"
#: editor/filesystem_dock.cpp
msgid "Cannot navigate to '%s' as it has not been found in the file system!"
-msgstr "íŒŒì¼ ì‹œìŠ¤í…œì—서 '%s'를 ì°¾ì„ ìˆ˜ 없습니다!"
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "ì¸ë„¤ì¼ 바둑íŒìœ¼ë¡œ 보기."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "리스트로 보기."
+msgstr "íŒŒì¼ ì‹œìŠ¤í…œì—서 '%s'ì„(를) ì°¾ì„ ìˆ˜ 없습니다!"
#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
@@ -2965,11 +3087,11 @@ msgstr "í´ë”를 ìžì‹ ì˜ 하위로 ì´ë™í•  수 없습니다."
#: editor/filesystem_dock.cpp
msgid "Error moving:"
-msgstr "ì´ë™ ì—러:"
+msgstr "ì´ë™ 오류:"
#: editor/filesystem_dock.cpp
msgid "Error duplicating:"
-msgstr "복제 중 ì—러:"
+msgstr "복제 중 오류:"
#: editor/filesystem_dock.cpp
msgid "Unable to update dependencies:"
@@ -3087,10 +3209,6 @@ msgid "Search files"
msgstr "íŒŒì¼ ê²€ìƒ‰"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "ì„ íƒëœ ì”¬ì„ ì„ íƒëœ ë…¸ë“œì˜ ìžì‹ìœ¼ë¡œ ì¸ìŠ¤í„´ìŠ¤ 합니다."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3173,7 +3291,7 @@ msgstr "그룹 ì´ë¦„ì´ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤."
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
-msgstr "그룹(Groups)"
+msgstr "그룹"
#: editor/groups_editor.cpp
msgid "Nodes not in Group"
@@ -3209,7 +3327,7 @@ msgstr "애니메ì´ì…˜ì„ 분리시켜 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
-msgstr "ë¨¸í„°ë¦¬ì–¼ì„ ë¶„ë¦¬í•´ì„œ 가져오기"
+msgstr "ë¨¸í‹°ë¦¬ì–¼ì„ ë¶„ë¦¬í•´ì„œ 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects"
@@ -3217,7 +3335,7 @@ msgstr "오브ì íŠ¸ë¥¼ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials"
-msgstr "오브ì íŠ¸ì™€ ë¨¸í„°ë¦¬ì–¼ì„ ë¶„ë¦¬í•´ì„œ 가져오기"
+msgstr "오브ì íŠ¸ì™€ ë¨¸í‹°ë¦¬ì–¼ì„ ë¶„ë¦¬í•´ì„œ 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Animations"
@@ -3225,11 +3343,11 @@ msgstr "오브ì íŠ¸ì™€ 애니메ì´ì…˜ì„ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials+Animations"
-msgstr "머터리얼과 애니메ì´ì…˜ì„ 분리해서 가져오기"
+msgstr "머티리얼과 애니메ì´ì…˜ì„ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials+Animations"
-msgstr "오브ì íЏ, 머터리얼, 애니메ì´ì…˜ì„ 분리해서 가져오기"
+msgstr "오브ì íЏ, 머티리얼, 애니메ì´ì…˜ì„ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
@@ -3237,7 +3355,7 @@ msgstr "ì—¬ëŸ¬ê°œì˜ ì”¬ìœ¼ë¡œ 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes+Materials"
-msgstr "여러 ê°œì˜ ì”¬ê³¼ 머터리얼로 가져오기"
+msgstr "여러 ê°œì˜ ì”¬ê³¼ 머티리얼로 가져오기"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -3271,7 +3389,7 @@ msgstr ""
#: editor/import/resource_importer_scene.cpp
msgid "Error running post-import script:"
-msgstr "가져오기 후 실행할 스í¬ë¦½íЏ 실행 중 ì—러:"
+msgstr "가져오기 후 실행할 스í¬ë¦½íЏ 실행 중 오류:"
#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
@@ -3279,11 +3397,11 @@ msgstr "저장 중..."
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr "'%s'를 기본으로 지정"
+msgstr "'%s'ì„(를) 기본으로 지정"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr "'%s'ì— ëŒ€í•´ 기본값으로 지정 í•´ì œ"
+msgstr "'%s'ì„(를) 기본ì—서 í•´ì œ"
#: editor/import_dock.cpp
msgid " Files"
@@ -3303,17 +3421,18 @@ msgstr "다시 가져오기"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "씬 저장, 다시 가져오기 ë° ë‹¤ì‹œ 시작"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "비디오 드ë¼ì´ë²„를 변경하려면 ì—디터를 다시 시작해야 합니다."
+msgstr "가져온 파ì¼ì˜ íƒ€ìž…ì„ ë³€ê²½í•˜ë ¤ë©´ ì—디터를 다시 시작해야 합니다."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"경고: ì´ ë¦¬ì†ŒìŠ¤ë¥¼ 사용하는 ì—ì…‹ì´ ì¡´ìž¬í•©ë‹ˆë‹¤, ì—ì…‹ì„ ë¶ˆëŸ¬ì˜¤ì§€ 못할 수 있습니"
+"다."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3438,22 +3557,6 @@ msgid "Create Polygon"
msgstr "í´ë¦¬ê³¤ 만들기"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "í´ë¦¬ê³¤ 편집"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "í¬ì¸íЏ 삽입"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "í´ë¦¬ê³¤ 편집 (í¬ì¸íЏ ì‚­ì œ)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "í´ë¦¬ê³¤ê³¼ í¬ì¸íЏ ì‚­ì œ"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3474,6 +3577,22 @@ msgstr ""
msgid "Erase points."
msgstr "í¬ì¸íЏ 지우기."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "í´ë¦¬ê³¤ 편집"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "í¬ì¸íЏ 삽입"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "í´ë¦¬ê³¤ 편집 (í¬ì¸íЏ ì‚­ì œ)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "í´ë¦¬ê³¤ê³¼ í¬ì¸íЏ ì‚­ì œ"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3491,12 +3610,43 @@ msgstr "불러오기..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "노드 í¬ì¸íЏ ì´ë™"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "BlendSpace1D 제한 변경"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "BlendSpace1D ë¼ë²¨ 변경"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr "ì´ íƒ€ìž…ì˜ ë…¸ë“œë¥¼ 사용할 수 없습니다. ì˜¤ì§ ë£¨íŠ¸ 노드만 사용 가능합니다."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "노드 í¬ì¸íЏ 추가"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "애니메ì´ì…˜ í¬ì¸íЏ 추가"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "BlendSpace1D í¬ì¸íЏ ì‚­ì œ"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "BlendSpace1D 노드 í¬ì¸íЏ ì´ë™"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3539,6 +3689,26 @@ msgid "Triangle already exists"
msgstr "삼ê°í˜•ì´ ì´ë¯¸ 존재함"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "삼ê°í˜• 추가"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "BlendSpace2D 제한 변경"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "BlendSpace2D ë¼ë²¨ 변경"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "BlendSpace2D í¬ì¸íЏ ì‚­ì œ"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "BlendSpace2D 삼ê°í˜• ì‚­ì œ"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2Dê°€ AnimationTree ë…¸ë“œì— ì†í•´ìžˆì§€ 않습니다."
@@ -3547,6 +3717,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "삼ê°í˜•ì´ ì¡´ìž¬í•˜ì§€ 않습니다, ë¸”ëžœë”©ì´ ì¼ì–´ë‚˜ì§€ 않습니다."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "ìžë™ 삼ê°í˜• 토글"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "í¬ì¸íŠ¸ë¥¼ 연결하여 삼ê°í˜• 만들기."
@@ -3564,6 +3738,10 @@ msgid "Blend:"
msgstr "블렌드:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "매개변수 변경ë¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "필터 편집"
@@ -3573,11 +3751,47 @@ msgid "Output node can't be added to the blend tree."
msgstr "출력 노드를 블렌드 íŠ¸ë¦¬ì— ì¶”ê°€í•  수 없습니다."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "BlendTreeì— ë…¸ë“œ 추가"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "노드 ì´ë™ë¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr "ì—°ê²°í•  수 없습니다, í¬íŠ¸ê°€ 사용 중ì´ê±°ë‚˜ 유효하지 않는 연결입니다."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "노드 ì—°ê²°ë¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "노드 ì—°ê²° í•´ì œë¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "애니메ì´ì…˜ 설정"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "노드 삭제"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "í•„í„° 켜기/ë„기 토글"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "필터 변경"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr "설정한 애니메ì´ì…˜ 플레ì´ì–´ê°€ 없습니다, 트랙 ì´ë¦„ì„ ê²€ìƒ‰í•  수 없습니다."
@@ -3596,6 +3810,11 @@ msgstr ""
"ì„ ê²€ìƒ‰í•  수 없습니다."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "노드 ì´ë¦„ 변경ë¨"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "노드 추가하기..."
@@ -3806,7 +4025,7 @@ msgstr "애니메ì´ì…˜ ì´ë¦„:"
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Error!"
-msgstr "ì—러!"
+msgstr "오류!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Times:"
@@ -3821,8 +4040,21 @@ msgid "Cross-Animation Blend Times"
msgstr "êµì°¨-애니메ì´ì…˜ 블렌드 시간"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "노드 ì´ë™"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "전환 추가"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "노드 추가"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
-msgstr "ë"
+msgstr "End"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Immediate"
@@ -3846,7 +4078,19 @@ msgstr "하위 ì „í™˜ì— ì‹œìž‘ê³¼ ë 노드가 필요합니다."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "No playback resource set at path: %s."
-msgstr "ê²½ë¡œì— ì„¤ì •ëœ ìž¬ìƒ ë¦¬ì†ŒìŠ¤ ì„¤ì •ì´ ì—†ìŠµë‹ˆë‹¤: %s."
+msgstr "ë‹¤ìŒ ê²½ë¡œì— ì„¤ì •ëœ ìž¬ìƒ ë¦¬ì†ŒìŠ¤ê°€ 없습니다: %s."
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "노드 ì‚­ì œë¨"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "전환 ì‚­ì œë¨"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "시작 노드 설정 (ìžë™ 재ìƒ)"
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -4037,7 +4281,7 @@ msgstr "í˜¸ìŠ¤íŠ¸ëª…ì„ ì°¾ì„ ìˆ˜ ì—†ìŒ:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr "ì—°ê²° ì—러, 다시 시ë„í•´ 주세요."
+msgstr "ì—°ê²° 오류, 다시 시ë„í•´ 주세요."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect to host:"
@@ -4073,7 +4317,7 @@ msgstr "sha256 해시 í™•ì¸ ì‹¤íŒ¨"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr "ì—ì…‹ 다운로드 ì—러:"
+msgstr "ì—ì…‹ 다운로드 오류:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading (%s / %s)..."
@@ -4089,7 +4333,7 @@ msgstr "해결 중..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Error making request"
-msgstr "요청 ì—러"
+msgstr "요청 오류"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Idle"
@@ -4101,7 +4345,7 @@ msgstr "다시 시ë„"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download Error"
-msgstr "다운로드 ì—러"
+msgstr "다운로드 오류"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
@@ -4270,12 +4514,22 @@ msgid "Move CanvasItem"
msgstr "CanvasItem ì´ë™"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Control ë…¸ë“œì˜ ì•µì»¤ì™€ 여백 ê°’ì˜ í”„ë¦¬ì…‹."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr "컨테ì´ë„ˆì˜ ìžë…€ëŠ” ë¶€ëª¨ì— ì˜í•´ ê·¸ë“¤ì˜ ì•µì»¤ì™€ 여백 ê°’ì´ ìž¬ì •ì˜ë©ë‹ˆë‹¤."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "앵커만"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors and Margins"
-msgstr "앵커와 마진 변경"
+msgstr "앵커와 여백 변경"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
@@ -4335,8 +4589,8 @@ msgid ""
"Show a list of all objects at the position clicked\n"
"(same as Alt+RMB in select mode)."
msgstr ""
-"í´ë¦­í•œ ìœ„ì¹˜ì— ìžˆëŠ” 모든 오브ì íŠ¸ë“¤ì˜ ëª©ë¡ì„ ë³´ì—¬ì¤ë‹ˆë‹¤.\n"
-"(ì„ íƒëª¨ë“œì—서 알트+ìš°í´ë¦­ê³¼ 같습니다.)"
+"í´ë¦­í•œ ìœ„ì¹˜ì— ìžˆëŠ” 모든 오브ì íŠ¸ë“¤ì˜ ëª©ë¡ì„ ë³´ì—¬ì¤ë‹ˆë‹¤\n"
+"(ì„ íƒëª¨ë“œì—서 Alt+ìš°í´ë¦­ê³¼ 같습니다)."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Click to change object's rotation pivot."
@@ -4525,7 +4779,7 @@ msgstr "%s 추가"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Adding %s..."
-msgstr "%s 추가중..."
+msgstr "%s 추가 중..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Cannot instantiate multiple nodes without root."
@@ -4539,7 +4793,7 @@ msgstr "노드 만들기"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Error instancing scene from %s"
-msgstr "'%s' 로부터 씬 ì¸ìŠ¤í„´ìŠ¤ 중 ì—러"
+msgstr "'%s'ì—서 씬 ì¸ìŠ¤í„´ìŠ¤ 중 오류"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change default type"
@@ -4651,6 +4905,10 @@ msgstr "Shift키를 누르고 있으면 탄젠트를 개별ì ìœ¼ë¡œ 편집 ê°€ë
msgid "Bake GI Probe"
msgstr "GI 프로브 굽기"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "기울기 편집ë¨"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "항목 %d"
@@ -4693,7 +4951,7 @@ msgstr "Convex 모양 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
-msgstr "네비게ì´ì…˜ 메시 만들기"
+msgstr "내비게ì´ì…˜ 메시 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Contained Mesh is not of type ArrayMesh."
@@ -4900,29 +5158,29 @@ msgstr "만들기"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Navigation Polygon"
-msgstr "네비게ì´ì…˜ í´ë¦¬ê³¤ 만들기"
+msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ 만들기"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generating Visibility Rect"
msgstr "가시성 ì§ì‚¬ê°í˜• 만들기"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "가시성 ì§ì‚¬ê°í˜•ì„ ë§Œë“¤ê¸°"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "ì˜¤ì§ ParticlesMaterial 프로세스 메테리얼 ì•ˆì˜ í¬ì¸íŠ¸ë§Œ 설정 가능"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
-msgstr "ì´ë¯¸ì§€ 불러오기 ì—러:"
+msgstr "ì´ë¯¸ì§€ 불러오기 오류:"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "No pixels with transparency > 128 in image..."
msgstr "ì´ë¯¸ì§€ì— 투명ë„ê°€ 128보다 í° í”½ì…€ì´ ì—†ìŠµë‹ˆë‹¤..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "가시성 ì§ì‚¬ê°í˜•ì„ ë§Œë“¤ê¸°"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "ì—미션 ë§ˆìŠ¤í¬ ë¶ˆëŸ¬ì˜¤ê¸°"
@@ -5003,20 +5261,20 @@ msgstr "ì—미션 소스: "
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
-msgstr "'ParticlesMaterial' íƒ€ìž…ì˜ í”„ë¡œì„¸ì„œ ë¨¸í„°ë¦¬ì–¼ì´ í•„ìš”í•©ë‹ˆë‹¤."
+msgstr "'ParticlesMaterial' íƒ€ìž…ì˜ í”„ë¡œì„¸ì„œ ë¨¸í‹°ë¦¬ì–¼ì´ í•„ìš”í•©ë‹ˆë‹¤."
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generating AABB"
msgstr "AABB ìƒì„± 중"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "AABB 만들기"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "가시성 AABB 만들기"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "AABB 만들기"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "커브ì—서 í¬ì¸íЏ ì‚­ì œ"
@@ -5171,6 +5429,14 @@ msgid "Create UV Map"
msgstr "UV 맵 만들기"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"Polygon2Dê°€ ë‚´ë¶€ ê¼­ì§“ì ì„ ê°–ê³  있습니다, ë” ì´ìƒ ë·°í¬íЏì—서 ê¼­ì§“ì ì„ 편집할 "
+"수 없습니다."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "í´ë¦¬ê³¤ & UV 만들기"
@@ -5337,7 +5603,7 @@ msgstr "ë³¸ì„ í´ë¦¬ê³¤ì— ë™ê¸°í™”"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
-msgstr "ì—러: 리소스를 불러올 수 없습니다!"
+msgstr "오류: 리소스를 불러올 수 없습니다!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Add Resource"
@@ -5403,19 +5669,19 @@ msgstr "ë³€ê²½ì‚¬í•­ì„ ì €ìž¥í•˜ê³  닫겠습니까?"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error writing TextFile:"
-msgstr "í…스트 íŒŒì¼ ì“°ê¸° ì—러:"
+msgstr "í…스트 íŒŒì¼ ì“°ê¸° 오류:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error: could not load file."
-msgstr "ì—러: 파ì¼ì„ 불러올 수 ì—†ìŒ."
+msgstr "오류: 파ì¼ì„ 불러올 수 ì—†ìŒ."
#: editor/plugins/script_editor_plugin.cpp
msgid "Error could not load file."
-msgstr "ì—러로 파ì¼ì„ 불러올 수 ì—†ìŒ."
+msgstr "오류로 파ì¼ì„ 불러올 수 ì—†ìŒ."
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving file!"
-msgstr "íŒŒì¼ ì €ìž¥ 중 ì—러!"
+msgstr "íŒŒì¼ ì €ìž¥ 중 오류!"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme."
@@ -5451,11 +5717,11 @@ msgstr "테마 가져오기"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
-msgstr "테마 저장 중 ì—러"
+msgstr "테마 저장 중 오류"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving"
-msgstr "저장 중 ì—러"
+msgstr "저장 중 오류"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme As..."
@@ -5789,6 +6055,14 @@ msgstr ""
"ì´ ìŠ¤ì¼ˆë ˆí†¤ì€ ë³¸ì„ ê°€ì§€ê³  있지 않습니다, ìžì‹ìœ¼ë¡œ Bone2D 노드를 추가하세요."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "본으로부터 íœ´ì‹ í¬ì¦ˆ 만들기"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "ë³¸ì— íœ´ì‹ í¬ì¦ˆ 설정"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "스켈레톤2D"
@@ -5806,7 +6080,7 @@ msgstr "ë¬¼ë¦¬ì  ë³¸ 만들기"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Skeleton"
-msgstr "스켈레톤"
+msgstr "스켈레톤(Skeleton)"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical skeleton"
@@ -5878,7 +6152,7 @@ msgstr "그려진 오브ì íЏ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Material Changes"
-msgstr "머터리얼 변경"
+msgstr "머티리얼 변경"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Shader Changes"
@@ -5897,10 +6171,6 @@ msgid "Vertices"
msgstr "버틱스"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "초당 프레임"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "윗면 보기."
@@ -5945,8 +6215,8 @@ msgid "Rear"
msgstr "ë’·ë©´"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr "ë·°ì— ì •ë ¬"
+msgid "Align with View"
+msgstr "뷰와 정렬"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6037,6 +6307,14 @@ msgid "Freelook Speed Modifier"
msgstr "ìžìœ ì‹œì  ì†ë„ 변화"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"참고: FPS ê°’ì€ ì—ë””í„°ì˜ í”„ë ˆìž„ ì†ë„입니다.\n"
+"게임 ë‚´ ì„±ëŠ¥ì„ ë³´ì¦í•˜ëŠ” 표시로 ë³¼ 수 없습니다."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "뷰 회전 잠김"
@@ -6045,6 +6323,10 @@ msgid "XForm Dialog"
msgstr "XForm 대화 ìƒìž"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "노드를 ë°”ë‹¥ì— ìŠ¤ëƒ…"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "ì„ íƒ ëª¨ë“œ (Q)"
@@ -6260,8 +6542,8 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
-msgstr "ì´ë¦„없는 기즈모"
+msgid "Nameless gizmo"
+msgstr "ì´ë¦„없는 오브ì íŠ¸ì˜ ì¤‘ì‹¬ì "
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite is empty!"
@@ -6305,7 +6587,7 @@ msgstr "설정:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "ERROR: Couldn't load frame resource!"
-msgstr "ì—러: 프레임 리소스를 불러올 수 없습니다!"
+msgstr "오류: 프레임 리소스를 불러올 수 없습니다!"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Frame"
@@ -6324,10 +6606,6 @@ msgid "Add Empty"
msgstr "빈 프레임 추가"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "애니메ì´ì…˜ 루프 변경"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "애니메ì´ì…˜ FPS 변경"
@@ -6336,8 +6614,12 @@ msgid "(empty)"
msgstr "(비었ìŒ)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "애니메ì´ì…˜(Animations)"
+msgid "Animations:"
+msgstr "애니메ì´ì…˜:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "새로운 애니메ì´ì…˜"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6348,8 +6630,8 @@ msgid "Loop"
msgstr "루프"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "애니메ì´ì…˜ 프레임"
+msgid "Animation Frames:"
+msgstr "애니메ì´ì…˜ 프레임:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6637,6 +6919,22 @@ msgid "Merge from Scene"
msgstr "씬으로부터 병합하기"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr "ë‹¤ìŒ ì¢Œí‘œ"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr "ë‹¤ìŒ ëª¨ì–‘, 하위 타ì¼, í˜¹ì€ íƒ€ì¼ì„ ì„ íƒí•˜ì„¸ìš”."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "ì´ì „ 좌표"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr "ì´ì „ 모양, 하위 타ì¼, í˜¹ì€ íƒ€ì¼ì„ ì„ íƒí•˜ì„¸ìš”."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "비트 ë§ˆìŠ¤í¬ ë³µì‚¬í•˜ê¸°."
@@ -6649,6 +6947,10 @@ msgid "Erase bitmask."
msgstr "비트 ë§ˆìŠ¤í¬ ì§€ìš°ê¸°."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "새 사ê°í˜• 만들기."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "새로운 í´ë¦¬ê³¤ 만들기."
@@ -6787,6 +7089,14 @@ msgid "Clear Tile Bitmask"
msgstr "íƒ€ì¼ ë¹„íŠ¸ ë§ˆìŠ¤í¬ ì§€ìš°ê¸°"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr "오목한 í´ë¦¬ê³¤ 만들기"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr "ë³¼ë¡í•œ í´ë¦¬ê³¤ 만들기"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "íƒ€ì¼ ì‚­ì œ"
@@ -6827,6 +7137,26 @@ msgid "TileSet"
msgstr "TileSet(íƒ€ì¼ ì…‹)"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "í†µì¼ ì´ë¦„ 설정"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "ìž…ë ¥ 기본 í¬íЏ 설정"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "노드를 비주얼 ì…°ì´ë”ì— ì¶”ê°€"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "노드 복제"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "비주얼 ì…°ì´ë” ìž…ë ¥ 타입 변경ë¨"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "버í…스"
@@ -6842,21 +7172,42 @@ msgstr "ë¹›"
msgid "VisualShader"
msgstr "비주얼 ì…°ì´ë”"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "비주얼 ì†ì„± 편집ë¨"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "비주얼 ì…°ì´ë” 모드 변경ë¨"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "실행가능"
#: editor/project_export.cpp
msgid "Delete patch '%s' from list?"
-msgstr "'%s'를 패치 목ë¡ì—서 삭제하시겠습니까?"
+msgstr "'%s'ì„(를) 패치 목ë¡ì—서 삭제하시겠습니까?"
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
msgstr "'%s' í”„ë¦¬ì…‹ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "ì´ í”Œëž«í¼ì— 대한 내보내기 í…œí”Œë¦¿ì´ ì—†ê±°ë‚˜ ì†ìƒë¨:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+"'%s' 플랫í¼ì— 프로ì íŠ¸ë¥¼ 내보낼 수 없습니다.\n"
+"내보내기 í…œí”Œë¦¿ì´ ì—†ê±°ë‚˜ 올바르지 않습니다."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"'%s' 플랫í¼ì— 프로ì íŠ¸ë¥¼ 내보낼 수 없습니다.\n"
+"내보내기 프리셋ì´ë‚˜ 내보내기 ì„¤ì •ì˜ êµ¬ì„± 문제가 ì›ì¸ìœ¼ë¡œ 보입니다."
#: editor/project_export.cpp
msgid "Release"
@@ -6867,6 +7218,14 @@ msgid "Exporting All"
msgstr "ëª¨ë‘ ë‚´ë³´ë‚´ê¸°"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "주어진 내보내기 경로가 존재하지 않습니다:"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "ì´ í”Œëž«í¼ì— 대한 내보내기 í…œí”Œë¦¿ì´ ì—†ê±°ë‚˜ ì†ìƒë¨:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "프리셋"
@@ -7030,7 +7389,7 @@ msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
msgstr ""
-"프로ì íЏ 경로로부터 project.godot 파ì¼ì„ 불러올 수 없습니다 (ì—러 %d). 존재하"
+"프로ì íЏ 경로로부터 project.godot 파ì¼ì„ 불러올 수 없습니다 (오류 %d). 존재하"
"ì§€ 않거나 ì†ìƒë˜ì—ˆì„ 수 있습니다."
#: editor/project_manager.cpp
@@ -7099,11 +7458,11 @@ msgstr "찾아보기"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "ë Œë”러:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7112,10 +7471,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"ë†’ì€ ì‹œê°ì  품질\n"
+"모든 기능 사용 가능\n"
+"ì˜¤ëž˜ëœ í•˜ë“œì›¨ì–´ì—는 호환하지 않ìŒ\n"
+"웹 게임ì—는 비 추천"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7124,10 +7487,14 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"ë‚®ì€ ì‹œê°ì  품질\n"
+"ì¼ë¶€ ê¸°ëŠ¥ì€ ì‚¬ìš©í•  수 ì—†ìŒ\n"
+"ëŒ€ë¶€ë¶„ì˜ í•˜ë“œì›¨ì–´ì—서 ìž‘ë™í•¨\n"
+"웹 ê²Œìž„ì— ì¶”ì²œ"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
-msgstr ""
+msgstr "ë Œë”러는 ë‚˜ì¤‘ì— ë°”ê¿€ 수 있지만, ì”¬ì„ ì¡°ì •í•´ì•¼ í•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7143,6 +7510,25 @@ msgstr "ë‘ê°œ ì´ìƒì˜ 프로ì íŠ¸ë¥¼ 열려는 ê²ƒì´ í™•ì‹¤í•©ë‹ˆê¹Œ?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"ë‹¤ìŒ í”„ë¡œì íЏ 설정 파ì¼ì€ ì´ ë²„ì „ì˜ Godot로 ìƒì„±ë˜ì§€ 않았습니다.\n"
+"↵\n"
+"%s↵\n"
+"↵\n"
+"파ì¼ì„ 연다면, 현재 Godotì˜ êµ¬ì„± íŒŒì¼ í˜•ì‹ìœ¼ë¡œ 변환ë©ë‹ˆë‹¤.\n"
+"경고: ì´ì „ ë²„ì „ì˜ ì—”ì§„ìœ¼ë¡œ ë” ì´ìƒ ì—´ 수 없게 ë  ê²ƒìž…ë‹ˆë‹¤."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7152,13 +7538,13 @@ msgid ""
"Warning: You will not be able to open the project with previous versions of "
"the engine anymore."
msgstr ""
-"다ìŒì˜ 프로ì íЏ 설정 파ì¼ì€ 예전 버전ì—서 ìƒì„±ëœ 것으로, ì´ ë²„ì „ì— ë§žê²Œ 전환"
-"해야 합니다:\n"
+"다ìŒì˜ 프로ì íЏ 설정 파ì¼ì€ ì´ì „ 버전ì—서 ìƒì„±ëœ 것으로, ë‹¤ìŒ ë²„ì „ì— ë§žê²Œ ë³€"
+"환해야 합니다:\n"
"\n"
"%s\n"
"\n"
-"전환하시겠습니까?\n"
-"경고: ë” ì´ìƒ ì´ í”„ë¡œì íŠ¸ë¥¼ 과거 ë²„ì „ì˜ ê²ƒìœ¼ë¡œ ì—´ 수 없게 ë©ë‹ˆë‹¤."
+"변환하시겠습니까?\n"
+"경고: ë” ì´ìƒ ì´ í”„ë¡œì íŠ¸ë¥¼ ì´ì „ 버전ì—서 ì—´ 수 없게 ë©ë‹ˆë‹¤."
#: editor/project_manager.cpp
msgid ""
@@ -7207,7 +7593,7 @@ msgstr ""
msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
-msgstr "%s ì—서 기존 Godot 프로ì íŠ¸ë“¤ì„ ìŠ¤ìº”í•˜ë ¤ê³  합니다. 진행하시겠습니까?"
+msgstr "%sì—서 기존 Godot 프로ì íŠ¸ë“¤ì„ ìŠ¤ìº”í•˜ë ¤ê³  합니다. 진행하시겠습니까?"
#: editor/project_manager.cpp
msgid "Project Manager"
@@ -7279,7 +7665,7 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
-msgstr "'%s' ì•¡ì…˜ì´ ì´ë¯¸ 존재합니다!"
+msgstr "ì•¡ì…˜ '%s'ì´(ê°€) ì´ë¯¸ 존재합니다!"
#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
@@ -7419,7 +7805,7 @@ msgstr "'%s' ì†ì„±ì´ 존재하지 않습니다."
#: editor/project_settings_editor.cpp
msgid "Setting '%s' is internal, and it can't be deleted."
-msgstr "'%s' ì„¤ì •ì€ ë‚´ë¶€ì ì¸ 것입니다, 삭제가 불가합니다."
+msgstr "'%s' ì„¤ì •ì€ ë‚´ë¶€ì ì¸ 것입니다, 삭제할 수 없습니다."
#: editor/project_settings_editor.cpp
msgid "Delete Item"
@@ -7443,7 +7829,7 @@ msgstr "입력 액션 추가"
#: editor/project_settings_editor.cpp
msgid "Error saving settings."
-msgstr "설정 저장 중 ì—러."
+msgstr "설정 저장 중 오류."
#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
@@ -7579,7 +7965,7 @@ msgstr "로케ì¼:"
#: editor/project_settings_editor.cpp
msgid "AutoLoad"
-msgstr "오토로드(AutoLoad)"
+msgstr "오토로드"
#: editor/property_editor.cpp
msgid "Ease In"
@@ -7619,7 +8005,7 @@ msgstr "노드 ì„ íƒ"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
-msgstr "íŒŒì¼ ë¶ˆëŸ¬ì˜¤ê¸° ì—러: 리소스가 아닙니다!"
+msgstr "íŒŒì¼ ë¶ˆëŸ¬ì˜¤ê¸° 오류: 리소스가 아닙니다!"
#: editor/property_editor.cpp
msgid "Pick a Node"
@@ -7767,15 +8153,15 @@ msgstr "리셋"
#: editor/rename_dialog.cpp
msgid "Error"
-msgstr "ì—러"
+msgstr "오류"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
-msgstr "부모노드 재지정"
+msgstr "부모 노드 재지정"
#: editor/reparent_dialog.cpp
msgid "Reparent Location (Select new Parent):"
-msgstr "부모노드 재지정 위치 (새 부모 노드를 ì„ íƒ):"
+msgstr "부모 노드 재지정 위치 (새 부모 노드를 ì„ íƒ):"
#: editor/reparent_dialog.cpp
msgid "Keep Global Transform"
@@ -7783,7 +8169,7 @@ msgstr "글로벌 변형 유지"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent"
-msgstr "부모노드 재지정"
+msgstr "부모 재지정"
#: editor/run_settings_dialog.cpp
msgid "Run Mode:"
@@ -7811,13 +8197,14 @@ msgstr "ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í•  수 있는 부모가 없습니다."
#: editor/scene_tree_dock.cpp
msgid "Error loading scene from %s"
-msgstr "'%s' 로부터 씬 로딩 중 ì—러"
+msgstr "%sì—서 씬 로딩 중 오류"
#: editor/scene_tree_dock.cpp
msgid ""
"Cannot instance the scene '%s' because the current scene exists within one "
"of its nodes."
-msgstr "ë…¸ë“œì¤‘ì— í˜„ìž¬ ì”¬ì´ ì¡´ìž¬í•˜ê¸° 때문ì—, '%s' ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤ í•  수 없습니다."
+msgstr ""
+"한 ë…¸ë“œì— í˜„ìž¬ ì”¬ì´ ì¡´ìž¬í•˜ê¸° 때문ì—, '%s' ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤ í•  수 없습니다."
#: editor/scene_tree_dock.cpp
msgid "Instance Scene(s)"
@@ -7850,6 +8237,8 @@ msgstr "노드 복제"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"ìƒì†ëœ 씬ì—서 부모 노드를 다시 지정할 수 없습니다, ë…¸ë“œì˜ ìˆœì„œëŠ” 바꿀 수 없습"
+"니다."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -7860,6 +8249,10 @@ msgid "Instantiated scenes can't become root"
msgstr "ì¸ìŠ¤í„´íŠ¸í™”ëœ ì”¬ì€ ë£¨íŠ¸ê°€ ë  ìˆ˜ 없습니다"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "노드를 루트로 만들기"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "노드를 삭제하시겠습니까?"
@@ -7896,6 +8289,10 @@ msgid "Make Local"
msgstr "로컬로 만들기"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "새 씬 루트"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "루트 노드 만들기:"
@@ -7940,11 +8337,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
msgid "Error saving scene."
-msgstr "씬 저장 중 ì—러."
+msgstr "씬 저장 중 오류."
#: editor/scene_tree_dock.cpp
msgid "Error duplicating scene to save it."
-msgstr "저장하기 위해 ì”¬ì„ ë³µì œí•˜ëŠ” ì¤‘ì— ì—러가 ë°œìƒí–ˆìŠµë‹ˆë‹¤."
+msgstr "저장하기 위해 ì”¬ì„ ë³µì œí•˜ëŠ” ì¤‘ì— ì˜¤ë¥˜ê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤."
#: editor/scene_tree_dock.cpp
msgid "Sub-Resources"
@@ -8111,15 +8508,15 @@ msgstr "노드 ì„ íƒ"
#: editor/script_create_dialog.cpp
msgid "Error loading template '%s'"
-msgstr "'%s' 템플릿 불러오기 ì—러"
+msgstr "'%s' 템플릿 불러오기 오류"
#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "ì—러 - íŒŒì¼ ì‹œìŠ¤í…œì— ìŠ¤í¬ë¦½íŠ¸ë¥¼ ìƒì„±í•  수 없습니다."
+msgstr "오류 - íŒŒì¼ ì‹œìŠ¤í…œì— ìŠ¤í¬ë¦½íŠ¸ë¥¼ ìƒì„±í•  수 없습니다."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
-msgstr "'%s' 스í¬ë¦½íЏ 로딩 중 ì—러"
+msgstr "'%s' 스í¬ë¦½íЏ 로딩 중 오류"
#: editor/script_create_dialog.cpp
msgid "N/A"
@@ -8235,7 +8632,7 @@ msgstr "목ë¡ì—서 한 ê°œ í˜¹ì€ ì—¬ëŸ¬ ê°œì˜ í•­ëª©ì„ ì§‘ì–´ 그래프로
#: editor/script_editor_debugger.cpp modules/mono/editor/mono_bottom_panel.cpp
msgid "Errors"
-msgstr "ì—러"
+msgstr "오류"
#: editor/script_editor_debugger.cpp
msgid "Child Process Connected"
@@ -8243,7 +8640,7 @@ msgstr "ìžì‹ 프로세스 ì—°ê²°ë¨"
#: editor/script_editor_debugger.cpp
msgid "Copy Error"
-msgstr "복사 ì—러"
+msgstr "복사 오류"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
@@ -8322,6 +8719,18 @@ msgid "Set From Tree"
msgstr "트리로부터 설정"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "단축키 지우기"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "단축키 ë³µì›"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "단축키 변경"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "단축키"
@@ -8528,6 +8937,10 @@ msgid "GridMap Duplicate Selection"
msgstr "그리드맵 ì„ íƒ ë³µì œ"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "그리드맵 칠하기"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "그리드맵"
@@ -8664,10 +9077,6 @@ msgid "Build Project"
msgstr "프로ì íЏ 빌드"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "경고"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "로그 보기"
@@ -8681,7 +9090,7 @@ msgstr "NavMesh ë² ì´í¬"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
-msgstr "네비게ì´ì…˜ 메시 지우기."
+msgstr "내비게ì´ì…˜ 메시 지우기."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
@@ -8721,11 +9130,11 @@ msgstr "í´ë¦¬ 메시 ìƒì„± 중..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Converting to native navigation mesh..."
-msgstr "네ì´í‹°ë¸Œ 네비게ì´ì…˜ 메시로 변환 중..."
+msgstr "네ì´í‹°ë¸Œ 내비게ì´ì…˜ 메시로 변환 중..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr "네비게ì´ì…˜ 메시 ìƒì„±ê¸° 설정:"
+msgstr "내비게ì´ì…˜ 메시 ìƒì„±ê¸° 설정:"
#: modules/recast/navigation_mesh_generator.cpp
msgid "Parsing Geometry..."
@@ -8833,10 +9242,6 @@ msgid "Change Expression"
msgstr "í‘œí˜„ì‹ ë³€ê²½"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "노드 추가"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "비주얼 스í¬ë¦½íЏ 노드 ì‚­ì œ"
@@ -8847,8 +9252,8 @@ msgstr "비주얼 스í¬ë¦½íЏ 노드 복제"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
-"%s 를 누르고 있으면 Getter를 드롭합니다. Shift를 누르고 있으면 ì¼ë°˜ì ì¸ 시그"
-"니처를 드롭합니다."
+"%sì„(를) 누르고 있으면 Getter를 드롭합니다. Shiftì„(를) 누르고 있으면 ì¼ë°˜ì "
+"ì¸ ì‹œê·¸ë‹ˆì²˜ë¥¼ 드롭합니다."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
@@ -8858,7 +9263,7 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a simple reference to the node."
-msgstr "%s 를 누르고 있으면 ë…¸ë“œì— ëŒ€í•œ 간단한 참조를 드롭합니다."
+msgstr "%sì„(를) 누르고 있으면 ë…¸ë“œì— ëŒ€í•œ 간단한 참조를 드롭합니다."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a simple reference to the node."
@@ -8866,7 +9271,7 @@ msgstr "Ctrlì„ ëˆ„ë¥´ê³  있으면 ë…¸ë“œì— ëŒ€í•œ 간단한 참조를 드롭í
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Variable Setter."
-msgstr "%s를 누르고 있르면 변수 Setter를 드롭합니다."
+msgstr "%sì„(를) 누르고 있르면 변수 Setter를 드롭합니다."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a Variable Setter."
@@ -8921,6 +9326,10 @@ msgid "Change Input Value"
msgstr "입력 값 변경"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "ì£¼ì„ í¬ê¸° ì¡°ì ˆ"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "함수 노드를 복사할 수 없습니다."
@@ -9026,7 +9435,7 @@ msgstr "노드를 지칭하는 경로가 아닙니다!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
-msgstr "노드 %s ì•ˆì— ì¸ë±ìФ ì†ì„± ì´ë¦„ '%s' 는 유효하지 않습니다."
+msgstr "노드 %s ì•ˆì— ì¸ë±ìФ ì†ì„± ì´ë¦„ '%s'ì€(는) 유효하지 않습니다."
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid argument of type: "
@@ -9079,7 +9488,8 @@ msgstr "패키지 세그먼트는 길ì´ê°€ 0ì´ ì•„ë‹ˆì–´ì•¼ 합니다."
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
-msgstr "ë¬¸ìž '%s' 는 안드로ì´ë“œ 애플리케ì´ì…˜ 패키지 ì´ë¦„으로 쓸 수 없습니다."
+msgstr ""
+"ë¬¸ìž '%s'ì€(는) 안드로ì´ë“œ 애플리케ì´ì…˜ 패키지 ì´ë¦„으로 쓸 수 없습니다."
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
@@ -9087,7 +9497,7 @@ msgstr "숫ìžëŠ” 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžê°€ ë  ìˆ˜ 없습니다."
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
-msgstr "ë¬¸ìž '%s' 는 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžê°€ ë  ìˆ˜ 없습니다."
+msgstr "ë¬¸ìž '%s'ì€(는) 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžê°€ ë  ìˆ˜ 없습니다."
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
@@ -9123,7 +9533,7 @@ msgstr "ì‹ë³„ìž ì„¸ê·¸ë¨¼íŠ¸ëŠ” 길ì´ê°€ 0ì´ ì•„ë‹ˆì–´ì•¼ 합니다."
#: platform/iphone/export/export.cpp
msgid "The character '%s' is not allowed in Identifier."
-msgstr "ë¬¸ìž '%s' 는 ì‹ë³„ìžì— 쓸 수 없습니다."
+msgstr "ë¬¸ìž '%s'ì€(는) ì‹ë³„ìžì— 쓸 수 없습니다."
#: platform/iphone/export/export.cpp
msgid "A digit cannot be the first character in a Identifier segment."
@@ -9132,7 +9542,7 @@ msgstr "숫ìžëŠ” ì‹ë³„ìž ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžê°€ ë  ìˆ˜ 없습니다."
#: platform/iphone/export/export.cpp
msgid ""
"The character '%s' cannot be the first character in a Identifier segment."
-msgstr "ë¬¸ìž '%s' 는 ì‹ë³„ìž ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžê°€ ë  ìˆ˜ 없습니다."
+msgstr "ë¬¸ìž '%s'ì€(는) ì‹ë³„ìž ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžê°€ ë  ìˆ˜ 없습니다."
#: platform/iphone/export/export.cpp
msgid "The Identifier must have at least one '.' separator."
@@ -9324,7 +9734,7 @@ msgid ""
"node. It only provides navigation data."
msgstr ""
"NavigationPolygonInstanceì€ Navigation2D ë…¸ë“œì˜ í•˜ìœ„ì— ìžˆì–´ì•¼ 합니다. ì´ê²ƒì€ "
-"네비게ì´ì…˜ ë°ì´íƒ€ë§Œì„ 제공합니다."
+"내비게ì´ì…˜ ë°ì´í„°ë§Œì„ 제공합니다."
#: scene/2d/parallax_layer.cpp
msgid ""
@@ -9332,6 +9742,16 @@ msgid ""
msgstr ""
"ParallaxLayer는 ParallaxBackground ë…¸ë“œì˜ ìžì‹ë…¸ë“œë¡œ ìžˆì„ ë•Œë§Œ ë™ìž‘합니다."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n"
+"CPUParticles2D 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환\" ì˜µì…˜ì„ ì‚¬ìš©í•  "
+"수 있습니다."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9484,6 +9904,12 @@ msgstr ""
"CollisionShapeê°€ ê¸°ëŠ¥ì„ í•˜ê¸° 위해서는 ëª¨ì–‘ì´ ì œê³µë˜ì–´ì•¼ 합니다. 모양 리소스"
"를 만드세요!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr "í‰ë©´ ëª¨ì–‘ì€ ìž˜ ìž‘ë™í•˜ì§€ 않으며 ì´í›„ 버전ì—서 ì œê±°ë  ì˜ˆì •ìž…ë‹ˆë‹¤. 사용하지 ë§ì•„주세요."
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "ì§€ì •ëœ ë©”ì‹œê°€ 없으므로 메시를 ë³¼ 수 없습니다."
@@ -9500,6 +9926,14 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "메시 구분중"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+"GIProbe는 GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n"
+"BakedLightmapì„ ì‚¬ìš©í•˜ì„¸ìš”."
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9511,8 +9945,18 @@ msgid ""
"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
"It only provides navigation data."
msgstr ""
-"NavigationMeshInstanceì€ Navigation ë…¸ë“œì˜ í•˜ìœ„ì— ìžˆì–´ì•¼ 합니다. ì´ê²ƒì€ 네비"
-"게ì´ì…˜ ë°ì´íƒ€ë§Œì„ 제공합니다."
+"NavigationMeshInstanceì€ Navigation ë…¸ë“œì˜ í•˜ìœ„ì— ìžˆì–´ì•¼ 합니다. ì´ê²ƒì€ 내비"
+"게ì´ì…˜ ë°ì´í„°ë§Œì„ 제공합니다."
+
+#: scene/3d/particles.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n"
+"CPUParticles 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환\" ì˜µì…˜ì„ ì‚¬ìš©í•  "
+"수 있습니다."
#: scene/3d/particles.cpp
msgid ""
@@ -9553,23 +9997,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Path ì†ì„±ì€ 유효한 Spatial 노드를 가리켜야 합니다."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment는 Environment 리소스가 필요합니다."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr "씬마다 WorldEnvironmentê°€ 단 하나만 허용ë©ë‹ˆë‹¤."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"ì´ WorldEnvironment는 무시ë©ë‹ˆë‹¤. (3D ì”¬ì„ ìœ„í•´) Camera를 추가하거나 아니면 "
-"(2D ì”¬ì„ ìœ„í•´) ì´ í™˜ê²½ì˜ ë°°ê²½ 모드를 Canvas로 설정하세요."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "ì´ ë°”ë””ëŠ” 메시를 설정할 때 까지 무시ë©ë‹ˆë‹¤"
@@ -9599,9 +10026,26 @@ msgstr ""
"VehicleWheelì€ VehicleBody로 휠 ì‹œìŠ¤í…œì„ ì œê³µí•˜ëŠ” ê¸°ëŠ¥ì„ í•©ë‹ˆë‹¤. VehicleBody"
"ì˜ ìžì‹ìœ¼ë¡œ 사용해주세요."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment는 Environment 리소스가 필요합니다."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr "씬마다 WorldEnvironmentê°€ 단 하나만 허용ë©ë‹ˆë‹¤."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"ì´ WorldEnvironment는 무시ë©ë‹ˆë‹¤. (3D ì”¬ì„ ìœ„í•´) Camera를 추가하거나 아니면 "
+"(2D ì”¬ì„ ìœ„í•´) ì´ í™˜ê²½ì˜ ë°°ê²½ 모드를 Canvas로 설정하세요."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
-msgstr "BlendTree 노드 '%s' ì—서, 애니메ì´ì…˜ì„ ì°¾ì„ ìˆ˜ ì—†ìŒ: '%s'"
+msgstr "BlendTree 노드 '%s'ì—서, 애니메ì´ì…˜ì„ ì°¾ì„ ìˆ˜ ì—†ìŒ: '%s'"
#: scene/animation/animation_blend_tree.cpp
msgid "Animation not found: '%s'"
@@ -9609,7 +10053,7 @@ msgstr "애니메ì´ì…˜ì„ ì°¾ì„ ìˆ˜ ì—†ìŒ: '%s'"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
-msgstr "노드 '%s' ì—서, 유효하지 ì•Šì€ ì• ë‹ˆë©”ì´ì…˜: '%s'."
+msgstr "노드 '%s'ì—서, 유효하지 ì•Šì€ ì• ë‹ˆë©”ì´ì…˜: '%s'."
#: scene/animation/animation_tree.cpp
msgid "Invalid animation: '%s'."
@@ -9617,7 +10061,7 @@ msgstr "유효하지 ì•Šì€ ì• ë‹ˆë©”ì´ì…˜: '%s'."
#: scene/animation/animation_tree.cpp
msgid "Nothing connected to input '%s' of node '%s'."
-msgstr "노드 '%s' ì˜ '%s' ìž…ë ¥ì— ì•„ë¬´ê²ƒë„ ì—°ê²°ë˜ì§€ 않ìŒ."
+msgstr "노드 '%s'ì˜ '%s' ìž…ë ¥ì— ì•„ë¬´ê²ƒë„ ì—°ê²°ë˜ì§€ 않ìŒ."
#: scene/animation/animation_tree.cpp
msgid "A root AnimationNode for the graph is not set."
@@ -9644,12 +10088,30 @@ msgstr ""
"ì´ ë…¸ë“œëŠ” ë” ì´ìƒ 사용할 수 없습니다. AnimationTree를 사용하시길 ë°”ëžë‹ˆë‹¤."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "화면ì—서 색ìƒì„ ì„ íƒí•˜ì„¸ìš”."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Raw 모드"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "현재 색ìƒì„ 프리셋으로 추가"
+msgid "Switch between hexadecimal and code values."
+msgstr "16 진수나 코드 값으로 전환합니다."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "현재 색ìƒì„ 프리셋으로 추가합니다."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+"컨테ì´ë„ˆ ìžì²´ëŠ” ìžì‹ 배치 í–‰ë™ì„ 구성하지 않는 한 ìš©ë„ê°€ 없습니다.\n"
+"스í¬ë¦½íŠ¸ë¥¼ 추가하지 않는 경우, 순수한 'Control' 노드를 사용해주세요."
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9659,6 +10121,10 @@ msgstr "경고!"
msgid "Please Confirm..."
msgstr "확ì¸í•´ì£¼ì„¸ìš”..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "부모 í´ë”로 ì´ë™í•©ë‹ˆë‹¤."
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9708,7 +10174,7 @@ msgstr ""
#: scene/resources/dynamic_font.cpp
msgid "Error initializing FreeType."
-msgstr "FreeType 초기화 ì—러."
+msgstr "FreeType 초기화 오류."
#: scene/resources/dynamic_font.cpp
msgid "Unknown font format."
@@ -9716,7 +10182,7 @@ msgstr "알 수 없는 í°íЏ 형ì‹."
#: scene/resources/dynamic_font.cpp
msgid "Error loading font."
-msgstr "í°íЏ 로딩 ì—러."
+msgstr "í°íЏ 로딩 오류."
#: scene/resources/dynamic_font.cpp
msgid "Invalid font size."
@@ -9742,6 +10208,24 @@ msgstr "ê· ì¼í•˜ê²Œ 배치함."
msgid "Varyings can only be assigned in vertex function."
msgstr "Varyings는 ì˜¤ì§ ë²„í…스 함수ì—서만 지정할 수 있습니다."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "ì„ íƒëœ ì”¬ì„ ì„ íƒëœ ë…¸ë“œì˜ ìžì‹ìœ¼ë¡œ ì¸ìŠ¤í„´ìŠ¤ 합니다."
+
+#~ msgid "FPS"
+#~ msgstr "초당 프레임"
+
+#~ msgid "Warnings:"
+#~ msgstr "경고:"
+
+#~ msgid "Font Size:"
+#~ msgstr "í°íЏ í¬ê¸°:"
+
+#~ msgid "Line:"
+#~ msgstr "ë¼ì¸:"
+
+#~ msgid "Col:"
+#~ msgstr "칼럼:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "OrientedPathFollow는 Path ë…¸ë“œì˜ ìžì‹ìœ¼ë¡œ ìžˆì„ ë•Œë§Œ ë™ìž‘합니다."
@@ -9899,9 +10383,6 @@ msgstr "Varyings는 ì˜¤ì§ ë²„í…스 함수ì—서만 지정할 수 있습니다.
#~ msgid "Convert To Lowercase"
#~ msgstr "소문ìžë¡œ 변환"
-#~ msgid "Snap To Floor"
-#~ msgstr "ë°”ë‹¥ì— ìŠ¤ëƒ…"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "0ë„ íšŒì „"
@@ -10426,9 +10907,6 @@ msgstr "Varyings는 ì˜¤ì§ ë²„í…스 함수ì—서만 지정할 수 있습니다.
#~ msgid "Added:"
#~ msgstr "추가ë¨:"
-#~ msgid "Removed:"
-#~ msgstr "제거ë¨:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "ì•„í‹€ë¼ìФ 서브 í…스ì³ë¥¼ 저장할 수 없습니다:"
@@ -10687,9 +11165,6 @@ msgstr "Varyings는 ì˜¤ì§ ë²„í…스 함수ì—서만 지정할 수 있습니다.
#~ msgid "Error importing:"
#~ msgstr "가져오기 ì—러:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "í° í…스ì³ë¥¼ 위해서는 단 í•˜ë‚˜ì˜ íŒŒì¼ë§Œ 요구ë©ë‹ˆë‹¤."
-
#~ msgid "Max Texture Size:"
#~ msgstr "최대 í…ìŠ¤ì³ ì‚¬ì´ì¦ˆ:"
@@ -11216,9 +11691,6 @@ msgstr "Varyings는 ì˜¤ì§ ë²„í…스 함수ì—서만 지정할 수 있습니다.
#~ msgid "Cannot go into subdir:"
#~ msgstr "하위 디렉토리로 ì´ë™í•  수 없습니다:"
-#~ msgid "Imported Resources"
-#~ msgstr "가져온 리소스"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "키 삽입 (Ins 키)"
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index 72c804b3d3..2a3162abce 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -84,6 +84,14 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -115,6 +123,16 @@ msgid "Anim Change Call"
msgstr "Animacija: Pakeisti Iškvietimą"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Animacijos Nodas"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -166,6 +184,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -193,6 +215,10 @@ msgid "Time (s): "
msgstr "TrukmÄ—:"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -245,6 +271,21 @@ msgid "Delete Key(s)"
msgstr "Ištrinti Efektą"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Animacijos Nodas"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Animacijos Nodas"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Animacijos Nodas"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Animacija: Panaikinti Takelį"
@@ -286,6 +327,15 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Animacijos Nodas"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -310,6 +360,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Animacija: Pridėti Takelį"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -318,10 +373,24 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Animacija: Pridėti Takelį"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Animacija: Pridėti Takelį"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -334,6 +403,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -379,10 +452,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -483,6 +552,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Animacija: Pridėti Takelį"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -547,22 +629,14 @@ msgstr "Nutolinti"
msgid "Reset Zoom"
msgstr "Atstatyti PriartinimÄ…"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linija:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Stulpelis:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "Metodas pasirinktame Node turi būti nurodytas!"
@@ -861,8 +935,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1114,7 +1188,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1143,6 +1217,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1286,6 +1364,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1333,7 +1431,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1408,10 +1506,32 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Pasirinkite Nodus, kuriuos norite importuoti"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Pasirinkite Nodus, kuriuos norite importuoti"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1635,8 +1755,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1645,6 +1765,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1836,6 +1966,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2324,7 +2462,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2883,14 +3021,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3032,10 +3162,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3386,23 +3512,6 @@ msgid "Create Polygon"
msgstr "Keisti Poligono SkalÄ™"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Priedai"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3421,6 +3530,23 @@ msgstr ""
msgid "Erase points."
msgstr ""
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Priedai"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr ""
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3438,12 +3564,45 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "MÄ—gstamiausi:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Animacijos Nodas"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3484,6 +3643,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Animacija: Pridėti Takelį"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3492,6 +3672,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3509,6 +3693,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Redaguoti Filtrus"
@@ -3518,11 +3706,51 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Naujas pavadinimas:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Atsijungti"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animacija"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Ištrinti Efektą"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3538,6 +3766,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Naujas pavadinimas:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3768,6 +4002,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Mix Nodas"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Transition Nodas"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3796,6 +4045,20 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Panaikinti"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Transition Nodas"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4216,6 +4479,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4596,6 +4869,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4852,19 +5129,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4955,11 +5232,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5115,6 +5392,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Keisti Poligono SkalÄ™"
@@ -5746,6 +6029,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5854,10 +6145,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5902,7 +6189,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5994,6 +6281,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6002,6 +6295,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "Pasirinkite Nodus, kuriuos norite importuoti"
@@ -6215,7 +6512,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6281,10 +6578,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6293,8 +6586,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Animacija"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animacija"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6305,8 +6604,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Animacija"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6598,6 +6898,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6611,6 +6927,11 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Sukurti NaujÄ…"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Keisti Poligono SkalÄ™"
@@ -6743,6 +7064,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Keisti Poligono SkalÄ™"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Keisti Poligono SkalÄ™"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Panaikinti"
@@ -6786,6 +7117,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplikuoti"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6801,6 +7153,15 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Redaguoti Filtrus"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6814,7 +7175,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6826,6 +7196,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7107,6 +7485,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7802,6 +8193,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7836,6 +8231,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "Prijunkite prie Nodo:"
@@ -8253,6 +8652,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8458,6 +8869,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8595,10 +9010,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8757,10 +9168,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8843,6 +9250,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9232,6 +9643,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9361,6 +9779,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9375,6 +9799,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9389,6 +9819,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9419,21 +9856,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9457,6 +9879,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9503,11 +9940,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9518,6 +9971,10 @@ msgstr "Įspėjimas!"
msgid "Please Confirm..."
msgstr "Prašome Patvirtinti..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9591,6 +10048,12 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "Linija:"
+
+#~ msgid "Col:"
+#~ msgstr "Stulpelis:"
+
#, fuzzy
#~ msgid "Remove Split"
#~ msgstr "Panaikinti pasirinkimÄ…"
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index 6c87d52153..4b11ba6dcc 100644
--- a/editor/translations/lv.po
+++ b/editor/translations/lv.po
@@ -86,6 +86,14 @@ msgstr "DublikÄta IzvÄ“le"
msgid "Delete Selected Key(s)"
msgstr "Izdzēst izvēlētos failus?"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -115,6 +123,16 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "AnimÄciju Cilpa"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -164,6 +182,10 @@ msgid "Anim Clips:"
msgstr "AnimÄcijas klipi:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -188,6 +210,10 @@ msgid "Time (s): "
msgstr "Laiks (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "NepÄrtraukti"
@@ -238,6 +264,21 @@ msgid "Delete Key(s)"
msgstr "Izdzēst atslēgvietnes"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "AnimÄcijas tÄlummaiņa."
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "InterpolÄcijas režīms"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "AnimÄcijas tÄlummaiņa."
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Noņemt animÄcijas celiņu"
@@ -279,6 +320,16 @@ msgid "Anim Insert Key"
msgstr "Anim ievietot atslēgievietni"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "AnimÄcijas tÄlummaiņa."
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Ielīmēt celiņus"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -307,6 +358,11 @@ msgid "Not possible to add a new track without a root"
msgstr "Nevar izveidot jaunu celiņu bez saknes"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Pievienot celiņu"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -315,10 +371,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Anim ievietot celiņu un atslēgvietni"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Pievienot celiņu"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim ievietot celiņu un atslēgvietni"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Metode netika atrasta objektÄ: "
@@ -331,6 +402,10 @@ msgid "Clipboard is empty"
msgstr "Starpliktuve ir tukša"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Ielīmēt celiņus"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim pÄrvietot atslÄ“gievietnes"
@@ -374,10 +449,6 @@ msgid "Copy Tracks"
msgstr "Kopēt celiņus"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Ielīmēt celiņus"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Mēroga Izvēle"
@@ -479,6 +550,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Audio klipi:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -543,22 +627,14 @@ msgstr "AttÄlinÄt"
msgid "Reset Zoom"
msgstr "AtiestatÄ«t tÄlummaiņu"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Rinda:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kolona:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr ""
@@ -857,8 +933,8 @@ msgstr "Izdzēst izvēlētos failus?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Izdzēst"
@@ -1114,7 +1190,7 @@ msgid "Add Bus"
msgstr "Pievienot Kopni"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1143,6 +1219,10 @@ msgstr "IelÄdÄ“t NoklusÄ“jumu"
msgid "Load the default Bus Layout."
msgstr "IelÄdÄ“t Kopnes IzkÄrtojuma noklusÄ“jumu."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nederīgs nosaukums."
@@ -1290,6 +1370,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1337,7 +1437,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1412,10 +1512,32 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Izvēlēties šo Mapi"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Izvēlēties šo Mapi"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1638,8 +1760,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1648,6 +1770,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1839,6 +1971,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2329,7 +2469,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2879,14 +3019,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3025,10 +3157,6 @@ msgid "Search files"
msgstr "Meklēt:"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3377,39 +3505,39 @@ msgid "Create Polygon"
msgstr "Izveidot"
#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
-msgid "Edit Polygon"
+msgid "Create points."
msgstr "Izveidot"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
-msgid "Create points."
+msgid "Edit Polygon"
msgstr "Izveidot"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3430,12 +3558,45 @@ msgstr "IelÄdÄ“t"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Favorīti:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "AnimÄciju Cilpa"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3476,6 +3637,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Pievienot celiņu"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3484,6 +3666,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3501,6 +3687,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3510,11 +3700,51 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Savienot"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "OptimizÄ“t animÄciju"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Izdzēst"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Nomainīt"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3530,6 +3760,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3757,6 +3992,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Pievienot celiņu"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3785,6 +4034,19 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Noņemt"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4199,6 +4461,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4579,6 +4851,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4835,19 +5111,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4938,11 +5214,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5097,6 +5373,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5729,6 +6011,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5837,10 +6127,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5885,7 +6171,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5977,6 +6263,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5985,6 +6277,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6197,7 +6493,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6262,10 +6558,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6274,8 +6566,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Funkcijas:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "OptimizÄ“t animÄciju"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6286,8 +6584,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "AnimÄcijas Ä«pašības."
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6579,6 +6878,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6593,6 +6908,11 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Izveidot Jaunu %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Izveidot"
@@ -6724,6 +7044,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Izveidot"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Noņemt"
@@ -6767,6 +7096,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Dublicēt atslēgvietnes"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6782,6 +7132,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6795,7 +7153,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6807,6 +7174,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7080,6 +7455,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7773,6 +8161,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7807,6 +8199,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "Izveidot Jaunu %s"
@@ -8221,6 +8617,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8426,6 +8834,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8563,10 +8975,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8725,10 +9133,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8809,6 +9213,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9198,6 +9606,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9327,6 +9742,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9341,6 +9762,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9353,6 +9780,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9383,21 +9817,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9421,6 +9840,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9465,13 +9899,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Pievienot paÅ¡reizÄ“jo krÄsu kÄ iepriekÅ¡noteiktu krÄsu"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "BrÄ«dinÄjums!"
@@ -9480,6 +9931,10 @@ msgstr "BrÄ«dinÄjums!"
msgid "Please Confirm..."
msgstr "Lūdzu Apstipriniet..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9553,6 +10008,12 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "Rinda:"
+
+#~ msgid "Col:"
+#~ msgstr "Kolona:"
+
#, fuzzy
#~ msgid "Remove Split"
#~ msgstr "Noņemt Izvēlēto"
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index 8487b78616..b26dceb41c 100644
--- a/editor/translations/ml.po
+++ b/editor/translations/ml.po
@@ -82,6 +82,14 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -111,6 +119,15 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -160,6 +177,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -184,6 +205,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -234,6 +259,18 @@ msgid "Delete Key(s)"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -275,6 +312,14 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -299,6 +344,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -307,10 +356,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -323,6 +384,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -365,10 +430,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -468,6 +529,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -532,20 +605,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -839,8 +904,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1092,7 +1157,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1121,6 +1186,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1264,6 +1333,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1309,7 +1398,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1384,10 +1473,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1603,8 +1712,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1613,6 +1722,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1804,6 +1923,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2291,7 +2418,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2839,14 +2966,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2982,10 +3101,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3329,37 +3444,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3379,12 +3494,43 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3424,6 +3570,26 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3432,6 +3598,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3449,6 +3619,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3458,11 +3632,47 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3478,6 +3688,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3703,6 +3918,19 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3731,6 +3959,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4142,6 +4382,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4519,6 +4769,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4775,19 +5029,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4878,11 +5132,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5037,6 +5291,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5650,6 +5910,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5758,10 +6026,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5806,7 +6070,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5898,6 +6162,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5906,6 +6176,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6118,7 +6392,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6182,19 +6456,19 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
+msgid "Change Animation FPS"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation FPS"
+msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "(empty)"
+msgid "Animations:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6206,7 +6480,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6495,6 +6769,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6507,6 +6797,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6629,6 +6923,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6669,6 +6971,26 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6684,6 +7006,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6697,7 +7027,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6709,6 +7048,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6982,6 +7329,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7672,6 +8032,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7706,6 +8070,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8118,6 +8486,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8322,6 +8702,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8458,10 +8842,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8620,10 +9000,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8704,6 +9080,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9087,6 +9467,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9216,6 +9603,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9230,6 +9623,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9242,6 +9641,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9272,21 +9678,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9310,6 +9701,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9351,11 +9757,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9366,6 +9788,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index d384ae1e44..36b3746a3d 100644
--- a/editor/translations/ms.po
+++ b/editor/translations/ms.po
@@ -86,6 +86,14 @@ msgstr "Anim Menduakan Kunci"
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Menduakan Kunci"
@@ -116,6 +124,15 @@ msgid "Anim Change Call"
msgstr "Anim Ubah Panggilan"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -166,6 +183,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -191,6 +212,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -242,6 +267,18 @@ msgid "Delete Key(s)"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Buang Trek Anim"
@@ -283,6 +320,15 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Anim Ubah Peralihan"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -307,6 +353,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Anim Tambah Trek"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -315,10 +366,24 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Anim Tambah Trek"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim Tambah Trek"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -331,6 +396,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -373,10 +442,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -477,6 +542,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Anim Tambah Trek"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -541,20 +619,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -848,8 +918,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1101,7 +1171,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1130,6 +1200,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1273,6 +1347,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1318,7 +1412,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1393,10 +1487,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1612,8 +1726,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1622,6 +1736,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1813,6 +1937,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2300,7 +2432,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2848,14 +2980,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2991,10 +3115,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3338,37 +3458,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3388,12 +3508,44 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Set Peralihan ke:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3433,6 +3585,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Anim Tambah Trek"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3441,6 +3614,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3458,6 +3635,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3467,11 +3648,49 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Set Peralihan ke:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Semua Pilihan"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3487,6 +3706,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3713,6 +3937,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Set Peralihan ke:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3741,6 +3979,19 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Set Peralihan ke:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4153,6 +4404,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4530,6 +4791,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4786,19 +5051,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4889,11 +5154,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5048,6 +5313,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5661,6 +5932,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5769,10 +6048,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5817,7 +6092,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5909,6 +6184,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5917,6 +6198,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6129,7 +6414,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6193,10 +6478,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6205,7 +6486,12 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
+msgstr "Set Peralihan ke:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6217,7 +6503,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6509,6 +6795,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6521,6 +6823,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6645,6 +6951,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6685,6 +6999,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Anim Menduakan Kunci"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6700,6 +7035,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6713,7 +7056,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6725,6 +7077,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6998,6 +7358,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7690,6 +8063,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7724,6 +8101,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8136,6 +8517,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8341,6 +8734,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8478,10 +8875,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8640,10 +9033,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8724,6 +9113,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9107,6 +9500,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9236,6 +9636,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9250,6 +9656,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9262,6 +9674,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9292,21 +9711,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9330,6 +9734,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9371,11 +9790,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9386,6 +9821,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 933d2f0ed9..b9fa882811 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -5,10 +5,10 @@
# Allan Nordhøy <epost@anotheragency.no>, 2017-2018.
# Anonymous <GentleSaucepan@protonmail.com>, 2017.
# Elias <eliasnykrem@gmail.com>, 2018.
-# flesk <eivindkn@gmail.com>, 2017.
+# flesk <eivindkn@gmail.com>, 2017, 2019.
# Frank T. Rambol <frank@d-fect.com>, 2018.
# Jørgen Aarmo Lund <jorgen.aarmo@gmail.com>, 2016.
-# NicolaiF <nico-fre@hotmail.com>, 2017-2018.
+# NicolaiF <nico-fre@hotmail.com>, 2017-2018, 2019.
# Norwegian Disaster <stian.furu.overbye@gmail.com>, 2017.
# passeride <lukas@passeride.com>, 2017.
# Byzantin <kasper-hoel@hotmail.com>, 2018.
@@ -16,8 +16,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:41+0100\n"
-"Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n"
+"PO-Revision-Date: 2019-02-13 16:10+0000\n"
+"Last-Translator: NicolaiF <nico-fre@hotmail.com>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-"
"engine/godot/nb_NO/>\n"
"Language: nb\n"
@@ -25,7 +25,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -97,6 +97,16 @@ msgstr "Dupliser valgte nøkler/taster"
msgid "Delete Selected Key(s)"
msgstr "Slett valgte nøkler/taster"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Legg til punkt"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Flytt Punkt"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Dupliser Nøkler"
@@ -126,24 +136,39 @@ msgid "Anim Change Call"
msgstr "Anim Forandre Kall"
#: editor/animation_track_editor.cpp
-msgid "Property Track"
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Endre Animasjonsnavn:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Property Track"
+msgstr "Egenskapsspor"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "3D Transform Track"
-msgstr ""
+msgstr "3D transformasjonsspor"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Call Method Track"
-msgstr ""
+msgstr "Kall metode-spor"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Bezier Curve Track"
-msgstr ""
+msgstr "Bezier-kurvespor"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Audio Playback Track"
-msgstr ""
+msgstr "Lydavspillingsspor"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -172,11 +197,17 @@ msgstr "Funksjoner:"
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
-msgstr ""
+msgstr "Lydklipp:"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Anim Clips:"
-msgstr ""
+msgstr "Anim-klipp:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Endre Array-verdi"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -185,7 +216,7 @@ msgstr "Vis/skjul distraksjonsfri modus."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Oppdateringsmodus (Hvordan denne egenskapen settes)"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -207,6 +238,10 @@ msgid "Time (s): "
msgstr "X-Fade Tid (s):"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Kontinuerlig"
@@ -225,7 +260,7 @@ msgstr "Framtid"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr ""
+msgstr "Nærmeste"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
@@ -234,7 +269,7 @@ msgstr "Lineær"
#: editor/animation_track_editor.cpp
msgid "Cubic"
-msgstr ""
+msgstr "Kubisk"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
@@ -260,6 +295,21 @@ msgid "Delete Key(s)"
msgstr "Anim Fjern Nøkler"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Endre Animasjonsnavn:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Animasjonsnode"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Endre Anim-Løkke"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Fjern Anim-Spor"
@@ -286,7 +336,7 @@ msgstr "Anim Sett inn"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
-msgstr ""
+msgstr "AnimasjonAvspiller kan ikke animere seg selv, kun andre avspillere."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -301,8 +351,19 @@ msgid "Anim Insert Key"
msgstr "Anim Sett Inn Nøkkel"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Endre Animasjonsnavn:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Omorganiser Autoloads"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Transform tracks only apply to Spatial-based nodes."
-msgstr ""
+msgstr "Transformasjonsspor kan kun brukes på Spatial-baserte noder."
#: editor/animation_track_editor.cpp
msgid ""
@@ -311,34 +372,64 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"Lydspor kan kun peke på noder av type:\n"
+"-AudioStreamPlayer\n"
+"-AudioStreamPlayer2D\n"
+"-AudioStreamPlayer3D"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr ""
+msgstr "Animasjonsspor kan kun peke på AnimationPlayer-noder."
#: editor/animation_track_editor.cpp
msgid "An animation player can't animate itself, only other players."
msgstr ""
+"En animansjonsavspiller kan ikke animere seg selv, kun andre avspillere."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Not possible to add a new track without a root"
-msgstr ""
+msgstr "Ikke mulig å legge til et nytt spor uten en rot"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Anim Legg til Spor"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track path is invalid, so can't add a key."
-msgstr ""
+msgstr "Sporsti er ugyldig, så kan ikke legge til en nøkkel."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
+msgstr "Spor er ikke av type Spatial, kan ikke legge til nøkkel"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3D transformasjonsspor"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Anim Legg til Spor"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track path is invalid, so can't add a method key."
-msgstr ""
+msgstr "Sporsti er ugyldig, så kan ikke legge til metodenøkkel."
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Kall metode-spor"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
-msgstr ""
+msgstr "Metode ikke funnet i objekt: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -350,21 +441,29 @@ msgid "Clipboard is empty"
msgstr "Ressurs-utklippstavle er tom!"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Lim inn Parametre"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Skalér Nøkler"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
msgstr ""
+"Dette valget virker ikke på Bezier-redigering, siden det kun er ett enkelt "
+"spor."
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
-msgstr ""
+msgstr "Vis kun spor fra noder valgt i treet."
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
-msgstr ""
+msgstr "Grupper spor etter node eller vis dem i en enkel liste."
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -396,11 +495,6 @@ msgid "Copy Tracks"
msgstr "Kopier Parametre"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Lim inn Parametre"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Skaler Utvalg"
@@ -441,11 +535,11 @@ msgstr "Rydd-Opp-Animasjon"
#: editor/animation_track_editor.cpp
msgid "Pick the node that will be animated:"
-msgstr ""
+msgstr "Velg noden som skal animeres:"
#: editor/animation_track_editor.cpp
msgid "Use Bezier Curves"
-msgstr ""
+msgstr "Bruk Bezier-kurver"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -493,7 +587,7 @@ msgstr "Skaler Størrelsesforhold:"
#: editor/animation_track_editor.cpp
msgid "Select tracks to copy:"
-msgstr ""
+msgstr "Velg spor å kopiere:"
#: editor/animation_track_editor.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -503,6 +597,19 @@ msgstr ""
msgid "Copy"
msgstr "Lim inn"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Lydklipp:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Endre størrelsen på Array"
@@ -567,22 +674,13 @@ msgstr "Zoom Ut"
msgid "Reset Zoom"
msgstr "Nullstill Zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Frontvisning"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linje:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Advarsler"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kol:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -701,6 +799,7 @@ msgstr "Signaler"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
msgstr ""
+"Er du sikker på at du ønsker å fjerne alle koblinger fra dette signalet?"
#: editor/connections_dialog.cpp
#, fuzzy
@@ -892,8 +991,8 @@ msgstr "Slett valgte filer?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Slett"
@@ -1152,8 +1251,9 @@ msgid "Add Bus"
msgstr "Legg til Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Opprett et nytt Bus oppsett."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Lagre Audio Bus Oppsett som..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1181,6 +1281,10 @@ msgstr "Last Standard"
msgid "Load the default Bus Layout."
msgstr "Last standard Bus oppsettet."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Opprett et nytt Bus oppsett."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ugyldig navn."
@@ -1320,13 +1424,34 @@ msgid "Storing File:"
msgstr "Lagrer Fil:"
#: editor/editor_export.cpp
+#, fuzzy
msgid "No export template found at the expected path:"
-msgstr ""
+msgstr "Ingen eksportmal funnet på forventet søkesti:"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "Pakking"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1337,8 +1462,9 @@ msgstr "Malfil ble ikke funnet:"
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
+#, fuzzy
msgid "Custom release template not found."
-msgstr ""
+msgstr "Tilpasset utgivelsesmal ikke funnet."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
@@ -1376,7 +1502,7 @@ msgstr "Vis I Filutforsker"
msgid "New Folder..."
msgstr "Ny Mappe..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Oppdater"
@@ -1451,10 +1577,35 @@ msgstr "Flytt Favoritt Oppover"
msgid "Move Favorite Down"
msgstr "Flytt Favoritt Nedover"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Forrige fane"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Lag mappe"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "GÃ¥ til overnevnt mappe"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Kunne ikke opprette mappe."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Vis elementer som et rutenett av miniatyrbilder"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Vis elementer som liste"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Mapper og Filer:"
@@ -1506,7 +1657,7 @@ msgstr "Egenskaper"
#: editor/editor_help.cpp
msgid "Properties:"
-msgstr ""
+msgstr "Egenskaper:"
#: editor/editor_help.cpp
msgid "Methods"
@@ -1663,15 +1814,16 @@ msgstr "Klasse:"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
-msgstr ""
+msgstr "Egenskap:"
#: editor/editor_inspector.cpp
msgid "Set"
msgstr "Sett"
#: editor/editor_inspector.cpp
+#, fuzzy
msgid "Set Multiple:"
-msgstr ""
+msgstr "Sett Mange:"
#: editor/editor_log.cpp
msgid "Output:"
@@ -1695,13 +1847,23 @@ msgstr "Nullstill resultat"
msgid "Project export failed with error code %d."
msgstr "Eksport av prosjektet mislyktes med feilkode %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Feil ved lagring av ressurs!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
msgid "OK"
+msgstr "OK"
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Feil ved lagring av ressurs!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
@@ -1722,7 +1884,7 @@ msgstr "Feil under lagring."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr ""
+msgstr "Kan ikke åpne '%s'. Filen kan ha blitt flyttet eller slettet."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
@@ -1757,10 +1919,14 @@ msgid "This operation can't be done without a tree root."
msgstr "Denne operasjonen kan ikke gjennomføres uten en trerot."
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
+"Denne scenen kan ikke lagres fordi det er en sirkulær "
+"instansieringsinklusjon.\n"
+"Vennligst løs feilen og forsøk å lagre igjen."
#: editor/editor_node.cpp
msgid ""
@@ -1772,7 +1938,7 @@ msgstr ""
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "Can't overwrite scene that is still open!"
-msgstr ""
+msgstr "Kan ikke overskrive en scene som fortsatt er åpen!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
@@ -1922,6 +2088,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Lagre endringer til '%s' før lukking?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Kunne ikke laste ressurs."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Lagre Scene Som..."
@@ -2446,8 +2621,9 @@ msgid "Play Custom Scene"
msgstr "Spill av Tilpasset Scene"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Changing the video driver requires restarting the editor."
-msgstr ""
+msgstr "Endring av videodriver krever omstart av redigeringsverktøyet."
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
@@ -2457,7 +2633,7 @@ msgstr "Lagre & Avslutt"
#: editor/editor_node.cpp
#, fuzzy
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr "Snurrer når editorvinduet rendrer om!"
#: editor/editor_node.cpp
@@ -2659,23 +2835,23 @@ msgstr "Ring"
#: editor/editor_properties.cpp
msgid "On"
-msgstr ""
+msgstr "PÃ¥"
#: editor/editor_properties.cpp
msgid "Layer"
-msgstr ""
+msgstr "Lag"
#: editor/editor_properties.cpp
msgid "Bit %d, value %d"
-msgstr ""
+msgstr "Bit %d, verdi %d"
#: editor/editor_properties.cpp
msgid "[Empty]"
-msgstr ""
+msgstr "[Tom]"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
msgid "Assign..."
-msgstr ""
+msgstr "Tilordne..."
#: editor/editor_properties.cpp
#, fuzzy
@@ -2683,16 +2859,22 @@ msgid "Invalid RID"
msgstr ": Ugyldige argumenter: "
#: editor/editor_properties.cpp
+#, fuzzy
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
msgstr ""
+"Den valgte ressursen (%s) svarer ikke til noen forventede verdier for denne "
+"egenskapen (%s)."
#: editor/editor_properties.cpp
+#, fuzzy
msgid ""
"Can't create a ViewportTexture on resources saved as a file.\n"
"Resource needs to belong to a scene."
msgstr ""
+"Kan ikke opprette en ViewportTexture på ressurser lagret som fil.\n"
+"Ressurser må tilhøre en scene."
#: editor/editor_properties.cpp
msgid ""
@@ -2708,15 +2890,15 @@ msgstr ""
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "New Script"
-msgstr ""
+msgstr "Nytt Skript"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "New %s"
-msgstr ""
+msgstr "Ny %s"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Make Unique"
-msgstr ""
+msgstr "Gjør Unik"
#: editor/editor_properties.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -2734,7 +2916,7 @@ msgstr "Lim inn"
#: editor/editor_properties.cpp editor/property_editor.cpp
msgid "Convert To %s"
-msgstr ""
+msgstr "Konverter Til %s"
#: editor/editor_properties.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -2750,11 +2932,11 @@ msgstr ""
#: editor/editor_properties_array_dict.cpp
msgid "Size: "
-msgstr ""
+msgstr "Størrelse: "
#: editor/editor_properties_array_dict.cpp
msgid "Page: "
-msgstr ""
+msgstr "Side: "
#: editor/editor_properties_array_dict.cpp
#, fuzzy
@@ -3037,16 +3219,6 @@ msgstr "Kan ikke navigere til '%s' for den ble ikke funnet på filsystemet!"
#: editor/filesystem_dock.cpp
#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Vis elementer som et rutenett av miniatyrbilder"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Vis elementer som liste"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"\n"
@@ -3202,11 +3374,6 @@ msgid "Search files"
msgstr "Søk i klasser"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instanser den valgte scene(r) som barn av den valgte noden."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3562,7 +3729,7 @@ msgstr ""
#: editor/plugin_config_dialog.cpp
msgid "Language:"
-msgstr ""
+msgstr "Språk:"
#: editor/plugin_config_dialog.cpp
#, fuzzy
@@ -3571,7 +3738,7 @@ msgstr "Prosjektnavn:"
#: editor/plugin_config_dialog.cpp
msgid "Activate now?"
-msgstr ""
+msgstr "Aktiver nå?"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -3580,25 +3747,6 @@ msgid "Create Polygon"
msgstr "Lag Poly"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Rediger Poly"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Sett inn Punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Rediger Poly (Fjern Punkt)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Fjern Poly Og Punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3623,6 +3771,25 @@ msgstr ""
msgid "Erase points."
msgstr "Høyreklikk: Slett Punkt."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Rediger Poly"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Sett inn Punkt"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Rediger Poly (Fjern Punkt)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Fjern Poly Og Punkt"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3641,12 +3808,49 @@ msgstr "Last"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Flytt Punkt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Endre Blend-Tid"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Endre Blend-Tid"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Legg til punkt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Legg til Animasjon"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Fjern Stipunkt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3689,6 +3893,30 @@ msgid "Triangle already exists"
msgstr "ERROR: Animasjonsnavnet finnes allerede!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Anim Legg til Spor"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Endre Blend-Tid"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Endre Blend-Tid"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Fjern Stipunkt"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3697,6 +3925,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Veksle AutoLoad Globals"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3715,6 +3948,11 @@ msgid "Blend:"
msgstr "Blend:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Forandre"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Rediger Filtre"
@@ -3724,11 +3962,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Legg til node(r) fra tre"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Flytt Modus"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Tilkoblet"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Frakoblet"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animasjon"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Kutt Noder"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Vis/skjul distraksjonsfri modus."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Endre Anim Lengde"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3744,6 +4026,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nodenavn:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3983,6 +4271,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Kryss-Animasjon Blend-Tid"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Flytt Modus"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Overgang"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -4012,6 +4315,20 @@ msgid "No playback resource set at path: %s."
msgstr "Ikke i resource path."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Fjern"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Overgang Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4297,7 +4614,7 @@ msgstr "Neste"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Last"
-msgstr ""
+msgstr "Siste"
#: editor/plugins/asset_library_editor_plugin.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -4448,6 +4765,16 @@ msgid "Move CanvasItem"
msgstr "Endre CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Kun anker"
@@ -4640,7 +4967,7 @@ msgstr "Fjern Ben"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View"
-msgstr "Vis"
+msgstr "Visning"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -4849,6 +5176,10 @@ msgstr "Hold Shift for å endre tangenter individuelt"
msgid "Bake GI Probe"
msgstr "Bak GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Element %d"
@@ -5107,6 +5438,10 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
@@ -5119,10 +5454,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Ingen piksler med gjennomsiktighet > 128 i bilde..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr ""
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr ""
@@ -5211,11 +5542,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5378,6 +5709,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Lag Poly"
@@ -5496,7 +5833,7 @@ msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Radius:"
-msgstr ""
+msgstr "Radius:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon->UV"
@@ -6042,6 +6379,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Fjern Ben"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Singleton"
@@ -6155,10 +6501,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6203,8 +6545,9 @@ msgid "Rear"
msgstr "Bak"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr ""
+#, fuzzy
+msgid "Align with View"
+msgstr "Høyrevisning"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6297,6 +6640,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Vis Informasjon"
@@ -6307,6 +6656,11 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Snap til rutenett"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Select Mode (Q)"
msgstr "Velg Modus"
@@ -6521,7 +6875,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6589,10 +6943,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6601,10 +6951,16 @@ msgid "(empty)"
msgstr "(tom)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Animasjoner"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animasjon"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "Hastighet (FPS):"
@@ -6613,8 +6969,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Animasjonsnavn:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6917,6 +7274,24 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Neste skript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Forrige skript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6932,6 +7307,11 @@ msgstr "Høyreklikk: Slett Punkt."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Lag ny %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Lag en ny polygon fra bunnen."
@@ -7068,6 +7448,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Flytt Polygon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Flytt Polygon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Fjern Mal"
@@ -7116,6 +7506,28 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Sett som Standard for '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Anim Dupliser Nøkler"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7132,6 +7544,16 @@ msgstr "Høyre"
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Rediger Filtre"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Forandre"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Kjørbar"
@@ -7145,7 +7567,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7158,6 +7589,14 @@ msgid "Exporting All"
msgstr "Eksporter"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7443,6 +7882,19 @@ msgstr "Er du sikker på at du vil åpne mer enn ett prosjekt?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8154,6 +8606,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Lagre Scene"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8190,6 +8647,11 @@ msgstr "Lag Ben"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Lagre Scene"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Lag Node"
@@ -8618,6 +9080,20 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Gli ut"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Endre Anker"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8831,6 +9307,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Dupliser Utvalg"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8977,10 +9457,6 @@ msgid "Build Project"
msgstr "Prosjekt"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Vis Filer"
@@ -9145,10 +9621,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9239,6 +9711,11 @@ msgid "Change Input Value"
msgstr "Anim Forandre Verdi"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Endre CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9637,6 +10114,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9766,6 +10250,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9780,6 +10270,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9792,6 +10288,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9822,21 +10325,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9860,6 +10348,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9906,11 +10409,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9921,6 +10440,11 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "GÃ¥ til overnevnt mappe"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9996,6 +10520,23 @@ msgid "Varyings can only be assigned in vertex function."
msgstr ""
#, fuzzy
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Instanser den valgte scene(r) som barn av den valgte noden."
+
+#~ msgid "Warnings:"
+#~ msgstr "Advarsler:"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Frontvisning"
+
+#~ msgid "Line:"
+#~ msgstr "Linje:"
+
+#~ msgid "Col:"
+#~ msgstr "Kol:"
+
+#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "Eksisterer allerede"
@@ -10113,10 +10654,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Konverter til små versaler"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Snap til rutenett"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Roter 0 grader"
@@ -10184,12 +10721,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "Ut-Inn"
-#~ msgid "Change Anim Len"
-#~ msgstr "Endre Anim Lengde"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "Endre Anim-Løkke"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "Anim Lag Typet Verdi Nøkkel"
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 19ef09b17b..b5ac4c3fd5 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -29,12 +29,13 @@
# Peter Goelst <muis24@gmail.com>, 2019.
# Wouter Buckens <wou.buc@gmail.com>, 2019.
# Stijn Hinlopen <f.a.hinlopen@gmail.com>, 2019.
+# jef dered <themen098s@vivaldi.net>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
-"Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n"
+"PO-Revision-Date: 2019-03-08 15:03+0000\n"
+"Last-Translator: jef dered <themen098s@vivaldi.net>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/"
"nl/>\n"
"Language: nl\n"
@@ -42,11 +43,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
-#, fuzzy
msgid "Invalid type argument to convert(), use TYPE_* constants."
msgstr "Ongeldig argumenttype aan convert(), gebruik TYPE_* constanten."
@@ -110,6 +110,14 @@ msgstr "Kopieer Geselecteerde Key(s)"
msgid "Delete Selected Key(s)"
msgstr "Geselecteerde Key(s) Verwijderen"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Bézierpunt toevoegen"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Beweeg Bézierpunten"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Dupliceer Keys"
@@ -139,6 +147,15 @@ msgid "Anim Change Call"
msgstr "Anim Wijzig Aanroep"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Verander Animatielengte"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Verander Animatie Lus"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Eigenschap Track"
@@ -188,6 +205,11 @@ msgid "Anim Clips:"
msgstr "Animatieclips:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Wijzig Array Waarde"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Aan-uitschakelaar Track."
@@ -213,6 +235,11 @@ msgid "Time (s): "
msgstr "Tijd (s): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Verander de ingeschakelde track"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Doorlopend"
@@ -263,6 +290,18 @@ msgid "Delete Key(s)"
msgstr "Verwijder Key(s)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Verander animatie update modus"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Verander Animatie Interpolatiemodus"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Verander Animatie lus Modus"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Verwijder Anim Track"
@@ -304,6 +343,15 @@ msgid "Anim Insert Key"
msgstr "Anim Key Invoegen"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Verander Animatiestappen"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Herschik Tracks"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
"Transformatie tracks zijn alleen te gebruiken met nodes die een dimensionale "
@@ -334,6 +382,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Niet mogelijk om een nieuwe track toe te voegen zonder een root"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Voeg Bézierbaan Toe"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Track path is niet geldig, dus kan geen key toevoegen."
@@ -342,10 +394,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Track is niet van het type Spatial, kan geen key invoegen"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3D Transformatie Track"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Track Toevoegen"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "Track path is niet geldig, dus kan geen methode key toevoegen."
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Methode Invocatie Track"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Methode niet gevonden in object "
@@ -358,6 +425,10 @@ msgid "Clipboard is empty"
msgstr "Klembord is leeg"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Plak sporen"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Schaal Keys"
@@ -403,10 +474,6 @@ msgid "Copy Tracks"
msgstr "Kopieer sporen"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Plak sporen"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Schaal selectie"
@@ -508,6 +575,19 @@ msgstr "Selecteer sporen om te kopieren:"
msgid "Copy"
msgstr "Kopiëren"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Audioclips:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Array Grootte Wijzigen"
@@ -572,21 +652,13 @@ msgstr "Uitzoomen"
msgid "Reset Zoom"
msgstr "Initialiseer Zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Waarschuwingen:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Lettertypegrootte:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Regel:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kolom:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -895,8 +967,8 @@ msgstr "Verwijder geselecteerde bestanden?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Verwijder"
@@ -1152,8 +1224,9 @@ msgid "Add Bus"
msgstr "Bus Toevoegen"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Maak een nieuwe audiobus layout."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Sla Audio Bus Layout Op Als..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1181,6 +1254,10 @@ msgstr "Laad Standaard"
msgid "Load the default Bus Layout."
msgstr "Laad de standaard audiobus layout."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Maak een nieuwe audiobus layout."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ongeldige naam."
@@ -1327,6 +1404,26 @@ msgstr "Geen exporteersjabloon gevonden op het verwachte pad:"
msgid "Packing"
msgstr "Inpakken"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1375,7 +1472,7 @@ msgstr "Weergeven in Bestandsbeheer"
msgid "New Folder..."
msgstr "Nieuwe Map..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Verversen"
@@ -1450,10 +1547,34 @@ msgstr "Verplaats Favoriet Naar Boven"
msgid "Move Favorite Down"
msgstr "Verplaats Favoriet Naar Beneden"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Vorig tabblad"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Map Maken"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Ga naar bovenliggende folder"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Map kon niet gemaakt worden."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Toon items in een miniatuurraster."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Bekijk objecten als een lijst"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Mappen & Bestanden:"
@@ -1682,9 +1803,9 @@ msgstr "Maak Uitvoer Leeg"
msgid "Project export failed with error code %d."
msgstr "Project exporteren faalt door foutcode %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Error bij het opslaan van resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1692,6 +1813,16 @@ msgid "OK"
msgstr "Oké"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Error bij het opslaan van resource!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Resource Opslaan Als..."
@@ -1912,6 +2043,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Sla wijzigen aan '%s' op voor het afsluiten?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Mislukt om resource te laden."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Sla Scene Op Als..."
@@ -2444,7 +2584,8 @@ msgid "Save & Restart"
msgstr "Opslaan & Herstarten"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Draait wanneer het editor venster opnieuw ververst wordt!"
#: editor/editor_node.cpp
@@ -3004,15 +3145,6 @@ msgstr ""
"is!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Toon items in een miniatuurraster."
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Bekijk objecten als een lijst"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Status: Importeren van bestand mislukt. Repareer het bestand en importeer "
@@ -3150,12 +3282,6 @@ msgid "Search files"
msgstr "Zoek bestanden"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-"Maak een nieuwe kopie van de geselecteerde scene(s) als kind van de "
-"geselecteerde knoop."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3507,22 +3633,6 @@ msgid "Create Polygon"
msgstr "Veelhoek aanmaken"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Veelhoek bewerken"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Punt Toevoegen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Veelhoek bewerken (punt verwijderen)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Veelhoek en punt verwijderen"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3543,6 +3653,22 @@ msgstr ""
msgid "Erase points."
msgstr "Punten wissen."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Veelhoek bewerken"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Punt Toevoegen"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Veelhoek bewerken (punt verwijderen)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Veelhoek en punt verwijderen"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3560,6 +3686,22 @@ msgstr "Laden..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Beweeg Punt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Wijzig overlooptijd"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Wijzig overlooptijd"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3567,6 +3709,27 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Node Toevoegen"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Voeg Animatie Toe"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Verwijder Pad Punt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3609,6 +3772,31 @@ msgid "Triangle already exists"
msgstr "Driehoek bestaat al"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Variabele Toevoegen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Wijzig overlooptijd"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Wijzig overlooptijd"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Verwijder Pad Punt"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Verwijder Variabele"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D hoort niet bij een AnimationTree knoop."
@@ -3617,6 +3805,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "AutoLoad-Globalen omschakelen"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Maak driehoeken door punten te verbinden."
@@ -3634,6 +3827,11 @@ msgid "Blend:"
msgstr "Mengen:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Materiaal Wijzigingen"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Filters Bewerken"
@@ -3643,6 +3841,17 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Voeg Node(s) Toe Uit Tree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Verplaatsingsmodus"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3650,6 +3859,39 @@ msgstr ""
"ongeldig zijn."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Verbonden"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Verbinding Verbroken"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animatie"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Alles Selecteren"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Aan-uitschakelaar Track."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Wijzig Anim Lengte"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr "Geen animatiespeler ingesteld, spoornamen konden niet worden gevonden."
@@ -3668,6 +3910,12 @@ msgstr ""
"niet worden gevonden."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Node Naam:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Voeg knoop toe..."
@@ -3895,6 +4143,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Cross-animatie mixtijden"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Verplaatsingsmodus"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Voeg vertaling toe"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Node Toevoegen"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Einde"
@@ -3925,6 +4188,20 @@ msgid "No playback resource set at path: %s."
msgstr "Niet in resource pad."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Verwijderd:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Overgangsknoop"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4348,6 +4625,19 @@ msgid "Move CanvasItem"
msgstr "Verplaats CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Waarschuwing: De positie en grootte van de kinderen van een houder worden "
+"alleen door hun ouder bepaald."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Alleen Ankers"
@@ -4742,6 +5032,10 @@ msgstr "Houd Shift ingedrukt om de raaklijnen individueel te bewerken"
msgid "Bake GI Probe"
msgstr "Bak GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Item %d"
@@ -5008,6 +5302,10 @@ msgid "Generating Visibility Rect"
msgstr "Genereer Zichtbaarheid Rechthoek"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Genereer Zichtbaarheid Rechthoek"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Kan punt alleen plaatsen in een PartikelsMateriaal proces materiaal"
@@ -5020,10 +5318,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Geen pixels met transparantie > 128 in afbeelding..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Genereer Zichtbaarheid Rechthoek"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Laad Emissie Masker"
@@ -5112,13 +5406,13 @@ msgid "Generating AABB"
msgstr "AABB Genereren"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Genereer AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Genereer Zichtbaarheid AABB"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Genereer AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Verwijder Punt van Curve"
@@ -5275,6 +5569,12 @@ msgid "Create UV Map"
msgstr "Creëer UV Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Creëer Poly"
@@ -5936,6 +6236,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Creëer Emissie Punten Vanuit Mesh"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Singleton"
@@ -6049,10 +6358,6 @@ msgid "Vertices"
msgstr "Vertices"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Bovenaanzicht."
@@ -6097,7 +6402,8 @@ msgid "Rear"
msgstr "Achter"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Uitlijnen met zicht"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6191,6 +6497,12 @@ msgid "Freelook Speed Modifier"
msgstr "Vrijekijk Snelheid Modificator"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Bekijk Informatie"
@@ -6200,6 +6512,11 @@ msgid "XForm Dialog"
msgstr "XForm Dialoog"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Uitlijnen op raster"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Selectiestand (Q)"
@@ -6418,7 +6735,7 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6488,10 +6805,6 @@ msgid "Add Empty"
msgstr "Lege Toevoegen"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Verander Animatie Lus"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Verander Animatie FPS"
@@ -6500,10 +6813,16 @@ msgid "(empty)"
msgstr "(leeg)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Animaties"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animatie"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "Snelheid (FPS):"
@@ -6512,7 +6831,8 @@ msgid "Loop"
msgstr "Lus"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Animatie Frames"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6809,6 +7129,24 @@ msgid "Merge from Scene"
msgstr "Vervoeg vanuit Scene"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Volgend script"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Vorig tabblad"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Bitmasker kopiëren."
@@ -6821,6 +7159,11 @@ msgid "Erase bitmask."
msgstr "Bitmasker wissen."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Nieuwe knopen maken."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Nieuwe veelhoek aanmaken."
@@ -6963,6 +7306,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Beweeg Polygon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Beweeg Polygon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Verwijder Sjabloon"
@@ -7011,6 +7364,29 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Stel in als Standaard voor '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Dupliceer Graaf Knooppunt(en)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "Vertices"
@@ -7030,6 +7406,16 @@ msgstr "Rechts"
msgid "VisualShader"
msgstr "Shader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Filters Bewerken"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Shader Wijzigingen"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Uitvoerbaar"
@@ -7043,7 +7429,16 @@ msgid "Delete preset '%s'?"
msgstr "Verwijder voorinstelling '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7057,6 +7452,15 @@ msgid "Exporting All"
msgstr "Aan het exporteren voor %s"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "Dit pad bestaat niet."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Voorinstelling"
@@ -7341,6 +7745,19 @@ msgstr "Weet je zeker dat je meer dan één project wilt openen?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8063,6 +8480,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Klinkt logisch!"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8099,6 +8521,11 @@ msgstr "Maak Botten"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Klinkt logisch!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Creëer Node"
@@ -8524,6 +8951,21 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Rustig Afzetten"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "Snelkoppelingen"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Wijzig Ankers"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Snelkoppelingen"
@@ -8736,6 +9178,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Dupliceer Selectie"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8881,10 +9327,6 @@ msgid "Build Project"
msgstr "Project"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Bekijk Bestanden"
@@ -9057,10 +9499,6 @@ msgid "Change Expression"
msgstr "Verander Expressie"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Node Toevoegen"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove VisualScript Nodes"
msgstr "Verwijder ongeldige keys"
@@ -9158,6 +9596,11 @@ msgid "Change Input Value"
msgstr "Wijzig Array Waarde"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Formaat van CanvasItem wijzigen"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9591,6 +10034,13 @@ msgstr ""
"ParallaxLayer node werkt alleen wanneer het een kind is van een "
"ParallaxBackground node."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9731,6 +10181,12 @@ msgstr ""
"Een vorm moet gegeven worden om CollisionShape te laten werken. Maak "
"alsjeblieft een vorm resource voor deze!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9745,6 +10201,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9761,6 +10223,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9793,23 +10262,6 @@ msgid "Path property must point to a valid Spatial node to work."
msgstr ""
"Pad eigenschap moet verwijzen naar een geldige Spatial node om te werken."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Slechts één WorldEnvironment is toegestaan per scene (of set van "
-"geïnstantieerde scenes)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9835,6 +10287,23 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Slechts één WorldEnvironment is toegestaan per scene (of set van "
+"geïnstantieerde scenes)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9882,13 +10351,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Raw-modus"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Huidige kleur als een preset toevoegen"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Alarm!"
@@ -9897,6 +10383,11 @@ msgstr "Alarm!"
msgid "Please Confirm..."
msgstr "Bevestig Alsjeblieft..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Ga naar bovenliggende folder"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9979,6 +10470,26 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Maak een nieuwe kopie van de geselecteerde scene(s) als kind van de "
+#~ "geselecteerde knoop."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Waarschuwingen:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Lettertypegrootte:"
+
+#~ msgid "Line:"
+#~ msgstr "Regel:"
+
+#~ msgid "Col:"
+#~ msgstr "Kolom:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
@@ -10130,10 +10641,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Converteer Naar Kleine Letters"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Uitlijnen op raster"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "0 Graden Roteren"
@@ -10237,9 +10744,6 @@ msgstr ""
#~ msgid "Move Shader Graph Node"
#~ msgstr "Verplaats Shader Graaf Knooppunten"
-#~ msgid "Duplicate Graph Node(s)"
-#~ msgstr "Dupliceer Graaf Knooppunt(en)"
-
#~ msgid "Delete Shader Graph Node(s)"
#~ msgstr "Verwijder Shader Graaf Knooppunt(en)"
@@ -10297,9 +10801,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "Uit-In"
-#~ msgid "Change Anim Len"
-#~ msgstr "Wijzig Anim Lengte"
-
#~ msgid "Change Anim Loop"
#~ msgstr "Wijzig Anim Lus"
@@ -10543,9 +11044,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "Toegevoegd:"
-#~ msgid "Removed:"
-#~ msgstr "Verwijderd:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Kon atlas subtexture niet opslaan:"
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index f4fa56512e..b575899626 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -16,7 +16,7 @@
# Karol Walasek <coreconviction@gmail.com>, 2016.
# Maksymilian Świąć <maksymilian.swiac@gmail.com>, 2017-2018.
# Mietek Szcześniak <ravaging@go2.pl>, 2016.
-# NeverK <neverkoxu@gmail.com>, 2018.
+# NeverK <neverkoxu@gmail.com>, 2018, 2019.
# Rafal Brozio <rafal.brozio@gmail.com>, 2016.
# Rafał Ziemniak <synaptykq@gmail.com>, 2017.
# RM <synaptykq@gmail.com>, 2018.
@@ -29,11 +29,13 @@
# Dariusz Siek <dariuszynski@gmail.com>, 2018.
# Szymon Nowakowski <smnbdg13@gmail.com>, 2019.
# Nie Powiem <blazek10@tlen.pl>, 2019.
+# Sebastian Hojka <sibibibi1@gmail.com>, 2019.
+# Robert <vizz0@onet.pl>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-19 19:22+0000\n"
+"PO-Revision-Date: 2019-03-12 15:36+0000\n"
"Last-Translator: Tomek <kobewi4e@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
@@ -43,7 +45,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 3.4-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -111,6 +113,14 @@ msgstr "Duplikuj klucz(e)"
msgid "Delete Selected Key(s)"
msgstr "Usuń klucz(e)"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Dodaj punkt krzywej Beziera"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Przesuń punkty krzywej Beziera"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Duplikuj klucze"
@@ -140,6 +150,15 @@ msgid "Anim Change Call"
msgstr "Animacja - wywołanie funkcji"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Zmień długość animacji"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Zmień pętle animacji"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Ścieżka właściwości"
@@ -189,6 +208,10 @@ msgid "Anim Clips:"
msgstr "Klipy animacji:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Zmień adres ścieżki"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Włącz/wyłącz tę ścieżkę."
@@ -213,6 +236,10 @@ msgid "Time (s): "
msgstr "Czas (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Przełącz aktywność ścieżki"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Ciągłe"
@@ -263,6 +290,18 @@ msgid "Delete Key(s)"
msgstr "Usuń klucz(e)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Zmień tryb zmiany animacji"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Zmień sposób interpolacji animacji"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Zmień sposób zapętlania animacji"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Usuń ścieżkę animacji"
@@ -305,6 +344,14 @@ msgid "Anim Insert Key"
msgstr "Wstaw klatkÄ™ kluczowÄ…"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Zmień krok animacji"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Przestaw ścieżki"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Ścieżki przekształceń działają tylko z węzłami bazującymi na Spatial."
@@ -334,6 +381,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Nie da się dodać nowej ścieżki bez korzenia"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Dodaj ścieżkę krzywej Beziera"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Ścieżka jest nieprawidłowa, więc nie można wstawić klucza."
@@ -342,10 +393,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Ścieżka nie jest typu Spatial, nie można wstawić klucza"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Dodaj klucz ścieżki transformacji"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Dodaj klucz ścieżki"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "Ścieżka jest nieprawidłowa, więc nie można wstawić klucza metody."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Dodaj klucz ścieżki metody"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Metoda nie znaleziona w obiekcie: "
@@ -358,6 +421,10 @@ msgid "Clipboard is empty"
msgstr "Schowek jest pusty"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Wklej ścieżki"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Przeskaluj klatki kluczowe"
@@ -401,10 +468,6 @@ msgid "Copy Tracks"
msgstr "Kopiuj ścieżki"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Wklej ścieżki"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Skaluj zaznaczone"
@@ -504,6 +567,18 @@ msgstr "Wybierz ścieżki do skopiowania:"
msgid "Copy"
msgstr "Kopiuj"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Dodaj klip ścieżki audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Zmień początkowe przesunięcie klipu ścieżki audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Zmień końcowe przesunięcie klipu ścieżki audio"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Zmień rozmiar Tablicy"
@@ -568,21 +643,13 @@ msgstr "Oddal"
msgid "Reset Zoom"
msgstr "Wyzeruj przybliżenie"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Ostrzeżenia:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Rozmiar czcionki:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linia:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Ostrzeżenia"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kolumna:"
+msgid "Line and column numbers."
+msgstr "Numery linii i kolumn."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -883,8 +950,8 @@ msgstr "Usunąć zaznaczone pliki?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Usuń"
@@ -1039,7 +1106,6 @@ msgid "Toggle Audio Bus Bypass Effects"
msgstr "Przełącz ominięcie efektów w magistrali audio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Select Audio Bus Send"
msgstr "Wybierz szynę wysyłki audio"
@@ -1141,8 +1207,8 @@ msgid "Add Bus"
msgstr "Dodaj magistralÄ™"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Utwórz nowy układ magistral."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Dodaj nową Szynę Audio do tego układu."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1170,6 +1236,10 @@ msgstr "Wczytaj domyślny"
msgid "Load the default Bus Layout."
msgstr "Załaduj domyślny układ magistral."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Utwórz nowy układ magistral."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Niewłaściwa nazwa."
@@ -1308,24 +1378,47 @@ msgstr "Zapisywanie pliku:"
#: editor/editor_export.cpp
msgid "No export template found at the expected path:"
-msgstr ""
+msgstr "Nie znaleziono szablonu eksportu w przewidywanej lokalizacji:"
#: editor/editor_export.cpp
msgid "Packing"
msgstr "Pakowanie"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"Platforma docelowa wymaga dla GLES2 kompresji tekstur 'ETC'. Włącz 'Import "
+"Etc' w Ustawieniach Projektu."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"Platforma docelowa wymaga dla GLES3 kompresji tekstur 'ETC2'. Włącz 'Import "
+"Etc 2' w Ustawieniach Projektu."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom debug template not found."
-msgstr "Nie znaleziono pliku szablonu:"
+msgstr "Nie znaleziono własnego szablonu debugowania."
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
-msgstr ""
+msgstr "Nie znaleziono własnego szablonu wydania."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:"
@@ -1360,7 +1453,7 @@ msgstr "Pokaż w menedżerze plików"
msgid "New Folder..."
msgstr "Utwórz katalog..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Odśwież"
@@ -1435,10 +1528,33 @@ msgstr "Przesuń Ulubiony w górę"
msgid "Move Favorite Down"
msgstr "Przesuń Ulubiony w dół"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Poprzedni poziom"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Następny poziom"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Przejdź folder wyżej"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Nie można utworzyć katalogu."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Wyświetl elementy jako siatkę miniatur."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Wyświetl elementy jako listę."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Katalogi i pliki:"
@@ -1661,9 +1777,9 @@ msgstr "Wyczyść dane wyjściowe"
msgid "Project export failed with error code %d."
msgstr "Eksport projektu nie powiódł się, kod błędu to %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Błąd podczas zapisu zasobu!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1671,6 +1787,16 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Błąd podczas zapisu zasobu!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Zapisz zasób jako..."
@@ -1727,6 +1853,8 @@ msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
+"Ta scena nie może zostać zapisana, ponieważ istnieje cykliczna inkluzja.\n"
+"Rozwiąż to i spróbuj zapisać ponownie."
#: editor/editor_node.cpp
msgid ""
@@ -1888,6 +2016,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "Zapisać zmiany w '%s' przed zamknięciem?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Nie udało się wczytać zasobu."
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "Tylko jeden plik jest wymagany dla dużych tekstur."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Zapisz scenÄ™ jako..."
@@ -2407,7 +2545,8 @@ msgid "Save & Restart"
msgstr "Zapisz i zrestartuj"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Ikona obraca siÄ™, gdy okno edytora jest odrysowywane!"
#: editor/editor_node.cpp
@@ -2618,15 +2757,16 @@ msgid "Assign..."
msgstr "Przypisz..."
#: editor/editor_properties.cpp
-#, fuzzy
msgid "Invalid RID"
-msgstr "Nieprawidłowa ścieżka"
+msgstr "Nieprawidłowy RID"
#: editor/editor_properties.cpp
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
msgstr ""
+"Wybrany zasób (%s) nie zgadza się z żadnym rodzajem przewidywanym dla tego "
+"użycia (%s)."
#: editor/editor_properties.cpp
msgid ""
@@ -2971,14 +3111,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "Nie można przejść do '%s' - nie znaleziono w tym systemie plików!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Wyświetl elementy jako siatkę miniatur."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Wyświetl elementy jako listę."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Status: Importowanie pliku nie powiodło się. Proszę naprawić plik i ponownie "
@@ -3038,7 +3170,7 @@ msgstr "Duplikowanie Folderu:"
#: editor/filesystem_dock.cpp
msgid "Open Scene(s)"
-msgstr "Otwórz Scenę/y"
+msgstr "Otwórz scenę/y"
#: editor/filesystem_dock.cpp
msgid "Instance"
@@ -3054,7 +3186,7 @@ msgstr "Usuń z ulubionych"
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies..."
-msgstr "Edytuj Zależności..."
+msgstr "Edytuj zależności..."
#: editor/filesystem_dock.cpp
msgid "View Owners..."
@@ -3116,10 +3248,6 @@ msgid "Search files"
msgstr "Przeszukaj pliki"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Utwórz instancję wybranej sceny/scen jako dziecko wybranego węzła."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3197,7 +3325,6 @@ msgid "Group name already exists."
msgstr "Nazwa grupy już istnieje."
#: editor/groups_editor.cpp
-#, fuzzy
msgid "Invalid group name."
msgstr "Niewłaściwa nazwa grupy."
@@ -3334,17 +3461,18 @@ msgstr "Importuj ponownie"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Zapisz sceny, re-importuj i zrestartuj"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Zmiana sterownika grafiki wymaga restartu edytora."
+msgstr "Zmiana rodzaju importowanego pliku wymaga restartu edytora."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"OSTRZEŻENIE: Istnieje zawartość używająca tego zasobu, która może przestać "
+"działać prawidłowo."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3469,32 +3597,12 @@ msgid "Create Polygon"
msgstr "Utwórz wielokąt"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Edytuj wielokÄ…t"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Wstaw punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Edytuj wielokąt (usuń punkty)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Usuń wielokąt i punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
msgstr "Utwórz punkty."
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid ""
"Edit points.\n"
"LMB: Move Point\n"
@@ -3509,6 +3617,22 @@ msgstr ""
msgid "Erase points."
msgstr "Usuń punkty."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Edytuj wielokÄ…t"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Wstaw punkt"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Edytuj wielokąt (usuń punkt)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Usuń wielokąt i punkt"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3526,6 +3650,22 @@ msgstr "Wczytaj..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Przesuń punkty"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Zmień czas mieszania"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Zmień czas mieszania"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3533,6 +3673,27 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Dodaj węzeł"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Dodaj animacjÄ™"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Usuń punkt ścieżki"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3575,6 +3736,31 @@ msgid "Triangle already exists"
msgstr "Trójkąt już istnieje"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Dodaj zmiennÄ…"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Zmień czas mieszania"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Zmień czas mieszania"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Usuń punkt ścieżki"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Usuń zmienną"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D nie należy do węzła AnimationTree."
@@ -3583,6 +3769,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Nie ma żadnego trójkąta, więc nie może zajść mieszanie."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Przełącz automatycznie ładowane zmienne globalne"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Utwórz trójkąty poprzez łączenie punktów."
@@ -3600,6 +3791,11 @@ msgid "Blend:"
msgstr "Mieszanie:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Zmiany materiału"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Edytuj filtry"
@@ -3609,6 +3805,17 @@ msgid "Output node can't be added to the blend tree."
msgstr "Węzeł wyjściowy nie może być dodany do drzewa mieszania."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Dodaj węzeł(y) z drzewa"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Tryb przesuwania"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3616,6 +3823,39 @@ msgstr ""
"nieprawidłowe."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Podłączony"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Rozłączono"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animacje"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Usuń węzeł (węzły)"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Włącz/wyłącz tę ścieżkę."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Zmień filtr ustawień lokalizacji"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Nie ustawiono odtwarzacza animacji, więc nie można uzyskać nazw ścieżek."
@@ -3635,6 +3875,12 @@ msgstr ""
"uzyskać nazw ścieżek."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nazwa węzła"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Dodaj węzeł..."
@@ -3863,6 +4109,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Czasy przejścia pomiędzy animacjami"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Tryb przesuwania"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Dodaj tłumaczenie"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Dodaj węzeł"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Koniec"
@@ -3891,6 +4152,20 @@ msgid "No playback resource set at path: %s."
msgstr "Nie znaleziono zasobu do odtworzenia w ścieżce: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Usunięte:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Węzeł Przejścia"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4316,6 +4591,17 @@ msgid "Move CanvasItem"
msgstr "Przesuń CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+"Ustawienia wstępne dla wartości zakotwiczeń i marginesów węzła sterującego."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Tylko zakotwiczenia"
@@ -4340,9 +4626,8 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Reset"
-msgstr "Wyzeruj powiększenie"
+msgstr "Zresetuj powiększenie"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Select Mode"
@@ -4701,6 +4986,10 @@ msgstr "Przytrzymaj Shift aby edytować styczne indywidualnie"
msgid "Bake GI Probe"
msgstr "Wypal sondÄ™ GI"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Element %d"
@@ -4958,6 +5247,10 @@ msgid "Generating Visibility Rect"
msgstr "Generowanie prostokąta widzialności"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Wygeneruj prostokąt widoczności"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
#, fuzzy
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Punkt można wstawić tylko w materiał obróbki ParticlesMaterial"
@@ -4971,10 +5264,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Brak pikseli z przeźroczystością > 128 w obrazie..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Wygeneruj prostokąta widzialności"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Wczytaj maskÄ™ emisji"
@@ -5063,13 +5352,13 @@ msgid "Generating AABB"
msgstr "Generowanie AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Generuj AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Generuj AABB widoczności"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Generuj AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Usuń punkt z krzywej"
@@ -5121,9 +5410,8 @@ msgid "Click: Add Point"
msgstr "Klik: Dodaj Punkt"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Left Click: Split Segment (in curve)"
-msgstr "Podziel Segment (na krzywej)"
+msgstr "LPM: Podziel Segment (na krzywej)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -5232,41 +5520,44 @@ msgid "Create UV Map"
msgstr "Utwórz Mapę UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"Wielokąt 2D ma wewnętrzne wierzchołki, więc nie można go już edytować w "
+"oknie roboczym."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Utwórz wielokąt i UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Create Internal Vertex"
-msgstr "Utwórz nową prowadnicę poziomą"
+msgstr "Utwórz wewnętrzny wierzchołek"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Internal Vertex"
-msgstr "Usuń punkt ścieżki"
+msgstr "Usuń wewnętrzny wierzchołek"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Invalid Polygon (need 3 different vertices)"
-msgstr ""
+msgstr "Nieprawidłowy wielokąt (potrzebujesz 3 różnych wierzchołków)"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Add Custom Polygon"
-msgstr "Edytuj wielokÄ…t"
+msgstr "Dodaj niestandardowy wielokÄ…t"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Polygon"
-msgstr "Usuń wielokąt i punkt"
+msgstr "Usuń niestandardowy wielokąt"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
msgstr "Przekształć Mapę UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Transform Polygon"
-msgstr "Typ przekształcenia"
+msgstr "Przekształć wielokąt"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
@@ -5274,9 +5565,8 @@ msgid "Paint Bone Weights"
msgstr "Maluj wagi kości"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Open Polygon 2D UV editor."
-msgstr "WielokÄ…t 2D UV Edytor"
+msgstr "Otwórz Polygon 2D UV editor."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon 2D UV Editor"
@@ -5292,9 +5582,8 @@ msgid "Points"
msgstr "Punkt"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Polygons"
-msgstr "WielokÄ…t->UV"
+msgstr "WielokÄ…t"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Bones"
@@ -5449,7 +5738,7 @@ msgstr "Otwórz w edytorze"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Load Resource"
-msgstr "Wczytaj Zasób"
+msgstr "Wczytaj zasób"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ResourcePreloader"
@@ -5862,6 +6151,16 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "Ten szkielet nie ma kości. Stwórz jakieś węzły potomne Bone2D."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Utwórz pozę spoczynkową (z kości)"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Set Rest Pose to Bones"
+msgstr "Utwórz pozę spoczynkową (z kości)"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Szkielet 2D"
@@ -5970,10 +6269,6 @@ msgid "Vertices"
msgstr "Wierzchołki"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "Klatki na sekundÄ™"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Widok z góry."
@@ -6018,7 +6313,8 @@ msgid "Rear"
msgstr "Tył"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Wyrównaj z widokiem"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6111,6 +6407,12 @@ msgid "Freelook Speed Modifier"
msgstr "Zmiennik prędkości \"Wolnego widoku\""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Obroty widoku zablokowane"
@@ -6119,6 +6421,11 @@ msgid "XForm Dialog"
msgstr "Okno dialogowe XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "PrzyciÄ…gaj do siatki"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Tryb zaznaczenia (Q)"
@@ -6336,7 +6643,7 @@ msgid "Post"
msgstr "Po"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6401,10 +6708,6 @@ msgid "Add Empty"
msgstr "Dodaj pusty"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Zmień pętle animacji"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Zmień FPS animacji"
@@ -6413,7 +6716,13 @@ msgid "(empty)"
msgstr "(pusty)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
+msgstr "Animacje"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
msgstr "Animacje"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6425,7 +6734,8 @@ msgid "Loop"
msgstr "Pętla"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Klatki animacji"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6698,14 +7008,12 @@ msgid "Clear transform"
msgstr "Wyczyść przekształcenie"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Add Texture(s) to TileSet."
-msgstr "Dodaj teksturÄ™/tekstury do TileSet."
+msgstr "Dodaj teksturÄ™/y do TileSetu."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected Texture from TileSet."
-msgstr "Usuń zaznaczoną teksturę z TileSet."
+msgstr "Usuń zaznaczoną Teksturę z TileSetu."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from Scene"
@@ -6716,6 +7024,22 @@ msgid "Merge from Scene"
msgstr "Połącz ze sceny"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr "Następny koordynat"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr "Wybierz następny kształt, podkafelek lub Kafelek."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "Poprzedni koordynat"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr "Wybierz poprzedni kształt, podkafelek lub Kafelek."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Kopiuj maskÄ™ bitowÄ…."
@@ -6728,6 +7052,11 @@ msgid "Erase bitmask."
msgstr "Wyczyść maskę bitową."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Utwórz nowe węzły."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Utwórz nowy wielokąt."
@@ -6877,6 +7206,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Przesuń Wielokąt"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Przesuń Wielokąt"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Usuń szablon"
@@ -6923,6 +7262,27 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Ustaw jako domyślne dla '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Dodaj Węzeł do Wizualnego Shadera"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Duplikuj węzły"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Wierzchołek"
@@ -6938,6 +7298,14 @@ msgstr "Światło"
msgid "VisualShader"
msgstr "Shader wizualny"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Edytuj Wizualną Właściwość"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Zmiana Trybu Wizualnego Shadera"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Uruchamiany"
@@ -6951,8 +7319,17 @@ msgid "Delete preset '%s'?"
msgstr "Usunąć predefiniowane '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Brakuje szablonów eksportu dla tej platformy lub są uszkodzone:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
msgid "Release"
@@ -6963,6 +7340,14 @@ msgid "Exporting All"
msgstr "Eksportowanie wszystkiego"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "Podana ścieżka eksportu nie istnieje:"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Brakuje szablonów eksportu dla tej platformy lub są uszkodzone:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Profile eksportu"
@@ -7199,11 +7584,11 @@ msgstr "Szukaj"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Renderer:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7212,10 +7597,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Wyższa jakość wizualna\n"
+"Wszystkie funkcjonalności dostępne\n"
+"Niekompatybilne ze starszym sprzętem\n"
+"Niezalecane dla gier przeglÄ…darkowych"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7224,17 +7613,22 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Mniejsza jakość wizualna\n"
+"Niektóre funkcjonalności niedostępne\n"
+"Działa na większości sprzętu\n"
+"Rekomendowane dla gier przeglÄ…darkowych"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"Renderer może zostać później zmieniony, ale sceny mogą potrzebować "
+"dostosowania."
#: editor/project_manager.cpp
msgid "Unnamed Project"
msgstr "Projekt bez nazwy"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project at '%s'."
msgstr "Nie można otworzyć projektu w '%s'."
@@ -7244,6 +7638,19 @@ msgstr "Czy jesteś pewny że chcesz otworzyć więcej niż jeden projekt?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7955,6 +8362,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Zmień na korzeń sceny"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Usuń węzeł(y)?"
@@ -7991,6 +8403,11 @@ msgid "Make Local"
msgstr "Zrób lokalne"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "New Scene Root"
+msgstr "Zmień na korzeń sceny"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Utwórz korzeń:"
@@ -8419,6 +8836,21 @@ msgid "Set From Tree"
msgstr "Ustaw z drzewa"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Åagodne wyjÅ›cie"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "Skróty"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Zmień zakotwiczenie"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Skróty"
@@ -8625,6 +9057,11 @@ msgid "GridMap Duplicate Selection"
msgstr "GridMap duplikuj zaznaczenie"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "Ustawienia GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Grid Map"
@@ -8764,10 +9201,6 @@ msgid "Build Project"
msgstr "Zbuduj projekt"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Ostrzeżenia"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Pokaż logi"
@@ -8794,7 +9227,7 @@ msgstr "Obliczanie wielkości siatki..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating heightfield..."
-msgstr ""
+msgstr "Tworzenie pola wysokości..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Marking walkable triangles..."
@@ -8802,7 +9235,7 @@ msgstr "Zaznaczanie możliwych do przejścia trójkątów ..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
-msgstr ""
+msgstr "Konstruowanie zwartego pola wysokości..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Eroding walkable area..."
@@ -8929,10 +9362,6 @@ msgid "Change Expression"
msgstr "Zmień wyrażenie"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Dodaj węzeł"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Usuwanie węzłów VisualScript"
@@ -8954,7 +9383,7 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Ctrl to drop a simple reference to the node."
-msgstr ""
+msgstr "Przytrzymaj Ctrl, by upuścić prostą referencję do węzła."
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Variable Setter."
@@ -9016,6 +9445,11 @@ msgid "Change Input Value"
msgstr "Zmień wartość wejściową"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Zmień rozmiar CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Nie można skopiować węzła funkcji."
@@ -9450,6 +9884,13 @@ msgstr ""
"Węzeł typu ParallaxLayer zadziała, jeśli będzie dzieckiem węzła "
"ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9610,6 +10051,12 @@ msgstr ""
"Kształt musi być określony dla CollisionShape, aby spełniał swoje zadanie. "
"Utwórz zasób typu CollisionShape w odpowiednim polu obiektu!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
@@ -9627,6 +10074,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9643,6 +10096,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Nic nie jest widoczne, bo siatki nie zostały przypisane do kolejki rysowania."
@@ -9682,25 +10142,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "Pole Path musi wskazywać na węzeł Spatial."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment wymaga zasobu Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Tylko jeden WorldEnvironment jest dozwolony na scenÄ™ (lub zestaw "
-"zinstancjonowanych scen)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Ten WorldEnvironment jest ignorowany. Dodaj Camera (dla scen 3D) lub ustaw "
-"Background Mode tego środowiska na Canvas (dla scen 2D)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "To ciało będzie ignorowane, dopóki nie ustawisz siatki"
@@ -9731,6 +10172,25 @@ msgstr ""
"VehicleWheel zapewnia system kół do VehicleBody. Proszę użyć go jako "
"dziedziczÄ…cego po VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment wymaga zasobu Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Tylko jeden WorldEnvironment jest dozwolony na scenÄ™ (lub zestaw "
+"zinstancjonowanych scen)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Ten WorldEnvironment jest ignorowany. Dodaj Camera (dla scen 3D) lub ustaw "
+"Background Mode tego środowiska na Canvas (dla scen 2D)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "W węźle BlendTree '%s', animacja nie znaleziona: '%s'"
@@ -9771,6 +10231,10 @@ msgstr "Korzeń AnimationPlayer nie jest poprawnym węzłem."
#: scene/animation/animation_tree_player.cpp
msgid "This node has been deprecated. Use AnimationTree instead."
+msgstr "Ten węzeł jest przestarzały. Zamiast tego użyj AnimationTree."
+
+#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
msgstr ""
#: scene/gui/color_picker.cpp
@@ -9778,9 +10242,22 @@ msgid "Raw Mode"
msgstr "Trybie RAW"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Dodaj bieżący kolor jako domyślne"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Alarm!"
@@ -9789,6 +10266,11 @@ msgstr "Alarm!"
msgid "Please Confirm..."
msgstr "Proszę potwierdzić..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Przejdź folder wyżej"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9874,6 +10356,24 @@ msgstr "Przypisanie do uniformu."
msgid "Varyings can only be assigned in vertex function."
msgstr "Varying może być przypisane tylko w funkcji wierzchołków."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Utwórz instancję wybranej sceny/scen jako dziecko wybranego węzła."
+
+#~ msgid "FPS"
+#~ msgstr "Klatki na sekundÄ™"
+
+#~ msgid "Warnings:"
+#~ msgstr "Ostrzeżenia:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Rozmiar czcionki:"
+
+#~ msgid "Line:"
+#~ msgstr "Linia:"
+
+#~ msgid "Col:"
+#~ msgstr "Kolumna:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "OrientedPathFollow działa tylko, gdy jest węzłem podrzędnym Path."
@@ -10037,10 +10537,6 @@ msgstr "Varying może być przypisane tylko w funkcji wierzchołków."
#~ msgid "Convert To Lowercase"
#~ msgstr "Małe litery"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "PrzyciÄ…gaj do siatki"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Obróć o 0 stopni"
@@ -10536,9 +11032,6 @@ msgstr "Varying może być przypisane tylko w funkcji wierzchołków."
#~ msgid "Added:"
#~ msgstr "Dodane:"
-#~ msgid "Removed:"
-#~ msgstr "Usunięte:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Nie udało się zapisać tekstury atlasu:"
@@ -10802,9 +11295,6 @@ msgstr "Varying może być przypisane tylko w funkcji wierzchołków."
#~ msgid "Error importing:"
#~ msgstr "Błąd importowania:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Tylko jeden plik jest wymagany dla dużych tekstur."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Maksymalny rozmiar tekstury:"
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index e8240ad087..253d11a41f 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -91,6 +91,16 @@ msgstr "Yar, Blow th' Selected Down!"
msgid "Delete Selected Key(s)"
msgstr "Yar, Blow th' Selected Down!"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Add Signal"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Discharge ye' Signal"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -125,6 +135,15 @@ msgid "Anim Change Call"
msgstr "Change yer Anim Call"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -174,6 +193,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -199,6 +222,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -251,6 +278,18 @@ msgid "Delete Key(s)"
msgstr "Yar, Blow th' Selected Down!"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -292,6 +331,16 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Change yer Anim Transition"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Paste yer Node"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -316,6 +365,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -324,10 +377,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Method not found in object: "
msgstr "VariableGet be in davy jones locker! Not in th' script: "
@@ -341,6 +406,11 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Paste yer Node"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -383,11 +453,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Paste yer Node"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -488,6 +553,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -552,20 +629,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -863,8 +932,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1120,7 +1189,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1149,6 +1218,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1295,6 +1368,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1344,7 +1437,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1419,10 +1512,32 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Slit th' Node"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Slit th' Node"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1646,8 +1761,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1656,6 +1771,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1849,6 +1974,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2340,7 +2473,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2900,14 +3033,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3049,10 +3174,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3403,24 +3524,6 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Ye be fixin' Signal:"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Discharge ye' Function"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3440,6 +3543,24 @@ msgstr ""
msgid "Erase points."
msgstr "Yar, Blow th' Selected Down!"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Ye be fixin' Signal:"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Discharge ye' Function"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3457,12 +3578,47 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Discharge ye' Signal"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Add Node"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Yer functions:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Discharge ye' Function"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3502,6 +3658,29 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Add Variable"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Discharge ye' Function"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Discharge ye' Variable"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3510,6 +3689,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3527,6 +3710,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Change"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3537,11 +3725,53 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Add Node(s) From yer Tree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Find ye Node Type"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Slit th' Node"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Yer functions:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Slit th' Node"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Change"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3557,6 +3787,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3786,6 +4021,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Forge yer Node!"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Add Function"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Add Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3814,6 +4064,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4230,6 +4492,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4614,6 +4886,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4870,19 +5146,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4973,11 +5249,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5137,6 +5413,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5770,6 +6052,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5880,10 +6170,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5928,7 +6214,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6020,6 +6306,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6028,6 +6320,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "Slit th' Node"
@@ -6243,7 +6539,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6307,10 +6603,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6319,7 +6611,12 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
+msgstr "Yer functions:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6331,8 +6628,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Yer unique name be evil."
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6629,6 +6927,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6644,6 +6958,11 @@ msgstr "Yar, Blow th' Selected Down!"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Yar, Blow th' Selected Down!"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Yar, Blow th' Selected Down!"
@@ -6779,6 +7098,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Discharge ye' Variable"
@@ -6825,6 +7152,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Rename Variable"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6840,6 +7188,16 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Edit yer Variable:"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Change"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6853,7 +7211,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6866,6 +7233,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7141,6 +7516,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7840,6 +8228,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7874,6 +8266,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8297,6 +8693,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8508,6 +8916,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8646,10 +9058,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8819,10 +9227,6 @@ msgid "Change Expression"
msgstr "Swap yer Expression"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Add Node"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Remove VisualScript Nodes"
msgstr "Discharge ye' Variable"
@@ -8917,6 +9321,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9310,6 +9718,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9439,6 +9854,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9453,6 +9874,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9465,6 +9892,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9495,21 +9929,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9533,6 +9952,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9575,11 +10009,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9590,6 +10040,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index be32fed935..224b378e8c 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -34,11 +34,11 @@
# Bruno Miranda Da Silva <brunofreezee@gmail.com>, 2018.
# Marcos Roberto Rodrigues Marques <contato.mroberto@gmail.com>, 2018.
# Dyefferson Azevedo <gamecanalbrasil@gmail.com>, 2018.
-# LucasSouza6 <lucasosouza66@gmail.com>, 2018.
+# LucasSouza6 <lucasosouza66@gmail.com>, 2018, 2019.
# Pedro Pacheco <pedroxixipa@hotmail.com>, 2018, 2019.
# Bruno Henrique <nimbusdroid@gmail.com>, 2018, 2019.
# Luciano Scilletta <lucianoscilletta@gmail.com>, 2018.
-# Julio Yagami <juliohenrique31501234@hotmail.com>, 2018.
+# Julio Yagami <juliohenrique31501234@hotmail.com>, 2018, 2019.
# Fernando Martinez <contact@fernandodev.com>, 2018.
# Marcelo <mitissa@gmail.com>, 2018, 2019.
# Walter Bolitto <wrcarval@live.com>, 2018, 2019.
@@ -48,12 +48,18 @@
# joel silva <joelgbsilva@gmail.com>, 2019.
# Heitor Novais Pereira <heitornovais394@outlook.com>, 2019.
# Joel Landgraf Filho <joel.landgraf@gmail.com>, 2019.
+# Alan Valmorbida <alanvalmorbida@gmail.com>, 2019.
+# João Vitor Ferreira Cavalcante <jvfecav@gmail.com>, 2019.
+# Thiago Amendola <amendolathiago@gmail.com>, 2019.
+# Raphael Nogueira Campos <raphaelncampos@gmail.com>, 2019.
+# Dimenicius <vinicius.costa.92@gmail.com>, 2019.
+# Davi <wokep.ma.wavid@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
-"Last-Translator: Eduardo Abreu <eduo.abreu@gmail.com>\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
+"Last-Translator: Davi <wokep.ma.wavid@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -61,7 +67,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -127,6 +133,14 @@ msgstr "Duplicar Chave(s) Selecionada(s)"
msgid "Delete Selected Key(s)"
msgstr "Excluir Chave(s) Selecionada(s)"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Adicionar um Ponto Bezier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Mover pontos Bezier"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Duplicar Chave na Anim"
@@ -156,6 +170,16 @@ msgid "Anim Change Call"
msgstr "Alterar Chamada da Anim"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Alterar Repetição da Animação"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Alterar Repetição da Animação"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Trilha de Propriedade"
@@ -205,6 +229,11 @@ msgid "Anim Clips:"
msgstr "Clipes de Animação:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Alterar Valor do Vetor"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Ligar/desligar esta trilha."
@@ -229,6 +258,11 @@ msgid "Time (s): "
msgstr "Tempo (s): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Habilitar Doppler"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Contínuo"
@@ -279,6 +313,18 @@ msgid "Delete Key(s)"
msgstr "Deletar Chave(s)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Alterar Modo de Atualização da Animação:"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Alterar Modo de Interpolação da Animação"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Alterar Modo Repetição da Animação"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Remover Trilha da Anim"
@@ -320,6 +366,16 @@ msgid "Anim Insert Key"
msgstr "Inserir Chave na Anim"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Alterar FPS da Animação"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Reordenar Autoloads"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
"As faixas de transformação aplicam-se apenas aos nós baseados no espaço."
@@ -350,6 +406,11 @@ msgid "Not possible to add a new track without a root"
msgstr "Não é possível adicionar uma nova trilha sem uma raiz"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Adicionar Trilha"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Caminho da trilha é inválido,então não pode adicionar uma chave."
@@ -358,11 +419,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Trilha não é do tipo Espacial,não pode inserir chave"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Trilha de transformação 3D"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Adicionar Trilha"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
"Caminho da trilha é inválido,então não pode adicionar uma chave de método."
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Trilha de método de chamada"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Método não encontrado no objeto: "
@@ -375,6 +451,10 @@ msgid "Clipboard is empty"
msgstr "Ãrea de transferência vazia"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Colar Trilhas"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Alterar Escala das Chaves na Anim"
@@ -418,10 +498,6 @@ msgid "Copy Tracks"
msgstr "Copiar Trilhas"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Colar Trilhas"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Selecionar Escala"
@@ -521,6 +597,19 @@ msgstr "Selecionar trilhas para copiar:"
msgid "Copy"
msgstr "Copiar"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Clipes de Ãudio:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Redimensionar Vetor"
@@ -585,21 +674,13 @@ msgstr "Reduzir"
msgid "Reset Zoom"
msgstr "Redefinir Ampliação"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Avisos:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Tamanho da Fonte:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linha:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Avisos"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Coluna:"
+msgid "Line and column numbers."
+msgstr "Números de linha e coluna."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -901,8 +982,8 @@ msgstr "Excluir arquivos selecionados?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Excluir"
@@ -1158,8 +1239,8 @@ msgid "Add Bus"
msgstr "Adicionar Canal"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Criar um novo Layout de Canais."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Adiciona um novo Canal de Ãudio a esse layout."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1187,6 +1268,10 @@ msgstr "Carregar Padrão"
msgid "Load the default Bus Layout."
msgstr "Carregar o Layout de Canais padrão."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Criar um novo Layout de Canais."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nome Inválido."
@@ -1333,6 +1418,28 @@ msgstr "Nenhum template para exportação foi encontrado no caminho esperado:"
msgid "Packing"
msgstr "Empacotando"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"A plataforma alvo requer compressão de texturas 'ETC' para GLES2. Habilite "
+"'Import Etc' nas Configurações de Projeto."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1378,7 +1485,7 @@ msgstr "Mostrar no Gerenciador de Arquivos"
msgid "New Folder..."
msgstr "Nova Pasta..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Atualizar"
@@ -1453,10 +1560,33 @@ msgstr "Mover Favorito Acima"
msgid "Move Favorite Down"
msgstr "Mover Favorito Abaixo"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Chão Anterior"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Próximo Chão"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Ir para pasta pai"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Não foi possível criar a pasta."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Visualizar itens como uma grade de miniaturas."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Visualizar itens como uma lista."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Diretórios & Arquivos:"
@@ -1679,9 +1809,10 @@ msgstr "Limpar Saída"
msgid "Project export failed with error code %d."
msgstr "Falha na exportação do projeto com código de erro %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Erro ao salvar Recurso!"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Imported resources can't be saved."
+msgstr "Recursos Importados"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1689,6 +1820,18 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Erro ao salvar Recurso!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+"O recurso não pode ser salvo porque não pertence à cena editada. Faça-o "
+"único primeiro."
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Salvar Recurso como..."
@@ -1909,6 +2052,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "Salvar alterações em '%s' antes de fechar?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Foram salvos %s recurso(s) modificado(s)."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Um nó raiz é requerido para salvar a cena."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Salvar Cena Como..."
@@ -2433,8 +2584,8 @@ msgid "Save & Restart"
msgstr "Salvar e Reiniciar"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "Gira quando a janela do editor atualiza!"
+msgid "Spins when the editor window redraws."
+msgstr "Gira quando a janela do editor atualiza."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2999,14 +3150,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "Impossível navegar até '%s' pois não existe no sistema de arquivos!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Visualizar itens como uma grade de miniaturas."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Visualizar itens como uma lista."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Estado: Falha na importação do arquivo. Por favor, conserte o arquivo e "
@@ -3144,10 +3287,6 @@ msgid "Search files"
msgstr "Pesquisar arquivos"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instanciar a(s) cena(s) selecionada como filho do nó selecionado."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3359,17 +3498,19 @@ msgstr "Reimportar"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Salvar cenas, reimportar e reiniciar"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Mudar o driver de vídeo necessita reinicializar o editor."
+msgstr ""
+"Mudar o tipo de um arquivo importado necessita a reinicialização do editor."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"AVISO: Existem objetos que utilizam esse recurso, eles podem parar de "
+"carregar apropriadamente."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3494,22 +3635,6 @@ msgid "Create Polygon"
msgstr "Criar Polígono"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Editar Polígono"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Inserir Ponto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Editar Polígono (Remover Ponto)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Remover Polígono e Ponto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3530,6 +3655,22 @@ msgstr ""
msgid "Erase points."
msgstr "Apagar pontos."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Editar Polígono"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Inserir Ponto"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Editar Polígono (Remover Ponto)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Remover Polígono e Ponto"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3547,6 +3688,21 @@ msgstr "Carregar..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Mover pontos"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "Alterar limites do BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Alterar Tempo de Mistura"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3554,6 +3710,27 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Adicionar Nó"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Adicionar Animação"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Remover Ponto do Caminho"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3572,7 +3749,7 @@ msgstr "Definir posição de mescla dentro do espaço"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Select and move points, create points with RMB."
-msgstr "Selecione e mova pontos, crie pontos com o Botão Direito do Mouse."
+msgstr "Selecionar e mover pontos, criar pontos com o botão direito do mouse."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
@@ -3596,6 +3773,31 @@ msgid "Triangle already exists"
msgstr "Triângulo já existe"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Adicionar Variável"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Alterar Tempo de Mistura"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Alterar Tempo de Mistura"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Remover Ponto do Caminho"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Remover Variável"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D não pertence ao nó AnimationTree."
@@ -3604,6 +3806,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Não existem triângulos, então nenhuma mistura pode acontecer."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Alternar Auto Carregamentos de Globais"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Crie triângulos conectando pontos."
@@ -3621,6 +3828,10 @@ msgid "Blend:"
msgstr "Misturar:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Parâmetro Modificado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Editar Filtros"
@@ -3630,12 +3841,52 @@ msgid "Output node can't be added to the blend tree."
msgstr "Nós de saída não pode ser adicionado à árvore de mistura."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Adicionar Nó(s) a Partir da Ãrvore"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Nó Movido"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
"Incapaz de conectar, a porta pode estar em uso ou a conexão é inválida."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Nós Conectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Nós Desconectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Nova animação"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Excluir Nó"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Ligar/desligar esta trilha."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "FIltro de Idiomas Alterado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Nenhum reprodutor de animação foi definido, então não é possível obter os "
@@ -3657,6 +3908,12 @@ msgstr ""
"possível obter os nomes das trilhas."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nome do nó"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Adicionar nó..."
@@ -3885,6 +4142,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Tempos de Mistura de Animação Cruzada"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Modo Mover"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Adicionar Tradução"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Adicionar Nó"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Fim"
@@ -3898,7 +4170,7 @@ msgstr "Sincronizar"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "At End"
-msgstr "No final"
+msgstr "No Fim"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Travel"
@@ -3913,6 +4185,19 @@ msgid "No playback resource set at path: %s."
msgstr "Sem recurso de playback definido no caminho: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Removido:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Transição Removida"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Configurar Nó de Início (Autoplay)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4336,6 +4621,18 @@ msgid "Move CanvasItem"
msgstr "Mover CanvaItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+"Predefinições para os valores de âncoras e margens de um nó de controle."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Filhos de contêineres tem sua âncora e margens sobrescritos pelos seus pais."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Apenas âncoras"
@@ -4721,6 +5018,10 @@ msgstr "Segure Shift para editar tangentes individualmente"
msgid "Bake GI Probe"
msgstr "Cozinhar Sonda GI"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Gradiente Editado"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Item %d"
@@ -4979,6 +5280,10 @@ msgid "Generating Visibility Rect"
msgstr "Gerar Retângulo de Visibilidade"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Gerar Retângulo de Visibilidade"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Só é permitido colocar um ponto em um material processador ParticlesMaterial"
@@ -4992,10 +5297,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Nenhum pixel com transparência > 128 na imagem."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Gerar Retângulo de Visibilidade"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Carregar Máscara de Emissão"
@@ -5083,13 +5384,13 @@ msgid "Generating AABB"
msgstr "Gerando AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Gerar AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Gerar AABB de Visibilidade"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Gerar AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Remover Ponto da Curva"
@@ -5244,6 +5545,14 @@ msgid "Create UV Map"
msgstr "Criar Mapa UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"Polygon2D tem vértices internos, portanto não pode mais ser editado no "
+"Viewport."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Criar Polígono & UV"
@@ -5863,6 +6172,16 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "Este esqueleto não tem ossos, crie alguns nós filhos Bone2D."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Faça Resto Pose (De Ossos)"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Set Rest Pose to Bones"
+msgstr "Faça Resto Pose (De Ossos)"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Esqueleto2D"
@@ -5971,10 +6290,6 @@ msgid "Vertices"
msgstr "Vértices"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Visão Superior."
@@ -6019,7 +6334,8 @@ msgid "Rear"
msgstr "Traseira"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Alinhar com Visão"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6111,6 +6427,14 @@ msgid "Freelook Speed Modifier"
msgstr "Modificador de velocidade da Visão Livre"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"Nota: O valor de FPS mostrado é da taxa de quadros do editor\n"
+"Ele não deve ser usado como indicação confiável de desempenho do jogo."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Ver Rotação Bloqueada"
@@ -6119,6 +6443,11 @@ msgid "XForm Dialog"
msgstr "Diálogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Encaixar na grade"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Modo de Seleção (Q)"
@@ -6334,8 +6663,8 @@ msgid "Post"
msgstr "Pós"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
-msgstr "Gaveta sem nome"
+msgid "Nameless gizmo"
+msgstr "Coisa sem nome"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite is empty!"
@@ -6399,10 +6728,6 @@ msgid "Add Empty"
msgstr "Adicionar Vazio"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Alterar Repetição da Animação"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Alterar FPS da Animação"
@@ -6411,8 +6736,12 @@ msgid "(empty)"
msgstr "(vazio)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animações"
+msgid "Animations:"
+msgstr "Animações:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Nova animação"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6423,8 +6752,8 @@ msgid "Loop"
msgstr "Repetir"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Quadros da Animação"
+msgid "Animation Frames:"
+msgstr "Quadros da Animação:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6712,6 +7041,23 @@ msgid "Merge from Scene"
msgstr "Fundir a partir de Cena"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Próximo Chão"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "Coordenada Anterior"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Copie o bitmask."
@@ -6724,6 +7070,10 @@ msgid "Erase bitmask."
msgstr "Apagar o bitmask."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Criar um novo retângulo."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Criar um novo polígono."
@@ -6860,6 +7210,14 @@ msgid "Clear Tile Bitmask"
msgstr "Limpar o Bitmask da telha"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr "Tornar o Polígono Côncavo"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr "Tornar o Polígono Convexo"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "Remover Telha"
@@ -6900,6 +7258,29 @@ msgid "TileSet"
msgstr "Conjunto de Telha"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Definir como Padrão para '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "VisualShader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplicar Nó(s)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Vértice"
@@ -6909,12 +7290,22 @@ msgstr "Fragmento"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Light"
-msgstr "Leve"
+msgstr "Luz"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Editar prioridade da telha"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Alterações de Shader"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Executável"
@@ -6928,10 +7319,21 @@ msgid "Delete preset '%s'?"
msgstr "Excluir definição '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
msgstr ""
-"Modelos de exportação para esta plataforma não foram encontrados/estão "
-"corrompidos:"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"Falha ao exportar o projeto para a plataforma '%s'.\n"
+"Isto pode ser devido a um problema de configuração nas pré-configurações de "
+"exportação ou nas configurações de exportação."
#: editor/project_export.cpp
msgid "Release"
@@ -6942,6 +7344,16 @@ msgid "Exporting All"
msgstr "Exportando tudo"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "O caminho de exportação informado não existe."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"Modelos de exportação para esta plataforma não foram encontrados/estão "
+"corrompidos:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Predefinições"
@@ -7178,11 +7590,11 @@ msgstr "Navegar"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Renderizador:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7191,10 +7603,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Maior qualidade visual\n"
+"Todas as funções disponíveis\n"
+"Incompatível com hardware antigo\n"
+"Não recomendado para jogos web"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7203,10 +7619,16 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Menor qualidade visual\n"
+"Algumas funções não disponíveis\n"
+"Funciona na maioria dos hardwares\n"
+"Recomendado para jogos web"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"Renderizador pode ser alterado posteriormente, porém, cenas poderão "
+"necessitar de ajustes."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7222,6 +7644,26 @@ msgstr "Tem certeza de que quer abrir mais de um projeto?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"O seguinte arquivo de configurações do projeto foi gerado por uma versão "
+"mais antiga do Godot e precisa ser convertido para esta versão:\n"
+"\n"
+"%s\n"
+"\n"
+"Você deseja realizar a conversão?\n"
+"Aviso: você não poderá mais abrir o projeto com versões anteriores do Godot."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7934,9 +8376,10 @@ msgstr "Duplicar Nó(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"Não é possível re-hierarquizar nós em cenas herdadas, a ordem dos nós não "
+"pode ser alterada."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Node must belong to the edited scene to become root."
msgstr "Node necessita pertencer à cena editada para se tornar raiz."
@@ -7945,6 +8388,10 @@ msgid "Instantiated scenes can't become root"
msgstr "Cenas instanciadas não podem se tornar raiz"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Tornar Raiz o Nó"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Excluir Nó(s)?"
@@ -7981,6 +8428,10 @@ msgid "Make Local"
msgstr "Tornar Local"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Nova Raiz de Cena"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Criar nó raiz:"
@@ -8409,6 +8860,18 @@ msgid "Set From Tree"
msgstr "Definir a partir da árvore"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Apagar Atalho"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Restaurar Atalho"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Modificar Atalho"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Atalhos"
@@ -8615,6 +9078,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Duplicar Seleção do GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "Pintura GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Mapa de Grade"
@@ -8751,10 +9218,6 @@ msgid "Build Project"
msgstr "Compilar Projeto"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Avisos"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Ver registro"
@@ -8919,10 +9382,6 @@ msgid "Change Expression"
msgstr "Alterar Expressão"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Adicionar Nó"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Remover Nodes VisualScript"
@@ -9007,6 +9466,10 @@ msgid "Change Input Value"
msgstr "Alterar Valor da Entrada"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Redimensionar Comentário"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Não é possível copiar o nó de função."
@@ -9157,12 +9620,10 @@ msgid "Set %s"
msgstr "Conjunto %s"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Package name is missing."
msgstr "Nome do pacote está faltando."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Package segments must be of non-zero length."
msgstr "Seguimentos de pacote necessitam ser de tamanho diferente de zero."
@@ -9179,70 +9640,74 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
+"O caractere '%s' não pode ser o primeiro caractere em um segmento de pacote."
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
-msgstr ""
+msgstr "O pacote deve ter pelo menos um separador '.'."
#: platform/android/export/export.cpp
msgid "ADB executable not configured in the Editor Settings."
-msgstr ""
+msgstr "Executável ADB não configurado nas opções do Editor."
#: platform/android/export/export.cpp
msgid "OpenJDK jarsigner not configured in the Editor Settings."
-msgstr ""
+msgstr "OpenJDK jarsigner não configurado nas opções do Editor."
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
+"Porta-chaves de depuração não configurado nas Configurações do Editor e nem "
+"na predefinição."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
-msgstr ""
+msgstr "Chave pública inválida para expansão de APK."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid package name:"
-msgstr "Nome de classe inválido"
+msgstr "Nome de pacote inválido:"
#: platform/iphone/export/export.cpp
msgid "Identifier is missing."
-msgstr ""
+msgstr "Identificador está ausente."
#: platform/iphone/export/export.cpp
msgid "Identifier segments must be of non-zero length."
-msgstr ""
+msgstr "Os segmentos de identificador devem ter comprimento diferente de zero."
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "The character '%s' is not allowed in Identifier."
-msgstr "O nome não é um identificador valido:"
+msgstr "O caractere '%s' não é permitido no identificador."
#: platform/iphone/export/export.cpp
msgid "A digit cannot be the first character in a Identifier segment."
msgstr ""
+"Um digito não pode ser o primeiro caractere de um segmento identificador."
#: platform/iphone/export/export.cpp
msgid ""
"The character '%s' cannot be the first character in a Identifier segment."
msgstr ""
+"O caractere '%s' não pode ser o primeiro caractere de um segmento "
+"identificador."
#: platform/iphone/export/export.cpp
msgid "The Identifier must have at least one '.' separator."
-msgstr ""
+msgstr "O identificador deve ter pelo menos um separador '.'."
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
msgstr ""
+"App Store Team ID não especificado - não é possível configurar o projeto."
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Invalid Identifier:"
-msgstr "O nome não é um identificador valido:"
+msgstr "O nome não é um identificador válido:"
#: platform/iphone/export/export.cpp
msgid "Required icon is not specified in the preset."
-msgstr ""
+msgstr "Ãcone necessário não especificado na predefinição."
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
@@ -9277,19 +9742,16 @@ msgid "Using default boot splash image."
msgstr "Usando imagem boot splash padrão."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid package unique name."
-msgstr "Nome único inválido."
+msgstr "Nome único de pacote inválido."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid product GUID."
-msgstr "Tamanho de fonte inválido."
+msgstr "GUID de produto inválido."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid publisher GUID."
-msgstr "Caminho base inválido"
+msgstr "GUID do editor inválido."
#: platform/uwp/export/export.cpp
msgid "Invalid background color."
@@ -9297,31 +9759,31 @@ msgstr "Cor de fundo inválida."
#: platform/uwp/export/export.cpp
msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
+msgstr "Dimensões inválidas do logo da loja (deve ser 50x50)."
#: platform/uwp/export/export.cpp
msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
+msgstr "Dimensões inválidas do logo quadrado de 44x44 (deve ser 44x44)."
#: platform/uwp/export/export.cpp
msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
+msgstr "Dimensões inválidas do logo quadrado de 71x71 (deve ser 71x71)."
#: platform/uwp/export/export.cpp
msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
+msgstr "Dimensões inválidas do logo quadrado de 150x150 (deve ser 150x150)."
#: platform/uwp/export/export.cpp
msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
+msgstr "Dimensões inválidas do logo quadrado de 310x310 (deve ser 310x310)."
#: platform/uwp/export/export.cpp
msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
+msgstr "Dimensões inválidas de logo retangular de 310x150 (deve ser 310x150)."
#: platform/uwp/export/export.cpp
msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
+msgstr "Dimensões inválidas da tela de abertura (deve ser 620x300)."
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -9433,6 +9895,16 @@ msgstr ""
"O nó ParallaxLayer apenas funciona quando definido como filho de um nó "
"ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"Partículas baseadas em GPU não são suportadas pelo driver de vídeo GLES2.\n"
+"Use o nó CPUParticles2D como substituto. Você pode usar a opção \"Converter "
+"para CPUParticles\" para este propósito."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9592,6 +10064,14 @@ msgstr ""
"Uma forma deve ser fornecida para que o nó CollisionShape funcione. Por "
"favor, crie um recurso de forma a ele!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+"Formas planas não funcionam bem e serão removidas em versões futuras. Por "
+"favor não as use."
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nada é visível porque nenhuma malha foi atribuída."
@@ -9608,6 +10088,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Planejando Malhas"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9624,6 +10110,16 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"Partículas baseadas em GPU não são suportadas pelo driver de vídeo GLES2.\n"
+"Use o nó CPUParticles como substituto. Você pode usar a opção \"Converter "
+"para CPUParticles\" para este propósito."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Nada está visível porque as meshes não foram atribuídas a passes de desenho."
@@ -9641,13 +10137,12 @@ msgid "PathFollow only works when set as a child of a Path node."
msgstr "PathFollow só funciona quando definido como filho de um nó Path."
#: scene/3d/path.cpp
-#, fuzzy
msgid ""
"PathFollow ROTATION_ORIENTED requires \"Up Vector\" enabled in its parent "
"Path's Curve resource."
msgstr ""
-"OrientedPathFollow requer \"Up Vector\" habilitado no recurso Curva do "
-"Caminho pai."
+"PathFollow ROTATION_ORIENTED requer \"Up Vector\" habilitado no recurso "
+"Curva do Caminho pai."
#: scene/3d/physics_body.cpp
msgid ""
@@ -9663,25 +10158,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "A propriedade Caminho deve apontar para um nó Spatial para funcionar."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment precisa de um recurso Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"É permitido apenas um nó WorldEnvironment por cena (ou conjunto de cenas "
-"instanciadas)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Este WorldEnvironment está sendo ignorado. Adicione uma Camera (para cenas "
-"3D) ou defina o Background Mode deste ambiente para Canvas (para cenas 2D)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Este corpo será ignorado até você definir uma malha"
@@ -9712,6 +10188,25 @@ msgstr ""
"VehiceWheel serve para fornecer um sistema de rodas para um VehicleBody. Por "
"favor, use ele como um filho de um VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment precisa de um recurso Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"É permitido apenas um nó WorldEnvironment por cena (ou conjunto de cenas "
+"instanciadas)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Este WorldEnvironment está sendo ignorado. Adicione uma Camera (para cenas "
+"3D) ou defina o Background Mode deste ambiente para Canvas (para cenas 2D)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "No nó do BlendTree '%s', animação não encontrada: '%s'"
@@ -9756,12 +10251,28 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Este nó foi reprovado. Use AnimationTree em vez disso."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Escolha uma cor da tela."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Modo Bruto"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Adicionar cor atual como uma predefinição"
+msgid "Switch between hexadecimal and code values."
+msgstr "Alterne entre valores haxadecimais e de código."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Adicionar cor atual como uma predefinição."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9771,6 +10282,10 @@ msgstr "Alerta!"
msgid "Please Confirm..."
msgstr "Confirme Por Favor..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "Ir para diretório pai"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9855,6 +10370,24 @@ msgstr "Atribuição à uniforme."
msgid "Varyings can only be assigned in vertex function."
msgstr "Variáveis só podem ser atribuídas na função de vértice."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Instanciar a(s) cena(s) selecionada como filho do nó selecionado."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Avisos:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Tamanho da Fonte:"
+
+#~ msgid "Line:"
+#~ msgstr "Linha:"
+
+#~ msgid "Col:"
+#~ msgstr "Coluna:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "OrientedPathFollow só funciona quando definido como filho de um nó Path."
@@ -10018,10 +10551,6 @@ msgstr "Variáveis só podem ser atribuídas na função de vértice."
#~ msgid "Convert To Lowercase"
#~ msgstr "Converter Para Minúsculo"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Encaixar na grade"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Rotacionar 0 degraus"
@@ -10560,9 +11089,6 @@ msgstr "Variáveis só podem ser atribuídas na função de vértice."
#~ msgid "Added:"
#~ msgstr "Adicionado:"
-#~ msgid "Removed:"
-#~ msgstr "Removido:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Não foi possível salvar Subtextura do Atlas:"
@@ -10830,9 +11356,6 @@ msgstr "Variáveis só podem ser atribuídas na função de vértice."
#~ msgid "Error importing:"
#~ msgstr "Erro ao importar:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Apenas um arquivo é requerido para textura grande."
-
#~ msgid "Max Texture Size:"
#~ msgstr "Tamanho Máximo de Textura:"
@@ -11064,9 +11587,6 @@ msgstr "Variáveis só podem ser atribuídas na função de vértice."
#~ msgid "Edit Groups"
#~ msgstr "Editar Grupos"
-#~ msgid "GridMap Paint"
-#~ msgstr "Pintura GridMap"
-
#, fuzzy
#~ msgid "Tiles"
#~ msgstr " Arquivos"
@@ -11373,9 +11893,6 @@ msgstr "Variáveis só podem ser atribuídas na função de vértice."
#~ msgid "Cannot go into subdir:"
#~ msgstr "Não é possível ir ao subdiretório:"
-#~ msgid "Imported Resources"
-#~ msgstr "Recursos Importados"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "Inserir Chaves (Ins)"
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index c3e9b189c2..f69bf41c42 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -18,8 +18,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
-"Last-Translator: ssantos <ssantos@web.de>\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
+"Last-Translator: João Lopes <linux-man@hotmail.com>\n"
"Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_PT/>\n"
"Language: pt_PT\n"
@@ -27,7 +27,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -94,6 +94,14 @@ msgstr "Duplicar Chave(s) Selecionada(s)"
msgid "Delete Selected Key(s)"
msgstr "Apagar Chave(s) Selecionada(s)"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Adicionar Ponto Bezier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Mover Ponto Bezier"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Duplicar Chaves"
@@ -123,6 +131,15 @@ msgid "Anim Change Call"
msgstr "Anim Mudar Chamada"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Mudar Duração da Animação"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Mudar Ciclo da Animação"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Pista de Propriedades"
@@ -172,6 +189,10 @@ msgid "Anim Clips:"
msgstr "Clips Anim:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Mudar Caminho da Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Alternar esta pista on/off."
@@ -196,6 +217,10 @@ msgid "Time (s): "
msgstr "Tempo (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Alternar Pista Ativada"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Contínuo"
@@ -246,6 +271,18 @@ msgid "Delete Key(s)"
msgstr "Apagar Chave(s)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Mudar o Modo de Atualização da Animação"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Mudar o Modo de Interpolação da Animação"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Mudar Modo do Loop da Animação"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Remover Pista de Animação"
@@ -289,6 +326,14 @@ msgid "Anim Insert Key"
msgstr "Anim Inserir Chave"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Mudar Passo da Animação"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "Reorganizar Pistas"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Pistas de Transformação só se aplicam a nós de base Espacial."
@@ -319,6 +364,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Não é possível adicionar nova pista sem uma raíz"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Adicionar Pista Bezier"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Caminho da pista é inválido, não se consegue adicionar uma chave."
@@ -327,11 +376,23 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Pista não do tipo Spatial, não se consegue inserir chave"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Adicionar Chave da Pista de Transformação"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Adicionar Chave da Pista"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
"Caminho da pista é inválido, não se consegue adicionar uma chave método."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Adicionar Chave da Pista Método"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Método não encontrado no objeto: "
@@ -344,6 +405,10 @@ msgid "Clipboard is empty"
msgstr "Ãrea de Transferência está vazia"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Colar Pistas"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Escalar Chaves"
@@ -387,10 +452,6 @@ msgid "Copy Tracks"
msgstr "Copiar Pistas"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Colar Pistas"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Escalar Selecção"
@@ -490,6 +551,18 @@ msgstr "Selecionar pistas a copiar:"
msgid "Copy"
msgstr "Copiar"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Adicionar Clip da Pista Ãudio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Alterar Compensação do Início do Clip da Pista Ãudio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Alterar Compensação do Fim do Clip da Pista Ãudio"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Redimensionar Array"
@@ -554,21 +627,13 @@ msgstr "Zoom Out"
msgid "Reset Zoom"
msgstr "Repor Zoom"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "Avisos:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Tamanho do tipo de letra:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linha:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "Avisos"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Coluna:"
+msgid "Line and column numbers."
+msgstr "Números de Linha e Coluna."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -870,8 +935,8 @@ msgstr "Apagar arquivos selecionados?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Apagar"
@@ -1127,8 +1192,8 @@ msgid "Add Bus"
msgstr "Adicionar Barramento"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Criar um novo Modelo de Barramento."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Adicionar novo Barramento de Ãudio a este modelo."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1156,6 +1221,10 @@ msgstr "Carregar Padrão"
msgid "Load the default Bus Layout."
msgstr "Carregar o Modelo padrão de barramento."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Criar um novo Modelo de Barramento."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nome inválido."
@@ -1305,6 +1374,34 @@ msgstr "Nenhum modelo de exportação encontrado no caminho previsto:"
msgid "Packing"
msgstr "Empacotamento"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"Plataforma Alvo exige compressão de textura 'ETC' para GLES2. Ative "
+"'Importar Etc' nas Configurações do Projeto."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"Plataforma Alvo exige compressão de textura 'ETC2' para GLES3. Ative "
+"'Importar Etc 2' nas Configurações do Projeto."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"Plataforma Alvo exige compressão de textura 'ETC' para o driver de recurso "
+"em GLES2.\n"
+"Ative 'Importar Etc' nas Configurações do Projeto, ou desative 'Driver de "
+"Recurso ativo'."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1350,7 +1447,7 @@ msgstr "Mostrar no Gestor de Ficheiros"
msgid "New Folder..."
msgstr "Nova Diretoria..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Atualizar"
@@ -1425,10 +1522,30 @@ msgstr "Mover Favorito para Cima"
msgid "Move Favorite Down"
msgstr "Mover Favorito para Baixo"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr "Pasta Anterior"
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr "Próxima Pasta"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Ir para a pasta acima"
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr "(Não) tornar favorita atual pasta."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Visualizar itens como grelha de miniaturas."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Visualizar itens como lista."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Diretorias e Ficheiros:"
@@ -1651,9 +1768,9 @@ msgstr "Limpar Saída"
msgid "Project export failed with error code %d."
msgstr "Exportação do projeto falhou com código de erro %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Erro ao guardar recurso!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1661,6 +1778,16 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Erro ao guardar recurso!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Guardar Recurso Como..."
@@ -1884,6 +2011,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "Guardar alterações a '%s' antes de fechar?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Guardado(s) %s recurso(s) modificado(s)."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "É necessário um Nó Raiz para guardar a cena."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Guardar Cena como..."
@@ -2403,8 +2538,8 @@ msgid "Save & Restart"
msgstr "Guardar & Reiniciar"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "Roda quando a janela do Editor atualiza!"
+msgid "Spins when the editor window redraws."
+msgstr "Roda quando a janela do editor atualiza."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2967,14 +3102,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "'%s' não foi encontrado no Sistema de Ficheiros!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "Visualizar itens como grelha de miniaturas."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "Visualizar itens como lista."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Estado: A importação do Ficheiro falhou. Corrija o Ficheiro e importe "
@@ -3112,10 +3239,6 @@ msgid "Search files"
msgstr "Procurar ficheiros"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instancie a(s) Cena(s) selecionada(s) como filha(s) do Nó selecionado."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3327,17 +3450,18 @@ msgstr "Reimportar"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Guardar cenas, reimportar e reiniciar"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Alterar o driver de vídeo requer reiniciar o editor."
+msgstr "Alterar o tipo de um ficheiro importado requer reiniciar o editor."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"AVISO: Existem Ativos que usam este recurso, podendo não ser carregados "
+"corretamente."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3462,22 +3586,6 @@ msgid "Create Polygon"
msgstr "Criar Polígono"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Editar Polígono"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Inserir Ponto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Editar Polígono (Remover Ponto)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Remover Polígono e Ponto"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3498,6 +3606,22 @@ msgstr ""
msgid "Erase points."
msgstr "Apagar pontos."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Editar Polígono"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Inserir Ponto"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Editar Polígono (Remover Ponto)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Remover Polígono e Ponto"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3515,12 +3639,43 @@ msgstr "Carregar..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "Mover Ponto Nó"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "Mudar Limites do BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "Mudar Legendas do BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr "Este tipo de nó não pode ser usado. Apenas nós raiz são permitidos."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "Adicionar Ponto Nó"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "Adicionar Ponto Animação"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "Remover Ponto de BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "Mover Ponto Nó em BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3563,6 +3718,26 @@ msgid "Triangle already exists"
msgstr "Já existe triângulo"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Adicionar Triângulo"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "Mudar Limites do BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "Mudar Legendas do BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "Remover Ponto do BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Remover Triângulo do BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D não pertence a um nó AnimationTree."
@@ -3571,6 +3746,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Não existem triângulos, nenhuma mistura pode ocorrer."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "Alternar Triângulos Auto"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Criar triângulos ligando pontos."
@@ -3588,6 +3767,10 @@ msgid "Blend:"
msgstr "Mistura:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Mudança de Parâmetro"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Editar filtros"
@@ -3597,12 +3780,48 @@ msgid "Output node can't be added to the blend tree."
msgstr "Saída do nó não pode ser adicionada à árvore de mistura."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Adicionar Nó a BlendTree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "Nó Movido"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
"Incapaz de conectar, porta pode estar em uso ou conexão pode ser inválida."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "Nós Conectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Nós Desconectados"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Definir Animação"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Apagar Nó"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "Alternar Filtro On/Off"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Alterar Filtro"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Reprodutor de animação não definido, sendo incapaz de recolher nome das "
@@ -3623,6 +3842,11 @@ msgstr ""
"de recolher nome das faixas."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Nó Renomeado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Adicionar Nó.."
@@ -3849,6 +4073,19 @@ msgid "Cross-Animation Blend Times"
msgstr "Tempos de Mistura de Animação cruzada"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Mover Nó"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Adicionar Transição"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Adicionar Nó"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Fim"
@@ -3877,6 +4114,18 @@ msgid "No playback resource set at path: %s."
msgstr "Nenhum recurso de playback definido no caminho: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Nó Removido"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Transição Removida"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Definir Nó de Início (Reprodução Automática)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4297,6 +4546,18 @@ msgid "Move CanvasItem"
msgstr "Mover CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Pré-definições para âncoras e margens de um Nó Control."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"As âncoras e margens de filhos de um contentores são sobrescritas pelo seu "
+"pai."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Só âncoras"
@@ -4601,7 +4862,7 @@ msgstr "Definir Manipulador"
#: editor/plugins/cpu_particles_editor_plugin.cpp
msgid "CPUParticles"
-msgstr "CPUPartículas"
+msgstr "CPUParticles"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -4681,6 +4942,10 @@ msgstr "Pressione Shift para editar tangentes individualmente"
msgid "Bake GI Probe"
msgstr "Consolidar Sonda GI"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Gradiente Editado"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Item %d"
@@ -4937,6 +5202,10 @@ msgid "Generating Visibility Rect"
msgstr "A Gerar Visibilidade Rect"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Gerar Visibilidade do Rect"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Só pode definir um Ponto num Material ParticlesMaterial"
@@ -4949,10 +5218,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Sem pixeis com transparência > 128 na imagem..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Gerar Visibilidade do Rect"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Carregar máscara de emissão"
@@ -4963,7 +5228,7 @@ msgstr "Limpar máscara de emissão"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Convert to CPUParticles"
-msgstr "Converter em CPUPartículas"
+msgstr "Converter em CPUParticles"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -5040,13 +5305,13 @@ msgid "Generating AABB"
msgstr "A gerar AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Gerar AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Gerar visibilidade AABB"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Gerar AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Remover Ponto da curva"
@@ -5201,6 +5466,12 @@ msgid "Create UV Map"
msgstr "Criar mapa UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr "Polygon 2D tem vértices internos, não podendo ser editado no viewport."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Criar Polígono & UV"
@@ -5820,6 +6091,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "Este esqueleto não tem ossos, crie alguns nós Bone2D filhos."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Criar Pose de Descanso a partir de Ossos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Definir Pose de Descanso para Ossos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "Esqueleto2D"
@@ -5928,10 +6207,6 @@ msgid "Vertices"
msgstr "Vértices"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Vista de topo."
@@ -5976,8 +6251,8 @@ msgid "Rear"
msgstr "Trás"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr "Alinhar com a vista"
+msgid "Align with View"
+msgstr "Alinhar com a Vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6068,6 +6343,14 @@ msgid "Freelook Speed Modifier"
msgstr "Modificador de velocidade Freelook"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"Nota: O FPS mostrado é a taxa de frames do editor.\n"
+"Não é uma indicação fiável do desempenho do jogo."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Rotação da Vista Bloqueada"
@@ -6076,6 +6359,10 @@ msgid "XForm Dialog"
msgstr "Diálogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Ajustar Nós ao Fundo"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Modo seleção (Q)"
@@ -6291,8 +6578,8 @@ msgid "Post"
msgstr "Pós"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
-msgstr "Bugiganga sem nome"
+msgid "Nameless gizmo"
+msgstr "Bugiganga sem Nome"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite is empty!"
@@ -6355,10 +6642,6 @@ msgid "Add Empty"
msgstr "Adicionar vazio"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Mudar Ciclo da Animação"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Mudar FPS da Animação"
@@ -6367,8 +6650,12 @@ msgid "(empty)"
msgstr "(vazio)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Animações"
+msgid "Animations:"
+msgstr "Animações:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Nova Animação"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6379,8 +6666,8 @@ msgid "Loop"
msgstr "Ciclo"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Frames da Animação"
+msgid "Animation Frames:"
+msgstr "Frames da Animação:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6668,6 +6955,22 @@ msgid "Merge from Scene"
msgstr "Fundir a partir da Cena"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr "Próxima Coordenada"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "Coordenada Anterior"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Copiar bitmask."
@@ -6680,6 +6983,10 @@ msgid "Erase bitmask."
msgstr "Apagar bitmask."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Criar novo retângulo."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Criar um novo polígono."
@@ -6817,6 +7124,14 @@ msgid "Clear Tile Bitmask"
msgstr "Limpar Bitmask de Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr "Fazer Polígono Côncavo"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr "Fazer Polígono Convexo"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "Remover Tile"
@@ -6857,6 +7172,26 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "Definir Nome do Uniform"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "Definir Porta de Entrada por Defeito"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Adicionar Nó ao Visual Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Duplicar Nós"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "Alterado Tipo de Entrada do Visual Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Vértice"
@@ -6872,6 +7207,14 @@ msgstr "Luz"
msgid "VisualShader"
msgstr "VIsualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Editar Propriedade Visual"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Modo do Visual Shader Alterado"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Executável"
@@ -6885,9 +7228,22 @@ msgid "Delete preset '%s'?"
msgstr "Apagar predefinição '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
msgstr ""
-"Modelos de exportação para esta plataforma estão ausentes/corrompidos :"
+"Falhou a exportação do projeto para a plataforma '%s'.\n"
+"O Modelo de exportação está ausente ou é inválido."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"Falhou a exportação do projeto para a plataforma '%s'.\n"
+"Pode ser provocado por um problema na predefinição ou configuração da "
+"exportação."
#: editor/project_export.cpp
msgid "Release"
@@ -6898,6 +7254,15 @@ msgid "Exporting All"
msgstr "A Exportar Tudo"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "O caminho de exportação não existe:"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"Modelos de exportação para esta plataforma estão ausentes/corrompidos :"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Predefinições"
@@ -7134,11 +7499,11 @@ msgstr "Navegar"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Renderizador:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7147,10 +7512,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"Qualidade visual superior\n"
+"Todas as características disponíveis\n"
+"Incompatível com hardware antigo\n"
+"Não recomendado para jogos Web"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7159,10 +7528,16 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Qualidade visual inferior\n"
+"Algumas características indisponíveis\n"
+"Funciona na maioria do hardware\n"
+"Recomendado para jogos Web"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"O Renderizador pode ser alterado mais tarde, mas as cenas poderão ter de ser "
+"ajustadas."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7178,6 +7553,28 @@ msgstr "Está seguro que quer abrir mais do que um Projeto?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"A seguinte configuração do projeto não especifica a versão do Godot em que "
+"foi criada.\n"
+"\n"
+"%s\n"
+"\n"
+"Se continuar com a abertura, será convertida para o formato da versão "
+"atual.\n"
+"Aviso: Não conseguirá mais abrir o projeto em versões anteriores à deste "
+"motor."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7888,7 +8285,7 @@ msgstr "Duplicar Nó(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
-msgstr ""
+msgstr "Impossível mudar nó em cenas herdadas, a ordem dos nós não pode mudar."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -7899,6 +8296,10 @@ msgid "Instantiated scenes can't become root"
msgstr "Cenas instantâneas não se podem tornar root"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Tornar Nó Raiz"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Apagar Nó(s)?"
@@ -7935,6 +8336,10 @@ msgid "Make Local"
msgstr "Tornar Local"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Nova Raiz de Cena"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Criar Nó Raiz:"
@@ -8363,6 +8768,18 @@ msgid "Set From Tree"
msgstr "Definir a partir da árvore"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Apagar Atalho"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Restaurar Atalho"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Alterar Atalho"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Atalhos"
@@ -8569,6 +8986,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Seleção duplicada de GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "Pintura do GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Mapa de grelha"
@@ -8705,10 +9126,6 @@ msgid "Build Project"
msgstr "Construir Projeto"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Avisos"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Ver log"
@@ -8873,10 +9290,6 @@ msgid "Change Expression"
msgstr "Mudar Expressão"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Adicionar Nó"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Remover Nós VisualScript"
@@ -8961,6 +9374,10 @@ msgid "Change Input Value"
msgstr "Mudar valor de entrada"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Redimensionar Comentário"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Impossível copiar o Nó Função."
@@ -9119,16 +9536,15 @@ msgstr "Os segmentos de pacote devem ser de comprimento diferente de zero."
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-"O caractere '%s' não é permitido em nomes de pacotes de aplicativos Android."
+"O caráter '%s' não é permitido em nomes de pacotes de aplicações Android."
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
-msgstr "Um dígito não pode ser o primeiro caractere num segmento de pacote."
+msgstr "Um dígito não pode ser o primeiro caráter num segmento de pacote."
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
-msgstr ""
-"O caractere '%s' não pode ser o primeiro caractere num segmento de pacote."
+msgstr "O caráter '%s' não pode ser o primeiro caráter num segmento de pacote."
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
@@ -9166,18 +9582,18 @@ msgstr "Identificador de segmentos devem ser de comprimento diferente de zero."
#: platform/iphone/export/export.cpp
msgid "The character '%s' is not allowed in Identifier."
-msgstr "O caractere \"%s\" não é permitido no Identificador."
+msgstr "O caráter \"%s\" não é permitido no Identificador."
#: platform/iphone/export/export.cpp
msgid "A digit cannot be the first character in a Identifier segment."
msgstr ""
-"Um dígito não pode ser o primeiro caractere em um segmento de Identificador."
+"Um dígito não pode ser o primeiro caráter num segmento de Identificador."
#: platform/iphone/export/export.cpp
msgid ""
"The character '%s' cannot be the first character in a Identifier segment."
msgstr ""
-"O caractere \"%s\" não pode ser o primeiro caractere num segmento de "
+"O caráter \"%s\" não pode ser o primeiro caráter num segmento de "
"Identificador."
#: platform/iphone/export/export.cpp
@@ -9390,6 +9806,16 @@ msgstr ""
"O Nó ParallaxLayer só funciona quando definido como filho de um Nó "
"ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"Partículas baseadas em GPU não são suportadas pelo driver de vídeo GLES2.\n"
+"Use o Nó CPUParticles2D. Pode usar a opção \"Converter em CPUParticles\" "
+"para este efeito."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9547,6 +9973,12 @@ msgstr ""
"Uma forma tem de ser fornecida para CollisionShape funcionar. Crie um "
"recurso forma!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Nada é visível porque nenhuma Malha foi atribuída."
@@ -9563,6 +9995,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "A desenhar Meshes"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9579,6 +10017,16 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"Partículas baseadas em GPU não são suportadas pelo driver de vídeo GLES2.\n"
+"Use o Nó CPUParticles. Pode usar a opção \"Converter em CPUParticles\" para "
+"este efeito."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Nada é visível porque não foram atribuídas Meshes aos passos de desenho."
@@ -9600,8 +10048,8 @@ msgid ""
"PathFollow ROTATION_ORIENTED requires \"Up Vector\" enabled in its parent "
"Path's Curve resource."
msgstr ""
-"PathFollow ROTATION_ORIENTED requer \"Up Vector\" habilitado em seu recurso "
-"de Curva do caminho pai."
+"PathFollow ROTATION_ORIENTED requer \"Up Vector\" habilitado no recurso de "
+"Curva do Caminho do seu pai."
#: scene/3d/physics_body.cpp
msgid ""
@@ -9619,25 +10067,6 @@ msgstr ""
"Para funcionar, a Propriedade Caminho tem de apontar para um Nó Spatial "
"válido."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment precisa de um recurso Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Apenas um WorldEnvironment é permitido por Cena (ou grupo de cenas "
-"instanciadas)."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Este WorldEnvironment Ä— ignorado. Pode adicionar uma Camera (para cenas 3D) "
-"ou definir o Modo Background deste ambiente como Canvas (para cenas 2D)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Este corpo será ignorado até se definir uma Malha"
@@ -9668,6 +10097,25 @@ msgstr ""
"VehicleWheel fornece um sistema de rodas a um VehicleBody. Use-o como um "
"filho de VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment precisa de um recurso Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Apenas um WorldEnvironment é permitido por Cena (ou grupo de cenas "
+"instanciadas)."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Este WorldEnvironment Ä— ignorado. Pode adicionar uma Camera (para cenas 3D) "
+"ou definir o Modo Background deste ambiente como Canvas (para cenas 2D)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "No nó BlendTree '%s', animação não encontrada: '%s'"
@@ -9711,12 +10159,28 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Este nó foi depreciado. Use AnimationTree em vez disso."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Escolha uma cor do ecrã."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Modo Raw"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Adicionar cor atual como predefinição"
+msgid "Switch between hexadecimal and code values."
+msgstr "Alternar valores entre hexadecimal e código."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Adicionar cor atual como predefinição."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9726,6 +10190,10 @@ msgstr "Alerta!"
msgid "Please Confirm..."
msgstr "Confirme por favor..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "Ir para a pasta acima."
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9810,6 +10278,25 @@ msgstr "Atribuição a uniforme."
msgid "Varyings can only be assigned in vertex function."
msgstr "Variações só podem ser atribuídas na função vértice."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Instancie a(s) Cena(s) selecionada(s) como filha(s) do Nó selecionado."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "Avisos:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Tamanho do tipo de letra:"
+
+#~ msgid "Line:"
+#~ msgstr "Linha:"
+
+#~ msgid "Col:"
+#~ msgstr "Coluna:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "OrientedPathFollow apenas funciona quando definido como filho de um Nó "
@@ -9965,9 +10452,6 @@ msgstr "Variações só podem ser atribuídas na função vértice."
#~ msgid "Convert To Lowercase"
#~ msgstr "Converter em minúsculas"
-#~ msgid "Snap To Floor"
-#~ msgstr "Ajustar ao Fundo"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Rodar 0 graus"
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 88e95546a6..c9a2f59192 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -87,6 +87,16 @@ msgstr "Duplicați Cheile Selectate"
msgid "Delete Selected Key(s)"
msgstr "Ştergeți Cheile Selectate"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Adaugă punct"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Deplasare punct"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Clonare Chei"
@@ -116,6 +126,16 @@ msgid "Anim Change Call"
msgstr "Anim Schimbare apelare"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Schimbă Numele Animației:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -171,6 +191,11 @@ msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Track Path"
+msgstr "Schimbați Valoarea Array-ului"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
msgstr "Comutează modul fără distrageri."
@@ -198,6 +223,11 @@ msgid "Time (s): "
msgstr "Timp X-Decolorare (s):"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "Activare mod Doppler"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Continuu"
@@ -251,6 +281,21 @@ msgid "Delete Key(s)"
msgstr "Anim Ștergeți Cheile"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Schimbă Numele Animației:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Nod de Animație"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Schimbați Bucla Anim"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Elimină Pista Anim"
@@ -292,6 +337,16 @@ msgid "Anim Insert Key"
msgstr "Anim Inserați Cheie"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Schimbă Numele Animației:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Rearanjați Autoload-urile"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -316,6 +371,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Anim Adăugați Pistă"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -324,10 +384,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Transformare hartă UV"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Anim Adăugați Pistă"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim Inserați Pistă și Cheie"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -341,6 +416,11 @@ msgid "Clipboard is empty"
msgstr "Clip-board de resurse gol !"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Lipiţi Parametrii"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Scalați Cheile"
@@ -387,11 +467,6 @@ msgid "Copy Tracks"
msgstr "Copie Parametrii"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Lipiţi Parametrii"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Scalați Selecția"
@@ -494,6 +569,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Anim Adăugați Pistă"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Redimensionați Array-ul"
@@ -558,22 +646,13 @@ msgstr "Zoom-ați Afară"
msgid "Reset Zoom"
msgstr "Resetați Zoom-area"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Dimensiunea Conturului:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Linie:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Col:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -883,8 +962,8 @@ msgstr "Ştergeți fişierele selectate?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Ștergeți"
@@ -1141,8 +1220,9 @@ msgid "Add Bus"
msgstr "Adaugați Pistă Audio"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Creaţi o Schemă nouă de Pistă Audio."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Salvați Schema Pistei Audio Ca..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1170,6 +1250,10 @@ msgstr "Încărcați Implicit"
msgid "Load the default Bus Layout."
msgstr "Încarcă Schema de Pistă Audio implicită."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Creaţi o Schemă nouă de Pistă Audio."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nume nevalid."
@@ -1318,6 +1402,26 @@ msgstr ""
msgid "Packing"
msgstr "Ambalare"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1367,7 +1471,7 @@ msgstr "Arătați în Administratorul de Fișiere"
msgid "New Folder..."
msgstr "Director Nou..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Reîmprospătați"
@@ -1442,10 +1546,35 @@ msgstr "Deplasați Favorit Sus"
msgid "Move Favorite Down"
msgstr "Deplasați Favorit Jos"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Fila anterioară"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Creați Director"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Accesați Directorul Părinte"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Directorul nu a putut fi creat."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Vizualizează articolele ca și o grilă de miniaturi"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Vizualizează articolele ca și o listă"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Directoare și Fişiere:"
@@ -1687,9 +1816,9 @@ msgstr "Curăță Afișarea"
msgid "Project export failed with error code %d."
msgstr "Exportul de proiect nu a reuÅŸit cu un cod de eroare %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Eroare la salvarea resursei!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1697,6 +1826,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Eroare la salvarea resursei!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Salvați Resursa Ca..."
@@ -1914,6 +2053,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Salvează schimbările la ’%s’ înainte de ieșire?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Încărcarea resursei a eșuat."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Salvează scena ca..."
@@ -2446,7 +2594,8 @@ msgid "Save & Restart"
msgstr "Salvează și Restartează"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Se rotește când ferestra editorului se recolorează!"
#: editor/editor_node.cpp
@@ -3014,16 +3163,6 @@ msgstr ""
"fișiere!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Vizualizează articolele ca și o grilă de miniaturi"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Vizualizează articolele ca și o listă"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Stare: Importarea fișierului eșuată. Te rog repară fișierul și reimportă "
@@ -3169,10 +3308,6 @@ msgid "Search files"
msgstr "Căutare Clase"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instanțiază scena(ele) selectată ca un copil al nodului selectat."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3542,25 +3677,6 @@ msgid "Create Polygon"
msgstr "Crează Poligon"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Editează Poligon"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Inserează Punct"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Editează Poligon (Elimină Punct)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Elimină Poligon Și Punct"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3585,6 +3701,25 @@ msgstr ""
msgid "Erase points."
msgstr "RMB: Șterge Punctul."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Editează Poligon"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Inserează Punct"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Editează Poligon (Elimină Punct)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Elimină Poligon Și Punct"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3603,12 +3738,49 @@ msgstr "Încărcați"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Deplasare punct"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Schimbă Timpul Amestecului"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Schimbă Timpul Amestecului"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Adaugă punct"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Adaugă Animația"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Ștergere punct cale"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3651,6 +3823,30 @@ msgid "Triangle already exists"
msgstr "EROARE: Numele animației există deja!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Anim Adăugați Pistă"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Schimbă Timpul Amestecului"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Schimbă Timpul Amestecului"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Ștergere punct cale"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3659,6 +3855,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Comutați Globale AutoLoad"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3676,6 +3877,11 @@ msgid "Blend:"
msgstr "Amestec:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Modificări ale Actualizării"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Editează Filtrele"
@@ -3685,11 +3891,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Mod Mutare"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Conectat"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Deconectat"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animație"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Creează Nod"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Comutează modul fără distrageri."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Schimbați Lung Anim"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3705,6 +3954,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Nume Nod:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3939,6 +4194,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Timpi de Amestecare Cross-Animație"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Mod Mutare"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Tranziție"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3968,6 +4238,20 @@ msgid "No playback resource set at path: %s."
msgstr "Nu în calea de resurse."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Ștergeți"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Nod Tranziție"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4401,6 +4685,16 @@ msgid "Move CanvasItem"
msgstr "Editează ObiectulPânză"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Doar ancore"
@@ -4794,6 +5088,10 @@ msgstr "Ține apăsat Shift pentru a edita individual tangentele"
msgid "Bake GI Probe"
msgstr "Procesează Sonda GI"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Obiect %d"
@@ -5051,6 +5349,10 @@ msgid "Generating Visibility Rect"
msgstr "Generare Dreptunghi de Vizibilitate"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Generare Dreptunghi de Vizibilitate"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"Definirea unui punct este posibilă doar într-un material de proces "
@@ -5065,10 +5367,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Nici un pixel cu transparența > 128 în imagine..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Generare Dreptunghi de Vizibilitate"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Încărcare Mască de Emisie"
@@ -5156,13 +5454,13 @@ msgid "Generating AABB"
msgstr "Generare AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Generare AABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Generare Vizibilitate AABB"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Generare AABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Ștergere Punt din Curbă"
@@ -5319,6 +5617,12 @@ msgid "Create UV Map"
msgstr "Creare hartă UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Crează Poligon"
@@ -5975,6 +6279,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Creează Puncte de Emisie Din Mesh"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Singleton (Unicat)"
@@ -6086,10 +6399,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6134,7 +6443,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6228,6 +6537,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Curăță Rotația Cursorului"
@@ -6237,6 +6552,11 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Snap pe grilă"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6449,7 +6769,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6517,10 +6837,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6529,8 +6845,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Animație"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animație"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6541,8 +6863,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Nume Animație:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6839,6 +7162,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Fila anterioară"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6854,6 +7194,11 @@ msgstr "RMB: Șterge Punctul."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Creați %s Nou"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Creează un nou poligon de la zero."
@@ -6987,6 +7332,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Deplasare poligon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Deplasare poligon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Elimină Șablon"
@@ -7035,6 +7390,28 @@ msgid "TileSet"
msgstr "Set_de_Plăci..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Setează ca Implicit pentru '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Anim Clonare Chei"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7050,6 +7427,15 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Editează Filtrele"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -7063,7 +7449,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7076,6 +7471,14 @@ msgid "Exporting All"
msgstr "Exportare"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7355,6 +7758,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8063,6 +8479,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Salvează Scena"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8099,6 +8520,11 @@ msgstr "Creează Oase"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Salvează Scena"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Creează Nod"
@@ -8522,6 +8948,20 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Facilitare din"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Modifică Ancorele"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8730,6 +9170,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8867,10 +9311,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "Vizualizează fișiere log"
@@ -9029,10 +9469,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9115,6 +9551,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Editează ObiectulPânză"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9506,6 +9947,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9635,6 +10083,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9649,6 +10103,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9661,6 +10121,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9691,21 +10158,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9729,6 +10181,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9775,11 +10242,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9790,6 +10273,11 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Accesați Directorul Părinte"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9863,6 +10351,19 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Instanțiază scena(ele) selectată ca un copil al nodului selectat."
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Dimensiunea Conturului:"
+
+#~ msgid "Line:"
+#~ msgstr "Linie:"
+
+#~ msgid "Col:"
+#~ msgstr "Col:"
+
#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "AutoLoad '%s' există deja!"
@@ -9968,10 +10469,6 @@ msgstr ""
#~ msgid "Search in files"
#~ msgstr "Căutare Clase"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Snap pe grilă"
-
#~ msgid "Bake!"
#~ msgstr "Coacere!"
@@ -10026,12 +10523,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "Afară-Înăuntru"
-#~ msgid "Change Anim Len"
-#~ msgstr "Schimbați Lung Anim"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "Schimbați Bucla Anim"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "Anim Creați Cheie Valoare Typed"
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 901e7858ce..701938c785 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -33,12 +33,16 @@
# ÐÑлан Снупов <aslan170505@gmail.com>, 2018.
# Alexandr Eremeev <ae125529@gmail.com>, 2019.
# Ruaguzov Michael <miha890r@gmail.com>, 2019.
+# Alexander Danilov <modos189@protonmail.com>, 2019.
+# Sergey Nakhov <true.stalin.exe@gmail.com>, 2019.
+# Bumerang <it.bumerang@gmail.com>, 2019.
+# Viorel <vrila.noroc@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
-"Last-Translator: Ruaguzov Michael <miha890r@gmail.com>\n"
+"PO-Revision-Date: 2019-02-23 17:17+0000\n"
+"Last-Translator: Viorel <vrila.noroc@gmail.com>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -58,7 +62,7 @@ msgstr "Ðеверный тип аргумента Ð´Ð»Ñ convert(), иÑполÑ
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "Ðе хватает байтов Ð´Ð»Ñ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ð°Ð¹Ñ‚Ð¾Ð², или неверный формат."
+msgstr "ÐедоÑтаточно байтов Ð´Ð»Ñ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ð°Ð¹Ñ‚Ð¾Ð² или неверный формат."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
@@ -114,6 +118,16 @@ msgstr "Дублировать выделенные ключ(и)"
msgid "Delete Selected Key(s)"
msgstr "Удалить выделенные ключ(и)"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Добавить точку"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Передвинуть Точку"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Дублировать ключи"
@@ -143,6 +157,16 @@ msgid "Anim Change Call"
msgstr "Изменить вызов анимации"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Изменить цикличноÑть анимации"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Изменить цикличноÑть анимации"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Трек Параметра"
@@ -192,6 +216,11 @@ msgid "Anim Clips:"
msgstr "Дорожки Ðнимации:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Изменить значение маÑÑива"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Переключить Ñтот трек вкл/выкл."
@@ -217,6 +246,11 @@ msgid "Time (s): "
msgstr "Ð’Ñ€ÐµÐ¼Ñ (Ñек.): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "ДоплеровÑкий режим"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "ÐепрерывнаÑ"
@@ -267,6 +301,21 @@ msgid "Delete Key(s)"
msgstr "Удалить ключ(ключи)"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Изменить Ð¸Ð¼Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¸:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Режим Перехода"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Изменить цикличноÑть анимации"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Удалить дорожку"
@@ -308,6 +357,16 @@ msgid "Anim Insert Key"
msgstr "Ð’Ñтавить ключ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Изменить FPS анимации"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "ПереÑтановка автозагрузок"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Трек транÑформации применÑетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ к оÑнованным на Spatial узлам."
@@ -336,6 +395,11 @@ msgid "Not possible to add a new track without a root"
msgstr "ÐÐµÐ»ÑŒÐ·Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ новый трек без корневого узла"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Добавить новый Трек"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "Путь трека некорректен, потому Ð½ÐµÐ»ÑŒÐ·Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ ключ."
@@ -344,10 +408,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Трек не имеет тип Spatial, Ð½ÐµÐ»ÑŒÐ·Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ ключ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Трек 3D ПреобразованиÑ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Добавить новый Трек"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "Путь трека некорректен, потому Ð½ÐµÐ»ÑŒÐ·Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ ключ метода."
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Трек Вызова Метода"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "В объекте нет такого метода: "
@@ -360,6 +439,10 @@ msgid "Clipboard is empty"
msgstr "Буфер обмена пуÑÑ‚"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Ð’Ñтавить Треки"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "МаÑштабировать ключи"
@@ -404,10 +487,6 @@ msgid "Copy Tracks"
msgstr "Копировать Треки"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Ð’Ñтавить Треки"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "МаÑштабировать выбранное"
@@ -507,6 +586,19 @@ msgstr "Выбрать треки Ð´Ð»Ñ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ:"
msgid "Copy"
msgstr "Копировать"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Ðудио Дорожки:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Изменить размер МаÑÑива"
@@ -571,21 +663,14 @@ msgstr "Отдалить"
msgid "Reset Zoom"
msgstr "СброÑить приближение"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "ПредупреждениÑ:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Размер шрифта:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Строка:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "ПредупреждениÑ"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Стлб:"
+#, fuzzy
+msgid "Line and column numbers."
+msgstr "Ðомер линии и Ñтолбца"
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -886,8 +971,8 @@ msgstr "Удалить выбранные файлы?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Удалить"
@@ -1143,8 +1228,9 @@ msgid "Add Bus"
msgstr "Добавить"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Создать новую раÑкладку шины."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Сохранить раÑкладку звуковой шины как..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1172,6 +1258,10 @@ msgstr "Загрузить по умолчанию"
msgid "Load the default Bus Layout."
msgstr "Загрузить раÑкладку шины по умолчанию."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Создать новую раÑкладку шины."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "ÐедопуÑтимое имÑ."
@@ -1321,6 +1411,26 @@ msgstr "Шаблоны ÑкÑпорта не найдены по ожидаемÐ
msgid "Packing"
msgstr "Упаковывание"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1367,7 +1477,7 @@ msgstr "ПроÑмотреть в проводнике"
msgid "New Folder..."
msgstr "ÐÐ¾Ð²Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Обновить"
@@ -1442,10 +1552,33 @@ msgstr "ПеремеÑтить избранное вверх"
msgid "Move Favorite Down"
msgstr "ПеремеÑтить избранное вниз"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Предыдущий Ñтаж"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Следующий Ñтаж"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Перейти к родительÑкой папке"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Ðевозможно Ñоздать папку."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "ПроÑмотр Ñлементов в виде миниатюр."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "ПроÑмотр Ñлементов в виде ÑпиÑка."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Каталоги и файлы:"
@@ -1668,9 +1801,10 @@ msgstr "ОчиÑтить вывод"
msgid "Project export failed with error code %d."
msgstr "ЭкÑпорт проекта не удалÑÑ, код %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Ошибка при Ñохранении реÑурÑа!"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Imported resources can't be saved."
+msgstr "Импортированные реÑурÑÑ‹"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1678,6 +1812,16 @@ msgid "OK"
msgstr "Ок"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Ошибка при Ñохранении реÑурÑа!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Сохранить реÑÑƒÑ€Ñ ÐºÐ°Ðº..."
@@ -1898,6 +2042,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "Сохранить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² «%s» перед закрытием?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Ðе удалоÑÑŒ загрузить реÑурÑ."
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "Только один файл необходим Ð´Ð»Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¾Ð¹ текÑтуры."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Сохранить Ñцену как..."
@@ -2419,7 +2573,8 @@ msgid "Save & Restart"
msgstr "Сохранить и перезапуÑтить"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "ВращаетÑÑ, когда окно редактора перериÑовываетÑÑ!"
#: editor/editor_node.cpp
@@ -2984,14 +3139,6 @@ msgstr ""
"Ðе удаетÑÑ Ð¿ÐµÑ€ÐµÐ¹Ñ‚Ð¸ к '%s', так как он не был найден в файловой ÑиÑтеме!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "ПроÑмотр Ñлементов в виде миниатюр."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "ПроÑмотр Ñлементов в виде ÑпиÑка."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"СтатуÑ: Импорт файла не удалÑÑ. ПожалуйÑта, иÑправьте файл и "
@@ -3129,10 +3276,6 @@ msgid "Search files"
msgstr "ПоиÑк файлов"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Добавить выбранную Ñцену(Ñ‹), в качеÑтве потомка выбранного узла."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3347,14 +3490,15 @@ msgid "Save scenes, re-import and restart"
msgstr ""
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Ð”Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð²Ð¸Ð´ÐµÐ¾Ð´Ñ€Ð°Ð¹Ð²ÐµÑ€Ð° необходим перезапуÑк редактора."
+msgstr "Изменение типа импортированного файла потребует перезапуÑк редактора."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"Предупреждение: ÑущеÑтвуют объекты, которые иÑпользуют Ñтот реÑурÑ, они "
+"могут переÑтать загружатьÑÑ Ð´Ð¾Ð»Ð¶Ð½Ñ‹Ð¼ образом."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3479,22 +3623,6 @@ msgid "Create Polygon"
msgstr "Создать Полигон"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Редактировать полигон"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Ð’Ñтавить точку"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Редактировать Полигон (удалить точку)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Удалить Полигон и Точку"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3515,6 +3643,22 @@ msgstr ""
msgid "Erase points."
msgstr "Удалить точки."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Редактировать полигон"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Ð’Ñтавить точку"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Редактировать Полигон (удалить точку)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Удалить Полигон и Точку"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3532,6 +3676,22 @@ msgstr "Загрузка..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Передвинуть Точку"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Изменить Ð²Ñ€ÐµÐ¼Ñ \"ÑмешиваниÑ\""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Изменить Ð²Ñ€ÐµÐ¼Ñ \"ÑмешиваниÑ\""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3539,6 +3699,27 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Добавить узел"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Добавить анимацию"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Удалить точку пути"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3581,6 +3762,31 @@ msgid "Triangle already exists"
msgstr "Треугольник уже ÑущеÑтвует"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Добавить переменную"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Изменить Ð²Ñ€ÐµÐ¼Ñ \"ÑмешиваниÑ\""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Изменить Ð²Ñ€ÐµÐ¼Ñ \"ÑмешиваниÑ\""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Удалить точку пути"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Удалить переменную"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D не принадлежит Узлу AnimationTree."
@@ -3589,6 +3795,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Ðевозможно Ñмешивать, поÑкольку отÑутÑтвуют треугольники."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Переключить автозагрузку глобальных Ñкриптов"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Создать треугольник Ñоединением точек."
@@ -3606,6 +3817,11 @@ msgid "Blend:"
msgstr "Смешивание:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¼Ð°Ñ‚ÐµÑ€Ð¸Ð°Ð»Ð°"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Редактировать фильтры"
@@ -3615,12 +3831,56 @@ msgid "Output node can't be added to the blend tree."
msgstr "Узел вывода не может быть добавлен в дерево ÑмешиваниÑ."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Добавить узел(узлы) из дерева"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Режим перемещениÑ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
"Ðевозможно подключитьÑÑ, возможно порт уже иÑпользуетÑÑ Ð¸Ð»Ð¸ недейÑтвительный."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Подключен"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Отключен"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "ÐнимациÑ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Удалить узел(узлы)"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Переключить Ñтот трек вкл/выкл."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Изменен фильтр Ñзыков"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr "ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð¸Ð³Ñ€Ð¾ÐºÐ° не задана, Ð½ÐµÐ»ÑŒÐ·Ñ Ð½Ð°Ð¹Ñ‚Ð¸ отÑлеживаемые имена."
@@ -3638,6 +3898,12 @@ msgstr ""
"удаетÑÑ Ð¿Ð¾Ð»ÑƒÑ‡Ð¸Ñ‚ÑŒ отÑлеживаемые имена."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Ð˜Ð¼Ñ ÑƒÐ·Ð»Ð°"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Добавить узел..."
@@ -3866,6 +4132,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Межанимационный инÑтрумент ÑмешиваниÑ"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Режим перемещениÑ"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Добавить перевод"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Добавить узел"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Конец"
@@ -3894,6 +4175,20 @@ msgid "No playback resource set at path: %s."
msgstr "Ð’ пути нет реÑурÑов воÑпроизведениÑ: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Удалено:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Transition узел"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4316,6 +4611,19 @@ msgid "Move CanvasItem"
msgstr "ПеремеÑтить CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Внимание: Положение и размер детей контейнера определÑетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ их "
+"родителÑми."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Только ÑкорÑ"
@@ -4701,6 +5009,10 @@ msgstr "Удерживайте Shift, чтобы изменить каÑател
msgid "Bake GI Probe"
msgstr "Запечь GI пробу"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Элемент %d"
@@ -4957,6 +5269,10 @@ msgid "Generating Visibility Rect"
msgstr "Создать облаÑть видимоÑти"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Создать облаÑть видимоÑти"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Возможно уÑтановить точку только в ParticlesMaterial материал"
@@ -4969,10 +5285,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Ðикаких пикÑелей Ñ Ð¿Ñ€Ð¾Ð·Ñ€Ð°Ñ‡Ð½Ð¾Ñтью > 128 в изображении..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Создать облаÑть видимоÑти"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "МаÑка выброÑа загружена"
@@ -5060,11 +5372,11 @@ msgid "Generating AABB"
msgstr "Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr "Генерировать AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr "Генерировать AABB"
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5221,6 +5533,12 @@ msgid "Create UV Map"
msgstr "Создать UV карту"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Создать Полигон и UV"
@@ -5839,6 +6157,16 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "У Ñтого Ñкелета нет коÑтей, Ñоздайте дочерние Bone2D узлы."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Сделать позу Ð¿Ð¾ÐºÐ¾Ñ (из коÑтей)"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Set Rest Pose to Bones"
+msgstr "Сделать позу Ð¿Ð¾ÐºÐ¾Ñ (из коÑтей)"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "2D Ñкелет"
@@ -5947,10 +6275,6 @@ msgid "Vertices"
msgstr "Вершины"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Вид Ñверху."
@@ -5995,7 +6319,8 @@ msgid "Rear"
msgstr "Зад"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "СовмеÑтить Ñ Ð²Ð¸Ð´Ð¾Ð¼"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6087,6 +6412,12 @@ msgid "Freelook Speed Modifier"
msgstr "Обзор модификатор ÑкороÑти"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "Блокировать вращение камеры"
@@ -6095,6 +6426,11 @@ msgid "XForm Dialog"
msgstr "XForm диалоговое окно"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "ПривÑзать к полу"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Режим Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ (Q)"
@@ -6311,7 +6647,7 @@ msgstr "ПоÑле"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr "БезымÑнный штуковина"
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6376,10 +6712,6 @@ msgid "Add Empty"
msgstr "Добавить пуÑтоту"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Изменить цикличноÑть анимации"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Изменить FPS анимации"
@@ -6388,10 +6720,16 @@ msgid "(empty)"
msgstr "(пуÑто)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Ðнимации"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "ÐнимациÑ"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "СкороÑть (FPS):"
@@ -6400,7 +6738,8 @@ msgid "Loop"
msgstr "Зациклить"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Кадры анимации"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6689,6 +7028,24 @@ msgid "Merge from Scene"
msgstr "СлиÑние из Ñцены"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Следующий Ñтаж"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Предыдущий Ñтаж"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Копировать битовую маÑку."
@@ -6701,6 +7058,11 @@ msgid "Erase bitmask."
msgstr "Стереть битовую маÑку."
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Создать новый узел."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Создать новый полигон."
@@ -6838,6 +7200,16 @@ msgid "Clear Tile Bitmask"
msgstr "ОчиÑтить Битовую МаÑку Плитки"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Передвинуть полигон"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Передвинуть полигон"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "Удалить тайл"
@@ -6878,6 +7250,29 @@ msgid "TileSet"
msgstr "TileSet"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "УÑтановить по умолчанию Ð´Ð»Ñ '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "VisualShader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Дублировать узел(узлы)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Вершины"
@@ -6893,6 +7288,16 @@ msgstr "Свет"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Редактировать приоритет тайла"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÑˆÐµÐ¹Ð´ÐµÑ€Ð¾Ð²"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Ðктивный"
@@ -6906,8 +7311,17 @@ msgid "Delete preset '%s'?"
msgstr "Удалить '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют/повреждены:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
msgid "Release"
@@ -6918,6 +7332,15 @@ msgid "Exporting All"
msgstr "ЭкÑпорт вÑех"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "Путь не ÑущеÑтвует."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют/повреждены:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "ПредуÑтановки"
@@ -7157,7 +7580,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7196,6 +7619,27 @@ msgid "Are you sure to open more than one project?"
msgstr "Вы уверены, что хотите открыть более одного проекта?"
#: editor/project_manager.cpp
+#, fuzzy
+msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"Файл наÑтроек проекта был Ñгенерирован Ñтарой верÑией движка и должен быть "
+"преобразован Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ¹ верÑии:\n"
+"\n"
+"%s\n"
+"\n"
+"Вы хотите преобразовать его?\n"
+"Внимание: Ð’Ñ‹ больше не Ñможете открыть проект предыдущими верÑиÑми движка."
+
+#: editor/project_manager.cpp
msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
@@ -7922,6 +8366,11 @@ msgid "Instantiated scenes can't become root"
msgstr "Мгновенные Ñцены не могут быть корневыми"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Создать корневой узел Ñцены"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Удалить узел(узлы)?"
@@ -7958,6 +8407,11 @@ msgid "Make Local"
msgstr "Сделать локальным"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "New Scene Root"
+msgstr "Создать корневой узел Ñцены"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Создать корневой узел:"
@@ -8389,6 +8843,21 @@ msgid "Set From Tree"
msgstr "УÑтановить из дерева"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Переход ИЗ"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "ГорÑчие клавиши"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Изменить привÑзку"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "ГорÑчие клавиши"
@@ -8594,6 +9063,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Дублировать выделенную Ñетку"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "РиÑование Ñетки"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Ð¡ÐµÑ‚Ð¾Ñ‡Ð½Ð°Ñ ÐºÐ°Ñ€Ñ‚Ð°"
@@ -8730,10 +9203,6 @@ msgid "Build Project"
msgstr "Собрать проект"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "ПредупреждениÑ"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "ПроÑмотр журнала"
@@ -8898,10 +9367,6 @@ msgid "Change Expression"
msgstr "Изменить выражение"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Добавить узел"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Удалить узлы VisualScript"
@@ -8986,6 +9451,11 @@ msgid "Change Input Value"
msgstr "Изменить входное значение"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Изменить размер CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Ðе удаётÑÑ Ñкопировать узел функцию."
@@ -9405,6 +9875,13 @@ msgstr ""
"Узел ParallaxLayer работает только при уÑтановке его в качеÑтве дочернего "
"узла ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9566,6 +10043,12 @@ msgstr ""
"Shape должен быть предуÑмотрен Ð´Ð»Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¹ CollisionShape. ПожалуйÑта, "
"Ñоздайте shape-реÑÑƒÑ€Ñ Ð´Ð»Ñ Ñтого!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Ðичто не видно, потому что не назначена Ñетка."
@@ -9582,6 +10065,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "ПоÑтроение полиÑетки"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9597,6 +10086,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr "Ðичего не видно, потому что полиÑетки не были назначены на отриÑовку."
@@ -9634,25 +10130,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "СвойÑтво Path должно указывать на дейÑтвительный Spatial узел."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment необходим Environment реÑурÑ."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Только один WorldEnvironment допуÑкаетÑÑ Ð½Ð° Ñцену или ÑовокупноÑть "
-"приведённых Ñцен."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Этот WorldEnvironment игнорируетÑÑ. Либо добавьте Camera (Ð´Ð»Ñ 3D-Ñцен), либо "
-"уÑтановите в Environment реÑурÑе Background режим в Canvas (Ð´Ð»Ñ 2D Ñцен)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Это тело будет игнорироватьÑÑ, пока вы не уÑтановите Ñетку"
@@ -9684,6 +10161,25 @@ msgstr ""
"VehicleWheel Ñлужит колеÑом Ð´Ð»Ñ VehicleBody. ПожалуйÑта, иÑпользуйте его как "
"ребенка VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment необходим Environment реÑурÑ."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Только один WorldEnvironment допуÑкаетÑÑ Ð½Ð° Ñцену или ÑовокупноÑть "
+"приведённых Ñцен."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Этот WorldEnvironment игнорируетÑÑ. Либо добавьте Camera (Ð´Ð»Ñ 3D-Ñцен), либо "
+"уÑтановите в Environment реÑурÑе Background режим в Canvas (Ð´Ð»Ñ 2D Ñцен)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "Ðа узле BlendTree '%s' Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð½Ðµ найдена: '%s'"
@@ -9725,13 +10221,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Этот узел был удален. ВмеÑто Ñтого иÑпользуйте AnimationTree."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "RAW режим"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Добавить текущий цвет как преÑет"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Внимание!"
@@ -9740,6 +10253,11 @@ msgstr "Внимание!"
msgid "Please Confirm..."
msgstr "Подтверждение..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Перейти к родительÑкой папке"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9829,6 +10347,24 @@ msgstr "Ðазначить форму"
msgid "Varyings can only be assigned in vertex function."
msgstr "Переменные могут быть назначены только в функции вершин."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Добавить выбранную Ñцену(Ñ‹), в качеÑтве потомка выбранного узла."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#~ msgid "Warnings:"
+#~ msgstr "ПредупреждениÑ:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Размер шрифта:"
+
+#~ msgid "Line:"
+#~ msgstr "Строка:"
+
+#~ msgid "Col:"
+#~ msgstr "Стлб:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "OrientedPathFollow работает только еÑли она дочь узла Path."
@@ -9988,9 +10524,6 @@ msgstr "Переменные могут быть назначены только
#~ msgid "Convert To Lowercase"
#~ msgstr "Конвертировать в нижний региÑтр"
-#~ msgid "Snap To Floor"
-#~ msgstr "ПривÑзать к полу"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Поворот на 0 градуÑов"
@@ -10523,9 +11056,6 @@ msgstr "Переменные могут быть назначены только
#~ msgid "Added:"
#~ msgstr "Добавлено:"
-#~ msgid "Removed:"
-#~ msgstr "Удалено:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Ðевозможно Ñохранить текÑтуру атлаÑа:"
@@ -10794,9 +11324,6 @@ msgstr "Переменные могут быть назначены только
#~ msgid "Error importing:"
#~ msgstr "Ошибка импортированиÑ:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Только один файл необходим Ð´Ð»Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¾Ð¹ текÑтуры."
-
#~ msgid "Max Texture Size:"
#~ msgstr "МакÑимальный размер текÑтуры:"
@@ -11026,9 +11553,6 @@ msgstr "Переменные могут быть назначены только
#~ msgid "Edit Groups"
#~ msgstr "Редактировать группы"
-#~ msgid "GridMap Paint"
-#~ msgstr "РиÑование Ñетки"
-
#~ msgid "Tiles"
#~ msgstr "Тайлы"
@@ -11368,9 +11892,6 @@ msgstr "Переменные могут быть назначены только
#~ msgid "Cannot go into subdir:"
#~ msgstr "Ðевозможно перейти в подпапку:"
-#~ msgid "Imported Resources"
-#~ msgstr "Импортированные реÑурÑÑ‹"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "Ð’Ñтавить ключи (Ins)"
diff --git a/editor/translations/si.po b/editor/translations/si.po
index 286cddb867..f5590dda40 100644
--- a/editor/translations/si.po
+++ b/editor/translations/si.po
@@ -82,6 +82,14 @@ msgstr "à¶­à·à¶»à·à¶œà¶­à·Š යතුරු à¶´à·’à¶§à¶´à¶­à·Š කරන්න
msgid "Delete Selected Key(s)"
msgstr "à¶­à·à¶»à·à¶œà¶­à·Š යතුරු මක෠දමන්න"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim යතුරු පිටපත් කරන්න"
@@ -111,6 +119,16 @@ msgid "Anim Change Call"
msgstr "Anim à¶šà·à¶¯à·€à·“ම් වෙනස් කරන්න"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "ලක්ෂණය ලුහුබදින්න"
@@ -160,6 +178,10 @@ msgid "Anim Clips:"
msgstr "Anim පසුරු:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "ලුහුබදින්න෠සක්â€à¶»à·’ය/à¶…à¶šà·Šâ€à¶»à·’ය."
@@ -184,6 +206,10 @@ msgid "Time (s): "
msgstr "à¶šà·à¶½à¶º (à¶­à¶­à·Š): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "අඛණ්ඩව"
@@ -234,6 +260,20 @@ msgid "Delete Key(s)"
msgstr "යතුරු මක෠දමන්න"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Anim ලුහුබදින්න෠ඉවත් කරන්න"
@@ -275,6 +315,15 @@ msgid "Anim Insert Key"
msgstr "Anim යතුරක් ඇතුලත් කරන්න"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Spatial à¶´à·à¶¯à¶š පුරුක් සදහ෠පමණක් රූපà·à¶±à·Šà¶­à¶» ලුහුබදින්නන් à¶‘à¶šà·Š à¶šà·… à·„à·à¶š."
@@ -303,6 +352,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "ලුහුබදින්නෙක් එක් කරන්න"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -311,10 +365,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3D රූපà·à¶±à·Šà¶­à¶»à¶«à¶º ලුහුබදින්න"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "ලුහුබදින්නෙක් එක් කරන්න"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "ඇමතීම් à¶šà·Šâ€à¶»à¶¸à¶º ලුහුබදින්න"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -327,6 +396,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -369,10 +442,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -472,6 +541,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "à·à·Šâ€à¶»à·€à·Šâ€à¶º පසුරු:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -536,20 +618,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -843,8 +917,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1096,7 +1170,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1125,6 +1199,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1268,6 +1346,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1313,7 +1411,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1388,10 +1486,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1607,8 +1725,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1617,6 +1735,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1808,6 +1936,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2295,7 +2431,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2843,14 +2979,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2986,10 +3114,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3333,37 +3457,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3383,12 +3507,44 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3428,6 +3584,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "ලුහුබදින්නෙක් එක් කරන්න"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3436,6 +3613,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3453,6 +3634,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3462,11 +3647,50 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "යතුරු මක෠දමන්න"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "ලුහුබදින්න෠සක්â€à¶»à·’ය/à¶…à¶šà·Šâ€à¶»à·’ය."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3482,6 +3706,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3707,6 +3936,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Anim සංක්රමණය වෙනස් කරන්න"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3735,6 +3978,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4146,6 +4401,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4523,6 +4788,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4779,19 +5048,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4882,11 +5151,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5041,6 +5310,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5655,6 +5930,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5763,10 +6046,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5811,7 +6090,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5903,6 +6182,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5911,6 +6196,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6123,7 +6412,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6187,10 +6476,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6199,8 +6484,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "à·à·Šâ€à¶»à·’à¶­:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6211,7 +6502,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6501,6 +6792,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6513,6 +6820,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6637,6 +6948,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6677,6 +6996,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "යතුරු පිටපත් කරන්න"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6692,6 +7032,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6705,7 +7053,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6717,6 +7074,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6990,6 +7355,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7680,6 +8058,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7714,6 +8096,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8126,6 +8512,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8330,6 +8728,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8466,10 +8868,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8628,10 +9026,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8712,6 +9106,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9095,6 +9493,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9224,6 +9629,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9238,6 +9649,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9250,6 +9667,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9280,21 +9704,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9318,6 +9727,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9359,11 +9783,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9374,6 +9814,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index 3ba9f42b94..304755970c 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -4,12 +4,14 @@
# This file is distributed under the same license as the Godot source code.
# J08nY <johnenter@gmail.com>, 2016.
# MineGame 159 <minegame459@gmail.com>, 2018.
+# Zuzana Palenikova <sousana.is@gmail.com>, 2019.
+# MineGame159 <petulko08@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:42+0100\n"
-"Last-Translator: MineGame 159 <minegame459@gmail.com>\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
+"Last-Translator: MineGame159 <petulko08@gmail.com>\n"
"Language-Team: Slovak <https://hosted.weblate.org/projects/godot-engine/"
"godot/sk/>\n"
"Language: sk\n"
@@ -17,7 +19,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -35,63 +37,71 @@ msgid "Invalid input %i (not passed) in expression"
msgstr ""
#: core/math/expression.cpp
+#, fuzzy
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
+msgstr "self nemožno použiť lebo inštancia je rovná null (not passed)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr ""
+msgstr "Neplatné operandy pre operátor %s, %s a %s."
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
-msgstr ""
+msgstr "Neplatný index typu %s pre základný typ %s"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr ""
+msgstr "Neplatný názov indexu '%s' pre základný typ %s"
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid arguments to construct '%s'"
-msgstr "Chybný argument convert(), použite TYPE_* konštanty."
+msgstr "Neplatné argumenty pre vytvorenie '%s'"
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr ""
+msgstr "Pri volaní '%s':"
#: editor/animation_bezier_editor.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Voľné"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
-msgstr ""
+msgstr "Vyvážený"
#: editor/animation_bezier_editor.cpp
msgid "Mirror"
-msgstr ""
+msgstr "Zrkadlový"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr ""
+msgstr "VložiÅ¥ tu kľúÄ"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Duplicate Selected Key(s)"
-msgstr "Duplikovať výber"
+msgstr "DuplikovaÅ¥ kľúÄ(e)"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr ""
+msgstr "ZmazaÅ¥ kľúÄ(e)"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Signály:"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Presunúť Vybraté Body"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr ""
+msgstr "Animácia DuplikovaÅ¥ KľúÄe"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Delete Keys"
-msgstr ""
+msgstr "Animácia VymazaÅ¥ KľúÄe"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
@@ -115,6 +125,15 @@ msgid "Anim Change Call"
msgstr "Animácia Zmeniť Hovor"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Zmeniť Dĺžku Animácie"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Zmeniť Dĺžku Animácie"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -144,7 +163,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Animation Length Time (seconds)"
-msgstr ""
+msgstr "Dĺžka Času Animácie (v sekundách)"
#: editor/animation_track_editor.cpp
msgid "Animation Looping"
@@ -153,14 +172,18 @@ msgstr ""
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
-msgstr ""
+msgstr "Funkcie:"
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
-msgstr ""
+msgstr "Zvukové Klipy:"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
+msgstr "Klipy Animácie:"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
msgstr ""
#: editor/animation_track_editor.cpp
@@ -173,7 +196,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Interpolation Mode"
-msgstr ""
+msgstr "Režim Interpolácie"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
@@ -186,6 +209,10 @@ msgstr "Všetky vybrané"
#: editor/animation_track_editor.cpp
msgid "Time (s): "
+msgstr "ÄŒas (s): "
+
+#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
msgstr ""
#: editor/animation_track_editor.cpp
@@ -194,28 +221,28 @@ msgstr "Priebežný"
#: editor/animation_track_editor.cpp
msgid "Discrete"
-msgstr ""
+msgstr "Diskrétne"
#: editor/animation_track_editor.cpp
msgid "Trigger"
-msgstr ""
+msgstr "Spúšť"
#: editor/animation_track_editor.cpp
msgid "Capture"
-msgstr ""
+msgstr "Zachytiť"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr ""
+msgstr "Najbližší"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
msgid "Linear"
-msgstr ""
+msgstr "Lineárne"
#: editor/animation_track_editor.cpp
msgid "Cubic"
-msgstr ""
+msgstr "Kubický"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
@@ -228,7 +255,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr ""
+msgstr "VložiÅ¥ KľúÄ"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -241,6 +268,18 @@ msgid "Delete Key(s)"
msgstr "Všetky vybrané"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -259,19 +298,19 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp editor/script_create_dialog.cpp
msgid "Create"
-msgstr ""
+msgstr "Vytvoriť"
#: editor/animation_track_editor.cpp
msgid "Anim Insert"
-msgstr ""
+msgstr "Animácia Vložiť"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
-msgstr ""
+msgstr "AnimationPlayer nemôže animovaÅ¥ sám seba, iba ostatný hráÄi."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
-msgstr ""
+msgstr "Animácia Vytvoriť & Vložiť"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Track & Key"
@@ -279,7 +318,17 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Anim Insert Key"
-msgstr ""
+msgstr "Animácia VložiÅ¥ KľúÄ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Animácia zmeniť prechod"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Vložiť"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
@@ -292,6 +341,10 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"Audio stopy môžu ukazovať len na nodes typu:\n"
+"-AudioStreamPlayer\n"
+"-AudioStreamPlayer2D\n"
+"-AudioStreamPlayer3D"
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
@@ -306,6 +359,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -314,10 +371,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -330,6 +399,11 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Vložiť"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -372,11 +446,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Vložiť"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Zmeniť veľkosť výberu"
@@ -479,6 +548,18 @@ msgstr ""
msgid "Copy"
msgstr "Kopírovať"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -543,20 +624,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -571,13 +644,13 @@ msgstr ""
#: editor/connections_dialog.cpp
msgid "Connect To Node:"
-msgstr ""
+msgstr "Pripojiť k Node:"
#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
-msgstr ""
+msgstr "Pridať"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/groups_editor.cpp editor/plugins/animation_player_editor_plugin.cpp
@@ -586,7 +659,7 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
#: editor/project_settings_editor.cpp
msgid "Remove"
-msgstr ""
+msgstr "Odstrániť"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
@@ -598,7 +671,7 @@ msgstr ""
#: editor/connections_dialog.cpp
msgid "Path to Node:"
-msgstr ""
+msgstr "Cesta k Node:"
#: editor/connections_dialog.cpp
msgid "Make Function"
@@ -624,102 +697,99 @@ msgstr ""
#: editor/run_settings_dialog.cpp editor/settings_config_dialog.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Close"
-msgstr ""
+msgstr "Zatvoriť"
#: editor/connections_dialog.cpp
msgid "Connect"
-msgstr ""
+msgstr "Pripojiť"
#: editor/connections_dialog.cpp
msgid "Connect '%s' to '%s'"
-msgstr ""
+msgstr "Pripojiť '%s' k '%s'"
#: editor/connections_dialog.cpp
msgid "Disconnect '%s' from '%s'"
-msgstr ""
+msgstr "Odpojiť '%s' z '%s'"
#: editor/connections_dialog.cpp
msgid "Disconnect all from signal: '%s'"
-msgstr ""
+msgstr "Opojiť všetky z signálu: '%s'"
#: editor/connections_dialog.cpp
msgid "Connect..."
-msgstr ""
+msgstr "Pripojiť..."
#: editor/connections_dialog.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Disconnect"
-msgstr ""
+msgstr "Odpojiť"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect Signal: "
-msgstr "Všetky vybrané"
+msgstr "Pripojiť Signál: "
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Edit Connection: "
-msgstr "Upraviť výber krivky"
+msgstr "Upraviť Pripojenie: "
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
-msgstr ""
+msgstr "Naozaj chcete odstrániť všetky pripojenia z \"%s\" signálu?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
-msgstr ""
+msgstr "Signály"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
-msgstr ""
+msgstr "Naozaj chcete odstrániť všetky pripojenia z tohto signálu?"
#: editor/connections_dialog.cpp
msgid "Disconnect All"
-msgstr ""
+msgstr "Opojiť Všetko"
#: editor/connections_dialog.cpp
msgid "Edit..."
-msgstr ""
+msgstr "Upraviť..."
#: editor/connections_dialog.cpp
msgid "Go To Method"
-msgstr ""
+msgstr "Prejdite na Metódu"
#: editor/create_dialog.cpp
msgid "Change %s Type"
-msgstr ""
+msgstr "Zmeniť %s Typ"
#: editor/create_dialog.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Change"
-msgstr ""
+msgstr "Zmeniť"
#: editor/create_dialog.cpp
-#, fuzzy
msgid "Create New %s"
-msgstr "Vytvoriť adresár"
+msgstr "Vytvoriť Nový %s"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
msgid "Favorites:"
-msgstr ""
+msgstr "Obľúbené:"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
msgid "Recent:"
-msgstr ""
+msgstr "Nedávne:"
#: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
#: editor/property_selector.cpp editor/quick_open.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
-msgstr ""
+msgstr "Hľadať:"
#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
#: editor/property_selector.cpp editor/quick_open.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
-msgstr ""
+msgstr "Zhody:"
#: editor/create_dialog.cpp editor/plugin_config_dialog.cpp
#: editor/plugins/asset_library_editor_plugin.cpp editor/property_selector.cpp
@@ -729,17 +799,19 @@ msgstr "Popis:"
#: editor/dependency_editor.cpp
msgid "Search Replacement For:"
-msgstr ""
+msgstr "Hľadať Náhradu pre:"
#: editor/dependency_editor.cpp
msgid "Dependencies For:"
-msgstr ""
+msgstr "Závislosti pre:"
#: editor/dependency_editor.cpp
msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will not take effect unless reloaded."
msgstr ""
+"Scéna '%s' sa práve upravuje.\n"
+"Zmeny sa neprejavia, pokiaľ znovu naÄítané."
#: editor/dependency_editor.cpp
msgid ""
@@ -750,32 +822,32 @@ msgstr ""
#: editor/dependency_editor.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Dependencies"
-msgstr ""
+msgstr "Závislostí"
#: editor/dependency_editor.cpp
msgid "Resource"
-msgstr ""
+msgstr "Prostriedok"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
#: editor/project_settings_editor.cpp editor/script_create_dialog.cpp
msgid "Path"
-msgstr ""
+msgstr "Cesta"
#: editor/dependency_editor.cpp
msgid "Dependencies:"
-msgstr ""
+msgstr "Závislostí:"
#: editor/dependency_editor.cpp
msgid "Fix Broken"
-msgstr ""
+msgstr "Opraviť Rozbité"
#: editor/dependency_editor.cpp
msgid "Dependency Editor"
-msgstr ""
+msgstr "Editor Závislostí"
#: editor/dependency_editor.cpp
msgid "Search Replacement Resource:"
-msgstr ""
+msgstr "Hľadať Náhradný Zdroj:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
@@ -789,11 +861,11 @@ msgstr "Otvoriť"
#: editor/dependency_editor.cpp
msgid "Owners Of:"
-msgstr ""
+msgstr "Majitelia:"
#: editor/dependency_editor.cpp
msgid "Remove selected files from the project? (no undo)"
-msgstr ""
+msgstr "Odstrániť vybraté súbory z projektu? (nedá sa vrátiť späť)"
#: editor/dependency_editor.cpp
msgid ""
@@ -801,46 +873,48 @@ msgid ""
"work.\n"
"Remove them anyway? (no undo)"
msgstr ""
+"Súbory ktoré budú odstránené vyžadujú ÄalÅ¡ie zdroje, aby mohli pracovaÅ¥.\n"
+"Odstrániť aj napriek tomu? (nedá sa vrátiť späť)"
#: editor/dependency_editor.cpp editor/export_template_manager.cpp
msgid "Cannot remove:"
-msgstr ""
+msgstr "Nemôžete odstrániť:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
-msgstr ""
+msgstr "Chyba pri naÄítaní:"
#: editor/dependency_editor.cpp
msgid "Load failed due to missing dependencies:"
-msgstr ""
+msgstr "NaÄítanie zlyhalo z dôvodu chýbajúcich závislostí:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Open Anyway"
-msgstr ""
+msgstr "Otvoriť aj napriek tomu"
#: editor/dependency_editor.cpp
msgid "Which action should be taken?"
-msgstr ""
+msgstr "Ktorá akcia by sa mala prijať?"
#: editor/dependency_editor.cpp
msgid "Fix Dependencies"
-msgstr ""
+msgstr "Opraviť Závislosti"
#: editor/dependency_editor.cpp
msgid "Errors loading!"
-msgstr ""
+msgstr "Chyby pri naÄítaní!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr ""
+msgstr "Natrvalo odstrániť %d položky? (Nedá sa vrátiť späť!)"
#: editor/dependency_editor.cpp
msgid "Owns"
-msgstr ""
+msgstr "Vlastní"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
-msgstr ""
+msgstr "Zdroje Bez Výslovného Vlastníctva:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Orphan Resource Explorer"
@@ -848,87 +922,87 @@ msgstr ""
#: editor/dependency_editor.cpp
msgid "Delete selected files?"
-msgstr ""
+msgstr "Odstrániť vybraté súbory?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
-msgstr ""
+msgstr "Vymazať"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Key"
-msgstr ""
+msgstr "ZmeniÅ¥ KÄ¾ÃºÄ v Slovníku"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Value"
-msgstr ""
+msgstr "Zmeniť Hodnotu v Slovníku"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
-msgstr ""
+msgstr "VÄaka z Godot komunity!"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
-msgstr ""
+msgstr "Godot Engine prispievatelia"
#: editor/editor_about.cpp
msgid "Project Founders"
-msgstr ""
+msgstr "Zakladatelia Projektu"
#: editor/editor_about.cpp
msgid "Lead Developer"
-msgstr ""
+msgstr "Vedúci Vývojár"
#: editor/editor_about.cpp
msgid "Project Manager "
-msgstr ""
+msgstr "Manažér Projektu "
#: editor/editor_about.cpp
msgid "Developers"
-msgstr ""
+msgstr "Vývojári"
#: editor/editor_about.cpp
msgid "Authors"
-msgstr ""
+msgstr "Autori"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "Platinový Sponzori"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "Zlatý Sponzori"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "Malý Sponzori"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "Zlatý Darcovia"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "Strieborný Darcovia"
#: editor/editor_about.cpp
msgid "Bronze Donors"
-msgstr ""
+msgstr "Bronzový Darcovia"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "Darcovia"
#: editor/editor_about.cpp
msgid "License"
-msgstr ""
+msgstr "Licencia"
#: editor/editor_about.cpp
msgid "Thirdparty License"
-msgstr ""
+msgstr "Thirdparty Licencie"
#: editor/editor_about.cpp
msgid ""
@@ -939,22 +1013,21 @@ msgid ""
msgstr ""
#: editor/editor_about.cpp
-#, fuzzy
msgid "All Components"
-msgstr "Konštanty:"
+msgstr "Všetky Komponenty"
#: editor/editor_about.cpp
#, fuzzy
msgid "Components"
-msgstr "Konštanty:"
+msgstr "Komponenty"
#: editor/editor_about.cpp
msgid "Licenses"
-msgstr ""
+msgstr "Licencie"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Error opening package file, not in zip format."
-msgstr ""
+msgstr "Chyba pri otváraní súboru balíka, nie je vo formáte zip."
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -962,29 +1035,29 @@ msgstr ""
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Package installed successfully!"
-msgstr ""
+msgstr "Balík bol úspešne nainštalovaný!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr ""
+msgstr "Úspech!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Install"
-msgstr ""
+msgstr "Inštalovať"
#: editor/editor_asset_installer.cpp
msgid "Package Installer"
-msgstr ""
+msgstr "Inštalátor Balíkov"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
-msgstr ""
+msgstr "Reproduktory"
#: editor/editor_audio_buses.cpp
msgid "Add Effect"
-msgstr ""
+msgstr "Pridať Efekt"
#: editor/editor_audio_buses.cpp
#, fuzzy
@@ -1030,15 +1103,15 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Solo"
-msgstr ""
+msgstr "Sólo"
#: editor/editor_audio_buses.cpp
msgid "Mute"
-msgstr ""
+msgstr "Stlmiť"
#: editor/editor_audio_buses.cpp
msgid "Bypass"
-msgstr ""
+msgstr "Obísť"
#: editor/editor_audio_buses.cpp
msgid "Bus options"
@@ -1047,19 +1120,19 @@ msgstr ""
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Duplicate"
-msgstr ""
+msgstr "Duplikovať"
#: editor/editor_audio_buses.cpp
msgid "Reset Volume"
-msgstr ""
+msgstr "Obnoviť Hlasitosť"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
-msgstr ""
+msgstr "Odstrániť Efekt"
#: editor/editor_audio_buses.cpp
msgid "Audio"
-msgstr ""
+msgstr "Audio"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus"
@@ -1099,7 +1172,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "There is no 'res://default_bus_layout.tres' file."
-msgstr ""
+msgstr "Neexistuje žiadny súbor \"res://default_bus_layout.tres\"."
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -1110,14 +1183,14 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Load"
-msgstr ""
+msgstr "NaÄítaÅ¥"
#: editor/editor_audio_buses.cpp
#, fuzzy
@@ -1126,7 +1199,7 @@ msgstr "Popis:"
#: editor/editor_audio_buses.cpp
msgid "Save As"
-msgstr ""
+msgstr "Uložiť Ako"
#: editor/editor_audio_buses.cpp
msgid "Save this Bus Layout to a file."
@@ -1134,15 +1207,19 @@ msgstr ""
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
msgid "Load Default"
-msgstr ""
+msgstr "NaÄítaÅ¥ predvolené"
#: editor/editor_audio_buses.cpp
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
-msgstr ""
+msgstr "Neplatný Názov."
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
@@ -1283,6 +1360,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1333,7 +1430,7 @@ msgstr "Otvoriť súbor"
msgid "New Folder..."
msgstr "Vytvoriť adresár"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1408,10 +1505,32 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Vytvoriť adresár"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Vytvoriť adresár"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "PrieÄinky a Súbory:"
@@ -1642,8 +1761,8 @@ msgstr "Popis:"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1652,6 +1771,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1844,6 +1973,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2335,7 +2472,7 @@ msgid "Save & Restart"
msgstr "Uložiť súbor"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2892,14 +3029,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3039,10 +3168,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3396,24 +3521,6 @@ msgid "Create Polygon"
msgstr "Vytvoriť adresár"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Signály:"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Všetky vybrané"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3433,6 +3540,24 @@ msgstr ""
msgid "Erase points."
msgstr "Všetky vybrané"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Signály:"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Všetky vybrané"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3450,12 +3575,47 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Všetky vybrané"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Signály:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Popis:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Všetky vybrané"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3495,6 +3655,28 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Signály:"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Všetky vybrané"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3503,6 +3685,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3520,6 +3706,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3530,11 +3720,49 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Popis:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Všetky vybrané"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3550,6 +3778,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3780,6 +4013,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Vložiť"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Prechody"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3808,6 +4056,19 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Prechody"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4228,6 +4489,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4611,6 +4882,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4869,19 +5144,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4972,11 +5247,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5136,6 +5411,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5767,6 +6048,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5875,10 +6164,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5923,8 +6208,9 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr ""
+#, fuzzy
+msgid "Align with View"
+msgstr "Všetky vybrané"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -6016,6 +6302,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6024,6 +6316,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6239,7 +6535,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6304,10 +6600,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6316,7 +6608,12 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
+msgstr "Popis:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6328,8 +6625,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Popis:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6624,6 +6922,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Popis:"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6639,6 +6954,11 @@ msgstr "Všetky vybrané"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Vytvoriť adresár"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Vytvoriť adresár"
@@ -6774,6 +7094,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Vytvoriť adresár"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Všetky vybrané"
@@ -6821,6 +7150,27 @@ msgid "TileSet"
msgstr "Súbor:"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplikovať výber"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6836,6 +7186,15 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Súbor:"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6849,7 +7208,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6861,6 +7229,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7139,6 +7515,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7838,6 +8227,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7872,6 +8265,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "Vytvoriť adresár"
@@ -8297,6 +8694,19 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Všetky vybrané"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8505,6 +8915,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8644,10 +9058,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Súbor:"
@@ -8809,10 +9219,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8894,6 +9300,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9297,6 +9707,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9426,6 +9843,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9440,6 +9863,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9452,6 +9881,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9482,21 +9918,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9520,6 +9941,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9562,11 +9998,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9577,6 +10029,11 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Vytvoriť adresár"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index 23b3436ef7..0902f872bb 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -90,6 +90,16 @@ msgstr "Podvoji Izbran/e KljuÄ/e"
msgid "Delete Selected Key(s)"
msgstr "IzbriÅ¡i Izbran/e KljuÄ/e"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Dodaj toÄko"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Odstrani toÄko"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Animiraj Podvojene kljuÄe"
@@ -119,6 +129,16 @@ msgid "Anim Change Call"
msgstr "Animacija Spremeni klic"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Spremeni Ime Animacije:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -174,6 +194,11 @@ msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Track Path"
+msgstr "Spremeni Vrednost Niza"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
msgstr "Preklop naÄin pisanja brez motenj."
@@ -201,6 +226,10 @@ msgid "Time (s): "
msgstr "ÄŒas X-Bledenja (s):"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Neprekinjeno"
@@ -254,6 +283,21 @@ msgid "Delete Key(s)"
msgstr "Animacija IzbriÅ¡i kljuÄe"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Spremeni Ime Animacije:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Animacijski Gradnik"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Spremeni Zanko Animacije"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Odstrani animacijsko sled"
@@ -295,6 +339,16 @@ msgid "Anim Insert Key"
msgstr "V Animacijo Vstavi KljuÄ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Spremeni Ime Animacije:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Preuredi SamodejnoNalaganje"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -319,6 +373,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Animacija Dodaj sled"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -327,11 +386,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Preoblikovanje"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Animacija Dodaj sled"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Add Method Track Key"
+msgstr "V Animacijo Vstavi Sled & KljuÄ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
msgstr "VariableGet ni najden v skripti: "
@@ -344,6 +418,11 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Prilepi Parametre"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Spremeni Obseg KljuÄev"
@@ -390,11 +469,6 @@ msgid "Copy Tracks"
msgstr "Kopiraj Parametre"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Prilepi Parametre"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "PoveÄaj izbiro"
@@ -497,6 +571,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Animacija Dodaj sled"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "PoveÄaj Niz"
@@ -561,22 +648,14 @@ msgstr "Oddalji"
msgid "Reset Zoom"
msgstr "Ponastavi PoveÄavo/PomanjÅ¡avo"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Vrstica:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Stolpec:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "Metoda v ciljnem gradniku mora biti navedena!"
@@ -883,8 +962,8 @@ msgstr "Izbrišem izbrane datoteke?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Izbriši"
@@ -1141,8 +1220,9 @@ msgid "Add Bus"
msgstr "Dodaj Vodilo"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Ustvari novo Postavitev Vodila."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Shrani Postavitev ZvoÄnega Vodila Kot..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1170,6 +1250,10 @@ msgstr "Naložite Prevzeto"
msgid "Load the default Bus Layout."
msgstr "Naloži prevezeto Postavitev Vodila."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Ustvari novo Postavitev Vodila."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Neveljavno ime."
@@ -1315,6 +1399,26 @@ msgstr ""
msgid "Packing"
msgstr "Pakiranje"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1364,7 +1468,7 @@ msgstr "Pokaži V Upravitelju Datotek"
msgid "New Folder..."
msgstr "Nova Mapa..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Osveži"
@@ -1439,10 +1543,35 @@ msgstr "Premakni Priljubljeno Navzgor"
msgid "Move Favorite Down"
msgstr "Premakni Priljubljeno Navzdol"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Prejšnji zavihek"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Ustvarite Mapo"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Pojdi v nadrejeno mapo"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Mape ni mogoÄe ustvariti."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Oglejte si elemente, kot mrežo sliÄic"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Oglejte si elemente v seznamu"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Mape & Datoteke:"
@@ -1682,9 +1811,9 @@ msgstr "PoÄisti Izhod"
msgid "Project export failed with error code %d."
msgstr "Izvoz projekta ni uspelo s kodno napako %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Napaka pri shranjevanju virov!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1692,6 +1821,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Napaka pri shranjevanju virov!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Shrani Vire Kot..."
@@ -1905,6 +2044,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Shranim spremembe v '%s' pred zapiranjem?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Napaka pri nalaganju vira."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Shrani Sceno Kot..."
@@ -2432,7 +2580,8 @@ msgid "Save & Restart"
msgstr "Shrani & Zapri"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Vrti se ob spremembi okna urejevalnika!"
#: editor/editor_node.cpp
@@ -2999,16 +3148,6 @@ msgstr ""
"sistemu!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Oglejte si elemente, kot mrežo sliÄic"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Oglejte si elemente v seznamu"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Stanje: Uvoz datoteke ni uspel. Popravi datoteko in ponovno roÄno uvozi."
@@ -3153,11 +3292,6 @@ msgid "Search files"
msgstr "IÅ¡Äi Razrede"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-"Naredi primer iz izbranih prizorov, ki bo naslednik izbranega gradnika."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3527,25 +3661,6 @@ msgid "Create Polygon"
msgstr "Ustvarite Poligon"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Uredi Poligon"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Ustavi ToÄko"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Uredi Poligon (Odstrani ToÄko)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Odstrani Poligon in ToÄko"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3570,6 +3685,25 @@ msgstr ""
msgid "Erase points."
msgstr "IzbriÅ¡i toÄke"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Uredi Poligon"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Ustavi ToÄko"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Uredi Poligon (Odstrani ToÄko)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Odstrani Poligon in ToÄko"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3588,12 +3722,49 @@ msgstr "Naloži"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Odstrani toÄko"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Spremeni Mešalni Čas"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Spremeni Mešalni Čas"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Dodaj vozliÅ¡Äe"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Dodaj Animacijo"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Odstrani Poligon in ToÄko"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3635,6 +3806,31 @@ msgid "Triangle already exists"
msgstr "NAPAKA: Animacija s tem imenom že obstaja!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Dodaj Spremenljivko"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Spremeni Mešalni Čas"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Spremeni Mešalni Čas"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Odstrani Poligon in ToÄko"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Odstrani Spremenljivko"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3643,6 +3839,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Preklopi na Globalno SamodejnoNalaganje"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3660,6 +3861,11 @@ msgid "Blend:"
msgstr "Zmešaj:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Spremebe v Shader"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Uredi Filtre"
@@ -3669,11 +3875,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Dodaj Gradnik(e) iz Drevesa"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "NaÄin Premika"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Povezano"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Nepovezano"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animacija"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Izberi Gradnik"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Preklop naÄin pisanja brez motenj."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Spremeni Dolžino Animacije"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3689,6 +3939,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Ime Gradnika:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3924,6 +4180,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Navzkrižna Animacija Časa Mešanice"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "NaÄin Premika"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Prehod"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Dodaj vozliÅ¡Äe"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3953,6 +4224,20 @@ msgid "No playback resource set at path: %s."
msgstr "Ni na poti virov."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Odstrani"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Gradnik Prehod"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4385,6 +4670,16 @@ msgid "Move CanvasItem"
msgstr "Uredi Platno Stvari"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Samo SidriÅ¡Äa"
@@ -4775,6 +5070,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -5031,19 +5330,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5134,11 +5433,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5295,6 +5594,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Ustvarite Poligon"
@@ -5949,6 +6254,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Zaženi Prizor po Meri"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Posameznik"
@@ -6059,10 +6373,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6107,7 +6417,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6200,6 +6510,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6208,6 +6524,11 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Pripni na mrežo"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Izberite NaÄin (Q)"
@@ -6423,7 +6744,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6491,10 +6812,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6503,8 +6820,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Animacija"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animacija"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6515,8 +6838,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Ime Animacije:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6813,6 +7137,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Prejšnji zavihek"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6828,6 +7169,11 @@ msgstr "IzbriÅ¡i toÄke"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Ustvari Nov %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Ustvarite Poligon"
@@ -6963,6 +7309,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Ustvarite Poligon"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Odstrani Predlogo"
@@ -7012,6 +7367,28 @@ msgid "TileSet"
msgstr "Izvozi PloÅ¡Äno Zbirko"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "Nastavi kot Privzeto za '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Animacija Podvoji kljuÄe"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7027,6 +7404,16 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Uredi Filtre"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Spremebe v Shader"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -7040,7 +7427,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7053,6 +7449,14 @@ msgid "Exporting All"
msgstr "Izvozi"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7334,6 +7738,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8036,6 +8453,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Shrani Prizor"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8071,6 +8493,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Shrani Prizor"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Ustvarite Mapo"
@@ -8493,6 +8920,19 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Spremeni SidriÅ¡Äa"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8703,6 +9143,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8840,10 +9284,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Ogled datotek"
@@ -9010,10 +9450,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Dodaj vozliÅ¡Äe"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Odstrani Gradnike VizualnaSkripta"
@@ -9096,6 +9532,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Uredi Platno Stvari"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9502,6 +9943,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9631,6 +10079,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9645,6 +10099,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9657,6 +10117,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9687,21 +10154,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9725,6 +10177,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9772,13 +10239,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Neobdelan naÄin"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Dodaj trenutno barvo kot prednastavljeno"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Opozorilo!"
@@ -9787,6 +10271,11 @@ msgstr "Opozorilo!"
msgid "Please Confirm..."
msgstr "Prosimo Potrdite..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Pojdi v nadrejeno mapo"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9863,6 +10352,16 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr ""
+#~ "Naredi primer iz izbranih prizorov, ki bo naslednik izbranega gradnika."
+
+#~ msgid "Line:"
+#~ msgstr "Vrstica:"
+
+#~ msgid "Col:"
+#~ msgstr "Stolpec:"
+
#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "SamodejnoNalaganje '%s' že obstaja!"
@@ -9954,10 +10453,6 @@ msgstr ""
#~ msgid "Search in files"
#~ msgstr "IÅ¡Äi Razrede"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Pripni na mrežo"
-
#~ msgid "Disabled"
#~ msgstr "OnemogoÄen"
@@ -9994,12 +10489,6 @@ msgstr ""
#~ msgid "Out"
#~ msgstr "Ven"
-#~ msgid "Change Anim Len"
-#~ msgstr "Spremeni Dolžino Animacije"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "Spremeni Zanko Animacije"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "V Animaciji Ustvari Vneseno Vrednost KljuÄa"
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index ea81392f89..cc41a13b65 100644
--- a/editor/translations/sq.po
+++ b/editor/translations/sq.po
@@ -81,6 +81,14 @@ msgstr "Dyfisho Key(s) të Selektuar"
msgid "Delete Selected Key(s)"
msgstr "Fshi Key(s) të Selektuar"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -110,6 +118,16 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Përsëritje Animacioni"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -159,6 +177,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -183,6 +205,10 @@ msgid "Time (s): "
msgstr "Koha (s): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "I vazhdueshëm:"
@@ -233,6 +259,19 @@ msgid "Delete Key(s)"
msgstr "Fshi Key(s)"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Përsëritje Animacioni"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -274,6 +313,15 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Pastro Animacionin"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -298,6 +346,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -306,10 +358,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Metoda nuk u gjet në objekt: "
@@ -322,6 +386,10 @@ msgid "Clipboard is empty"
msgstr "Clipboard-i është bosh"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -364,10 +432,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -467,6 +531,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Klipe Audio:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -531,20 +608,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -838,8 +907,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1091,7 +1160,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1120,6 +1189,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1263,6 +1336,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1308,7 +1401,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1383,10 +1476,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1602,8 +1715,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1612,6 +1725,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1803,6 +1926,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2290,7 +2421,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2838,14 +2969,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2981,10 +3104,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3328,37 +3447,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3378,12 +3497,44 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Përsëritje Animacioni"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3423,6 +3574,26 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3431,6 +3602,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3448,6 +3623,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3457,11 +3636,49 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Përmirëso Animacionin"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Fshi Key(s)"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3477,6 +3694,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3702,6 +3924,19 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3730,6 +3965,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4141,6 +4388,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4518,6 +4775,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4774,19 +5035,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4877,11 +5138,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5036,6 +5297,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5649,6 +5916,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5757,10 +6032,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5805,7 +6076,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5897,6 +6168,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5905,6 +6182,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6117,7 +6398,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6181,10 +6462,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6193,8 +6470,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Funksionet:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Përmirëso Animacionin"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6205,8 +6488,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Karakteristikat e animacionit."
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6494,6 +6778,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6506,6 +6806,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6629,6 +6933,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Fshi keys të gabuar"
@@ -6670,6 +6982,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Dyfisho Key(s)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6685,6 +7018,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6698,7 +7039,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6710,6 +7060,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6983,6 +7341,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7673,6 +8044,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7707,6 +8082,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8119,6 +8498,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8323,6 +8714,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8459,10 +8854,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8621,10 +9012,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8705,6 +9092,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9088,6 +9479,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9217,6 +9615,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9231,6 +9635,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9243,6 +9653,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9273,21 +9690,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9311,6 +9713,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9352,11 +9769,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9367,6 +9800,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index b74074cda1..f6bb6401b3 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -87,6 +87,16 @@ msgstr "Дуплирај одабрано"
msgid "Delete Selected Key(s)"
msgstr "Обриши одабране датотеке?"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Додај тачку"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Помери тачку"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Дуплирај кључеве"
@@ -118,6 +128,16 @@ msgid "Anim Change Call"
msgstr "Промени позив анимације"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Промени Ñ†Ð¸ÐºÐ»ÑƒÑ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ˜Ðµ"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Промени Ñ†Ð¸ÐºÐ»ÑƒÑ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ˜Ðµ"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -174,6 +194,11 @@ msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Track Path"
+msgstr "Промени вредноÑÑ‚ низа"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
msgstr "Укљ./ИÑкљ. режим без Ñметње."
@@ -201,6 +226,11 @@ msgid "Time (s): "
msgstr "X-Fade време (Ñек.):"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "„Doppler“ режим"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Трајан"
@@ -254,6 +284,21 @@ msgid "Delete Key(s)"
msgstr "Уколни кључеве"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Измени име анимације:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Ðнимациони чвор"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Промени Ñ†Ð¸ÐºÐ»ÑƒÑ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ˜Ðµ"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Обриши траку анимације"
@@ -295,6 +340,16 @@ msgid "Anim Insert Key"
msgstr "Уметни кључ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Промени број Ñлика у Ñекунди (FPS)"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Преуреди аутоматÑка учитавања"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -319,6 +374,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Додај нову траку"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -327,10 +387,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Тип транÑформације"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Додај нову траку"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Уметни траку и кључ"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -344,6 +419,11 @@ msgid "Clipboard is empty"
msgstr "Ðема реÑурÑа за копирање!"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Ðалепи параметре"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Увећај кључеве"
@@ -390,11 +470,6 @@ msgid "Copy Tracks"
msgstr "Копирај параметре"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Ðалепи параметре"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Увећај одабрано"
@@ -497,6 +572,19 @@ msgstr ""
msgid "Copy"
msgstr "Копирај"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Звучни Ñлушалац"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Промени величину низа"
@@ -561,22 +649,13 @@ msgstr "Умањи"
msgid "Reset Zoom"
msgstr "РеÑетуј увеличање"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Поглед иÑпред"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Линија:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Колона:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -888,8 +967,8 @@ msgstr "Обриши одабране датотеке?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Обриши"
@@ -1148,8 +1227,9 @@ msgid "Add Bus"
msgstr "Додај баÑ"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Ðаправи нови Ð±Ð°Ñ Ñ€Ð°Ñпоред."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Сачувај раÑпоред звучног баÑа као..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1177,6 +1257,10 @@ msgstr "Учитај уобичајено"
msgid "Load the default Bus Layout."
msgstr "Учитај уобичајен Ð±Ð°Ñ Ñ€Ð°Ñпоред."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Ðаправи нови Ð±Ð°Ñ Ñ€Ð°Ñпоред."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ðеважеће име."
@@ -1321,6 +1405,26 @@ msgstr ""
msgid "Packing"
msgstr "Паковање"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1371,7 +1475,7 @@ msgstr "Покажи у менаџеру датотека"
msgid "New Folder..."
msgstr "Ðови директоријум..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "ОÑвежи"
@@ -1446,10 +1550,35 @@ msgstr "Помери нагоре омиљену"
msgid "Move Favorite Down"
msgstr "Помери надоле омиљену"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Претодни Ñпрат"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Ðаправи директоријум"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Иди у родитељÑки директоријум"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "ÐеуÑпех при прављењу директоријума."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Прикажи Ñтвари као мрежа Ñличица"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Прикажи Ñтвари као лиÑта"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Директоријуми и датотеке:"
@@ -1692,9 +1821,9 @@ msgstr "Излаз"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Грешка при чувању реÑурÑа!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1702,6 +1831,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Грешка при чувању реÑурÑа!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Сачувај реÑÑƒÑ€Ñ ÐºÐ°Ð¾..."
@@ -1917,6 +2056,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Сачувај промене '%s' пре излаÑка?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Грешка при учитавању реÑурÑа."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Сачувај Ñцену као..."
@@ -2445,7 +2593,8 @@ msgid "Save & Restart"
msgstr "Сачувај и изађи"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Окрене Ñе кад Ñе едиторÑки прозор поново обоји!"
#: editor/editor_node.cpp
@@ -3017,16 +3166,6 @@ msgstr "ÐеуÑпех навигације у „%s“ пошто није пр
#: editor/filesystem_dock.cpp
#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Прикажи Ñтвари као мрежа Ñличица"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Прикажи Ñтвари као лиÑта"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"\n"
@@ -3181,10 +3320,6 @@ msgid "Search files"
msgstr "Потражи клаÑе"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Ðаправи Ñледећу Ñцену/е као дете одабраног чвора."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3555,25 +3690,6 @@ msgid "Create Polygon"
msgstr "Ðаправи полигон"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Измени полигон"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Уметни тачку"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Уреди полигон (обриши тачку)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Обриши полигон и тачку"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3598,6 +3714,25 @@ msgstr ""
msgid "Erase points."
msgstr "ДеÑни таÑтер миша: обриши тачку."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Измени полигон"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Уметни тачку"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Уреди полигон (обриши тачку)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Обриши полигон и тачку"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3616,12 +3751,49 @@ msgstr "Учитај"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Помери тачку"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Промени време мешања"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Промени време мешања"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Додај тачку"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Додај анимацију"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Обриши тачку путање"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3664,6 +3836,30 @@ msgid "Triangle already exists"
msgstr "Грешка: име анимације већ поÑтоји!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Додај нову траку"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Промени време мешања"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Промени време мешања"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Обриши тачку путање"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3672,6 +3868,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Укљ./ИÑкљ. глобале аутоматÑког учитавања"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3689,6 +3890,11 @@ msgid "Blend:"
msgstr "Мешавина:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Промене материјала"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Уреди филтере"
@@ -3698,11 +3904,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Режим померања"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Повезан"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Веза прекинута"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Ðнимација"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Ðаправи чвор"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Укљ./ИÑкљ. режим без Ñметње."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Измени дужину анимације"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3718,6 +3967,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Име чвора:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3952,6 +4207,21 @@ msgid "Cross-Animation Blend Times"
msgstr "Вишеанимационо време мешања"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Режим померања"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Померај"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3981,6 +4251,20 @@ msgid "No playback resource set at path: %s."
msgstr "Ðије на пут реÑурÑа."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Обриши"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Transition чвор"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4407,6 +4691,16 @@ msgid "Move CanvasItem"
msgstr "Уреди CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Само Ñидра"
@@ -4801,6 +5095,10 @@ msgstr "Држи Shift за уређивање појединачних танг
msgid "Bake GI Probe"
msgstr "ИÑпечи Ñонде глобалног оÑветљења (GI)"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Ствар %d"
@@ -5060,6 +5358,10 @@ msgid "Generating Visibility Rect"
msgstr "Генериши правоугаоник видљивоÑти"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Генериши правоугаоник видљивоÑти"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Тачка Ñе Ñамо може поÑтавити у ParticlesMaterial процеÑни материјал"
@@ -5072,10 +5374,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "У Ñлици нема пикÑела Ñа транÑпарентношћу већом од 128..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Генериши правоугаоник видљивоÑти"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Учитај маÑку емиÑије"
@@ -5164,13 +5462,13 @@ msgid "Generating AABB"
msgstr "ГенериÑање оÑног поравнаног граничниог оквира (AABB)"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "Генериши оÑно поравнан гранични оквир (AABB)"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Генериши оÑно поравнан гранични оквир (AABB) видљивоÑти"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "Генериши оÑно поравнан гранични оквир (AABB)"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Обриши тачку из криве"
@@ -5327,6 +5625,12 @@ msgid "Create UV Map"
msgstr "Ðаправи UV мапу"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Ðаправи полигон"
@@ -5995,6 +6299,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Ðаправи тачке емиÑије од мреже"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Синглетон"
@@ -6107,10 +6420,6 @@ msgid "Vertices"
msgstr "Тачке"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Поглед одозго."
@@ -6155,7 +6464,8 @@ msgid "Rear"
msgstr "Бок"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Поравнавање Ñа погледом"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6249,6 +6559,12 @@ msgid "Freelook Speed Modifier"
msgstr "Брзина Ñлободног погледа"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Прикажи информације"
@@ -6259,6 +6575,11 @@ msgstr "XForm дијалог"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Залепи за мрежу"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Select Mode (Q)"
msgstr "Режим Ñелекције (Q)\n"
@@ -6477,7 +6798,7 @@ msgid "Post"
msgstr "ПоÑле"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6547,10 +6868,6 @@ msgid "Add Empty"
msgstr "Додај празан"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Промени Ñ†Ð¸ÐºÐ»ÑƒÑ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ˜Ðµ"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Промени број Ñлика у Ñекунди (FPS)"
@@ -6559,10 +6876,16 @@ msgid "(empty)"
msgstr "(празно)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Ðнимације"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Ðнимација"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "Брзина (FPS):"
@@ -6572,7 +6895,8 @@ msgid "Loop"
msgstr "ЦиклуÑ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Ðнимационе Ñлике"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6882,6 +7206,24 @@ msgid "Merge from Scene"
msgstr "Споји од Ñцене"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Следећа Ñкриптица"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Претодни Ñпрат"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6897,6 +7239,11 @@ msgstr "ДеÑни таÑтер миша: обриши тачку."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Ðаправи нов"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Ðаправи нови полигон од почетка."
@@ -7035,6 +7382,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Помери полигон"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Помери полигон"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Обриши шаблон"
@@ -7083,6 +7440,29 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "ПоÑтави као уобичајено за „%s“"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "Шејдер"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Дуплирај чвор/ове графа"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "Тачке"
@@ -7101,6 +7481,16 @@ msgstr "деÑно"
msgid "VisualShader"
msgstr "Шејдер"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Уреди филтере"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Промене шејдера"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Покретљива"
@@ -7115,8 +7505,17 @@ msgid "Delete preset '%s'?"
msgstr "Обриши поÑтавку „%s“?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Извозни шаблони за ову платформу или ниÑу пронађени или Ñу иÑкварене:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
msgid "Release"
@@ -7129,6 +7528,15 @@ msgstr "Извоз"
#: editor/project_export.cpp
#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "Путања не поÑтоји."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Извозни шаблони за ову платформу или ниÑу пронађени или Ñу иÑкварене:"
+
+#: editor/project_export.cpp
+#, fuzzy
msgid "Presets"
msgstr "ПоÑтавке"
@@ -7418,6 +7826,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8121,6 +8542,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Сачувај Ñцену"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8157,6 +8583,11 @@ msgstr "Ðаправи коÑти"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Сачувај Ñцену"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Ðаправи чвор"
@@ -8581,6 +9012,20 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Излазна транзиција"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Промени Ñидра"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8792,6 +9237,11 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "Мапа мреже"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Мапа мреже"
@@ -8936,10 +9386,6 @@ msgid "Build Project"
msgstr "Пројекат"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Погледај датотеке"
@@ -9099,10 +9545,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9185,6 +9627,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Уреди CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9582,6 +10029,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9711,6 +10165,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9725,6 +10185,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9737,6 +10203,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9767,21 +10240,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9805,6 +10263,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9851,11 +10324,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9866,6 +10355,11 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Иди у родитељÑки директоријум"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9940,6 +10434,22 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Ðаправи Ñледећу Ñцену/е као дете одабраног чвора."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Поглед иÑпред"
+
+#~ msgid "Line:"
+#~ msgstr "Линија:"
+
+#~ msgid "Col:"
+#~ msgstr "Колона:"
+
#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "ÐутоматÑко учитавање '%s' већ поÑтоји!"
@@ -10071,10 +10581,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Претвори у мала Ñлова"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Залепи за мрежу"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "Ротирај 0 Ñтепени"
@@ -10175,9 +10681,6 @@ msgstr ""
#~ msgid "Move Shader Graph Node"
#~ msgstr "Помери чвор графа шејдера"
-#~ msgid "Duplicate Graph Node(s)"
-#~ msgstr "Дуплирај чвор/ове графа"
-
#~ msgid "Delete Shader Graph Node(s)"
#~ msgstr "Обриши чвор/ове графа шејдера"
@@ -10235,9 +10738,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "Из-У"
-#~ msgid "Change Anim Len"
-#~ msgstr "Измени дужину анимације"
-
#~ msgid "Change Anim Loop"
#~ msgstr "Измени лупинг анимације"
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index 7a50fedd2c..8f0bf93d79 100644
--- a/editor/translations/sr_Latn.po
+++ b/editor/translations/sr_Latn.po
@@ -87,6 +87,14 @@ msgstr "Uduplaj Selekciju"
msgid "Delete Selected Key(s)"
msgstr "IzbriÅ¡i oznaÄeni kljuÄ(eve)"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Animacija Uduplaj KljuÄeve"
@@ -116,6 +124,16 @@ msgid "Anim Change Call"
msgstr "Animacija Promjeni Poziv"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Promijeni Dužinu Animacije"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -166,6 +184,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -191,6 +213,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Neprekidna"
@@ -243,6 +269,21 @@ msgid "Delete Key(s)"
msgstr "Animacija ObriÅ¡i KljuÄeve"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Promijeni Dužinu Animacije"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Promijeni Dužinu Animacije"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Optimizuj Animaciju"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Odstrani Kanal Animacije"
@@ -284,6 +325,15 @@ msgid "Anim Insert Key"
msgstr "Animacija dodaj kljuÄ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "PoÄisti Animaciju"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -308,6 +358,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Animacija Dodaj Kanal"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -316,10 +371,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Animacija Dodaj kanal i kljuÄ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Animacija Dodaj Kanal"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Animacija Dodaj kanal i kljuÄ"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -332,6 +402,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Animacija Skaliraj KljuÄeve"
@@ -374,10 +448,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Skaliraj Selekciju"
@@ -480,6 +550,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Animacija Dodaj Kanal"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -544,20 +627,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -852,8 +927,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1105,7 +1180,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1134,6 +1209,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1277,6 +1356,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1322,7 +1421,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1397,10 +1496,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1617,8 +1736,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1627,6 +1746,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1818,6 +1947,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2305,7 +2442,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2853,14 +2990,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2996,10 +3125,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3344,39 +3469,39 @@ msgid "Create Polygon"
msgstr "Napravi"
#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
-msgid "Edit Polygon"
+msgid "Create points."
msgstr "Napravi"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
-msgid "Create points."
+msgid "Edit Polygon"
msgstr "Napravi"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3396,12 +3521,44 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Optimizuj Animaciju"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3442,6 +3599,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Animacija Dodaj Kanal"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3450,6 +3628,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3467,6 +3649,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3476,11 +3662,49 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Optimizuj Animaciju"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Animacija ObriÅ¡i KljuÄeve"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3496,6 +3720,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3722,6 +3951,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Tranzicije"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3750,6 +3993,19 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Tranzicije"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4163,6 +4419,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4542,6 +4808,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4798,19 +5068,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4901,11 +5171,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5061,6 +5331,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5681,6 +5957,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5789,10 +6073,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5837,7 +6117,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5929,6 +6209,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5937,6 +6223,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6149,7 +6439,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6214,10 +6504,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6226,8 +6512,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Optimizuj Animaciju"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Optimizuj Animaciju"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6238,8 +6530,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Optimizuj Animaciju"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6531,6 +6824,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6544,6 +6853,11 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Napravi"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Napravi"
@@ -6674,6 +6988,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Napravi"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Obriši Selekciju"
@@ -6717,6 +7040,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Animacija Uduplaj KljuÄeve"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6732,6 +7076,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6745,7 +7097,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6757,6 +7118,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7030,6 +7399,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7723,6 +8105,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7757,6 +8143,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8169,6 +8559,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8374,6 +8776,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8511,10 +8917,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8673,10 +9075,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8757,6 +9155,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9140,6 +9542,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9269,6 +9678,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9283,6 +9698,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9295,6 +9716,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9325,21 +9753,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9363,6 +9776,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9404,11 +9832,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9419,6 +9863,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 6071ea21a8..ce12b4215c 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -92,6 +92,15 @@ msgstr "Duplicera urval"
msgid "Delete Selected Key(s)"
msgstr "Ta bort valda filer?"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Flytta Ner"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Anim Duplicera Nycklar"
@@ -121,6 +130,16 @@ msgid "Anim Change Call"
msgstr "Anim Ändra Anrop"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Ändra Animationsnamn:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -176,6 +195,11 @@ msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Track Path"
+msgstr "Ändra Arrays Värde"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
msgstr "Växla distraktionsfritt läge."
@@ -203,6 +227,10 @@ msgid "Time (s): "
msgstr "Tid:"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Kontinuerlig"
@@ -256,6 +284,21 @@ msgid "Delete Key(s)"
msgstr "Ta bort Nod(er)"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Ändra Animationsnamn:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Animations-Node"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Ändra Anim Loop"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Ta bort Anim spår"
@@ -297,6 +340,16 @@ msgid "Anim Insert Key"
msgstr "Anim Infoga Nyckel"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Ändra Animationsnamn:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Ändra ordning på Autoloads"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -321,6 +374,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Anim Lägg till spår"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -329,11 +387,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Transformera"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Anim Lägg till spår"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Anim Infoga Spår & Nyckel"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
msgstr "VariableGet hittades inte i Skript: "
@@ -347,6 +420,11 @@ msgid "Clipboard is empty"
msgstr "Sökvägen är tom"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "Klistra in Params"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "Anim Skala Nycklar"
@@ -393,11 +471,6 @@ msgid "Copy Tracks"
msgstr "Kopiera Params"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Klistra in Params"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Skala urval"
@@ -510,6 +583,19 @@ msgstr ""
msgid "Copy"
msgstr "Kopiera"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Ljud-Lyssnare"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
#, fuzzy
msgid "Resize Array"
@@ -580,23 +666,14 @@ msgstr "Zooma Ut"
msgid "Reset Zoom"
msgstr "Återställ Zoom"
-#: editor/code_editor.cpp
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
-msgid "Warnings:"
+msgid "Warnings"
msgstr "Varning"
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Vy framifrån"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Rad:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Kolumn:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
#, fuzzy
@@ -939,8 +1016,8 @@ msgstr "Ta bort valda filer?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Ta bort"
@@ -1245,8 +1322,8 @@ msgstr "Lägg till Buss"
#: editor/editor_audio_buses.cpp
#, fuzzy
-msgid "Create a new Bus Layout."
-msgstr "Skapa en ny Buss-Layout."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Spara Ljud-Buss Layout Som..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1279,6 +1356,11 @@ msgstr "Ladda Standard"
msgid "Load the default Bus Layout."
msgstr "Ladda standard Buss-Layouten."
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Skapa en ny Buss-Layout."
+
#: editor/editor_autoload_settings.cpp
#, fuzzy
msgid "Invalid name."
@@ -1447,6 +1529,26 @@ msgstr ""
msgid "Packing"
msgstr "Packar"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1500,7 +1602,7 @@ msgstr "Visa I Filhanteraren"
msgid "New Folder..."
msgstr "Ny Mapp..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Uppdatera"
@@ -1580,10 +1682,33 @@ msgstr "Flytta Favorit Upp"
msgid "Move Favorite Down"
msgstr "Flytta Favorit Ner"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Föregående flik"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Skapa Mapp"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Gå till överordnad mapp"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Kunde inte skapa mapp."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Directories & Files:"
@@ -1842,10 +1967,9 @@ msgstr "Output:"
msgid "Project export failed with error code %d."
msgstr "Projekt exporten misslyckades med följande felmeddelande %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Error saving resource!"
-msgstr "Fel vid sparande av resurs!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1853,6 +1977,17 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
+msgid "Error saving resource!"
+msgstr "Fel vid sparande av resurs!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Spara Resurs Som..."
@@ -2098,6 +2233,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Spara ändringar i '%s' innan stängning?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Misslyckades att ladda resurs."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Spara Scen Som..."
@@ -2650,7 +2794,7 @@ msgid "Save & Restart"
msgstr "Spara & Avsluta"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -3242,14 +3386,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3407,11 +3543,6 @@ msgid "Search files"
msgstr "Sök Klasser"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Instansiera valda scen(er) som barn till vald Node."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3795,25 +3926,6 @@ msgid "Create Polygon"
msgstr "Skapa Prenumeration"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Redigera Polygon"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Infoga Punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Redigera Polygon (ta bort punkt)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Ta bort Polygon och Punkt"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3833,6 +3945,25 @@ msgstr ""
msgid "Erase points."
msgstr "Radera punkter"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Redigera Polygon"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Infoga Punkt"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Redigera Polygon (ta bort punkt)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Ta bort Polygon och Punkt"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3851,12 +3982,47 @@ msgstr "Ladda"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Flytta Ner"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Lägg Till Node"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Lägg till Animation"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Ta bort Polygon och Punkt"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3898,6 +4064,29 @@ msgid "Triangle already exists"
msgstr "ERROR: Animationsnamn finns redan!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Lägg till Variabel"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Ta bort Polygon och Punkt"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Ta bort Variabeln"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3906,6 +4095,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Växla AutoLoad Globals"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3923,6 +4117,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Uppdatera Ändringar"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3933,11 +4132,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Node Namn:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Ansluten"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Frånkopplad"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animation"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Ta bort Nod(er)"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Växla distraktionsfritt läge."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Ändra Typ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3953,6 +4195,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Node Namn:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -4196,6 +4444,22 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Flytta Nod(er)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Lägg Till Översättning"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Add Node"
+msgstr "Lägg Till Node"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -4225,6 +4489,20 @@ msgid "No playback resource set at path: %s."
msgstr "Inte i resursens sökväg."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Ta bort"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Övergång"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4658,6 +4936,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -5049,6 +5337,10 @@ msgstr "Håll Skift för att redigera tangenter individuellt"
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -5314,19 +5606,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5420,11 +5712,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5582,6 +5874,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -6258,6 +6556,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Skapa från Scen"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Singleton"
@@ -6376,10 +6683,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Top View."
msgstr "Vy Ovanifrån."
@@ -6435,8 +6738,9 @@ msgid "Rear"
msgstr "Baksida"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr ""
+#, fuzzy
+msgid "Align with View"
+msgstr "Vy från höger"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
#, fuzzy
@@ -6532,6 +6836,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Visa Information"
@@ -6541,6 +6851,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "Välj Node"
@@ -6761,7 +7075,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6830,10 +7144,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6843,10 +7153,16 @@ msgid "(empty)"
msgstr "(tom)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Animationer"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animation"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr ""
@@ -6856,8 +7172,9 @@ msgid "Loop"
msgstr "Loop"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Nytt Animationsnamn:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -7164,6 +7481,24 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Nästa Skript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Föregående Skript"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -7179,6 +7514,11 @@ msgstr "Radera punkter"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Skapa Ny"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Skapa Prenumeration"
@@ -7314,6 +7654,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Skapa Prenumeration"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Ta Bort Mall"
@@ -7362,6 +7711,27 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Duplicera Nod(er)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7378,6 +7748,15 @@ msgstr "Höger"
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Redigera Filter"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -7391,7 +7770,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7404,6 +7792,15 @@ msgid "Exporting All"
msgstr "Exportera"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "Sökvägen finns inte."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7702,6 +8099,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8440,6 +8850,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "Make node as Root"
+msgstr "Vettigt!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Delete Node(s)?"
msgstr "Ta bort Nod(er)?"
@@ -8478,6 +8893,11 @@ msgstr "Gör Patch"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Vettigt!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Skapa Node"
@@ -8935,6 +9355,21 @@ msgstr ""
#: editor/settings_config_dialog.cpp
#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Genvägar"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "Genvägar"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Genvägar"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Shortcuts"
msgstr "Genvägar"
@@ -9150,6 +9585,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -9299,11 +9738,6 @@ msgstr "Projekt"
#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
-msgid "Warnings"
-msgstr "Varning"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
-#, fuzzy
msgid "View log"
msgstr "Visa Filer"
@@ -9470,11 +9904,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Add Node"
-msgstr "Lägg Till Node"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9560,6 +9989,11 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "Ändra Kommentar"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9980,6 +10414,13 @@ msgstr ""
"ParallaxLayer-Node fungerar bara när satt som en barn till en "
"ParallaxBackground-Node."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -10123,6 +10564,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -10137,6 +10584,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -10149,6 +10602,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -10181,21 +10641,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -10219,6 +10664,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -10264,15 +10724,31 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
#, fuzzy
msgid "Raw Mode"
msgstr "Raw-Läge"
#: scene/gui/color_picker.cpp
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "Add current color as a preset"
+msgid "Add current color as a preset."
msgstr "Lägg till nuvarande färg som en förinställning"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
#, fuzzy
msgid "Alert!"
@@ -10283,6 +10759,11 @@ msgstr "Varning!"
msgid "Please Confirm..."
msgstr "Vänligen Bekräfta..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Gå till överordnad mapp"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10361,6 +10842,27 @@ msgid "Varyings can only be assigned in vertex function."
msgstr ""
#, fuzzy
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Instansiera valda scen(er) som barn till vald Node."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#, fuzzy
+#~ msgid "Warnings:"
+#~ msgstr "Varning"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Vy framifrån"
+
+#~ msgid "Line:"
+#~ msgstr "Rad:"
+
+#~ msgid "Col:"
+#~ msgstr "Kolumn:"
+
+#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "PathFollow2D fungerar bara när den är satt som ett barn till en Path2D-"
@@ -10507,10 +11009,6 @@ msgstr ""
#~ msgid "Errors:"
#~ msgstr "Fel:"
-#, fuzzy
-#~ msgid "Change Comment"
-#~ msgstr "Ändra Kommentar"
-
#~ msgid "Disabled"
#~ msgstr "Avaktiverad"
@@ -10557,9 +11055,6 @@ msgstr ""
#~ msgid "Change Anim Len"
#~ msgstr "Ändra Anim Längd"
-#~ msgid "Change Anim Loop"
-#~ msgstr "Ändra Anim Loop"
-
#~ msgid "Length (s):"
#~ msgstr "Längd (s):"
diff --git a/editor/translations/ta.po b/editor/translations/ta.po
index a928d02019..71a637295f 100644
--- a/editor/translations/ta.po
+++ b/editor/translations/ta.po
@@ -85,6 +85,14 @@ msgstr "அசைவூடà¯à®Ÿà¯ போலிபசà¯à®šà®¾à®µà®¿à®•ளà¯"
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "அசைவூடà¯à®Ÿà¯ போலிபசà¯à®šà®¾à®µà®¿à®•ளà¯"
@@ -116,6 +124,15 @@ msgid "Anim Change Call"
msgstr "மாறà¯à®± அழைபà¯à®ªà¯ அசைவூடà¯à®Ÿà¯"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -166,6 +183,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -191,6 +212,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -242,6 +267,19 @@ msgid "Delete Key(s)"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "அசைவூடà¯à®Ÿà¯ பாதை [interpolation]யை மாறà¯à®±à¯"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "அசைவூடà¯à®Ÿà¯ பாதையை நீகà¯à®•à¯"
@@ -283,6 +321,15 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "மாறà¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -307,6 +354,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -315,10 +367,24 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -331,6 +397,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -373,10 +443,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -477,6 +543,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -541,20 +620,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -849,8 +920,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1102,7 +1173,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1131,6 +1202,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1274,6 +1349,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1319,7 +1414,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1394,10 +1489,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1613,8 +1728,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1623,6 +1738,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1814,6 +1939,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2301,7 +2434,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2849,14 +2982,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2993,10 +3118,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3340,37 +3461,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3390,12 +3511,44 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3435,6 +3588,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "அசைவூடà¯à®Ÿà¯ பாதை சேரà¯"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3443,6 +3617,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3460,6 +3638,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3469,11 +3651,49 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "அனைதà¯à®¤à¯ தேரà¯à®µà¯à®•ளà¯"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3489,6 +3709,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3715,6 +3940,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "சேர௠மà¯à®•à¯à®•ியபà¯à®ªà¯à®³à¯à®³à®¿à®¯à¯ˆ நகரà¯à®¤à¯à®¤à¯"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3743,6 +3983,19 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4155,6 +4408,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4532,6 +4795,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4788,19 +5055,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4891,11 +5158,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5051,6 +5318,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5664,6 +5937,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5772,10 +6053,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5820,7 +6097,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5912,6 +6189,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5920,6 +6203,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6132,7 +6419,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6196,10 +6483,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6208,7 +6491,12 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
+msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6220,7 +6508,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6512,6 +6800,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6524,6 +6828,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6648,6 +6956,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6688,6 +7004,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "அசைவூடà¯à®Ÿà¯ போலிபசà¯à®šà®¾à®µà®¿à®•ளà¯"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6703,6 +7040,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6716,7 +7061,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6728,6 +7082,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7001,6 +7363,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7693,6 +8068,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7727,6 +8106,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8139,6 +8522,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8344,6 +8739,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8481,10 +8880,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8643,10 +9038,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8727,6 +9118,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9110,6 +9505,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9239,6 +9641,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9253,6 +9661,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9265,6 +9679,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9295,21 +9716,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9333,6 +9739,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9374,11 +9795,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9389,6 +9826,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9470,14 +9911,8 @@ msgstr ""
#~ msgid "Move Anim Track Down"
#~ msgstr "அசைவூடà¯à®Ÿà¯ பாதையை கீழே நகரà¯à®¤à¯à®¤à¯"
-#~ msgid "Anim Track Change Interpolation"
-#~ msgstr "அசைவூடà¯à®Ÿà¯ பாதை [interpolation]யை மாறà¯à®±à¯"
-
#~ msgid "Anim Track Change Value Mode"
#~ msgstr "அசைவூடà¯à®Ÿà¯ பாதை மதிபà¯à®ªà¯[value] விதம௠மாறà¯à®±à¯"
#~ msgid "Anim Track Change Wrap Mode"
#~ msgstr "அசைவூடà¯à®Ÿà¯ பாதை மறை[wrap] விதம௠மாறà¯à®±à¯"
-
-#~ msgid "Move Add Key"
-#~ msgstr "சேர௠மà¯à®•à¯à®•ியபà¯à®ªà¯à®³à¯à®³à®¿à®¯à¯ˆ நகரà¯à®¤à¯à®¤à¯"
diff --git a/editor/translations/te.po b/editor/translations/te.po
index 394a3c4208..936452190c 100644
--- a/editor/translations/te.po
+++ b/editor/translations/te.po
@@ -82,6 +82,14 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr ""
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -111,6 +119,15 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -160,6 +177,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -184,6 +205,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -234,6 +259,18 @@ msgid "Delete Key(s)"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -275,6 +312,14 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -299,6 +344,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -307,10 +356,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -323,6 +384,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -365,10 +430,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -468,6 +529,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -532,20 +605,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -839,8 +904,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1092,7 +1157,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1121,6 +1186,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1264,6 +1333,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1309,7 +1398,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1384,10 +1473,30 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1603,8 +1712,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1613,6 +1722,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1804,6 +1923,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2291,7 +2418,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2839,14 +2966,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -2982,10 +3101,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3329,37 +3444,37 @@ msgid "Create Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Create points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Erase points."
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
+msgid "Edit Polygon"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-#: editor/plugins/animation_blend_space_2d_editor.cpp
-msgid "Create points."
+msgid "Insert Point"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid ""
-"Edit points.\n"
-"LMB: Move Point\n"
-"RMB: Erase Point"
+msgid "Edit Polygon (Remove Point)"
msgstr ""
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#: editor/plugins/animation_blend_space_1d_editor.cpp
-msgid "Erase points."
+msgid "Remove Polygon And Point"
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -3379,12 +3494,43 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3424,6 +3570,26 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3432,6 +3598,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3449,6 +3619,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3458,11 +3632,47 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3478,6 +3688,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3703,6 +3918,19 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3731,6 +3959,18 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4142,6 +4382,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4519,6 +4769,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4775,19 +5029,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4878,11 +5132,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5037,6 +5291,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5650,6 +5910,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5758,10 +6026,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5806,7 +6070,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -5898,6 +6162,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5906,6 +6176,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6118,7 +6392,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6182,19 +6456,19 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
+msgid "Change Animation FPS"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation FPS"
+msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "(empty)"
+msgid "Animations:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6206,7 +6480,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6495,6 +6769,22 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6507,6 +6797,10 @@ msgid "Erase bitmask."
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr ""
@@ -6629,6 +6923,14 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr ""
@@ -6669,6 +6971,26 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6684,6 +7006,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6697,7 +7027,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6709,6 +7048,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -6982,6 +7329,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7672,6 +8032,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7706,6 +8070,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr ""
@@ -8118,6 +8486,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8322,6 +8702,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8458,10 +8842,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8620,10 +9000,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8704,6 +9080,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9087,6 +9467,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9216,6 +9603,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9230,6 +9623,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9242,6 +9641,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9272,21 +9678,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9310,6 +9701,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9351,11 +9757,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9366,6 +9788,10 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/th.po b/editor/translations/th.po
index afc0684350..e61a6675b2 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -92,6 +92,16 @@ msgstr "ทำซ้ำที่เลือà¸"
msgid "Delete Selected Key(s)"
msgstr "ลบสิ่งที่เลือà¸"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "เพิ่มจุด"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "ย้ายจุด"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "ทำซ้ำคีย์à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
@@ -122,6 +132,16 @@ msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™à¹à¸­à¸™
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Animation Length"
+msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸§à¸™à¸‹à¹‰à¸³à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸§à¸™à¸‹à¹‰à¸³à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Property Track"
msgstr "คุณสมบัติ:"
@@ -179,6 +199,11 @@ msgstr "คลิป"
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Change Track Path"
+msgstr "เปลี่ยนค่าในอาร์เรย์"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Toggle this track on/off."
msgstr "โหมดไร้สิ่งรบà¸à¸§à¸™"
@@ -206,6 +231,11 @@ msgid "Time (s): "
msgstr "ระยะเวลาเฟด (วิ):"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "เปิดดอปเพลอร์"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "ต่อเนื่อง"
@@ -259,6 +289,21 @@ msgid "Delete Key(s)"
msgstr "ลบโหนด"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "เปลี่ยนชื่อà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "โหนดà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸§à¸™à¸‹à¹‰à¸³à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "ลบà¹à¸—ร็à¸à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
@@ -300,6 +345,16 @@ msgid "Anim Insert Key"
msgstr "à¹à¸—รà¸à¸„ีย์à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "à¹à¸à¹‰à¹„ขความเร็วà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "จัดลำดับออโต้โหลด"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -324,6 +379,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "เพิ่มà¹à¸—ร็à¸à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -332,11 +392,26 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "ประเภทà¸à¸²à¸£à¹€à¸„ลื่อนย้าย"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "เพิ่มà¹à¸—ร็à¸à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
#, fuzzy
+msgid "Add Method Track Key"
+msgstr "เพิ่มà¹à¸—ร็à¸à¹à¸¥à¸°à¸„ีย์à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Method not found in object: "
msgstr "ไม่พบ VariableGet ในสคริปต์: "
@@ -350,6 +425,11 @@ msgid "Clipboard is empty"
msgstr "คลิปบอร์ดว่างเปล่า!"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "วางตัวà¹à¸›à¸£"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "ปรับคีย์à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
@@ -396,11 +476,6 @@ msgid "Copy Tracks"
msgstr "คัดลอà¸à¸•ัวà¹à¸›à¸£"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "วางตัวà¹à¸›à¸£"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "ปรับอัตราส่วนเวลาคีย์ที่เลือà¸"
@@ -503,6 +578,19 @@ msgstr ""
msgid "Copy"
msgstr "คัดลอà¸"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "ตัวรับเสียง"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "ปรับขนาดอาร์เรย์"
@@ -567,23 +655,13 @@ msgstr "ย่อ"
msgid "Reset Zoom"
msgstr "รีเซ็ตซูม"
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr "คำเตือน"
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "ขนาดฟอนต์ต้นฉบับ:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "บรรทัด:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "คอลัมน์:"
+msgid "Line and column numbers."
+msgstr ""
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -890,8 +968,8 @@ msgstr "ลบไฟล์ที่เลือ�"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "ลบ"
@@ -1147,8 +1225,9 @@ msgid "Add Bus"
msgstr "เพิ่ม Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "สร้างเลย์เอาต์ Bus ใหม่"
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "บันทึà¸à¹€à¸¥à¸¢à¹Œà¹€à¸­à¸²à¸•์ของ Audio Bus เป็น..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1176,6 +1255,10 @@ msgstr "โหลดค่าเริ่มต้น"
msgid "Load the default Bus Layout."
msgstr "โหลดค่าเริ่มต้นเลย์เอาต์ Bus"
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "สร้างเลย์เอาต์ Bus ใหม่"
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "ชื่อผิดพลาด"
@@ -1322,6 +1405,26 @@ msgstr ""
msgid "Packing"
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸£à¸§à¸šà¸£à¸§à¸¡"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1372,7 +1475,7 @@ msgstr "à¹à¸ªà¸”งในตัวจัดà¸à¸²à¸£à¹„ฟล์"
msgid "New Folder..."
msgstr "สร้างโฟลเดอร์..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "รีเฟรช"
@@ -1447,10 +1550,35 @@ msgstr "เลื่อนโฟลเดอร์ที่ชอบขึ้น
msgid "Move Favorite Down"
msgstr "เลื่อนโฟลเดอร์ที่ชอบลง"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "ไปชั้นล่าง"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "ไปชั้นบน"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "ไปยังโฟลเดอร์หลัà¸"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "ไม่สามารถสร้างโฟลเดอร์"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "à¹à¸ªà¸”งเป็นภาพตัวอย่าง"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "à¹à¸ªà¸”งเป็นรายชื่อไฟล์"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "ไฟล์à¹à¸¥à¸°à¹‚ฟลเดอร์:"
@@ -1686,9 +1814,9 @@ msgstr "ลบข้อความ"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "บันทึà¸à¸£à¸µà¸‹à¸­à¸£à¹Œà¸ªà¸œà¸´à¸”พลาด!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1696,6 +1824,16 @@ msgid "OK"
msgstr "ตà¸à¸¥à¸‡"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "บันทึà¸à¸£à¸µà¸‹à¸­à¸£à¹Œà¸ªà¸œà¸´à¸”พลาด!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "บันทึà¸à¸£à¸µà¸‹à¸­à¸£à¹Œà¸ªà¹€à¸›à¹‡à¸™..."
@@ -1902,6 +2040,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "บันทึภ'%s' à¸à¹ˆà¸­à¸™à¸›à¸´à¸”โปรà¹à¸à¸£à¸¡à¸«à¸£à¸·à¸­à¹„ม่?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "โหลดรีซอร์สไม่ได้"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "Texture ขนาดใหà¸à¹ˆà¸•้องà¸à¸²à¸£à¹à¸„่ไฟล์เดียว"
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "บันทึà¸à¸‰à¸²à¸à¹€à¸›à¹‡à¸™..."
@@ -2410,7 +2558,8 @@ msgid "Save & Restart"
msgstr "บันทึà¸à¹à¸¥à¸°à¸™à¸³à¹€à¸‚้าอีà¸à¸„รั้ง"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "หมุนเมื่อมีà¸à¸²à¸£à¸§à¸²à¸”หน้าต่างโปรà¹à¸à¸£à¸¡à¹ƒà¸«à¸¡à¹ˆ!"
#: editor/editor_node.cpp
@@ -2974,16 +3123,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "ไม่สามารถไปยัง '%s' เนื่องจาà¸à¹„ม่พบในระบบ!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "à¹à¸ªà¸”งเป็นภาพตัวอย่าง"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "à¹à¸ªà¸”งเป็นรายชื่อไฟล์"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr "สถานะ: นำเข้าไฟล์ล้มเหลว à¸à¸£à¸¸à¸“าà¹à¸à¹‰à¹„ขไฟล์à¹à¸¥à¸°à¸™à¸³à¹€à¸‚้าใหม่"
@@ -3127,10 +3266,6 @@ msgid "Search files"
msgstr "ค้นหาคลาส"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "อินสà¹à¸•นซ์ฉาà¸à¸—ี่เลือà¸à¹ƒà¸«à¹‰à¹€à¸›à¹‡à¸™à¹‚หนดลูà¸à¸‚องโหนดที่เลือà¸"
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3501,25 +3636,6 @@ msgid "Create Polygon"
msgstr "สร้างรูปหลายเหลี่ยม"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "à¹à¸à¹‰à¹„ขรูปหลายเหลี่ยม"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "à¹à¸—รà¸à¸ˆà¸¸à¸”"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "à¹à¸à¹‰à¹„ขรูปหลายเหลี่ยม (ลบจุด)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "ลบรูปหลายเหลี่ยมà¹à¸¥à¸°à¸ˆà¸¸à¸”"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3544,6 +3660,25 @@ msgstr ""
msgid "Erase points."
msgstr "คลิà¸à¸‚วา: ลบจุด"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "à¹à¸à¹‰à¹„ขรูปหลายเหลี่ยม"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "à¹à¸—รà¸à¸ˆà¸¸à¸”"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "à¹à¸à¹‰à¹„ขรูปหลายเหลี่ยม (ลบจุด)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "ลบรูปหลายเหลี่ยมà¹à¸¥à¸°à¸ˆà¸¸à¸”"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3562,12 +3697,49 @@ msgstr "โหลด"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "ย้ายจุด"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "à¹à¸à¹‰à¹„ขระยะเวลาà¸à¸²à¸£à¸œà¸ªà¸²à¸™"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "à¹à¸à¹‰à¹„ขระยะเวลาà¸à¸²à¸£à¸œà¸ªà¸²à¸™"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "เพิ่มโหนด"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "เพิ่มà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "ลบจุด"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3610,6 +3782,31 @@ msgid "Triangle already exists"
msgstr "มีà¸à¸²à¸£à¸à¸£à¸°à¸—ำ '%s' อยู่à¹à¸¥à¹‰à¸§!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "เพิ่มตัวà¹à¸›à¸£"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "à¹à¸à¹‰à¹„ขระยะเวลาà¸à¸²à¸£à¸œà¸ªà¸²à¸™"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "à¹à¸à¹‰à¹„ขระยะเวลาà¸à¸²à¸£à¸œà¸ªà¸²à¸™"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "ลบจุด"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "ลบตัวà¹à¸›à¸£"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3618,6 +3815,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "เปิด/ปิดซิงเà¸à¸´à¸¥à¸•ัน"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3636,6 +3838,11 @@ msgid "Blend:"
msgstr "ผสม:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "จำนวนครั้งที่เปลี่ยนวัสดุ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "à¹à¸à¹‰à¹„ขตัวà¸à¸£à¸­à¸‡"
@@ -3645,11 +3852,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "เพิ่มโหนดจาà¸à¸œà¸±à¸‡"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "โหมดเคลื่อนย้าย"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "เชื่อมต่อà¹à¸¥à¹‰à¸§"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "à¸à¸²à¸£à¹€à¸Šà¸·à¹ˆà¸­à¸¡à¸•่อสิ้นสุด"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "ลบโหนด"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "โหมดไร้สิ่งรบà¸à¸§à¸™"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "à¹à¸à¹‰à¹„ขตัวà¸à¸£à¸­à¸‡à¸ à¸¹à¸¡à¸´à¸ à¸²à¸„"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3665,6 +3916,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "ชื่อโหนด:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3902,6 +4159,21 @@ msgstr "ระยะเวลาà¸à¸²à¸£à¸œà¸ªà¸²à¸™ Cross-Animation"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
+msgid "Move Node"
+msgstr "โหมดเคลื่อนย้าย"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "เพิ่มà¸à¸²à¸£à¹à¸›à¸¥"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "เพิ่มโหนด"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "End"
msgstr "จบ"
@@ -3931,6 +4203,20 @@ msgid "No playback resource set at path: %s."
msgstr "ไม่อยู่ในโฟลเดอร์รีซอร์ส"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "ลบ:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "โหนดทรานสิชัน"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4359,6 +4645,16 @@ msgid "Move CanvasItem"
msgstr "à¹à¸à¹‰à¹„ข CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "ปรับหมุดเท่านั้น"
@@ -4752,6 +5048,10 @@ msgstr "à¸à¸” Shift ค้างเพื่อปรับเส้นสัà¸
msgid "Bake GI Probe"
msgstr "สร้าง GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "ไอเทม %d"
@@ -5009,6 +5309,10 @@ msgid "Generating Visibility Rect"
msgstr "สร้างà¸à¸£à¸­à¸šà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "สร้างà¸à¸£à¸­à¸šà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "สามารถà¸à¸³à¸«à¸™à¸”จุดให้à¹à¸à¹ˆ ParticlesMaterial เท่านั้น"
@@ -5021,10 +5325,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "รูปไม่มีพิà¸à¹€à¸‹à¸¥à¹ƒà¸”ที่ความโปร่งà¹à¸ªà¸‡ > 128 ..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "สร้างà¸à¸£à¸­à¸šà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "โหลด Mask à¸à¸²à¸£à¸›à¸°à¸—ุ"
@@ -5113,13 +5413,13 @@ msgid "Generating AABB"
msgstr "สร้างเส้นà¸à¸£à¸­à¸š"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "สร้างเส้นà¸à¸£à¸­à¸š"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "สร้างเส้นà¸à¸£à¸­à¸šà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "สร้างเส้นà¸à¸£à¸­à¸š"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "ลบจุดในเส้นโค้ง"
@@ -5276,6 +5576,12 @@ msgid "Create UV Map"
msgstr "สร้าง UV Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "สร้างรูปหลายเหลี่ยม"
@@ -5937,6 +6243,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "สร้างจุดปะทุจาภMesh"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "โครงà¸à¸£à¸°à¸”ูà¸..."
@@ -6049,10 +6364,6 @@ msgid "Vertices"
msgstr "มุมรูปทรง"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "เฟรมต่อวินาที"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "มุมบน"
@@ -6097,7 +6408,8 @@ msgid "Rear"
msgstr "หลัง"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "ย้ายมาที่à¸à¸¥à¹‰à¸­à¸‡"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6191,6 +6503,12 @@ msgid "Freelook Speed Modifier"
msgstr "ปรับความเร็วมุมมองอิสระ"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "à¹à¸ªà¸”งข้อมูล"
@@ -6200,6 +6518,11 @@ msgid "XForm Dialog"
msgstr "เครื่องมือเคลื่อนย้าย"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "จำà¸à¸±à¸”ด้วยเส้นตาราง"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "โหมดเลือภ(Q)"
@@ -6416,7 +6739,7 @@ msgid "Post"
msgstr "หลัง"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6487,10 +6810,6 @@ msgid "Add Empty"
msgstr "เพิ่มà¹à¸šà¸šà¸§à¹ˆà¸²à¸‡à¹€à¸›à¸¥à¹ˆà¸²"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸§à¸™à¸‹à¹‰à¸³à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "à¹à¸à¹‰à¹„ขความเร็วà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
@@ -6499,7 +6818,13 @@ msgid "(empty)"
msgstr "(ว่างเปล่า)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
+msgstr "à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
msgstr "à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6511,7 +6836,8 @@ msgid "Loop"
msgstr "วน"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "เฟรมà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6815,6 +7141,24 @@ msgid "Merge from Scene"
msgstr "รวมจาà¸à¸‰à¸²à¸"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "ไปชั้นบน"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "ไปชั้นล่าง"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6830,6 +7174,11 @@ msgstr "คลิà¸à¸‚วา: ลบจุด"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "สร้าง %s ใหม่"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "สร้างรูปหลายเหลี่ยมจาà¸à¸„วามว่างเปล่า"
@@ -6971,6 +7320,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "ย้ายรูปหลายเหลี่ยม"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "ย้ายรูปหลายเหลี่ยม"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "ลบà¹à¸¡à¹ˆà¹à¸šà¸š"
@@ -7019,6 +7378,29 @@ msgid "TileSet"
msgstr "Tile Set"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "à¸à¸³à¸«à¸™à¸”เป็นค่าเริ่มต้นของ '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "Shader"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "ทำซ้ำโหนด"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "มุมรูปทรง"
@@ -7038,6 +7420,16 @@ msgstr "ขวา"
msgid "VisualShader"
msgstr "Shader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "à¹à¸à¹‰à¹„ขตัวà¸à¸£à¸­à¸‡"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "จำนวนครั้งที่เปลี่ยน Shader"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "รันได้"
@@ -7051,8 +7443,17 @@ msgid "Delete preset '%s'?"
msgstr "ลบ '%s'?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "à¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•ฟอร์มนี้สูà¸à¸«à¸²à¸¢/เสียหาย:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
#, fuzzy
@@ -7065,6 +7466,15 @@ msgid "Exporting All"
msgstr "ส่งออà¸à¸ªà¸³à¸«à¸£à¸±à¸š %s"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "ไม่พบไฟล์"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "à¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•ฟอร์มนี้สูà¸à¸«à¸²à¸¢/เสียหาย:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "à¸à¸²à¸£à¸ªà¹ˆà¸‡à¸­à¸­à¸"
@@ -7348,6 +7758,19 @@ msgstr "ยืนยันà¸à¸²à¸£à¹€à¸›à¸´à¸”โปรเจà¸à¸•์มาà¸
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8065,6 +8488,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "เข้าใจ!"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "ลบโหนด?"
@@ -8101,6 +8529,11 @@ msgstr "ระยะใà¸à¸¥à¹‰"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "เข้าใจ!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "สร้างโหนด"
@@ -8538,6 +8971,21 @@ msgid "Set From Tree"
msgstr "à¸à¸³à¸«à¸™à¸”จาà¸à¸œà¸±à¸‡"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "ออà¸à¸™à¸¸à¹ˆà¸¡à¸™à¸§à¸¥"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "ทางลัด"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸•รึง"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "ทางลัด"
@@ -8751,6 +9199,10 @@ msgid "GridMap Duplicate Selection"
msgstr "ทำซ้ำใน GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "วาด GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "จำà¸à¸±à¸”ด้วยเส้นตาราง"
@@ -8888,10 +9340,6 @@ msgid "Build Project"
msgstr "Build โปรเจà¸à¸•์"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "คำเตือน"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "ดูไฟล์"
@@ -9052,10 +9500,6 @@ msgid "Change Expression"
msgstr "à¹à¸à¹‰à¹„ขสมà¸à¸²à¸£"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "เพิ่มโหนด"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "ลบโหนด"
@@ -9138,6 +9582,11 @@ msgid "Change Input Value"
msgstr "à¹à¸à¹‰à¹„ขค่าอินพุต"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "à¹à¸à¹‰à¹„ข CanvasItem"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "คัดลอà¸à¹‚หนดฟังà¸à¹Œà¸Šà¸±à¸™à¹„ม่ได้"
@@ -9541,6 +9990,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr "ParallaxLayer จะทำงานได้ต้องเป็นโหนดลูà¸à¸‚องโหนด ParallaxBackground"
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9679,6 +10135,12 @@ msgid ""
"shape resource for it!"
msgstr "ต้องมีรูปทรงเพื่อให้ CollisionShape ทำงานได้ à¸à¸£à¸¸à¸“าสร้างรูปทรง!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
@@ -9694,6 +10156,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "วางà¹à¸™à¸§ meshes"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr "ต้องมี NavigationMesh เพื่อให้โหนดนี้ทำงานได้"
@@ -9708,6 +10176,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr "ไม่มีà¸à¸²à¸£à¹à¸ªà¸”งผลเนื่องจาà¸à¹„ม่ได้à¸à¸³à¸«à¸™à¸” mesh ใน draw pass"
@@ -9741,21 +10216,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "ต้องà¹à¸à¹‰à¹„ข Path ให้ชี้ไปยังโหนด Spatial จึงจะทำงานได้"
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr "จะมี WorldEnvironment ได้เพียงโหนดเดียวในฉาภ(หรือà¸à¸¥à¸¸à¹ˆà¸¡à¸‚องฉาà¸à¸—ี่เป็นอินสà¹à¸•นซ์)"
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9782,6 +10242,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr "VehicleWheel เป็นระบบล้อของ VehicleBody à¸à¸£à¸¸à¸“าใช้เป็นโหนดลูà¸à¸‚อง VehicleBody"
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr "จะมี WorldEnvironment ได้เพียงโหนดเดียวในฉาภ(หรือà¸à¸¥à¸¸à¹ˆà¸¡à¸‚องฉาà¸à¸—ี่เป็นอินสà¹à¸•นซ์)"
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9828,13 +10303,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "โหมด Raw"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "เพิ่มสีที่เลือà¸à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¹‚ปรด"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "à¹à¸ˆà¹‰à¸‡à¹€à¸•ือน!"
@@ -9843,6 +10335,11 @@ msgstr "à¹à¸ˆà¹‰à¸‡à¹€à¸•ือน!"
msgid "Please Confirm..."
msgstr "à¸à¸£à¸¸à¸“ายืนยัน..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "ไปยังโฟลเดอร์หลัà¸"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9927,6 +10424,26 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "อินสà¹à¸•นซ์ฉาà¸à¸—ี่เลือà¸à¹ƒà¸«à¹‰à¹€à¸›à¹‡à¸™à¹‚หนดลูà¸à¸‚องโหนดที่เลือà¸"
+
+#~ msgid "FPS"
+#~ msgstr "เฟรมต่อวินาที"
+
+#, fuzzy
+#~ msgid "Warnings:"
+#~ msgstr "คำเตือน"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "ขนาดฟอนต์ต้นฉบับ:"
+
+#~ msgid "Line:"
+#~ msgstr "บรรทัด:"
+
+#~ msgid "Col:"
+#~ msgstr "คอลัมน์:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "PathFollow2D จะทำงานได้ต้องเป็นโหนดลูà¸à¸‚องโหนด Path2D"
@@ -10087,10 +10604,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "à¹à¸›à¸¥à¸‡à¹€à¸›à¹‡à¸™à¸•ัวพิมพ์เล็à¸"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "จำà¸à¸±à¸”ด้วยเส้นตาราง"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "หมุน 0 องศา"
@@ -10610,9 +11123,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "เพิ่ม:"
-#~ msgid "Removed:"
-#~ msgstr "ลบ:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "บันทึภtexture ย่อยของ atlas ไม่ได้:"
@@ -10873,9 +11383,6 @@ msgstr ""
#~ msgid "Error importing:"
#~ msgstr "ผิดพลาดขณะนำเข้า:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Texture ขนาดใหà¸à¹ˆà¸•้องà¸à¸²à¸£à¹à¸„่ไฟล์เดียว"
-
#~ msgid "Max Texture Size:"
#~ msgstr "ขนาด Texture ที่ใหà¸à¹ˆà¸—ี่สุด:"
@@ -11094,9 +11601,6 @@ msgstr ""
#~ msgid "Resource Tools"
#~ msgstr "เครื่องมือรีซอร์ส"
-#~ msgid "GridMap Paint"
-#~ msgstr "วาด GridMap"
-
#~ msgid "Areas"
#~ msgstr "พื้นที่"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index 1f52b34675..9ce4725e9a 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -20,12 +20,14 @@
# Onur Sanır <onursanir@gmail.com>, 2018.
# Oğuzhan Özdemir <ozdemiroguzhan0@gmail.com>, 2018.
# Alper Çitmen <alper.citmen@gmail.com>, 2019.
+# ege1212 <owlphp@gmail.com>, 2019.
+# Ömer YAZICIOĞLU <oyazicioglu@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-19 19:22+0000\n"
-"Last-Translator: Alper Çitmen <alper.citmen@gmail.com>\n"
+"PO-Revision-Date: 2019-03-08 15:04+0000\n"
+"Last-Translator: Ömer YAZICIOĞLU <oyazicioglu@gmail.com>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot/tr/>\n"
"Language: tr\n"
@@ -33,7 +35,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.4-dev\n"
+"X-Generator: Weblate 3.5.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -49,7 +51,7 @@ msgstr "Byte kodu çözmek için yetersiz byte, ya da Geçersiz format."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
-msgstr ""
+msgstr "Geçersiz girdi, ifadede %i (geçirilmedi)"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -62,22 +64,20 @@ msgid "Invalid operands to operator %s, %s and %s."
msgstr "%s düğümünde geçersiz indeks özelliği ismi '%s'."
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid index of type %s for base type %s"
-msgstr "%s düğümünde geçersiz indeks özelliği ismi '%s'."
+msgstr "%s temel tipi için, %s tipinde geçersiz index."
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr ""
+msgstr "%s temel tipi için, geçersiz isimlendirilmiş index %s"
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid arguments to construct '%s'"
-msgstr ": Şu tür için geçersiz değiştirgen: "
+msgstr "'%s' oluşturulurken geçersiz argümanlar atandı."
#: core/math/expression.cpp
msgid "On call to '%s':"
-msgstr ""
+msgstr "'%s': çağrıldığında."
#: editor/animation_bezier_editor.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -107,6 +107,16 @@ msgstr "Seçimi Çoğalt"
msgid "Delete Selected Key(s)"
msgstr "Seçilenleri Sil"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "Nokta Ekle"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Noktayı Taşı"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Animasyon Anahtarlarını Çoğalt"
@@ -136,46 +146,50 @@ msgid "Anim Change Call"
msgstr "Animasyon Değişikliği Çağrısı"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Animasyon UzunluÄŸunu DeÄŸiÅŸtir"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Animasyon Döngüsünü Değiştir"
+
+#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Property Track"
msgstr "Özellik:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "3D Transform Track"
-msgstr "Dönüştürme Türü"
+msgstr "3D Dönüştürücü İzi"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr ""
+msgstr "Yöntem Çağırma İzi"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr ""
+msgstr "Bezier Eğri İzi"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
-msgstr ""
+msgstr "Ses Oynatıcı İzi"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Playback Track"
-msgstr "Animasyonu oynatmayı durdur. (S)"
+msgstr "Animasyon Oynatıcı İzi"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track"
-msgstr "Animasyon İz Ekle"
+msgstr "İz Ekle"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Length Time (seconds)"
-msgstr "Animasyon uzunluÄŸu (saniye)."
+msgstr "Animasyon UzunluÄŸu (saniye)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Looping"
-msgstr "Animasyon yaklaÅŸ."
+msgstr "Animasyon Döngüsü"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -183,42 +197,44 @@ msgid "Functions:"
msgstr "İşlevler:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Audio Clips:"
-msgstr "Ses Dinleyici"
+msgstr "Ses Klipsi:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Clips:"
-msgstr "Parçalar"
+msgstr "Animasyon Klipsleri:"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "İz Yolunu Değiştir"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Toggle this track on/off."
-msgstr "Dikkat-Dağıtmayan Kipine geç."
+msgstr "Bu izi Aç/Kapat."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr ""
+msgstr "Güncelleme Kipi (Bu özellik nasıl belirlenir)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Interpolation Mode"
-msgstr "Animasyon Düğümü"
+msgstr "AradeÄŸerleme Kipi"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr ""
+msgstr "Döngü Örtü Kipi (Döngünün başlangıcını sonu ile aradeğerle)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Remove this track."
-msgstr "Seçilen izleri sil."
+msgstr "Bu izi sil."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s): "
-msgstr "X-Sönülme Süresi (sn):"
+msgstr "Süresi (sn): "
+
+#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "İz Dönüştürücü Etkin"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -233,13 +249,12 @@ msgid "Trigger"
msgstr "Tetikleyici"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Capture"
-msgstr "Özellikler"
+msgstr "Yakala"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr ""
+msgstr "En Yakın"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
@@ -248,15 +263,15 @@ msgstr "DoÄŸrusal"
#: editor/animation_track_editor.cpp
msgid "Cubic"
-msgstr ""
+msgstr "Kübik"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
-msgstr ""
+msgstr "Döngü Aradeğerlemesini Kıskaçla"
#: editor/animation_track_editor.cpp
msgid "Wrap Loop Interp"
-msgstr ""
+msgstr "Döngü Aradeğerlemesin Sar"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -274,6 +289,18 @@ msgid "Delete Key(s)"
msgstr "Düğümleri Sil"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Animasyonun Güncelleme Kipini Değiştir"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Animasyon AradeÄŸerleme Kipini DeÄŸiÅŸtir"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Animasyon Döngü Kipini Değiştir"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Animasyon İzini Kaldır"
@@ -301,6 +328,7 @@ msgstr "Animasyon Gir"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
msgstr ""
+"Animasyon Oynatıcısı kendisini oynatamaz, sadece diğer oynatıcılar yapabilir."
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -315,6 +343,15 @@ msgid "Anim Insert Key"
msgstr "Animasyon Anahtar Gir"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Animasyon FPS'sini DeÄŸiÅŸtir"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "İzleri Yeniden Sırala"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -325,44 +362,68 @@ msgid ""
"-AudioStreamPlayer2D\n"
"-AudioStreamPlayer3D"
msgstr ""
+"Ses izleri sadece şu düğüm tiplerini işaret edebilir:\n"
+"-SesAkışOynatıcı\n"
+"-SesAkışOynatıcı2D\n"
+"-SesAkışOynatıcı3D"
#: editor/animation_track_editor.cpp
msgid "Animation tracks can only point to AnimationPlayer nodes."
-msgstr ""
+msgstr "Animasyon izleri sadece AnimasyonOynatıcı düğümlerini işaret edebilir."
#: editor/animation_track_editor.cpp
msgid "An animation player can't animate itself, only other players."
msgstr ""
+"Bir animasyon oynatıcı kendisini oynamataz, sadece diğer oynatıcılar "
+"yapaibilir."
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr ""
+msgstr "Bir kök olmadan yeni bir iz eklemek mümkün değildir"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Bezier İz Ekle"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
-msgstr ""
+msgstr "Bu yol geçersizdir, dolayısı ile anahtar eklenemez."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr ""
+msgstr "İz, Spatial tipinde değildir, anahtar eklenemez"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Dönüştürme İz Anahtarı Ekle"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "İz Anahtarı Ekle"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
-msgstr ""
+msgstr "İz yolu geçersizdir, dolayısı ile yöntem anahtarı eklenemez."
+
+#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Yöntem İz Anahtarı Ekle"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object: "
-msgstr "VariableGet betikte bulunamadı: "
+msgstr "Yöntem, nesne içinde bulunamadı "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
msgstr "Animasyon Anahtarları Taşı"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Clipboard is empty"
-msgstr "Pano boÅŸ!"
+msgstr "Pano boÅŸ"
+
+#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "İzleri Yapıştır"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
@@ -372,14 +433,15 @@ msgstr "Animasyon Anahtarı Ölçekle"
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
msgstr ""
+"Bu seçenek yalnızca tek izli olduğundan, Bezier düzenlemede işe yaramaz."
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
-msgstr ""
+msgstr "sadece ağaç'ta seçili düğümlerdeki izleri göster."
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
-msgstr ""
+msgstr "İzleri düğüme göre grupla veya onları düz liste olarak göster."
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -387,9 +449,8 @@ msgid "Snap (s): "
msgstr "Yapış (Noktalara):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation step value."
-msgstr "Animasyon ağacı geçerlidir."
+msgstr "Animasyon adım değeri."
#: editor/animation_track_editor.cpp editor/editor_properties.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -401,19 +462,12 @@ msgid "Edit"
msgstr "Düzenle"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation properties."
-msgstr "AnimasyonAğacı"
+msgstr "Animasyon özellikleri."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Copy Tracks"
-msgstr "Değişkenleri Tıpkıla"
-
-#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "Parametreleri Yapıştır"
+msgstr "İzleri Kopyala"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
@@ -456,11 +510,11 @@ msgstr "Animasyonda temizlik yap"
#: editor/animation_track_editor.cpp
msgid "Pick the node that will be animated:"
-msgstr ""
+msgstr "Anime edilecek düğümü seç:"
#: editor/animation_track_editor.cpp
msgid "Use Bezier Curves"
-msgstr ""
+msgstr "Bezier EÄŸrileri Kullan"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -508,7 +562,7 @@ msgstr "Ölçek Oranı:"
#: editor/animation_track_editor.cpp
msgid "Select tracks to copy:"
-msgstr ""
+msgstr "Kopyalanacak izleri seç:"
#: editor/animation_track_editor.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -518,6 +572,18 @@ msgstr ""
msgid "Copy"
msgstr "Tıpkıla"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Ses İz Klipsi Ekle"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Ses İz Klipsi Başlangıç Kaymasını Değiştir"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Ses İz Klipsi Bitiş Kaymasını Değiştir"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Diziyi Yeniden Boyutlandır"
@@ -582,23 +648,13 @@ msgstr "Uzaklaştır"
msgid "Reset Zoom"
msgstr "Yaklaşmayı Sıfırla"
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr "Uyarılar"
#: editor/code_editor.cpp
-#, fuzzy
-msgid "Font Size:"
-msgstr "Kaynak Yazı Türü Boyutu:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Satır:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Sütun:"
+msgid "Line and column numbers."
+msgstr "Satır ve sütun numaraları."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -682,9 +738,8 @@ msgid "Disconnect '%s' from '%s'"
msgstr "Şunun: '%s' şununla: '%s' bağlantısını kes"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Disconnect all from signal: '%s'"
-msgstr "Şunun: '%s' şununla: '%s' bağlantısını kes"
+msgstr "'%s' sinyali ile tüm bağlantıları kes"
#: editor/connections_dialog.cpp
msgid "Connect..."
@@ -698,17 +753,17 @@ msgstr "Bağlantıyı kes"
#: editor/connections_dialog.cpp
#, fuzzy
msgid "Connect Signal: "
-msgstr "Bağlantı Sinyali:"
+msgstr "Bağlantı Sinyali: "
#: editor/connections_dialog.cpp
#, fuzzy
msgid "Edit Connection: "
-msgstr "Bağlantıları Düzenle"
+msgstr "Bağlantıları Düzenle "
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
-msgstr "Birden fazla projeyi çalıştırmaya kararlı mısınız?"
+msgstr ""
+"\"%s\" sinyalinden tüm bağlantıları kaldırmak istediğinizden emin misiniz?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
@@ -716,12 +771,11 @@ msgstr "Sinyaller"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
-msgstr ""
+msgstr "Bu sinyalden, tüm bağlantıları kaldırmak istediğinizden emin misiniz?"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Disconnect All"
-msgstr "Bağlantıyı kes"
+msgstr "Tüm Bağlantıları Kes"
#: editor/connections_dialog.cpp
#, fuzzy
@@ -729,13 +783,12 @@ msgid "Edit..."
msgstr "Düzenle"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go To Method"
-msgstr "Metotlar"
+msgstr "Yönteme Git"
#: editor/create_dialog.cpp
msgid "Change %s Type"
-msgstr "%s Tipini deÄŸiÅŸtir"
+msgstr "%s Tipini DeÄŸiÅŸtir"
#: editor/create_dialog.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -744,7 +797,7 @@ msgstr "DeÄŸiÅŸtir"
#: editor/create_dialog.cpp
msgid "Create New %s"
-msgstr "Yeni %s oluÅŸtur"
+msgstr "Yeni %s OluÅŸtur"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -878,7 +931,7 @@ msgstr "Hangi eylem alınmalı?"
#: editor/dependency_editor.cpp
msgid "Fix Dependencies"
-msgstr "Bağımlılıkları düzelt"
+msgstr "Bağımlılıkları Düzelt"
#: editor/dependency_editor.cpp
msgid "Errors loading!"
@@ -907,8 +960,8 @@ msgstr "Seçili dosyalar silinsin mi?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Sil"
@@ -1017,7 +1070,6 @@ msgid "Uncompressing Assets"
msgstr "Varlıklar Çıkartılıyor"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Package installed successfully!"
msgstr "Paket Başarı ile Kuruldu!"
@@ -1165,8 +1217,9 @@ msgid "Add Bus"
msgstr "Bus ekle"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Yeni bir Bus Yerleşim Düzeni oluştur."
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "Audio Bus Yerleşim Düzenini Farklı Kaydet..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1194,6 +1247,10 @@ msgstr "Varsayılanı Yükle"
msgid "Load the default Bus Layout."
msgstr "Varsayılan Bus Yerleşim Düzenini Yükle."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Yeni bir Bus Yerleşim Düzeni oluştur."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Geçersiz ad."
@@ -1340,6 +1397,26 @@ msgstr ""
msgid "Packing"
msgstr "Çıkınla"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1390,7 +1467,7 @@ msgstr "Dosya Yöneticisinde Göster"
msgid "New Folder..."
msgstr "Yeni Klasör..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Yenile"
@@ -1465,10 +1542,35 @@ msgstr "Beğenileni Yukarı Taşı"
msgid "Move Favorite Down"
msgstr "Beğenileni Aşağı Taşı"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Önceki Zemin"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Sonraki Zemin"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Üst klasöre git"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Klasör oluşturulamadı."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a grid of thumbnails."
+msgstr "Öğeleri küçük resim ızgarası şeklinde göster"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+#, fuzzy
+msgid "View items as a list."
+msgstr "Öğeleri liste olarak göster"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Dizinler & Dosyalar:"
@@ -1709,9 +1811,9 @@ msgstr "Çıktıyı Temizle"
msgid "Project export failed with error code %d."
msgstr "Proje dışa aktarımı %d hata koduyla başarısız."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Kaynak kaydedilirken hata!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1719,6 +1821,16 @@ msgid "OK"
msgstr "Tamam"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Kaynak kaydedilirken hata!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Kaynağı Farklı Kaydet..."
@@ -1937,6 +2049,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "Kapatmadan önce değişklikler buraya '%s' kaydedilsin mi?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Kaynak yükleme başarısız oldu."
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "Büyük doku için yalnızca bir dizeç gereklidir."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Sahneyi Farklı Kaydet..."
@@ -2463,7 +2585,8 @@ msgid "Save & Restart"
msgstr "Kaydet & Yeniden İçe Aktar"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+#, fuzzy
+msgid "Spins when the editor window redraws."
msgstr "Düzenleyici penceresi yeniden boyandığında döndürülür!"
#: editor/editor_node.cpp
@@ -3031,16 +3154,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "Gidilemiyor. '%s' bu dosya sisteminde bulunamadı!"
#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a grid of thumbnails."
-msgstr "Öğeleri küçük resim ızgarası şeklinde göster"
-
-#: editor/filesystem_dock.cpp
-#, fuzzy
-msgid "View items as a list."
-msgstr "Öğeleri liste olarak göster"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"Durum: Dosya içe aktarma başarısız oldu. Lütfen dosyayı onarın ve tekrar içe "
@@ -3186,10 +3299,6 @@ msgid "Search files"
msgstr "Sınıfları Ara"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Seçilen sahneyi/sahneleri seçilen düğüme çocuk olarak örneklendir."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3562,25 +3671,6 @@ msgid "Create Polygon"
msgstr "Çoklu Oluşturun"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Çokluyu Düzenleyin"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Nokta YerleÅŸtir"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon (Remove Point)"
-msgstr "Çokluyu Düzenleyin (Noktayı Silin)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "Çokluyu ve Noktayı Kaldır"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3605,6 +3695,25 @@ msgstr ""
msgid "Erase points."
msgstr "RMB: Noktayı Sil."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Çokluyu Düzenleyin"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Nokta YerleÅŸtir"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon (Remove Point)"
+msgstr "Çokluyu Düzenleyin (Noktayı Silin)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "Çokluyu ve Noktayı Kaldır"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3623,12 +3732,49 @@ msgstr "Yükle"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Noktayı Taşı"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Karışım Süresini Değiştir"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Karışım Süresini Değiştir"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Düğüm Ekle"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Animasyon Ekle"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "Yol Noktasını Kaldır"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3671,6 +3817,31 @@ msgid "Triangle already exists"
msgstr "İşlem '%s' zaten var!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "DeÄŸiÅŸken Ekle"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Karışım Süresini Değiştir"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Karışım Süresini Değiştir"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "Yol Noktasını Kaldır"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Değişkeni Kaldır"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3679,6 +3850,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "KendindenYüklenme Bütünsellerini Aç / Kapat"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3697,6 +3873,11 @@ msgid "Blend:"
msgstr "Karışma:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "Materyal DeÄŸiÅŸiklikleri"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Süzgeçleri Düzenle"
@@ -3706,11 +3887,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "Ağaçtan Düğüm(ler) Ekle"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Biçimi Taşı"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Bağlı"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Bağlantı kesildi"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Animasyon"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Düğümleri Sil"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Dikkat-Dağıtmayan Kipine geç."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Değiştirilen Yerel Süzgeç"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3726,6 +3951,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Düğüm adı:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3963,6 +4194,21 @@ msgstr "Çapraz-Animasyon Karışma Süreleri"
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
+msgid "Move Node"
+msgstr "Biçimi Taşı"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Çeviri Ekle"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Düğüm Ekle"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
msgid "End"
msgstr "Son(lar)"
@@ -3992,6 +4238,20 @@ msgid "No playback resource set at path: %s."
msgstr "Kaynak yolunda deÄŸil."
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Silinen:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Geçiş Düğümü"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4424,6 +4684,16 @@ msgid "Move CanvasItem"
msgstr "CanvasItem Düzenle"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Sadece çapalar"
@@ -4817,6 +5087,10 @@ msgstr "Tanjantları tek tek düzenlemek için Shift'e basılı tut"
msgid "Bake GI Probe"
msgstr "GI Prob PiÅŸir"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Öğe%d"
@@ -5074,6 +5348,10 @@ msgid "Generating Visibility Rect"
msgstr "Görünebilirlik Dikdörtgeni Üret"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Görünebilirlik Dikdörtgeni Üret"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Nokta sadece ParçacıkMateryal işlem materyalinin içinde ayarlanabilir"
@@ -5086,10 +5364,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Saydamlığı olan nokta yok > 128 bedizde..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Görünebilirlik Dikdörtgeni Üret"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Yayma Maskesini Yükle"
@@ -5178,13 +5452,13 @@ msgid "Generating AABB"
msgstr "AABB Üretimi"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "AABB Üret"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "Görünebilirlik AABB'si Üret"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "AABB Üret"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Noktayı Eğriden Kaldır"
@@ -5341,6 +5615,12 @@ msgid "Create UV Map"
msgstr "UV Haritası Oluştur"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
msgid "Create Polygon & UV"
msgstr "Çoklu Oluşturun"
@@ -6002,6 +6282,15 @@ msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Örüntüden Emisyon Noktaları Oluştur"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "İskelet..."
@@ -6114,10 +6403,6 @@ msgid "Vertices"
msgstr "Köşenoktalar"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "FPS"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "Üstten Görünüm."
@@ -6162,7 +6447,8 @@ msgid "Rear"
msgstr "Arka"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "Görünüme Ayarla"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6256,6 +6542,12 @@ msgid "Freelook Speed Modifier"
msgstr "Serbestbakış Hız Değiştirici"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "Bilgi Göster"
@@ -6265,6 +6557,11 @@ msgid "XForm Dialog"
msgstr "XForm İletişim Kutusu"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "Izgaraya yapış"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Seçim Kipi (Q)"
@@ -6481,7 +6778,7 @@ msgid "Post"
msgstr "Sonrası"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6552,10 +6849,6 @@ msgid "Add Empty"
msgstr "BoÅŸ Ekle"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Animasyon Döngüsünü Değiştir"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Animasyon FPS'sini DeÄŸiÅŸtir"
@@ -6564,10 +6857,16 @@ msgid "(empty)"
msgstr "(boÅŸ)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+#, fuzzy
+msgid "Animations:"
msgstr "Animasyonlar"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Animasyon"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
msgstr "Hız (FPS):"
@@ -6576,7 +6875,8 @@ msgid "Loop"
msgstr "Döngü"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+#, fuzzy
+msgid "Animation Frames:"
msgstr "Animasyon Çerçeveleri"
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6877,6 +7177,24 @@ msgid "Merge from Scene"
msgstr "Sahneden BirleÅŸtir"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "Sonraki Zemin"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Önceki Zemin"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6892,6 +7210,11 @@ msgstr "RMB: Noktayı Sil."
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Yeni %s oluÅŸtur"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Sıfırdan yeni bir çokgen oluşturun."
@@ -7035,6 +7358,16 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Concave"
+msgstr "Çokgeni Taşı"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Çokgeni Taşı"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Remove Tile"
msgstr "Şablonu Kaldır"
@@ -7083,6 +7416,29 @@ msgid "TileSet"
msgstr "Karo Takımı"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "'%s' için Varsayılanı Ayarla"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "Gölgelendirici"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Düğüm(leri) Çoğalt"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Vertex"
msgstr "Köşenoktalar"
@@ -7101,6 +7457,16 @@ msgstr "SaÄŸ"
msgid "VisualShader"
msgstr "Gölgelendirici"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "Süzgeçleri Düzenle"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "Shader DeÄŸiÅŸiklikleri"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "KoÅŸturulabilir"
@@ -7114,8 +7480,17 @@ msgid "Delete preset '%s'?"
msgstr "'%s' önayarı silinsin mi?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Bu platform için dışa aktarma şablonu eksik/bozuk:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
#, fuzzy
@@ -7128,6 +7503,15 @@ msgid "Exporting All"
msgstr "%s için Dışa Aktarım"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "Yol mevcut deÄŸil."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "Bu platform için dışa aktarma şablonu eksik/bozuk:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Önayarlar"
@@ -7414,6 +7798,19 @@ msgstr "Birden fazla proje açmakta kararlı mısınız?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8139,6 +8536,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "Anlamlı!"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Düğüm(ler) Silinsin mi?"
@@ -8174,6 +8576,11 @@ msgstr "YerelleÅŸtir"
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "Anlamlı!"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "Düğüm Oluştur"
@@ -8614,6 +9021,21 @@ msgid "Set From Tree"
msgstr "Ağaçtan Ayarla"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "Kararma"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "Kısayollar"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "Çapaları Değiştir"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Kısayollar"
@@ -8827,6 +9249,11 @@ msgid "GridMap Duplicate Selection"
msgstr "IzgaraHaritası Seçimi Çoğalt"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "IzgaraHaritası Ayarları"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Izgara Haritası"
@@ -8964,10 +9391,6 @@ msgid "Build Project"
msgstr "Projeyi İnşa et"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "Uyarılar"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "Dosyaları Görüntüle"
@@ -9133,10 +9556,6 @@ msgid "Change Expression"
msgstr "İfadeyi Değiştir"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Düğüm Ekle"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "GörselBetik Düğümlerini Kaldır"
@@ -9223,6 +9642,11 @@ msgid "Change Input Value"
msgstr "Girdi DeÄŸerini DeÄŸiÅŸtir"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "CanvasItem Düzenle"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Fonksiyon düğümü kopyalanamıyor."
@@ -9642,6 +10066,13 @@ msgstr ""
"ParallaxLayer, yalnızca ParallaxBackground düğümünün çocuğu olduğu zaman "
"çalışır."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9796,6 +10227,12 @@ msgstr ""
"CollisionShape'in çalışması için bir şekil verilmelidir. Lütfen bunun için "
"bir şekil kaynağı oluşturun!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Nothing is visible because no mesh has been assigned."
@@ -9812,6 +10249,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Örüntüler Haritalanıyor"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9828,6 +10271,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Hiçbirşey görünebilir değil çünkü örüntüler çizim geçişlerine atanmış değil."
@@ -9865,25 +10315,6 @@ msgid "Path property must point to a valid Spatial node to work."
msgstr ""
"Yol özelliği, çalışmak için geçerli bir Spatial düğümüne işaret etmelidir."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment bir Environment kaynağı gerektirir."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"Her sahne başına (ya da örneklenmiş sahneler dizisine) sadece bir tane "
-"WorldEnvironment 'a izin verilir."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Bu WorldEnvironment yoksayıldı. (3B sahneler için) Bir Kamera ekleyin veya "
-"(2B sahneler için) bu ortamın Arkaplan Kipini Canvas olarak ayarlayın."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9915,6 +10346,25 @@ msgstr ""
"VehicleWheel VehicleBody'ye bir tekerlek sistemi sağlaması için hizmet eder. "
"Lütfen bunu VehicleBody'nin çocuğu olarak kullanın."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment bir Environment kaynağı gerektirir."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"Her sahne başına (ya da örneklenmiş sahneler dizisine) sadece bir tane "
+"WorldEnvironment 'a izin verilir."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Bu WorldEnvironment yoksayıldı. (3B sahneler için) Bir Kamera ekleyin veya "
+"(2B sahneler için) bu ortamın Arkaplan Kipini Canvas olarak ayarlayın."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9963,13 +10413,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Ham Kip"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "Şuanki rengi bir önayar olarak kaydet"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "Uyarı!"
@@ -9978,6 +10445,11 @@ msgstr "Uyarı!"
msgid "Please Confirm..."
msgstr "Lütfen Doğrulayın..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Üst klasöre git"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -10064,6 +10536,26 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Seçilen sahneyi/sahneleri seçilen düğüme çocuk olarak örneklendir."
+
+#~ msgid "FPS"
+#~ msgstr "FPS"
+
+#, fuzzy
+#~ msgid "Warnings:"
+#~ msgstr "Uyarılar"
+
+#, fuzzy
+#~ msgid "Font Size:"
+#~ msgstr "Kaynak Yazı Türü Boyutu:"
+
+#~ msgid "Line:"
+#~ msgstr "Satır:"
+
+#~ msgid "Col:"
+#~ msgstr "Sütun:"
+
#, fuzzy
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
@@ -10229,10 +10721,6 @@ msgstr ""
#~ msgid "Convert To Lowercase"
#~ msgstr "Küçük Harfe Dönüştür"
-#, fuzzy
-#~ msgid "Snap To Floor"
-#~ msgstr "Izgaraya yapış"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "0 Düzeyde Döndür"
@@ -10754,9 +11242,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "Eklenen:"
-#~ msgid "Removed:"
-#~ msgstr "Silinen:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "Atlas alt dokusu kaydedilemedi:"
@@ -11016,9 +11501,6 @@ msgstr ""
#~ msgid "Error importing:"
#~ msgstr "İçe aktarırken sorun:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "Büyük doku için yalnızca bir dizeç gereklidir."
-
#~ msgid "Max Texture Size:"
#~ msgstr "En üst Doku Boyutu:"
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index 84bf261ae2..93f72238a2 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
+"PO-Revision-Date: 2019-03-12 15:26+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -23,9 +23,9 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 3.5-dev\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
+"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Weblate 3.5.1\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -93,6 +93,14 @@ msgstr "Дублювати позначені ключі"
msgid "Delete Selected Key(s)"
msgstr "Вилучити позначені ключі"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Додати точку Безьє"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "ПереміÑтити точки Безьє"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Дублювати ключі"
@@ -122,6 +130,15 @@ msgid "Anim Change Call"
msgstr "Змінити виклик анімації"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Змінити триваліÑть анімації"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Змінити цикл анімації"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "Доріжка влаÑтивоÑтей"
@@ -171,6 +188,10 @@ msgid "Anim Clips:"
msgstr "Кліпи анімації:"
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Змінити шлÑÑ… доріжки"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "Увімкнути або вимкнути цю доріжку."
@@ -195,6 +216,10 @@ msgid "Time (s): "
msgstr "Ð§Ð°Ñ (Ñ): "
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Увімкнути/Вимкнути доріжку"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Ðеперервна"
@@ -245,6 +270,18 @@ msgid "Delete Key(s)"
msgstr "Вилучити ключі"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Змінити режим Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð°Ð½Ñ–Ð¼Ð°Ñ†Ñ–Ñ—"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Змінити режим інтерполÑції анімації"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Змінити режим циклу анімації"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Видалити доріжку"
@@ -286,6 +323,14 @@ msgid "Anim Insert Key"
msgstr "Ð’Ñтавити ключ анімації"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Змінити крок анімації"
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr "ПеревпорÑдкувати доріжки"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "Доріжки Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·Ð°ÑтоÑовуютьÑÑ Ð»Ð¸ÑˆÐµ до вузлів на оÑнові Spatial."
@@ -316,6 +361,10 @@ msgid "Not possible to add a new track without a root"
msgstr "Ðе можна додавати нові доріжки без кореневого запиÑу"
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Додати доріжку Безьє"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "ШлÑÑ… доріжки Ñ” некоректним, отже не можна додавати ключ."
@@ -324,10 +373,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Доріжка не належить до типу Spatial, не можна вÑтавлÑти ключ"
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Додати ключ доріжки перетвореннÑ"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Додати ключ доріжки"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "ШлÑÑ… доріжки Ñ” некоректним, отже не можна додавати ключ методу."
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Додати ключ доріжки методів"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "Ðе знайдено метод у об'єкті: "
@@ -340,6 +401,10 @@ msgid "Clipboard is empty"
msgstr "Буфер обміну порожній"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Ð’Ñтавити доріжки"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "МаÑÑˆÑ‚Ð°Ð±ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ»ÑŽÑ‡Ñ–Ð² анімації"
@@ -385,10 +450,6 @@ msgid "Copy Tracks"
msgstr "Копіювати доріжки"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "Ð’Ñтавити доріжки"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Вибір маÑштабу"
@@ -488,6 +549,18 @@ msgstr "Виберіть доріжки Ð´Ð»Ñ ÐºÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ:"
msgid "Copy"
msgstr "Копіювати"
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Додати кліп звукової доріжки"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Змінити зÑув початку кліпу звукової доріжки"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Змінити зÑув ÐºÑ–Ð½Ñ†Ñ ÐºÐ»Ñ–Ð¿Ñƒ звукової доріжки"
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Змінити розмір маÑиву"
@@ -552,21 +625,13 @@ msgstr "ЗменшеннÑ"
msgid "Reset Zoom"
msgstr "Скинути маÑштаб"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "ПопередженнÑ:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "Розмір шрифту:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "РÑдок:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "ПопередженнÑ"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "Колонка:"
+msgid "Line and column numbers."
+msgstr "Ðомери Ñ€Ñдків Ñ– позицій."
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -868,8 +933,8 @@ msgstr "Видалити вибрані файли?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Вилучити"
@@ -1125,8 +1190,8 @@ msgid "Add Bus"
msgstr "Додати шину"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÑƒÐ²Ð°Ð½Ð½Ñ ÑˆÐ¸Ð½Ð¸."
+msgid "Add a new Audio Bus to this layout."
+msgstr "Додати нову аудіошину до цього компонуваннÑ."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1154,6 +1219,10 @@ msgstr "Завантажити типовий"
msgid "Load the default Bus Layout."
msgstr "Завантажити типове ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÑƒÐ²Ð°Ð½Ð½Ñ ÑˆÐ¸Ð½Ð¸."
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÑƒÐ²Ð°Ð½Ð½Ñ ÑˆÐ¸Ð½Ð¸."
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ðекоректна назва."
@@ -1301,6 +1370,33 @@ msgstr "У очікуваному каталозі не знайдено шабÐ
msgid "Packing"
msgstr "ПакуваннÑ"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"Платформа Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±ÑƒÑ” ÑтиÑÐºÐ°Ð½Ð½Ñ Ñ‚ÐµÐºÑтур «ETC» Ð´Ð»Ñ GLES2. Увімкніть "
+"пункт «Імпортувати ETC» у параметрах проекту."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"Платформа Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±ÑƒÑ” ÑтиÑÐºÐ°Ð½Ð½Ñ Ñ‚ÐµÐºÑтур «ETC2» Ð´Ð»Ñ GLES3. Увімкніть "
+"пункт «Імпортувати ETC 2» у параметрах проекту."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"Платформа Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±ÑƒÑ” ÑтиÑÐºÐ°Ð½Ð½Ñ Ñ‚ÐµÐºÑтур «ETC» Ð´Ð»Ñ GLES2.\n"
+"Увімкніть пункт «Імпортувати ETC» у параметрах проекту або вимкніть пункт «"
+"Увімкнено резервні драйвери»."
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1346,7 +1442,7 @@ msgstr "Показати у менеджері файлів"
msgid "New Folder..."
msgstr "Створити теку..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Оновити"
@@ -1421,10 +1517,30 @@ msgstr "ПереміÑтити вибране вгору"
msgid "Move Favorite Down"
msgstr "ПереміÑтити вибране вниз"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr "ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ñ‚ÐµÐºÐ°"
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr "ÐаÑтупна тека"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "Перейти до батьківÑької теки"
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr "Перемкнути Ñтан вибраноÑті Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ñ— теки."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "ПереглÑд елементів у виглÑді Ñітки еÑкізів."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "ПереглÑд елементів Ñк ÑпиÑок."
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Каталоги та файли:"
@@ -1647,9 +1763,9 @@ msgstr "ОчиÑтити вивід"
msgid "Project export failed with error code %d."
msgstr "Ðе вдалоÑÑ ÐµÐºÑпортувати проект, код помилки — %d."
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "Помилка Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ñ€ÐµÑурÑу!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr "Ðеможливо зберегти імпортовані реÑурÑи."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1657,6 +1773,18 @@ msgid "OK"
msgstr "Гаразд"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Помилка Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ñ€ÐµÑурÑу!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+"Цей реÑÑƒÑ€Ñ Ð½ÐµÐ¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ зберегти, оÑкільки він не належить до редагованої "
+"Ñцени. Спочатку, зробіть його унікальним."
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "Зберегти реÑÑƒÑ€Ñ Ñк..."
@@ -1877,6 +2005,14 @@ msgid "Save changes to '%s' before closing?"
msgstr "Зберегти зміни, внеÑені до '%s' перед закриттÑм?"
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Збережено змінених реÑурÑів: %s."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Ð”Ð»Ñ Ñ‚Ð¾Ð³Ð¾, щоб можна було зберегти Ñцену, потрібен кореневий вузол."
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Зберегти Ñцену Ñк..."
@@ -2400,8 +2536,8 @@ msgid "Save & Restart"
msgstr "Зберегти Ñ– перезапуÑтити"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "ОбертаєтьÑÑ, коли перемальовуєтьÑÑ Ð²Ñ–ÐºÐ½Ð¾ редактора!"
+msgid "Spins when the editor window redraws."
+msgstr "ОбертаєтьÑÑ, коли перемальовуєтьÑÑ Ð²Ñ–ÐºÐ½Ð¾ редактора."
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2966,14 +3102,6 @@ msgstr ""
"Ðеможливо перейти до '%s' , оÑкільки він не був знайдений в файловій ÑиÑтемі!"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "ПереглÑд елементів у виглÑді Ñітки еÑкізів."
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "ПереглÑд елементів Ñк ÑпиÑок."
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
"СтатуÑ: не вдалоÑÑ Ñ–Ð¼Ð¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ñ‚Ð¸ файл. Будь лаÑка, виправте файл та повторно "
@@ -3111,10 +3239,6 @@ msgid "Search files"
msgstr "Шукати файли"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "Додати вибрану Ñцену(и), Ñк нащадка вибраного вузла."
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3326,17 +3450,18 @@ msgstr "Переімпортувати"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "Зберегти Ñцени, повторно імпортувати Ñ– перезапуÑтити"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "Зміна відеодрайвера потребує перезапуÑку редактора."
+msgstr "Зміна типу імпортованого файла потребує перезапуÑку редактора."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
+"Увага: Ñ–Ñують об'єкти, Ñкі викориÑтовують цей реÑурÑ, — вони можуть "
+"припинити завантажуватиÑÑ Ð½Ð°Ð»ÐµÐ¶Ð½Ð¸Ð¼ чином."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3461,22 +3586,6 @@ msgid "Create Polygon"
msgstr "Створити полігон"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "Редагувати полігон"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "Ð’Ñтавити точку"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "Редагувати полігон (вилучити точку)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "Вилучити полігон та точку"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3497,6 +3606,22 @@ msgstr ""
msgid "Erase points."
msgstr "Витерти точки."
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "Редагувати полігон"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "Ð’Ñтавити точку"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Редагувати полігон (вилучити точку)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Вилучити полігон та точку"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3514,6 +3639,19 @@ msgstr "Завантажити…"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Move Node Point"
+msgstr "ПереÑунути вузлову точку"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr "Змінити Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr "Змінити мітки BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
@@ -3522,6 +3660,24 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Node Point"
+msgstr "Додати вузлову точку"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr "Додати точку анімації"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr "Вилучити точку BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr "ПереÑунути вузлову точку BlendSpace1D"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3566,6 +3722,26 @@ msgid "Triangle already exists"
msgstr "Трикутник вже Ñ–Ñнує"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Додати трикутник"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr "Змінити Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr "Змінити мітки BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr "Вилучити точку BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Вилучити трикутник BlendSpace2D"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D не належить до вузла AnimationTree."
@@ -3574,6 +3750,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr "Трикутників не Ñ–Ñнує, отже Ð·Ð»Ð¸Ñ‚Ñ‚Ñ Ð½Ðµ Ñ” можливим."
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr "Увімкнути або вимкнути автоматичні трикутники"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "Створити трикутники з'єднаннÑм точок."
@@ -3591,6 +3771,10 @@ msgid "Blend:"
msgstr "Змішувати:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Змінено параметр"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "Редагувати фільтри"
@@ -3600,6 +3784,15 @@ msgid "Output node can't be added to the blend tree."
msgstr "Вузол Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ðµ можна додавати до дерева злиттÑ."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr "Додати вузол до BlendTree"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Node Moved"
+msgstr "ПереÑунуто вузол"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
@@ -3607,6 +3800,33 @@ msgstr ""
"некоректним."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr "З’єднано вузли"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr "Роз'єднано вузли"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr "Ð’Ñтановити анімацію"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Node"
+msgstr "Вилучити вузол"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr "Увімкнути або вимкнути фільтр"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Change Filter"
+msgstr "Змінити фільтр"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
"Ðе вÑтановлено відтворювача анімації, отже неможливо отримати назви доріжок."
@@ -3627,6 +3847,11 @@ msgstr ""
"неможливо отримати назви доріжок."
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Перейменовано вузол"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "Додати вузол…"
@@ -3853,6 +4078,19 @@ msgid "Cross-Animation Blend Times"
msgstr "Ð§Ð°Ñ Ð¼Ñ–Ð¶ анімаціÑми"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "ПереÑунути вузол"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Додати перехід"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Додати вузол"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "Кінець"
@@ -3881,6 +4119,18 @@ msgid "No playback resource set at path: %s."
msgstr "Ðе вÑтановлено реÑурÑу Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñƒ шлÑху: %s."
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr "Вилучено вузол"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr "Вилучено перехід"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr "Ð’Ñтановити початковий вузол (автовідтвореннÑ)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4304,6 +4554,18 @@ msgid "Move CanvasItem"
msgstr "ПереÑунути CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "Шаблони Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð²'Ñзок та Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð»Ñ–Ð² вузла керуваннÑ."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+"Дані щодо прив'Ñзок та значень полів дочірніх об'єктів перевизначаютьÑÑ "
+"їхніми батьківÑькими об'єктами."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "Тільки прив'Ñзки"
@@ -4690,6 +4952,10 @@ msgstr "Утримуйте Shift, щоб змінити дотичні окреÐ
msgid "Bake GI Probe"
msgstr "Запекти пробу GI"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr "Змінено градієнт"
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "Елемент %d"
@@ -4946,6 +5212,10 @@ msgid "Generating Visibility Rect"
msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¾Ð±Ð»Ð°Ñті видимоÑті"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "Створити облаÑть видимоÑті"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
"ПоÑтавити точку можна тільки в процедурному матеріалі ParticlesMaterial"
@@ -4959,10 +5229,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "Ð’ зображенні немає пікÑелів з прозоріÑтю > 128..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "Створити облаÑть видимоÑті"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Завантажити маÑку випромінюваннÑ"
@@ -5050,11 +5316,11 @@ msgid "Generating AABB"
msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr "Генерувати AABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr "Генерувати AABB"
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5211,6 +5477,14 @@ msgid "Create UV Map"
msgstr "Створити UV-карту"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+"ПлоÑкий багатокутник має внутрішні вершини, отже його Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ полі "
+"переглÑду надалі не Ñ” можливим."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "Створити полігон і UV"
@@ -5829,6 +6103,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "У цього каркаÑа немає кіÑток, Ñтворіть хоч ÑкіÑÑŒ дочірні вузли Bone2D."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Створити вільну позу з кіÑток"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Створити вільну позу Ð´Ð»Ñ ÐºÑ–Ñток"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "ПлоÑкий каркаÑ"
@@ -5937,10 +6219,6 @@ msgid "Vertices"
msgstr "Вершини"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "Кадри за Ñекунду"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "ВиглÑд згори."
@@ -5985,7 +6263,7 @@ msgid "Rear"
msgstr "Ззаду"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr "ВирівнÑти з переглÑдом"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6077,6 +6355,15 @@ msgid "Freelook Speed Modifier"
msgstr "Коефіцієнт швидкоÑті оглÑду"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+"ЗауваженнÑ: показана чаÑтота кадрів Ñ” чаÑтотою кадрів у редакторі.\n"
+"Її не можна викориÑтовувати Ñк надійне джерело даних щодо чаÑтоти кадрів у "
+"грі."
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "ÐžÐ±ÐµÑ€Ñ‚Ð°Ð½Ð½Ñ Ð¿ÐµÑ€ÐµÐ³Ð»Ñду заблоковано"
@@ -6085,6 +6372,10 @@ msgid "XForm Dialog"
msgstr "Вікно XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Приліпити вузли до підлоги"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "Режим Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ (Q)"
@@ -6300,7 +6591,7 @@ msgid "Post"
msgstr "ПіÑлÑ"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr "Штука без назви"
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6366,10 +6657,6 @@ msgid "Add Empty"
msgstr "Додати порожній"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "Змінити цикл анімації"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "Змінити чаÑтоту кадрів анімації"
@@ -6378,8 +6665,12 @@ msgid "(empty)"
msgstr "(порожньо)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "Ðнімації"
+msgid "Animations:"
+msgstr "Ðнімації:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "Ðова анімаціÑ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6390,8 +6681,8 @@ msgid "Loop"
msgstr "Зациклити"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "Кадри анімації"
+msgid "Animation Frames:"
+msgstr "Кадри анімації:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6679,6 +6970,22 @@ msgid "Merge from Scene"
msgstr "Об'єднати зі Ñцени"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr "ÐаÑтупна координата"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr "Вибір наÑтупної форми, підплитки або плитки."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr "ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ ÐºÐ¾Ð¾Ñ€Ð´Ð¸Ð½Ð°Ñ‚Ð°"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr "Вибір попередньої форми, підплитки або плитки."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "Копіювати бітову маÑку."
@@ -6691,6 +6998,10 @@ msgid "Erase bitmask."
msgstr "Витерти бітову маÑку."
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new rectangle."
+msgstr "Створити прÑмокутник."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Створити новий полігон."
@@ -6832,6 +7143,14 @@ msgid "Clear Tile Bitmask"
msgstr "Спорожнити бітову маÑку плитки"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr "Зробити полігон увігнутим"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Convex"
+msgstr "Зробити полігон опуклим"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
msgstr "Вилучити плитку"
@@ -6872,6 +7191,26 @@ msgid "TileSet"
msgstr "Ðабір плиток"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr "Ð’Ñтановити однорідну назву"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr "Ð’Ñтановити типовий порт введеннÑ"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr "Додати вузол до візуального шейдера"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Дублювати вузли"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr "Змінено тип Ð²Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð²Ñ–Ð·ÑƒÐ°Ð»ÑŒÐ½Ð¾Ð³Ð¾ шейдера"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr "Вершина"
@@ -6887,6 +7226,14 @@ msgstr "Світло"
msgid "VisualShader"
msgstr "VisualShader"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr "Змінити візуальну влаÑтивіÑть"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr "Змінено режим візуального шейдерів"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "Ðктивний"
@@ -6900,9 +7247,22 @@ msgid "Delete preset '%s'?"
msgstr "Вилучити набір «%s»?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
msgstr ""
-"Ðе виÑтачає шаблонів екÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð¸ або шаблони пошкоджено:"
+"Ðе вдалоÑÑ ÐµÐºÑпортувати проект Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð¸ «%s».\n"
+"ЗдаєтьÑÑ, шаблони екÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ð¿ÑƒÑ‰ÐµÐ½Ð¾ або вони Ñ” некоректними."
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
+"Ðе вдалоÑÑ ÐµÐºÑпортувати проект Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð¸ «%s».\n"
+"Причиною може бути помилка у налаштуваннÑÑ… у наборі налаштувань Ð´Ð»Ñ "
+"екÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð°Ð±Ð¾ параметрах екÑпортуваннÑ."
#: editor/project_export.cpp
msgid "Release"
@@ -6913,6 +7273,15 @@ msgid "Exporting All"
msgstr "ЕкÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ ÑƒÑього"
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr "Вказаного шлÑху Ð´Ð»Ñ ÐµÐºÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ Ñ–Ñнує:"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+"Ðе виÑтачає шаблонів екÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð¸ або шаблони пошкоджено:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "Ðабори"
@@ -7148,11 +7517,11 @@ msgstr "Вибрати"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "Обробник:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7161,10 +7530,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"ВиÑока ÑкіÑть зображеннÑ\n"
+"ДоÑтупні уÑÑ– можливоÑті\n"
+"ÐеÑуміÑний із заÑтарілим обладнаннÑм\n"
+"Ðе рекомендовано Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð½ÐµÑ‚-ігор"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7173,10 +7546,16 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"Ðижча ÑкіÑть зображеннÑ\n"
+"ДеÑкі можливоÑті Ñ” недоÑтупними\n"
+"Працює майже вÑюди\n"
+"Рекомендовано Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ð½ÐµÑ‚-ігор"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr ""
+"Обробник можна змінити пізніше, але, можливо, виникне потреба у коригуванні "
+"Ñцен."
#: editor/project_manager.cpp
msgid "Unnamed Project"
@@ -7192,6 +7571,28 @@ msgstr "Ви Ñправді хочете відкрити декілька прÐ
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"У вказаному нижче файлі параметрів проекту не вказано верÑÑ–ÑŽ Godot, за "
+"допомогою Ñкої його було Ñтворено.\n"
+"\n"
+"%s\n"
+"\n"
+"Якщо ви продовжите процедуру його відкриттÑ, дані буде перетворено до "
+"формату файла налаштувань поточної верÑÑ–Ñ— Godot.\n"
+"ПопередженнÑ: у результаті Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð²Ð¸ втратите можливіÑть Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ "
+"проекту у заÑтарілих верÑÑ–ÑÑ… рушіÑ."
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7327,7 +7728,7 @@ msgid ""
"'\"'"
msgstr ""
"Ðекоректна назва дії. Ðазва не може бути порожньою Ñ– не може міÑтити "
-"Ñимволів «/», «:», «=», «\\» та «\"»."
+"Ñимволів «/», «:», «=», «\\» та «\"»"
#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
@@ -7907,6 +8308,8 @@ msgstr "Дублювати вузли"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
+"Ðе можна змінювати батьківÑький об'єкт вузлів в уÑпадкованих Ñценах — "
+"порÑдок вузлів не можна змінювати."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -7917,6 +8320,10 @@ msgid "Instantiated scenes can't become root"
msgstr "Сцени зі Ñтвореними екземплÑрами не можуть Ñтавати кореневими"
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr "Зробити вузол кореневим"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Вилучити вузли?"
@@ -7953,6 +8360,10 @@ msgid "Make Local"
msgstr "Зробити локальним"
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr "Ðовий корінь Ñцени"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Створити кореневий вузол:"
@@ -8381,6 +8792,18 @@ msgid "Set From Tree"
msgstr "Ð’Ñтановити з дерева"
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr "Витерти ÑкороченнÑ"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr "Відновити ÑкороченнÑ"
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr "Змінити ÑкороченнÑ"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "Клавіатурні ÑкороченнÑ"
@@ -8587,6 +9010,10 @@ msgid "GridMap Duplicate Selection"
msgstr "Ð”ÑƒÐ±Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¾Ð³Ð¾ GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "Малюнок GridMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Карта Ñітки"
@@ -8723,10 +9150,6 @@ msgid "Build Project"
msgstr "Зібрати проект"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "ПопередженнÑ"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "ПереглÑнути журнал"
@@ -8891,10 +9314,6 @@ msgid "Change Expression"
msgstr "Змінити вираз"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Додати вузол"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "Вилучити вузли VisualScript"
@@ -8979,6 +9398,10 @@ msgid "Change Input Value"
msgstr "Зміна вхідного значеннÑ"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Змінити розміри коментарÑ"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "Ðеможливо Ñкопіювати вузол функції."
@@ -9411,6 +9834,17 @@ msgstr ""
"Вузол ParallaxLayer працює, лише Ñкщо його вÑтановлено Ñк дочірній Ð´Ð»Ñ Ð²ÑƒÐ·Ð»Ð° "
"ParallaxBackground."
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"У драйвері GLES2 не передбачено підтримки чаÑток із обробкою за допомогою "
+"графічного процеÑора.\n"
+"Вам Ñлід ÑкориÑтатиÑÑ Ð²ÑƒÐ·Ð»Ð¾Ð¼ CPUParticles2D. Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ можете вибрати пункт "
+"«Перетворити на CPUParticles»."
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9569,6 +10003,14 @@ msgstr ""
"Ð”Ð»Ñ Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ‡ÐµÐ½Ð½Ñ Ð¿Ñ€Ð°Ñ†ÐµÐ·Ð´Ð°Ñ‚Ð½Ð¾Ñті CollisionShape Ñлід надати форму. Будь "
"лаÑка, Ñтворіть реÑÑƒÑ€Ñ Ñ„Ð¾Ñ€Ð¼Ð¸ Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ елемента!"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+"Форми площин не працюють Ñк Ñлід, Ñ—Ñ… буде вилучено у наÑтупних верÑÑ–ÑÑ…. Будь "
+"лаÑка, не викориÑтовуйте Ñ—Ñ…."
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "Ðічого не видно, оÑкільки не призначено Ñітки."
@@ -9585,6 +10027,14 @@ msgstr ""
msgid "Plotting Meshes"
msgstr "Побудова Ñітки"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+"У драйвері GLES2 не передбачено підтримки GIProbes.\n"
+"СкориÑтайтеÑÑ Ð·Ð°Ð¼Ñ–Ñть них BakedLightmap."
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9601,6 +10051,17 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"У драйвері GLES2 не передбачено підтримки чаÑток із обробкою за допомогою "
+"графічного процеÑора.\n"
+"Вам Ñлід ÑкориÑтатиÑÑ Ð²ÑƒÐ·Ð»Ð¾Ð¼ CPUParticles. Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ можете вибрати пункт "
+"«Перетворити на CPUParticles»."
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
"Ðічого не видно, оÑкільки Ñітки не було пов'Ñзано із проходами малюваннÑ."
@@ -9641,26 +10102,6 @@ msgstr ""
"Щоб уÑе працювало Ñк Ñлід, влаÑтивіÑть шлÑху (path) має вказувати на "
"коректний вузол Spatial."
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment потребує реÑурÑу Environment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-"У Ñцені (або наборі екземплÑрів Ñцен) може бути лише один елемент "
-"WorldEnvironment."
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"Цей Ð·Ð°Ð¿Ð¸Ñ WorldEnvironment проігноровано. Ðбо додайте Ð·Ð°Ð¿Ð¸Ñ Camera (Ð´Ð»Ñ "
-"проÑторових Ñцен) або вÑтановіть Ð´Ð»Ñ Background Mode цього Ñередовища "
-"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Canvas (Ð´Ð»Ñ Ð´Ð²Ð¾Ð²Ð¸Ð¼Ñ–Ñ€Ð½Ð¸Ñ… Ñцен)."
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "Це тіло буде проігноровано, аж доки ви не вÑтановите Ñітку"
@@ -9690,6 +10131,26 @@ msgstr ""
"VehicleWheel Ñлугує Ð´Ð»Ñ Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ‡ÐµÐ½Ð½Ñ Ñ€Ð¾Ð±Ð¾Ñ‚Ð¸ ÑиÑтеми ÐºÐ¾Ð»Ñ–Ñ Ñƒ VehicleBody. "
"Будь лаÑка, викориÑтовуйте цей елемент Ñк дочірній елемент вузла VehicleBody."
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment потребує реÑурÑу Environment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+"У Ñцені (або наборі екземплÑрів Ñцен) може бути лише один елемент "
+"WorldEnvironment."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"Цей Ð·Ð°Ð¿Ð¸Ñ WorldEnvironment проігноровано. Ðбо додайте Ð·Ð°Ð¿Ð¸Ñ Camera (Ð´Ð»Ñ "
+"проÑторових Ñцен) або вÑтановіть Ð´Ð»Ñ Background Mode цього Ñередовища "
+"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Canvas (Ð´Ð»Ñ Ð´Ð²Ð¾Ð²Ð¸Ð¼Ñ–Ñ€Ð½Ð¸Ñ… Ñцен)."
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "У вузлі BlendTree «%s» не знайдено анімації: «%s»"
@@ -9733,12 +10194,32 @@ msgstr ""
"Цей вузол вважаєтьÑÑ Ð·Ð°Ñтарілим. СкориÑтайтеÑÑ Ð·Ð°Ð¼Ñ–Ñть нього AnimationTree."
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "Вибрати колір з екрана."
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Raw (Ñирий) режим"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "Додати поточний колір в ÑкоÑті преÑету"
+msgid "Switch between hexadecimal and code values."
+msgstr "ÐŸÐµÑ€ÐµÐ¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð¼Ñ–Ð¶ шіÑтнадцÑтковими значеннÑми Ñ– кодами."
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "Додати поточний колір Ñк шаблон."
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+"Сам контейнер не має призначеннÑ, Ñкщо Ñкрипт не налаштовує поведінку щодо "
+"Ñ€Ð¾Ð·Ñ‚Ð°ÑˆÑƒÐ²Ð°Ð½Ð½Ñ Ð¹Ð¾Ð³Ð¾ дочірніх об'єктів.\n"
+"Якщо ви не маєте наміру додавати Ñкрипт, будь лаÑка, ÑкориÑтайтеÑÑ Ð·Ð°Ð¼Ñ–Ñть "
+"контейнера звичайним вузлом «Control»."
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9748,6 +10229,10 @@ msgstr "Увага!"
msgid "Please Confirm..."
msgstr "Будь лаÑка, підтвердьте..."
+#: scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "Перейти до батьківÑької теки."
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9833,6 +10318,24 @@ msgstr "ÐŸÑ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¾Ð´Ð½Ð¾Ñ€Ñ–Ð´Ð½Ð¾Ð³Ð¾."
msgid "Varyings can only be assigned in vertex function."
msgstr "Змінні величини можна пов'Ñзувати лише із функцією вузлів."
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "Додати вибрану Ñцену(и), Ñк нащадка вибраного вузла."
+
+#~ msgid "FPS"
+#~ msgstr "Кадри за Ñекунду"
+
+#~ msgid "Warnings:"
+#~ msgstr "ПопередженнÑ:"
+
+#~ msgid "Font Size:"
+#~ msgstr "Розмір шрифту:"
+
+#~ msgid "Line:"
+#~ msgstr "РÑдок:"
+
+#~ msgid "Col:"
+#~ msgstr "Колонка:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr "OrientedPathFollow працюватиме лише Ñк дочірній елемент вузла Path."
@@ -9986,9 +10489,6 @@ msgstr "Змінні величини можна пов'Ñзувати лише
#~ msgid "Convert To Lowercase"
#~ msgstr "Конвертувати в нижній регіÑтр"
-#~ msgid "Snap To Floor"
-#~ msgstr "Приліпити до підлоги"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "ÐžÐ±ÐµÑ€Ñ‚Ð°Ð½Ð½Ñ Ð½Ð° 0 градуÑів"
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index e0d4e7628b..b2eec50780 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -87,6 +87,15 @@ msgstr ""
msgid "Delete Selected Key(s)"
msgstr ""
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr ".تمام کا انتخاب"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr ""
@@ -116,6 +125,15 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -165,6 +183,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -190,6 +212,10 @@ msgid "Time (s): "
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr ""
@@ -241,6 +267,18 @@ msgid "Delete Key(s)"
msgstr ".اینیمیشن کی کیز کو ڈیلیٹ کرو"
#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr ""
@@ -282,6 +320,14 @@ msgid "Anim Insert Key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Rearrange Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -306,6 +352,10 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -314,10 +364,22 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -330,6 +392,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -372,10 +438,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr ""
@@ -476,6 +538,18 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -540,20 +614,12 @@ msgstr ""
msgid "Reset Zoom"
msgstr ""
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr ""
-
-#: editor/code_editor.cpp
-msgid "Line:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Col:"
+msgid "Line and column numbers."
msgstr ""
#: editor/connections_dialog.cpp
@@ -849,8 +915,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr ""
@@ -1105,7 +1171,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1135,6 +1201,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1279,6 +1349,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1325,7 +1415,7 @@ msgstr ""
msgid "New Folder..."
msgstr ""
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr ""
@@ -1402,10 +1492,30 @@ msgstr "Ù¾Ø³Ù†Ø¯ÛŒØ¯Û Ø§ÙˆÙ¾Ø± منتقل کریں"
msgid "Move Favorite Down"
msgstr "Ù¾Ø³Ù†Ø¯ÛŒØ¯Û Ù†ÛŒÚ†Û’ منتقل کریں"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+msgid "Previous Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Next Folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr ""
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr ""
@@ -1629,8 +1739,8 @@ msgstr "سب سکریپشن بنائیں"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1639,6 +1749,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1830,6 +1950,14 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr ""
@@ -2319,7 +2447,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2873,14 +3001,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3018,10 +3138,6 @@ msgid "Search files"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3367,24 +3483,6 @@ msgid "Create Polygon"
msgstr "سب سکریپشن بنائیں"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "سب سکریپشن بنائیں"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr ".تمام کا انتخاب"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3404,6 +3502,24 @@ msgstr ""
msgid "Erase points."
msgstr ".تمام کا انتخاب"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "سب سکریپشن بنائیں"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr ".تمام کا انتخاب"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3421,12 +3537,46 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Animation Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3466,6 +3616,27 @@ msgid "Triangle already exists"
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3474,6 +3645,10 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Toggle Auto Triangles"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3491,6 +3666,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3500,11 +3679,50 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "ایکشن منتقل کریں"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Connected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Nodes Disconnected"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Set Animation"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr ".اینیمیشن کی کیز کو ڈیلیٹ کرو"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Toggle Filter On/Off"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr ".Ù†ÙˆÙ¹ÙØ¦Ø± Ú©Û’ اکسٹنٹ Ú©Ùˆ تبدیل کیجیۓ"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3520,6 +3738,11 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3747,6 +3970,20 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "ایکشن منتقل کریں"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3776,6 +4013,18 @@ msgid "No playback resource set at path: %s."
msgstr ".ÛŒÛ Ø±ÛŒØ³ÙˆØ±Ø³ ÙØ§Ø¦Ù„ پر مبنی Ù†ÛÛŒ ÛÛ’"
#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition Removed"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4194,6 +4443,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4578,6 +4837,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4834,19 +5097,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -4937,11 +5200,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5101,6 +5364,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5726,6 +5995,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5835,10 +6112,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5883,8 +6156,9 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
-msgstr ""
+#, fuzzy
+msgid "Align with View"
+msgstr ".تمام کا انتخاب"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
@@ -5975,6 +6249,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -5983,6 +6263,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6198,7 +6482,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6263,19 +6547,19 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
+msgid "Change Animation FPS"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation FPS"
+msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "(empty)"
+msgid "Animations:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
+msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6287,7 +6571,7 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
+msgid "Animation Frames:"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -6584,6 +6868,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "سب سکریپشن بنائیں"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Previous Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6598,6 +6899,11 @@ msgstr ".تمام کا انتخاب"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "سب سکریپشن بنائیں"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "سب سکریپشن بنائیں"
@@ -6729,6 +7035,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "سب سکریپشن بنائیں"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr ".تمام کا انتخاب"
@@ -6774,6 +7089,26 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6789,6 +7124,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6802,7 +7145,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6814,6 +7166,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7091,6 +7451,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7785,6 +8158,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -7819,6 +8196,10 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Create Root Node:"
msgstr "سب سکریپشن بنائیں"
@@ -8241,6 +8622,19 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr ".تمام کا انتخاب"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8451,6 +8845,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8590,10 +8988,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8753,10 +9147,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8838,6 +9228,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9225,6 +9619,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9354,6 +9755,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9368,6 +9775,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9380,6 +9793,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9410,21 +9830,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9448,6 +9853,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9489,11 +9909,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9504,6 +9940,11 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "سب سکریپشن بنائیں"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index ad0feaa6a1..1bbec938f2 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -8,12 +8,13 @@
# Nguyễn Tuấn Anh <anhnt.fami@gmail.com>, 2017.
# Tung Le <tungkradle@gmail.com>, 2017.
# 38569459 <xxx38569459@gmail.com>, 2018.
+# TyTYct Hihi <tytyct@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:44+0100\n"
-"Last-Translator: 01lifeleft <01lifeleft@gmail.com>\n"
+"PO-Revision-Date: 2019-03-01 11:59+0000\n"
+"Last-Translator: TyTYct Hihi <tytyct@gmail.com>\n"
"Language-Team: Vietnamese <https://hosted.weblate.org/projects/godot-engine/"
"godot/vi/>\n"
"Language: vi\n"
@@ -21,7 +22,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -89,6 +90,15 @@ msgstr "Nhân đôi lá»±a chá»n"
msgid "Delete Selected Key(s)"
msgstr "Xoá Key(s) được chá»n"
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "Di chuyển đến..."
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "Nhân đôi Các Key của Animation"
@@ -118,6 +128,16 @@ msgid "Anim Change Call"
msgstr "Äổi Function Gá»i Animation"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "Äổi vòng lặp Anim"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -171,6 +191,11 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "Äổi giá trị Array"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -197,6 +222,10 @@ msgid "Time (s): "
msgstr "Bước (s):"
#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "Liên tục"
@@ -250,6 +279,21 @@ msgid "Delete Key(s)"
msgstr "Xóa phím Anim"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "Äổi độ dài Anim"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "Äổi độ dài Anim"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "Äổi vòng lặp Anim"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "Xóa Anim Track"
@@ -291,6 +335,16 @@ msgid "Anim Insert Key"
msgstr "Chèn Key Anim"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "Äổi vòng lặp Anim"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "Sắp xếp lại Autoloads"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -315,6 +369,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "Thêm Track Animation"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -323,10 +382,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "Chèn Track & Key Anim"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "Thêm Track Animation"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "Chèn Track & Key Anim"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -339,6 +413,10 @@ msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Anim Scale Keys"
msgstr "Anim Scale Keys"
@@ -385,10 +463,6 @@ msgid "Copy Tracks"
msgstr ""
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr ""
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "Chá»n Scale"
@@ -492,6 +566,19 @@ msgstr ""
msgid "Copy"
msgstr "Copy"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "Thêm Track Animation"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "Äổi lại size Array"
@@ -557,23 +644,14 @@ msgstr "Thu nhá»"
msgid "Reset Zoom"
msgstr "Äặt lại phóng"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "Dòng:"
-
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Col:"
-msgstr "Col:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "Cách thức trong Node được chá»n phải được ghi rõ!"
@@ -876,8 +954,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "Xóa"
@@ -1129,7 +1207,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1158,6 +1236,10 @@ msgstr ""
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr ""
@@ -1301,6 +1383,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1349,7 +1451,7 @@ msgstr "Hiển thị trong Trình quản lí file"
msgid "New Folder..."
msgstr "Folder Má»›i..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "Làm mới"
@@ -1426,11 +1528,34 @@ msgstr "Di chuyển Ưa thích lên"
msgid "Move Favorite Down"
msgstr "Di chuyển Ưa thích xuống"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "Thư mục trước"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "Tạo Folder"
+
+#: editor/editor_file_dialog.cpp
#, fuzzy
msgid "Go to parent folder"
msgstr "Äến folder parent"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "Không thể tạo folder."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "Những địa chỉ & File:"
@@ -1660,8 +1785,8 @@ msgstr ""
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
@@ -1670,6 +1795,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr ""
@@ -1861,6 +1996,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "Lưu thay đổi vào '%s' trước khi đóng?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "Lưu animation này"
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Lưu Scene với tên..."
@@ -2301,12 +2445,10 @@ msgid "Issue Tracker"
msgstr ""
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Community"
msgstr "Cộng đồng"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About"
msgstr "Thông tin"
@@ -2360,7 +2502,7 @@ msgid "Save & Restart"
msgstr ""
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -2911,14 +3053,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3061,10 +3195,6 @@ msgid "Search files"
msgstr "Tìm kiếm:"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3428,23 +3558,6 @@ msgid "Create Polygon"
msgstr "Tạo"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "Tạo"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3463,6 +3576,23 @@ msgstr ""
msgid "Erase points."
msgstr ""
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "Tạo"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr ""
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3480,12 +3610,48 @@ msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "Di chuyển đến..."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "Äổi Thá»i gian Chuyển Animation"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "Äổi Thá»i gian Chuyển Animation"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "Di chuyển đến..."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "Thêm Animation"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Remove BlendSpace1D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3527,6 +3693,30 @@ msgid "Triangle already exists"
msgstr "LỖI: Tên animation trùng lặp!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "Thêm Biến"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "Äổi Thá»i gian Chuyển Animation"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "Äổi Thá»i gian Chuyển Animation"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "Xoá Variable"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3535,6 +3725,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "Bật tắt Ưa thích"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3552,6 +3747,10 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr ""
@@ -3561,11 +3760,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "Äổi tên"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "Äứt kết nối"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "Äứt kết nối"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "Tạo Animation mới"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "Xóa Node(s)"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "Bật tắt Ưa thích"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "Äổi"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3581,6 +3823,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "Äổi tên"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3814,6 +4062,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "Di chuyển Node(s)"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "Chuyển tiếp: "
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3842,6 +4105,20 @@ msgid "No playback resource set at path: %s."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "Xóa"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "Chuyển tiếp: "
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4263,6 +4540,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4645,6 +4932,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4901,19 +5192,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5004,11 +5295,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5165,6 +5456,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5801,6 +6098,15 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "Tạo từ Scene"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -5910,10 +6216,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -5958,7 +6260,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6050,6 +6352,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6058,6 +6366,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr ""
@@ -6270,7 +6582,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6335,10 +6647,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6347,8 +6655,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "Các Công cụ Animation"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "Tạo Animation mới"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6359,8 +6673,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "Tên Animation:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6654,6 +6969,23 @@ msgid "Merge from Scene"
msgstr "Gộp từ Scene"
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "Thư mục trước"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6668,6 +7000,11 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "Tạo nodes mới."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "Tạo"
@@ -6800,6 +7137,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "Tạo"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "Xóa Template"
@@ -6845,6 +7191,27 @@ msgid "TileSet"
msgstr "Xuất Tile Set"
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "Nhân đôi Node(s)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6860,6 +7227,14 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Edit Visual Property"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6873,7 +7248,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -6885,6 +7269,14 @@ msgid "Exporting All"
msgstr ""
#: editor/project_export.cpp
+msgid "The given export path doesn't exist:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7165,6 +7557,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7496,7 +7901,6 @@ msgid "Project Settings (project.godot)"
msgstr ""
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
-#, fuzzy
msgid "General"
msgstr "Tổng quan"
@@ -7865,6 +8269,10 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+msgid "Make node as Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr "Xóa Node(s)?"
@@ -7899,6 +8307,11 @@ msgid "Make Local"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "New Scene Root"
+msgstr "Tạo Scene Mới"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "Tạo Root Node:"
@@ -8313,6 +8726,18 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+msgid "Erase Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8521,6 +8946,10 @@ msgid "GridMap Duplicate Selection"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8658,10 +9087,6 @@ msgid "Build Project"
msgstr ""
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr ""
@@ -8820,10 +9245,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -8906,6 +9327,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9295,6 +9720,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9424,6 +9856,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9438,6 +9876,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9450,6 +9894,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9480,21 +9931,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9518,6 +9954,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9560,11 +10011,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9575,6 +10042,11 @@ msgstr "Cảnh báo!"
msgid "Please Confirm..."
msgstr "Xin hãy xác nhận..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "Äến folder parent"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9650,6 +10122,13 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "Dòng:"
+
+#, fuzzy
+#~ msgid "Col:"
+#~ msgstr "Col:"
+
#, fuzzy
#~ msgid "Remove Split"
#~ msgstr "Bá» lá»±a chá»n"
@@ -9743,9 +10222,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "Ngoài-Trong"
-#~ msgid "Change Anim Loop"
-#~ msgstr "Äổi vòng lặp Anim"
-
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "Tạo Key để nhập giá trị Anim"
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index 6071ac66c8..0a074c24e5 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -34,18 +34,19 @@
# 刘庆文 <liuqingwen@163.com>, 2018.
# Haowen Liu <liu.haowen.andy@gmail.com>, 2018.
# tangdou1 <1093505442@qq.com>, 2018.
-# yzt <834950797@qq.com>, 2018.
+# yzt <834950797@qq.com>, 2018, 2019.
# DKLost <514dklost@gmail.com>, 2018.
# thanksshu <hezihanshangyuan@gmail.com>, 2018.
# Jsheng <yangea@outlook.com>, 2019.
# Zhang Zhibo <zzhibo98@gmail.com>, 2019.
# ws00010203 <ws00010203@hotmail.com>, 2019.
+# Song DongHui <14729626293@163.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2019-01-26 21:22+0000\n"
-"Last-Translator: ws00010203 <ws00010203@hotmail.com>\n"
+"PO-Revision-Date: 2019-02-21 21:17+0000\n"
+"Last-Translator: yzt <834950797@qq.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -119,6 +120,16 @@ msgstr "å¤åˆ¶å·²é€‰å¸§"
msgid "Delete Selected Key(s)"
msgstr "删除已选帧"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "添加顶点"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "移动点"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "å¤åˆ¶å…³é”®å¸§"
@@ -148,6 +159,16 @@ msgid "Anim Change Call"
msgstr "修改回调"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "修改循环"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "修改循环"
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr "属性轨é“"
@@ -197,6 +218,11 @@ msgid "Anim Clips:"
msgstr "动画剪辑:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "修改数组值"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr "切æ¢å½“å‰è½¨é“开关。"
@@ -221,6 +247,11 @@ msgid "Time (s): "
msgstr "时间(秒): "
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "å¯ç”¨å¤šæ™®å‹’效应"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "连续"
@@ -271,6 +302,21 @@ msgid "Delete Key(s)"
msgstr "删除帧"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "é‡å‘½å动画:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "æ’值模å¼"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "修改循环"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "移除轨é“"
@@ -312,6 +358,16 @@ msgid "Anim Insert Key"
msgstr "æ’入关键帧"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "修改FPS"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "釿ޒåºAutoload"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr "å˜æ¢è½¨è¿¹ä»…适用于基于空间的节点。"
@@ -340,6 +396,11 @@ msgid "Not possible to add a new track without a root"
msgstr "无法在没有root的情况下添加新轨é“"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "添加轨é“"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr "轨é“路径无效,因此无法添加键。"
@@ -348,10 +409,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr "Track䏿˜¯Spatial类型,ä¸èƒ½ä½œä¸ºé”®å€¼æ’å…¥"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "3Då˜æ¢è½¨é“"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "添加轨é“"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr "跟踪路径无效,所以ä¸èƒ½æ·»åŠ æ–¹æ³•å¸§ã€‚"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "调用方法轨é“"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr "方法未找到: "
@@ -364,6 +440,10 @@ msgid "Clipboard is empty"
msgstr "å‰ªè´´æ¿æ˜¯ç©ºçš„"
#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "粘贴轨é“"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr "缩放关键帧"
@@ -406,10 +486,6 @@ msgid "Copy Tracks"
msgstr "å¤åˆ¶è½¨é“"
#: editor/animation_track_editor.cpp
-msgid "Paste Tracks"
-msgstr "粘贴轨é“"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "缩放选中项"
@@ -509,6 +585,19 @@ msgstr "选择è¦å¤åˆ¶çš„轨é“:"
msgid "Copy"
msgstr "å¤åˆ¶"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "音频剪辑:"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "修改数组大å°"
@@ -573,21 +662,13 @@ msgstr "缩å°"
msgid "Reset Zoom"
msgstr "é‡ç½®ç¼©æ”¾"
-#: editor/code_editor.cpp
-msgid "Warnings:"
-msgstr "警告:"
-
-#: editor/code_editor.cpp
-msgid "Font Size:"
-msgstr "字体大å°:"
-
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "行:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
+msgstr "警告"
#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "列:"
+msgid "Line and column numbers."
+msgstr "行å·å’Œåˆ—å·ã€‚"
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
@@ -880,8 +961,8 @@ msgstr "删除选中的文件?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "删除"
@@ -1135,8 +1216,8 @@ msgid "Add Bus"
msgstr "添加Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "创建一个新的总线布局。"
+msgid "Add a new Audio Bus to this layout."
+msgstr "将新的音频总线添加到此布局。"
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1164,6 +1245,10 @@ msgstr "加载默认"
msgid "Load the default Bus Layout."
msgstr "加载默认总线布局。"
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "创建一个新的总线布局。"
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "åç§°éžæ³•:。"
@@ -1307,6 +1392,26 @@ msgstr "目标路径找ä¸åˆ°å¯¼å‡ºæ¨¡ç‰ˆï¼š"
msgid "Packing"
msgstr "打包中"
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1352,7 +1457,7 @@ msgstr "在文件管ç†å™¨ä¸­æ˜¾ç¤º"
msgid "New Folder..."
msgstr "新建文件夹 ..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "刷新"
@@ -1427,10 +1532,33 @@ msgstr "å‘上移动收è—"
msgid "Move Favorite Down"
msgstr "å‘下移动收è—"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "上一个层"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "下一层"
+
+#: editor/editor_file_dialog.cpp
msgid "Go to parent folder"
msgstr "转到上层文件夹"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "无法创建目录。"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "ä»¥ç½‘æ ¼ç¼©ç•¥å›¾å½¢å¼æŸ¥çœ‹æ‰€æœ‰é¡¹ã€‚"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "ä»¥åˆ—è¡¨çš„å½¢å¼æŸ¥çœ‹æ‰€æœ‰é¡¹ã€‚"
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "目录|文件:"
@@ -1652,9 +1780,10 @@ msgstr "清空输出"
msgid "Project export failed with error code %d."
msgstr "é¡¹ç›®å¯¼å‡ºå¤±è´¥ï¼Œé”™è¯¯ä»£ç  %d。"
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "ä¿å­˜èµ„æºå‡ºé”™ï¼"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Imported resources can't be saved."
+msgstr "已导入的资æº"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1662,6 +1791,16 @@ msgid "OK"
msgstr "好的"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "ä¿å­˜èµ„æºå‡ºé”™ï¼"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "资æºå¦å­˜ä¸º..."
@@ -1871,6 +2010,16 @@ msgid "Save changes to '%s' before closing?"
msgstr "在关闭å‰ä¿å­˜æ›´æ”¹åˆ° %s å—?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "加载资æºå¤±è´¥ã€‚"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "A root node is required to save the scene."
+msgstr "大图导入仅支æŒä¸€ä¸ªè¾“入文件。"
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "场景å¦å­˜ä¸º..."
@@ -2370,8 +2519,8 @@ msgid "Save & Restart"
msgstr "ä¿å­˜å¹¶é‡å¯"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr "æ—‹è½¬æ—¶ï¼Œé‡æ–°ç»˜åˆ¶ç¼–辑器窗å£ï¼"
+msgid "Spins when the editor window redraws."
+msgstr "编辑器窗å£é‡ç»˜æ—¶æ—‹è½¬ã€‚"
#: editor/editor_node.cpp
msgid "Update Always"
@@ -2924,14 +3073,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr "因为文件系统没找到文件,ä¸èƒ½å®šä½åˆ°'%s'ï¼"
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr "ä»¥ç½‘æ ¼ç¼©ç•¥å›¾å½¢å¼æŸ¥çœ‹æ‰€æœ‰é¡¹ã€‚"
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr "ä»¥åˆ—è¡¨çš„å½¢å¼æŸ¥çœ‹æ‰€æœ‰é¡¹ã€‚"
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr "状æ€: å¯¼å…¥æ–‡ä»¶å¤±è´¥ã€‚è¯·æ‰‹åŠ¨ä¿®å¤æ–‡ä»¶åŽé‡æ–°å¯¼å…¥ã€‚"
@@ -3067,10 +3208,6 @@ msgid "Search files"
msgstr "æœç´¢æ–‡ä»¶"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr "将选中的场景实例为选中节点的å­èŠ‚ç‚¹ã€‚"
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3282,17 +3419,16 @@ msgstr "釿–°å¯¼å…¥"
#: editor/import_dock.cpp
msgid "Save scenes, re-import and restart"
-msgstr ""
+msgstr "ä¿å­˜åœºæ™¯ï¼Œé‡æ–°å¯¼å…¥ï¼Œä»Žå¤´å¼€å§‹"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Changing the type of an imported file requires editor restart."
-msgstr "改å˜è§†é¢‘驱动需è¦é‡å¯ç¼–辑器。"
+msgstr "改å˜è¿™ä¸ªå¯¼å…¥çš„æ–‡ä»¶ç±»åž‹åŽéœ€è¦é‡å¯ç¼–辑器。"
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
-msgstr ""
+msgstr "警告:资æºä½¿ç”¨å†²çªï¼Œå°†ä¼šåœæ­¢åŠ è½½ã€‚"
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -3417,22 +3553,6 @@ msgid "Create Polygon"
msgstr "创建多边形"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon"
-msgstr "编辑多边形"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr "æ’入点"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr "编辑多边形(移除顶点)"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Remove Polygon And Point"
-msgstr "移除多边形åŠé¡¶ç‚¹"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create points."
@@ -3453,6 +3573,22 @@ msgstr ""
msgid "Erase points."
msgstr "擦除点。"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon"
+msgstr "编辑多边形"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr "æ’入点"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "编辑多边形(移除顶点)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "移除多边形åŠé¡¶ç‚¹"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3470,12 +3606,49 @@ msgstr "加载..."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "移动点"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Limits"
+msgstr "æ›´æ”¹æ··åˆæ—¶é—´"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace1D Labels"
+msgstr "æ›´æ”¹æ··åˆæ—¶é—´"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr "此类型的节点ä¸èƒ½è¢«ä½¿ç”¨ã€‚ä»…å…许使用根节点。"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "添加节点"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "添加动画"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "移除路径顶点"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3517,6 +3690,31 @@ msgid "Triangle already exists"
msgstr "三角形已ç»å­˜åœ¨"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "添加å˜é‡"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Limits"
+msgstr "æ›´æ”¹æ··åˆæ—¶é—´"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Change BlendSpace2D Labels"
+msgstr "æ›´æ”¹æ··åˆæ—¶é—´"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "移除路径顶点"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Triangle"
+msgstr "删除å˜é‡"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr "BlendSpace2D ä¸å±žäºŽä»»ä½• AnimationTree 节点。"
@@ -3525,6 +3723,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr "ä¸å­˜åœ¨ä»»ä½•三角形,因此ä¸ä¼šæœ‰ä»»ä½•混效果åˆäº§ç”Ÿã€‚"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "切æ¢å…¨å±€AutoLoad"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr "通过连接点创建三角形。"
@@ -3542,6 +3745,11 @@ msgid "Blend:"
msgstr "æ··åˆ:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "æè´¨å˜æ›´"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Edit Filters"
msgstr "编辑筛选器"
@@ -3551,11 +3759,55 @@ msgid "Output node can't be added to the blend tree."
msgstr "输出节点ä¸èƒ½è¢«æ·»åŠ åˆ°æ··åˆæ ‘。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "从树中添加节点"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "移动模å¼"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr "无法连接,端å£å¯èƒ½è¢«å ç”¨æˆ–者连接无效。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "已连接"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "已断开"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "新建动画"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "删除节点"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "切æ¢å½“å‰è½¨é“开关。"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "修改区域设置筛选模å¼"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr "没有设置动画播放器,因此无法获å–轨é“å称。"
@@ -3571,6 +3823,12 @@ msgid ""
msgstr "åŠ¨ç”»æ’­æ”¾å™¨æ²¡æœ‰åˆæ³•的根节点路径,因此无法获å–轨é“å称。"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "节点åç§°"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr "添加节点.."
@@ -3796,6 +4054,21 @@ msgid "Cross-Animation Blend Times"
msgstr "跨动画时间混åˆ"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "移动模å¼"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "添加语言"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "添加节点"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr "终点"
@@ -3824,6 +4097,20 @@ msgid "No playback resource set at path: %s."
msgstr "在路径: %s 下没有任何播放资æºã€‚"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "已移除:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "过渡节点"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4241,6 +4528,16 @@ msgid "Move CanvasItem"
msgstr "移动 CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr "控件节点的定ä½ç‚¹å’Œè¾¹è·å€¼çš„预设。"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr "容器的å­çº§çš„锚点和边è·å€¼è¢«å…¶çˆ¶å®¹å™¨é‡å†™ã€‚"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr "仅锚点"
@@ -4620,6 +4917,10 @@ msgstr "æŒ‰ä½ Shift å¯å•独编辑切线"
msgid "Bake GI Probe"
msgstr "渲染GI Probe"
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr "第%d项"
@@ -4876,6 +5177,10 @@ msgid "Generating Visibility Rect"
msgstr "生æˆå¯è§†åŒ–区域"
#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr "生æˆå¯è§†åŒ–区域"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr "å¯ä»¥è®¾ç½®ParticlesMaterial 点的æè´¨"
@@ -4888,10 +5193,6 @@ msgid "No pixels with transparency > 128 in image..."
msgstr "å›¾ç‰‡ä¸­æ²¡æœ‰é€æ˜Žåº¦> 128çš„åƒç´ ..."
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
-msgstr "生æˆå¯è§†åŒ–区域"
-
-#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "加载Emission Mask(å‘å°„å±è”½ï¼‰"
@@ -4902,7 +5203,7 @@ msgstr "清除Emission Mask(å‘å°„å±è”½ï¼‰"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Convert to CPUParticles"
-msgstr "转æ¢ä¸º CPU ç²’å­"
+msgstr "转æ¢ä¸º CPUç²’å­"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -4979,13 +5280,13 @@ msgid "Generating AABB"
msgstr "正在生æˆAABB"
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
-msgstr "生æˆAABB"
-
-#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate Visibility AABB"
msgstr "生æˆå¯è§çš„AABB"
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr "生æˆAABB"
+
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "从曲线中移除顶点"
@@ -5138,6 +5439,12 @@ msgid "Create UV Map"
msgstr "创建UV贴图"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr "多边形2d 具有内部顶点, å› æ­¤ä¸èƒ½å†åœ¨è§†å£ä¸­å¯¹å…¶è¿›è¡Œç¼–辑。"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr "创建多边形和 UV"
@@ -5146,12 +5453,10 @@ msgid "Create Internal Vertex"
msgstr "创建内部顶点"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Internal Vertex"
msgstr "移除曲线内控制点"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Invalid Polygon (need 3 different vertices)"
msgstr "无效的多边形(需è¦ä¸‰ä¸ªæŽ§åˆ¶ç‚¹ï¼‰"
@@ -5160,9 +5465,8 @@ msgid "Add Custom Polygon"
msgstr "添加自定义多边形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Polygon"
-msgstr "移除多边形åŠé¡¶ç‚¹"
+msgstr "删除自定义多边形"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
@@ -5189,14 +5493,12 @@ msgid "UV"
msgstr "UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Points"
msgstr "点"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Polygons"
-msgstr "多边形->UV"
+msgstr "多边形-"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Bones"
@@ -5245,7 +5547,6 @@ msgid "Paint weights with specified intensity."
msgstr "使用指定的强度进行æƒé‡ç»˜åˆ¶ã€‚"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Unpaint weights with specified intensity."
msgstr "使用指定强度清除æƒé‡ç»˜åˆ¶ã€‚"
@@ -5759,6 +6060,16 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr "该骨架没有骨骼绑定,请创建一些 Bone2D 骨骼å­èŠ‚ç‚¹ã€‚"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "制作放æ¾å§¿åŠ¿ï¼ˆä»Žéª¨éª¼ï¼‰"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Set Rest Pose to Bones"
+msgstr "制作放æ¾å§¿åŠ¿ï¼ˆä»Žéª¨éª¼ï¼‰"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr "2D 骨骼节点"
@@ -5867,10 +6178,6 @@ msgid "Vertices"
msgstr "顶点"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr "帧数"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr "俯视图(Top View)。"
@@ -5915,7 +6222,8 @@ msgid "Rear"
msgstr "åŽæ–¹"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+#, fuzzy
+msgid "Align with View"
msgstr "与视图对é½"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6007,6 +6315,12 @@ msgid "Freelook Speed Modifier"
msgstr "自由视图速度调整"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr "é”定视角旋转"
@@ -6015,6 +6329,11 @@ msgid "XForm Dialog"
msgstr "XFormå¯¹è¯æ¡†"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Snap Nodes To Floor"
+msgstr "å¸é™„到地é¢"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Select Mode (Q)"
msgstr "é€‰æ‹©æ¨¡å¼ (Q)"
@@ -6230,8 +6549,8 @@ msgid "Post"
msgstr "å‘布(Post)"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
-msgstr ""
+msgid "Nameless gizmo"
+msgstr "未命åçš„Gizmo"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite is empty!"
@@ -6294,10 +6613,6 @@ msgid "Add Empty"
msgstr "添加空白帧"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr "修改循环"
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr "修改FPS"
@@ -6306,8 +6621,12 @@ msgid "(empty)"
msgstr "(空)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr "动画"
+msgid "Animations:"
+msgstr "动画:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr "新建动画"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6318,8 +6637,8 @@ msgid "Loop"
msgstr "循环"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr "动画帧"
+msgid "Animation Frames:"
+msgstr "动画帧:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6346,9 +6665,8 @@ msgid "Set Region Rect"
msgstr "设置纹ç†åŒºåŸŸ"
#: editor/plugins/texture_region_editor_plugin.cpp
-#, fuzzy
msgid "Set Margin"
-msgstr "设置处ç†ç¨‹åº"
+msgstr "设置边è·"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
@@ -6592,14 +6910,12 @@ msgid "Clear transform"
msgstr "æ¸…é™¤å˜æ¢"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Add Texture(s) to TileSet."
-msgstr "添加纹ç†åˆ°ç£è´´é›†"
+msgstr "添加纹ç†åˆ°ç£è´´é›†ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected Texture from TileSet."
-msgstr "从ç£è´´é›†ä¸­åˆ é™¤å½“å‰çº¹ç†"
+msgstr "从ç£è´´é›†ä¸­åˆ é™¤å½“å‰çº¹ç†ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from Scene"
@@ -6610,6 +6926,24 @@ msgid "Merge from Scene"
msgstr "从场景中åˆå¹¶"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "下一层"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "上一个层"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr "å¤åˆ¶ä½æŽ©ç ã€‚"
@@ -6622,6 +6956,11 @@ msgid "Erase bitmask."
msgstr "æ“¦é™¤ä½æŽ©ç ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Create a new rectangle."
+msgstr "创建新节点。"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "创建新多边形。"
@@ -6640,27 +6979,24 @@ msgid "Display Tile Names (Hold Alt Key)"
msgstr "显示ç£è´´çš„åå­—ï¼ˆæŒ‰ä½ Alt 键)"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove selected texture? This will remove all tiles which use it."
-msgstr "确定移除选中的纹ç†ä»¥åŠã€æ‰€æœ‰ã€‘使用它的ã€ç£è´´é›†ã€‘å—?"
+msgstr "删除选定的纹ç†ï¼Ÿè¿™å°†åˆ é™¤ä½¿ç”¨å®ƒçš„æ‰€æœ‰ç£è´´ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "You haven't selected a texture to remove."
msgstr "请先选择è¦ç§»é™¤çš„纹ç†ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create from scene? This will overwrite all current tiles."
-msgstr "ä»Žåœºæ™¯åˆ›å»ºï¼Ÿè¿™å°†è¦†ç›–æ‰€æœ‰å½“å‰æ ‡é¢˜ã€‚"
+msgstr "从场景创建?这将覆盖所有当å‰ç£è´´ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from scene?"
msgstr "确定è¦åˆå¹¶åœºæ™¯ï¼Ÿ"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Texture"
-msgstr "移除模æ¿"
+msgstr "删除纹ç†"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "%s file(s) were not added because was already on the list."
@@ -6726,95 +7062,113 @@ msgstr ""
"点击选择å¦ä¸€ä¸ªç£è´´è¿›è¡Œç¼–辑。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Set Tile Region"
-msgstr "设置纹ç†åŒºåŸŸ"
+msgstr "设置ç£è´´åŒºåŸŸ"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Tile"
-msgstr "新建目录"
+msgstr "创建ç£è´´"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Set Tile Icon"
-msgstr ""
+msgstr "设置纹ç†å›¾æ ‡"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Tile Bitmask"
-msgstr "编辑筛选器"
+msgstr "编辑ç£è´´ä½æŽ©ç "
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Collision Polygon"
-msgstr "编辑已存在的多边形:"
+msgstr "编辑碰撞多边形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Occlusion Polygon"
-msgstr "编辑多边形"
+msgstr "ç¼–è¾‘é®æŒ¡å¤šè¾¹å½¢"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Navigation Polygon"
-msgstr "创建导航多边形"
+msgstr "编辑导航多边形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Paste Tile Bitmask"
-msgstr "ç²˜è´´ä½æŽ©ç ã€‚"
+msgstr "粘贴ç£è´´ä½æŽ©ç "
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Clear Tile Bitmask"
-msgstr ""
+msgstr "æ¸…é™¤ä½æŽ©ç "
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
-msgid "Remove Tile"
-msgstr "移除模æ¿"
+msgid "Make Polygon Concave"
+msgstr "移动多边形"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "移动多边形"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove Tile"
+msgstr "移除ç£è´´"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Collision Polygon"
-msgstr "移除多边形åŠé¡¶ç‚¹"
+msgstr "删除碰撞多边形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Occlusion Polygon"
-msgstr "添加é®å…‰å¤šè¾¹å½¢"
+msgstr "åˆ é™¤é®æŒ¡å¤šè¾¹å½¢"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Remove Navigation Polygon"
-msgstr "创建导航多边形"
+msgstr "删除导航多边形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Edit Tile Priority"
-msgstr "编辑筛选器"
+msgstr "编辑ç£è´´ä¼˜å…ˆçº§"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Z Index"
-msgstr ""
+msgstr "编辑纹ç†çš„Zåæ ‡"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Collision Polygon"
-msgstr "创建导航多边形"
+msgstr "创建碰撞多边形"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Create Occlusion Polygon"
-msgstr "添加é®å…‰å¤šè¾¹å½¢"
+msgstr "åˆ›å»ºé®æŒ¡å¤šè¾¹å½¢"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "This property can't be changed."
msgstr "ä¸èƒ½ä¿®æ”¹è¯¥å±žæ€§ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "TileSet"
-msgstr "ç –å—集"
+msgstr "瓦片集"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Set Input Default Port"
+msgstr "将默认设置为 '%s'"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to Visual Shader"
+msgstr "å¯è§†ç€è‰²å™¨"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "å¤åˆ¶èŠ‚ç‚¹"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
@@ -6832,6 +7186,16 @@ msgstr "ç¯å…‰"
msgid "VisualShader"
msgstr "å¯è§†ç€è‰²å™¨"
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "编辑ç£è´´ä¼˜å…ˆçº§"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "ç€è‰²å™¨å˜æ›´"
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr "坿‰§è¡Œçš„"
@@ -6845,8 +7209,17 @@ msgid "Delete preset '%s'?"
msgstr "删除当å‰çš„ '%s' ?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
-msgstr "没有此平å°çš„导出模æ¿:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
+msgstr ""
#: editor/project_export.cpp
msgid "Release"
@@ -6857,6 +7230,15 @@ msgid "Exporting All"
msgstr "全部导出"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "路径ä¸å­˜åœ¨ã€‚"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr "没有此平å°çš„导出模æ¿:"
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr "预设"
@@ -6923,9 +7305,8 @@ msgid "Feature List:"
msgstr "功能列表:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Script"
-msgstr "新建脚本"
+msgstr "脚本"
#: editor/project_export.cpp
msgid "Script Export Mode:"
@@ -6945,7 +7326,7 @@ msgstr "使用下列密ç åР坆"
#: editor/project_export.cpp
msgid "Invalid Encryption Key (must be 64 characters long)"
-msgstr ""
+msgstr "无效的加密密钥(长度必须为64个字符)"
#: editor/project_export.cpp
msgid "Script Encryption Key (256-bits as hex):"
@@ -7088,11 +7469,11 @@ msgstr "æµè§ˆ"
#: editor/project_manager.cpp
msgid "Renderer:"
-msgstr ""
+msgstr "渲染器:"
#: editor/project_manager.cpp
msgid "OpenGL ES 3.0"
-msgstr ""
+msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid ""
@@ -7101,10 +7482,14 @@ msgid ""
"Incompatible with older hardware\n"
"Not recommended for web games"
msgstr ""
+"更高的视觉质é‡\n"
+"所有å¯ç”¨åŠŸèƒ½\n"
+"与旧硬件ä¸å…¼å®¹\n"
+"䏿ލè用于网络游æˆ"
#: editor/project_manager.cpp
msgid "OpenGL ES 2.0"
-msgstr ""
+msgstr "OpenGL ES 2.0"
#: editor/project_manager.cpp
msgid ""
@@ -7113,19 +7498,22 @@ msgid ""
"Works on most hardware\n"
"Recommended for web games"
msgstr ""
+"较低的视觉质é‡\n"
+"æŸäº›åŠŸèƒ½ä¸å¯ç”¨\n"
+"适用于大多数硬件\n"
+"推è用于网络游æˆ"
#: editor/project_manager.cpp
msgid "Renderer can be changed later, but scenes may need to be adjusted."
-msgstr ""
+msgstr "渲染器å¯ä»¥ç¨åŽæ›´æ”¹ï¼Œä½†å¯èƒ½éœ€è¦è°ƒæ•´åœºæ™¯ã€‚"
#: editor/project_manager.cpp
msgid "Unnamed Project"
msgstr "未命å项目"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project at '%s'."
-msgstr "无法打开项目"
+msgstr "无法打开ä½äºŽâ€œ%sâ€çš„相应项目."
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -7133,6 +7521,25 @@ msgstr "æ‚¨ç¡®å®šè¦æ‰“开多个项目å—?"
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+"以下项目设置文件没有指定创建它的Godot版本:\n"
+"\n"
+"%s\n"
+"\n"
+"如果你继续打开它,它将被转æ¢ä¸ºGodot的当å‰é…置文件格å¼ã€‚\n"
+"警告:您将无法å†ä½¿ç”¨ä»¥å‰ç‰ˆæœ¬çš„引擎打开项目。"
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7142,12 +7549,16 @@ msgid ""
"Warning: You will not be able to open the project with previous versions of "
"the engine anymore."
msgstr ""
+"以下项目设置文件是由旧的引擎版本生æˆçš„,需è¦ä¸ºæ­¤ç‰ˆæœ¬è½¬æ¢ï¼š\n"
+"%s\n"
+"是å¦è¦è½¬æ¢å®ƒï¼Ÿ\n"
+"警告:您将无法å†ä½¿ç”¨ä»¥å‰ç‰ˆæœ¬çš„引擎打开项目。"
#: editor/project_manager.cpp
msgid ""
"The project settings were created by a newer engine version, whose settings "
"are not compatible with this version."
-msgstr ""
+msgstr "项目设置是由更新的引擎版本创建的,其设置与此版本ä¸å…¼å®¹ã€‚"
#: editor/project_manager.cpp
msgid ""
@@ -7825,15 +8236,20 @@ msgstr "å¤åˆ¶èŠ‚ç‚¹"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
-msgstr ""
+msgstr "æ— æ³•é‡æ–°è®¾ç½®ç»§æ‰¿åœºæ™¯ä¸­çš„èŠ‚ç‚¹ï¼ŒèŠ‚ç‚¹é¡ºåºæ— æ³•更改。"
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
-msgstr ""
+msgstr "节点必须属于已编辑的场景æ‰èƒ½æˆä¸ºæ ¹èŠ‚ç‚¹ã€‚"
#: editor/scene_tree_dock.cpp
msgid "Instantiated scenes can't become root"
-msgstr ""
+msgstr "实例化的场景ä¸èƒ½æˆä¸ºæ ¹èŠ‚ç‚¹"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "创建场景根节点"
#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
@@ -7870,6 +8286,11 @@ msgid "Make Local"
msgstr "使用本地"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "New Scene Root"
+msgstr "创建场景根节点"
+
+#: editor/scene_tree_dock.cpp
msgid "Create Root Node:"
msgstr "创建根节点:"
@@ -8294,6 +8715,21 @@ msgid "Set From Tree"
msgstr "从场景树设置"
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "æ¸å‡º"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "å¿«æ·é”®"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "编辑锚点"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "å¿«æ·é”®"
@@ -8498,6 +8934,10 @@ msgid "GridMap Duplicate Selection"
msgstr "å¤åˆ¶é€‰ä¸­é¡¹"
#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr "绘制栅格图"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "网格映射"
@@ -8634,10 +9074,6 @@ msgid "Build Project"
msgstr "构建项目"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr "警告"
-
-#: modules/mono/editor/mono_bottom_panel.cpp
msgid "View log"
msgstr "查看日志"
@@ -8797,10 +9233,6 @@ msgid "Change Expression"
msgstr "更改表达å¼"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "添加节点"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr "删除 VisualScript 节点"
@@ -8881,6 +9313,11 @@ msgid "Change Input Value"
msgstr "更改输入值"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Resize Comment"
+msgstr "调整 CanvasItem 尺寸"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr "无法å¤åˆ¶å‡½æ•°èŠ‚ç‚¹ã€‚"
@@ -9028,87 +9465,84 @@ msgstr "设值 %s"
#: platform/android/export/export.cpp
msgid "Package name is missing."
-msgstr ""
+msgstr "缺包å。"
#: platform/android/export/export.cpp
msgid "Package segments must be of non-zero length."
-msgstr ""
+msgstr "包段的长度必须为éžé›¶ã€‚"
#: platform/android/export/export.cpp
msgid "The character '%s' is not allowed in Android application package names."
-msgstr ""
+msgstr "Android应用程åºåŒ…å称中ä¸å…许使用字符“%sâ€ã€‚"
#: platform/android/export/export.cpp
msgid "A digit cannot be the first character in a package segment."
-msgstr ""
+msgstr "包段中的第一个字符ä¸èƒ½æ˜¯æ•°å­—。"
#: platform/android/export/export.cpp
msgid "The character '%s' cannot be the first character in a package segment."
-msgstr ""
+msgstr "包段中的第一个字符ä¸èƒ½æ˜¯â€œ%sâ€ã€‚"
#: platform/android/export/export.cpp
msgid "The package must have at least one '.' separator."
-msgstr ""
+msgstr "包必须至少有一个“.â€åˆ†éš”符。"
#: platform/android/export/export.cpp
msgid "ADB executable not configured in the Editor Settings."
-msgstr ""
+msgstr "未在编辑器设置中é…ç½®ADB坿‰§è¡Œæ–‡ä»¶ã€‚"
#: platform/android/export/export.cpp
msgid "OpenJDK jarsigner not configured in the Editor Settings."
-msgstr ""
+msgstr "未在编辑器设置中é…ç½®OpenJDK Jarsigner。"
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
-msgstr ""
+msgstr "未在编辑器设置或预设中é…置调试密钥库。"
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
-msgstr ""
+msgstr "APK扩展的公钥无效。"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid package name:"
-msgstr "ç±»åéžæ³•"
+msgstr "无效的包å称:"
#: platform/iphone/export/export.cpp
msgid "Identifier is missing."
-msgstr ""
+msgstr "缺少标识符。"
#: platform/iphone/export/export.cpp
msgid "Identifier segments must be of non-zero length."
-msgstr ""
+msgstr "标识符字段ä¸èƒ½ä¸ºç©º."
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "The character '%s' is not allowed in Identifier."
-msgstr "åç§°ä¸æ˜¯æœ‰æ•ˆçš„æ ‡è¯†ç¬¦ï¼š"
+msgstr "标识符中ä¸å…许使用字符 '% s' 。"
#: platform/iphone/export/export.cpp
msgid "A digit cannot be the first character in a Identifier segment."
-msgstr ""
+msgstr "标识符段中的第一个字符ä¸èƒ½æ˜¯æ•°å­—。"
#: platform/iphone/export/export.cpp
msgid ""
"The character '%s' cannot be the first character in a Identifier segment."
-msgstr ""
+msgstr "标识符段中的第一个字符ä¸èƒ½æ˜¯\"%s\"。"
#: platform/iphone/export/export.cpp
msgid "The Identifier must have at least one '.' separator."
-msgstr ""
+msgstr "标识符必须至少有一个“.â€åˆ†éš”符。"
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
-msgstr ""
+msgstr "未指定应用商店团队ID-无法é…置项目。"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Invalid Identifier:"
-msgstr "åç§°ä¸æ˜¯æœ‰æ•ˆçš„æ ‡è¯†ç¬¦ï¼š"
+msgstr "无效的标识符:"
#: platform/iphone/export/export.cpp
msgid "Required icon is not specified in the preset."
-msgstr ""
+msgstr "预设中未指定必需的图标。"
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
@@ -9143,9 +9577,8 @@ msgid "Using default boot splash image."
msgstr "使用默认å¯åŠ¨å›¾ç‰‡ã€‚"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid package unique name."
-msgstr "åç§°éžæ³•。"
+msgstr "包å唯一性无效。"
#: platform/uwp/export/export.cpp
msgid "Invalid product GUID."
@@ -9283,6 +9716,15 @@ msgid ""
msgstr ""
"ParallaxLayer类型的节点必须作为ParallaxBackgroundçš„å­èŠ‚ç‚¹æ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+"基于GPU的粒å­ä¸å—GLES2视频驱动程åºçš„æ”¯æŒã€‚\n"
+"改为使用CPUParticles2D节点。为此,您å¯ä»¥ä½¿ç”¨â€œè½¬æ¢ä¸º CPUç²’å­â€é€‰é¡¹ã€‚"
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9424,6 +9866,12 @@ msgstr ""
"CollisionShape节点必须拥有一个形状æ‰èƒ½è¿›è¡Œç¢°æ’žæ£€æµ‹å·¥ä½œï¼Œè¯·ä¸ºå®ƒåˆ›å»ºä¸€ä¸ªå½¢çŠ¶èµ„"
"æºï¼"
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr "无物å¯è§ï¼Œå› ä¸ºæ²¡æœ‰æŒ‡å®šç½‘格。"
@@ -9438,6 +9886,12 @@ msgstr "CPUParticles动画需è¦ä½¿ç”¨å¯åŠ¨äº†â€œBillboard Particlesâ€çš„Spati
msgid "Plotting Meshes"
msgstr "正在绘制网格"
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr "此节点需è¦è®¾ç½®NavigationMeshèµ„æºæ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
@@ -9451,6 +9905,15 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+"基于GPU的粒å­ä¸å—GLES2视频驱动程åºçš„æ”¯æŒã€‚\n"
+"改为使用CPUParticles节点。为此,您å¯ä»¥ä½¿ç”¨â€œè½¬æ¢ä¸º CPUç²’å­â€é€‰é¡¹ã€‚"
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr "ç²’å­ä¸å¯è§ï¼Œå› ä¸ºæ²¡æœ‰ç½‘æ ¼(meshe)指定到绘制通é“(draw passes)。"
@@ -9465,11 +9928,11 @@ msgid "PathFollow only works when set as a child of a Path node."
msgstr "PathFollowç±»åž‹çš„èŠ‚ç‚¹åªæœ‰ä½œä¸ºPath类型节点的å­èŠ‚ç‚¹æ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
#: scene/3d/path.cpp
-#, fuzzy
msgid ""
"PathFollow ROTATION_ORIENTED requires \"Up Vector\" enabled in its parent "
"Path's Curve resource."
-msgstr "OrientedPathFollow 需è¦åœ¨å…¶çˆ¶è·¯å¾„中å¯ç”¨â€œUp Vectorsâ€ã€‚"
+msgstr ""
+"PathFollow ROTATION_ORIENTED需è¦åœ¨å…¶çˆ¶è·¯å¾„的曲线资æºä¸­å¯ç”¨â€œUp Vectorâ€ã€‚"
#: scene/3d/physics_body.cpp
msgid ""
@@ -9485,23 +9948,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr "path属性必须指å‘ä¸€ä¸ªåˆæ³•çš„Spatial节点æ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr "WorldEnvironment需è¦ä¸€ä¸ªçŽ¯å¢ƒèµ„æºã€‚"
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr "æ¯ä¸ªåœºæ™¯ä¸­åªå…许有一个WorldEnvironment类型的节点。"
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-"这个WorldEnvironment被忽略。添加摄åƒå¤´ï¼ˆç”¨äºŽ3D场景)或将此环境的背景模å¼è®¾ç½®"
-"为画布(用于2D场景)。"
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr "这个物体将被忽略,除éžè®¾ç½®ä¸€ä¸ªç½‘æ ¼"
@@ -9531,6 +9977,23 @@ msgstr ""
"VehicleWheel 为 VehicleBody æä¾›ä¸€ä¸ªè½¦è½®ç³»ç»Ÿï¼ˆWheel System)。请将它作为"
"VehicleBodyçš„å­èŠ‚ç‚¹ã€‚"
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr "WorldEnvironment需è¦ä¸€ä¸ªçŽ¯å¢ƒèµ„æºã€‚"
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr "æ¯ä¸ªåœºæ™¯ä¸­åªå…许有一个WorldEnvironment类型的节点。"
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+"这个WorldEnvironment被忽略。添加摄åƒå¤´ï¼ˆç”¨äºŽ3D场景)或将此环境的背景模å¼è®¾ç½®"
+"为画布(用于2D场景)。"
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr "在 BlendTree 节点 '%s' 上没有å‘现动画: '%s'"
@@ -9572,12 +10035,28 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "这个节点已被弃用。请使用Animation Tree代替。"
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr "从å±å¹•中选择一ç§é¢œè‰²ã€‚"
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr "Raw 模å¼"
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
-msgstr "将当å‰é¢œè‰²æ·»åŠ ä¸ºé¢„è®¾"
+msgid "Switch between hexadecimal and code values."
+msgstr "在å六进制值和代ç å€¼ä¹‹é—´åˆ‡æ¢ã€‚"
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr "将当å‰é¢œè‰²æ·»åŠ ä¸ºé¢„è®¾ã€‚"
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -9587,6 +10066,11 @@ msgstr "æç¤ºï¼"
msgid "Please Confirm..."
msgstr "请确认..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "转到上层文件夹"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9666,6 +10150,24 @@ msgstr "对uniform的赋值。"
msgid "Varyings can only be assigned in vertex function."
msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸­æŒ‡å®šã€‚"
+#~ msgid "Instance the selected scene(s) as child of the selected node."
+#~ msgstr "将选中的场景实例为选中节点的å­èŠ‚ç‚¹ã€‚"
+
+#~ msgid "FPS"
+#~ msgstr "帧数"
+
+#~ msgid "Warnings:"
+#~ msgstr "警告:"
+
+#~ msgid "Font Size:"
+#~ msgstr "字体大å°:"
+
+#~ msgid "Line:"
+#~ msgstr "行:"
+
+#~ msgid "Col:"
+#~ msgstr "列:"
+
#~ msgid "OrientedPathFollow only works when set as a child of a Path node."
#~ msgstr ""
#~ "OrientedPathFollow ç±»åž‹çš„èŠ‚ç‚¹åªæœ‰ä½œä¸ºPath类型节点的å­èŠ‚ç‚¹æ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
@@ -9824,9 +10326,6 @@ msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸­æŒ‡å®šã€‚"
#~ msgid "Convert To Lowercase"
#~ msgstr "转æ¢ä¸ºå°å†™"
-#~ msgid "Snap To Floor"
-#~ msgstr "å¸é™„到地é¢"
-
#~ msgid "Rotate 0 degrees"
#~ msgstr "旋转0度"
@@ -10362,9 +10861,6 @@ msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸­æŒ‡å®šã€‚"
#~ msgid "Added:"
#~ msgstr "已添加:"
-#~ msgid "Removed:"
-#~ msgstr "已移除:"
-
#~ msgid "Could not save atlas subtexture:"
#~ msgstr "无法ä¿å­˜ç²¾çµé›†å­è´´å›¾:"
@@ -10629,9 +11125,6 @@ msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸­æŒ‡å®šã€‚"
#~ msgid "Error importing:"
#~ msgstr "导入出错:"
-#~ msgid "Only one file is required for large texture."
-#~ msgstr "大图导入仅支æŒä¸€ä¸ªè¾“入文件。"
-
#~ msgid "Max Texture Size:"
#~ msgstr "最大纹ç†å°ºå¯¸:"
@@ -10860,9 +11353,6 @@ msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸­æŒ‡å®šã€‚"
#~ msgid "Edit Groups"
#~ msgstr "编辑分组"
-#~ msgid "GridMap Paint"
-#~ msgstr "绘制栅格图"
-
#~ msgid "Tiles"
#~ msgstr "ç –å—(Tiles)"
@@ -11189,9 +11679,6 @@ msgstr "å˜é‡åªèƒ½åœ¨é¡¶ç‚¹å‡½æ•°ä¸­æŒ‡å®šã€‚"
#~ msgid "Cannot go into subdir:"
#~ msgstr "无法打开目录:"
-#~ msgid "Imported Resources"
-#~ msgstr "已导入的资æº"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "æ’入关键帧( 创建轨é“)"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 7b072a4123..d6ce30ea5d 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -88,6 +88,16 @@ msgstr "複製 Selection"
msgid "Delete Selected Key(s)"
msgstr "刪除é¸ä¸­æª”案"
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Add Bezier Point"
+msgstr "新增訊號"
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "下移"
+
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
msgstr "複製動畫幀"
@@ -119,6 +129,16 @@ msgid "Anim Change Call"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "更改動畫å稱:"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Property Track"
msgstr ""
@@ -172,6 +192,10 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr ""
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -199,6 +223,11 @@ msgid "Time (s): "
msgstr "時間:"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "啟用"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "連續"
@@ -253,6 +282,21 @@ msgid "Delete Key(s)"
msgstr "移除動畫幀"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "更改動畫å稱:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "無干擾模å¼"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "更改動畫循環"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "移除動畫軌跡"
@@ -301,6 +345,16 @@ msgid "Anim Insert Key"
msgstr "å‹•æ™æ’入關éµå¹€ï¼Ÿ"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "更改動畫å稱:"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "釿–°æŽ’例Autoloads"
+
+#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
@@ -325,6 +379,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "新增動畫軌跡"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -333,10 +392,25 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "æ’入軌跡和關éµå¹€"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "新增動畫軌跡"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "æ’入軌跡和關éµå¹€"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
@@ -350,6 +424,11 @@ msgid "Clipboard is empty"
msgstr "路徑為空"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "è²¼ä¸Šåƒæ•¸"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -396,11 +475,6 @@ msgid "Copy Tracks"
msgstr "è¤‡è£½åƒæ•¸"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "è²¼ä¸Šåƒæ•¸"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "縮放selection"
@@ -513,6 +587,19 @@ msgstr ""
msgid "Copy"
msgstr "複製"
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "新增動畫軌跡"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr ""
@@ -579,23 +666,14 @@ msgstr "縮å°"
msgid "Reset Zoom"
msgstr "é‡è¨­ç¸®æ”¾æ¯”例"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-#, fuzzy
-msgid "Line:"
-msgstr "行:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "列:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr ""
@@ -900,8 +978,8 @@ msgstr "è¦åˆªé™¤é¸ä¸­æª”案?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "刪除"
@@ -1175,7 +1253,7 @@ msgid "Add Bus"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
+msgid "Add a new Audio Bus to this layout."
msgstr ""
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
@@ -1206,6 +1284,10 @@ msgstr "é è¨­"
msgid "Load the default Bus Layout."
msgstr ""
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "無效å稱"
@@ -1362,6 +1444,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1414,7 +1516,7 @@ msgstr "開啟 Project Manager?"
msgid "New Folder..."
msgstr "新增資料夾"
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "釿–°æ•´ç†"
@@ -1491,11 +1593,34 @@ msgstr "上移最愛"
msgid "Move Favorite Down"
msgstr "下移最愛"
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "上一個tab"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "新增資料夾"
+
+#: editor/editor_file_dialog.cpp
#, fuzzy
msgid "Go to parent folder"
msgstr "無法新增資料夾"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "無法新增資料夾"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "資料夾和檔案:"
@@ -1736,10 +1861,9 @@ msgstr "下一個腳本"
msgid "Project export failed with error code %d."
msgstr ""
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
-msgid "Error saving resource!"
-msgstr "å„²å­˜è³‡æºæ™‚出ç¾éŒ¯èª¤ï¼"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1747,6 +1871,17 @@ msgid "OK"
msgstr "OK"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
+msgid "Error saving resource!"
+msgstr "å„²å­˜è³‡æºæ™‚出ç¾éŒ¯èª¤ï¼"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "把資æºå¦å­˜ç‚º..."
@@ -1957,6 +2092,15 @@ msgid "Save changes to '%s' before closing?"
msgstr "關閉å‰è¦å…ˆå„²å­˜å° '%s' 任何更改嗎?"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Saved %s modified resource(s)."
+msgstr "資æºåŠ è¼‰å¤±æ•—ã€‚"
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "把場景å¦å­˜ç‚º"
@@ -2470,7 +2614,7 @@ msgid "Save & Restart"
msgstr "儲存檔案"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
+msgid "Spins when the editor window redraws."
msgstr ""
#: editor/editor_node.cpp
@@ -3054,14 +3198,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3214,10 +3350,6 @@ msgid "Search files"
msgstr "在幫助檔æœå°‹"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3590,24 +3722,6 @@ msgid "Create Polygon"
msgstr "縮放selection"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "æ’ä»¶"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "åªé™é¸ä¸­"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3627,6 +3741,24 @@ msgstr ""
msgid "Erase points."
msgstr "縮放selection"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "æ’ä»¶"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "åªé™é¸ä¸­"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3646,12 +3778,47 @@ msgstr "載入"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "下移"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "新增節點"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "新增動畫"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "åªé™é¸ä¸­"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3693,6 +3860,28 @@ msgid "Triangle already exists"
msgstr "錯誤:動畫å稱已存在ï¼"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "新增動畫軌跡"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "åªé™é¸ä¸­"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3701,6 +3890,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "é–‹ï¼é—œè‡ªå‹•播放"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3718,6 +3912,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "當改變時更新"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3728,11 +3927,55 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Add Node to BlendTree"
+msgstr "由主幹新增節點"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "移動模å¼"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "連到"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "中斷"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "新的動畫å稱:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "ä¸é¸"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "(ä¸ï¼‰é¡¯ç¤ºæœ€æ„›"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "更改動畫長度"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3748,6 +3991,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "有效å稱"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#, fuzzy
msgid "Add Node..."
@@ -3987,6 +4236,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "移動模å¼"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "éŽæ¸¡"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "新增節點"
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -4016,6 +4280,20 @@ msgid "No playback resource set at path: %s."
msgstr "ä¸åœ¨è³‡æºè·¯å¾‘。"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "已移除:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "éŽæ¸¡"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4444,6 +4722,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4834,6 +5122,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -5092,19 +5384,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5196,11 +5488,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5361,6 +5653,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -6018,6 +6316,15 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
+msgid "Create Rest Pose from Bones"
+msgstr "é‹è¡Œå ´æ™¯"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Skeleton2D"
msgstr ""
@@ -6132,10 +6439,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6180,7 +6483,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6277,6 +6580,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Rotation Locked"
msgstr "本地化"
@@ -6286,6 +6595,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "鏿“‡æ¨¡å¼"
@@ -6503,7 +6816,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6572,10 +6885,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6584,8 +6893,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "新增動畫"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "新的動畫å稱:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6596,8 +6911,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "新的動畫å稱:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6897,6 +7213,24 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Next Coordinate"
+msgstr "下一個腳本"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "上一個tab"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6912,6 +7246,11 @@ msgstr "縮放selection"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "新增"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "縮放selection"
@@ -7047,6 +7386,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "縮放selection"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "移除é¸é …"
@@ -7096,6 +7444,27 @@ msgid "TileSet"
msgstr "TileSet..."
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "複製動畫幀"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -7111,6 +7480,16 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "檔案"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Visual Shader Mode Changed"
+msgstr "當改變時更新"
+
#: editor/project_export.cpp
#, fuzzy
msgid "Runnable"
@@ -7127,7 +7506,16 @@ msgid "Delete preset '%s'?"
msgstr "è¦åˆªé™¤é¸ä¸­æª”案?"
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7140,6 +7528,15 @@ msgid "Exporting All"
msgstr "匯出"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "檔案ä¸å­˜åœ¨."
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7430,6 +7827,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -8145,6 +8555,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "儲存場景"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8180,6 +8595,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "儲存場景"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "新增資料夾"
@@ -8618,6 +9038,19 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "縮放selection"
+
+#: editor/settings_config_dialog.cpp
+msgid "Restore Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Change Shortcut"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr ""
@@ -8831,6 +9264,11 @@ msgid "GridMap Duplicate Selection"
msgstr "複製 Selection"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "設定"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8977,10 +9415,6 @@ msgid "Build Project"
msgstr "專案"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "檔案"
@@ -9144,10 +9578,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "新增節點"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9234,6 +9664,10 @@ msgid "Change Input Value"
msgstr "動畫變化數值"
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9638,6 +10072,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9767,6 +10208,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9781,6 +10228,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9793,6 +10246,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9823,21 +10283,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9861,6 +10306,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9906,11 +10366,27 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset."
+msgstr ""
+
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
msgstr ""
#: scene/gui/dialogs.cpp
@@ -9921,6 +10397,11 @@ msgstr "警告!"
msgid "Please Confirm..."
msgstr "請確èª..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "無法新增資料夾"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9995,6 +10476,13 @@ msgid "Varyings can only be assigned in vertex function."
msgstr ""
#, fuzzy
+#~ msgid "Line:"
+#~ msgstr "行:"
+
+#~ msgid "Col:"
+#~ msgstr "列:"
+
+#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "AutoLoad '%s'已存在ï¼"
@@ -10101,17 +10589,6 @@ msgstr ""
#~ msgid "Anim Add Key"
#~ msgstr "新增動畫幀"
-#~ msgid "Transitions"
-#~ msgstr "éŽæ¸¡"
-
-#, fuzzy
-#~ msgid "Change Anim Len"
-#~ msgstr "更改動畫長度"
-
-#, fuzzy
-#~ msgid "Change Anim Loop"
-#~ msgstr "更改動畫循環"
-
#~ msgid "Length (s):"
#~ msgstr "時長(秒):"
@@ -10246,9 +10723,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "已加入:"
-#~ msgid "Removed:"
-#~ msgstr "已移除:"
-
#, fuzzy
#~ msgid "Tiles"
#~ msgstr "檔案"
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index 58c3085900..10f9bd4a55 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -12,12 +12,13 @@
# Qing <icinriiq@gmail.com>, 2018.
# Sam Pan <sampan66@gmail.com>, 2016.
# ken l <macauhome@gmail.com>, 2018.
+# Eric K <eric900601@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2018-12-13 14:44+0100\n"
-"Last-Translator: ken l <macauhome@gmail.com>\n"
+"PO-Revision-Date: 2019-02-01 12:09+0000\n"
+"Last-Translator: Eric K <eric900601@gmail.com>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hant/>\n"
"Language: zh_TW\n"
@@ -25,34 +26,35 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Weblate 3.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr ""
+msgstr "Convert()å‡½æ•¸æ‰€æ”¶åˆ°çš„åƒæ•¸éŒ¯èª¤ï¼Œè«‹è©¦è‘—以 TYPE_ 作為開頭。"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "解碼字節ä½å…ƒä¸è¶³ï¼Œæˆ–為無效格å¼ã€‚"
+msgstr "輸入的解碼字節ä¸è¶³ã€æˆ–為無效格å¼ã€‚"
#: core/math/expression.cpp
+#, fuzzy
msgid "Invalid input %i (not passed) in expression"
-msgstr ""
+msgstr "所輸入的 %i 於表ç¾å¼ä¸­ç„¡æ•ˆ"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
+msgstr "因該實例(instance)為空,self 無法被使用"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr ""
+msgstr "此數值無法被 %sã€%s å’Œ %s é‹ç®—。"
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
-msgstr ""
+msgstr "無效的內存地å€é¡žåž‹ %sï¼ŒåŸºç¤Žåž‹å¼ %s"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
@@ -80,47 +82,63 @@ msgid "Mirror"
msgstr ""
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Insert Key Here"
-msgstr "動畫新增按éµ"
+msgstr "在此æ’入畫格"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Duplicate Selected Key(s)"
-msgstr "複製所é¸"
+msgstr "複製所é¸ç•«æ ¼"
#: editor/animation_bezier_editor.cpp
-#, fuzzy
msgid "Delete Selected Key(s)"
-msgstr "ç¢ºå®šåˆªé™¤æ‰€é¸æ“‡çš„æª”案嗎?"
+msgstr "刪除所é¸ç•«æ ¼"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr ""
+
+#: editor/animation_bezier_editor.cpp
+#, fuzzy
+msgid "Move Bezier Points"
+msgstr "移除"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr "複製動畫關éµç•«æ ¼"
+msgstr "複製關éµç•«æ ¼"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Delete Keys"
-msgstr "刪除動畫關éµç•«æ ¼"
+msgstr "刪除關éµç•«æ ¼"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr "動畫更改關éµå¹€æ™‚é–“"
+msgstr "變更關éµç•«æ ¼çš„æ™‚é–“"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "動畫更改轉場效果"
+msgstr "變更轉場效果"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr "動畫更改座標"
+msgstr "變更動畫變æ›"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Value"
-msgstr "動畫更改關éµå¹€æ•¸å€¼"
+msgstr "變更關éµç•«æ ¼çš„æ•¸å€¼"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
-msgstr "動畫更改呼å«"
+msgstr "更改回調"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Length"
+msgstr "變更動畫長度"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -152,9 +170,8 @@ msgid "Add Track"
msgstr "添加動畫軌"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Length Time (seconds)"
-msgstr "動畫長度 (秒)。"
+msgstr "動畫長度(秒)"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -175,6 +192,11 @@ msgid "Anim Clips:"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Track Path"
+msgstr "調整陣列資料"
+
+#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
msgstr ""
@@ -201,6 +223,11 @@ msgid "Time (s): "
msgstr "步驟 :"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Toggle Track Enabled"
+msgstr "啟用"
+
+#: editor/animation_track_editor.cpp
msgid "Continuous"
msgstr "連續"
@@ -253,16 +280,31 @@ msgid "Delete Key(s)"
msgstr "刪除動畫關éµç•«æ ¼"
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Update Mode"
+msgstr "改變字典 value"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Interpolation Mode"
+msgstr "改變字典 value"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Loop Mode"
+msgstr "變更動畫迴圈"
+
+#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
msgstr "刪除動畫軌"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr "%s 新增新軌並æ’入畫格?"
+msgstr "為 %s 新增動畫軌並æ’入畫格?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
-msgstr "創建 %d 個新軌並æ’入畫格?"
+msgstr "創建 %d 個動畫軌並æ’入畫格?"
#: editor/animation_track_editor.cpp editor/create_dialog.cpp
#: editor/editor_audio_buses.cpp editor/editor_plugin_settings.cpp
@@ -283,7 +325,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
-msgstr "動畫建立與æ’å…¥"
+msgstr "新增/æ’入動畫"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -292,7 +334,17 @@ msgstr "動畫新增軌跡與按éµ"
#: editor/animation_track_editor.cpp
msgid "Anim Insert Key"
-msgstr "動畫新增按éµ"
+msgstr "新增關éµç•«æ ¼"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Change Animation Step"
+msgstr "變更動畫長度"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Rearrange Tracks"
+msgstr "釿–°æŽ’列 Autoload"
#: editor/animation_track_editor.cpp
msgid "Transform tracks only apply to Spatial-based nodes."
@@ -319,6 +371,11 @@ msgid "Not possible to add a new track without a root"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Bezier Track"
+msgstr "添加動畫軌"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
msgstr ""
@@ -327,22 +384,42 @@ msgid "Track is not of type Spatial, can't insert key"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Transform Track Key"
+msgstr "動畫新增軌跡與按éµ"
+
+#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Track Key"
+msgstr "添加動畫軌"
+
+#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Add Method Track Key"
+msgstr "動畫新增軌跡與按éµ"
+
+#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
msgstr ""
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
-msgstr "移動動畫畫格"
+msgstr "移動關éµç•«æ ¼"
#: editor/animation_track_editor.cpp
msgid "Clipboard is empty"
msgstr ""
#: editor/animation_track_editor.cpp
+#, fuzzy
+msgid "Paste Tracks"
+msgstr "è²¼ä¸Šåƒæ•¸"
+
+#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
msgstr ""
@@ -389,17 +466,12 @@ msgid "Copy Tracks"
msgstr "è¤‡è£½åƒæ•¸"
#: editor/animation_track_editor.cpp
-#, fuzzy
-msgid "Paste Tracks"
-msgstr "è²¼ä¸Šåƒæ•¸"
-
-#: editor/animation_track_editor.cpp
msgid "Scale Selection"
msgstr "縮放所é¸"
#: editor/animation_track_editor.cpp
msgid "Scale From Cursor"
-msgstr "由游標ä½ç½®ç¸®æ”¾"
+msgstr "由游標縮放"
#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Duplicate Selection"
@@ -407,7 +479,7 @@ msgstr "複製所é¸"
#: editor/animation_track_editor.cpp
msgid "Duplicate Transposed"
-msgstr "é‡è¤‡è½‰ç½®"
+msgstr "複製並轉置"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -426,7 +498,7 @@ msgstr "往上一步"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
-msgstr "最佳化動畫"
+msgstr "動畫最佳化"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation"
@@ -463,11 +535,11 @@ msgstr "最佳化"
#: editor/animation_track_editor.cpp
msgid "Remove invalid keys"
-msgstr "移除無效按éµ"
+msgstr "移除無效的關éµç•«æ ¼"
#: editor/animation_track_editor.cpp
msgid "Remove unresolved and empty tracks"
-msgstr "刪除未解決或是空的軌é“"
+msgstr "刪除未處ç†çš„空白軌é“"
#: editor/animation_track_editor.cpp
msgid "Clean-up all animations"
@@ -475,7 +547,7 @@ msgstr "清除所有動畫"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation(s) (NO UNDO!)"
-msgstr "清除動畫 (無法復原!)"
+msgstr "永久刪除動畫(無法復原ï¼ï¼‰"
#: editor/animation_track_editor.cpp
msgid "Clean-Up"
@@ -497,6 +569,19 @@ msgstr ""
msgid "Copy"
msgstr ""
+#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
+msgid "Add Audio Track Clip"
+msgstr "添加動畫軌"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr ""
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr ""
+
#: editor/array_property_edit.cpp
msgid "Resize Array"
msgstr "調整陣列大å°"
@@ -523,7 +608,7 @@ msgstr "ç„¡ç¬¦åˆæ¢ä»¶"
#: editor/code_editor.cpp
msgid "Replaced %d occurrence(s)."
-msgstr "å–代了 %d 個"
+msgstr "å–代了 %d 個。"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
@@ -531,7 +616,7 @@ msgstr "符åˆå¤§å°å¯«"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Whole Words"
-msgstr "整個字"
+msgstr "符åˆå®Œæ•´å–®å­—"
#: editor/code_editor.cpp editor/rename_dialog.cpp
msgid "Replace"
@@ -561,31 +646,23 @@ msgstr "縮å°"
msgid "Reset Zoom"
msgstr "é‡è¨­ç¸®æ”¾å¤§å°"
-#: editor/code_editor.cpp
-msgid "Warnings:"
+#: editor/code_editor.cpp modules/mono/editor/mono_bottom_panel.cpp
+msgid "Warnings"
msgstr ""
#: editor/code_editor.cpp
-msgid "Font Size:"
+msgid "Line and column numbers."
msgstr ""
-#: editor/code_editor.cpp
-msgid "Line:"
-msgstr "行:"
-
-#: editor/code_editor.cpp
-msgid "Col:"
-msgstr "列:"
-
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
-msgstr "需指定在目標節點上的方法!"
+msgstr "必須指定å°ç›®æ¨™ç¯€é»žçš„行為ï¼"
#: editor/connections_dialog.cpp
msgid ""
"Target method not found! Specify a valid method or attach a script to target "
"Node."
-msgstr "找ä¸åˆ°ç›®æ¨™æ–¹æ³•! 指定一個å°çš„æ–¹æ³•或附加一個腳本到目標的節點上。"
+msgstr "找ä¸åˆ°ç›®æ¨™æ–¹æ³•ï¼è«‹æŒ‡å®šæœ‰æ•ˆæ–¹æ³•ã€æˆ–將腳本附加至目標節點上。"
#: editor/connections_dialog.cpp
msgid "Connect To Node:"
@@ -881,8 +958,8 @@ msgstr "ç¢ºå®šåˆªé™¤æ‰€é¸æ“‡çš„æª”案嗎?"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/project_settings_editor.cpp
-#: editor/scene_tree_dock.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
msgid "Delete"
msgstr "刪除"
@@ -1150,8 +1227,9 @@ msgid "Add Bus"
msgstr "新增 Bus"
#: editor/editor_audio_buses.cpp
-msgid "Create a new Bus Layout."
-msgstr "建立新的 Bus é…置。"
+#, fuzzy
+msgid "Add a new Audio Bus to this layout."
+msgstr "å¦å­˜ Audio Bus é…置為..."
#: editor/editor_audio_buses.cpp editor/editor_properties.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/property_editor.cpp
@@ -1179,6 +1257,10 @@ msgstr "載入é è¨­å€¼"
msgid "Load the default Bus Layout."
msgstr "載入é è¨­çš„ Bus é…置。"
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "建立新的 Bus é…置。"
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "ä¸èƒ½ä½¿ç”¨çš„å稱。"
@@ -1329,6 +1411,26 @@ msgstr ""
msgid "Packing"
msgstr ""
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Etc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+
#: editor/editor_export.cpp platform/android/export/export.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
@@ -1377,7 +1479,7 @@ msgstr "在檔案管ç†å“¡å…§é¡¯ç¤º"
msgid "New Folder..."
msgstr "新增資料夾..."
-#: editor/editor_file_dialog.cpp
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh"
msgstr "釿–°æ•´ç†"
@@ -1453,11 +1555,34 @@ msgstr ""
msgid "Move Favorite Down"
msgstr ""
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Previous Folder"
+msgstr "上個分é "
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Next Folder"
+msgstr "新增資料夾"
+
+#: editor/editor_file_dialog.cpp
#, fuzzy
msgid "Go to parent folder"
msgstr "無法新增資料夾"
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "(Un)favorite current folder."
+msgstr "無法新增資料夾"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr ""
+
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "資料夾 & 檔案:"
@@ -1696,9 +1821,9 @@ msgstr "輸出:"
msgid "Project export failed with error code %d."
msgstr "專案輸出失敗,錯誤代碼是 %d。"
-#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
-msgid "Error saving resource!"
-msgstr "儲存資æºéŒ¯èª¤!"
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: scene/gui/dialogs.cpp
@@ -1706,6 +1831,16 @@ msgid "OK"
msgstr ""
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "儲存資æºéŒ¯èª¤!"
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource can't be saved because it does not belong to the edited scene. "
+"Make it unique first."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
msgstr "å¦å­˜è³‡æºç‚º..."
@@ -1869,7 +2004,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Current scene was never saved, please save it prior to running."
-msgstr "請先存檔æ‰èƒ½åŸ·è¡Œè©²å ´æ™¯"
+msgstr "在é‹è¡Œå ´æ™¯å‰ï¼Œè«‹å…ˆå­˜æª”。"
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -1901,12 +2036,20 @@ msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "å¦å­˜å ´æ™¯ç‚º..."
#: editor/editor_node.cpp
msgid "No"
-msgstr ""
+msgstr "䏿˜¯"
#: editor/editor_node.cpp
msgid "Yes"
@@ -1918,7 +2061,7 @@ msgstr "此場景尚未存檔, 執行å‰è«‹å…ˆå­˜æª”"
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "This operation can't be done without a scene."
-msgstr ""
+msgstr "在設置場景å‰ï¼Œç„¡æ³•完æˆè©²æŒ‡å®šæ“作。"
#: editor/editor_node.cpp
msgid "Export Mesh Library"
@@ -1926,20 +2069,19 @@ msgstr ""
#: editor/editor_node.cpp
msgid "This operation can't be done without a root node."
-msgstr "æ­¤æ“作無法在沒有根節點的情æ³ä¸‹é€²è¡Œã€‚"
+msgstr "在設置根節點(root node)å‰ï¼Œç„¡æ³•完æˆè©²æŒ‡å®šæ“作。"
#: editor/editor_node.cpp
msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "This operation can't be done without a selected node."
-msgstr "æ­¤æ“ä½œéœ€è¦æœ‰é¸æ“‡è‘—節點æ‰èƒ½é€²è¡Œã€‚"
+msgstr "在設置著節點(selected node)å‰ï¼Œç„¡æ³•完æˆè©²æŒ‡å®šæ“作。"
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
-msgstr "ç›®å‰çš„場景尚未存檔, ä¾ç„¶è¦é–‹å•Ÿå—Ž?"
+msgstr "ç›®å‰çš„場景尚未存檔,ä»è¦é–‹å•Ÿå—Žï¼Ÿ"
#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
@@ -1950,12 +2092,13 @@ msgid "Revert"
msgstr "還原"
#: editor/editor_node.cpp
+#, fuzzy
msgid "This action cannot be undone. Revert anyway?"
-msgstr "æ­¤æ“作無法復原, 確定è¦é‚„原嗎?"
+msgstr "æ­¤æ“作無法被, 確定è¦é‚„原嗎?"
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
-msgstr "快速執行場景..."
+msgstr "快速執行場景…"
#: editor/editor_node.cpp
msgid "Quit"
@@ -1963,89 +2106,93 @@ msgstr "離開"
#: editor/editor_node.cpp
msgid "Exit the editor?"
-msgstr "離開編輯器嗎?"
+msgstr "è¦çµæŸç·¨è¼¯å™¨å—Žï¼Ÿ"
#: editor/editor_node.cpp
msgid "Open Project Manager?"
-msgstr ""
+msgstr "è¦é–‹å•Ÿå°ˆæ¡ˆç®¡ç†å—Žï¼Ÿ"
#: editor/editor_node.cpp
msgid "Save & Quit"
-msgstr ""
+msgstr "儲存並離開"
#: editor/editor_node.cpp
msgid "Save changes to the following scene(s) before quitting?"
-msgstr ""
+msgstr "關閉å‰ï¼Œè¦å„²å­˜ä¿®æ”¹çš„場景嗎?"
#: editor/editor_node.cpp
msgid "Save changes the following scene(s) before opening Project Manager?"
-msgstr ""
+msgstr "開啟專案管ç†å‰ï¼Œè¦å„²å­˜ä¿®æ”¹çš„場景嗎?"
#: editor/editor_node.cpp
msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
-msgstr ""
+msgstr "ä¸æŽ¨è–¦æ­¤é¸é …ã€‚è¢«å¼·åˆ¶é‡æ–°æ•´ç†çš„æƒ…形,å¯èƒ½æ˜¯å› ç¨‹å¼éŒ¯èª¤å°Žè‡´ã€‚請回報。"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
-msgstr "挑一個主è¦å ´æ™¯"
+msgstr "é¸å–一個主è¦å ´æ™¯"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
-msgstr ""
+msgstr "無法在: \"%s\" 上啟動擴充功能,設定解æžå¤±æ•—。"
#: editor/editor_node.cpp
msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
-msgstr ""
+msgstr "在æ’件目錄 'res://addons/%s' 中,找ä¸åˆ°è…³æœ¬ã€‚"
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s'."
-msgstr ""
+msgstr "無法從 '%s' 中順利讀å–腳本。"
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' There seems to be an error in "
"the code, please check the syntax."
-msgstr ""
+msgstr "無法從 '%s' 中順利讀å–腳本。å¯èƒ½å‡ºè‡ªç·¨ç¢¼éŒ¯èª¤ï¼Œè«‹æª¢å¯Ÿèªžæ³•æ˜¯å¦æ­£ç¢ºã€‚"
#: editor/editor_node.cpp
msgid ""
"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
-msgstr ""
+msgstr "無法從 '%s' 中順利讀å–腳本。基本類型 的腳本並ä¸å±¬æ–¼ 編輯類æ’件。"
#: editor/editor_node.cpp
msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
-msgstr ""
+msgstr "無法從 '%s' 中順利讀å–腳本。此腳本並ä¸è™•於工具模å¼ä¸‹ã€‚"
#: editor/editor_node.cpp
msgid ""
"Scene '%s' was automatically imported, so it can't be modified.\n"
"To make changes to it, a new inherited scene can be created."
msgstr ""
+"場景\"%s\"為自動導入,並ä¸èƒ½è¢«ä¿®æ”¹ã€‚\n"
+"è‹¥è¦é€²è¡Œæ›´æ”¹ï¼Œè«‹å»ºç«‹æ–°çš„場景。"
#: editor/editor_node.cpp
msgid ""
"Error loading scene, it must be inside the project path. Use 'Import' to "
"open the scene, then save it inside the project path."
msgstr ""
+"讀å–場景時發生錯誤,場景必須放置於專案資料夾內。請用「導入ã€é–‹å•Ÿè©²å ´æ™¯å¾Œï¼Œå†"
+"儲存於專案資料夾。"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Scene '%s' has broken dependencies:"
-msgstr ""
+msgstr "場景 '%s' çš„ä¾å­˜é—œä¿‚已被破壞。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "關閉場景"
+msgstr "清除最近開啟的場景"
#: editor/editor_node.cpp
msgid "Save Layout"
-msgstr ""
+msgstr "儲存佈局"
#: editor/editor_node.cpp
msgid "Delete Layout"
-msgstr ""
+msgstr "刪除佈局"
#: editor/editor_node.cpp editor/import_dock.cpp
#: editor/script_create_dialog.cpp
@@ -2054,28 +2201,24 @@ msgstr "é è¨­"
#: editor/editor_node.cpp editor/editor_properties.cpp
#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Show in FileSystem"
-msgstr "在檔案管ç†å“¡å…§é¡¯ç¤º"
+msgstr "在檔案系統中顯示"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Play This Scene"
-msgstr "æš«åœå ´æ™¯"
+msgstr "é‹è¡Œæ­¤å ´æ™¯"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Close Tab"
-msgstr "關閉"
+msgstr "關閉分é "
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "切æ›å ´æ™¯åˆ†é "
#: editor/editor_node.cpp
-#, fuzzy
msgid "%d more files or folders"
-msgstr "還有 %d 個檔案或資料夾"
+msgstr "還有 %d 個檔案/資料夾"
#: editor/editor_node.cpp
#, fuzzy
@@ -2083,26 +2226,24 @@ msgid "%d more folders"
msgstr "還有 %d 個檔案"
#: editor/editor_node.cpp
-#, fuzzy
msgid "%d more files"
msgstr "還有 %d 個檔案"
#: editor/editor_node.cpp
msgid "Dock Position"
-msgstr ""
+msgstr "版é¢ä½ç½®"
#: editor/editor_node.cpp
msgid "Distraction Free Mode"
-msgstr ""
+msgstr "無干擾模å¼"
#: editor/editor_node.cpp
msgid "Toggle distraction-free mode."
-msgstr ""
+msgstr "切æ›ç‚ºç„¡å¹²æ“¾æ¨¡å¼ã€‚"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Add a new scene."
-msgstr "更新場景中..."
+msgstr "新增場景。"
#: editor/editor_node.cpp
#, fuzzy
@@ -2111,35 +2252,35 @@ msgstr "場景"
#: editor/editor_node.cpp
msgid "Go to previously opened scene."
-msgstr ""
+msgstr "å‰å¾€ä¸Šæ¬¡é–‹å•Ÿçš„場景。"
#: editor/editor_node.cpp
msgid "Next tab"
-msgstr "下個分é "
+msgstr "下一個分é "
#: editor/editor_node.cpp
msgid "Previous tab"
-msgstr "上個分é "
+msgstr "上一個分é "
#: editor/editor_node.cpp
msgid "Filter Files..."
-msgstr "éŽæ¿¾æª”案..."
+msgstr "ç¯©é¸æª”案..."
#: editor/editor_node.cpp
msgid "Operations with scene files."
-msgstr ""
+msgstr "æ“作場景文件。"
#: editor/editor_node.cpp
msgid "New Scene"
-msgstr ""
+msgstr "新場景"
#: editor/editor_node.cpp
msgid "New Inherited Scene..."
-msgstr ""
+msgstr "å¾žç¾æœ‰å ´æ™¯ä¸­å»ºç«‹â€¦"
#: editor/editor_node.cpp
msgid "Open Scene..."
-msgstr "開啟場景..."
+msgstr "開啟場景…"
#: editor/editor_node.cpp
msgid "Save Scene"
@@ -2156,42 +2297,41 @@ msgstr "關閉場景"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
-msgstr "開啟最近存å–"
+msgstr "最近開啟的場景"
#: editor/editor_node.cpp
msgid "Convert To..."
-msgstr "è½‰æ›æˆ..."
+msgstr "è½‰æ›æˆâ€¦"
#: editor/editor_node.cpp
msgid "MeshLibrary..."
-msgstr ""
+msgstr "網狀資料庫(MeshLibrary)…"
#: editor/editor_node.cpp
msgid "TileSet..."
-msgstr ""
+msgstr "å€å¡Šç´ æâ€¦"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Undo"
-msgstr "復原"
+msgstr "還原"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Redo"
-msgstr "å–æ¶ˆã€Œå¾©åŽŸã€"
+msgstr "é‡ä½œ"
#: editor/editor_node.cpp
msgid "Revert Scene"
-msgstr ""
+msgstr "æ¢å¾©å ´æ™¯"
#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
-msgstr ""
+msgstr "其他專案或全螢幕工具。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "專案設定"
+msgstr "專案"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -2206,32 +2346,31 @@ msgid "Tools"
msgstr "工具"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Project Data Folder"
-msgstr "專案創始人"
+msgstr "開啟專案資料夾"
#: editor/editor_node.cpp
msgid "Quit to Project List"
-msgstr ""
+msgstr "退出到專案列表"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/project_export.cpp
msgid "Debug"
-msgstr ""
+msgstr "åµéŒ¯"
#: editor/editor_node.cpp
msgid "Deploy with Remote Debug"
-msgstr ""
+msgstr "使用é ç«¯åµéŒ¯"
#: editor/editor_node.cpp
msgid ""
"When exporting or deploying, the resulting executable will attempt to "
"connect to the IP of this computer in order to be debugged."
-msgstr ""
+msgstr "當輸出或發布專案後,å¯åŸ·è¡Œæ–‡ä»¶(exe)å°‡æœƒå˜—è©¦é€£çµæœ¬æ©Ÿï¼©ï¼°ï¼Œä»¥é€²è¡ŒåµéŒ¯ã€‚"
#: editor/editor_node.cpp
msgid "Small Deploy with Network FS"
-msgstr ""
+msgstr "å°åž‹éƒ¨å±¬ & 網路文件系統(NFS)"
#: editor/editor_node.cpp
msgid ""
@@ -2242,30 +2381,34 @@ msgid ""
"On Android, deploy will use the USB cable for faster performance. This "
"option speeds up testing for games with a large footprint."
msgstr ""
+"啟用此é¸é …後,在輸出/發布項目時,執行檔會壓縮至最å°ã€‚\n"
+"至於文件系統,則以網路與編輯器的連çµä¾†ä¾›çµ¦ã€‚\n"
+"在Androidå¹³å°ï¼Œé€éŽUSB發布能ç²å¾—更快的效率。\n"
+"æ­¤é¸é …ç”¨æ–¼åŠ é€ŸéŠæˆ²(尤其是檔案ç¹å¤š)的測試。"
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr ""
+msgstr "碰撞å€åŸŸçš„顯示"
#: editor/editor_node.cpp
msgid ""
"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the "
"running game if this option is turned on."
-msgstr ""
+msgstr "啟用此é¸é …後,碰撞å€åŸŸ/射線節點 å°‡æœƒæ–¼éŠæˆ²ä¸­é¡¯ç¤ºã€‚"
#: editor/editor_node.cpp
msgid "Visible Navigation"
-msgstr ""
+msgstr "導航的顯示"
#: editor/editor_node.cpp
msgid ""
"Navigation meshes and polygons will be visible on the running game if this "
"option is turned on."
-msgstr ""
+msgstr "啟用此é¸é …後,導航所用的網線/多邊形 å°‡æœƒæ–¼éŠæˆ²ä¸­é¡¯ç¤ºã€‚"
#: editor/editor_node.cpp
msgid "Sync Scene Changes"
-msgstr ""
+msgstr "åŒæ­¥å ´æ™¯çš„變更"
#: editor/editor_node.cpp
msgid ""
@@ -2274,10 +2417,12 @@ msgid ""
"When used remotely on a device, this is more efficient with network "
"filesystem."
msgstr ""
+"啟用此é¸é …後,編輯器中的所有修改,都會立å³å映於é‹è¡Œä¸­çš„éŠæˆ²ã€‚\n"
+"在é ç«¯è£ç½®æ¸¬è©¦æ™‚,é…åˆç¶²è·¯æ–‡ä»¶ç³»çµ±(NFS)使用能更æé«˜æ•ˆçŽ‡ã€‚"
#: editor/editor_node.cpp
msgid "Sync Script Changes"
-msgstr ""
+msgstr "åŒæ­¥è…³æœ¬çš„變更"
#: editor/editor_node.cpp
msgid ""
@@ -2286,42 +2431,44 @@ msgid ""
"When used remotely on a device, this is more efficient with network "
"filesystem."
msgstr ""
+"啟用此é¸é …後,腳本的所有修改,都會立å³å映於é‹è¡Œä¸­çš„éŠæˆ²ã€‚\n"
+"在é ç«¯è£ç½®æ¸¬è©¦æ™‚,é…åˆç¶²è·¯æ–‡ä»¶ç³»çµ±(NFS)使用能更æé«˜æ•ˆçŽ‡ã€‚"
#: editor/editor_node.cpp
msgid "Editor"
-msgstr ""
+msgstr "編輯器"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
-msgstr ""
+msgstr "編輯器設定"
#: editor/editor_node.cpp
msgid "Editor Layout"
-msgstr ""
+msgstr "編輯器佈局"
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr ""
+msgstr "全螢幕顯示"
#: editor/editor_node.cpp
msgid "Open Editor Data/Settings Folder"
-msgstr ""
+msgstr "開啟 編輯器數據/設定 資料夾"
#: editor/editor_node.cpp
msgid "Open Editor Data Folder"
-msgstr ""
+msgstr "開啟 編輯器數據 資料夾"
#: editor/editor_node.cpp
msgid "Open Editor Settings Folder"
-msgstr ""
+msgstr "開啟 編輯器設定 資料夾"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Manage Export Templates"
-msgstr ""
+msgstr "管ç†è¼¸å‡ºæ¨¡æ¿"
#: editor/editor_node.cpp
msgid "Help"
-msgstr ""
+msgstr "幫助"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -2333,15 +2480,16 @@ msgstr "æœå°‹"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Online Docs"
-msgstr ""
+msgstr "線上文件"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Q&A"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Issue Tracker"
-msgstr ""
+msgstr "å•題追蹤器"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
@@ -2353,11 +2501,11 @@ msgstr "關於"
#: editor/editor_node.cpp
msgid "Play the project."
-msgstr "éŠçŽ©æ­¤å°ˆæ¡ˆ"
+msgstr "é‹è¡Œæ­¤å°ˆæ¡ˆã€‚"
#: editor/editor_node.cpp
msgid "Play"
-msgstr "é–‹å§‹"
+msgstr "é‹è¡Œ"
#: editor/editor_node.cpp
msgid "Pause the scene"
@@ -2377,58 +2525,58 @@ msgstr "åœæ­¢"
#: editor/editor_node.cpp
msgid "Play the edited scene."
-msgstr ""
+msgstr "é‹è¡Œç·¨è¼¯éŽçš„場景。"
#: editor/editor_node.cpp
msgid "Play Scene"
-msgstr ""
+msgstr "é‹è¡Œå ´æ™¯"
#: editor/editor_node.cpp
msgid "Play custom scene"
-msgstr ""
+msgstr "é‹è¡Œè‡ªå®šç¾©å ´æ™¯"
#: editor/editor_node.cpp
msgid "Play Custom Scene"
-msgstr ""
+msgstr "é‹è¡Œè‡ªå®šç¾©å ´æ™¯"
#: editor/editor_node.cpp
msgid "Changing the video driver requires restarting the editor."
-msgstr ""
+msgstr "åœ¨æ›´å‹•é¡¯ç¤ºé©…å‹•å¾Œï¼Œå¿…é ˆé‡æ–°é–‹å•Ÿç·¨è¼¯å™¨ã€‚"
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
-#, fuzzy
msgid "Save & Restart"
-msgstr "å¦å­˜æ–°æª”"
+msgstr "儲存並é‡å•Ÿ"
#: editor/editor_node.cpp
-msgid "Spins when the editor window repaints!"
-msgstr ""
+#, fuzzy
+msgid "Spins when the editor window redraws."
+msgstr "åœ¨é‡æ–°ç¹ªè£½(repaint)編輯器視窗時,來個旋轉ï¼"
#: editor/editor_node.cpp
msgid "Update Always"
-msgstr ""
+msgstr "總是自動更新"
#: editor/editor_node.cpp
msgid "Update Changes"
-msgstr ""
+msgstr "有更動時自動更新"
#: editor/editor_node.cpp
msgid "Disable Update Spinner"
-msgstr ""
+msgstr "ç¦æ­¢è‡ªå‹•æ›´æ–°"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
msgid "Import"
-msgstr ""
+msgstr "å°Žå…¥"
#: editor/editor_node.cpp
msgid "FileSystem"
-msgstr ""
+msgstr "文件系統"
#: editor/editor_node.cpp
msgid "Inspector"
-msgstr ""
+msgstr "å±¬æ€§é¢æ¿"
#: editor/editor_node.cpp
#, fuzzy
@@ -2437,96 +2585,95 @@ msgstr "節點"
#: editor/editor_node.cpp
msgid "Expand Bottom Panel"
-msgstr ""
+msgstr "å±•é–‹åº•éƒ¨é¢æ¿"
#: editor/editor_node.cpp scene/resources/visual_shader.cpp
msgid "Output"
-msgstr ""
+msgstr "輸出(output)"
#: editor/editor_node.cpp
msgid "Don't Save"
-msgstr ""
+msgstr "ä¸è¦å„²å­˜"
#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
-msgstr ""
+msgstr "導入模æ¿ï¼ˆé€éŽZIP檔案)"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
-msgstr ""
+msgstr "輸出專案"
#: editor/editor_node.cpp
msgid "Export Library"
-msgstr ""
+msgstr "輸出函å¼åº«"
#: editor/editor_node.cpp
msgid "Merge With Existing"
-msgstr ""
+msgstr "èˆ‡ç¾æœ‰å‡½å¼åº«åˆä½µ"
#: editor/editor_node.cpp
msgid "Password:"
-msgstr ""
+msgstr "密碼:"
#: editor/editor_node.cpp
msgid "Open & Run a Script"
-msgstr ""
+msgstr "開啟並é‹è¡Œè…³æœ¬"
#: editor/editor_node.cpp
msgid "New Inherited"
-msgstr ""
+msgstr "å¾žç¾æœ‰å ´æ™¯ä¸­å»ºç«‹"
#: editor/editor_node.cpp
msgid "Load Errors"
-msgstr ""
+msgstr "è®€å–æ™‚出ç¾éŒ¯èª¤"
#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Select"
-msgstr ""
+msgstr "鏿“‡"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
-msgstr ""
+msgstr "開啟2D編輯器"
#: editor/editor_node.cpp
msgid "Open 3D Editor"
-msgstr ""
+msgstr "開啟3D編輯器"
#: editor/editor_node.cpp
msgid "Open Script Editor"
-msgstr ""
+msgstr "開啟腳本編輯器"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
-msgstr ""
+msgstr "開啟素æå€‰åº«"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "離開編輯器嗎?"
+msgstr "開啟下一個編輯器"
#: editor/editor_node.cpp
msgid "Open the previous Editor"
-msgstr ""
+msgstr "開啟上一個編輯器"
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
-msgstr ""
+msgstr "創建網格é è¦½"
#: editor/editor_plugin.cpp
msgid "Thumbnail..."
-msgstr ""
+msgstr "縮圖…"
#: editor/editor_plugin_settings.cpp
msgid "Edit Plugin"
-msgstr ""
+msgstr "編輯擴充功能"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
-msgstr ""
+msgstr "已安è£çš„æ“´å……功能:"
#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
msgid "Update"
-msgstr ""
+msgstr "æ›´æ–°"
#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -2968,14 +3115,6 @@ msgid "Cannot navigate to '%s' as it has not been found in the file system!"
msgstr ""
#: editor/filesystem_dock.cpp
-msgid "View items as a grid of thumbnails."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
-msgid "View items as a list."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid "Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
@@ -3125,10 +3264,6 @@ msgid "Search files"
msgstr "æœå°‹ Class"
#: editor/filesystem_dock.cpp
-msgid "Instance the selected scene(s) as child of the selected node."
-msgstr ""
-
-#: editor/filesystem_dock.cpp
msgid ""
"Scanning Files,\n"
"Please Wait..."
@@ -3491,24 +3626,6 @@ msgid "Create Polygon"
msgstr "新增資料夾"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Edit Polygon"
-msgstr "新增資料夾"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Insert Point"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-msgid "Edit Polygon (Remove Point)"
-msgstr ""
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
-msgid "Remove Polygon And Point"
-msgstr "移除"
-
-#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#, fuzzy
@@ -3528,6 +3645,24 @@ msgstr ""
msgid "Erase points."
msgstr "æ‰€æœ‰çš„é¸æ“‡"
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Edit Polygon"
+msgstr "新增資料夾"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#, fuzzy
+msgid "Remove Polygon And Point"
+msgstr "移除"
+
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -3546,12 +3681,47 @@ msgstr "載入"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Move Node Point"
+msgstr "移除"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Change BlendSpace1D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid "This type of node can't be used. Only root nodes are allowed."
msgstr ""
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Node Point"
+msgstr "移除"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Animation Point"
+msgstr "動畫空間。"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace1D Point"
+msgstr "移除"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+msgid "Move BlendSpace1D Node Point"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
@@ -3593,6 +3763,28 @@ msgid "Triangle already exists"
msgstr "Autoload「%sã€å·²ç¶“存在!"
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Add Triangle"
+msgstr "添加動畫軌"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Limits"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Change BlendSpace2D Labels"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Remove BlendSpace2D Point"
+msgstr "移除"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Remove BlendSpace2D Triangle"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
msgstr ""
@@ -3601,6 +3793,11 @@ msgid "No triangles exist, so no blending can take place."
msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
+#, fuzzy
+msgid "Toggle Auto Triangles"
+msgstr "åˆ‡æ›æœ€æ„›"
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Create triangles by connecting points."
msgstr ""
@@ -3618,6 +3815,11 @@ msgid "Blend:"
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Parameter Changed"
+msgstr "正在儲存變更..."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Filters"
@@ -3628,11 +3830,54 @@ msgid "Output node can't be added to the blend tree."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Add Node to BlendTree"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Node Moved"
+msgstr "節點å稱:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Unable to connect, port may be in use or connection may be invalid."
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Connected"
+msgstr "連接..."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Nodes Disconnected"
+msgstr "æ–·ç·š"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Set Animation"
+msgstr "動畫最佳化"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Delete Node"
+msgstr "刪除"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Filter On/Off"
+msgstr "åˆ‡æ›æœ€æ„›"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Change Filter"
+msgstr "變更é¡é ­å°ºå¯¸"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "No animation player set, so unable to retrieve track names."
msgstr ""
@@ -3648,6 +3893,12 @@ msgid ""
msgstr ""
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Renamed"
+msgstr "節點å稱:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node..."
msgstr ""
@@ -3881,6 +4132,21 @@ msgid "Cross-Animation Blend Times"
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Move Node"
+msgstr "移動 Autoload"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Add Transition"
+msgstr "轉場"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
msgstr ""
@@ -3910,6 +4176,20 @@ msgid "No playback resource set at path: %s."
msgstr "在資æºè·¯å¾‘中找ä¸åˆ°"
#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Node Removed"
+msgstr "已刪除:"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#, fuzzy
+msgid "Transition Removed"
+msgstr "轉場"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set Start Node (Autoplay)"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
msgid ""
"Select and move nodes.\n"
"RMB to add new nodes.\n"
@@ -4333,6 +4613,16 @@ msgid "Move CanvasItem"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Children of containers have their anchors and margins values overridden by "
+"their parent."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchors only"
msgstr ""
@@ -4719,6 +5009,10 @@ msgstr ""
msgid "Bake GI Probe"
msgstr ""
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Gradient Edited"
+msgstr ""
+
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
msgstr ""
@@ -4977,19 +5271,19 @@ msgid "Generating Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Can only set point into a ParticlesMaterial process material"
+msgid "Generate Visibility Rect"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Error loading image:"
+msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "No pixels with transparency > 128 in image..."
+msgid "Error loading image:"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-msgid "Generate Visibility Rect"
+msgid "No pixels with transparency > 128 in image..."
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -5081,11 +5375,11 @@ msgid "Generating AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate AABB"
+msgid "Generate Visibility AABB"
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-msgid "Generate Visibility AABB"
+msgid "Generate AABB"
msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -5245,6 +5539,12 @@ msgid "Create UV Map"
msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"Polygon 2D has internal vertices, so it can no longer be edited in the "
+"viewport."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
msgstr ""
@@ -5896,6 +6196,14 @@ msgid "This skeleton has no bones, create some children Bone2D nodes."
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr ""
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
msgid "Skeleton2D"
msgstr "單例"
@@ -6008,10 +6316,6 @@ msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "FPS"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
msgstr ""
@@ -6056,7 +6360,7 @@ msgid "Rear"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Align with View"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6151,6 +6455,12 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Note: The FPS value displayed is the editor's framerate.\n"
+"It cannot be used as a reliable indication of in-game performance."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
msgstr ""
@@ -6159,6 +6469,10 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Select Mode (Q)"
msgstr "åƒ…é¸æ“‡å€åŸŸ"
@@ -6373,7 +6687,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Name-less gizmo"
+msgid "Nameless gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -6441,10 +6755,6 @@ msgid "Add Empty"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Change Animation Loop"
-msgstr ""
-
-#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
msgstr ""
@@ -6453,8 +6763,14 @@ msgid "(empty)"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animations"
-msgstr ""
+#, fuzzy
+msgid "Animations:"
+msgstr "動畫空間。"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "New Animation"
+msgstr "動畫最佳化"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
@@ -6465,8 +6781,9 @@ msgid "Loop"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
-msgid "Animation Frames"
-msgstr ""
+#, fuzzy
+msgid "Animation Frames:"
+msgstr "動畫空間。"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -6763,6 +7080,23 @@ msgid "Merge from Scene"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Next Coordinate"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the next shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Previous Coordinate"
+msgstr "上個分é "
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Select the previous shape, subtile, or Tile."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Copy bitmask."
msgstr ""
@@ -6778,6 +7112,11 @@ msgstr "æ‰€æœ‰çš„é¸æ“‡"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
+msgid "Create a new rectangle."
+msgstr "新增 %s"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon."
msgstr "新增資料夾"
@@ -6913,6 +7252,15 @@ msgid "Clear Tile Bitmask"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Polygon Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
+msgid "Make Polygon Convex"
+msgstr "新增資料夾"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Remove Tile"
msgstr "移除"
@@ -6959,6 +7307,27 @@ msgid "TileSet"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Uniform Name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set Input Default Port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node to Visual Shader"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Duplicate Nodes"
+msgstr "複製動畫關éµç•«æ ¼"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
msgstr ""
@@ -6975,6 +7344,15 @@ msgstr ""
msgid "VisualShader"
msgstr ""
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Visual Property"
+msgstr "éŽæ¿¾æª”案..."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Mode Changed"
+msgstr ""
+
#: editor/project_export.cpp
msgid "Runnable"
msgstr ""
@@ -6988,7 +7366,16 @@ msgid "Delete preset '%s'?"
msgstr ""
#: editor/project_export.cpp
-msgid "Export templates for this platform are missing/corrupted:"
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"Export templates seem to be missing or invalid."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Failed to export the project for platform '%s'.\n"
+"This might be due to a configuration issue in the export preset or your "
+"export settings."
msgstr ""
#: editor/project_export.cpp
@@ -7001,6 +7388,15 @@ msgid "Exporting All"
msgstr "輸出"
#: editor/project_export.cpp
+#, fuzzy
+msgid "The given export path doesn't exist:"
+msgstr "檔案ä¸å­˜åœ¨"
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Presets"
msgstr ""
@@ -7288,6 +7684,19 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"The following project settings file does not specify the version of Godot "
+"through which it was created.\n"
+"\n"
+"%s\n"
+"\n"
+"If you proceed with opening it, it will be converted to Godot's current "
+"configuration file format.\n"
+"Warning: You will not be able to open the project with previous versions of "
+"the engine anymore."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"The following project settings file was generated by an older engine "
"version, and needs to be converted for this version:\n"
"\n"
@@ -7994,6 +8403,11 @@ msgid "Instantiated scenes can't become root"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Make node as Root"
+msgstr "儲存場景"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)?"
msgstr ""
@@ -8029,6 +8443,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "New Scene Root"
+msgstr "儲存場景"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Root Node:"
msgstr "新增資料夾"
@@ -8460,6 +8879,21 @@ msgid "Set From Tree"
msgstr ""
#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Erase Shortcut"
+msgstr "æ·å¾‘"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Restore Shortcut"
+msgstr "æ·å¾‘"
+
+#: editor/settings_config_dialog.cpp
+#, fuzzy
+msgid "Change Shortcut"
+msgstr "æ·å¾‘"
+
+#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
msgstr "æ·å¾‘"
@@ -8684,6 +9118,11 @@ msgid "GridMap Duplicate Selection"
msgstr "複製所é¸"
#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Paint"
+msgstr "專案設定"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr ""
@@ -8827,10 +9266,6 @@ msgid "Build Project"
msgstr "專案設定"
#: modules/mono/editor/mono_bottom_panel.cpp
-msgid "Warnings"
-msgstr ""
-
-#: modules/mono/editor/mono_bottom_panel.cpp
#, fuzzy
msgid "View log"
msgstr "éŽæ¿¾æª”案..."
@@ -8993,10 +9428,6 @@ msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
msgstr ""
@@ -9081,6 +9512,10 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
msgstr ""
@@ -9483,6 +9918,13 @@ msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
+#: scene/2d/particles_2d.cpp
+msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles2D node instead. You can use the \"Convert to "
+"CPUParticles\" option for this purpose."
+msgstr ""
+
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
@@ -9612,6 +10054,12 @@ msgid ""
"shape resource for it!"
msgstr ""
+#: scene/3d/collision_shape.cpp
+msgid ""
+"Plane shapes don't work well and will be removed in future versions. Please "
+"don't use them."
+msgstr ""
+
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
msgstr ""
@@ -9626,6 +10074,12 @@ msgstr ""
msgid "Plotting Meshes"
msgstr ""
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -9638,6 +10092,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
+"GPU-based particles are not supported by the GLES2 video driver.\n"
+"Use the CPUParticles node instead. You can use the \"Convert to CPUParticles"
+"\" option for this purpose."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
@@ -9668,21 +10129,6 @@ msgstr ""
msgid "Path property must point to a valid Spatial node to work."
msgstr ""
-#: scene/3d/scenario_fx.cpp
-msgid "WorldEnvironment needs an Environment resource."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
-msgstr ""
-
-#: scene/3d/scenario_fx.cpp
-msgid ""
-"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
-"this environment's Background Mode to Canvas (for 2D scenes)."
-msgstr ""
-
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh"
msgstr ""
@@ -9706,6 +10152,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
+#: scene/3d/world_environment.cpp
+msgid "WorldEnvironment needs an Environment resource."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set "
+"this environment's Background Mode to Canvas (for 2D scenes)."
+msgstr ""
+
#: scene/animation/animation_blend_tree.cpp
msgid "On BlendTree node '%s', animation not found: '%s'"
msgstr ""
@@ -9751,13 +10212,30 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr ""
#: scene/gui/color_picker.cpp
+msgid "Pick a color from the screen."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "Add current color as a preset"
+msgid "Switch between hexadecimal and code values."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+#, fuzzy
+msgid "Add current color as a preset."
msgstr "將目å‰é¡è‰²è¨­ç‚ºé è¨­"
+#: scene/gui/container.cpp
+msgid ""
+"Container by itself serves no purpose unless a script configures it's "
+"children placement behavior.\n"
+"If you dont't intend to add a script, then please use a plain 'Control' node "
+"instead."
+msgstr ""
+
#: scene/gui/dialogs.cpp
msgid "Alert!"
msgstr "警告!"
@@ -9766,6 +10244,11 @@ msgstr "警告!"
msgid "Please Confirm..."
msgstr "請確èª..."
+#: scene/gui/file_dialog.cpp
+#, fuzzy
+msgid "Go to parent folder."
+msgstr "無法新增資料夾"
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -9841,6 +10324,12 @@ msgstr ""
msgid "Varyings can only be assigned in vertex function."
msgstr ""
+#~ msgid "Line:"
+#~ msgstr "行:"
+
+#~ msgid "Col:"
+#~ msgstr "列:"
+
#, fuzzy
#~ msgid "Split already exists."
#~ msgstr "Autoload「%sã€å·²ç¶“存在!"
@@ -9951,12 +10440,6 @@ msgstr ""
#~ msgid "Out-In"
#~ msgstr "外-內"
-#~ msgid "Change Anim Len"
-#~ msgstr "變更動畫長度"
-
-#~ msgid "Change Anim Loop"
-#~ msgstr "變更動畫迴圈"
-
#, fuzzy
#~ msgid "Anim Create Typed Value Key"
#~ msgstr "動畫新增具類別之éµå€¼"
@@ -10036,9 +10519,6 @@ msgstr ""
#~ msgid "Added:"
#~ msgstr "已新增:"
-#~ msgid "Removed:"
-#~ msgstr "已刪除:"
-
#~ msgid "Ctrl+"
#~ msgstr "Ctrl+"
diff --git a/main/gamecontrollerdb.txt b/main/gamecontrollerdb.txt
index cb32b4209f..440c0a8621 100644
--- a/main/gamecontrollerdb.txt
+++ b/main/gamecontrollerdb.txt
@@ -96,11 +96,13 @@
030000006f0e00002401000000000000,INJUSTICE FightStick PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000ac0500002c02000000000000,IPEGA,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000491900000204000000000000,Ipega PG-9023,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
+030000006e0500000a20000000000000,JC-DUX60 ELECOM MMO Gamepad,a:b2,b:b3,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b14,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b15,righttrigger:b13,rightx:a3,righty:a4,start:b20,x:b0,y:b1,platform:Windows,
030000006e0500000520000000000000,JC-P301U,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,
030000006e0500000320000000000000,JC-U3613M (DInput),a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows,
030000006e0500000720000000000000,JC-W01U,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows,
030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Windows,
030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,
+03000000bd12000003c0000000000000,JY-P70UR,a:b1,b:b0,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b11,righttrigger:b9,rightx:a3,righty:a2,start:b4,x:b3,y:b2,platform:Windows,
03000000790000000200000000000000,King PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
030000006d040000d1ca000000000000,Logitech ChillStream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006d040000d2ca000000000000,Logitech Cordless Precision,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
@@ -137,6 +139,7 @@
03000000bd12000015d0000000000000,Nintendo Retrolink USB Super SNES Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,
030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000000d0500000308000000000000,Nostromo N45,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Windows,
+03000000550900001472000000000000,NVIDIA Controller v01.04,a:b11,b:b10,x:b9,y:b8,back:b13,guide:b12,start:b3,leftstick:b5,rightstick:b4,leftshoulder:b7,rightshoulder:b6,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a6,lefttrigger:a4,righttrigger:a5,platform:Windows,
030000004b120000014d000000000000,NYKO AIRFLO,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a3,leftstick:a0,lefttrigger:b6,rightshoulder:b5,rightstick:a2,righttrigger:b7,start:b9,x:b2,y:b3,platform:Windows,
03000000782300000a10000000000000,Onlive Wireless Controller,a:b15,b:b14,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b11,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b13,y:b12,platform:Windows,
03000000d62000006d57000000000000,OPP PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
@@ -190,6 +193,7 @@
0300000000f000000300000000000000,RetroUSB.com RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,
0300000000f00000f100000000000000,RetroUSB.com Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,
030000006b140000010d000000000000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
+030000006b140000020d000000000000,Revolution Pro Controller 2(1/2),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00001e01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00002801000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00002f01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
@@ -217,6 +221,7 @@
03000000ff1100003133000000000000,SVEN X-PAD,a:b2,b:b3,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a4,start:b5,x:b0,y:b1,platform:Windows,
03000000d620000011a7000000000000,Switch,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000004f04000007d0000000000000,T Mini Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
+030000004f0400000ab1000000000000,T.16000M,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b10,x:b2,y:b3,platform:Windows,
03000000fa1900000706000000000000,Team 5,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000b50700001203000000000000,Techmobility X6-38V,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
030000004f04000015b3000000000000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
@@ -227,6 +232,7 @@
03000000d62000006000000000000000,Tournament PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
030000005f140000c501000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000b80500000210000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
+030000004f04000087b6000000000000,TWCS Throttle,dpdown:b8,dpleft:b9,dpright:b7,dpup:b6,leftstick:b5,lefttrigger:-a5,leftx:a0,lefty:a1,righttrigger:+a5,platform:Windows,
03000000d90400000200000000000000,TwinShock PS2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000101c0000171c000000000000,uRage Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000300f00000701000000000000,USB 4-Axis 12-Button Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
@@ -253,6 +259,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000102800000900000000000000,8Bitdo SFC30 GamePad Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000a00500003232000008010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000a00500003232000009010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
+03000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,x:b2,y:b3,back:b10,start:b9,leftstick:b7,rightstick:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Mac OS X,
030000008305000031b0000000000000,Cideko AK08b,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000260900008888000088020000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Mac OS X,
03000000a306000022f6000001030000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X,
@@ -289,6 +296,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
0300000025090000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Mac OS X,
03000000790000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X,
03000000d8140000cecf000000000000,MC Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,
+03000000d62000007162000001000000,Moga Pro 2 HID,a:b0,b:b1,x:b2,y:b3,back:b9,start:b6,leftstick:b7,rightstick:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Mac OS X,
030000001008000001e5000006010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,platform:Mac OS X,
030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
030000008f0e00000300000000000000,Piranha xtreme,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Mac OS X,
@@ -303,6 +311,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000321500000204000000010000,Razer Panthera (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000321500000104000000010000,Razer Panthera (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000321500000010000000010000,Razer RAIJU,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
+03000000321500000009000000020000,Razer Serval,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Mac OS X,
+030000003215000000090000163a0000,Razer Serval,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Mac OS X,
0300000032150000030a000000000000,Razer Wildcat,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000790000001100000000000000,Retrolink Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a3,lefty:a4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,
@@ -352,7 +362,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000006f0e00003901000020060000,Afterglow Controller for Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000006f0e00003901000000430000,Afterglow Prismatic Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000100000008200000011010000,Akishop Customs PS360+ v1.66,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
+05000000491900000204000021000000,Amazon Fire Game Controller,a:b0,b:b1,x:b3,y:b4,back:b10,guide:b12,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Linux,
05000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux,
+05000000050b00000045000040000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux,
03000000120c00000500000010010000,AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux,
03000000666600006706000000010000,boom PSX to PC Converter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Linux,
03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
@@ -365,6 +377,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000bc2000000055000011010000,GameSir G3w,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000006f0e00000104000000010000,Gamestop Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
+030000008f0e00000800000010010000,Gasia Co. Ltd PS(R) Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
030000006f0e00001304000000010000,Generic X-Box pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:a0,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:a3,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
0300000079000000d418000000010000,GPD Win 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
@@ -437,7 +450,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000005e040000d102000003020000,Microsoft X-Box One pad v2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e0400008502000000010000,Microsoft X-Box pad (Japan),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
030000005e0400008902000021010000,Microsoft X-Box pad v2 (US),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
+05000000d6200000e589000001000000,Moga 2 HID,a:b0,b:b1,x:b2,y:b3,back:b9,start:b6,leftstick:b7,rightstick:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Linux,
05000000d6200000ad0d000001000000,Moga Pro,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
+05000000d62000007162000001000000,Moga Pro 2 HID,a:b0,b:b1,x:b2,y:b3,back:b9,start:b6,leftstick:b7,rightstick:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Linux,
03000000250900006688000000010000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,
030000000d0f00000900000010010000,Natec Genesis P44,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
030000001008000001e5000010010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,platform:Linux,
@@ -446,6 +461,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
05000000010000000100000003000000,Nintendo Wiimote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
030000000d0500000308000010010000,Nostromo n45 Dual Analog Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Linux,
03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
+05000000550900001472000001000000,NVIDIA Controller v01.04,a:b0,b:b1,x:b2,y:b3,back:b14,guide:b16,start:b6,leftstick:b7,rightstick:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:a3,righttrigger:a4,platform:Linux,
+03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,x:b2,y:b3,back:b14,guide:b16,start:b6,leftstick:b7,rightstick:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:a3,righttrigger:a4,platform:Linux,
03000000451300000830000010010000,NYKO CORE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000005e0400000202000000010000,Old Xbox pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
05000000362800000100000002010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux,
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 18b4649f4d..e9f1eeff6a 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -355,6 +355,7 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
Ref<InputEventMouseButton> button_event;
button_event.instance();
+ button_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE);
button_event->set_position(st->get_position());
button_event->set_global_position(st->get_position());
button_event->set_pressed(st->is_pressed());
@@ -383,6 +384,7 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
Ref<InputEventMouseMotion> motion_event;
motion_event.instance();
+ motion_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE);
motion_event->set_position(sd->get_position());
motion_event->set_global_position(sd->get_position());
motion_event->set_relative(sd->get_relative());
@@ -600,6 +602,7 @@ void InputDefault::ensure_touch_mouse_raised() {
Ref<InputEventMouseButton> button_event;
button_event.instance();
+ button_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE);
button_event->set_position(mouse_pos);
button_event->set_global_position(mouse_pos);
button_event->set_pressed(false);
@@ -657,8 +660,35 @@ void InputDefault::set_mouse_in_window(bool p_in_window) {
*/
}
+void InputDefault::accumulate_input_event(const Ref<InputEvent> &p_event) {
+ ERR_FAIL_COND(p_event.is_null());
+
+ if (!use_accumulated_input) {
+ parse_input_event(p_event);
+ return;
+ }
+ if (!accumulated_events.empty() && accumulated_events.back()->get()->accumulate(p_event)) {
+ return; //event was accumulated, exit
+ }
+
+ accumulated_events.push_back(p_event);
+}
+void InputDefault::flush_accumulated_events() {
+
+ while (accumulated_events.front()) {
+ parse_input_event(accumulated_events.front()->get());
+ accumulated_events.pop_front();
+ }
+}
+
+void InputDefault::set_use_accumulated_input(bool p_enable) {
+
+ use_accumulated_input = p_enable;
+}
+
InputDefault::InputDefault() {
+ use_accumulated_input = true;
mouse_button_mask = 0;
emulate_touch_from_mouse = false;
emulate_mouse_from_touch = false;
diff --git a/main/input_default.h b/main/input_default.h
index 75dd1e67f6..79a90cc4a4 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -183,6 +183,9 @@ private:
void _parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_emulated);
+ List<Ref<InputEvent> > accumulated_events;
+ bool use_accumulated_input;
+
public:
virtual bool is_key_pressed(int p_scancode) const;
virtual bool is_mouse_button_pressed(int p_button) const;
@@ -264,6 +267,11 @@ public:
bool is_joy_mapped(int p_device);
String get_joy_guid_remapped(int p_device) const;
void set_fallback_mapping(String p_guid);
+
+ virtual void accumulate_input_event(const Ref<InputEvent> &p_event);
+ virtual void flush_accumulated_events();
+ virtual void set_use_accumulated_input(bool p_enable);
+
InputDefault();
};
diff --git a/main/main.cpp b/main/main.cpp
index f9044b61cd..0871b12338 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -53,11 +53,11 @@
#include "drivers/register_driver_types.h"
#include "main/app_icon.gen.h"
#include "main/input_default.h"
+#include "main/main_timer_sync.h"
#include "main/performance.h"
#include "main/splash.gen.h"
#include "main/splash_editor.gen.h"
#include "main/tests/test_main.h"
-#include "main/timer_sync.h"
#include "modules/register_module_types.h"
#include "platform/register_platform_apis.h"
#include "scene/main/scene_tree.h"
@@ -394,7 +394,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
Vector<String> breakpoints;
bool use_custom_res = true;
bool force_res = false;
+#ifdef TOOLS_ENABLED
bool found_project = false;
+#endif
packed_data = PackedData::get_singleton();
if (!packed_data)
@@ -746,14 +748,16 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
if (globals->setup(project_path, main_pack, upwards) == OK) {
+#ifdef TOOLS_ENABLED
found_project = true;
+#endif
} else {
#ifdef TOOLS_ENABLED
editor = false;
#else
String error_msg = "Error: Could not load game data at path '" + project_path + "'. Is the .pck file missing?\n";
- OS::get_singleton()->print(error_msg.ascii().get_data());
+ OS::get_singleton()->print("%s", error_msg.ascii().get_data());
OS::get_singleton()->alert(error_msg);
goto error;
@@ -784,7 +788,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
memdelete(sdr);
} else {
script_debugger = sdr;
- sdr->set_allow_focus_steal_pid(allow_focus_steal_pid);
}
} else if (debug_mode == "local") {
@@ -853,6 +856,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
if (editor || project_manager) {
+ Engine::get_singleton()->set_editor_hint(true);
use_custom_res = false;
input_map->load_default(); //keys for editor
} else {
@@ -877,8 +881,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
video_driver = GLOBAL_GET("rendering/quality/driver/driver_name");
}
- GLOBAL_DEF("rendering/quality/driver/driver_fallback", "Best");
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_fallback", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_fallback", PROPERTY_HINT_ENUM, "Best,Never"));
+ GLOBAL_DEF("rendering/quality/driver/fallback_to_gles2", false);
// Assigning here even though it's GLES2-specific, to be sure that it appears in docs
GLOBAL_DEF("rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround", false);
@@ -922,13 +925,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false);
}
- OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/allow_per_pixel_transparency", false);
-
video_mode.use_vsync = GLOBAL_DEF("display/window/vsync/use_vsync", true);
OS::get_singleton()->_use_vsync = video_mode.use_vsync;
- video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency", false);
- video_mode.layered_splash = GLOBAL_DEF("display/window/per_pixel_transparency_splash", false);
+ OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
+ video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
+ video_mode.layered_splash = GLOBAL_DEF("display/window/per_pixel_transparency/splash", false);
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2);
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3);
@@ -1126,6 +1128,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
OS::get_singleton()->set_window_always_on_top(true);
}
+ if (allow_focus_steal_pid) {
+ OS::get_singleton()->enable_for_stealing_focus(allow_focus_steal_pid);
+ }
+
register_server_types();
MAIN_PRINT("Main: Load Remaps");
@@ -1144,8 +1150,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
if (boot_logo_path != String()) {
boot_logo.instance();
- Error err = ImageLoader::load_image(boot_logo_path, boot_logo);
- if (err)
+ Error load_err = ImageLoader::load_image(boot_logo_path, boot_logo);
+ if (load_err)
ERR_PRINTS("Non-existing or invalid boot splash at: " + boot_logo_path + ". Loading default splash.");
}
@@ -1203,6 +1209,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
GLOBAL_DEF("display/mouse_cursor/custom_image", String());
GLOBAL_DEF("display/mouse_cursor/custom_image_hotspot", Vector2());
+ GLOBAL_DEF("display/mouse_cursor/tooltip_position_offset", Point2(10, 10));
ProjectSettings::get_singleton()->set_custom_property_info("display/mouse_cursor/custom_image", PropertyInfo(Variant::STRING, "display/mouse_cursor/custom_image", PROPERTY_HINT_FILE, "*.png,*.webp"));
if (String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")) != String()) {
@@ -1273,7 +1280,9 @@ bool Main::start() {
bool hasicon = false;
String doc_tool;
List<String> removal_docs;
+#ifdef TOOLS_ENABLED
bool doc_base = true;
+#endif
String game_path;
String script;
String test;
@@ -1286,9 +1295,11 @@ bool Main::start() {
List<String> args = OS::get_singleton()->get_cmdline_args();
for (int i = 0; i < args.size(); i++) {
//parameters that do not have an argument to the right
- if (args[i] == "--no-docbase") {
- doc_base = false;
+ if (args[i] == "--check-only") {
+ check_only = true;
#ifdef TOOLS_ENABLED
+ } else if (args[i] == "--no-docbase") {
+ doc_base = false;
} else if (args[i] == "-e" || args[i] == "--editor") {
editor = true;
} else if (args[i] == "-p" || args[i] == "--project-manager") {
@@ -1296,8 +1307,6 @@ bool Main::start() {
#endif
} else if (args[i].length() && args[i][0] != '-' && game_path == "") {
game_path = args[i];
- } else if (args[i] == "--check-only") {
- check_only = true;
}
//parameters that have an argument to the right
else if (i < (args.size() - 1)) {
@@ -1543,8 +1552,8 @@ bool Main::start() {
Ref<PackedScene> ps = res;
n = ps->instance();
} else if (res->is_class("Script")) {
- Ref<Script> s = res;
- StringName ibt = s->get_instance_base_type();
+ Ref<Script> script_res = res;
+ StringName ibt = script_res->get_instance_base_type();
bool valid_type = ClassDB::is_parent_class(ibt, "Node");
ERR_EXPLAIN("Script does not inherit a Node: " + path);
ERR_CONTINUE(!valid_type);
@@ -1555,7 +1564,7 @@ bool Main::start() {
ERR_CONTINUE(obj == NULL);
n = Object::cast_to<Node>(obj);
- n->set_script(s.get_ref_ptr());
+ n->set_script(script_res.get_ref_ptr());
}
ERR_EXPLAIN("Path in autoload not a node or script: " + path);
@@ -1604,7 +1613,7 @@ bool Main::start() {
String stretch_mode = GLOBAL_DEF("display/window/stretch/mode", "disabled");
String stretch_aspect = GLOBAL_DEF("display/window/stretch/aspect", "ignore");
Size2i stretch_size = Size2(GLOBAL_DEF("display/window/size/width", 0), GLOBAL_DEF("display/window/size/height", 0));
- real_t stretch_shrink = GLOBAL_DEF("display/window/stretch/shrink", 1.0f);
+ real_t stretch_shrink = GLOBAL_DEF("display/window/stretch/shrink", 1.0);
SceneTree::StretchMode sml_sm = SceneTree::STRETCH_MODE_DISABLED;
if (stretch_mode == "2d")
@@ -1656,8 +1665,8 @@ bool Main::start() {
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode", PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,2d,viewport"));
GLOBAL_DEF("display/window/stretch/aspect", "ignore");
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect", PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"));
- GLOBAL_DEF("display/window/stretch/shrink", 1);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::REAL, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1,8,1"));
+ GLOBAL_DEF("display/window/stretch/shrink", 1.0);
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::REAL, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1.0,8.0,0.1"));
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true));
GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
diff --git a/main/timer_sync.cpp b/main/main_timer_sync.cpp
index 5ee834880f..f7388c8517 100644
--- a/main/timer_sync.cpp
+++ b/main/main_timer_sync.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* timer_sync.cpp */
+/* main_timer_sync.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "timer_sync.h"
+#include "main_timer_sync.h"
void MainFrameTime::clamp_idle(float min_idle_step, float max_idle_step) {
if (idle_step < min_idle_step) {
diff --git a/main/timer_sync.h b/main/main_timer_sync.h
index fcce6d7a9a..179119edce 100644
--- a/main/timer_sync.h
+++ b/main/main_timer_sync.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* timer_sync.h */
+/* main_timer_sync.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef TIMER_SYNC_H
-#define TIMER_SYNC_H
+#ifndef MAIN_TIMER_SYNC_H
+#define MAIN_TIMER_SYNC_H
#include "core/engine.h"
@@ -98,4 +98,4 @@ public:
MainFrameTime advance(float p_frame_slice, int p_iterations_per_second);
};
-#endif // TIMER_SYNC_H
+#endif // MAIN_TIMER_SYNC_H
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index 60f9568fbd..27180f84aa 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -360,9 +360,6 @@ static void _parser_show_block(const GDScriptParser::BlockNode *p_block, int p_i
case GDScriptParser::ControlFlowNode::CF_MATCH: {
// FIXME: Implement
} break;
- case GDScriptParser::ControlFlowNode::CF_SWITCH: {
-
- } break;
case GDScriptParser::ControlFlowNode::CF_CONTINUE: {
_print_indent(p_indent, "continue");
@@ -566,7 +563,7 @@ static void _disassemble_class(const Ref<GDScript> &p_class, const Vector<String
case GDScriptFunction::OPCODE_OPERATOR: {
int op = code[ip + 1];
- txt += "op ";
+ txt += " op ";
String opname = Variant::get_operator_name(Variant::Operator(op));
@@ -911,11 +908,14 @@ MainLoop *test(TestType p_type) {
List<String> cmdlargs = OS::get_singleton()->get_cmdline_args();
if (cmdlargs.empty()) {
- //try editor!
return NULL;
}
String test = cmdlargs.back()->get();
+ if (!test.ends_with(".gd") && !test.ends_with(".gdc")) {
+ print_line("This test expects a path to a GDScript file as its last parameter. Got: " + test);
+ return NULL;
+ }
FileAccess *fa = FileAccess::open(test, FileAccess::READ);
@@ -1041,10 +1041,10 @@ MainLoop *test(TestType p_type) {
} else if (p_type == TEST_BYTECODE) {
- Vector<uint8_t> buf = GDScriptTokenizerBuffer::parse_code_string(code);
+ Vector<uint8_t> buf2 = GDScriptTokenizerBuffer::parse_code_string(code);
String dst = test.get_basename() + ".gdc";
FileAccess *fw = FileAccess::open(dst, FileAccess::WRITE);
- fw->store_buffer(buf.ptr(), buf.size());
+ fw->store_buffer(buf2.ptr(), buf2.size());
memdelete(fw);
}
diff --git a/main/tests/test_image.cpp b/main/tests/test_image.cpp
deleted file mode 100644
index ee4f43bae0..0000000000
--- a/main/tests/test_image.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************/
-/* test_image.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "test_image.h"
-
-#include "core/io/image_loader.h"
-#include "core/math/math_funcs.h"
-#include "core/os/main_loop.h"
-#include "core/print_string.h"
-
-namespace TestImage {
-
-class TestMainLoop : public MainLoop {
-
- bool quit;
-
-public:
- virtual void input_event(const Ref<InputEvent> &p_event) {
- }
-
- virtual void init() {
-
- quit = false;
- }
- virtual bool iteration(float p_time) {
-
- return quit;
- }
-
- virtual bool idle(float p_time) {
- return quit;
- }
-
- virtual void finish() {
- }
-};
-
-MainLoop *test() {
-
- return memnew(TestMainLoop);
-}
-} // namespace TestImage
diff --git a/main/tests/test_main.cpp b/main/tests/test_main.cpp
index 49f5cc5a18..22f1d7319f 100644
--- a/main/tests/test_main.cpp
+++ b/main/tests/test_main.cpp
@@ -36,7 +36,6 @@
#include "test_astar.h"
#include "test_gdscript.h"
#include "test_gui.h"
-#include "test_image.h"
#include "test_math.h"
#include "test_oa_hash_map.h"
#include "test_ordered_hash_map.h"
@@ -61,7 +60,6 @@ const char **tests_get_names() {
"gd_parser",
"gd_compiler",
"gd_bytecode",
- "image",
"ordered_hash_map",
"astar",
NULL
@@ -134,11 +132,6 @@ MainLoop *test_main(String p_test, const List<String> &p_args) {
return TestGDScript::test(TestGDScript::TEST_BYTECODE);
}
- if (p_test == "image") {
-
- return TestImage::test();
- }
-
if (p_test == "ordered_hash_map") {
return TestOrderedHashMap::test();
@@ -149,6 +142,7 @@ MainLoop *test_main(String p_test, const List<String> &p_args) {
return TestAStar::test();
}
+ print_line("Unknown test: " + p_test);
return NULL;
}
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index a082abcaba..f341159079 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -30,9 +30,9 @@
#include "test_math.h"
+#include "core/math/basis.h"
#include "core/math/camera_matrix.h"
#include "core/math/math_funcs.h"
-#include "core/math/matrix3.h"
#include "core/math/transform.h"
#include "core/os/file_access.h"
#include "core/os/keyboard.h"
diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp
index ebaf7fd602..dcb19b7df7 100644
--- a/main/tests/test_shader_lang.cpp
+++ b/main/tests/test_shader_lang.cpp
@@ -110,7 +110,7 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
for (Map<StringName, SL::ShaderNode::Uniform>::Element *E = pnode->uniforms.front(); E; E = E->next()) {
String ucode = "uniform ";
- ucode += _prestr(E->get().precission);
+ ucode += _prestr(E->get().precision);
ucode += _typestr(E->get().type);
ucode += " " + String(E->key());
@@ -137,7 +137,7 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
for (Map<StringName, SL::ShaderNode::Varying>::Element *E = pnode->varyings.front(); E; E = E->next()) {
String vcode = "varying ";
- vcode += _prestr(E->get().precission);
+ vcode += _prestr(E->get().precision);
vcode += _typestr(E->get().type);
vcode += " " + String(E->key());
@@ -149,11 +149,11 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
String header;
header = _typestr(fnode->return_type) + " " + fnode->name + "(";
- for (int i = 0; i < fnode->arguments.size(); i++) {
+ for (int j = 0; j < fnode->arguments.size(); j++) {
- if (i > 0)
+ if (j > 0)
header += ", ";
- header += _prestr(fnode->arguments[i].precision) + _typestr(fnode->arguments[i].type) + " " + fnode->arguments[i].name;
+ header += _prestr(fnode->arguments[j].precision) + _typestr(fnode->arguments[j].type) + " " + fnode->arguments[j].name;
}
header += ")\n";
@@ -336,9 +336,9 @@ MainLoop *test() {
print_line("Error at line: " + rtos(sl.get_error_line()) + ": " + sl.get_error_text());
return NULL;
} else {
- String code;
- recreate_code(&code, sl.get_shader());
- print_line("code:\n\n" + code);
+ String code2;
+ recreate_code(&code2, sl.get_shader());
+ print_line("code:\n\n" + code2);
}
return NULL;
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index 511646db0a..3465fd783e 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -457,7 +457,7 @@ bool test_27() {
state = s.begins_with(sb) == tc[i].expected;
}
if (!state) {
- OS::get_singleton()->print("\n\t Failure on:\n\t\tstring: ", tc[i].data, "\n\t\tbegin: ", tc[i].begin, "\n\t\texpected: ", tc[i].expected ? "true" : "false", "\n");
+ OS::get_singleton()->print("\n\t Failure on:\n\t\tstring: %s\n\t\tbegin: %s\n\t\texpected: %s\n", tc[i].data, tc[i].begin, tc[i].expected ? "true" : "false");
break;
}
};
@@ -1046,6 +1046,13 @@ bool test_32() {
#undef STRIP_TEST
}
+bool test_33() {
+ OS::get_singleton()->print("\n\nTest 33: parse_utf8(null, -1)\n");
+
+ String empty;
+ return empty.parse_utf8(NULL, -1) == true;
+}
+
typedef bool (*TestFunc)(void);
TestFunc test_funcs[] = {
@@ -1082,6 +1089,7 @@ TestFunc test_funcs[] = {
test_30,
test_31,
test_32,
+ test_33,
0
};
diff --git a/methods.py b/methods.py
index f8fc6c64ef..7465962187 100644
--- a/methods.py
+++ b/methods.py
@@ -55,20 +55,28 @@ def update_version(module_version_string=""):
f.write("#define VERSION_STATUS \"" + str(version.status) + "\"\n")
f.write("#define VERSION_BUILD \"" + str(build_name) + "\"\n")
f.write("#define VERSION_MODULE_CONFIG \"" + str(version.module_config) + module_version_string + "\"\n")
- f.write("#define VERSION_YEAR " + str(2018) + "\n")
+ f.write("#define VERSION_YEAR " + str(version.year) + "\n")
f.close()
# NOTE: It is safe to generate this file here, since this is still executed serially
fhash = open("core/version_hash.gen.h", "w")
githash = ""
- if os.path.isfile(".git/HEAD"):
- head = open(".git/HEAD", "r").readline().strip()
+ gitfolder = ".git"
+
+ if os.path.isfile(".git"):
+ module_folder = open(".git", "r").readline().strip()
+ if module_folder.startswith("gitdir: "):
+ gitfolder = module_folder[8:]
+
+ if os.path.isfile(os.path.join(gitfolder, "HEAD")):
+ head = open(os.path.join(gitfolder, "HEAD"), "r").readline().strip()
if head.startswith("ref: "):
- head = ".git/" + head[5:]
+ head = os.path.join(gitfolder, head[5:])
if os.path.isfile(head):
githash = open(head, "r").readline().strip()
else:
githash = head
+
fhash.write("#define VERSION_HASH \"" + githash + "\"")
fhash.close()
@@ -652,3 +660,13 @@ def detect_darwin_sdk_path(platform, env):
print("Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name))
raise
+def get_compiler_version(env):
+ version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip())
+ match = re.search('[0-9][0-9.]*', version)
+ if match is not None:
+ return match.group().split('.')
+ else:
+ return None
+
+def use_gcc(env):
+ return 'gcc' in os.path.basename(env["CC"])
diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
index a9a40c0508..569033d93c 100644
--- a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
+++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
@@ -17,6 +17,7 @@
1FE9269F1FBBF86B00F53A6F /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FE926901FBBF78E00F53A6F /* CoreMedia.framework */; };
1FE926A01FBBF86D00F53A6F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FE9268E1FBBF77300F53A6F /* AudioToolbox.framework */; };
1FE926A11FBBF86D00F53A6F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FE9268F1FBBF77F00F53A6F /* CoreAudio.framework */; };
+ E360193721F32F38009258C1 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E360193621F32F37009258C1 /* CoreVideo.framework */; };
DEADBEEF2F582BE20003B888 /* $binary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DEADBEEF1F582BE20003B888 /* $binary.a */; };
1FF8DBB11FBA9DE1009DE660 /* dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */; };
1FF4C1851F584E3F00A41E41 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FF4C1841F584E3F00A41E41 /* GameKit.framework */; };
@@ -53,6 +54,7 @@
D0BCFE3418AEBDA2004A7AAE /* $binary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = $binary.app; sourceTree = BUILT_PRODUCTS_DIR; };
D0BCFE3718AEBDA2004A7AAE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D0BCFE3918AEBDA2004A7AAE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ E360193621F32F37009258C1 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
D0BCFE3B18AEBDA2004A7AAE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
D0BCFE3D18AEBDA2004A7AAE /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
D0BCFE3F18AEBDA2004A7AAE /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
@@ -69,6 +71,7 @@
buildActionMask = 2147483647;
files = (
D0BCFE3A18AEBDA2004A7AAE /* CoreGraphics.framework in Frameworks */,
+ E360193721F32F38009258C1 /* CoreVideo.framework in Frameworks */,
1FE926991FBBF85400F53A6F /* SystemConfiguration.framework in Frameworks */,
1FE9269A1FBBF85F00F53A6F /* Security.framework in Frameworks */,
1FE9269B1FBBF86200F53A6F /* QuartzCore.framework in Frameworks */,
@@ -124,6 +127,7 @@
1FE926911FBBF79500F53A6F /* CoreMotion.framework */,
1FE926901FBBF78E00F53A6F /* CoreMedia.framework */,
1FE9268F1FBBF77F00F53A6F /* CoreAudio.framework */,
+ E360193621F32F37009258C1 /* CoreVideo.framework */,
1FE9268E1FBBF77300F53A6F /* AudioToolbox.framework */,
1FF4C1861F584E5600A41E41 /* StoreKit.framework */,
1FF4C1841F584E3F00A41E41 /* GameKit.framework */,
@@ -190,15 +194,82 @@
TargetAttributes = {
D0BCFE3318AEBDA2004A7AAE = {
DevelopmentTeam = $team_id;
+ ProvisioningStyle = Automatic;
SystemCapabilities = {
- com.apple.GameCenter = {
- enabled = 1;
+ com.apple.AccessWiFi = {
+ enabled = $access_wifi;
+ };
+ com.apple.ApplePay = {
+ enabled = 0;
+ };
+ com.apple.ApplicationGroups.iOS = {
+ enabled = 0;
+ };
+ com.apple.AutoFillCredentialProvider = {
+ enabled = 0;
+ };
+ com.apple.BackgroundModes = {
+ enabled = 0;
+ };
+ com.apple.ClassKit = {
+ enabled = 0;
+ };
+ com.apple.DataProtection = {
+ enabled = 0;
+ };
+ com.apple.GameCenter.iOS = {
+ enabled = $game_center;
+ };
+ com.apple.HealthKit = {
+ enabled = 0;
+ };
+ com.apple.HomeKit = {
+ enabled = 0;
+ };
+ com.apple.HotspotConfiguration = {
+ enabled = 0;
};
com.apple.InAppPurchase = {
- enabled = 1;
+ enabled = $in_app_purchases;
+ };
+ com.apple.InterAppAudio = {
+ enabled = 0;
+ };
+ com.apple.Keychain = {
+ enabled = 0;
+ };
+ com.apple.Maps.iOS = {
+ enabled = 0;
+ };
+ com.apple.Multipath = {
+ enabled = 0;
+ };
+ com.apple.NearFieldCommunicationTagReading = {
+ enabled = 0;
+ };
+ com.apple.NetworkExtensions.iOS = {
+ enabled = 0;
};
com.apple.Push = {
- enabled = 1;
+ enabled = $push_notifications;
+ };
+ com.apple.SafariKeychain = {
+ enabled = 0;
+ };
+ com.apple.Siri = {
+ enabled = 0;
+ };
+ com.apple.VPNLite = {
+ enabled = 0;
+ };
+ com.apple.WAC = {
+ enabled = 0;
+ };
+ com.apple.Wallet = {
+ enabled = 0;
+ };
+ com.apple.iCloud = {
+ enabled = 0;
};
};
};
@@ -277,6 +348,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "$code_sign_identity_debug";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "$code_sign_identity_debug";
COPY_PHASE_STRIP = NO;
ENABLE_BITCODE = NO;
@@ -400,7 +472,7 @@
D0BCFE7018AEBDA3004A7AAE /* Release */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
+ defaultConfigurationName = Debug;
};
D0BCFE7118AEBDA3004A7AAE /* Build configuration list for PBXNativeTarget "$binary" */ = {
isa = XCConfigurationList;
@@ -409,7 +481,7 @@
D0BCFE7318AEBDA3004A7AAE /* Release */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
+ defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};
diff --git a/misc/dist/ios_xcode/godot_ios/godot_ios-Info.plist b/misc/dist/ios_xcode/godot_ios/godot_ios-Info.plist
index 6907ae4a9d..b7cd94e3d5 100644
--- a/misc/dist/ios_xcode/godot_ios/godot_ios-Info.plist
+++ b/misc/dist/ios_xcode/godot_ios/godot_ios-Info.plist
@@ -13,7 +13,7 @@
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
- <string>$identifier</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -30,26 +30,23 @@
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
- <string>armv7</string>
- <string>gamekit</string>
+ $required_device_capabilities
</array>
+ <key>NSCameraUsageDescription</key>
+ <string>$camera_usage_description</string>
+ <key>NSPhotoLibraryUsageDescription</key>
+ <string>$photolibrary_usage_description</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ $interface_orientations
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ $interface_orientations
</array>
$additional_plist_content
</dict>
diff --git a/misc/dist/linux/godot.6 b/misc/dist/linux/godot.6
index e6fd1b9991..4860c7b5a8 100644
--- a/misc/dist/linux/godot.6
+++ b/misc/dist/linux/godot.6
@@ -1,4 +1,4 @@
-.TH GODOT "6" "January 2019" "godot 3.1" "Games"
+.TH GODOT "6" "March 2019" "godot 3.2" "Games"
.SH NAME
godot \- multi\-platform 2D and 3D game engine with a feature\-rich editor
.SH SYNOPSIS
@@ -56,7 +56,7 @@ Remote filesystem (<host/IP>[:<port>] address).
Password for remote filesystem.
.TP
\fB\-\-audio\-driver\fR <driver>
-Audio driver ('PulseAudio', 'ALSA').
+Audio driver ('PulseAudio', 'ALSA', 'Dummy').
.TP
\fB\-\-video\-driver\fR <driver>
Video driver ('GLES3', 'GLES2').
@@ -133,7 +133,7 @@ Only parse for errors and quit (use with --script).
\fB\-\-export\fR <target>
Export the project using the given export target. Export only main pack if path ends with .pck or .zip.
.TP
-\fB\-\-export\-debug\fR
+\fB\-\-export\-debug\fR <target>
Like \-\-export, but use debug template.
.TP
\fB\-\-doctool\fR <path>
@@ -149,7 +149,7 @@ Build the scripting solutions (e.g. for C# projects).
Generate JSON dump of the Godot API for GDNative bindings.
.TP
\fB\-\-test\fR <test>
-Run a unit test ('string', 'math', 'physics', 'physics_2d', 'render', 'oa_hash_map', 'gui', 'shaderlang', 'gd_tokenizer', 'gd_parser', 'gd_compiler', 'gd_bytecode', 'image', 'ordered_hash_map').
+Run a unit test ('string', 'math', 'physics', 'physics_2d', 'render', 'oa_hash_map', 'gui', 'shaderlang', 'gd_tokenizer', 'gd_parser', 'gd_compiler', 'gd_bytecode', 'ordered_hash_map', 'astar').
.SH FILES
XDG_DATA_CONFIG/godot/ or ~/.config/godot/
.RS
diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/osx_tools.app/Contents/Info.plist
index 97d769c824..1a116527bb 100755
--- a/misc/dist/osx_tools.app/Contents/Info.plist
+++ b/misc/dist/osx_tools.app/Contents/Info.plist
@@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>3.0</string>
+ <string>3.2</string>
<key>CFBundleSignature</key>
<string>godot</string>
<key>CFBundleVersion</key>
- <string>3.0</string>
+ <string>3.2</string>
<key>NSHumanReadableCopyright</key>
<string>© 2007-2019 Juan Linietsky, Ariel Manzur &amp; Godot Engine contributors</string>
<key>LSMinimumSystemVersion</key>
diff --git a/modules/bullet/SCsub b/modules/bullet/SCsub
index 0416dd7f5f..7e714ba43f 100644
--- a/modules/bullet/SCsub
+++ b/modules/bullet/SCsub
@@ -187,8 +187,8 @@ if env['builtin_bullet']:
thirdparty_sources = [thirdparty_dir + file for file in bullet2_src]
env_bullet.Append(CPPPATH=[thirdparty_dir])
- if env['target'] == "debug" or env['target'] == "release_debug":
- env_bullet.Append(CCFLAGS=['-DBT_DEBUG'])
+ # if env['target'] == "debug" or env['target'] == "release_debug":
+ # env_bullet.Append(CCFLAGS=['-DBT_DEBUG'])
env_thirdparty = env_bullet.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/bullet/btRayShape.cpp b/modules/bullet/btRayShape.cpp
index 935d86daa6..b902d08eca 100644
--- a/modules/bullet/btRayShape.cpp
+++ b/modules/bullet/btRayShape.cpp
@@ -79,7 +79,7 @@ void btRayShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVecto
void btRayShape::getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const {
#define MARGIN_BROADPHASE 0.1
btVector3 localAabbMin(0, 0, 0);
- btVector3 localAabbMax(m_shapeAxis * m_length);
+ btVector3 localAabbMax(m_shapeAxis * (m_cacheScaledLength + m_collisionMargin));
btTransformAabb(localAabbMin, localAabbMax, MARGIN_BROADPHASE, t, aabbMin, aabbMax);
}
@@ -97,8 +97,8 @@ void btRayShape::getPreferredPenetrationDirection(int index, btVector3 &penetrat
void btRayShape::reload_cache() {
- m_cacheScaledLength = m_length * m_localScaling[2] + m_collisionMargin;
+ m_cacheScaledLength = m_length * m_localScaling[2];
m_cacheSupportPoint.setIdentity();
- m_cacheSupportPoint.setOrigin(m_shapeAxis * m_cacheScaledLength);
+ m_cacheSupportPoint.setOrigin(m_shapeAxis * (m_cacheScaledLength + m_collisionMargin));
}
diff --git a/modules/bullet/bullet_types_converter.h b/modules/bullet/bullet_types_converter.h
index 57c3300b3d..ba36331d07 100644
--- a/modules/bullet/bullet_types_converter.h
+++ b/modules/bullet/bullet_types_converter.h
@@ -31,7 +31,7 @@
#ifndef BULLET_TYPES_CONVERTER_H
#define BULLET_TYPES_CONVERTER_H
-#include "core/math/matrix3.h"
+#include "core/math/basis.h"
#include "core/math/transform.h"
#include "core/math/vector3.h"
#include "core/typedefs.h"
diff --git a/modules/bullet/collision_object_bullet.cpp b/modules/bullet/collision_object_bullet.cpp
index 91a5ed095a..ef5f21fc21 100644
--- a/modules/bullet/collision_object_bullet.cpp
+++ b/modules/bullet/collision_object_bullet.cpp
@@ -69,8 +69,12 @@ void CollisionObjectBullet::ShapeWrapper::claim_bt_shape(const btVector3 &body_s
CollisionObjectBullet::CollisionObjectBullet(Type p_type) :
RIDBullet(),
type(p_type),
+ instance_id(0),
+ collisionLayer(0),
+ collisionMask(0),
collisionsEnabled(true),
m_isStatic(false),
+ ray_pickable(false),
bt_collision_object(NULL),
body_scale(1., 1., 1.),
force_shape_reset(false),
diff --git a/modules/bullet/godot_ray_world_algorithm.cpp b/modules/bullet/godot_ray_world_algorithm.cpp
index 449f625e17..3e06239453 100644
--- a/modules/bullet/godot_ray_world_algorithm.cpp
+++ b/modules/bullet/godot_ray_world_algorithm.cpp
@@ -35,8 +35,6 @@
#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
-#define RAY_STABILITY_MARGIN 0.1
-
/**
@author AndreaCatania
*/
@@ -102,7 +100,7 @@ void GodotRayWorldAlgorithm::processCollision(const btCollisionObjectWrapper *bo
btScalar depth(ray_shape->getScaledLength() * (btResult.m_closestHitFraction - 1));
- if (depth >= -RAY_STABILITY_MARGIN)
+ if (depth >= -ray_shape->getMargin() * 0.5)
depth = 0;
if (ray_shape->getSlipsOnSlope())
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp
index 7babfcc133..360950c4c7 100644
--- a/modules/bullet/godot_result_callbacks.cpp
+++ b/modules/bullet/godot_result_callbacks.cpp
@@ -333,14 +333,6 @@ void GodotDeepPenetrationContactResultCallback::addContactPoint(const btVector3
m_other_compound_shape_index = isSwapped ? m_index0 : m_index1;
m_pointWorld = isSwapped ? (pointInWorldOnB + (normalOnBInWorld * depth)) : pointInWorldOnB;
- const btCollisionObjectWrapper *bw0 = m_body0Wrap;
- if (isSwapped)
- bw0 = m_body1Wrap;
-
- if (bw0->getCollisionShape()->getShapeType() == CUSTOM_CONVEX_SHAPE_TYPE) {
- m_pointNormalWorld = bw0->m_worldTransform.getBasis().transpose() * btVector3(0, 0, 1);
- } else {
- m_pointNormalWorld = isSwapped ? normalOnBInWorld * -1 : normalOnBInWorld;
- }
+ m_pointNormalWorld = isSwapped ? normalOnBInWorld * -1 : normalOnBInWorld;
}
}
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index 784e99ab86..1e1bea846a 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -167,7 +167,7 @@ public:
KinematicShape() :
shape(NULL) {}
- const bool is_active() const { return shape; }
+ bool is_active() const { return shape; }
};
struct KinematicUtilities {
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 6562b18b3c..8fb8eba057 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -658,6 +658,8 @@ void SpaceBullet::check_ghost_overlaps() {
for (x = areas.size() - 1; 0 <= x; --x) {
area = areas[x];
+ btVector3 area_scale(area->get_bt_body_scale());
+
if (!area->is_monitoring())
continue;
@@ -681,9 +683,10 @@ void SpaceBullet::check_ghost_overlaps() {
bool hasOverlap = false;
btCollisionObject *overlapped_bt_co = ghostOverlaps[i];
RigidCollisionObjectBullet *otherObject = static_cast<RigidCollisionObjectBullet *>(overlapped_bt_co->getUserPointer());
+ btVector3 other_body_scale(otherObject->get_bt_body_scale());
if (!area->is_transform_changed() && !otherObject->is_transform_changed()) {
- hasOverlap = true;
+ hasOverlap = -1 != area->find_overlapping_object(otherObject);
goto collision_found;
}
@@ -698,19 +701,38 @@ void SpaceBullet::check_ghost_overlaps() {
if (!area->get_bt_shape(y)->isConvex())
continue;
- gjk_input.m_transformA = area->get_transform__bullet() * area->get_bt_shape_transform(y);
+ btTransform area_shape_treansform(area->get_bt_shape_transform(y));
+ area_shape_treansform.getOrigin() *= area_scale;
+
+ gjk_input.m_transformA =
+ area->get_transform__bullet() *
+ area_shape_treansform;
+
area_shape = static_cast<btConvexShape *>(area->get_bt_shape(y));
// For each other object shape
for (z = otherObject->get_shape_count() - 1; 0 <= z; --z) {
other_body_shape = static_cast<btCollisionShape *>(otherObject->get_bt_shape(z));
- gjk_input.m_transformB = otherObject->get_transform__bullet() * otherObject->get_bt_shape_transform(z);
+
+ if (other_body_shape->isConcave())
+ continue;
+
+ btTransform other_shape_transform(otherObject->get_bt_shape_transform(z));
+ other_shape_transform.getOrigin() *= other_body_scale;
+
+ gjk_input.m_transformB =
+ otherObject->get_transform__bullet() *
+ other_shape_transform;
if (other_body_shape->isConvex()) {
btPointCollector result;
- btGjkPairDetector gjk_pair_detector(area_shape, static_cast<btConvexShape *>(other_body_shape), gjk_simplex_solver, gjk_epa_pen_solver);
+ btGjkPairDetector gjk_pair_detector(
+ area_shape,
+ static_cast<btConvexShape *>(other_body_shape),
+ gjk_simplex_solver,
+ gjk_epa_pen_solver);
gjk_pair_detector.getClosestPoints(gjk_input, result, 0);
if (0 >= result.m_distance) {
@@ -1224,6 +1246,21 @@ bool SpaceBullet::RFP_convex_world_test(const btConvexShape *p_shapeA, const btC
return false;
}
+void SpaceBullet::convert_to_separation_result(PhysicsServer::SeparationResult *r_result, const SpaceBullet::RecoverResult &p_recover_result, int p_shape_id, const btCollisionObject *p_other_object) const {
+
+ const btRigidBody *btRigid = static_cast<const btRigidBody *>(p_other_object);
+ CollisionObjectBullet *collisionObject = static_cast<CollisionObjectBullet *>(p_other_object->getUserPointer());
+
+ r_result->collision_depth = p_recover_result.penetration_distance;
+ B_TO_G(p_recover_result.pointWorld, r_result->collision_point);
+ B_TO_G(p_recover_result.normal, r_result->collision_normal);
+ B_TO_G(btRigid->getVelocityInLocalPoint(p_recover_result.pointWorld - btRigid->getWorldTransform().getOrigin()), r_result->collider_velocity);
+ r_result->collision_local_shape = p_shape_id;
+ r_result->collider_id = collisionObject->get_instance_id();
+ r_result->collider = collisionObject->get_self();
+ r_result->collider_shape = p_recover_result.other_compound_shape_index;
+}
+
int SpaceBullet::recover_from_penetration_ray(RigidBodyBullet *p_body, const btTransform &p_body_position, btScalar p_recover_movement_scale, bool p_infinite_inertia, int p_result_max, btVector3 &r_delta_recover_movement, PhysicsServer::SeparationResult *r_results) {
RecoverPenetrationBroadPhaseCallback recover_broad_result(p_body->get_bt_collision_object(), p_body->get_collision_layer(), p_body->get_collision_mask());
@@ -1275,22 +1312,19 @@ int SpaceBullet::recover_from_penetration_ray(RigidBodyBullet *p_body, const btT
btCompoundShape *cs = static_cast<btCompoundShape *>(otherObject->getCollisionShape());
for (int x = cs->getNumChildShapes() - 1; 0 <= x; --x) {
- RecoverResult r_recover_result;
- if (RFP_convex_world_test(kin_shape.shape, cs->getChildShape(x), p_body->get_bt_collision_object(), otherObject, kinIndex, x, body_shape_position, otherObject->getWorldTransform() * cs->getChildTransform(x), p_recover_movement_scale, r_delta_recover_movement, &r_recover_result)) {
+ RecoverResult recover_result;
+ if (RFP_convex_world_test(kin_shape.shape, cs->getChildShape(x), p_body->get_bt_collision_object(), otherObject, kinIndex, x, body_shape_position, otherObject->getWorldTransform() * cs->getChildTransform(x), p_recover_movement_scale, r_delta_recover_movement, &recover_result)) {
- const btRigidBody *btRigid = static_cast<const btRigidBody *>(otherObject);
- CollisionObjectBullet *collisionObject = static_cast<CollisionObjectBullet *>(otherObject->getUserPointer());
-
- r_results[ray_index].collision_depth = r_recover_result.penetration_distance;
- B_TO_G(r_recover_result.pointWorld, r_results[ray_index].collision_point);
- B_TO_G(r_recover_result.normal, r_results[ray_index].collision_normal);
- B_TO_G(btRigid->getVelocityInLocalPoint(r_recover_result.pointWorld - btRigid->getWorldTransform().getOrigin()), r_results[ray_index].collider_velocity);
- r_results[ray_index].collision_local_shape = kinIndex;
- r_results[ray_index].collider_id = collisionObject->get_instance_id();
- r_results[ray_index].collider = collisionObject->get_self();
- r_results[ray_index].collider_shape = r_recover_result.other_compound_shape_index;
+ convert_to_separation_result(&r_results[ray_index], recover_result, kinIndex, otherObject);
}
}
+ } else {
+
+ RecoverResult recover_result;
+ if (RFP_convex_world_test(kin_shape.shape, otherObject->getCollisionShape(), p_body->get_bt_collision_object(), otherObject, kinIndex, 0, body_shape_position, otherObject->getWorldTransform(), p_recover_movement_scale, r_delta_recover_movement, &recover_result)) {
+
+ convert_to_separation_result(&r_results[ray_index], recover_result, kinIndex, otherObject);
+ }
}
}
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h
index 9f36c63982..7bf6a216b5 100644
--- a/modules/bullet/space_bullet.h
+++ b/modules/bullet/space_bullet.h
@@ -212,6 +212,7 @@ private:
/// Using this we leave Bullet to select the best algorithm, For example GJK in case we have Convex Convex, or a Bullet accelerated algorithm
bool RFP_convex_world_test(const btConvexShape *p_shapeA, const btCollisionShape *p_shapeB, btCollisionObject *p_objectA, btCollisionObject *p_objectB, int p_shapeId_A, int p_shapeId_B, const btTransform &p_transformA, const btTransform &p_transformB, btScalar p_recover_movement_scale, btVector3 &r_delta_recover_movement, RecoverResult *r_recover_result = NULL);
+ void convert_to_separation_result(PhysicsServer::SeparationResult *r_result, const SpaceBullet::RecoverResult &p_recover_result, int p_shape_id, const btCollisionObject *p_other_object) const;
int recover_from_penetration_ray(RigidBodyBullet *p_body, const btTransform &p_body_position, btScalar p_recover_movement_scale, bool p_infinite_inertia, int p_result_max, btVector3 &r_delta_recover_movement, PhysicsServer::SeparationResult *r_results);
};
#endif
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index 12282b4730..0eb539b182 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -32,7 +32,7 @@
#include "core/math/face3.h"
#include "core/math/geometry.h"
#include "core/os/os.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "thirdparty/misc/triangulator.h"
void CSGBrush::clear() {
@@ -666,14 +666,14 @@ void CSGBrushOperation::_add_poly_points(const BuildPoly &p_poly, int p_edge, in
if (opposite_point == prev_point)
continue; //not going back
- EdgeSort e;
+ EdgeSort e2;
Vector2 local_vec = t2d.xform(p_poly.points[opposite_point].point);
- e.angle = -local_vec.angle(); //negate so we can sort by minimum angle
- e.edge = edge;
- e.edge_point = opposite_point;
- e.prev_point = to_point;
+ e2.angle = -local_vec.angle(); //negate so we can sort by minimum angle
+ e2.edge = edge;
+ e2.edge_point = opposite_point;
+ e2.prev_point = to_point;
- next_edges.push_back(e);
+ next_edges.push_back(e2);
}
//finally, sort by minimum angle
@@ -953,13 +953,15 @@ void CSGBrushOperation::_merge_poly(MeshMerge &mesh, int p_face_idx, const Build
//duplicate point
int insert_at = with_outline_vertex;
- polys.write[i].points.insert(insert_at, polys[i].points[insert_at]);
+ int point = polys[i].points[insert_at];
+ polys.write[i].points.insert(insert_at, point);
insert_at++;
//insert all others, outline should be backwards (must check)
int holesize = polys[i].holes[j].size();
for (int k = 0; k <= holesize; k++) {
int idx = (from_hole_vertex + k) % holesize;
- polys.write[i].points.insert(insert_at, polys[i].holes[j][idx]);
+ int point2 = polys[i].holes[j][idx];
+ polys.write[i].points.insert(insert_at, point2);
insert_at++;
}
diff --git a/modules/csg/csg.h b/modules/csg/csg.h
index ac16575e82..4fa1a945cc 100644
--- a/modules/csg/csg.h
+++ b/modules/csg/csg.h
@@ -31,7 +31,6 @@
#ifndef CSG_H
#define CSG_H
-#include "core/dvector.h"
#include "core/map.h"
#include "core/math/aabb.h"
#include "core/math/plane.h"
@@ -39,6 +38,7 @@
#include "core/math/transform.h"
#include "core/math/vector3.h"
#include "core/oa_hash_map.h"
+#include "core/pool_vector.h"
#include "scene/resources/material.h"
struct CSGBrush {
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index 3044887ef5..d4069b901f 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -283,6 +283,10 @@ String CSGShapeSpatialGizmoPlugin::get_name() const {
return "CSGShapes";
}
+int CSGShapeSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
bool CSGShapeSpatialGizmoPlugin::is_selectable_when_hidden() const {
return true;
}
diff --git a/modules/csg/csg_gizmos.h b/modules/csg/csg_gizmos.h
index b208c39938..0915d05111 100644
--- a/modules/csg/csg_gizmos.h
+++ b/modules/csg/csg_gizmos.h
@@ -42,6 +42,7 @@ class CSGShapeSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
bool is_selectable_when_hidden() const;
void redraw(EditorSpatialGizmo *p_gizmo);
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index f62e6f5c40..f274fff3f3 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -531,6 +531,13 @@ void CSGShape::_notification(int p_what) {
}
}
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+
+ if (parent) {
+ parent->_make_dirty();
+ }
+ }
+
if (p_what == NOTIFICATION_EXIT_TREE) {
if (parent)
diff --git a/modules/csg/doc_classes/CSGShape.xml b/modules/csg/doc_classes/CSGShape.xml
index 56087cbb82..d304d0179f 100644
--- a/modules/csg/doc_classes/CSGShape.xml
+++ b/modules/csg/doc_classes/CSGShape.xml
@@ -29,6 +29,12 @@
Returns an individual bit on the collision mask.
</description>
</method>
+ <method name="get_meshes" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_root_shape" qualifiers="const">
<return type="bool">
</return>
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index a063942269..0a94690989 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -263,14 +263,14 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
colsize = 4;
}
- int w = width;
- int h = height;
+ int w2 = width;
+ int h2 = height;
for (uint32_t i = 1; i < mipmaps; i++) {
- w = (w + 1) >> 1;
- h = (h + 1) >> 1;
- size += w * h * info.block_size;
+ w2 = (w2 + 1) >> 1;
+ h2 = (h2 + 1) >> 1;
+ size += w2 * h2 * info.block_size;
}
src_data.resize(size + 256 * colsize);
diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
index 4976a90945..c9a7d96ae7 100644
--- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
+++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
@@ -36,7 +36,7 @@
<argument index="4" name="client_port" type="int" default="0">
</argument>
<description>
- Create client that connects to a server at [code]address[/code] using specified [code]port[/code]. The given address needs to be either a fully qualified domain nome (e.g. [code]www.example.com[/code]) or an IP address in IPv4 or IPv6 format (e.g. [code]192.168.1.1[/code]). The [code]port[/code] is the port the server is listening on. The [code]in_bandwidth[/code] and [code]out_bandwidth[/code] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns [code]OK[/code] if a client was created, [code]ERR_ALREADY_IN_USE[/code] if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call [method close_connection] first) or [code]ERR_CANT_CREATE[/code] if the client could not be created. If [code]client_port[/code] is specified, the client will also listen to the given port, this is useful in some NAT traversal technique.
+ Create client that connects to a server at [code]address[/code] using specified [code]port[/code]. The given address needs to be either a fully qualified domain name (e.g. [code]www.example.com[/code]) or an IP address in IPv4 or IPv6 format (e.g. [code]192.168.1.1[/code]). The [code]port[/code] is the port the server is listening on. The [code]in_bandwidth[/code] and [code]out_bandwidth[/code] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns [code]OK[/code] if a client was created, [code]ERR_ALREADY_IN_USE[/code] if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call [method close_connection] first) or [code]ERR_CANT_CREATE[/code] if the client could not be created. If [code]client_port[/code] is specified, the client will also listen to the given port, this is useful in some NAT traversal technique.
</description>
</method>
<method name="create_server">
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index e53846e269..000917507a 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -231,6 +231,13 @@ void NetworkedMultiplayerENet::poll() {
break;
}
+ // A client joined with an invalid ID (neagtive values, 0, and 1 are reserved).
+ // Probably trying to exploit us.
+ if (server && ((int)event.data < 2 || peer_map.has((int)event.data))) {
+ enet_peer_reset(event.peer);
+ ERR_CONTINUE(true);
+ }
+
int *new_id = memnew(int);
*new_id = event.data;
@@ -426,7 +433,6 @@ bool NetworkedMultiplayerENet::is_server() const {
void NetworkedMultiplayerENet::close_connection(uint32_t wait_usec) {
ERR_FAIL_COND(!active);
- ERR_FAIL_COND(wait_usec < 0);
_pop_current_packet();
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
index 01fbc316cf..9cd37ac950 100644
--- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp
+++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
@@ -31,7 +31,7 @@
#include "arvr_interface_gdnative.h"
#include "main/input_default.h"
#include "servers/arvr/arvr_positional_tracker.h"
-#include "servers/visual/visual_server_global.h"
+#include "servers/visual/visual_server_globals.h"
ARVRInterfaceGDNative::ARVRInterfaceGDNative() {
// testing
@@ -223,7 +223,7 @@ void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_
Ref<ARVRInterfaceGDNative> new_interface;
new_interface.instance();
- new_interface->set_interface((godot_arvr_interface_gdnative *const)p_interface);
+ new_interface->set_interface((const godot_arvr_interface_gdnative *)p_interface);
ARVRServer::get_singleton()->add_interface(new_interface);
}
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 34325db9fd..e8278825bc 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -414,6 +414,7 @@ bool GDNative::terminate() {
if (error || !library_terminate) {
OS::get_singleton()->close_dynamic_library(native_handle);
native_handle = NULL;
+ initialized = false;
return true;
}
diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp
index 18da9d811e..6849ff03d7 100644
--- a/modules/gdnative/gdnative/array.cpp
+++ b/modules/gdnative/gdnative/array.cpp
@@ -34,7 +34,7 @@
#include "core/os/memory.h"
#include "core/color.h"
-#include "core/dvector.h"
+#include "core/pool_vector.h"
#include "core/variant.h"
diff --git a/modules/gdnative/gdnative/basis.cpp b/modules/gdnative/gdnative/basis.cpp
index 4441a03ca1..d77c7d91ac 100644
--- a/modules/gdnative/gdnative/basis.cpp
+++ b/modules/gdnative/gdnative/basis.cpp
@@ -30,7 +30,7 @@
#include "gdnative/basis.h"
-#include "core/math/matrix3.h"
+#include "core/math/basis.h"
#include "core/variant.h"
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/dictionary.cpp b/modules/gdnative/gdnative/dictionary.cpp
index a18d221a7c..2c6c9e2de2 100644
--- a/modules/gdnative/gdnative/dictionary.cpp
+++ b/modules/gdnative/gdnative/dictionary.cpp
@@ -155,12 +155,26 @@ godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_self) {
return raw_dest;
}
+// GDNative core 1.1
+
godot_bool GDAPI godot_dictionary_erase_with_return(godot_dictionary *p_self, const godot_variant *p_key) {
Dictionary *self = (Dictionary *)p_self;
const Variant *key = (const Variant *)p_key;
return self->erase(*key);
}
+godot_variant GDAPI godot_dictionary_get_with_default(const godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_default) {
+ const Dictionary *self = (const Dictionary *)p_self;
+ const Variant *key = (const Variant *)p_key;
+ const Variant *def = (const Variant *)p_default;
+
+ godot_variant raw_dest;
+ Variant *dest = (Variant *)&raw_dest;
+ memnew_placement(dest, Variant(self->get(*key, *def)));
+
+ return raw_dest;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/gdnative/pool_arrays.cpp b/modules/gdnative/gdnative/pool_arrays.cpp
index 68e064d829..74c540ca14 100644
--- a/modules/gdnative/gdnative/pool_arrays.cpp
+++ b/modules/gdnative/gdnative/pool_arrays.cpp
@@ -31,7 +31,7 @@
#include "gdnative/pool_arrays.h"
#include "core/array.h"
-#include "core/dvector.h"
+#include "core/pool_vector.h"
#include "core/variant.h"
#include "core/color.h"
diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp
index 4b8d79305c..913c57eb56 100644
--- a/modules/gdnative/gdnative/string.cpp
+++ b/modules/gdnative/gdnative/string.cpp
@@ -30,7 +30,7 @@
#include "gdnative/string.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
#include "core/variant.h"
diff --git a/modules/gdnative/gdnative/string_name.cpp b/modules/gdnative/gdnative/string_name.cpp
index d2862c5980..dcbb773c25 100644
--- a/modules/gdnative/gdnative/string_name.cpp
+++ b/modules/gdnative/gdnative/string_name.cpp
@@ -30,7 +30,7 @@
#include "gdnative/string_name.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
#include <string.h>
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 7680471409..71e7eecd1d 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -107,6 +107,23 @@
]
},
{
+ "name": "godot_dictionary_get_with_default",
+ "return_type": "godot_variant",
+ "arguments": [
+ ["const godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"],
+ ["const godot_variant *", "p_default"]
+ ]
+ },
+ {
+ "name": "godot_dictionary_erase_with_return",
+ "return_type": "bool",
+ "arguments": [
+ ["godot_dictionary *", "p_self"],
+ ["const godot_variant *", "p_key"]
+ ]
+ },
+ {
"name": "godot_node_path_get_as_property_path",
"return_type": "godot_node_path",
"arguments": [
@@ -234,14 +251,6 @@
]
},
{
- "name": "godot_dictionary_erase_with_return",
- "return_type": "bool",
- "arguments": [
- ["godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"]
- ]
- },
- {
"name": "godot_is_instance_valid",
"return_type": "bool",
"arguments": [
@@ -6410,6 +6419,41 @@
]
}
]
+ },
+ {
+ "name": "net",
+ "type": "NET",
+ "version": {
+ "major": 3,
+ "minor": 1
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_net_bind_stream_peer",
+ "return_type": "void",
+ "arguments": [
+ ["godot_object *", "p_obj"],
+ ["const godot_net_stream_peer *", "p_interface"]
+ ]
+ },
+ {
+ "name": "godot_net_bind_packet_peer",
+ "return_type": "void",
+ "arguments": [
+ ["godot_object *", "p_obj"],
+ ["const godot_net_packet_peer *", "p_interface"]
+ ]
+ },
+ {
+ "name": "godot_net_bind_multiplayer_peer",
+ "return_type": "void",
+ "arguments": [
+ ["godot_object *", "p_obj"],
+ ["const godot_net_multiplayer_peer *", "p_interface"]
+ ]
+ }
+ ]
}
]
}
diff --git a/modules/gdnative/gdnative_builders.py b/modules/gdnative/gdnative_builders.py
index cd356ce513..7ab0e01108 100644
--- a/modules/gdnative/gdnative_builders.py
+++ b/modules/gdnative/gdnative_builders.py
@@ -45,6 +45,7 @@ def _build_gdnative_api_struct_header(api):
'#include <android/godot_android.h>',
'#include <arvr/godot_arvr.h>',
'#include <nativescript/godot_nativescript.h>',
+ '#include <net/godot_net.h>',
'#include <pluginscript/godot_pluginscript.h>',
'#include <videodecoder/godot_videodecoder.h>',
'',
@@ -213,7 +214,7 @@ def _build_gdnative_api_struct_source(api):
'extern const godot_gdnative_core_api_struct api_struct = {',
'\tGDNATIVE_' + api['core']['type'] + ',',
'\t{' + str(api['core']['version']['major']) + ', ' + str(api['core']['version']['minor']) + '},',
- '\tNULL,',
+ '\t(const godot_gdnative_api_struct *)&api_1_1,',
'\t' + str(len(api['extensions'])) + ',',
'\tgdnative_extensions_pointers,',
]
diff --git a/modules/gdnative/include/gdnative/dictionary.h b/modules/gdnative/include/gdnative/dictionary.h
index 7703742899..14e35b4692 100644
--- a/modules/gdnative/include/gdnative/dictionary.h
+++ b/modules/gdnative/include/gdnative/dictionary.h
@@ -94,8 +94,12 @@ godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self,
godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_self);
+// GDNative core 1.1
+
godot_bool GDAPI godot_dictionary_erase_with_return(godot_dictionary *p_self, const godot_variant *p_key);
+godot_variant GDAPI godot_dictionary_get_with_default(const godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_default);
+
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/include/net/godot_net.h b/modules/gdnative/include/net/godot_net.h
index 89e2771926..d7de04e725 100644
--- a/modules/gdnative/include/net/godot_net.h
+++ b/modules/gdnative/include/net/godot_net.h
@@ -51,9 +51,9 @@ typedef struct {
/* This is StreamPeer */
godot_error (*get_data)(void *user, uint8_t *p_buffer, int p_bytes);
- godot_error (*get_partial_data)(void *user, uint8_t *p_buffer, int p_bytes, int &r_received);
+ godot_error (*get_partial_data)(void *user, uint8_t *p_buffer, int p_bytes, int *r_received);
godot_error (*put_data)(void *user, const uint8_t *p_data, int p_bytes);
- godot_error (*put_partial_data)(void *user, const uint8_t *p_data, int p_bytes, int &r_sent);
+ godot_error (*put_partial_data)(void *user, const uint8_t *p_data, int p_bytes, int *r_sent);
int (*get_available_bytes)(const void *user);
@@ -61,7 +61,7 @@ typedef struct {
} godot_net_stream_peer;
/* Binds a StreamPeerGDNative to the provided interface */
-void godot_net_bind_stream_peer(godot_object *p_obj, godot_net_stream_peer *p_interface);
+void godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_interface);
typedef struct {
godot_gdnative_api_version version; /* version of our API */
@@ -69,7 +69,7 @@ typedef struct {
godot_object *data; /* User reference */
/* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int &);
+ godot_error (*get_packet)(void *, const uint8_t **, int *);
godot_error (*put_packet)(void *, const uint8_t *, int);
godot_int (*get_available_packet_count)(const void *);
godot_int (*get_max_packet_size)(const void *);
@@ -86,7 +86,7 @@ typedef struct {
godot_object *data; /* User reference */
/* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int &);
+ godot_error (*get_packet)(void *, const uint8_t **, int *);
godot_error (*put_packet)(void *, const uint8_t *, int);
godot_int (*get_available_packet_count)(const void *);
godot_int (*get_max_packet_size)(const void *);
diff --git a/modules/gdnative/include/videodecoder/godot_videodecoder.h b/modules/gdnative/include/videodecoder/godot_videodecoder.h
index 360fc0f5f5..1b08be30f0 100644
--- a/modules/gdnative/include/videodecoder/godot_videodecoder.h
+++ b/modules/gdnative/include/videodecoder/godot_videodecoder.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 0370060937..2da9d6bfdc 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -39,7 +39,7 @@
#include "core/project_settings.h"
#include "scene/main/scene_tree.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include <stdlib.h>
@@ -1036,8 +1036,16 @@ NativeScriptLanguage::~NativeScriptLanguage() {
for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) {
- if (L->get().is_valid())
- L->get()->terminate();
+ Ref<GDNative> lib = L->get();
+ // only shut down valid libs, duh!
+ if (lib.is_valid()) {
+
+ // If it's a singleton-library then the gdnative module
+ // manages the destruction at engine shutdown, not NativeScript.
+ if (!lib->get_library()->is_singleton()) {
+ lib->terminate();
+ }
+ }
}
NSL->library_classes.clear();
@@ -1599,18 +1607,20 @@ bool NativeScriptLanguage::handles_global_class_type(const String &p_type) const
}
String NativeScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const {
- Ref<NativeScript> script = ResourceLoader::load(p_path, "NativeScript");
- if (script.is_valid()) {
+ if (!p_path.empty()) {
+ Ref<NativeScript> script = ResourceLoader::load(p_path, "NativeScript");
+ if (script.is_valid()) {
+ if (r_base_type)
+ *r_base_type = script->get_instance_base_type();
+ if (r_icon_path)
+ *r_icon_path = script->get_script_class_icon_path();
+ return script->get_script_class_name();
+ }
if (r_base_type)
- *r_base_type = script->get_instance_base_type();
+ *r_base_type = String();
if (r_icon_path)
- *r_icon_path = script->get_script_class_icon_path();
- return script->get_script_class_name();
+ *r_icon_path = String();
}
- if (r_base_type)
- *r_base_type = String();
- if (r_icon_path)
- *r_icon_path = String();
return String();
}
@@ -1639,10 +1649,19 @@ void NativeReloadNode::_notification(int p_what) {
continue;
}
+ // Don't unload what should not be reloaded!
if (!gdn->get_library()->is_reloadable()) {
continue;
}
+ // singleton libraries might have alive pointers living inside the
+ // editor. Also reloading a singleton library would mean that
+ // the singleton entry will not be called again, as this only
+ // happens at engine startup.
+ if (gdn->get_library()->is_singleton()) {
+ continue;
+ }
+
gdn->terminate();
}
@@ -1670,6 +1689,12 @@ void NativeReloadNode::_notification(int p_what) {
continue;
}
+ // since singleton libraries are not unloaded there is no point
+ // in loading them again.
+ if (!gdn->get_library()->is_singleton()) {
+ continue;
+ }
+
if (!gdn->initialize()) {
libs_to_remove.insert(L->key());
continue;
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.cpp b/modules/gdnative/net/multiplayer_peer_gdnative.cpp
index 2466838357..bdeba149d2 100644
--- a/modules/gdnative/net/multiplayer_peer_gdnative.cpp
+++ b/modules/gdnative/net/multiplayer_peer_gdnative.cpp
@@ -43,7 +43,7 @@ void MultiplayerPeerGDNative::set_native_multiplayer_peer(const godot_net_multip
Error MultiplayerPeerGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
- return (Error)interface->get_packet(interface->data, r_buffer, r_buffer_size);
+ return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);
}
Error MultiplayerPeerGDNative::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
diff --git a/modules/gdnative/net/packet_peer_gdnative.cpp b/modules/gdnative/net/packet_peer_gdnative.cpp
index 9adfd841b2..877baff9e2 100644
--- a/modules/gdnative/net/packet_peer_gdnative.cpp
+++ b/modules/gdnative/net/packet_peer_gdnative.cpp
@@ -46,7 +46,7 @@ void PacketPeerGDNative::_bind_methods() {
Error PacketPeerGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
- return (Error)interface->get_packet(interface->data, r_buffer, r_buffer_size);
+ return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);
}
Error PacketPeerGDNative::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
diff --git a/modules/gdnative/net/stream_peer_gdnative.cpp b/modules/gdnative/net/stream_peer_gdnative.cpp
index 1b141fa2e6..8a4ea35f95 100644
--- a/modules/gdnative/net/stream_peer_gdnative.cpp
+++ b/modules/gdnative/net/stream_peer_gdnative.cpp
@@ -37,7 +37,7 @@ StreamPeerGDNative::StreamPeerGDNative() {
StreamPeerGDNative::~StreamPeerGDNative() {
}
-void StreamPeerGDNative::set_native_stream_peer(godot_net_stream_peer *p_interface) {
+void StreamPeerGDNative::set_native_stream_peer(const godot_net_stream_peer *p_interface) {
interface = p_interface;
}
@@ -51,7 +51,7 @@ Error StreamPeerGDNative::put_data(const uint8_t *p_data, int p_bytes) {
Error StreamPeerGDNative::put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) {
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
- return (Error)(interface->put_partial_data(interface->data, p_data, p_bytes, r_sent));
+ return (Error)(interface->put_partial_data(interface->data, p_data, p_bytes, &r_sent));
}
Error StreamPeerGDNative::get_data(uint8_t *p_buffer, int p_bytes) {
@@ -61,7 +61,7 @@ Error StreamPeerGDNative::get_data(uint8_t *p_buffer, int p_bytes) {
Error StreamPeerGDNative::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) {
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
- return (Error)(interface->get_partial_data(interface->data, p_buffer, p_bytes, r_received));
+ return (Error)(interface->get_partial_data(interface->data, p_buffer, p_bytes, &r_received));
}
int StreamPeerGDNative::get_available_bytes() const {
@@ -71,7 +71,7 @@ int StreamPeerGDNative::get_available_bytes() const {
extern "C" {
-void GDAPI godot_net_bind_stream_peer(godot_object *p_obj, godot_net_stream_peer *p_interface) {
+void GDAPI godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_interface) {
((StreamPeerGDNative *)p_obj)->set_native_stream_peer(p_interface);
}
}
diff --git a/modules/gdnative/net/stream_peer_gdnative.h b/modules/gdnative/net/stream_peer_gdnative.h
index f39fdbb1d3..7859d57a4b 100644
--- a/modules/gdnative/net/stream_peer_gdnative.h
+++ b/modules/gdnative/net/stream_peer_gdnative.h
@@ -41,14 +41,14 @@ class StreamPeerGDNative : public StreamPeer {
protected:
static void _bind_methods();
- godot_net_stream_peer *interface;
+ const godot_net_stream_peer *interface;
public:
StreamPeerGDNative();
~StreamPeerGDNative();
/* Sets the interface implementation from GDNative */
- void set_native_stream_peer(godot_net_stream_peer *p_interface);
+ void set_native_stream_peer(const godot_net_stream_peer *p_interface);
/* Specific to StreamPeer */
Error put_data(const uint8_t *p_data, int p_bytes);
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp
index ca1dd66a13..c9d92c09ed 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_language.cpp
@@ -173,8 +173,7 @@ Error PluginScriptLanguage::complete_code(const String &p_code, const String &p_
for (int i = 0; i < options.size(); i++) {
r_options->push_back(String(options[i]));
}
- Error err = *(Error *)&tmp;
- return err;
+ return (Error)tmp;
}
return ERR_UNAVAILABLE;
}
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index b38de75caa..2094dca6e4 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -125,8 +125,8 @@ static void actual_discoverer_handler() {
// Check for removed files
if (!changed) {
- for (int i = 0; i < current_files.size(); i++) {
- if (!file_paths.has(current_files[i])) {
+ for (int j = 0; j < current_files.size(); j++) {
+ if (!file_paths.has(current_files[j])) {
changed = true;
break;
}
diff --git a/modules/gdnative/videodecoder/register_types.cpp b/modules/gdnative/videodecoder/register_types.cpp
index ea78cb1970..0a0b2f64d5 100644
--- a/modules/gdnative/videodecoder/register_types.cpp
+++ b/modules/gdnative/videodecoder/register_types.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/gdnative/videodecoder/register_types.h b/modules/gdnative/videodecoder/register_types.h
index dd1943fc47..f082343d8c 100644
--- a/modules/gdnative/videodecoder/register_types.h
+++ b/modules/gdnative/videodecoder/register_types.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
index a1590cef43..8fcebe7855 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -76,7 +76,7 @@ int64_t GDAPI godot_videodecoder_file_seek(void *ptr, int64_t pos, int whence) {
} break;
case SEEK_CUR: {
// Just in case it doesn't exist
- if (pos < 0 && -pos > file->get_position()) {
+ if (pos < 0 && (size_t)-pos > file->get_position()) {
return -1;
}
pos = pos + static_cast<int>(file->get_position());
@@ -86,7 +86,7 @@ int64_t GDAPI godot_videodecoder_file_seek(void *ptr, int64_t pos, int whence) {
} break;
case SEEK_END: {
// Just in case something goes wrong
- if (-pos > len) {
+ if ((size_t)-pos > len) {
return -1;
}
file->seek_end(pos);
@@ -117,18 +117,20 @@ bool VideoStreamPlaybackGDNative::open_file(const String &p_file) {
file = FileAccess::open(p_file, FileAccess::READ);
bool file_opened = interface->open_file(data_struct, file);
- num_channels = interface->get_channels(data_struct);
- mix_rate = interface->get_mix_rate(data_struct);
+ if (file_opened) {
+ num_channels = interface->get_channels(data_struct);
+ mix_rate = interface->get_mix_rate(data_struct);
- godot_vector2 vec = interface->get_texture_size(data_struct);
- texture_size = *(Vector2 *)&vec;
+ godot_vector2 vec = interface->get_texture_size(data_struct);
+ texture_size = *(Vector2 *)&vec;
- pcm = (float *)memalloc(num_channels * AUX_BUFFER_SIZE * sizeof(float));
- memset(pcm, 0, num_channels * AUX_BUFFER_SIZE * sizeof(float));
- pcm_write_idx = -1;
- samples_decoded = 0;
+ pcm = (float *)memalloc(num_channels * AUX_BUFFER_SIZE * sizeof(float));
+ memset(pcm, 0, num_channels * AUX_BUFFER_SIZE * sizeof(float));
+ pcm_write_idx = -1;
+ samples_decoded = 0;
- texture->create((int)texture_size.width, (int)texture_size.height, Image::FORMAT_RGBA8, Texture::FLAG_FILTER | Texture::FLAG_VIDEO_SURFACE);
+ texture->create((int)texture_size.width, (int)texture_size.height, Image::FORMAT_RGBA8, Texture::FLAG_FILTER | Texture::FLAG_VIDEO_SURFACE);
+ }
return file_opened;
}
@@ -355,9 +357,9 @@ RES ResourceFormatLoaderVideoStreamGDNative::load(const String &p_path, const St
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
- memdelete(f);
return RES();
}
+ memdelete(f);
VideoStreamGDNative *stream = memnew(VideoStreamGDNative);
stream->set_file(p_path);
Ref<VideoStreamGDNative> ogv_stream = Ref<VideoStreamGDNative>(stream);
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.h b/modules/gdnative/videodecoder/video_stream_gdnative.h
index f9dec46b72..aafd02f33d 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.h
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 6d85eb3c90..4385cf12ad 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -152,12 +152,13 @@ Variant GDScript::_new(const Variant **p_args, int p_argcount, Variant::CallErro
}
ERR_FAIL_COND_V(_baseptr->native.is_null(), Variant());
-
if (_baseptr->native.ptr()) {
owner = _baseptr->native->instance();
} else {
owner = memnew(Reference); //by default, no base means use reference
}
+ ERR_EXPLAIN("Can't inherit from a virtual class");
+ ERR_FAIL_COND_V(!owner, Variant());
Reference *r = Object::cast_to<Reference>(owner);
if (r) {
@@ -483,7 +484,7 @@ bool GDScript::_update_exports() {
placeholder_fallback_enabled = true;
return false;
}
- } else if (!valid || placeholder_fallback_enabled) {
+ } else if (placeholder_fallback_enabled) {
return false;
}
@@ -1108,12 +1109,12 @@ void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const
//instance a fake script for editing the values
Vector<_GDScriptMemberSort> msort;
- for (Map<StringName, PropertyInfo>::Element *E = sptr->member_info.front(); E; E = E->next()) {
+ for (Map<StringName, PropertyInfo>::Element *F = sptr->member_info.front(); F; F = F->next()) {
_GDScriptMemberSort ms;
- ERR_CONTINUE(!sptr->member_indices.has(E->key()));
- ms.index = sptr->member_indices[E->key()].index;
- ms.name = E->key();
+ ERR_CONTINUE(!sptr->member_indices.has(F->key()));
+ ms.index = sptr->member_indices[F->key()].index;
+ ms.name = F->key();
msort.push_back(ms);
}
@@ -1834,73 +1835,92 @@ String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_b
PoolVector<uint8_t> sourcef;
Error err;
- FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
+ FileAccessRef f = FileAccess::open(p_path, FileAccess::READ, &err);
if (err) {
return String();
}
- int len = f->get_len();
- sourcef.resize(len + 1);
- PoolVector<uint8_t>::Write w = sourcef.write();
- int r = f->get_buffer(w.ptr(), len);
- f->close();
- memdelete(f);
- ERR_FAIL_COND_V(r != len, String());
- w[len] = 0;
-
- String s;
- if (s.parse_utf8((const char *)w.ptr())) {
- return String();
- }
+ String source = f->get_as_utf8_string();
GDScriptParser parser;
-
- parser.parse(s, p_path.get_base_dir(), true, p_path);
+ parser.parse(source, p_path.get_base_dir(), true, p_path, false, NULL, true);
if (parser.get_parse_tree() && parser.get_parse_tree()->type == GDScriptParser::Node::TYPE_CLASS) {
const GDScriptParser::ClassNode *c = static_cast<const GDScriptParser::ClassNode *>(parser.get_parse_tree());
+ if (r_icon_path) {
+ if (c->icon_path.empty() || c->icon_path.is_abs_path())
+ *r_icon_path = c->icon_path;
+ else if (c->icon_path.is_rel_path())
+ *r_icon_path = p_path.get_base_dir().plus_file(c->icon_path).simplify_path();
+ }
if (r_base_type) {
- GDScriptParser::DataType base_type;
- if (c->base_type.has_type) {
- base_type = c->base_type;
- while (base_type.has_type && base_type.kind != GDScriptParser::DataType::NATIVE) {
- switch (base_type.kind) {
- case GDScriptParser::DataType::CLASS: {
- base_type = base_type.class_type->base_type;
- } break;
- case GDScriptParser::DataType::GDSCRIPT: {
- Ref<GDScript> gds = base_type.script_type;
- if (gds.is_valid()) {
- base_type.kind = GDScriptParser::DataType::NATIVE;
- base_type.native_type = gds->get_instance_base_type();
- } else {
- base_type = GDScriptParser::DataType();
+
+ const GDScriptParser::ClassNode *subclass = c;
+ String path = p_path;
+ GDScriptParser subparser;
+ while (subclass) {
+ if (subclass->extends_used) {
+ if (subclass->extends_file) {
+ if (subclass->extends_class.size() == 0) {
+ get_global_class_name(subclass->extends_file, r_base_type);
+ subclass = NULL;
+ break;
+ } else {
+ Vector<StringName> extend_classes = subclass->extends_class;
+
+ FileAccessRef subfile = FileAccess::open(subclass->extends_file, FileAccess::READ);
+ if (!subfile) {
+ break;
+ }
+ String subsource = subfile->get_as_utf8_string();
+
+ if (subsource.empty()) {
+ break;
}
- } break;
- default: {
- base_type = GDScriptParser::DataType();
- } break;
+ String subpath = subclass->extends_file;
+ if (subpath.is_rel_path()) {
+ subpath = path.get_base_dir().plus_file(subpath).simplify_path();
+ }
+
+ if (OK != subparser.parse(subsource, subpath.get_base_dir(), true, subpath, false, NULL, true)) {
+ break;
+ }
+ path = subpath;
+ if (!subparser.get_parse_tree() || subparser.get_parse_tree()->type != GDScriptParser::Node::TYPE_CLASS) {
+ break;
+ }
+ subclass = static_cast<const GDScriptParser::ClassNode *>(subparser.get_parse_tree());
+
+ while (extend_classes.size() > 0) {
+ bool found = false;
+ for (int i = 0; i < subclass->subclasses.size(); i++) {
+ const GDScriptParser::ClassNode *inner_class = subclass->subclasses[i];
+ if (inner_class->name == extend_classes[0]) {
+ extend_classes.remove(0);
+ found = true;
+ subclass = inner_class;
+ break;
+ }
+ }
+ if (!found) {
+ subclass = NULL;
+ break;
+ }
+ }
+ }
+ } else if (subclass->extends_class.size() == 1) {
+ *r_base_type = subclass->extends_class[0];
+ subclass = NULL;
+ } else {
+ break;
}
- }
- }
- if (base_type.has_type) {
- *r_base_type = base_type.native_type;
- } else {
- // Fallback
- if (c->extends_used && c->extends_class.size() == 1) {
- *r_base_type = c->extends_class[0];
- } else if (!c->extends_used) {
+ } else {
*r_base_type = "Reference";
+ subclass = NULL;
}
}
}
- if (r_icon_path) {
- if (c->icon_path.empty() || c->icon_path.is_abs_path())
- *r_icon_path = c->icon_path;
- else if (c->icon_path.is_rel_path())
- *r_icon_path = p_path.get_base_dir().plus_file(c->icon_path).simplify_path();
- }
return c->name;
}
@@ -1945,7 +1965,7 @@ String GDScriptWarning::get_message() const {
return "Assignment operation, but the function '" + symbols[0] + "()' returns void.";
} break;
case NARROWING_CONVERSION: {
- return "Narrowing coversion (float is converted to int and lose precision).";
+ return "Narrowing conversion (float is converted to int and loses precision).";
} break;
case FUNCTION_MAY_YIELD: {
CHECK_SYMBOLS(1);
@@ -2182,6 +2202,26 @@ String ResourceFormatLoaderGDScript::get_resource_type(const String &p_path) con
return "";
}
+void ResourceFormatLoaderGDScript::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
+
+ FileAccessRef file = FileAccess::open(p_path, FileAccess::READ);
+ ERR_FAIL_COND(!file);
+
+ String source = file->get_as_utf8_string();
+ if (source.empty()) {
+ return;
+ }
+
+ GDScriptParser parser;
+ if (OK != parser.parse(source, p_path.get_base_dir(), true, p_path, false, NULL, true)) {
+ return;
+ }
+
+ for (const List<String>::Element *E = parser.get_dependencies().front(); E; E = E->next()) {
+ p_dependencies->push_back(E->get());
+ }
+}
+
Error ResourceFormatSaverGDScript::save(const String &p_path, const RES &p_resource, uint32_t p_flags) {
Ref<GDScript> sqscr = p_resource;
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 86c00c0b59..ded873c7d3 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -511,6 +511,7 @@ public:
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
+ virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
};
class ResourceFormatSaverGDScript : public ResourceFormatSaver {
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index e59b57b39a..5f521c682a 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -1360,15 +1360,15 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
// jump unconditionally
// continue address
// compile the condition
- int ret = _parse_expression(codegen, branch.compiled_pattern, p_stack_level);
- if (ret < 0) {
+ int ret2 = _parse_expression(codegen, branch.compiled_pattern, p_stack_level);
+ if (ret2 < 0) {
memdelete(id);
memdelete(op);
return ERR_PARSE_ERROR;
}
codegen.opcodes.push_back(GDScriptFunction::OPCODE_JUMP_IF);
- codegen.opcodes.push_back(ret);
+ codegen.opcodes.push_back(ret2);
codegen.opcodes.push_back(codegen.opcodes.size() + 3);
int continue_addr = codegen.opcodes.size();
codegen.opcodes.push_back(GDScriptFunction::OPCODE_JUMP);
@@ -1396,17 +1396,12 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
case GDScriptParser::ControlFlowNode::CF_IF: {
-#ifdef DEBUG_ENABLED
- codegen.opcodes.push_back(GDScriptFunction::OPCODE_LINE);
- codegen.opcodes.push_back(cf->line);
- codegen.current_line = cf->line;
-#endif
- int ret = _parse_expression(codegen, cf->arguments[0], p_stack_level, false);
- if (ret < 0)
+ int ret2 = _parse_expression(codegen, cf->arguments[0], p_stack_level, false);
+ if (ret2 < 0)
return ERR_PARSE_ERROR;
codegen.opcodes.push_back(GDScriptFunction::OPCODE_JUMP_IF_NOT);
- codegen.opcodes.push_back(ret);
+ codegen.opcodes.push_back(ret2);
int else_addr = codegen.opcodes.size();
codegen.opcodes.push_back(0); //temporary
@@ -1421,9 +1416,9 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
codegen.opcodes.push_back(0);
codegen.opcodes.write[else_addr] = codegen.opcodes.size();
- Error err = _parse_block(codegen, cf->body_else, p_stack_level, p_break_addr, p_continue_addr);
- if (err)
- return err;
+ Error err2 = _parse_block(codegen, cf->body_else, p_stack_level, p_break_addr, p_continue_addr);
+ if (err2)
+ return err2;
codegen.opcodes.write[end_addr] = codegen.opcodes.size();
} else {
@@ -1444,14 +1439,14 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
codegen.push_stack_identifiers();
codegen.add_stack_identifier(static_cast<const GDScriptParser::IdentifierNode *>(cf->arguments[0])->name, iter_stack_pos);
- int ret = _parse_expression(codegen, cf->arguments[1], slevel, false);
- if (ret < 0)
+ int ret2 = _parse_expression(codegen, cf->arguments[1], slevel, false);
+ if (ret2 < 0)
return ERR_COMPILATION_FAILED;
//assign container
codegen.opcodes.push_back(GDScriptFunction::OPCODE_ASSIGN);
codegen.opcodes.push_back(container_pos);
- codegen.opcodes.push_back(ret);
+ codegen.opcodes.push_back(ret2);
//begin loop
codegen.opcodes.push_back(GDScriptFunction::OPCODE_ITERATE_BEGIN);
@@ -1493,11 +1488,11 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
codegen.opcodes.push_back(0);
int continue_addr = codegen.opcodes.size();
- int ret = _parse_expression(codegen, cf->arguments[0], p_stack_level, false);
- if (ret < 0)
+ int ret2 = _parse_expression(codegen, cf->arguments[0], p_stack_level, false);
+ if (ret2 < 0)
return ERR_PARSE_ERROR;
codegen.opcodes.push_back(GDScriptFunction::OPCODE_JUMP_IF_NOT);
- codegen.opcodes.push_back(ret);
+ codegen.opcodes.push_back(ret2);
codegen.opcodes.push_back(break_addr);
Error err = _parse_block(codegen, cf->body, p_stack_level, break_addr, continue_addr);
if (err)
@@ -1508,9 +1503,6 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
codegen.opcodes.write[break_addr + 1] = codegen.opcodes.size();
} break;
- case GDScriptParser::ControlFlowNode::CF_SWITCH: {
-
- } break;
case GDScriptParser::ControlFlowNode::CF_BREAK: {
if (p_break_addr < 0) {
@@ -1536,21 +1528,21 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
} break;
case GDScriptParser::ControlFlowNode::CF_RETURN: {
- int ret;
+ int ret2;
if (cf->arguments.size()) {
- ret = _parse_expression(codegen, cf->arguments[0], p_stack_level, false);
- if (ret < 0)
+ ret2 = _parse_expression(codegen, cf->arguments[0], p_stack_level, false);
+ if (ret2 < 0)
return ERR_PARSE_ERROR;
} else {
- ret = GDScriptFunction::ADDR_TYPE_NIL << GDScriptFunction::ADDR_BITS;
+ ret2 = GDScriptFunction::ADDR_TYPE_NIL << GDScriptFunction::ADDR_BITS;
}
codegen.opcodes.push_back(GDScriptFunction::OPCODE_RETURN);
- codegen.opcodes.push_back(ret);
+ codegen.opcodes.push_back(ret2);
} break;
}
@@ -1561,12 +1553,12 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
const GDScriptParser::AssertNode *as = static_cast<const GDScriptParser::AssertNode *>(s);
- int ret = _parse_expression(codegen, as->condition, p_stack_level, false);
- if (ret < 0)
+ int ret2 = _parse_expression(codegen, as->condition, p_stack_level, false);
+ if (ret2 < 0)
return ERR_PARSE_ERROR;
codegen.opcodes.push_back(GDScriptFunction::OPCODE_ASSERT);
- codegen.opcodes.push_back(ret);
+ codegen.opcodes.push_back(ret2);
#endif
} break;
case GDScriptParser::Node::TYPE_BREAKPOINT: {
@@ -1593,8 +1585,8 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
} break;
default: {
//expression
- int ret = _parse_expression(codegen, s, p_stack_level, true);
- if (ret < 0)
+ int ret2 = _parse_expression(codegen, s, p_stack_level, true);
+ if (ret2 < 0)
return ERR_PARSE_ERROR;
} break;
}
@@ -2119,8 +2111,8 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa
instance->owner = E->get();
//needed for hot reloading
- for (Map<StringName, GDScript::MemberInfo>::Element *E = p_script->member_indices.front(); E; E = E->next()) {
- instance->member_indices_cache[E->key()] = E->get().index;
+ for (Map<StringName, GDScript::MemberInfo>::Element *F = p_script->member_indices.front(); F; F = F->next()) {
+ instance->member_indices_cache[F->key()] = F->get().index;
}
instance->owner->set_script_instance(instance);
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 08ad101967..fafc73b7e6 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -479,12 +479,15 @@ struct GDScriptCompletionContext {
Object *base;
String base_path;
int line;
+ uint32_t depth;
GDScriptCompletionContext() :
_class(NULL),
function(NULL),
block(NULL),
- base(NULL) {}
+ base(NULL),
+ line(0),
+ depth(0) {}
};
struct GDScriptCompletionIdentifier {
@@ -615,6 +618,9 @@ static GDScriptCompletionIdentifier _type_from_gdtype(const GDScriptDataType &p_
ci.type.script_type = p_gdtype.script_type;
switch (p_gdtype.kind) {
+ case GDScriptDataType::UNINITIALIZED: {
+ ERR_EXPLAIN("Uninitialized completion. Please report a bug.");
+ } break;
case GDScriptDataType::BUILTIN: {
ci.type.kind = GDScriptParser::DataType::BUILTIN;
} break;
@@ -631,12 +637,18 @@ static GDScriptCompletionIdentifier _type_from_gdtype(const GDScriptDataType &p_
return ci;
}
-static bool _guess_identifier_type(const GDScriptCompletionContext &p_context, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type);
-static bool _guess_identifier_type_from_base(const GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type);
-static bool _guess_method_return_type_from_base(const GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, GDScriptCompletionIdentifier &r_type);
+static bool _guess_identifier_type(GDScriptCompletionContext &p_context, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type);
+static bool _guess_identifier_type_from_base(GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type);
+static bool _guess_method_return_type_from_base(GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, GDScriptCompletionIdentifier &r_type);
-static bool _guess_expression_type(const GDScriptCompletionContext &p_context, const GDScriptParser::Node *p_expression, GDScriptCompletionIdentifier &r_type) {
+static bool _guess_expression_type(GDScriptCompletionContext &p_context, const GDScriptParser::Node *p_expression, GDScriptCompletionIdentifier &r_type) {
bool found = false;
+
+ if (++p_context.depth > 100) {
+ print_error("Maximum _guess_expression_type depth limit reached. Please file a bugreport.");
+ return false;
+ }
+
switch (p_expression->type) {
case GDScriptParser::Node::TYPE_CONSTANT: {
const GDScriptParser::ConstantNode *cn = static_cast<const GDScriptParser::ConstantNode *>(p_expression);
@@ -773,12 +785,12 @@ static bool _guess_expression_type(const GDScriptCompletionContext &p_context, c
if (mb && mb->is_const()) {
bool all_is_const = true;
Vector<Variant> args;
- GDScriptCompletionContext c = p_context;
- c.line = op->line;
+ GDScriptCompletionContext c2 = p_context;
+ c2.line = op->line;
for (int i = 2; all_is_const && i < op->arguments.size(); i++) {
GDScriptCompletionIdentifier arg;
- if (_guess_expression_type(c, op->arguments[i], arg)) {
+ if (_guess_expression_type(c2, op->arguments[i], arg)) {
if (arg.type.has_type && arg.type.is_constant && arg.value.get_type() != Variant::OBJECT) {
args.push_back(arg.value);
} else {
@@ -1125,7 +1137,7 @@ static bool _guess_expression_type(const GDScriptCompletionContext &p_context, c
return found;
}
-static bool _guess_identifier_type(const GDScriptCompletionContext &p_context, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type) {
+static bool _guess_identifier_type(GDScriptCompletionContext &p_context, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type) {
// Look in blocks first
const GDScriptParser::BlockNode *blk = p_context.block;
@@ -1270,9 +1282,9 @@ static bool _guess_identifier_type(const GDScriptCompletionContext &p_context, c
for (List<MethodInfo>::Element *E = methods.front(); E; E = E->next()) {
if (E->get().name == p_context.function->name) {
MethodInfo &mi = E->get();
- for (List<PropertyInfo>::Element *E = mi.arguments.front(); E; E = E->next()) {
- if (E->get().name == p_identifier) {
- r_type = _type_from_property(E->get());
+ for (List<PropertyInfo>::Element *F = mi.arguments.front(); F; F = F->next()) {
+ if (F->get().name == p_identifier) {
+ r_type = _type_from_property(F->get());
return true;
}
}
@@ -1355,7 +1367,7 @@ static bool _guess_identifier_type(const GDScriptCompletionContext &p_context, c
return false;
}
-static bool _guess_identifier_type_from_base(const GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type) {
+static bool _guess_identifier_type_from_base(GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type) {
GDScriptParser::DataType base_type = p_base.type;
bool _static = base_type.is_meta_type;
while (base_type.has_type) {
@@ -1544,7 +1556,7 @@ static bool _find_last_return_in_block(const GDScriptCompletionContext &p_contex
return false;
}
-static bool _guess_method_return_type_from_base(const GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, GDScriptCompletionIdentifier &r_type) {
+static bool _guess_method_return_type_from_base(GDScriptCompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, GDScriptCompletionIdentifier &r_type) {
GDScriptParser::DataType base_type = p_base.type;
bool _static = base_type.is_meta_type;
@@ -2225,8 +2237,8 @@ static void _find_call_arguments(const GDScriptCompletionContext &p_context, con
if (obj) {
List<String> options;
obj->get_argument_options(p_method, p_argidx, &options);
- for (List<String>::Element *E = options.front(); E; E = E->next()) {
- r_result.insert(E->get());
+ for (List<String>::Element *F = options.front(); F; F = F->next()) {
+ r_result.insert(F->get());
}
}
}
@@ -2309,7 +2321,7 @@ static void _find_call_arguments(const GDScriptCompletionContext &p_context, con
}
}
-static void _find_call_arguments(const GDScriptCompletionContext &p_context, const GDScriptParser::Node *p_node, int p_argidx, Set<String> &r_result, bool &r_forced, String &r_arghint) {
+static void _find_call_arguments(GDScriptCompletionContext &p_context, const GDScriptParser::Node *p_node, int p_argidx, Set<String> &r_result, bool &r_forced, String &r_arghint) {
if (!p_node || p_node->type != GDScriptParser::Node::TYPE_OPERATOR) {
return;
@@ -2794,12 +2806,12 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
if (base_type.class_type) {
for (Map<StringName, GDScriptParser::ClassNode::Constant>::Element *E = base_type.class_type->constant_expressions.front(); E; E = E->next()) {
GDScriptCompletionIdentifier constant;
- GDScriptCompletionContext c = context;
- c._class = base_type.class_type;
- c.function = NULL;
- c.block = NULL;
- c.line = E->value().expression->line;
- if (_guess_expression_type(c, E->value().expression, constant)) {
+ GDScriptCompletionContext c2 = context;
+ c2._class = base_type.class_type;
+ c2.function = NULL;
+ c2.block = NULL;
+ c2.line = E->value().expression->line;
+ if (_guess_expression_type(c2, E->value().expression, constant)) {
if (constant.type.has_type && constant.type.is_meta_type) {
options.insert(E->key().operator String());
}
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index 966c02d4ec..cff9ba55b8 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -329,10 +329,15 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
}
if (!argument_types[i].is_type(*p_args[i], true)) {
- r_err.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
- r_err.argument = i;
- r_err.expected = argument_types[i].kind == GDScriptDataType::BUILTIN ? argument_types[i].builtin_type : Variant::OBJECT;
- return Variant();
+ if (argument_types[i].is_type(Variant(), true)) {
+ memnew_placement(&stack[i], Variant);
+ continue;
+ } else {
+ r_err.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
+ r_err.argument = i;
+ r_err.expected = argument_types[i].kind == GDScriptDataType::BUILTIN ? argument_types[i].builtin_type : Variant::OBJECT;
+ return Variant();
+ }
}
if (argument_types[i].kind == GDScriptDataType::BUILTIN) {
Variant arg = Variant::construct(argument_types[i].builtin_type, &p_args[i], 1, r_err);
@@ -1083,7 +1088,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
if (argc >= 1) {
methodstr = String(*argptrs[0]) + " (via call)";
if (err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
- err.argument -= 1;
+ err.argument += 1;
}
}
} else if (methodstr == "free") {
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index f4058664ff..cefc28d77f 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -36,7 +36,7 @@
#include "core/reference.h"
#include "core/script_language.h"
#include "core/self_list.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/variant.h"
class GDScriptInstance;
@@ -45,10 +45,11 @@ class GDScript;
struct GDScriptDataType {
bool has_type;
enum {
+ UNINITIALIZED,
BUILTIN,
NATIVE,
SCRIPT,
- GDSCRIPT
+ GDSCRIPT,
} kind;
Variant::Type builtin_type;
StringName native_type;
@@ -58,6 +59,8 @@ struct GDScriptDataType {
if (!has_type) return true; // Can't type check
switch (kind) {
+ case UNINITIALIZED:
+ break;
case BUILTIN: {
Variant::Type var_type = p_variant.get_type();
bool valid = builtin_type == var_type;
@@ -113,6 +116,8 @@ struct GDScriptDataType {
PropertyInfo info;
if (has_type) {
switch (kind) {
+ case UNINITIALIZED:
+ break;
case BUILTIN: {
info.type = builtin_type;
} break;
@@ -134,7 +139,9 @@ struct GDScriptDataType {
}
GDScriptDataType() :
- has_type(false) {}
+ has_type(false),
+ kind(UNINITIALIZED),
+ builtin_type(Variant::NIL) {}
};
class GDScriptFunction {
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index af189fdb7e..da69181a43 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -473,29 +473,31 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
}
Ref<Resource> res;
- if (!validating) {
+ dependencies.push_back(path);
+ if (!dependencies_only) {
+ if (!validating) {
- //this can be too slow for just validating code
- if (for_completion && ScriptCodeCompletionCache::get_singleton() && FileAccess::exists(path)) {
- res = ScriptCodeCompletionCache::get_singleton()->get_cached_resource(path);
- } else if (!for_completion || FileAccess::exists(path)) {
- res = ResourceLoader::load(path);
- }
- } else {
+ //this can be too slow for just validating code
+ if (for_completion && ScriptCodeCompletionCache::get_singleton() && FileAccess::exists(path)) {
+ res = ScriptCodeCompletionCache::get_singleton()->get_cached_resource(path);
+ } else if (!for_completion || FileAccess::exists(path)) {
+ res = ResourceLoader::load(path);
+ }
+ } else {
- if (!FileAccess::exists(path)) {
+ if (!FileAccess::exists(path)) {
+ _set_error("Can't preload resource at path: " + path);
+ return NULL;
+ } else if (ScriptCodeCompletionCache::get_singleton()) {
+ res = ScriptCodeCompletionCache::get_singleton()->get_cached_resource(path);
+ }
+ }
+ if (!res.is_valid()) {
_set_error("Can't preload resource at path: " + path);
return NULL;
- } else if (ScriptCodeCompletionCache::get_singleton()) {
- res = ScriptCodeCompletionCache::get_singleton()->get_cached_resource(path);
}
}
- if (!res.is_valid()) {
- _set_error("Can't preload resource at path: " + path);
- return NULL;
- }
-
if (tokenizer->get_token() != GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
_set_error("Expected ')' after 'preload' path");
return NULL;
@@ -503,7 +505,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
Ref<GDScript> gds = res;
if (gds.is_valid() && !gds->is_valid()) {
- _set_error("Could not fully preload the script, possible cyclic reference or compilation error.");
+ _set_error("Could not fully preload the script, possible cyclic reference or compilation error. Use 'load()' instead if a cyclic reference is intended.");
return NULL;
}
@@ -812,19 +814,31 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
bfn = true;
}
- // Check parents for the constant
- if (!bfn && cln->extends_file != StringName()) {
- Ref<GDScript> parent = ResourceLoader::load(cln->extends_file);
- if (parent.is_valid() && parent->is_valid()) {
- Map<StringName, Variant> parent_constants;
- parent->get_constants(&parent_constants);
- if (parent_constants.has(identifier)) {
+ if (!dependencies_only) {
+ if (!bfn && ScriptServer::is_global_class(identifier)) {
+ Ref<Script> scr = ResourceLoader::load(ScriptServer::get_global_class_path(identifier));
+ if (scr.is_valid() && scr->is_valid()) {
ConstantNode *constant = alloc_node<ConstantNode>();
- constant->value = parent_constants[identifier];
+ constant->value = scr;
expr = constant;
bfn = true;
}
}
+
+ // Check parents for the constant
+ if (!bfn && cln->extends_file != StringName()) {
+ Ref<GDScript> parent = ResourceLoader::load(cln->extends_file);
+ if (parent.is_valid() && parent->is_valid()) {
+ Map<StringName, Variant> parent_constants;
+ parent->get_constants(&parent_constants);
+ if (parent_constants.has(identifier)) {
+ ConstantNode *constant = alloc_node<ConstantNode>();
+ constant->value = parent_constants[identifier];
+ expr = constant;
+ bfn = true;
+ }
+ }
+ }
}
}
@@ -2082,7 +2096,7 @@ GDScriptParser::PatternNode *GDScriptParser::_parse_pattern(bool p_static) {
return NULL;
}
pattern->pt_type = GDScriptParser::PatternNode::PT_BIND;
- pattern->bind = tokenizer->get_token_identifier();
+ pattern->bind = tokenizer->get_token_literal();
// Check if variable name is already used
BlockNode *bl = current_block;
while (bl) {
@@ -2640,14 +2654,14 @@ void GDScriptParser::_transform_match_statment(MatchNode *p_match_statement) {
local_var->assign = e->value();
local_var->set_datatype(local_var->assign->get_datatype());
- IdentifierNode *id = alloc_node<IdentifierNode>();
- id->name = local_var->name;
- id->declared_block = branch->body;
- id->set_datatype(local_var->assign->get_datatype());
+ IdentifierNode *id2 = alloc_node<IdentifierNode>();
+ id2->name = local_var->name;
+ id2->declared_block = branch->body;
+ id2->set_datatype(local_var->assign->get_datatype());
OperatorNode *op = alloc_node<OperatorNode>();
op->op = OperatorNode::OP_ASSIGN;
- op->arguments.push_back(id);
+ op->arguments.push_back(id2);
op->arguments.push_back(local_var->assign);
branch->body->statements.push_front(op);
@@ -2694,9 +2708,9 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
if (pending_newline != -1) {
- NewLineNode *nl = alloc_node<NewLineNode>();
- nl->line = pending_newline;
- p_block->statements.push_back(nl);
+ NewLineNode *nl2 = alloc_node<NewLineNode>();
+ nl2->line = pending_newline;
+ p_block->statements.push_back(nl2);
pending_newline = -1;
}
@@ -2727,6 +2741,8 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
} break;
case GDScriptTokenizer::TK_NEWLINE: {
+ int line = tokenizer->get_token_line();
+
if (!_parse_newline()) {
if (!error_set) {
p_block->end_line = tokenizer->get_token_line();
@@ -2735,9 +2751,9 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
return;
}
- NewLineNode *nl = alloc_node<NewLineNode>();
- nl->line = tokenizer->get_token_line();
- p_block->statements.push_back(nl);
+ NewLineNode *nl2 = alloc_node<NewLineNode>();
+ nl2->line = line;
+ p_block->statements.push_back(nl2);
} break;
case GDScriptTokenizer::TK_CF_PASS: {
@@ -2922,14 +2938,14 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
cf_else->cf_type = ControlFlowNode::CF_IF;
//condition
- Node *condition = _parse_and_reduce_expression(p_block, p_static);
- if (!condition) {
+ Node *condition2 = _parse_and_reduce_expression(p_block, p_static);
+ if (!condition2) {
if (_recover_from_completion()) {
break;
}
return;
}
- cf_else->arguments.push_back(condition);
+ cf_else->arguments.push_back(condition2);
cf_else->cf_type = ControlFlowNode::CF_IF;
cf_if->body_else->statements.push_back(cf_else);
@@ -2992,8 +3008,8 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
case GDScriptTokenizer::TK_CF_WHILE: {
tokenizer->advance();
- Node *condition = _parse_and_reduce_expression(p_block, p_static);
- if (!condition) {
+ Node *condition2 = _parse_and_reduce_expression(p_block, p_static);
+ if (!condition2) {
if (_recover_from_completion()) {
break;
}
@@ -3003,7 +3019,7 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
ControlFlowNode *cf_while = alloc_node<ControlFlowNode>();
cf_while->cf_type = ControlFlowNode::CF_WHILE;
- cf_while->arguments.push_back(condition);
+ cf_while->arguments.push_back(condition2);
cf_while->body = alloc_node<BlockNode>();
cf_while->body->parent_block = p_block;
@@ -3053,7 +3069,6 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
}
DataType iter_type;
- iter_type.is_constant = true;
if (container->type == Node::TYPE_OPERATOR) {
@@ -3378,6 +3393,13 @@ void GDScriptParser::_parse_extends(ClassNode *p_class) {
p_class->extends_file = constant;
tokenizer->advance();
+ // Add parent script as a dependency
+ String parent = constant;
+ if (parent.is_rel_path()) {
+ parent = base_path.plus_file(parent).simplify_path();
+ }
+ dependencies.push_back(parent);
+
if (tokenizer->get_token() != GDScriptTokenizer::TK_PERIOD) {
return;
} else
@@ -3494,16 +3516,20 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
tokenizer->advance();
if ((tokenizer->get_token() == GDScriptTokenizer::TK_CONSTANT && tokenizer->get_token_constant().get_type() == Variant::STRING)) {
- Variant constant = tokenizer->get_token_constant();
- String icon_path = constant.operator String();
+#ifdef TOOLS_ENABLED
+ if (Engine::get_singleton()->is_editor_hint()) {
+ Variant constant = tokenizer->get_token_constant();
+ String icon_path = constant.operator String();
- String abs_icon_path = icon_path.is_rel_path() ? self_path.get_base_dir().plus_file(icon_path).simplify_path() : icon_path;
- if (!FileAccess::exists(abs_icon_path)) {
- _set_error("No class icon found at: " + abs_icon_path);
- return;
- }
+ String abs_icon_path = icon_path.is_rel_path() ? self_path.get_base_dir().plus_file(icon_path).simplify_path() : icon_path;
+ if (!FileAccess::exists(abs_icon_path)) {
+ _set_error("No class icon found at: " + abs_icon_path);
+ return;
+ }
- p_class->icon_path = icon_path;
+ p_class->icon_path = icon_path;
+ }
+#endif
tokenizer->advance();
} else {
@@ -4553,6 +4579,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
//variale declaration and (eventual) initialization
ClassNode::Member member;
+
bool autoexport = tokenizer->get_token(-1) == GDScriptTokenizer::TK_PR_EXPORT;
if (current_export.type != Variant::NIL) {
member._export = current_export;
@@ -4686,6 +4713,16 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
ConstantNode *cn = static_cast<ConstantNode *>(subexpr);
if (cn->value.get_type() != Variant::NIL) {
+ if (member._export.type != Variant::NIL && cn->value.get_type() != member._export.type) {
+ if (Variant::can_convert(cn->value.get_type(), member._export.type)) {
+ Variant::CallError err;
+ const Variant *args = &cn->value;
+ cn->value = Variant::construct(member._export.type, &args, 1, err);
+ } else {
+ _set_error("Cannot convert the provided value to the export type.");
+ return;
+ }
+ }
member.default_value = cn->value;
}
}
@@ -4700,12 +4737,12 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
op->arguments.push_back(subexpr);
#ifdef DEBUG_ENABLED
- NewLineNode *nl = alloc_node<NewLineNode>();
- nl->line = line;
+ NewLineNode *nl2 = alloc_node<NewLineNode>();
+ nl2->line = line;
if (onready)
- p_class->ready->statements.push_back(nl);
+ p_class->ready->statements.push_back(nl2);
else
- p_class->initializer->statements.push_back(nl);
+ p_class->initializer->statements.push_back(nl2);
#endif
if (onready)
p_class->ready->statements.push_back(op);
@@ -4720,6 +4757,25 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
_set_error("Type-less export needs a constant expression assigned to infer type.");
return;
}
+
+ if (member._export.type != Variant::NIL) {
+ IdentifierNode *id = alloc_node<IdentifierNode>();
+ id->name = member.identifier;
+
+ ConstantNode *cn = alloc_node<ConstantNode>();
+
+ Variant::CallError ce2;
+ cn->value = Variant::construct(member._export.type, NULL, 0, ce2);
+
+ OperatorNode *op = alloc_node<OperatorNode>();
+ op->op = OperatorNode::OP_INIT_ASSIGN;
+ op->arguments.push_back(id);
+ op->arguments.push_back(cn);
+
+ p_class->initializer->statements.push_back(op);
+
+ member.initial_assignment = op;
+ }
}
if (autoexport && member.data_type.has_type) {
@@ -5400,7 +5456,7 @@ GDScriptParser::DataType GDScriptParser::_resolve_type(const DataType &p_source,
String script_path = ScriptServer::get_global_class_path(id);
if (script_path == self_path) {
result.kind = DataType::CLASS;
- result.class_type = current_class;
+ result.class_type = static_cast<ClassNode *>(head);
} else {
Ref<Script> script = ResourceLoader::load(script_path);
Ref<GDScript> gds = script;
@@ -5499,10 +5555,10 @@ GDScriptParser::DataType GDScriptParser::_resolve_type(const DataType &p_source,
result.script_type = gds;
found = true;
} else {
- Ref<Script> scr = constants[id];
- if (scr.is_valid()) {
+ Ref<Script> scr2 = constants[id];
+ if (scr2.is_valid()) {
result.kind = DataType::SCRIPT;
- result.script_type = scr;
+ result.script_type = scr2;
found = true;
}
}
@@ -5594,6 +5650,9 @@ GDScriptParser::DataType GDScriptParser::_type_from_gdtype(const GDScriptDataTyp
result.script_type = p_gdtype.script_type;
switch (p_gdtype.kind) {
+ case GDScriptDataType::UNINITIALIZED: {
+ ERR_EXPLAIN("Uninitialized datatype. Please report a bug.");
+ } break;
case GDScriptDataType::BUILTIN: {
result.kind = DataType::BUILTIN;
} break;
@@ -6619,7 +6678,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
bool match = false;
List<MethodInfo> constructors;
Variant::get_constructor_list(tn->vtype, &constructors);
- PropertyInfo return_type;
+ PropertyInfo return_type2;
for (List<MethodInfo>::Element *E = constructors.front(); E; E = E->next()) {
MethodInfo &mi = E->get();
@@ -6658,13 +6717,13 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
if (types_match) {
match = true;
- return_type = mi.return_val;
+ return_type2 = mi.return_val;
break;
}
}
if (match) {
- return _type_from_property(return_type, false);
+ return _type_from_property(return_type2, false);
} else if (check_types) {
String err = "No constructor of '";
err += Variant::get_type_name(tn->vtype);
@@ -6795,7 +6854,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
return_type = original_type;
return_type.is_meta_type = false;
- valid = true; // There's always an initializer, we can asume this is true
+ valid = true; // There's always an initializer, we can assume this is true
}
if (!valid) {
@@ -7200,6 +7259,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_identifier_type(const DataType
DataType result;
result.has_type = true;
result.script_type = scr;
+ result.is_constant = true;
result.is_meta_type = true;
Ref<GDScript> gds = scr;
if (gds.is_valid()) {
@@ -7250,6 +7310,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_identifier_type(const DataType
if (singleton.is_valid()) {
DataType result;
result.has_type = true;
+ result.is_constant = true;
result.script_type = singleton;
Ref<GDScript> gds = singleton;
@@ -7431,7 +7492,8 @@ void GDScriptParser::_check_class_level_types(ClassNode *p_class) {
found_setter = true;
FunctionNode *setter = p_class->functions[j];
- if (setter->arguments.size() != 1) {
+ if (setter->get_required_argument_count() != 1 &&
+ !(setter->get_required_argument_count() == 0 && setter->default_values.size() > 0)) {
_set_error("Setter function needs to receive exactly 1 argument. See '" + setter->name +
"()' definition at line " + itos(setter->line) + ".",
v.line);
@@ -7450,7 +7512,7 @@ void GDScriptParser::_check_class_level_types(ClassNode *p_class) {
found_getter = true;
FunctionNode *getter = p_class->functions[j];
- if (getter->arguments.size() != 0) {
+ if (getter->get_required_argument_count() != 0) {
_set_error("Getter function can't receive arguments. See '" + getter->name +
"()' definition at line " + itos(getter->line) + ".",
v.line);
@@ -7576,7 +7638,7 @@ void GDScriptParser::_check_function_types(FunctionNode *p_function) {
}
parent_signature += " " + p_function->name + "(";
if (arg_types.size()) {
- int i = 0;
+ int j = 0;
for (List<DataType>::Element *E = arg_types.front(); E; E = E->next()) {
if (E != arg_types.front()) {
parent_signature += ", ";
@@ -7586,11 +7648,11 @@ void GDScriptParser::_check_function_types(FunctionNode *p_function) {
arg = "Variant";
}
parent_signature += arg;
- if (i == arg_types.size() - default_arg_count) {
+ if (j == arg_types.size() - default_arg_count) {
parent_signature += "=default";
}
- i++;
+ j++;
}
}
parent_signature += ")";
@@ -7804,13 +7866,16 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
return;
}
- if (!lh_type.has_type && check_types) {
- if (op->arguments[0]->type == Node::TYPE_OPERATOR) {
- _mark_line_as_unsafe(op->line);
+ if (check_types) {
+ if (!lh_type.has_type) {
+ if (op->arguments[0]->type == Node::TYPE_OPERATOR) {
+ _mark_line_as_unsafe(op->line);
+ }
+ }
+ if (lh_type.is_constant) {
+ _set_error("Cannot assign a new value to a constant.", op->line);
+ return;
}
- } else if (lh_type.is_constant) {
- _set_error("Cannot assign a new value to a constant.", op->line);
- return;
}
DataType rh_type;
@@ -8111,6 +8176,10 @@ Error GDScriptParser::_parse(const String &p_base_path) {
return ERR_PARSE_ERROR;
}
+ if (dependencies_only) {
+ return OK;
+ }
+
_determine_inheritance(main_class);
if (error_set) {
@@ -8189,7 +8258,7 @@ Error GDScriptParser::parse_bytecode(const Vector<uint8_t> &p_bytecode, const St
return ret;
}
-Error GDScriptParser::parse(const String &p_code, const String &p_base_path, bool p_just_validate, const String &p_self_path, bool p_for_completion, Set<int> *r_safe_lines) {
+Error GDScriptParser::parse(const String &p_code, const String &p_base_path, bool p_just_validate, const String &p_self_path, bool p_for_completion, Set<int> *r_safe_lines, bool p_dependencies_only) {
clear();
@@ -8199,6 +8268,7 @@ Error GDScriptParser::parse(const String &p_code, const String &p_base_path, boo
validating = p_just_validate;
for_completion = p_for_completion;
+ dependencies_only = p_dependencies_only;
#ifdef DEBUG_ENABLED
safe_lines = r_safe_lines;
#endif // DEBUG_ENABLED
@@ -8255,6 +8325,8 @@ void GDScriptParser::clear() {
parenthesis = 0;
current_export.type = Variant::NIL;
check_types = true;
+ dependencies_only = false;
+ dependencies.clear();
error = "";
#ifdef DEBUG_ENABLED
safe_lines = NULL;
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index b4a705c9e7..809bff8f20 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -95,6 +95,7 @@ public:
}
DataType() :
+ kind(UNRESOLVED),
has_type(false),
is_constant(false),
is_meta_type(false),
@@ -168,6 +169,7 @@ public:
MultiplayerAPI::RPCMode rpc_mode;
int usages;
};
+
struct Constant {
Node *expression;
DataType type;
@@ -219,6 +221,7 @@ public:
virtual DataType get_datatype() const { return return_type; }
virtual void set_datatype(const DataType &p_datatype) { return_type = p_datatype; }
+ int get_required_argument_count() { return arguments.size() - default_values.size(); }
FunctionNode() {
type = TYPE_FUNCTION;
@@ -443,7 +446,6 @@ public:
CF_IF,
CF_FOR,
CF_WHILE,
- CF_SWITCH,
CF_BREAK,
CF_CONTINUE,
CF_RETURN,
@@ -531,6 +533,8 @@ private:
int error_line;
int error_column;
bool check_types;
+ bool dependencies_only;
+ List<String> dependencies;
#ifdef DEBUG_ENABLED
Set<int> *safe_lines;
#endif // DEBUG_ENABLED
@@ -632,7 +636,7 @@ public:
#ifdef DEBUG_ENABLED
const List<GDScriptWarning> &get_warnings() const { return warnings; }
#endif // DEBUG_ENABLED
- Error parse(const String &p_code, const String &p_base_path = "", bool p_just_validate = false, const String &p_self_path = "", bool p_for_completion = false, Set<int> *r_safe_lines = NULL);
+ Error parse(const String &p_code, const String &p_base_path = "", bool p_just_validate = false, const String &p_self_path = "", bool p_for_completion = false, Set<int> *r_safe_lines = NULL, bool p_dependencies_only = false);
Error parse_bytecode(const Vector<uint8_t> &p_bytecode, const String &p_base_path = "", const String &p_self_path = "");
bool is_tool_script() const;
@@ -651,6 +655,8 @@ public:
int get_completion_argument_index();
int get_completion_identifier_is_function();
+ const List<String> &get_dependencies() const { return dependencies; }
+
void clear();
GDScriptParser();
~GDScriptParser();
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp
index 127a00a9f3..8b22d6f085 100644
--- a/modules/gdscript/gdscript_tokenizer.cpp
+++ b/modules/gdscript/gdscript_tokenizer.cpp
@@ -80,10 +80,7 @@ const char *GDScriptTokenizer::token_names[TK_MAX] = {
"elif",
"else",
"for",
- "do",
"while",
- "switch (reserved)",
- "case (reserved)",
"break",
"continue",
"pass",
@@ -224,9 +221,6 @@ static const _kws _keyword_list[] = {
{ GDScriptTokenizer::TK_CF_ELSE, "else" },
{ GDScriptTokenizer::TK_CF_FOR, "for" },
{ GDScriptTokenizer::TK_CF_WHILE, "while" },
- { GDScriptTokenizer::TK_CF_DO, "do" },
- { GDScriptTokenizer::TK_CF_SWITCH, "switch" },
- { GDScriptTokenizer::TK_CF_CASE, "case" },
{ GDScriptTokenizer::TK_CF_BREAK, "break" },
{ GDScriptTokenizer::TK_CF_CONTINUE, "continue" },
{ GDScriptTokenizer::TK_CF_RETURN, "return" },
@@ -291,9 +285,6 @@ bool GDScriptTokenizer::is_token_literal(int p_offset, bool variable_safe) const
case TK_CF_ELSE:
case TK_CF_FOR:
case TK_CF_WHILE:
- case TK_CF_DO:
- case TK_CF_SWITCH:
- case TK_CF_CASE:
case TK_CF_BREAK:
case TK_CF_CONTINUE:
case TK_CF_RETURN:
@@ -998,11 +989,11 @@ void GDScriptTokenizerText::_advance() {
//built in func?
- for (int i = 0; i < GDScriptFunctions::FUNC_MAX; i++) {
+ for (int j = 0; j < GDScriptFunctions::FUNC_MAX; j++) {
- if (str == GDScriptFunctions::get_func_name(GDScriptFunctions::Function(i))) {
+ if (str == GDScriptFunctions::get_func_name(GDScriptFunctions::Function(j))) {
- _make_built_in_func(GDScriptFunctions::Function(i));
+ _make_built_in_func(GDScriptFunctions::Function(j));
found = true;
break;
}
@@ -1426,7 +1417,7 @@ StringName GDScriptTokenizerBuffer::get_token_identifier(int p_offset) const {
ERR_FAIL_INDEX_V(offset, tokens.size(), StringName());
uint32_t identifier = tokens[offset] >> TOKEN_BITS;
- ERR_FAIL_INDEX_V(identifier, (uint32_t)identifiers.size(), StringName());
+ ERR_FAIL_UNSIGNED_INDEX_V(identifier, (uint32_t)identifiers.size(), StringName());
return identifiers[identifier];
}
@@ -1482,7 +1473,7 @@ const Variant &GDScriptTokenizerBuffer::get_token_constant(int p_offset) const {
int offset = token + p_offset;
ERR_FAIL_INDEX_V(offset, tokens.size(), nil);
uint32_t constant = tokens[offset] >> TOKEN_BITS;
- ERR_FAIL_INDEX_V(constant, (uint32_t)constants.size(), nil);
+ ERR_FAIL_UNSIGNED_INDEX_V(constant, (uint32_t)constants.size(), nil);
return constants[constant];
}
String GDScriptTokenizerBuffer::get_token_error(int p_offset) const {
diff --git a/modules/gdscript/gdscript_tokenizer.h b/modules/gdscript/gdscript_tokenizer.h
index abacdf0322..7b977ff67c 100644
--- a/modules/gdscript/gdscript_tokenizer.h
+++ b/modules/gdscript/gdscript_tokenizer.h
@@ -32,7 +32,7 @@
#define GDSCRIPT_TOKENIZER_H
#include "core/pair.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
#include "core/variant.h"
#include "core/vmap.h"
@@ -86,10 +86,7 @@ public:
TK_CF_ELIF,
TK_CF_ELSE,
TK_CF_FOR,
- TK_CF_DO,
TK_CF_WHILE,
- TK_CF_SWITCH,
- TK_CF_CASE,
TK_CF_BREAK,
TK_CF_CONTINUE,
TK_CF_PASS,
@@ -118,7 +115,7 @@ public:
TK_PR_REMOTE,
TK_PR_SYNC,
TK_PR_MASTER,
- TK_PR_SLAVE,
+ TK_PR_SLAVE, // Deprecated by TK_PR_PUPPET, to remove in 4.0
TK_PR_PUPPET,
TK_PR_REMOTESYNC,
TK_PR_MASTERSYNC,
@@ -176,7 +173,7 @@ public:
#ifdef DEBUG_ENABLED
virtual const Vector<Pair<int, String> > &get_warning_skips() const = 0;
virtual const Set<String> &get_warning_global_skips() const = 0;
- virtual const bool is_ignoring_warnings() const = 0;
+ virtual bool is_ignoring_warnings() const = 0;
#endif // DEBUG_ENABLED
virtual ~GDScriptTokenizer(){};
@@ -248,7 +245,7 @@ public:
#ifdef DEBUG_ENABLED
virtual const Vector<Pair<int, String> > &get_warning_skips() const { return warning_skips; }
virtual const Set<String> &get_warning_global_skips() const { return warning_global_skips; }
- virtual const bool is_ignoring_warnings() const { return ignore_warnings; }
+ virtual bool is_ignoring_warnings() const { return ignore_warnings; }
#endif // DEBUG_ENABLED
};
@@ -292,7 +289,7 @@ public:
static Set<String> s;
return s;
}
- virtual const bool is_ignoring_warnings() const { return true; }
+ virtual bool is_ignoring_warnings() const { return true; }
#endif // DEBUG_ENABLED
GDScriptTokenizerBuffer();
};
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index fe1eac6dc9..32a014e76d 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -517,7 +517,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
Ref<NavigationMesh> navmesh = mesh_library->get_item_navmesh(c.item);
if (navmesh.is_valid()) {
Octant::NavMesh nm;
- nm.xform = xform;
+ nm.xform = xform * mesh_library->get_item_navmesh_transform(c.item);
if (navigation) {
nm.id = navigation->navmesh_add(navmesh, xform, this);
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 12c4a18a64..17eb6f674c 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -289,11 +289,11 @@ void GridMapEditor::_update_selection_transform() {
scale *= node->get_cell_size();
pos *= node->get_cell_size();
- Transform xf;
- xf.basis.scale(scale);
- xf.origin = pos;
+ Transform xf2;
+ xf2.basis.scale(scale);
+ xf2.origin = pos;
- VisualServer::get_singleton()->instance_set_transform(selection_level_instance[i], xf);
+ VisualServer::get_singleton()->instance_set_transform(selection_level_instance[i], xf2);
}
}
}
@@ -631,7 +631,7 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
(mb->get_button_index() == BUTTON_LEFT && input_action == INPUT_PAINT)) {
if (set_items.size()) {
- undo_redo->create_action("GridMap Paint");
+ undo_redo->create_action(TTR("GridMap Paint"));
for (List<SetItem>::Element *E = set_items.front(); E; E = E->next()) {
const SetItem &si = E->get();
@@ -717,6 +717,26 @@ void GridMapEditor::_set_display_mode(int p_mode) {
update_palette();
}
+void GridMapEditor::_text_changed(const String &p_text) {
+ update_palette();
+}
+
+void GridMapEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
+
+ Ref<InputEventKey> k = p_ie;
+
+ if (k.is_valid() && (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_PAGEUP || k->get_scancode() == KEY_PAGEDOWN)) {
+
+ mesh_library_palette->call("_gui_input", k);
+ search_box->accept_event();
+ }
+}
+
+void GridMapEditor::_icon_size_changed(float p_value) {
+ mesh_library_palette->set_icon_scale(p_value);
+ update_palette();
+}
+
void GridMapEditor::update_palette() {
int selected = mesh_library_palette->get_current();
@@ -730,8 +750,9 @@ void GridMapEditor::update_palette() {
}
float min_size = EDITOR_DEF("editors/grid_map/preview_size", 64);
+ min_size *= EDSCALE;
mesh_library_palette->set_fixed_icon_size(Size2(min_size, min_size));
- mesh_library_palette->set_fixed_column_width(min_size * 3 / 2);
+ mesh_library_palette->set_fixed_column_width(min_size * MAX(size_slider->get_value(), 1.5));
mesh_library_palette->set_max_text_lines(2);
Ref<MeshLibrary> mesh_library = node->get_mesh_library();
@@ -754,23 +775,28 @@ void GridMapEditor::update_palette() {
}
il.sort();
+ String filter = search_box->get_text().strip_edges();
+
int item = 0;
for (List<_CGMEItemSort>::Element *E = il.front(); E; E = E->next()) {
int id = E->get().id;
-
- mesh_library_palette->add_item("");
-
String name = mesh_library->get_item_name(id);
Ref<Texture> preview = mesh_library->get_item_preview(id);
+ if (name == "") {
+ name = "#" + itos(id);
+ }
+
+ if (filter != "" && !filter.is_subsequence_ofi(name))
+ continue;
+
+ mesh_library_palette->add_item("");
if (!preview.is_null()) {
mesh_library_palette->set_item_icon(item, preview);
mesh_library_palette->set_item_tooltip(item, name);
}
- if (name != "") {
- mesh_library_palette->set_item_text(item, name);
- }
+ mesh_library_palette->set_item_text(item, name);
mesh_library_palette->set_item_metadata(item, id);
item++;
@@ -985,6 +1011,7 @@ void GridMapEditor::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
options->set_icon(get_icon("GridMap", "EditorIcons"));
+ search_box->set_right_icon(get_icon("Search", "EditorIcons"));
} break;
}
}
@@ -1031,6 +1058,9 @@ void GridMapEditor::_floor_changed(float p_value) {
void GridMapEditor::_bind_methods() {
+ ClassDB::bind_method("_text_changed", &GridMapEditor::_text_changed);
+ ClassDB::bind_method("_sbox_input", &GridMapEditor::_sbox_input);
+ ClassDB::bind_method("_icon_size_changed", &GridMapEditor::_icon_size_changed);
ClassDB::bind_method("_menu_option", &GridMapEditor::_menu_option);
ClassDB::bind_method("_configure", &GridMapEditor::_configure);
ClassDB::bind_method("_item_selected_cbk", &GridMapEditor::_item_selected_cbk);
@@ -1132,6 +1162,12 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
add_child(hb);
hb->set_h_size_flags(SIZE_EXPAND_FILL);
+ search_box = memnew(LineEdit);
+ search_box->set_h_size_flags(SIZE_EXPAND_FILL);
+ hb->add_child(search_box);
+ search_box->connect("text_changed", this, "_text_changed");
+ search_box->connect("gui_input", this, "_sbox_input");
+
mode_thumbnail = memnew(ToolButton);
mode_thumbnail->set_toggle_mode(true);
mode_thumbnail->set_pressed(true);
@@ -1146,6 +1182,15 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
hb->add_child(mode_list);
mode_list->connect("pressed", this, "_set_display_mode", varray(DISPLAY_LIST));
+ size_slider = memnew(HSlider);
+ size_slider->set_h_size_flags(SIZE_EXPAND_FILL);
+ size_slider->set_min(0.1f);
+ size_slider->set_max(4.0f);
+ size_slider->set_step(0.1f);
+ size_slider->set_value(1.0f);
+ size_slider->connect("value_changed", this, "_icon_size_changed");
+ add_child(size_slider);
+
EDITOR_DEF("editors/grid_map/preview_size", 64);
display_mode = DISPLAY_THUMBNAIL;
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 81a21a76ae..59b8ac13da 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -79,6 +79,8 @@ class GridMapEditor : public VBoxContainer {
double accumulated_floor_delta;
ToolButton *mode_thumbnail;
ToolButton *mode_list;
+ LineEdit *search_box;
+ HSlider *size_slider;
HBoxContainer *spatial_editor_hb;
ConfirmationDialog *settings_dialog;
VBoxContainer *settings_vbc;
@@ -193,6 +195,11 @@ class GridMapEditor : public VBoxContainer {
void _update_cursor_instance();
void _update_clip();
+ void _text_changed(const String &p_text);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
+
+ void _icon_size_changed(float p_value);
+
void _update_duplicate_indicator();
void _duplicate_paste();
void _update_selection_transform();
diff --git a/modules/mbedtls/stream_peer_mbed_tls.cpp b/modules/mbedtls/stream_peer_mbed_tls.cpp
index 973713f500..45d3b86919 100755
--- a/modules/mbedtls/stream_peer_mbed_tls.cpp
+++ b/modules/mbedtls/stream_peer_mbed_tls.cpp
@@ -270,7 +270,10 @@ void StreamPeerMbedTLS::poll() {
return;
}
- int ret = mbedtls_ssl_read(&ssl, NULL, 0);
+ // We could pass NULL as second parameter, but some behaviour sanitizers doesn't seem to like that.
+ // Passing a 1 byte buffer to workaround it.
+ uint8_t byte;
+ int ret = mbedtls_ssl_read(&ssl, &byte, 0);
if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
// Nothing to read/write (non blocking IO)
@@ -313,7 +316,7 @@ void StreamPeerMbedTLS::disconnect_from_stream() {
Ref<StreamPeerTCP> tcp = base;
if (tcp.is_valid() && tcp->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
- // We are still connected on the socket, try to send close notity.
+ // We are still connected on the socket, try to send close notify.
mbedtls_ssl_close_notify(&ssl);
}
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index 78cc667718..b4fbd417d7 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -31,7 +31,7 @@
#include "mobile_vr_interface.h"
#include "core/os/input.h"
#include "core/os/os.h"
-#include "servers/visual/visual_server_global.h"
+#include "servers/visual/visual_server_globals.h"
StringName MobileVRInterface::get_name() const {
return "Native mobile";
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 0b21ba3347..e33b238f45 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -139,14 +139,24 @@ void CSharpLanguage::finish() {
}
#endif
- // Release gchandle bindings before finalizing mono runtime
- script_bindings.clear();
+ // Make sure all script binding gchandles are released before finalizing GDMono
+ for (Map<Object *, CSharpScriptBinding>::Element *E = script_bindings.front(); E; E = E->next()) {
+ CSharpScriptBinding &script_binding = E->value();
+
+ if (script_binding.gchandle.is_valid()) {
+ script_binding.gchandle->release();
+ script_binding.inited = false;
+ }
+ }
if (gdmono) {
memdelete(gdmono);
gdmono = NULL;
}
+ // Clear here, after finalizing all domains to make sure there is nothing else referencing the elements.
+ script_bindings.clear();
+
finalizing = false;
}
@@ -439,7 +449,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
Variant::_RID
};
- for (int i = 0; i < sizeof(var_types) / sizeof(Variant::Type); i++) {
+ for (unsigned int i = 0; i < sizeof(var_types) / sizeof(Variant::Type); i++) {
if (p_var_type_name == Variant::get_type_name(var_types[i]))
return p_var_type_name;
}
@@ -489,6 +499,47 @@ String CSharpLanguage::_get_indentation() const {
return "\t";
}
+String CSharpLanguage::debug_get_error() const {
+
+ return _debug_error;
+}
+
+int CSharpLanguage::debug_get_stack_level_count() const {
+
+ if (_debug_parse_err_line >= 0)
+ return 1;
+
+ // TODO: StackTrace
+ return 1;
+}
+
+int CSharpLanguage::debug_get_stack_level_line(int p_level) const {
+
+ if (_debug_parse_err_line >= 0)
+ return _debug_parse_err_line;
+
+ // TODO: StackTrace
+ return 1;
+}
+
+String CSharpLanguage::debug_get_stack_level_function(int p_level) const {
+
+ if (_debug_parse_err_line >= 0)
+ return String();
+
+ // TODO: StackTrace
+ return String();
+}
+
+String CSharpLanguage::debug_get_stack_level_source(int p_level) const {
+
+ if (_debug_parse_err_line >= 0)
+ return _debug_parse_err_file;
+
+ // TODO: StackTrace
+ return String();
+}
+
Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info() {
#ifdef DEBUG_ENABLED
@@ -578,7 +629,7 @@ void CSharpLanguage::frame() {
if (exc) {
GDMonoUtils::debug_unhandled_exception(exc);
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
}
}
@@ -709,13 +760,13 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
// Script::instances are deleted during managed object disposal, which happens on domain finalize.
// Only placeholders are kept. Therefore we need to keep a copy before that happens.
- for (Set<Object *>::Element *E = script->instances.front(); E; E = E->next()) {
- script->pending_reload_instances.insert(E->get()->get_instance_id());
+ for (Set<Object *>::Element *F = script->instances.front(); F; F = F->next()) {
+ script->pending_reload_instances.insert(F->get()->get_instance_id());
}
#ifdef TOOLS_ENABLED
- for (Set<PlaceHolderScriptInstance *>::Element *E = script->placeholders.front(); E; E = E->next()) {
- script->pending_reload_instances.insert(E->get()->get_owner()->get_instance_id());
+ for (Set<PlaceHolderScriptInstance *>::Element *F = script->placeholders.front(); F; F = F->next()) {
+ script->pending_reload_instances.insert(F->get()->get_owner()->get_instance_id());
}
#endif
@@ -948,12 +999,11 @@ void CSharpLanguage::thread_exit() {
bool CSharpLanguage::debug_break_parse(const String &p_file, int p_line, const String &p_error) {
- // Break because of parse error
+ // Not a parser error in our case, but it's still used for other type of errors
if (ScriptDebugger::get_singleton() && Thread::get_caller_id() == Thread::get_main_id()) {
- // TODO
- //_debug_parse_err_line = p_line;
- //_debug_parse_err_file = p_file;
- //_debug_error = p_error;
+ _debug_parse_err_line = p_line;
+ _debug_parse_err_file = p_file;
+ _debug_error = p_error;
ScriptDebugger::get_singleton()->debug(this, false);
return true;
} else {
@@ -964,10 +1014,9 @@ bool CSharpLanguage::debug_break_parse(const String &p_file, int p_line, const S
bool CSharpLanguage::debug_break(const String &p_error, bool p_allow_continue) {
if (ScriptDebugger::get_singleton() && Thread::get_caller_id() == Thread::get_main_id()) {
- // TODO
- //_debug_parse_err_line = -1;
- //_debug_parse_err_file = "";
- //_debug_error = p_error;
+ _debug_parse_err_line = -1;
+ _debug_parse_err_file = "";
+ _debug_error = p_error;
ScriptDebugger::get_singleton()->debug(this, p_allow_continue);
return true;
} else {
@@ -975,6 +1024,13 @@ bool CSharpLanguage::debug_break(const String &p_error, bool p_allow_continue) {
}
}
+void CSharpLanguage::_uninitialize_script_bindings() {
+ for (Map<Object *, CSharpScriptBinding>::Element *E = script_bindings.front(); E; E = E->next()) {
+ CSharpScriptBinding &script_binding = E->value();
+ script_binding.inited = false;
+ }
+}
+
void CSharpLanguage::set_language_index(int p_idx) {
ERR_FAIL_COND(lang_idx != -1);
@@ -1054,12 +1110,14 @@ CSharpLanguage::~CSharpLanguage() {
singleton = NULL;
}
-void *CSharpLanguage::alloc_instance_binding_data(Object *p_object) {
+bool CSharpLanguage::setup_csharp_script_binding(CSharpScriptBinding &r_script_binding, Object *p_object) {
#ifdef DEBUG_ENABLED
// I don't trust you
- if (p_object->get_script_instance())
- CRASH_COND(NULL != CAST_CSHARP_INSTANCE(p_object->get_script_instance()));
+ if (p_object->get_script_instance()) {
+ CSharpInstance *csharp_instance = CAST_CSHARP_INSTANCE(p_object->get_script_instance());
+ CRASH_COND(csharp_instance != NULL && !csharp_instance->is_destructing_script_instance());
+ }
#endif
StringName type_name = p_object->get_class_name();
@@ -1068,29 +1126,21 @@ void *CSharpLanguage::alloc_instance_binding_data(Object *p_object) {
const ClassDB::ClassInfo *classinfo = ClassDB::classes.getptr(type_name);
while (classinfo && !classinfo->exposed)
classinfo = classinfo->inherits_ptr;
- ERR_FAIL_NULL_V(classinfo, NULL);
+ ERR_FAIL_NULL_V(classinfo, false);
type_name = classinfo->name;
GDMonoClass *type_class = GDMonoUtils::type_get_proxy_class(type_name);
- ERR_FAIL_NULL_V(type_class, NULL);
+ ERR_FAIL_NULL_V(type_class, false);
MonoObject *mono_object = GDMonoUtils::create_managed_for_godot_object(type_class, type_name, p_object);
- ERR_FAIL_NULL_V(mono_object, NULL);
-
- CSharpScriptBinding script_binding;
-
- script_binding.type_name = type_name;
- script_binding.wrapper_class = type_class; // cache
- script_binding.gchandle = MonoGCHandle::create_strong(mono_object);
+ ERR_FAIL_NULL_V(mono_object, false);
- void *data;
-
- {
- SCOPED_MUTEX_LOCK(language_bind_mutex);
- data = (void *)script_bindings.insert(p_object, script_binding);
- }
+ r_script_binding.inited = true;
+ r_script_binding.type_name = type_name;
+ r_script_binding.wrapper_class = type_class; // cache
+ r_script_binding.gchandle = MonoGCHandle::create_strong(mono_object);
// Tie managed to unmanaged
Reference *ref = Object::cast_to<Reference>(p_object);
@@ -1104,7 +1154,28 @@ void *CSharpLanguage::alloc_instance_binding_data(Object *p_object) {
ref->reference();
}
- return data;
+ return true;
+}
+
+void *CSharpLanguage::alloc_instance_binding_data(Object *p_object) {
+
+ SCOPED_MUTEX_LOCK(language_bind_mutex);
+
+ Map<Object *, CSharpScriptBinding>::Element *match = script_bindings.find(p_object);
+ if (match)
+ return (void *)match;
+
+ CSharpScriptBinding script_binding;
+
+ if (!setup_csharp_script_binding(script_binding, p_object))
+ return NULL;
+
+ return (void *)insert_script_binding(p_object, script_binding);
+}
+
+Map<Object *, CSharpScriptBinding>::Element *CSharpLanguage::insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding) {
+
+ return script_bindings.insert(p_object, p_script_binding);
}
void CSharpLanguage::free_instance_binding_data(void *p_data) {
@@ -1125,10 +1196,15 @@ void CSharpLanguage::free_instance_binding_data(void *p_data) {
Map<Object *, CSharpScriptBinding>::Element *data = (Map<Object *, CSharpScriptBinding>::Element *)p_data;
- // Set the native instance field to IntPtr.Zero, if not yet garbage collected
- MonoObject *mono_object = data->value().gchandle->get_target();
- if (mono_object) {
- CACHED_FIELD(GodotObject, ptr)->set_value_raw(mono_object, NULL);
+ CSharpScriptBinding &script_binding = data->value();
+
+ if (script_binding.inited) {
+ // Set the native instance field to IntPtr.Zero, if not yet garbage collected.
+ // This is done to avoid trying to dispose the native instance from Dispose(bool).
+ MonoObject *mono_object = script_binding.gchandle->get_target();
+ if (mono_object) {
+ CACHED_FIELD(GodotObject, ptr)->set_value_raw(mono_object, NULL);
+ }
}
script_bindings.erase(data);
@@ -1144,9 +1220,10 @@ void CSharpLanguage::refcount_incremented_instance_binding(Object *p_object) {
#endif
void *data = p_object->get_script_instance_binding(get_language_index());
- if (!data)
- return;
- Ref<MonoGCHandle> &gchandle = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get().gchandle;
+ CRASH_COND(!data);
+
+ CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
+ Ref<MonoGCHandle> &gchandle = script_binding.gchandle;
if (ref_owner->reference_get_count() > 1 && gchandle->is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
// The reference count was increased after the managed side was the only one referencing our owner.
@@ -1175,9 +1252,10 @@ bool CSharpLanguage::refcount_decremented_instance_binding(Object *p_object) {
int refcount = ref_owner->reference_get_count();
void *data = p_object->get_script_instance_binding(get_language_index());
- if (!data)
- return refcount == 0;
- Ref<MonoGCHandle> &gchandle = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get().gchandle;
+ CRASH_COND(!data);
+
+ CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
+ Ref<MonoGCHandle> &gchandle = script_binding.gchandle;
if (refcount == 1 && gchandle.is_valid() && !gchandle->is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
// If owner owner is no longer referenced by the unmanaged side,
@@ -1223,6 +1301,10 @@ MonoObject *CSharpInstance::get_mono_object() const {
return gchandle->get_target();
}
+Object *CSharpInstance::get_owner() {
+ return owner;
+}
+
bool CSharpInstance::set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(!script.is_valid(), false);
@@ -1233,14 +1315,14 @@ bool CSharpInstance::set(const StringName &p_name, const Variant &p_value) {
GDMonoClass *top = script->script_class;
while (top && top != script->native) {
- GDMonoField *field = script->script_class->get_field(p_name);
+ GDMonoField *field = top->get_field(p_name);
if (field) {
field->set_value_from_variant(mono_object, p_value);
return true;
}
- GDMonoProperty *property = script->script_class->get_property(p_name);
+ GDMonoProperty *property = top->get_property(p_name);
if (property) {
property->set_value(mono_object, GDMonoMarshal::variant_to_mono_object(p_value, property->get_type()));
@@ -1483,14 +1565,8 @@ bool CSharpInstance::_unreference_owner_unsafe() {
// Unsafe refcount decrement. The managed instance also counts as a reference.
// See: _reference_owner_unsafe()
- bool die = static_cast<Reference *>(owner)->unreference();
-
- if (die) {
- memdelete(owner);
- owner = NULL;
- }
-
- return die;
+ // Destroying the owner here means self destructing, so we defer the owner destruction to the caller.
+ return static_cast<Reference *>(owner)->unreference();
}
MonoObject *CSharpInstance::_internal_new_managed() {
@@ -1498,32 +1574,46 @@ MonoObject *CSharpInstance::_internal_new_managed() {
CRASH_COND(!gchandle.is_valid());
#endif
+ // Search the constructor first, to fail with an error if it's not found before allocating anything else.
+ GDMonoMethod *ctor = script->script_class->get_method(CACHED_STRING_NAME(dotctor), 0);
+ if (ctor == NULL) {
+ ERR_PRINTS("Cannot create script instance because the class does not define a default constructor: " + script->get_path());
+
+ ERR_EXPLAIN("Constructor not found");
+ ERR_FAIL_V(NULL);
+ }
+
CSharpLanguage::get_singleton()->release_script_gchandle(gchandle);
ERR_FAIL_NULL_V(owner, NULL);
ERR_FAIL_COND_V(script.is_null(), NULL);
- if (base_ref)
- _reference_owner_unsafe();
-
MonoObject *mono_object = mono_object_new(SCRIPTS_DOMAIN, script->script_class->get_mono_ptr());
if (!mono_object) {
+ // Important to clear this before destroying the script instance here
script = Ref<CSharpScript>();
- owner->set_script_instance(NULL);
+ owner = NULL;
+
+ bool die = _unreference_owner_unsafe();
+ // Not ok for the owner to die here. If there is a situation where this can happen, it will be considered a bug.
+ CRASH_COND(die == true);
+
ERR_EXPLAIN("Failed to allocate memory for the object");
ERR_FAIL_V(NULL);
}
+ // Tie managed to unmanaged
+ gchandle = MonoGCHandle::create_strong(mono_object);
+
+ if (base_ref)
+ _reference_owner_unsafe(); // Here, after assigning the gchandle (for the refcount_incremented callback)
+
CACHED_FIELD(GodotObject, ptr)->set_value_raw(mono_object, owner);
// Construct
- GDMonoMethod *ctor = script->script_class->get_method(CACHED_STRING_NAME(dotctor), 0);
ctor->invoke_raw(mono_object, NULL);
- // Tie managed to unmanaged
- gchandle = MonoGCHandle::create_strong(mono_object);
-
return mono_object;
}
@@ -1536,25 +1626,36 @@ void CSharpInstance::mono_object_disposed(MonoObject *p_obj) {
CSharpLanguage::get_singleton()->release_script_gchandle(p_obj, gchandle);
}
-void CSharpInstance::mono_object_disposed_baseref(MonoObject *p_obj, bool p_is_finalizer, bool &r_owner_deleted) {
+void CSharpInstance::mono_object_disposed_baseref(MonoObject *p_obj, bool p_is_finalizer, bool &r_delete_owner, bool &r_remove_script_instance) {
#ifdef DEBUG_ENABLED
CRASH_COND(!base_ref);
CRASH_COND(gchandle.is_null());
#endif
+
+ r_remove_script_instance = false;
+
if (_unreference_owner_unsafe()) {
- r_owner_deleted = true;
+ // Safe to self destruct here with memdelete(owner), but it's deferred to the caller to prevent future mistakes.
+ r_delete_owner = true;
} else {
- r_owner_deleted = false;
+ r_delete_owner = false;
CSharpLanguage::get_singleton()->release_script_gchandle(p_obj, gchandle);
- if (p_is_finalizer && !GDMono::get_singleton()->is_finalizing_scripts_domain()) {
- // If the native instance is still alive, then it was
- // referenced from another thread before the finalizer could
- // unreference it and delete it, so we want to keep it.
- // GC.ReRegisterForFinalize(this) is not safe because the objects
- // referenced by this could have already been collected.
- // Instead we will create a new managed instance here.
- _internal_new_managed();
+
+ if (!p_is_finalizer) {
+ // If the native instance is still alive and Dispose() was called
+ // (instead of the finalizer), then we remove the script instance.
+ r_remove_script_instance = true;
+ } else if (!GDMono::get_singleton()->is_finalizing_scripts_domain()) {
+ // If the native instance is still alive and this is called from the finalizer,
+ // then it was referenced from another thread before the finalizer could
+ // unreference and delete it, so we want to keep it.
+ // GC.ReRegisterForFinalize(this) is not safe because the objects referenced by 'this'
+ // could have already been collected. Instead we will create a new managed instance here.
+ MonoObject *new_managed = _internal_new_managed();
+ if (!new_managed) {
+ r_remove_script_instance = true;
+ }
}
}
}
@@ -1608,7 +1709,7 @@ bool CSharpInstance::refcount_decremented() {
return ref_dying;
}
-MultiplayerAPI::RPCMode CSharpInstance::_member_get_rpc_mode(GDMonoClassMember *p_member) const {
+MultiplayerAPI::RPCMode CSharpInstance::_member_get_rpc_mode(IMonoClassMember *p_member) const {
if (p_member->has_attribute(CACHED_CLASS(RemoteAttribute)))
return MultiplayerAPI::RPC_MODE_REMOTE;
@@ -1750,6 +1851,8 @@ CSharpInstance::CSharpInstance() :
CSharpInstance::~CSharpInstance() {
+ destructing_script_instance = true;
+
if (gchandle.is_valid()) {
if (!predelete_notified && !ref_dying) {
// This destructor is not called from the owners destructor.
@@ -1762,9 +1865,7 @@ CSharpInstance::~CSharpInstance() {
if (mono_object) {
MonoException *exc = NULL;
- destructing_script_instance = true;
GDMonoUtils::dispose(mono_object, &exc);
- destructing_script_instance = false;
if (exc) {
GDMonoUtils::set_pending_exception(exc);
@@ -1772,11 +1873,23 @@ CSharpInstance::~CSharpInstance() {
}
}
- gchandle->release(); // Make sure it's released
+ gchandle->release(); // Make sure the gchandle is released
}
- if (base_ref && !ref_dying && owner) { // it may be called from the owner's destructor
- _unreference_owner_unsafe();
+ // If not being called from the owner's destructor, and we still hold a reference to the owner
+ if (base_ref && !ref_dying && owner && unsafe_referenced) {
+ // The owner's script or script instance is being replaced (or removed)
+
+ // Transfer ownership to an "instance binding"
+
+ void *data = owner->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
+ CRASH_COND(data == NULL);
+
+ CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
+ CRASH_COND(!script_binding.inited);
+
+ bool die = _unreference_owner_unsafe();
+ CRASH_COND(die == true); // The "instance binding" should be holding a reference
}
if (script.is_valid() && owner) {
@@ -1820,6 +1933,9 @@ void CSharpScript::_update_exports_values(Map<StringName, Variant> &values, List
bool CSharpScript::_update_exports() {
#ifdef TOOLS_ENABLED
+ if (!Engine::get_singleton()->is_editor_hint())
+ return false;
+
placeholder_fallback_enabled = true; // until proven otherwise
if (!valid)
@@ -1841,13 +1957,21 @@ bool CSharpScript::_update_exports() {
MonoObject *tmp_object = mono_object_new(SCRIPTS_DOMAIN, script_class->get_mono_ptr());
if (!tmp_object) {
- ERR_PRINT("Failed to create temporary MonoObject");
+ ERR_PRINT("Failed to allocate temporary MonoObject");
return false;
}
uint32_t tmp_pinned_gchandle = MonoGCHandle::new_strong_handle_pinned(tmp_object); // pin it (not sure if needed)
GDMonoMethod *ctor = script_class->get_method(CACHED_STRING_NAME(dotctor), 0);
+
+ if (ctor == NULL) {
+ ERR_PRINTS("Cannot construct temporary MonoObject because the class does not define a default constructor: " + get_path());
+
+ ERR_EXPLAIN("Constructor not found");
+ ERR_FAIL_V(NULL);
+ }
+
MonoException *ctor_exc = NULL;
ctor->invoke(tmp_object, NULL, &ctor_exc);
@@ -2019,7 +2143,7 @@ bool CSharpScript::_get_signal(GDMonoClass *p_class, GDMonoClass *p_delegate, Ve
* Returns false if there was an error, otherwise true.
* If there was an error, r_prop_info and r_exported are not assigned any value.
*/
-bool CSharpScript::_get_member_export(GDMonoClass *p_class, GDMonoClassMember *p_member, PropertyInfo &r_prop_info, bool &r_exported) {
+bool CSharpScript::_get_member_export(GDMonoClass *p_class, IMonoClassMember *p_member, PropertyInfo &r_prop_info, bool &r_exported) {
StringName name = p_member->get_name();
@@ -2034,9 +2158,9 @@ bool CSharpScript::_get_member_export(GDMonoClass *p_class, GDMonoClassMember *p
ManagedType type;
- if (p_member->get_member_type() == GDMonoClassMember::MEMBER_TYPE_FIELD) {
+ if (p_member->get_member_type() == IMonoClassMember::MEMBER_TYPE_FIELD) {
type = static_cast<GDMonoField *>(p_member)->get_type();
- } else if (p_member->get_member_type() == GDMonoClassMember::MEMBER_TYPE_PROPERTY) {
+ } else if (p_member->get_member_type() == IMonoClassMember::MEMBER_TYPE_PROPERTY) {
type = static_cast<GDMonoProperty *>(p_member)->get_type();
} else {
CRASH_NOW();
@@ -2050,7 +2174,7 @@ bool CSharpScript::_get_member_export(GDMonoClass *p_class, GDMonoClassMember *p
return true;
}
- if (p_member->get_member_type() == GDMonoClassMember::MEMBER_TYPE_PROPERTY) {
+ if (p_member->get_member_type() == IMonoClassMember::MEMBER_TYPE_PROPERTY) {
GDMonoProperty *property = static_cast<GDMonoProperty *>(p_member);
if (!property->has_getter() || !property->has_setter()) {
ERR_PRINTS("Cannot export property because it does not provide a getter or a setter: " + p_class->get_full_name() + "." + name.operator String());
@@ -2113,7 +2237,7 @@ bool CSharpScript::_get_member_export(GDMonoClass *p_class, GDMonoClassMember *p
return false;
}
- if (val != i) {
+ if (val != (unsigned int)i) {
uses_default_values = false;
}
@@ -2128,8 +2252,11 @@ bool CSharpScript::_get_member_export(GDMonoClass *p_class, GDMonoClassMember *p
hint_string = name_only_hint_string;
}
} else if (variant_type == Variant::OBJECT && CACHED_CLASS(GodotReference)->is_assignable_from(type.type_class)) {
+ GDMonoClass *field_native_class = GDMonoUtils::get_class_native_base(type.type_class);
+ CRASH_COND(field_native_class == NULL);
+
hint = PROPERTY_HINT_RESOURCE_TYPE;
- hint_string = NATIVE_GDMONOCLASS_NAME(type.type_class);
+ hint_string = NATIVE_GDMONOCLASS_NAME(field_native_class);
} else {
hint = PropertyHint(CACHED_FIELD(ExportAttribute, hint)->get_int_value(attr));
hint_string = CACHED_FIELD(ExportAttribute, hintString)->get_string_value(attr);
@@ -2224,17 +2351,18 @@ void CSharpScript::_bind_methods() {
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &CSharpScript::_new, MethodInfo(Variant::OBJECT, "new"));
}
-Ref<CSharpScript> CSharpScript::create_for_managed_type(GDMonoClass *p_class) {
+Ref<CSharpScript> CSharpScript::create_for_managed_type(GDMonoClass *p_class, GDMonoClass *p_native) {
// This method should not fail
CRASH_COND(!p_class);
+ // TODO: Cache the 'CSharpScript' associated with this 'p_class' instead of allocating a new one every time
Ref<CSharpScript> script = memnew(CSharpScript);
script->name = p_class->get_name();
script->script_class = p_class;
- script->native = GDMonoUtils::get_class_native_base(script->script_class);
+ script->native = p_native;
CRASH_COND(script->native == NULL);
@@ -2328,22 +2456,64 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
/* STEP 1, CREATE */
+ // Search the constructor first, to fail with an error if it's not found before allocating anything else.
+ GDMonoMethod *ctor = script_class->get_method(CACHED_STRING_NAME(dotctor), p_argcount);
+ if (ctor == NULL) {
+ if (p_argcount == 0) {
+ ERR_PRINTS("Cannot create script instance because the class does not define a default constructor: " + get_path());
+ }
+
+ ERR_EXPLAIN("Constructor not found");
+ ERR_FAIL_V(NULL);
+ }
+
+ Ref<Reference> ref;
+ if (p_isref) {
+ // Hold it alive. Important if we have to dispose a script instance binding before creating the CSharpInstance.
+ ref = Ref<Reference>(static_cast<Reference *>(p_owner));
+ }
+
+ // If the object had a script instance binding, dispose it before adding the CSharpInstance
+ if (p_owner->has_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index())) {
+ void *data = p_owner->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
+ CRASH_COND(data == NULL);
+
+ CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
+ if (script_binding.inited && script_binding.gchandle.is_valid()) {
+ MonoObject *mono_object = script_binding.gchandle->get_target();
+ if (mono_object) {
+ MonoException *exc = NULL;
+ GDMonoUtils::dispose(mono_object, &exc);
+
+ if (exc) {
+ GDMonoUtils::set_pending_exception(exc);
+ }
+ }
+
+ script_binding.inited = false;
+ }
+ }
+
CSharpInstance *instance = memnew(CSharpInstance);
instance->base_ref = p_isref;
instance->script = Ref<CSharpScript>(this);
instance->owner = p_owner;
instance->owner->set_script_instance(instance);
- if (instance->base_ref)
- instance->_reference_owner_unsafe();
-
/* STEP 2, INITIALIZE AND CONSTRUCT */
MonoObject *mono_object = mono_object_new(SCRIPTS_DOMAIN, script_class->get_mono_ptr());
if (!mono_object) {
+ // Important to clear this before destroying the script instance here
instance->script = Ref<CSharpScript>();
- instance->owner->set_script_instance(NULL);
+ instance->owner = NULL;
+
+ bool die = instance->_unreference_owner_unsafe();
+ // Not ok for the owner to die here. If there is a situation where this can happen, it will be considered a bug.
+ CRASH_COND(die == true);
+
+ p_owner->set_script_instance(NULL);
r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
ERR_EXPLAIN("Failed to allocate memory for the object");
ERR_FAIL_V(NULL);
@@ -2352,6 +2522,9 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
// Tie managed to unmanaged
instance->gchandle = MonoGCHandle::create_strong(mono_object);
+ if (instance->base_ref)
+ instance->_reference_owner_unsafe(); // Here, after assigning the gchandle (for the refcount_incremented callback)
+
{
SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->script_instances_mutex);
instances.insert(instance->owner);
@@ -2360,7 +2533,6 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
CACHED_FIELD(GodotObject, ptr)->set_value_raw(mono_object, instance->owner);
// Construct
- GDMonoMethod *ctor = script_class->get_method(CACHED_STRING_NAME(dotctor), p_argcount);
ctor->invoke(mono_object, p_args);
/* STEP 3, PARTY */
@@ -2579,6 +2751,7 @@ Error CSharpScript::reload(bool p_keep_state) {
}
load_script_signals(script_class, native);
+ _update_exports();
}
return OK;
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 8a09be79a6..99877a4379 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -127,7 +127,7 @@ class CSharpScript : public Script {
bool _update_exports();
#ifdef TOOLS_ENABLED
- bool _get_member_export(GDMonoClass *p_class, GDMonoClassMember *p_member, PropertyInfo &r_prop_info, bool &r_exported);
+ bool _get_member_export(GDMonoClass *p_class, IMonoClassMember *p_member, PropertyInfo &r_prop_info, bool &r_exported);
#endif
CSharpInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_isref, Variant::CallError &r_error);
@@ -135,7 +135,7 @@ class CSharpScript : public Script {
// Do not use unless you know what you are doing
friend void GDMonoInternals::tie_managed_to_unmanaged(MonoObject *, Object *);
- static Ref<CSharpScript> create_for_managed_type(GDMonoClass *p_class);
+ static Ref<CSharpScript> create_for_managed_type(GDMonoClass *p_class, GDMonoClass *p_native);
protected:
static void _bind_methods();
@@ -162,7 +162,7 @@ public:
virtual bool has_script_signal(const StringName &p_signal) const;
virtual void get_script_signal_list(List<MethodInfo> *r_signals) const;
- /* TODO */ virtual bool get_property_default_value(const StringName &p_property, Variant &r_value) const;
+ virtual bool get_property_default_value(const StringName &p_property, Variant &r_value) const;
virtual void get_script_property_list(List<PropertyInfo> *p_list) const;
virtual void update_exports();
@@ -206,8 +206,15 @@ class CSharpInstance : public ScriptInstance {
Ref<MonoGCHandle> gchandle;
bool _reference_owner_unsafe();
+
+ /*
+ * If true is returned, the caller must memdelete the script instance's owner.
+ */
bool _unreference_owner_unsafe();
+ /*
+ * If NULL is returned, the caller must destroy the script instance by removing it from its owner.
+ */
MonoObject *_internal_new_managed();
// Do not use unless you know what you are doing
@@ -216,13 +223,15 @@ class CSharpInstance : public ScriptInstance {
void _call_multilevel(MonoObject *p_mono_object, const StringName &p_method, const Variant **p_args, int p_argcount);
- MultiplayerAPI::RPCMode _member_get_rpc_mode(GDMonoClassMember *p_member) const;
+ MultiplayerAPI::RPCMode _member_get_rpc_mode(IMonoClassMember *p_member) const;
public:
MonoObject *get_mono_object() const;
_FORCE_INLINE_ bool is_destructing_script_instance() { return destructing_script_instance; }
+ virtual Object *get_owner();
+
virtual bool set(const StringName &p_name, const Variant &p_value);
virtual bool get(const StringName &p_name, Variant &r_ret) const;
virtual void get_property_list(List<PropertyInfo> *p_properties) const;
@@ -235,7 +244,12 @@ public:
virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount);
void mono_object_disposed(MonoObject *p_obj);
- void mono_object_disposed_baseref(MonoObject *p_obj, bool p_is_finalizer, bool &r_owner_deleted);
+
+ /*
+ * If 'r_delete_owner' is set to true, the caller must memdelete the script instance's owner. Otherwise, if
+ * 'r_remove_script_instance' is set to true, the caller must destroy the script instance by removing it from its owner.
+ */
+ void mono_object_disposed_baseref(MonoObject *p_obj, bool p_is_finalizer, bool &r_delete_owner, bool &r_remove_script_instance);
virtual void refcount_incremented();
virtual bool refcount_decremented();
@@ -255,6 +269,7 @@ public:
};
struct CSharpScriptBinding {
+ bool inited;
StringName type_name;
GDMonoClass *wrapper_class;
Ref<MonoGCHandle> gchandle;
@@ -294,9 +309,19 @@ class CSharpLanguage : public ScriptLanguage {
Dictionary scripts_metadata;
+ // For debug_break and debug_break_parse
+ int _debug_parse_err_line;
+ String _debug_parse_err_file;
+ String _debug_error;
+
+ friend class GDMono;
+ void _uninitialize_script_bindings();
+
public:
StringNameCache string_names;
+ Mutex *get_language_bind_mutex() { return language_bind_mutex; }
+
_FORCE_INLINE_ int get_language_index() { return lang_idx; }
void set_language_index(int p_idx);
@@ -348,11 +373,11 @@ public:
/* TODO */ virtual void add_global_constant(const StringName &p_variable, const Variant &p_value) {}
/* DEBUGGER FUNCTIONS */
- /* TODO */ virtual String debug_get_error() const { return ""; }
- /* TODO */ virtual int debug_get_stack_level_count() const { return 1; }
- /* TODO */ virtual int debug_get_stack_level_line(int p_level) const { return 1; }
- /* TODO */ virtual String debug_get_stack_level_function(int p_level) const { return ""; }
- /* TODO */ virtual String debug_get_stack_level_source(int p_level) const { return ""; }
+ virtual String debug_get_error() const;
+ virtual int debug_get_stack_level_count() const;
+ virtual int debug_get_stack_level_line(int p_level) const;
+ virtual String debug_get_stack_level_function(int p_level) const;
+ virtual String debug_get_stack_level_source(int p_level) const;
/* TODO */ virtual void debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {}
/* TODO */ virtual void debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {}
/* TODO */ virtual void debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {}
@@ -391,6 +416,9 @@ public:
virtual void refcount_incremented_instance_binding(Object *p_object);
virtual bool refcount_decremented_instance_binding(Object *p_object);
+ Map<Object *, CSharpScriptBinding>::Element *insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding);
+ bool setup_csharp_script_binding(CSharpScriptBinding &r_script_binding, Object *p_object);
+
#ifdef DEBUG_ENABLED
Vector<StackInfo> stack_trace_get_info(MonoObject *p_stack_trace);
#endif
diff --git a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
index 4137f5eaef..967e3bcc19 100644
--- a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
+++ b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
@@ -18,11 +18,11 @@ namespace GodotSharpTools.Build
[MethodImpl(MethodImplOptions.InternalCall)]
private extern static string godot_icall_BuildInstance_get_MSBuildPath();
[MethodImpl(MethodImplOptions.InternalCall)]
- private extern static string godot_icall_BuildInstance_get_FrameworkPath();
- [MethodImpl(MethodImplOptions.InternalCall)]
private extern static string godot_icall_BuildInstance_get_MonoWindowsBinDir();
[MethodImpl(MethodImplOptions.InternalCall)]
private extern static bool godot_icall_BuildInstance_get_UsingMonoMSBuildOnWindows();
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ private extern static bool godot_icall_BuildInstance_get_PrintBuildOutput();
private static string GetMSBuildPath()
{
@@ -34,11 +34,6 @@ namespace GodotSharpTools.Build
return msbuildPath;
}
- private static string GetFrameworkPath()
- {
- return godot_icall_BuildInstance_get_FrameworkPath();
- }
-
private static string MonoWindowsBinDir
{
get
@@ -60,6 +55,14 @@ namespace GodotSharpTools.Build
}
}
+ private static bool PrintBuildOutput
+ {
+ get
+ {
+ return godot_icall_BuildInstance_get_PrintBuildOutput();
+ }
+ }
+
private string solution;
private string config;
@@ -78,23 +81,19 @@ namespace GodotSharpTools.Build
public bool Build(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties = null)
{
- bool debugMSBuild = IsDebugMSBuildRequested();
-
List<string> customPropertiesList = new List<string>();
if (customProperties != null)
customPropertiesList.AddRange(customProperties);
- string frameworkPath = GetFrameworkPath();
-
- if (!string.IsNullOrEmpty(frameworkPath))
- customPropertiesList.Add("FrameworkPathOverride=" + frameworkPath);
-
string compilerArgs = BuildArguments(loggerAssemblyPath, loggerOutputDir, customPropertiesList);
ProcessStartInfo startInfo = new ProcessStartInfo(GetMSBuildPath(), compilerArgs);
- bool redirectOutput = !debugMSBuild;
+ bool redirectOutput = !IsDebugMSBuildRequested() && !PrintBuildOutput;
+
+ if (!redirectOutput) // TODO: or if stdout verbose
+ Console.WriteLine($"Running: \"{startInfo.FileName}\" {startInfo.Arguments}");
startInfo.RedirectStandardOutput = redirectOutput;
startInfo.RedirectStandardError = redirectOutput;
@@ -135,8 +134,6 @@ namespace GodotSharpTools.Build
public bool BuildAsync(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties = null)
{
- bool debugMSBuild = IsDebugMSBuildRequested();
-
if (process != null)
throw new InvalidOperationException("Already in use");
@@ -145,16 +142,14 @@ namespace GodotSharpTools.Build
if (customProperties != null)
customPropertiesList.AddRange(customProperties);
- string frameworkPath = GetFrameworkPath();
-
- if (!string.IsNullOrEmpty(frameworkPath))
- customPropertiesList.Add("FrameworkPathOverride=" + frameworkPath);
-
string compilerArgs = BuildArguments(loggerAssemblyPath, loggerOutputDir, customPropertiesList);
ProcessStartInfo startInfo = new ProcessStartInfo(GetMSBuildPath(), compilerArgs);
- bool redirectOutput = !debugMSBuild;
+ bool redirectOutput = !IsDebugMSBuildRequested() && !PrintBuildOutput;
+
+ if (!redirectOutput) // TODO: or if stdout verbose
+ Console.WriteLine($"Running: \"{startInfo.FileName}\" {startInfo.Arguments}");
startInfo.RedirectStandardOutput = redirectOutput;
startInfo.RedirectStandardError = redirectOutput;
diff --git a/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj b/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj
index f9e9f41977..2871c041f5 100644
--- a/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj
+++ b/modules/mono/editor/GodotSharpTools/GodotSharpTools.csproj
@@ -8,6 +8,7 @@
<RootNamespace>GodotSharpTools</RootNamespace>
<AssemblyName>GodotSharpTools</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <BaseIntermediateOutputPath>obj</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -40,6 +41,7 @@
<Compile Include="Build\BuildSystem.cs" />
<Compile Include="Editor\MonoDevelopInstance.cs" />
<Compile Include="Project\ProjectExtensions.cs" />
+ <Compile Include="Project\IdentifierUtils.cs" />
<Compile Include="Project\ProjectGenerator.cs" />
<Compile Include="Project\ProjectUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
diff --git a/modules/mono/editor/GodotSharpTools/Project/IdentifierUtils.cs b/modules/mono/editor/GodotSharpTools/Project/IdentifierUtils.cs
new file mode 100644
index 0000000000..83e2d2cf8d
--- /dev/null
+++ b/modules/mono/editor/GodotSharpTools/Project/IdentifierUtils.cs
@@ -0,0 +1,199 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+
+namespace GodotSharpTools.Project
+{
+ public static class IdentifierUtils
+ {
+ public static string SanitizeQualifiedIdentifier(string qualifiedIdentifier, bool allowEmptyIdentifiers)
+ {
+ if (string.IsNullOrEmpty(qualifiedIdentifier))
+ throw new ArgumentException($"{nameof(qualifiedIdentifier)} cannot be empty", nameof(qualifiedIdentifier));
+
+ string[] identifiers = qualifiedIdentifier.Split(new[] { '.' });
+
+ for (int i = 0; i < identifiers.Length; i++)
+ {
+ identifiers[i] = SanitizeIdentifier(identifiers[i], allowEmpty: allowEmptyIdentifiers);
+ }
+
+ return string.Join(".", identifiers);
+ }
+
+ public static string SanitizeIdentifier(string identifier, bool allowEmpty)
+ {
+ if (string.IsNullOrEmpty(identifier))
+ {
+ if (allowEmpty)
+ return "Empty"; // Default value for empty identifiers
+
+ throw new ArgumentException($"{nameof(identifier)} cannot be empty if {nameof(allowEmpty)} is false", nameof(identifier));
+ }
+
+ if (identifier.Length > 511)
+ identifier = identifier.Substring(0, 511);
+
+ var identifierBuilder = new StringBuilder();
+ int startIndex = 0;
+
+ if (identifier[0] == '@')
+ {
+ identifierBuilder.Append('@');
+ startIndex += 1;
+ }
+
+ for (int i = startIndex; i < identifier.Length; i++)
+ {
+ char @char = identifier[i];
+
+ switch (Char.GetUnicodeCategory(@char))
+ {
+ case UnicodeCategory.UppercaseLetter:
+ case UnicodeCategory.LowercaseLetter:
+ case UnicodeCategory.TitlecaseLetter:
+ case UnicodeCategory.ModifierLetter:
+ case UnicodeCategory.LetterNumber:
+ case UnicodeCategory.OtherLetter:
+ identifierBuilder.Append(@char);
+ break;
+ case UnicodeCategory.NonSpacingMark:
+ case UnicodeCategory.SpacingCombiningMark:
+ case UnicodeCategory.ConnectorPunctuation:
+ case UnicodeCategory.DecimalDigitNumber:
+ // Identifiers may start with underscore
+ if (identifierBuilder.Length > startIndex || @char == '_')
+ identifierBuilder.Append(@char);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (identifierBuilder.Length == startIndex)
+ {
+ // All characters were invalid so now it's empty. Fill it with something.
+ identifierBuilder.Append("Empty");
+ }
+
+ identifier = identifierBuilder.ToString();
+
+ if (identifier[0] != '@' && IsKeyword(identifier, anyDoubleUnderscore: true))
+ identifier = '@' + identifier;
+
+ return identifier;
+ }
+
+ static bool IsKeyword(string value, bool anyDoubleUnderscore)
+ {
+ // Identifiers that start with double underscore are meant to be used for reserved keywords.
+ // Only existing keywords are enforced, but it may be useful to forbid any identifier
+ // that begins with double underscore to prevent issues with future C# versions.
+ if (anyDoubleUnderscore)
+ {
+ if (value.Length > 2 && value[0] == '_' && value[1] == '_' && value[2] != '_')
+ return true;
+ }
+ else
+ {
+ if (_doubleUnderscoreKeywords.Contains(value))
+ return true;
+ }
+
+ return _keywords.Contains(value);
+ }
+
+ static HashSet<string> _doubleUnderscoreKeywords = new HashSet<string>
+ {
+ "__arglist",
+ "__makeref",
+ "__reftype",
+ "__refvalue",
+ };
+
+ static HashSet<string> _keywords = new HashSet<string>
+ {
+ "as",
+ "do",
+ "if",
+ "in",
+ "is",
+ "for",
+ "int",
+ "new",
+ "out",
+ "ref",
+ "try",
+ "base",
+ "bool",
+ "byte",
+ "case",
+ "char",
+ "else",
+ "enum",
+ "goto",
+ "lock",
+ "long",
+ "null",
+ "this",
+ "true",
+ "uint",
+ "void",
+ "break",
+ "catch",
+ "class",
+ "const",
+ "event",
+ "false",
+ "fixed",
+ "float",
+ "sbyte",
+ "short",
+ "throw",
+ "ulong",
+ "using",
+ "where",
+ "while",
+ "yield",
+ "double",
+ "extern",
+ "object",
+ "params",
+ "public",
+ "return",
+ "sealed",
+ "sizeof",
+ "static",
+ "string",
+ "struct",
+ "switch",
+ "typeof",
+ "unsafe",
+ "ushort",
+ "checked",
+ "decimal",
+ "default",
+ "finally",
+ "foreach",
+ "partial",
+ "private",
+ "virtual",
+ "abstract",
+ "continue",
+ "delegate",
+ "explicit",
+ "implicit",
+ "internal",
+ "operator",
+ "override",
+ "readonly",
+ "volatile",
+ "interface",
+ "namespace",
+ "protected",
+ "unchecked",
+ "stackalloc",
+ };
+ }
+}
diff --git a/modules/mono/editor/GodotSharpTools/Project/ProjectGenerator.cs b/modules/mono/editor/GodotSharpTools/Project/ProjectGenerator.cs
index 9135006172..89279c69a6 100644
--- a/modules/mono/editor/GodotSharpTools/Project/ProjectGenerator.cs
+++ b/modules/mono/editor/GodotSharpTools/Project/ProjectGenerator.cs
@@ -140,6 +140,9 @@ namespace GodotSharpTools.Project
public static ProjectRootElement CreateLibraryProject(string name, out ProjectPropertyGroupElement mainGroup)
{
+ if (string.IsNullOrEmpty(name))
+ throw new ArgumentException($"{nameof(name)} cannot be empty", nameof(name));
+
var root = ProjectRootElement.Create();
root.DefaultTargets = "Build";
@@ -149,7 +152,7 @@ namespace GodotSharpTools.Project
mainGroup.AddProperty("ProjectGuid", "{" + Guid.NewGuid().ToString().ToUpper() + "}");
mainGroup.AddProperty("OutputType", "Library");
mainGroup.AddProperty("OutputPath", Path.Combine("bin", "$(Configuration)"));
- mainGroup.AddProperty("RootNamespace", name);
+ mainGroup.AddProperty("RootNamespace", IdentifierUtils.SanitizeQualifiedIdentifier(name, allowEmptyIdentifiers: true));
mainGroup.AddProperty("AssemblyName", name);
mainGroup.AddProperty("TargetFrameworkVersion", "v4.5");
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 0b6a6a327c..890bea0d1d 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -97,7 +97,7 @@
#define C_METHOD_MONOARRAY_TO(m_type) C_NS_MONOMARSHAL "::mono_array_to_" #m_type
#define C_METHOD_MONOARRAY_FROM(m_type) C_NS_MONOMARSHAL "::" #m_type "_to_mono_array"
-#define BINDINGS_GENERATOR_VERSION UINT32_C(6)
+#define BINDINGS_GENERATOR_VERSION UINT32_C(7)
const char *BindingsGenerator::TypeInterface::DEFAULT_VARARG_C_IN = "\t%0 %1_in = %1;\n";
@@ -365,8 +365,8 @@ void BindingsGenerator::_generate_global_constants(List<String> &p_output) {
p_output.push_back(enum_proxy_name);
p_output.push_back("\n" INDENT1 OPEN_BLOCK);
- for (const List<ConstantInterface>::Element *E = ienum.constants.front(); E; E = E->next()) {
- const ConstantInterface &iconstant = E->get();
+ for (const List<ConstantInterface>::Element *F = ienum.constants.front(); F; F = F->next()) {
+ const ConstantInterface &iconstant = F->get();
if (iconstant.const_doc && iconstant.const_doc->description.size()) {
p_output.push_back(INDENT2 "/// <summary>\n");
@@ -389,7 +389,7 @@ void BindingsGenerator::_generate_global_constants(List<String> &p_output) {
p_output.push_back(iconstant.proxy_name);
p_output.push_back(" = ");
p_output.push_back(itos(iconstant.value));
- p_output.push_back(E != ienum.constants.back() ? ",\n" : "\n");
+ p_output.push_back(F != ienum.constants.back() ? ",\n" : "\n");
}
p_output.push_back(INDENT1 CLOSE_BLOCK);
@@ -472,8 +472,6 @@ Error BindingsGenerator::generate_cs_core_project(const String &p_solution_dir,
String output_dir = output_file.get_base_dir();
if (!DirAccess::exists(output_dir)) {
- DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- ERR_FAIL_COND_V(!da, ERR_CANT_CREATE);
Error err = da->make_dir_recursive(ProjectSettings::get_singleton()->globalize_path(output_dir));
ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE);
}
@@ -705,7 +703,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
List<InternalCall> &custom_icalls = itype.api_type == ClassDB::API_EDITOR ? editor_custom_icalls : core_custom_icalls;
if (verbose_output)
- OS::get_singleton()->print(String("Generating " + itype.proxy_name + ".cs...\n").utf8());
+ OS::get_singleton()->print("Generating %s.cs...\n", itype.proxy_name.utf8().get_data());
String ctor_method(ICALL_PREFIX + itype.proxy_name + "_Ctor"); // Used only for derived types
@@ -806,8 +804,8 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output.push_back(ienum.cname.operator String());
output.push_back(MEMBER_BEGIN OPEN_BLOCK);
- for (const List<ConstantInterface>::Element *E = ienum.constants.front(); E; E = E->next()) {
- const ConstantInterface &iconstant = E->get();
+ for (const List<ConstantInterface>::Element *F = ienum.constants.front(); F; F = F->next()) {
+ const ConstantInterface &iconstant = F->get();
if (iconstant.const_doc && iconstant.const_doc->description.size()) {
output.push_back(INDENT3 "/// <summary>\n");
@@ -830,7 +828,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output.push_back(iconstant.proxy_name);
output.push_back(" = ");
output.push_back(itos(iconstant.value));
- output.push_back(E != ienum.constants.back() ? ",\n" : "\n");
+ output.push_back(F != ienum.constants.back() ? ",\n" : "\n");
}
output.push_back(INDENT2 CLOSE_BLOCK);
@@ -849,9 +847,17 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
}
}
+ // TODO: BINDINGS_NATIVE_NAME_FIELD should be StringName, once we support it in C#
+
if (itype.is_singleton) {
// Add the type name and the singleton pointer as static fields
+ output.push_back(MEMBER_BEGIN "private static Godot.Object singleton;\n");
+ output.push_back(MEMBER_BEGIN "public static Godot.Object Singleton\n" INDENT2 "{\n" INDENT3
+ "get\n" INDENT3 "{\n" INDENT4 "if (singleton == null)\n" INDENT5
+ "singleton = Engine.GetSingleton(" BINDINGS_NATIVE_NAME_FIELD ");\n" INDENT4
+ "return singleton;\n" INDENT3 "}\n" INDENT2 "}\n");
+
output.push_back(MEMBER_BEGIN "private const string " BINDINGS_NATIVE_NAME_FIELD " = \"");
output.push_back(itype.name);
output.push_back("\";\n");
@@ -1274,7 +1280,7 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) {
List<InternalCall> &custom_icalls = itype.api_type == ClassDB::API_EDITOR ? editor_custom_icalls : core_custom_icalls;
- OS::get_singleton()->print(String("Generating " + itype.name + "...\n").utf8());
+ OS::get_singleton()->print("Generating %s...\n", itype.name.utf8().get_data());
String ctor_method(ICALL_PREFIX + itype.proxy_name + "_Ctor"); // Used only for derived types
@@ -1881,8 +1887,8 @@ void BindingsGenerator::_populate_object_type_interfaces() {
}
if (!imethod.is_virtual && imethod.name[0] == '_') {
- for (const List<PropertyInterface>::Element *E = itype.properties.front(); E; E = E->next()) {
- const PropertyInterface &iprop = E->get();
+ for (const List<PropertyInterface>::Element *F = itype.properties.front(); F; F = F->next()) {
+ const PropertyInterface &iprop = F->get();
if (iprop.setter == imethod.name || iprop.getter == imethod.name) {
imethod.is_internal = true;
@@ -2344,9 +2350,9 @@ void BindingsGenerator::_populate_global_constants() {
if (enum_name != StringName()) {
EnumInterface ienum(enum_name);
- List<EnumInterface>::Element *match = global_enums.find(ienum);
- if (match) {
- match->get().constants.push_back(iconstant);
+ List<EnumInterface>::Element *enum_match = global_enums.find(ienum);
+ if (enum_match) {
+ enum_match->get().constants.push_back(iconstant);
} else {
ienum.constants.push_back(iconstant);
global_enums.push_back(ienum);
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp
index 5d9f4d8d54..00c780d1b7 100644
--- a/modules/mono/editor/godotsharp_builds.cpp
+++ b/modules/mono/editor/godotsharp_builds.cpp
@@ -100,22 +100,24 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
if (msbuild_tools_path.empty() || !FileAccess::exists(msbuild_tools_path)) {
// Try to search it again if it wasn't found last time or if it was removed from its location
msbuild_tools_path = MonoRegUtils::find_msbuild_tools_path();
- }
-
- if (msbuild_tools_path.length()) {
- if (!msbuild_tools_path.ends_with("\\"))
- msbuild_tools_path += "\\";
- return GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe");
+ if (msbuild_tools_path.empty()) {
+ ERR_PRINTS("Cannot find executable for '" PROP_NAME_MSBUILD_VS "'. Tried with path: " + msbuild_tools_path);
+ return NULL;
+ }
}
- print_verbose("Cannot find executable for '" PROP_NAME_MSBUILD_VS "'. Trying with '" PROP_NAME_MSBUILD_MONO "'...");
- } // FALL THROUGH
+ if (!msbuild_tools_path.ends_with("\\"))
+ msbuild_tools_path += "\\";
+
+ return GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe");
+ } break;
case GodotSharpBuilds::MSBUILD_MONO: {
String msbuild_path = GDMono::get_singleton()->get_mono_reg_info().bin_dir.plus_file("msbuild.bat");
if (!FileAccess::exists(msbuild_path)) {
- WARN_PRINTS("Cannot find executable for '" PROP_NAME_MSBUILD_MONO "'. Tried with path: " + msbuild_path);
+ ERR_PRINTS("Cannot find executable for '" PROP_NAME_MSBUILD_MONO "'. Tried with path: " + msbuild_path);
+ return NULL;
}
return GDMonoMarshal::mono_string_from_godot(msbuild_path);
@@ -124,7 +126,8 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
String xbuild_path = GDMono::get_singleton()->get_mono_reg_info().bin_dir.plus_file("xbuild.bat");
if (!FileAccess::exists(xbuild_path)) {
- WARN_PRINTS("Cannot find executable for '" PROP_NAME_XBUILD "'. Tried with path: " + xbuild_path);
+ ERR_PRINTS("Cannot find executable for '" PROP_NAME_XBUILD "'. Tried with path: " + xbuild_path);
+ return NULL;
}
return GDMonoMarshal::mono_string_from_godot(xbuild_path);
@@ -144,7 +147,7 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
}
if (xbuild_path.empty()) {
- WARN_PRINT("Cannot find binary for '" PROP_NAME_XBUILD "'");
+ ERR_PRINT("Cannot find binary for '" PROP_NAME_XBUILD "'");
return NULL;
}
} else {
@@ -154,7 +157,7 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
}
if (msbuild_path.empty()) {
- WARN_PRINT("Cannot find binary for '" PROP_NAME_MSBUILD_MONO "'");
+ ERR_PRINT("Cannot find binary for '" PROP_NAME_MSBUILD_MONO "'");
return NULL;
}
}
@@ -168,22 +171,6 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
#endif
}
-MonoString *godot_icall_BuildInstance_get_FrameworkPath() {
-
-#if defined(WINDOWS_ENABLED)
- const MonoRegInfo &mono_reg_info = GDMono::get_singleton()->get_mono_reg_info();
- if (mono_reg_info.assembly_dir.length()) {
- String framework_path = path_join(mono_reg_info.assembly_dir, "mono", "4.5");
- return GDMonoMarshal::mono_string_from_godot(framework_path);
- }
-
- ERR_EXPLAIN("Cannot find Mono's assemblies directory in the registry");
- ERR_FAIL_V(NULL);
-#else
- return NULL;
-#endif
-}
-
MonoString *godot_icall_BuildInstance_get_MonoWindowsBinDir() {
#if defined(WINDOWS_ENABLED)
@@ -208,6 +195,11 @@ MonoBoolean godot_icall_BuildInstance_get_UsingMonoMSBuildOnWindows() {
#endif
}
+MonoBoolean godot_icall_BuildInstance_get_PrintBuildOutput() {
+
+ return (bool)EDITOR_GET("mono/builds/print_build_output");
+}
+
void GodotSharpBuilds::register_internal_calls() {
static bool registered = false;
@@ -216,9 +208,9 @@ void GodotSharpBuilds::register_internal_calls() {
mono_add_internal_call("GodotSharpTools.Build.BuildSystem::godot_icall_BuildInstance_ExitCallback", (void *)godot_icall_BuildInstance_ExitCallback);
mono_add_internal_call("GodotSharpTools.Build.BuildInstance::godot_icall_BuildInstance_get_MSBuildPath", (void *)godot_icall_BuildInstance_get_MSBuildPath);
- mono_add_internal_call("GodotSharpTools.Build.BuildInstance::godot_icall_BuildInstance_get_FrameworkPath", (void *)godot_icall_BuildInstance_get_FrameworkPath);
mono_add_internal_call("GodotSharpTools.Build.BuildInstance::godot_icall_BuildInstance_get_MonoWindowsBinDir", (void *)godot_icall_BuildInstance_get_MonoWindowsBinDir);
mono_add_internal_call("GodotSharpTools.Build.BuildInstance::godot_icall_BuildInstance_get_UsingMonoMSBuildOnWindows", (void *)godot_icall_BuildInstance_get_UsingMonoMSBuildOnWindows);
+ mono_add_internal_call("GodotSharpTools.Build.BuildInstance::godot_icall_BuildInstance_get_PrintBuildOutput", (void *)godot_icall_BuildInstance_get_PrintBuildOutput);
}
void GodotSharpBuilds::show_build_error_dialog(const String &p_message) {
@@ -459,7 +451,11 @@ GodotSharpBuilds::GodotSharpBuilds() {
// Build tool settings
EditorSettings *ed_settings = EditorSettings::get_singleton();
+#ifdef WINDOWS_ENABLED
+ EDITOR_DEF("mono/builds/build_tool", MSBUILD_VS);
+#else
EDITOR_DEF("mono/builds/build_tool", MSBUILD_MONO);
+#endif
ed_settings->add_property_hint(PropertyInfo(Variant::INT, "mono/builds/build_tool", PROPERTY_HINT_ENUM,
PROP_NAME_MSBUILD_MONO
@@ -467,6 +463,8 @@ GodotSharpBuilds::GodotSharpBuilds() {
"," PROP_NAME_MSBUILD_VS
#endif
"," PROP_NAME_XBUILD));
+
+ EDITOR_DEF("mono/builds/print_build_output", false);
}
GodotSharpBuilds::~GodotSharpBuilds() {
@@ -517,7 +515,7 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
// Remove old issues file
- String issues_file = "msbuild_issues.csv";
+ String issues_file = get_msbuild_issues_filename();
DirAccessRef d = DirAccess::create_for_path(log_dirpath);
if (d->file_exists(issues_file)) {
Error err = d->remove(issues_file);
@@ -584,7 +582,8 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
exit_code = klass->get_field("exitCode")->get_int_value(mono_object);
if (exit_code != 0) {
- print_verbose("MSBuild finished with exit code " + itos(exit_code));
+ String log_filepath = build_info.get_log_dirpath().plus_file(get_msbuild_log_filename());
+ print_verbose("MSBuild exited with code: " + itos(exit_code) + ". Log file: " + log_filepath);
}
build_tab->on_build_exit(exit_code == 0 ? MonoBuildTab::RESULT_SUCCESS : MonoBuildTab::RESULT_ERROR);
diff --git a/modules/mono/editor/godotsharp_builds.h b/modules/mono/editor/godotsharp_builds.h
index 2d53583916..652d30538a 100644
--- a/modules/mono/editor/godotsharp_builds.h
+++ b/modules/mono/editor/godotsharp_builds.h
@@ -76,6 +76,9 @@ public:
static void show_build_error_dialog(const String &p_message);
+ static const char *get_msbuild_issues_filename() { return "msbuild_issues.csv"; }
+ static const char *get_msbuild_log_filename() { return "msbuild_log.txt"; }
+
void build_exit_callback(const MonoBuildInfo &p_build_info, int p_exit_code);
void restart_build(MonoBuildTab *p_build_tab);
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp
index cee4405826..921b9f987b 100644
--- a/modules/mono/editor/godotsharp_editor.cpp
+++ b/modules/mono/editor/godotsharp_editor.cpp
@@ -30,6 +30,7 @@
#include "godotsharp_editor.h"
+#include "core/message_queue.h"
#include "core/os/os.h"
#include "core/project_settings.h"
#include "scene/gui/control.h"
@@ -114,10 +115,33 @@ bool GodotSharpEditor::_create_project_solution() {
void GodotSharpEditor::_make_api_solutions_if_needed() {
// I'm sick entirely of ProgressDialog
+
+ static int attempts_left = 100;
+
+ if (MessageQueue::get_singleton()->is_flushing() || !SceneTree::get_singleton()) {
+ ERR_FAIL_COND(attempts_left == 0); // You've got to be kidding
+
+ if (SceneTree::get_singleton()) {
+ SceneTree::get_singleton()->connect("idle_frame", this, "_make_api_solutions_if_needed", Vector<Variant>());
+ } else {
+ call_deferred("_make_api_solutions_if_needed");
+ }
+
+ attempts_left--;
+ return;
+ }
+
+ // Recursion guard needed because signals don't play well with ProgressDialog either, but unlike
+ // the message queue, with signals the collateral damage should be minimal in the worst case.
static bool recursion_guard = false;
if (!recursion_guard) {
recursion_guard = true;
+
+ // Oneshot signals don't play well with ProgressDialog either, so we do it this way instead
+ SceneTree::get_singleton()->disconnect("idle_frame", this, "_make_api_solutions_if_needed");
+
_make_api_solutions_if_needed_impl();
+
recursion_guard = false;
}
}
@@ -143,9 +167,6 @@ void GodotSharpEditor::_remove_create_sln_menu_option() {
menu_popup->remove_item(menu_popup->get_item_index(MENU_CREATE_SLN));
- if (menu_popup->get_item_count() == 0)
- menu_button->hide();
-
bottom_panel_btn->show();
}
@@ -164,6 +185,16 @@ void GodotSharpEditor::_toggle_about_dialog_on_start(bool p_enabled) {
}
}
+void GodotSharpEditor::_build_solution_pressed() {
+
+ if (!FileAccess::exists(GodotSharpDirs::get_project_sln_path())) {
+ if (!_create_project_solution())
+ return; // Failed to create solution
+ }
+
+ MonoBottomPanel::get_singleton()->call("_build_project_pressed");
+}
+
void GodotSharpEditor::_menu_option_pressed(int p_id) {
switch (p_id) {
@@ -199,6 +230,7 @@ void GodotSharpEditor::_notification(int p_notification) {
void GodotSharpEditor::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_build_solution_pressed"), &GodotSharpEditor::_build_solution_pressed);
ClassDB::bind_method(D_METHOD("_create_project_solution"), &GodotSharpEditor::_create_project_solution);
ClassDB::bind_method(D_METHOD("_make_api_solutions_if_needed"), &GodotSharpEditor::_make_api_solutions_if_needed);
ClassDB::bind_method(D_METHOD("_remove_create_sln_menu_option"), &GodotSharpEditor::_remove_create_sln_menu_option);
@@ -248,19 +280,30 @@ Error GodotSharpEditor::open_in_external_editor(const Ref<Script> &p_script, int
static String vscode_path;
if (vscode_path.empty() || !FileAccess::exists(vscode_path)) {
- static List<String> vscode_name;
- vscode_name.push_back("code");
- vscode_name.push_back("code-oss");
- vscode_name.push_back("vscode");
- vscode_name.push_back("vscode-oss");
- vscode_name.push_back("visual-studio-code");
- vscode_name.push_back("visual-studio-code-oss");
// Try to search it again if it wasn't found last time or if it was removed from its location
- for (int i = 0; i < vscode_name.size(); i++) {
- vscode_path = path_which(vscode_name[i]);
- if (!vscode_path.empty() || FileAccess::exists(vscode_path))
+ bool found = false;
+
+ // TODO: Use initializer lists once C++11 is allowed
+
+ static Vector<String> vscode_names;
+ if (vscode_names.empty()) {
+ vscode_names.push_back("code");
+ vscode_names.push_back("code-oss");
+ vscode_names.push_back("vscode");
+ vscode_names.push_back("vscode-oss");
+ vscode_names.push_back("visual-studio-code");
+ vscode_names.push_back("visual-studio-code-oss");
+ }
+ for (int i = 0; i < vscode_names.size(); i++) {
+ vscode_path = path_which(vscode_names[i]);
+ if (!vscode_path.empty()) {
+ found = true;
break;
+ }
}
+
+ if (!found)
+ vscode_path.clear(); // Not found, clear so next time the empty() check is enough
}
List<String> args;
@@ -378,9 +421,12 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
editor->add_child(memnew(MonoReloadNode));
- menu_button = memnew(MenuButton);
- menu_button->set_text(TTR("Mono"));
- menu_popup = menu_button->get_popup();
+ menu_popup = memnew(PopupMenu);
+ menu_popup->hide();
+ menu_popup->set_as_toplevel(true);
+ menu_popup->set_pass_on_modal_close_click(false);
+
+ editor->add_tool_submenu_item("Mono", menu_popup);
// TODO: Remove or edit this info dialog once Mono support is no longer in alpha
{
@@ -411,12 +457,12 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
about_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
about_label->set_autowrap(true);
String about_text =
- String("C# support in Godot Engine is a brand new feature and a work in progress.\n") +
- "It is currently in an alpha stage and is not suitable for use in production.\n\n" +
- "As of Godot 3.1, C# support is not feature-complete and may crash in some situations. " +
- "Bugs and usability issues will be addressed gradually over future 3.x releases, " +
- "including compatibility breaking changes as new features are implemented for a better overall C# experience.\n\n" +
- "If you experience issues with this Mono build, please report them on Godot's issue tracker with details about your system, Mono version, IDE, etc:\n\n" +
+ String("C# support in Godot Engine is in late alpha stage and, while already usable, ") +
+ "it is not meant for use in production.\n\n" +
+ "Projects can be exported to Linux, macOS and Windows, but not yet to mobile or web platforms. " +
+ "Bugs and usability issues will be addressed gradually over future releases, " +
+ "potentially including compatibility breaking changes as new features are implemented for a better overall C# experience.\n\n" +
+ "If you experience issues with this Mono build, please report them on Godot's issue tracker with details about your system, MSBuild version, IDE, etc.:\n\n" +
" https://github.com/godotengine/godot/issues\n\n" +
"Your critical feedback at this stage will play a great role in shaping the C# support in future releases, so thank you!";
about_label->set_text(about_text);
@@ -434,7 +480,7 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
String csproj_path = GodotSharpDirs::get_project_csproj_path();
if (FileAccess::exists(sln_path) && FileAccess::exists(csproj_path)) {
- // We can't use EditorProgress here. It calls Main::iterarion() and the main loop is not initialized yet.
+ // Defer this task because EditorProgress calls Main::iterarion() and the main loop is not yet initialized.
call_deferred("_make_api_solutions_if_needed");
} else {
bottom_panel_btn->hide();
@@ -443,16 +489,18 @@ GodotSharpEditor::GodotSharpEditor(EditorNode *p_editor) {
menu_popup->connect("id_pressed", this, "_menu_option_pressed");
- if (menu_popup->get_item_count() == 0)
- menu_button->hide();
-
- editor->get_menu_hb()->add_child(menu_button);
+ ToolButton *build_button = memnew(ToolButton);
+ build_button->set_text("Build");
+ build_button->set_tooltip("Build solution");
+ build_button->set_focus_mode(Control::FOCUS_NONE);
+ build_button->connect("pressed", this, "_build_solution_pressed");
+ editor->get_menu_hb()->add_child(build_button);
// External editor settings
EditorSettings *ed_settings = EditorSettings::get_singleton();
EDITOR_DEF("mono/editor/external_editor", EDITOR_NONE);
- String settings_hint_str = "None";
+ String settings_hint_str = "Disabled";
#ifdef WINDOWS_ENABLED
settings_hint_str += ",MonoDevelop,Visual Studio Code";
diff --git a/modules/mono/editor/godotsharp_editor.h b/modules/mono/editor/godotsharp_editor.h
index c9744a9eed..cf0d2aec84 100644
--- a/modules/mono/editor/godotsharp_editor.h
+++ b/modules/mono/editor/godotsharp_editor.h
@@ -65,6 +65,8 @@ class GodotSharpEditor : public Node {
void _menu_option_pressed(int p_id);
+ void _build_solution_pressed();
+
static GodotSharpEditor *singleton;
protected:
diff --git a/modules/mono/editor/godotsharp_export.cpp b/modules/mono/editor/godotsharp_export.cpp
index 47341e3555..ee5fed1a0c 100644
--- a/modules/mono/editor/godotsharp_export.cpp
+++ b/modules/mono/editor/godotsharp_export.cpp
@@ -124,7 +124,7 @@ void GodotSharpExport::_export_begin(const Set<String> &p_features, bool p_debug
ERR_FAIL_COND(!load_success);
Vector<String> search_dirs;
- GDMonoAssembly::fill_search_dirs(search_dirs);
+ GDMonoAssembly::fill_search_dirs(search_dirs, build_config);
Error depend_error = _get_assembly_dependencies(scripts_assembly, search_dirs, dependencies);
ERR_FAIL_COND(depend_error != OK);
}
@@ -194,8 +194,8 @@ Error GodotSharpExport::_get_assembly_dependencies(GDMonoAssembly *p_assembly, c
String path;
bool has_extension = ref_name.ends_with(".dll") || ref_name.ends_with(".exe");
- for (int i = 0; i < p_search_dirs.size(); i++) {
- const String &search_dir = p_search_dirs[i];
+ for (int j = 0; j < p_search_dirs.size(); j++) {
+ const String &search_dir = p_search_dirs[j];
if (has_extension) {
path = search_dir.plus_file(ref_name);
diff --git a/modules/mono/editor/mono_bottom_panel.cpp b/modules/mono/editor/mono_bottom_panel.cpp
index 55a334bc4e..21ce9ca5c4 100644
--- a/modules/mono/editor/mono_bottom_panel.cpp
+++ b/modules/mono/editor/mono_bottom_panel.cpp
@@ -125,9 +125,14 @@ void MonoBottomPanel::_build_tabs_item_selected(int p_idx) {
void MonoBottomPanel::_build_tabs_nothing_selected() {
- if (build_tabs->get_tab_count() != 0) // just in case
+ if (build_tabs->get_tab_count() != 0) { // just in case
build_tabs->set_visible(false);
+ // This callback is called when clicking on the empty space of the list.
+ // ItemList won't deselect the items automatically, so we must do it ourselves.
+ build_tabs_list->unselect_all();
+ }
+
warnings_btn->set_visible(false);
errors_btn->set_visible(false);
view_log_btn->set_visible(false);
@@ -156,10 +161,20 @@ void MonoBottomPanel::_build_project_pressed() {
if (!FileAccess::exists(GodotSharpDirs::get_project_sln_path()))
return; // No solution to build
- String scripts_metadata_path = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor");
- Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path);
+ String scripts_metadata_path_editor = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor");
+ String scripts_metadata_path_player = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor_player");
+
+ Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path_editor);
ERR_FAIL_COND(metadata_err != OK);
+ if (FileAccess::exists(scripts_metadata_path_editor)) {
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ Error copy_err = da->copy(scripts_metadata_path_editor, scripts_metadata_path_player);
+
+ ERR_EXPLAIN("Failed to copy scripts metadata file");
+ ERR_FAIL_COND(copy_err != OK);
+ }
+
bool build_success = GodotSharpBuilds::get_singleton()->build_project_blocking("Tools");
if (build_success) {
@@ -187,7 +202,7 @@ void MonoBottomPanel::_view_log_pressed() {
String log_dirpath = build_tab->get_build_info().get_log_dirpath();
- OS::get_singleton()->shell_open(log_dirpath.plus_file("msbuild_log.txt"));
+ OS::get_singleton()->shell_open(log_dirpath.plus_file(GodotSharpBuilds::get_msbuild_log_filename()));
}
}
@@ -421,7 +436,7 @@ void MonoBuildTab::on_build_exit(BuildResult result) {
build_exited = true;
build_result = result;
- _load_issues_from_file(logs_dir.plus_file("msbuild_issues.csv"));
+ _load_issues_from_file(logs_dir.plus_file(GodotSharpBuilds::get_msbuild_issues_filename()));
_update_issues_list();
MonoBottomPanel::get_singleton()->raise_build_tab(this);
diff --git a/modules/mono/editor/mono_bottom_panel.h b/modules/mono/editor/mono_bottom_panel.h
index d3109592a9..406e46f7ce 100644
--- a/modules/mono/editor/mono_bottom_panel.h
+++ b/modules/mono/editor/mono_bottom_panel.h
@@ -51,8 +51,8 @@ class MonoBottomPanel : public VBoxContainer {
ItemList *build_tabs_list;
TabContainer *build_tabs;
- Button *warnings_btn;
- Button *errors_btn;
+ ToolButton *warnings_btn;
+ ToolButton *errors_btn;
Button *view_log_btn;
void _update_build_tabs_list();
diff --git a/modules/mono/editor/script_class_parser.cpp b/modules/mono/editor/script_class_parser.cpp
index 1281ed669f..6b2ec5cc20 100644
--- a/modules/mono/editor/script_class_parser.cpp
+++ b/modules/mono/editor/script_class_parser.cpp
@@ -322,6 +322,15 @@ Error ScriptClassParser::_parse_type_full_name(String &r_full_name) {
r_full_name += String(value);
+ if (code[idx] == '<') {
+ idx++;
+
+ // We don't mind if the base is generic, but we skip it any ways since this information is not needed
+ Error err = _skip_generic_type_params();
+ if (err)
+ return err;
+ }
+
if (code[idx] != '.') // We only want to take the next token if it's a period
return OK;
@@ -344,22 +353,12 @@ Error ScriptClassParser::_parse_class_base(Vector<String> &r_base) {
Token tk = get_token();
- bool generic = false;
- if (tk == TK_OP_LESS) {
- Error err = _skip_generic_type_params();
- if (err)
- return err;
- // We don't add it to the base list if it's generic
- generic = true;
- tk = get_token();
- }
-
if (tk == TK_COMMA) {
- Error err = _parse_class_base(r_base);
+ err = _parse_class_base(r_base);
if (err)
return err;
} else if (tk == TK_IDENTIFIER && String(value) == "where") {
- Error err = _parse_type_constraints();
+ err = _parse_type_constraints();
if (err) {
return err;
}
@@ -373,9 +372,7 @@ Error ScriptClassParser::_parse_class_base(Vector<String> &r_base) {
return ERR_PARSE_ERROR;
}
- if (!generic) {
- r_base.push_back(name);
- }
+ r_base.push_back(name);
return OK;
}
@@ -567,7 +564,7 @@ Error ScriptClassParser::parse(const String &p_code) {
if (full_name.length())
full_name += ".";
full_name += class_decl.name;
- OS::get_singleton()->print(String("Ignoring generic class declaration: " + class_decl.name).utf8());
+ OS::get_singleton()->print("Ignoring generic class declaration: %s\n", class_decl.name.utf8().get_data());
}
}
} else if (tk == TK_IDENTIFIER && String(value) == "struct") {
diff --git a/modules/mono/glue/Managed/Files/Array.cs b/modules/mono/glue/Managed/Files/Array.cs
index d5a35d7ae0..1ee64f3b71 100644
--- a/modules/mono/glue/Managed/Files/Array.cs
+++ b/modules/mono/glue/Managed/Files/Array.cs
@@ -50,6 +50,9 @@ namespace Godot.Collections
internal IntPtr GetPtr()
{
+ if (disposed)
+ throw new ObjectDisposedException(GetType().FullName);
+
return safeHandle.DangerousGetHandle();
}
@@ -152,6 +155,11 @@ namespace Godot.Collections
godot_icall_Array_RemoveAt(GetPtr(), index);
}
+ public Error Resize(int newSize)
+ {
+ return godot_icall_Array_Resize(GetPtr(), newSize);
+ }
+
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
@@ -200,6 +208,9 @@ namespace Godot.Collections
internal extern static void godot_icall_Array_RemoveAt(IntPtr ptr, int index);
[MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static Error godot_icall_Array_Resize(IntPtr ptr, int newSize);
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
internal extern static void godot_icall_Array_Generic_GetElementTypeInfo(Type elemType, out int elemTypeEncoding, out IntPtr elemTypeClass);
}
@@ -336,6 +347,11 @@ namespace Godot.Collections
objectArray.RemoveAt(index);
}
+ public Error Resize(int newSize)
+ {
+ return objectArray.Resize(newSize);
+ }
+
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
diff --git a/modules/mono/glue/Managed/Files/Basis.cs b/modules/mono/glue/Managed/Files/Basis.cs
index b318d96bb9..ac9576cebd 100644
--- a/modules/mono/glue/Managed/Files/Basis.cs
+++ b/modules/mono/glue/Managed/Files/Basis.cs
@@ -45,74 +45,119 @@ namespace Godot
new Basis(0f, -1f, 0f, 0f, 0f, -1f, 1f, 0f, 0f)
};
+ // NOTE: x, y and z are public-only. Use Column0, Column1 and Column2 internally.
+
+ /// <summary>
+ /// Returns the basis matrix’s x vector.
+ /// This is equivalent to <see cref="Column0"/>.
+ /// </summary>
public Vector3 x
{
- get { return GetAxis(0); }
- set { SetAxis(0, value); }
+ get => Column0;
+ set => Column0 = value;
}
+ /// <summary>
+ /// Returns the basis matrix’s y vector.
+ /// This is equivalent to <see cref="Column1"/>.
+ /// </summary>
public Vector3 y
{
- get { return GetAxis(1); }
- set { SetAxis(1, value); }
+
+ get => Column1;
+ set => Column1 = value;
}
+ /// <summary>
+ /// Returns the basis matrix’s z vector.
+ /// This is equivalent to <see cref="Column2"/>.
+ /// </summary>
public Vector3 z
{
- get { return GetAxis(2); }
- set { SetAxis(2, value); }
+
+ get => Column2;
+ set => Column2 = value;
}
- private Vector3 _x;
- private Vector3 _y;
- private Vector3 _z;
+ public Vector3 Row0;
+ public Vector3 Row1;
+ public Vector3 Row2;
- public static Basis Identity
+ public Vector3 Column0
+ {
+ get => new Vector3(Row0.x, Row1.x, Row2.x);
+ set
+ {
+ this.Row0.x = value.x;
+ this.Row1.x = value.y;
+ this.Row2.x = value.z;
+ }
+ }
+ public Vector3 Column1
{
- get { return identity; }
+ get => new Vector3(Row0.y, Row1.y, Row2.y);
+ set
+ {
+ this.Row0.y = value.x;
+ this.Row1.y = value.y;
+ this.Row2.y = value.z;
+ }
+ }
+ public Vector3 Column2
+ {
+ get => new Vector3(Row0.z, Row1.z, Row2.z);
+ set
+ {
+ this.Row0.z = value.x;
+ this.Row1.z = value.y;
+ this.Row2.z = value.z;
+ }
}
+ public static Basis Identity => identity;
+
public Vector3 Scale
{
get
{
- return new Vector3
+ real_t detSign = Mathf.Sign(Determinant());
+ return detSign * new Vector3
(
- new Vector3(this[0, 0], this[1, 0], this[2, 0]).Length(),
- new Vector3(this[0, 1], this[1, 1], this[2, 1]).Length(),
- new Vector3(this[0, 2], this[1, 2], this[2, 2]).Length()
+ new Vector3(this.Row0[0], this.Row1[0], this.Row2[0]).Length(),
+ new Vector3(this.Row0[1], this.Row1[1], this.Row2[1]).Length(),
+ new Vector3(this.Row0[2], this.Row1[2], this.Row2[2]).Length()
);
}
}
- public Vector3 this[int index]
+ public Vector3 this[int columnIndex]
{
get
{
- switch (index)
+ switch (columnIndex)
{
case 0:
- return _x;
+ return Column0;
case 1:
- return _y;
+ return Column1;
case 2:
- return _z;
+ return Column2;
default:
throw new IndexOutOfRangeException();
}
}
set
{
- switch (index)
+ switch (columnIndex)
{
case 0:
- _x = value;
+ Column0 = value;
return;
case 1:
- _y = value;
+ Column1 = value;
return;
case 2:
- _z = value;
+ Column2 = value;
return;
default:
throw new IndexOutOfRangeException();
@@ -120,51 +165,53 @@ namespace Godot
}
}
- public real_t this[int index, int axis]
+ public real_t this[int columnIndex, int rowIndex]
{
get
{
- switch (index)
+ switch (columnIndex)
{
case 0:
- return _x[axis];
+ return Column0[rowIndex];
case 1:
- return _y[axis];
+ return Column1[rowIndex];
case 2:
- return _z[axis];
+ return Column2[rowIndex];
default:
throw new IndexOutOfRangeException();
}
}
set
{
- switch (index)
+ switch (columnIndex)
{
case 0:
- _x[axis] = value;
+ {
+ var column0 = Column0;
+ column0[rowIndex] = value;
+ Column0 = column0;
return;
+ }
case 1:
- _y[axis] = value;
+ {
+ var column1 = Column1;
+ column1[rowIndex] = value;
+ Column1 = column1;
return;
+ }
case 2:
- _z[axis] = value;
+ {
+ var column2 = Column2;
+ column2[rowIndex] = value;
+ Column2 = column2;
return;
+ }
default:
throw new IndexOutOfRangeException();
}
}
}
- internal static Basis CreateFromAxes(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis)
- {
- return new Basis
- (
- xAxis.x, yAxis.x, zAxis.x,
- xAxis.y, yAxis.y, zAxis.y,
- xAxis.z, yAxis.z, zAxis.z
- );
- }
-
internal Quat RotationQuat()
{
Basis orthonormalizedBasis = Orthonormalized();
@@ -191,29 +238,19 @@ namespace Godot
private void SetDiagonal(Vector3 diagonal)
{
- _x = new Vector3(diagonal.x, 0, 0);
- _y = new Vector3(0, diagonal.y, 0);
- _z = new Vector3(0, 0, diagonal.z);
+ Row0 = new Vector3(diagonal.x, 0, 0);
+ Row1 = new Vector3(0, diagonal.y, 0);
+ Row2 = new Vector3(0, 0, diagonal.z);
}
public real_t Determinant()
{
- return this[0, 0] * (this[1, 1] * this[2, 2] - this[2, 1] * this[1, 2]) -
- this[1, 0] * (this[0, 1] * this[2, 2] - this[2, 1] * this[0, 2]) +
- this[2, 0] * (this[0, 1] * this[1, 2] - this[1, 1] * this[0, 2]);
- }
+ real_t cofac00 = Row1[1] * Row2[2] - Row1[2] * Row2[1];
+ real_t cofac10 = Row1[2] * Row2[0] - Row1[0] * Row2[2];
+ real_t cofac20 = Row1[0] * Row2[1] - Row1[1] * Row2[0];
- public Vector3 GetAxis(int axis)
- {
- return new Vector3(this[0, axis], this[1, axis], this[2, axis]);
- }
-
- public void SetAxis(int axis, Vector3 value)
- {
- this[0, axis] = value.x;
- this[1, axis] = value.y;
- this[2, axis] = value.z;
+ return Row0[0] * cofac00 + Row0[1] * cofac10 + Row0[2] * cofac20;
}
public Vector3 GetEuler()
@@ -223,32 +260,80 @@ namespace Godot
Vector3 euler;
euler.z = 0.0f;
- real_t mxy = m[1, 2];
-
+ real_t mxy = m.Row1[2];
if (mxy < 1.0f)
{
if (mxy > -1.0f)
{
euler.x = Mathf.Asin(-mxy);
- euler.y = Mathf.Atan2(m[0, 2], m[2, 2]);
- euler.z = Mathf.Atan2(m[1, 0], m[1, 1]);
+ euler.y = Mathf.Atan2(m.Row0[2], m.Row2[2]);
+ euler.z = Mathf.Atan2(m.Row1[0], m.Row1[1]);
}
else
{
euler.x = Mathf.Pi * 0.5f;
- euler.y = -Mathf.Atan2(-m[0, 1], m[0, 0]);
+ euler.y = -Mathf.Atan2(-m.Row0[1], m.Row0[0]);
}
}
else
{
euler.x = -Mathf.Pi * 0.5f;
- euler.y = -Mathf.Atan2(-m[0, 1], m[0, 0]);
+ euler.y = -Mathf.Atan2(-m.Row0[1], m.Row0[0]);
}
return euler;
}
+ public Vector3 GetRow(int index)
+ {
+ switch (index)
+ {
+ case 0:
+ return Row0;
+ case 1:
+ return Row1;
+ case 2:
+ return Row2;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+
+ public void SetRow(int index, Vector3 value)
+ {
+ switch (index)
+ {
+ case 0:
+ Row0 = value;
+ return;
+ case 1:
+ Row1 = value;
+ return;
+ case 2:
+ Row2 = value;
+ return;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+
+ public Vector3 GetColumn(int index)
+ {
+ return this[index];
+ }
+
+ public void SetColumn(int index, Vector3 value)
+ {
+ this[index] = value;
+ }
+
+ [Obsolete("GetAxis is deprecated. Use GetColumn instead.")]
+ public Vector3 GetAxis(int axis)
+ {
+ return new Vector3(this.Row0[axis], this.Row1[axis], this.Row2[axis]);
+ }
+
public int GetOrthogonalIndex()
{
var orth = this;
@@ -257,7 +342,9 @@ namespace Godot
{
for (int j = 0; j < 3; j++)
{
- real_t v = orth[i, j];
+ var row = orth.GetRow(i);
+
+ real_t v = row[j];
if (v > 0.5f)
v = 1.0f;
@@ -266,7 +353,9 @@ namespace Godot
else
v = 0f;
- orth[i, j] = v;
+ row[j] = v;
+
+ orth.SetRow(i, row);
}
}
@@ -281,57 +370,45 @@ namespace Godot
public Basis Inverse()
{
- var inv = this;
-
- real_t[] co = {
- inv[1, 1] * inv[2, 2] - inv[1, 2] * inv[2, 1],
- inv[1, 2] * inv[2, 0] - inv[1, 0] * inv[2, 2],
- inv[1, 0] * inv[2, 1] - inv[1, 1] * inv[2, 0]
- };
+ real_t cofac00 = Row1[1] * Row2[2] - Row1[2] * Row2[1];
+ real_t cofac10 = Row1[2] * Row2[0] - Row1[0] * Row2[2];
+ real_t cofac20 = Row1[0] * Row2[1] - Row1[1] * Row2[0];
- real_t det = inv[0, 0] * co[0] + inv[0, 1] * co[1] + inv[0, 2] * co[2];
+ real_t det = Row0[0] * cofac00 + Row0[1] * cofac10 + Row0[2] * cofac20;
if (det == 0)
- {
- return new Basis
- (
- real_t.NaN, real_t.NaN, real_t.NaN,
- real_t.NaN, real_t.NaN, real_t.NaN,
- real_t.NaN, real_t.NaN, real_t.NaN
- );
- }
+ throw new InvalidOperationException("Matrix determinant is zero and cannot be inverted.");
- real_t s = 1.0f / det;
+ real_t detInv = 1.0f / det;
- inv = new Basis
+ real_t cofac01 = Row0[2] * Row2[1] - Row0[1] * Row2[2];
+ real_t cofac02 = Row0[1] * Row1[2] - Row0[2] * Row1[1];
+ real_t cofac11 = Row0[0] * Row2[2] - Row0[2] * Row2[0];
+ real_t cofac12 = Row0[2] * Row1[0] - Row0[0] * Row1[2];
+ real_t cofac21 = Row0[1] * Row2[0] - Row0[0] * Row2[1];
+ real_t cofac22 = Row0[0] * Row1[1] - Row0[1] * Row1[0];
+
+ return new Basis
(
- co[0] * s,
- inv[0, 2] * inv[2, 1] - inv[0, 1] * inv[2, 2] * s,
- inv[0, 1] * inv[1, 2] - inv[0, 2] * inv[1, 1] * s,
- co[1] * s,
- inv[0, 0] * inv[2, 2] - inv[0, 2] * inv[2, 0] * s,
- inv[0, 2] * inv[1, 0] - inv[0, 0] * inv[1, 2] * s,
- co[2] * s,
- inv[0, 1] * inv[2, 0] - inv[0, 0] * inv[2, 1] * s,
- inv[0, 0] * inv[1, 1] - inv[0, 1] * inv[1, 0] * s
+ cofac00 * detInv, cofac01 * detInv, cofac02 * detInv,
+ cofac10 * detInv, cofac11 * detInv, cofac12 * detInv,
+ cofac20 * detInv, cofac21 * detInv, cofac22 * detInv
);
-
- return inv;
}
public Basis Orthonormalized()
{
- Vector3 xAxis = GetAxis(0);
- Vector3 yAxis = GetAxis(1);
- Vector3 zAxis = GetAxis(2);
+ Vector3 column0 = GetColumn(0);
+ Vector3 column1 = GetColumn(1);
+ Vector3 column2 = GetColumn(2);
- xAxis.Normalize();
- yAxis = yAxis - xAxis * xAxis.Dot(yAxis);
- yAxis.Normalize();
- zAxis = zAxis - xAxis * xAxis.Dot(zAxis) - yAxis * yAxis.Dot(zAxis);
- zAxis.Normalize();
+ column0.Normalize();
+ column1 = column1 - column0 * column0.Dot(column1);
+ column1.Normalize();
+ column2 = column2 - column0 * column0.Dot(column2) - column1 * column1.Dot(column2);
+ column2.Normalize();
- return CreateFromAxes(xAxis, yAxis, zAxis);
+ return new Basis(column0, column1, column2);
}
public Basis Rotated(Vector3 axis, real_t phi)
@@ -343,49 +420,49 @@ namespace Godot
{
var m = this;
- m[0, 0] *= scale.x;
- m[0, 1] *= scale.x;
- m[0, 2] *= scale.x;
- m[1, 0] *= scale.y;
- m[1, 1] *= scale.y;
- m[1, 2] *= scale.y;
- m[2, 0] *= scale.z;
- m[2, 1] *= scale.z;
- m[2, 2] *= scale.z;
+ m.Row0[0] *= scale.x;
+ m.Row0[1] *= scale.x;
+ m.Row0[2] *= scale.x;
+ m.Row1[0] *= scale.y;
+ m.Row1[1] *= scale.y;
+ m.Row1[2] *= scale.y;
+ m.Row2[0] *= scale.z;
+ m.Row2[1] *= scale.z;
+ m.Row2[2] *= scale.z;
return m;
}
public real_t Tdotx(Vector3 with)
{
- return this[0, 0] * with[0] + this[1, 0] * with[1] + this[2, 0] * with[2];
+ return this.Row0[0] * with[0] + this.Row1[0] * with[1] + this.Row2[0] * with[2];
}
public real_t Tdoty(Vector3 with)
{
- return this[0, 1] * with[0] + this[1, 1] * with[1] + this[2, 1] * with[2];
+ return this.Row0[1] * with[0] + this.Row1[1] * with[1] + this.Row2[1] * with[2];
}
public real_t Tdotz(Vector3 with)
{
- return this[0, 2] * with[0] + this[1, 2] * with[1] + this[2, 2] * with[2];
+ return this.Row0[2] * with[0] + this.Row1[2] * with[1] + this.Row2[2] * with[2];
}
public Basis Transposed()
{
var tr = this;
- real_t temp = tr[0, 1];
- tr[0, 1] = tr[1, 0];
- tr[1, 0] = temp;
+ real_t temp = tr.Row0[1];
+ tr.Row0[1] = tr.Row1[0];
+ tr.Row1[0] = temp;
- temp = tr[0, 2];
- tr[0, 2] = tr[2, 0];
- tr[2, 0] = temp;
+ temp = tr.Row0[2];
+ tr.Row0[2] = tr.Row2[0];
+ tr.Row2[0] = temp;
- temp = tr[1, 2];
- tr[1, 2] = tr[2, 1];
- tr[2, 1] = temp;
+ temp = tr.Row1[2];
+ tr.Row1[2] = tr.Row2[1];
+ tr.Row2[1] = temp;
return tr;
}
@@ -394,9 +471,9 @@ namespace Godot
{
return new Vector3
(
- this[0].Dot(v),
- this[1].Dot(v),
- this[2].Dot(v)
+ this.Row0.Dot(v),
+ this.Row1.Dot(v),
+ this.Row2.Dot(v)
);
}
@@ -404,60 +481,60 @@ namespace Godot
{
return new Vector3
(
- this[0, 0] * v.x + this[1, 0] * v.y + this[2, 0] * v.z,
- this[0, 1] * v.x + this[1, 1] * v.y + this[2, 1] * v.z,
- this[0, 2] * v.x + this[1, 2] * v.y + this[2, 2] * v.z
+ this.Row0[0] * v.x + this.Row1[0] * v.y + this.Row2[0] * v.z,
+ this.Row0[1] * v.x + this.Row1[1] * v.y + this.Row2[1] * v.z,
+ this.Row0[2] * v.x + this.Row1[2] * v.y + this.Row2[2] * v.z
);
}
public Quat Quat()
{
- real_t trace = _x[0] + _y[1] + _z[2];
+ real_t trace = Row0[0] + Row1[1] + Row2[2];
if (trace > 0.0f)
{
real_t s = Mathf.Sqrt(trace + 1.0f) * 2f;
real_t inv_s = 1f / s;
return new Quat(
- (_z[1] - _y[2]) * inv_s,
- (_x[2] - _z[0]) * inv_s,
- (_y[0] - _x[1]) * inv_s,
+ (Row2[1] - Row1[2]) * inv_s,
+ (Row0[2] - Row2[0]) * inv_s,
+ (Row1[0] - Row0[1]) * inv_s,
s * 0.25f
);
}
- if (_x[0] > _y[1] && _x[0] > _z[2])
+ if (Row0[0] > Row1[1] && Row0[0] > Row2[2])
{
- real_t s = Mathf.Sqrt(_x[0] - _y[1] - _z[2] + 1.0f) * 2f;
+ real_t s = Mathf.Sqrt(Row0[0] - Row1[1] - Row2[2] + 1.0f) * 2f;
real_t inv_s = 1f / s;
return new Quat(
s * 0.25f,
- (_x[1] + _y[0]) * inv_s,
- (_x[2] + _z[0]) * inv_s,
- (_z[1] - _y[2]) * inv_s
+ (Row0[1] + Row1[0]) * inv_s,
+ (Row0[2] + Row2[0]) * inv_s,
+ (Row2[1] - Row1[2]) * inv_s
);
}
- if (_y[1] > _z[2])
+ if (Row1[1] > Row2[2])
{
- real_t s = Mathf.Sqrt(-_x[0] + _y[1] - _z[2] + 1.0f) * 2f;
+ real_t s = Mathf.Sqrt(-Row0[0] + Row1[1] - Row2[2] + 1.0f) * 2f;
real_t inv_s = 1f / s;
return new Quat(
- (_x[1] + _y[0]) * inv_s,
+ (Row0[1] + Row1[0]) * inv_s,
s * 0.25f,
- (_y[2] + _z[1]) * inv_s,
- (_x[2] - _z[0]) * inv_s
+ (Row1[2] + Row2[1]) * inv_s,
+ (Row0[2] - Row2[0]) * inv_s
);
}
else
{
- real_t s = Mathf.Sqrt(-_x[0] - _y[1] + _z[2] + 1.0f) * 2f;
+ real_t s = Mathf.Sqrt(-Row0[0] - Row1[1] + Row2[2] + 1.0f) * 2f;
real_t inv_s = 1f / s;
return new Quat(
- (_x[2] + _z[0]) * inv_s,
- (_y[2] + _z[1]) * inv_s,
+ (Row0[2] + Row2[0]) * inv_s,
+ (Row1[2] + Row2[1]) * inv_s,
s * 0.25f,
- (_y[0] - _x[1]) * inv_s
+ (Row1[0] - Row0[1]) * inv_s
);
}
}
@@ -479,9 +556,9 @@ namespace Godot
real_t yz = quat.y * zs;
real_t zz = quat.z * zs;
- _x = new Vector3(1.0f - (yy + zz), xy - wz, xz + wy);
- _y = new Vector3(xy + wz, 1.0f - (xx + zz), yz - wx);
- _z = new Vector3(xz - wy, yz + wx, 1.0f - (xx + yy));
+ Row0 = new Vector3(1.0f - (yy + zz), xy - wz, xz + wy);
+ Row1 = new Vector3(xy + wz, 1.0f - (xx + zz), yz - wx);
+ Row2 = new Vector3(xz - wy, yz + wx, 1.0f - (xx + yy));
}
public Basis(Vector3 euler)
@@ -511,21 +588,21 @@ namespace Godot
real_t cosine = Mathf.Cos(phi);
real_t sine = Mathf.Sin(phi);
- _x = new Vector3
+ Row0 = new Vector3
(
axis_sq.x + cosine * (1.0f - axis_sq.x),
axis.x * axis.y * (1.0f - cosine) - axis.z * sine,
axis.z * axis.x * (1.0f - cosine) + axis.y * sine
);
- _y = new Vector3
+ Row1 = new Vector3
(
axis.x * axis.y * (1.0f - cosine) + axis.z * sine,
axis_sq.y + cosine * (1.0f - axis_sq.y),
axis.y * axis.z * (1.0f - cosine) - axis.x * sine
);
- _z = new Vector3
+ Row2 = new Vector3
(
axis.z * axis.x * (1.0f - cosine) - axis.y * sine,
axis.y * axis.z * (1.0f - cosine) + axis.x * sine,
@@ -533,32 +610,32 @@ namespace Godot
);
}
- public Basis(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis)
+ public Basis(Vector3 column0, Vector3 column1, Vector3 column2)
{
- _x = new Vector3(xAxis.x, yAxis.x, zAxis.x);
- _y = new Vector3(xAxis.y, yAxis.y, zAxis.y);
- _z = new Vector3(xAxis.z, yAxis.z, zAxis.z);
+ Row0 = new Vector3(column0.x, column1.x, column2.x);
+ Row1 = new Vector3(column0.y, column1.y, column2.y);
+ Row2 = new Vector3(column0.z, column1.z, column2.z);
// Same as:
- // SetAxis(0, xAxis);
- // SetAxis(1, yAxis);
- // SetAxis(2, zAxis);
- // We need to assign the struct fields so we can't do that...
+ // Column0 = column0;
+ // Column1 = column1;
+ // Column2 = column2;
+ // We need to assign the struct fields here first so we can't do it that way...
}
internal Basis(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz)
{
- _x = new Vector3(xx, xy, xz);
- _y = new Vector3(yx, yy, yz);
- _z = new Vector3(zx, zy, zz);
+ Row0 = new Vector3(xx, xy, xz);
+ Row1 = new Vector3(yx, yy, yz);
+ Row2 = new Vector3(zx, zy, zz);
}
public static Basis operator *(Basis left, Basis right)
{
return new Basis
(
- right.Tdotx(left[0]), right.Tdoty(left[0]), right.Tdotz(left[0]),
- right.Tdotx(left[1]), right.Tdoty(left[1]), right.Tdotz(left[1]),
- right.Tdotx(left[2]), right.Tdoty(left[2]), right.Tdotz(left[2])
+ right.Tdotx(left.Row0), right.Tdoty(left.Row0), right.Tdotz(left.Row0),
+ right.Tdotx(left.Row1), right.Tdoty(left.Row1), right.Tdotz(left.Row1),
+ right.Tdotx(left.Row2), right.Tdoty(left.Row2), right.Tdotz(left.Row2)
);
}
@@ -584,21 +661,21 @@ namespace Godot
public bool Equals(Basis other)
{
- return _x.Equals(other[0]) && _y.Equals(other[1]) && _z.Equals(other[2]);
+ return Row0.Equals(other.Row0) && Row1.Equals(other.Row1) && Row2.Equals(other.Row2);
}
public override int GetHashCode()
{
- return _x.GetHashCode() ^ _y.GetHashCode() ^ _z.GetHashCode();
+ return Row0.GetHashCode() ^ Row1.GetHashCode() ^ Row2.GetHashCode();
}
public override string ToString()
{
return String.Format("({0}, {1}, {2})", new object[]
{
- _x.ToString(),
- _y.ToString(),
- _z.ToString()
+ Row0.ToString(),
+ Row1.ToString(),
+ Row2.ToString()
});
}
@@ -606,9 +683,9 @@ namespace Godot
{
return String.Format("({0}, {1}, {2})", new object[]
{
- _x.ToString(format),
- _y.ToString(format),
- _z.ToString(format)
+ Row0.ToString(format),
+ Row1.ToString(format),
+ Row2.ToString(format)
});
}
}
diff --git a/modules/mono/glue/Managed/Files/DebuggingUtils.cs b/modules/mono/glue/Managed/Files/DebuggingUtils.cs
index b27816084e..edfe3464ec 100644
--- a/modules/mono/glue/Managed/Files/DebuggingUtils.cs
+++ b/modules/mono/glue/Managed/Files/DebuggingUtils.cs
@@ -19,6 +19,12 @@ namespace Godot
sb.Append(" ");
}
+ public static void InstallTraceListener()
+ {
+ Trace.Listeners.Clear();
+ Trace.Listeners.Add(new GodotTraceListener());
+ }
+
public static void GetStackFrameInfo(StackFrame frame, out string fileName, out int fileLineNumber, out string methodDecl)
{
fileName = frame.GetFileName();
diff --git a/modules/mono/glue/Managed/Files/Dictionary.cs b/modules/mono/glue/Managed/Files/Dictionary.cs
index 7695f03cd6..fb4521065f 100644
--- a/modules/mono/glue/Managed/Files/Dictionary.cs
+++ b/modules/mono/glue/Managed/Files/Dictionary.cs
@@ -54,6 +54,9 @@ namespace Godot.Collections
internal IntPtr GetPtr()
{
+ if (disposed)
+ throw new ObjectDisposedException(GetType().FullName);
+
return safeHandle.DangerousGetHandle();
}
diff --git a/modules/mono/glue/Managed/Files/GD.cs b/modules/mono/glue/Managed/Files/GD.cs
index 75a35a9eea..3afaf5d08b 100644
--- a/modules/mono/glue/Managed/Files/GD.cs
+++ b/modules/mono/glue/Managed/Files/GD.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Runtime.CompilerServices;
#if REAL_T_IS_DOUBLE
using real_t = System.Double;
@@ -50,7 +51,7 @@ namespace Godot
return godot_icall_GD_hash(var);
}
- public static Object InstanceFromId(int instanceId)
+ public static Object InstanceFromId(ulong instanceId)
{
return godot_icall_GD_instance_from_id(instanceId);
}
@@ -110,71 +111,62 @@ namespace Godot
godot_icall_GD_printt(what);
}
- public static int[] Range(int length)
+ public static double Randf()
{
- var ret = new int[length];
-
- for (int i = 0; i < length; i++)
- {
- ret[i] = i;
- }
-
- return ret;
+ return godot_icall_GD_randf();
}
- public static int[] Range(int from, int to)
+ public static uint Randi()
{
- if (to < from)
- return new int[0];
+ return godot_icall_GD_randi();
+ }
- var ret = new int[to - from];
+ public static void Randomize()
+ {
+ godot_icall_GD_randomize();
+ }
- for (int i = from; i < to; i++)
- {
- ret[i - from] = i;
- }
+ public static double RandRange(double from, double to)
+ {
+ return godot_icall_GD_rand_range(from, to);
+ }
- return ret;
+ public static uint RandSeed(ulong seed, out ulong newSeed)
+ {
+ return godot_icall_GD_rand_seed(seed, out newSeed);
}
- public static int[] Range(int from, int to, int increment)
+ public static IEnumerable<int> Range(int end)
{
- if (to < from && increment > 0)
- return new int[0];
- if (to > from && increment < 0)
- return new int[0];
+ return Range(0, end, 1);
+ }
- // Calculate count
- int count;
+ public static IEnumerable<int> Range(int start, int end)
+ {
+ return Range(start, end, 1);
+ }
- if (increment > 0)
- count = (to - from - 1) / increment + 1;
- else
- count = (from - to - 1) / -increment + 1;
+ public static IEnumerable<int> Range(int start, int end, int step)
+ {
+ if (end < start && step > 0)
+ yield break;
- var ret = new int[count];
+ if (end > start && step < 0)
+ yield break;
- if (increment > 0)
+ if (step > 0)
{
- int idx = 0;
- for (int i = from; i < to; i += increment)
- {
- ret[idx++] = i;
- }
+ for (int i = start; i < end; i += step)
+ yield return i;
}
else
{
- int idx = 0;
- for (int i = from; i > to; i += increment)
- {
- ret[idx++] = i;
- }
+ for (int i = start; i > end; i += step)
+ yield return i;
}
-
- return ret;
}
- public static void Seed(int seed)
+ public static void Seed(ulong seed)
{
godot_icall_GD_seed(seed);
}
@@ -214,7 +206,7 @@ namespace Godot
internal extern static int godot_icall_GD_hash(object var);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static Object godot_icall_GD_instance_from_id(int instance_id);
+ internal extern static Object godot_icall_GD_instance_from_id(ulong instance_id);
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern static void godot_icall_GD_print(object[] what);
@@ -232,7 +224,22 @@ namespace Godot
internal extern static void godot_icall_GD_printt(object[] what);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_seed(int seed);
+ internal extern static double godot_icall_GD_randf();
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static uint godot_icall_GD_randi();
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static void godot_icall_GD_randomize();
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static double godot_icall_GD_rand_range(double from, double to);
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static uint godot_icall_GD_rand_seed(ulong seed, out ulong newSeed);
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static void godot_icall_GD_seed(ulong seed);
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern static string godot_icall_GD_str(object[] what);
diff --git a/modules/mono/glue/Managed/Files/GodotTraceListener.cs b/modules/mono/glue/Managed/Files/GodotTraceListener.cs
new file mode 100644
index 0000000000..f1a00ae0fa
--- /dev/null
+++ b/modules/mono/glue/Managed/Files/GodotTraceListener.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Diagnostics;
+
+namespace Godot
+{
+ internal class GodotTraceListener : TraceListener
+ {
+ public override void Write(string message)
+ {
+ GD.PrintRaw(message);
+ }
+
+ public override void WriteLine(string message)
+ {
+ GD.Print(message);
+ }
+
+ public override void Fail(string message, string detailMessage)
+ {
+ GD.PrintErr("Assertion failed: ", message);
+ if (detailMessage != null)
+ {
+ GD.PrintErr(" Details: ", detailMessage);
+ }
+
+ try
+ {
+ var stackTrace = new StackTrace(true).ToString();
+ GD.PrintErr(stackTrace);
+ }
+ catch
+ {
+ // ignored
+ }
+ }
+ }
+}
diff --git a/modules/mono/glue/Managed/Files/Mathf.cs b/modules/mono/glue/Managed/Files/Mathf.cs
index dcab3c1ffc..5f5de12959 100644
--- a/modules/mono/glue/Managed/Files/Mathf.cs
+++ b/modules/mono/glue/Managed/Files/Mathf.cs
@@ -289,13 +289,13 @@ namespace Godot
public static int Wrap(int value, int min, int max)
{
int rng = max - min;
- return min + ((value - min) % rng + rng) % rng;
+ return rng != 0 ? min + ((value - min) % rng + rng) % rng : min;
}
public static real_t Wrap(real_t value, real_t min, real_t max)
{
real_t rng = max - min;
- return min + ((value - min) % rng + rng) % rng;
+ return !IsEqualApprox(rng, default(real_t)) ? min + ((value - min) % rng + rng) % rng : min;
}
}
}
diff --git a/modules/mono/glue/Managed/Files/MathfEx.cs b/modules/mono/glue/Managed/Files/MathfEx.cs
index 2ef02cc288..414762f7b1 100644
--- a/modules/mono/glue/Managed/Files/MathfEx.cs
+++ b/modules/mono/glue/Managed/Files/MathfEx.cs
@@ -35,5 +35,10 @@ namespace Godot
{
return (int)Math.Round(s);
}
+
+ public static bool IsEqualApprox(real_t a, real_t b, real_t ratio = Mathf.Epsilon)
+ {
+ return Abs(a - b) < ratio;
+ }
}
} \ No newline at end of file
diff --git a/modules/mono/glue/Managed/Files/NodePath.cs b/modules/mono/glue/Managed/Files/NodePath.cs
index 2c89bec87f..94a4ed1de9 100644
--- a/modules/mono/glue/Managed/Files/NodePath.cs
+++ b/modules/mono/glue/Managed/Files/NodePath.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
namespace Godot
{
- public partial class NodePath : IDisposable
+ public sealed partial class NodePath : IDisposable
{
private bool disposed = false;
@@ -11,7 +11,13 @@ namespace Godot
internal static IntPtr GetPtr(NodePath instance)
{
- return instance == null ? IntPtr.Zero : instance.ptr;
+ if (instance == null)
+ return IntPtr.Zero;
+
+ if (instance.disposed)
+ throw new ObjectDisposedException(instance.GetType().FullName);
+
+ return instance.ptr;
}
~NodePath()
@@ -25,7 +31,7 @@ namespace Godot
GC.SuppressFinalize(this);
}
- protected virtual void Dispose(bool disposing)
+ private void Dispose(bool disposing)
{
if (disposed)
return;
@@ -49,7 +55,7 @@ namespace Godot
get { return ptr; }
}
- public NodePath() : this(string.Empty) {}
+ public NodePath() : this(string.Empty) { }
public NodePath(string path)
{
diff --git a/modules/mono/glue/Managed/Files/Object.base.cs b/modules/mono/glue/Managed/Files/Object.base.cs
index 30490a715f..41fc43996f 100644
--- a/modules/mono/glue/Managed/Files/Object.base.cs
+++ b/modules/mono/glue/Managed/Files/Object.base.cs
@@ -30,7 +30,13 @@ namespace Godot
internal static IntPtr GetPtr(Object instance)
{
- return instance == null ? IntPtr.Zero : instance.ptr;
+ if (instance == null)
+ return IntPtr.Zero;
+
+ if (instance.disposed)
+ throw new ObjectDisposedException(instance.GetType().FullName);
+
+ return instance.ptr;
}
~Object()
diff --git a/modules/mono/glue/Managed/Files/Quat.cs b/modules/mono/glue/Managed/Files/Quat.cs
index fd1ac01083..d0c15146a5 100644
--- a/modules/mono/glue/Managed/Files/Quat.cs
+++ b/modules/mono/glue/Managed/Files/Quat.cs
@@ -123,22 +123,23 @@ namespace Godot
// Calculate cosine
real_t cosom = x * b.x + y * b.y + z * b.z + w * b.w;
- var to1 = new real_t[4];
+ var to1 = new Quat();
// Adjust signs if necessary
if (cosom < 0.0)
{
- cosom = -cosom; to1[0] = -b.x;
- to1[1] = -b.y;
- to1[2] = -b.z;
- to1[3] = -b.w;
+ cosom = -cosom;
+ to1.x = -b.x;
+ to1.y = -b.y;
+ to1.z = -b.z;
+ to1.w = -b.w;
}
else
{
- to1[0] = b.x;
- to1[1] = b.y;
- to1[2] = b.z;
- to1[3] = b.w;
+ to1.x = b.x;
+ to1.y = b.y;
+ to1.z = b.z;
+ to1.w = b.w;
}
real_t sinom, scale0, scale1;
@@ -162,10 +163,10 @@ namespace Godot
// Calculate final values
return new Quat
(
- scale0 * x + scale1 * to1[0],
- scale0 * y + scale1 * to1[1],
- scale0 * z + scale1 * to1[2],
- scale0 * w + scale1 * to1[3]
+ scale0 * x + scale1 * to1.x,
+ scale0 * y + scale1 * to1.y,
+ scale0 * z + scale1 * to1.z,
+ scale0 * w + scale1 * to1.w
);
}
@@ -347,9 +348,9 @@ namespace Godot
public override bool Equals(object obj)
{
- if (obj is Vector2)
+ if (obj is Quat)
{
- return Equals((Vector2)obj);
+ return Equals((Quat)obj);
}
return false;
diff --git a/modules/mono/glue/Managed/Files/RID.cs b/modules/mono/glue/Managed/Files/RID.cs
index b862b8cac0..f1268c8518 100644
--- a/modules/mono/glue/Managed/Files/RID.cs
+++ b/modules/mono/glue/Managed/Files/RID.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
namespace Godot
{
- public partial class RID : IDisposable
+ public sealed partial class RID : IDisposable
{
private bool disposed = false;
@@ -11,7 +11,13 @@ namespace Godot
internal static IntPtr GetPtr(RID instance)
{
- return instance == null ? IntPtr.Zero : instance.ptr;
+ if (instance == null)
+ return IntPtr.Zero;
+
+ if (instance.disposed)
+ throw new ObjectDisposedException(instance.GetType().FullName);
+
+ return instance.ptr;
}
~RID()
@@ -25,7 +31,7 @@ namespace Godot
GC.SuppressFinalize(this);
}
- protected virtual void Dispose(bool disposing)
+ private void Dispose(bool disposing)
{
if (disposed)
return;
diff --git a/modules/mono/glue/Managed/Files/Transform.cs b/modules/mono/glue/Managed/Files/Transform.cs
index fa85855edd..bd79144873 100644
--- a/modules/mono/glue/Managed/Files/Transform.cs
+++ b/modules/mono/glue/Managed/Files/Transform.cs
@@ -71,21 +71,21 @@ namespace Godot
{
// Make rotation matrix
// Z vector
- Vector3 zAxis = eye - target;
+ Vector3 column2 = eye - target;
- zAxis.Normalize();
+ column2.Normalize();
- Vector3 yAxis = up;
+ Vector3 column1 = up;
- Vector3 xAxis = yAxis.Cross(zAxis);
+ Vector3 column0 = column1.Cross(column2);
// Recompute Y = Z cross X
- yAxis = zAxis.Cross(xAxis);
+ column1 = column2.Cross(column0);
- xAxis.Normalize();
- yAxis.Normalize();
+ column0.Normalize();
+ column1.Normalize();
- basis = Basis.CreateFromAxes(xAxis, yAxis, zAxis);
+ basis = new Basis(column0, column1, column2);
origin = eye;
}
@@ -94,9 +94,9 @@ namespace Godot
{
return new Transform(basis, new Vector3
(
- origin[0] += basis[0].Dot(ofs),
- origin[1] += basis[1].Dot(ofs),
- origin[2] += basis[2].Dot(ofs)
+ origin[0] += basis.Row0.Dot(ofs),
+ origin[1] += basis.Row1.Dot(ofs),
+ origin[2] += basis.Row2.Dot(ofs)
));
}
@@ -104,9 +104,9 @@ namespace Godot
{
return new Vector3
(
- basis[0].Dot(v) + origin.x,
- basis[1].Dot(v) + origin.y,
- basis[2].Dot(v) + origin.z
+ basis.Row0.Dot(v) + origin.x,
+ basis.Row1.Dot(v) + origin.y,
+ basis.Row2.Dot(v) + origin.z
);
}
@@ -116,9 +116,9 @@ namespace Godot
return new Vector3
(
- basis[0, 0] * vInv.x + basis[1, 0] * vInv.y + basis[2, 0] * vInv.z,
- basis[0, 1] * vInv.x + basis[1, 1] * vInv.y + basis[2, 1] * vInv.z,
- basis[0, 2] * vInv.x + basis[1, 2] * vInv.y + basis[2, 2] * vInv.z
+ basis.Row0[0] * vInv.x + basis.Row1[0] * vInv.y + basis.Row2[0] * vInv.z,
+ basis.Row0[1] * vInv.x + basis.Row1[1] * vInv.y + basis.Row2[1] * vInv.z,
+ basis.Row0[2] * vInv.x + basis.Row1[2] * vInv.y + basis.Row2[2] * vInv.z
);
}
@@ -134,9 +134,9 @@ namespace Godot
public static Transform FlipZ { get { return _flipZ; } }
// Constructors
- public Transform(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 origin)
+ public Transform(Vector3 column0, Vector3 column1, Vector3 column2, Vector3 origin)
{
- basis = Basis.CreateFromAxes(xAxis, yAxis, zAxis);
+ basis = new Basis(column0, column1, column2);
this.origin = origin;
}
diff --git a/modules/mono/glue/Managed/Files/Transform2D.cs b/modules/mono/glue/Managed/Files/Transform2D.cs
index c9e5b560b2..f7bb41d523 100644
--- a/modules/mono/glue/Managed/Files/Transform2D.cs
+++ b/modules/mono/glue/Managed/Files/Transform2D.cs
@@ -13,42 +13,65 @@ namespace Godot
{
public Vector2 x;
public Vector2 y;
- public Vector2 o;
-
- public Vector2 Origin
- {
- get { return o; }
- }
+ public Vector2 origin;
public real_t Rotation
{
- get { return Mathf.Atan2(y.x, o.y); }
+ get
+ {
+ real_t det = BasisDeterminant();
+ Transform2D t = Orthonormalized();
+ if (det < 0)
+ {
+ t.ScaleBasis(new Vector2(1, -1));
+ }
+ return Mathf.Atan2(t.x.y, t.x.x);
+ }
+ set
+ {
+ Vector2 scale = Scale;
+ x.x = y.y = Mathf.Cos(value);
+ x.y = y.x = Mathf.Sin(value);
+ y.x *= -1;
+ Scale = scale;
+ }
}
public Vector2 Scale
{
- get { return new Vector2(x.Length(), y.Length()); }
+ get
+ {
+ real_t detSign = Mathf.Sign(BasisDeterminant());
+ return new Vector2(x.Length(), detSign * y.Length());
+ }
+ set
+ {
+ x = x.Normalized();
+ y = y.Normalized();
+ x *= value.x;
+ y *= value.y;
+ }
}
- public Vector2 this[int index]
+ public Vector2 this[int rowIndex]
{
get
{
- switch (index)
+ switch (rowIndex)
{
case 0:
return x;
case 1:
return y;
case 2:
- return o;
+ return origin;
default:
throw new IndexOutOfRangeException();
}
}
set
{
- switch (index)
+ switch (rowIndex)
{
case 0:
x = value;
@@ -57,7 +80,7 @@ namespace Godot
y = value;
return;
case 2:
- o = value;
+ origin = value;
return;
default:
throw new IndexOutOfRangeException();
@@ -65,30 +88,29 @@ namespace Godot
}
}
-
- public real_t this[int index, int axis]
+ public real_t this[int rowIndex, int columnIndex]
{
get
{
- switch (index)
+ switch (rowIndex)
{
case 0:
- return x[axis];
+ return x[columnIndex];
case 1:
- return y[axis];
+ return y[columnIndex];
default:
throw new IndexOutOfRangeException();
}
}
set
{
- switch (index)
+ switch (rowIndex)
{
case 0:
- x[axis] = value;
+ x[columnIndex] = value;
return;
case 1:
- y[axis] = value;
+ y[columnIndex] = value;
return;
default:
throw new IndexOutOfRangeException();
@@ -98,34 +120,32 @@ namespace Godot
public Transform2D AffineInverse()
{
- var inv = this;
-
- real_t det = this[0, 0] * this[1, 1] - this[1, 0] * this[0, 1];
+ real_t det = BasisDeterminant();
if (det == 0)
- {
- return new Transform2D
- (
- float.NaN, float.NaN,
- float.NaN, float.NaN,
- float.NaN, float.NaN
- );
- }
+ throw new InvalidOperationException("Matrix determinant is zero and cannot be inverted.");
- real_t idet = 1.0f / det;
+ var inv = this;
+
+ real_t temp = inv[0, 0];
+ inv[0, 0] = inv[1, 1];
+ inv[1, 1] = temp;
- real_t temp = this[0, 0];
- this[0, 0] = this[1, 1];
- this[1, 1] = temp;
+ real_t detInv = 1.0f / det;
- this[0] *= new Vector2(idet, -idet);
- this[1] *= new Vector2(-idet, idet);
+ inv[0] *= new Vector2(detInv, -detInv);
+ inv[1] *= new Vector2(-detInv, detInv);
- this[2] = BasisXform(-this[2]);
+ inv[2] = BasisXform(-inv[2]);
return inv;
}
+ private real_t BasisDeterminant()
+ {
+ return x.x * y.y - x.y * y.x;
+ }
+
public Vector2 BasisXform(Vector2 v)
{
return new Vector2(Tdotx(v), Tdoty(v));
@@ -168,8 +188,8 @@ namespace Godot
}
// Extract parameters
- Vector2 p1 = Origin;
- Vector2 p2 = m.Origin;
+ Vector2 p1 = origin;
+ Vector2 p2 = m.origin;
// Construct matrix
var res = new Transform2D(Mathf.Atan2(v.y, v.x), p1.LinearInterpolate(p2, c));
@@ -189,7 +209,7 @@ namespace Godot
inv.x.y = inv.y.x;
inv.y.x = temp;
- inv.o = inv.BasisXform(-inv.o);
+ inv.origin = inv.BasisXform(-inv.origin);
return inv;
}
@@ -221,10 +241,18 @@ namespace Godot
var copy = this;
copy.x *= scale;
copy.y *= scale;
- copy.o *= scale;
+ copy.origin *= scale;
return copy;
}
+ private void ScaleBasis(Vector2 scale)
+ {
+ x.x *= scale.x;
+ x.y *= scale.y;
+ y.x *= scale.x;
+ y.y *= scale.y;
+ }
+
private real_t Tdotx(Vector2 with)
{
return this[0, 0] * with[0] + this[1, 0] * with[1];
@@ -238,66 +266,61 @@ namespace Godot
public Transform2D Translated(Vector2 offset)
{
var copy = this;
- copy.o += copy.BasisXform(offset);
+ copy.origin += copy.BasisXform(offset);
return copy;
}
public Vector2 Xform(Vector2 v)
{
- return new Vector2(Tdotx(v), Tdoty(v)) + o;
+ return new Vector2(Tdotx(v), Tdoty(v)) + origin;
}
public Vector2 XformInv(Vector2 v)
{
- Vector2 vInv = v - o;
+ Vector2 vInv = v - origin;
return new Vector2(x.Dot(vInv), y.Dot(vInv));
}
// Constants
- private static readonly Transform2D _identity = new Transform2D(new Vector2(1f, 0f), new Vector2(0f, 1f), Vector2.Zero);
- private static readonly Transform2D _flipX = new Transform2D(new Vector2(-1f, 0f), new Vector2(0f, 1f), Vector2.Zero);
- private static readonly Transform2D _flipY = new Transform2D(new Vector2(1f, 0f), new Vector2(0f, -1f), Vector2.Zero);
+ private static readonly Transform2D _identity = new Transform2D(1, 0, 0, 1, 0, 0);
+ private static readonly Transform2D _flipX = new Transform2D(-1, 0, 0, 1, 0, 0);
+ private static readonly Transform2D _flipY = new Transform2D(1, 0, 0, -1, 0, 0);
- public static Transform2D Identity { get { return _identity; } }
- public static Transform2D FlipX { get { return _flipX; } }
- public static Transform2D FlipY { get { return _flipY; } }
+ public static Transform2D Identity => _identity;
+ public static Transform2D FlipX => _flipX;
+ public static Transform2D FlipY => _flipY;
// Constructors
- public Transform2D(Vector2 xAxis, Vector2 yAxis, Vector2 origin)
+ public Transform2D(Vector2 xAxis, Vector2 yAxis, Vector2 originPos)
{
x = xAxis;
y = yAxis;
- o = origin;
+ origin = originPos;
}
public Transform2D(real_t xx, real_t xy, real_t yx, real_t yy, real_t ox, real_t oy)
{
x = new Vector2(xx, xy);
y = new Vector2(yx, yy);
- o = new Vector2(ox, oy);
+ origin = new Vector2(ox, oy);
}
public Transform2D(real_t rot, Vector2 pos)
{
- real_t cr = Mathf.Cos(rot);
- real_t sr = Mathf.Sin(rot);
- x.x = cr;
- y.y = cr;
- x.y = -sr;
- y.x = sr;
- o = pos;
+ x.x = y.y = Mathf.Cos(rot);
+ x.y = y.x = Mathf.Sin(rot);
+ y.x *= -1;
+ origin = pos;
}
public static Transform2D operator *(Transform2D left, Transform2D right)
{
- left.o = left.Xform(right.o);
+ left.origin = left.Xform(right.origin);
- real_t x0, x1, y0, y1;
-
- x0 = left.Tdotx(right.x);
- x1 = left.Tdoty(right.x);
- y0 = left.Tdotx(right.y);
- y1 = left.Tdoty(right.y);
+ real_t x0 = left.Tdotx(right.x);
+ real_t x1 = left.Tdoty(right.x);
+ real_t y0 = left.Tdotx(right.y);
+ real_t y1 = left.Tdoty(right.y);
left.x.x = x0;
left.x.y = x1;
@@ -319,22 +342,17 @@ namespace Godot
public override bool Equals(object obj)
{
- if (obj is Transform2D)
- {
- return Equals((Transform2D)obj);
- }
-
- return false;
+ return obj is Transform2D transform2D && Equals(transform2D);
}
public bool Equals(Transform2D other)
{
- return x.Equals(other.x) && y.Equals(other.y) && o.Equals(other.o);
+ return x.Equals(other.x) && y.Equals(other.y) && origin.Equals(other.origin);
}
public override int GetHashCode()
{
- return x.GetHashCode() ^ y.GetHashCode() ^ o.GetHashCode();
+ return x.GetHashCode() ^ y.GetHashCode() ^ origin.GetHashCode();
}
public override string ToString()
@@ -343,7 +361,7 @@ namespace Godot
{
x.ToString(),
y.ToString(),
- o.ToString()
+ origin.ToString()
});
}
@@ -353,7 +371,7 @@ namespace Godot
{
x.ToString(format),
y.ToString(format),
- o.ToString(format)
+ origin.ToString(format)
});
}
}
diff --git a/modules/mono/glue/Managed/Files/Vector2.cs b/modules/mono/glue/Managed/Files/Vector2.cs
index ce41886bfc..73a3252fdb 100644
--- a/modules/mono/glue/Managed/Files/Vector2.cs
+++ b/modules/mono/glue/Managed/Files/Vector2.cs
@@ -84,7 +84,7 @@ namespace Godot
public real_t AngleToPoint(Vector2 to)
{
- return Mathf.Atan2(x - to.x, y - to.y);
+ return Mathf.Atan2(y - to.y, x - to.x);
}
public real_t Aspect()
diff --git a/modules/mono/glue/Managed/Managed.csproj b/modules/mono/glue/Managed/Managed.csproj
index 1f82dde5e7..61f738922b 100644
--- a/modules/mono/glue/Managed/Managed.csproj
+++ b/modules/mono/glue/Managed/Managed.csproj
@@ -11,7 +11,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
+ <DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp
index 88adc3e256..fad02b01d3 100644
--- a/modules/mono/glue/base_object_glue.cpp
+++ b/modules/mono/glue/base_object_glue.cpp
@@ -33,7 +33,7 @@
#ifdef MONO_GLUE_ENABLED
#include "core/reference.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "../csharp_script.h"
#include "../mono_gd/gd_mono_internals.h"
@@ -65,9 +65,12 @@ void godot_icall_Object_Disposed(MonoObject *p_obj, Object *p_ptr) {
void *data = p_ptr->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
if (data) {
- Ref<MonoGCHandle> &gchandle = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get().gchandle;
- if (gchandle.is_valid()) {
- CSharpLanguage::release_script_gchandle(p_obj, gchandle);
+ CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
+ if (script_binding.inited) {
+ Ref<MonoGCHandle> &gchandle = script_binding.gchandle;
+ if (gchandle.is_valid()) {
+ CSharpLanguage::release_script_gchandle(p_obj, gchandle);
+ }
}
}
}
@@ -85,11 +88,14 @@ void godot_icall_Reference_Disposed(MonoObject *p_obj, Object *p_ptr, bool p_is_
CSharpInstance *cs_instance = CAST_CSHARP_INSTANCE(ref->get_script_instance());
if (cs_instance) {
if (!cs_instance->is_destructing_script_instance()) {
- bool r_owner_deleted;
- cs_instance->mono_object_disposed_baseref(p_obj, p_is_finalizer, r_owner_deleted);
- if (!r_owner_deleted && !p_is_finalizer) {
- // If the native instance is still alive and Dispose() was called
- // (instead of the finalizer), then we remove the script instance.
+ bool delete_owner;
+ bool remove_script_instance;
+
+ cs_instance->mono_object_disposed_baseref(p_obj, p_is_finalizer, delete_owner, remove_script_instance);
+
+ if (delete_owner) {
+ memdelete(ref);
+ } else if (remove_script_instance) {
ref->set_script_instance(NULL);
}
}
@@ -105,9 +111,12 @@ void godot_icall_Reference_Disposed(MonoObject *p_obj, Object *p_ptr, bool p_is_
void *data = ref->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
if (data) {
- Ref<MonoGCHandle> &gchandle = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get().gchandle;
- if (gchandle.is_valid()) {
- CSharpLanguage::release_script_gchandle(p_obj, gchandle);
+ CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get();
+ if (script_binding.inited) {
+ Ref<MonoGCHandle> &gchandle = script_binding.gchandle;
+ if (gchandle.is_valid()) {
+ CSharpLanguage::release_script_gchandle(p_obj, gchandle);
+ }
}
}
}
@@ -138,7 +147,7 @@ MonoObject *godot_icall_Object_weakref(Object *p_obj) {
wref->set_obj(p_obj);
}
- return GDMonoUtils::create_managed_for_godot_object(CACHED_CLASS(WeakRef), Reference::get_class_static(), Object::cast_to<Object>(wref.ptr()));
+ return GDMonoUtils::unmanaged_get_managed(wref.ptr());
}
Error godot_icall_SignalAwaiter_connect(Object *p_source, MonoString *p_signal, Object *p_target, MonoObject *p_awaiter) {
diff --git a/modules/mono/glue/collections_glue.cpp b/modules/mono/glue/collections_glue.cpp
index 0e5747a014..1065ff0868 100644
--- a/modules/mono/glue/collections_glue.cpp
+++ b/modules/mono/glue/collections_glue.cpp
@@ -86,7 +86,7 @@ bool godot_icall_Array_Contains(Array *ptr, MonoObject *item) {
}
void godot_icall_Array_CopyTo(Array *ptr, MonoArray *array, int array_index) {
- int count = ptr->size();
+ unsigned int count = ptr->size();
if (mono_array_length(array) < (array_index + count)) {
MonoException *exc = mono_get_exception_argument("", "Destination array was not long enough. Check destIndex and length, and the array's lower bounds.");
@@ -94,7 +94,7 @@ void godot_icall_Array_CopyTo(Array *ptr, MonoArray *array, int array_index) {
return;
}
- for (int i = 0; i < count; i++) {
+ for (unsigned int i = 0; i < count; i++) {
MonoObject *boxed = GDMonoMarshal::variant_to_mono_object(ptr->operator[](i));
mono_array_setref(array, array_index, boxed);
array_index++;
@@ -130,6 +130,10 @@ void godot_icall_Array_RemoveAt(Array *ptr, int index) {
ptr->remove(index);
}
+Error godot_icall_Array_Resize(Array *ptr, int new_size) {
+ return ptr->resize(new_size);
+}
+
void godot_icall_Array_Generic_GetElementTypeInfo(MonoReflectionType *refltype, uint32_t *type_encoding, GDMonoClass **type_class) {
MonoType *elem_type = mono_reflection_type_get_type(refltype);
@@ -274,6 +278,7 @@ void godot_register_collections_icalls() {
mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Insert", (void *)godot_icall_Array_Insert);
mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Remove", (void *)godot_icall_Array_Remove);
mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_RemoveAt", (void *)godot_icall_Array_RemoveAt);
+ mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Resize", (void *)godot_icall_Array_Resize);
mono_add_internal_call("Godot.Collections.Array::godot_icall_Array_Generic_GetElementTypeInfo", (void *)godot_icall_Array_Generic_GetElementTypeInfo);
mono_add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_Ctor", (void *)godot_icall_Dictionary_Ctor);
diff --git a/modules/mono/glue/collections_glue.h b/modules/mono/glue/collections_glue.h
index 52ca98b7f9..c0056d3bce 100644
--- a/modules/mono/glue/collections_glue.h
+++ b/modules/mono/glue/collections_glue.h
@@ -67,6 +67,8 @@ bool godot_icall_Array_Remove(Array *ptr, MonoObject *item);
void godot_icall_Array_RemoveAt(Array *ptr, int index);
+Error godot_icall_Array_Resize(Array *ptr, int new_size);
+
void godot_icall_Array_Generic_GetElementTypeInfo(MonoReflectionType *refltype, uint32_t *type_encoding, GDMonoClass **type_class);
// Dictionary
diff --git a/modules/mono/glue/gd_glue.cpp b/modules/mono/glue/gd_glue.cpp
index e49ed876e7..5edf49d2bf 100644
--- a/modules/mono/glue/gd_glue.cpp
+++ b/modules/mono/glue/gd_glue.cpp
@@ -52,7 +52,7 @@ MonoObject *godot_icall_GD_bytes2var(MonoArray *p_bytes) {
return GDMonoMarshal::variant_to_mono_object(ret);
}
-MonoObject *godot_icall_GD_convert(MonoObject *p_what, int p_type) {
+MonoObject *godot_icall_GD_convert(MonoObject *p_what, int32_t p_type) {
Variant what = GDMonoMarshal::mono_object_to_variant(p_what);
const Variant *args[1] = { &what };
Variant::CallError ce;
@@ -65,7 +65,7 @@ int godot_icall_GD_hash(MonoObject *p_var) {
return GDMonoMarshal::mono_object_to_variant(p_var).hash();
}
-MonoObject *godot_icall_GD_instance_from_id(int p_instance_id) {
+MonoObject *godot_icall_GD_instance_from_id(uint64_t p_instance_id) {
return GDMonoUtils::unmanaged_get_managed(ObjectDB::get_instance(p_instance_id));
}
@@ -115,7 +115,29 @@ void godot_icall_GD_printt(MonoArray *p_what) {
print_line(str);
}
-void godot_icall_GD_seed(int p_seed) {
+double godot_icall_GD_randf() {
+ return Math::randf();
+}
+
+uint32_t godot_icall_GD_randi() {
+ return Math::rand();
+}
+
+void godot_icall_GD_randomize() {
+ Math::randomize();
+}
+
+double godot_icall_GD_rand_range(double from, double to) {
+ return Math::random(from, to);
+}
+
+uint32_t godot_icall_GD_rand_seed(uint64_t seed, uint64_t *newSeed) {
+ int ret = Math::rand_from_seed(&seed);
+ *newSeed = seed;
+ return ret;
+}
+
+void godot_icall_GD_seed(uint64_t p_seed) {
Math::seed(p_seed);
}
@@ -201,6 +223,11 @@ void godot_register_gd_icalls() {
mono_add_internal_call("Godot.GD::godot_icall_GD_printraw", (void *)godot_icall_GD_printraw);
mono_add_internal_call("Godot.GD::godot_icall_GD_prints", (void *)godot_icall_GD_prints);
mono_add_internal_call("Godot.GD::godot_icall_GD_printt", (void *)godot_icall_GD_printt);
+ mono_add_internal_call("Godot.GD::godot_icall_GD_randf", (void *)godot_icall_GD_randf);
+ mono_add_internal_call("Godot.GD::godot_icall_GD_randi", (void *)godot_icall_GD_randi);
+ mono_add_internal_call("Godot.GD::godot_icall_GD_randomize", (void *)godot_icall_GD_randomize);
+ mono_add_internal_call("Godot.GD::godot_icall_GD_rand_range", (void *)godot_icall_GD_rand_range);
+ mono_add_internal_call("Godot.GD::godot_icall_GD_rand_seed", (void *)godot_icall_GD_rand_seed);
mono_add_internal_call("Godot.GD::godot_icall_GD_seed", (void *)godot_icall_GD_seed);
mono_add_internal_call("Godot.GD::godot_icall_GD_str", (void *)godot_icall_GD_str);
mono_add_internal_call("Godot.GD::godot_icall_GD_str2var", (void *)godot_icall_GD_str2var);
diff --git a/modules/mono/glue/gd_glue.h b/modules/mono/glue/gd_glue.h
index 00611fef12..ba75d85343 100644
--- a/modules/mono/glue/gd_glue.h
+++ b/modules/mono/glue/gd_glue.h
@@ -37,11 +37,11 @@
MonoObject *godot_icall_GD_bytes2var(MonoArray *p_bytes);
-MonoObject *godot_icall_GD_convert(MonoObject *p_what, int p_type);
+MonoObject *godot_icall_GD_convert(MonoObject *p_what, int32_t p_type);
int godot_icall_GD_hash(MonoObject *p_var);
-MonoObject *godot_icall_GD_instance_from_id(int p_instance_id);
+MonoObject *godot_icall_GD_instance_from_id(uint64_t p_instance_id);
void godot_icall_GD_print(MonoArray *p_what);
@@ -53,7 +53,17 @@ void godot_icall_GD_prints(MonoArray *p_what);
void godot_icall_GD_printt(MonoArray *p_what);
-void godot_icall_GD_seed(int p_seed);
+double godot_icall_GD_randf();
+
+uint32_t godot_icall_GD_randi();
+
+void godot_icall_GD_randomize();
+
+double godot_icall_GD_rand_range(double from, double to);
+
+uint32_t godot_icall_GD_rand_seed(uint64_t seed, uint64_t *newSeed);
+
+void godot_icall_GD_seed(uint64_t p_seed);
MonoString *godot_icall_GD_str(MonoArray *p_what);
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index 3943c0c7d7..09a1fc6fbc 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -99,7 +99,6 @@ public:
String sln_filepath;
String csproj_filepath;
- String data_mono_bin_dir;
String data_editor_tools_dir;
String data_editor_prebuilt_api_dir;
#endif
@@ -107,6 +106,10 @@ public:
String data_mono_etc_dir;
String data_mono_lib_dir;
+#ifdef WINDOWS_ENABLED
+ String data_mono_bin_dir;
+#endif
+
private:
_GodotSharpDirs() {
res_data_dir = "res://.mono";
@@ -146,10 +149,13 @@ private:
data_editor_prebuilt_api_dir = data_dir_root.plus_file("Api");
String data_mono_root_dir = data_dir_root.plus_file("Mono");
- data_mono_bin_dir = data_mono_root_dir.plus_file("bin");
data_mono_etc_dir = data_mono_root_dir.plus_file("etc");
data_mono_lib_dir = data_mono_root_dir.plus_file("lib");
+#ifdef WINDOWS_ENABLED
+ data_mono_bin_dir = data_mono_root_dir.plus_file("bin");
+#endif
+
#ifdef OSX_ENABLED
if (!DirAccess::exists(data_editor_tools_dir)) {
data_editor_tools_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Tools");
@@ -160,7 +166,6 @@ private:
}
if (!DirAccess::exists(data_mono_root_dir)) {
- data_mono_bin_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Mono/bin");
data_mono_etc_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/etc");
data_mono_lib_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Mono/lib");
}
@@ -178,6 +183,10 @@ private:
data_mono_etc_dir = data_mono_root_dir.plus_file("etc");
data_mono_lib_dir = data_mono_root_dir.plus_file("lib");
+#ifdef WINDOWS_ENABLED
+ data_mono_bin_dir = data_mono_root_dir.plus_file("bin");
+#endif
+
#ifdef OSX_ENABLED
if (!DirAccess::exists(data_mono_root_dir)) {
data_mono_etc_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/etc");
@@ -251,10 +260,6 @@ String get_project_csproj_path() {
return _GodotSharpDirs::get_singleton().csproj_filepath;
}
-String get_data_mono_bin_dir() {
- return _GodotSharpDirs::get_singleton().data_mono_bin_dir;
-}
-
String get_data_editor_tools_dir() {
return _GodotSharpDirs::get_singleton().data_editor_tools_dir;
}
@@ -272,4 +277,10 @@ String get_data_mono_lib_dir() {
return _GodotSharpDirs::get_singleton().data_mono_lib_dir;
}
+#ifdef WINDOWS_ENABLED
+String get_data_mono_bin_dir() {
+ return _GodotSharpDirs::get_singleton().data_mono_bin_dir;
+}
+#endif
+
} // namespace GodotSharpDirs
diff --git a/modules/mono/godotsharp_dirs.h b/modules/mono/godotsharp_dirs.h
index a038e6486c..556df959e2 100644
--- a/modules/mono/godotsharp_dirs.h
+++ b/modules/mono/godotsharp_dirs.h
@@ -53,7 +53,6 @@ String get_build_logs_dir();
String get_project_sln_path();
String get_project_csproj_path();
-String get_data_mono_bin_dir();
String get_data_editor_tools_dir();
String get_data_editor_prebuilt_api_dir();
#endif
@@ -61,6 +60,10 @@ String get_data_editor_prebuilt_api_dir();
String get_data_mono_etc_dir();
String get_data_mono_lib_dir();
+#ifdef WINDOWS_ENABLED
+String get_data_mono_bin_dir();
+#endif
+
} // namespace GodotSharpDirs
#endif // GODOTSHARP_DIRS_H
diff --git a/modules/mono/mono_gc_handle.cpp b/modules/mono/mono_gc_handle.cpp
index b6c9b5f7dd..a9e2136a19 100644
--- a/modules/mono/mono_gc_handle.cpp
+++ b/modules/mono/mono_gc_handle.cpp
@@ -65,7 +65,7 @@ Ref<MonoGCHandle> MonoGCHandle::create_weak(MonoObject *p_object) {
void MonoGCHandle::release() {
#ifdef DEBUG_ENABLED
- CRASH_COND(GDMono::get_singleton() == NULL);
+ CRASH_COND(!released && GDMono::get_singleton() == NULL);
#endif
if (!released && GDMono::get_singleton()->is_runtime_initialized()) {
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 900caefe1c..bba7df2c6a 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -34,6 +34,7 @@
#include <mono/metadata/mono-config.h>
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/mono-gc.h>
+#include <mono/metadata/profiler.h>
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
@@ -54,16 +55,9 @@
#include "main/main.h"
#endif
-#ifdef MONO_PRINT_HANDLER_ENABLED
-void gdmono_MonoPrintCallback(const char *string, mono_bool is_stdout) {
-
- if (is_stdout) {
- OS::get_singleton()->print(string);
- } else {
- OS::get_singleton()->printerr(string);
- }
-}
-#endif
+#define OUT_OF_SYNC_ERR_MESSAGE(m_assembly_name) "The assembly '" m_assembly_name "' is out of sync. " \
+ "This error is expected if you just upgraded to a newer Godot version. " \
+ "Building the project will update the assembly to the correct version."
GDMono *GDMono::singleton = NULL;
@@ -90,6 +84,14 @@ void setup_runtime_main_args() {
mono_runtime_set_main_args(main_args.size(), main_args.ptrw());
}
+void gdmono_profiler_init() {
+ String profiler_args = GLOBAL_DEF("mono/profiler/args", "log:calls,alloc,sample,output=output.mlpd");
+ bool profiler_enabled = GLOBAL_DEF("mono/profiler/enabled", false);
+ if (profiler_enabled) {
+ mono_profiler_load(profiler_args.utf8());
+ }
+}
+
#ifdef DEBUG_ENABLED
static bool _wait_for_debugger_msecs(uint32_t p_msecs) {
@@ -102,7 +104,7 @@ static bool _wait_for_debugger_msecs(uint32_t p_msecs) {
OS::get_singleton()->delay_usec((p_msecs < 25 ? p_msecs : 25) * 1000);
- int tdiff = OS::get_singleton()->get_ticks_msec() - last_tick;
+ uint32_t tdiff = OS::get_singleton()->get_ticks_msec() - last_tick;
if (tdiff > p_msecs) {
p_msecs = 0;
@@ -132,7 +134,7 @@ void gdmono_debug_init() {
CharString da_args = OS::get_singleton()->get_environment("GODOT_MONO_DEBUGGER_AGENT").utf8();
- if (da_args == "") {
+ if (da_args.length() == 0) {
da_args = String("--debugger-agent=transport=dt_socket,address=127.0.0.1:" + itos(da_port) +
",embedding=1,server=y,suspend=" + (da_suspend ? "y,timeout=" + itos(da_timeout) : "n"))
.utf8();
@@ -150,6 +152,50 @@ void gdmono_debug_init() {
} // namespace
+void GDMono::add_mono_shared_libs_dir_to_path() {
+ // By default Mono seems to search shared libraries in the following directories:
+ // Current working directory, @executable_path@ and PATH
+ // The parent directory of the image file (assembly where the dllimport method is declared)
+ // @executable_path@/../lib
+ // @executable_path@/../Libraries (__MACH__ only)
+
+ // This does not work when embedding Mono unless we use the same directory structure.
+ // To fix this we append the directory containing our shared libraries to PATH.
+
+#if defined(WINDOWS_ENABLED) || defined(UNIX_ENABLED)
+ String path_var("PATH");
+ String path_value = OS::get_singleton()->get_environment(path_var);
+
+#ifdef WINDOWS_ENABLED
+ path_value += ';';
+
+ String bundled_bin_dir = GodotSharpDirs::get_data_mono_bin_dir();
+#ifdef TOOLS_ENABLED
+ if (DirAccess::exists(bundled_bin_dir)) {
+ path_value += bundled_bin_dir;
+ } else {
+ path_value += mono_reg_info.bin_dir;
+ }
+#else
+ if (DirAccess::exists(bundled_bin_dir))
+ path_value += bundled_bin_dir;
+#endif // TOOLS_ENABLED
+
+#else
+ path_value += ':';
+
+ String bundled_lib_dir = GodotSharpDirs::get_data_mono_lib_dir();
+ if (DirAccess::exists(bundled_lib_dir)) {
+ path_value += bundled_lib_dir;
+ } else {
+ // TODO: Do we need to add the lib dir when using the system installed Mono on Unix platforms?
+ }
+#endif // WINDOWS_ENABLED
+
+ OS::get_singleton()->set_environment(path_var, path_value);
+#endif // WINDOWS_ENABLED || UNIX_ENABLED
+}
+
void GDMono::initialize() {
ERR_FAIL_NULL(Engine::get_singleton());
@@ -162,11 +208,6 @@ void GDMono::initialize() {
GDMonoLog::get_singleton()->initialize();
-#ifdef MONO_PRINT_HANDLER_ENABLED
- mono_trace_set_print_handler(gdmono_MonoPrintCallback);
- mono_trace_set_printerr_handler(gdmono_MonoPrintCallback);
-#endif
-
String assembly_rootdir;
String config_dir;
@@ -213,18 +254,32 @@ void GDMono::initialize() {
assembly_rootdir = bundled_assembly_rootdir;
config_dir = bundled_config_dir;
}
+
+#ifdef WINDOWS_ENABLED
+ if (assembly_rootdir.empty() || config_dir.empty()) {
+ // Assertion: if they are not set, then they weren't found in the registry
+ CRASH_COND(mono_reg_info.assembly_dir.length() > 0 || mono_reg_info.config_dir.length() > 0);
+
+ ERR_PRINT("Cannot find Mono in the registry");
+ }
+#endif // WINDOWS_ENABLED
+
#else
// These are always the directories in export templates
assembly_rootdir = bundled_assembly_rootdir;
config_dir = bundled_config_dir;
-#endif
+#endif // TOOLS_ENABLED
// Leak if we call mono_set_dirs more than once
mono_set_dirs(assembly_rootdir.length() ? assembly_rootdir.utf8().get_data() : NULL,
config_dir.length() ? config_dir.utf8().get_data() : NULL);
+ add_mono_shared_libs_dir_to_path();
+
GDMonoAssembly::initialize();
+ gdmono_profiler_init();
+
#ifdef DEBUG_ENABLED
gdmono_debug_init();
#endif
@@ -233,6 +288,29 @@ void GDMono::initialize() {
mono_install_unhandled_exception_hook(&unhandled_exception_hook, NULL);
+#ifndef TOOLS_ENABLED
+ if (!DirAccess::exists("res://.mono")) {
+ // 'res://.mono/' is missing so there is nothing to load. We don't need to initialize mono, but
+ // we still do so unless mscorlib is missing (which is the case for projects that don't use C#).
+
+ String mscorlib_fname("mscorlib.dll");
+
+ Vector<String> search_dirs;
+ GDMonoAssembly::fill_search_dirs(search_dirs);
+
+ bool found = false;
+ for (int i = 0; i < search_dirs.size(); i++) {
+ if (FileAccess::exists(search_dirs[i].plus_file(mscorlib_fname))) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ return; // mscorlib is missing, do not initialize mono
+ }
+#endif
+
root_domain = mono_jit_init_version("GodotEngine.RootDomain", "v4.0.30319");
ERR_EXPLAIN("Mono: Failed to initialize runtime");
@@ -290,15 +368,15 @@ void GDMono::initialize() {
// metadata, so we invalidate the version in the metadata and unload the script domain.
if (core_api_assembly_out_of_sync) {
- ERR_PRINT("The loaded Core API assembly is out of sync");
+ ERR_PRINT(OUT_OF_SYNC_ERR_MESSAGE(CORE_API_ASSEMBLY_NAME));
metadata_set_api_assembly_invalidated(APIAssembly::API_CORE, true);
} else if (!GDMonoUtils::mono_cache.godot_api_cache_updated) {
- ERR_PRINT("The loaded Core API assembly is in sync, but the cache update failed");
+ ERR_PRINT("The loaded assembly '" CORE_API_ASSEMBLY_NAME "' is in sync, but the cache update failed");
metadata_set_api_assembly_invalidated(APIAssembly::API_CORE, true);
}
if (editor_api_assembly_out_of_sync) {
- ERR_PRINT("The loaded Editor API assembly is out of sync");
+ ERR_PRINT(OUT_OF_SYNC_ERR_MESSAGE(EDITOR_API_ASSEMBLY_NAME));
metadata_set_api_assembly_invalidated(APIAssembly::API_EDITOR, true);
}
@@ -327,7 +405,7 @@ namespace GodotSharpBindings {
uint64_t get_core_api_hash();
#ifdef TOOLS_ENABLED
uint64_t get_editor_api_hash();
-#endif // TOOLS_ENABLED
+#endif
uint32_t get_bindings_version();
void register_generated_icalls();
@@ -344,29 +422,20 @@ void GDMono::_register_internal_calls() {
#endif
}
-#ifdef DEBUG_METHODS_ENABLED
void GDMono::_initialize_and_check_api_hashes() {
- api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
-
#ifdef MONO_GLUE_ENABLED
- if (api_core_hash != GodotSharpBindings::get_core_api_hash()) {
+ if (get_api_core_hash() != GodotSharpBindings::get_core_api_hash()) {
ERR_PRINT("Mono: Core API hash mismatch!");
}
-#endif
#ifdef TOOLS_ENABLED
- api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
-
-#ifdef MONO_GLUE_ENABLED
- if (api_editor_hash != GodotSharpBindings::get_editor_api_hash()) {
+ if (get_api_editor_hash() != GodotSharpBindings::get_editor_api_hash()) {
ERR_PRINT("Mono: Editor API hash mismatch!");
}
-#endif
-
#endif // TOOLS_ENABLED
+#endif // MONO_GLUE_ENABLED
}
-#endif // DEBUG_METHODS_ENABLED
void GDMono::add_assembly(uint32_t p_domain_id, GDMonoAssembly *p_assembly) {
@@ -518,6 +587,8 @@ bool GDMono::_load_core_api_assembly() {
CS_GLUE_VERSION != api_assembly_ver.cs_glue_version;
if (!core_api_assembly_out_of_sync) {
GDMonoUtils::update_godot_api_cache();
+
+ _install_trace_listener();
}
#else
GDMonoUtils::update_godot_api_cache();
@@ -621,6 +692,23 @@ bool GDMono::_load_api_assemblies() {
return true;
}
+void GDMono::_install_trace_listener() {
+
+#ifdef DEBUG_ENABLED
+ // Install the trace listener now before the project assembly is loaded
+ typedef void (*DebuggingUtils_InstallTraceListener)(MonoObject **);
+ MonoException *exc = NULL;
+ GDMonoClass *debug_utils = core_api_assembly->get_class(BINDINGS_NAMESPACE, "DebuggingUtils");
+ DebuggingUtils_InstallTraceListener install_func =
+ (DebuggingUtils_InstallTraceListener)debug_utils->get_method_thunk("InstallTraceListener");
+ install_func((MonoObject **)&exc);
+ if (exc) {
+ ERR_PRINT("Failed to install System.Diagnostics.Trace listener");
+ GDMonoUtils::debug_print_unhandled_exception(exc);
+ }
+#endif
+}
+
#ifdef TOOLS_ENABLED
String GDMono::_get_api_assembly_metadata_path() {
@@ -710,8 +798,6 @@ Error GDMono::_unload_scripts_domain() {
if (mono_domain_get() != root_domain)
mono_domain_set(root_domain, true);
- mono_gc_collect(mono_gc_max_generation());
-
finalizing_scripts_domain = true;
if (!mono_domain_finalize(scripts_domain, 2000)) {
@@ -779,6 +865,8 @@ Error GDMono::reload_scripts_domain() {
}
}
+ CSharpLanguage::get_singleton()->_uninitialize_script_bindings();
+
Error err = _load_scripts_domain();
if (err != OK) {
ERR_PRINT("Mono: Failed to load scripts domain");
@@ -798,7 +886,7 @@ Error GDMono::reload_scripts_domain() {
// metadata, so we invalidate the version in the metadata and unload the script domain.
if (core_api_assembly_out_of_sync) {
- ERR_PRINT("The loaded Core API assembly is out of sync");
+ ERR_PRINT(OUT_OF_SYNC_ERR_MESSAGE(CORE_API_ASSEMBLY_NAME));
metadata_set_api_assembly_invalidated(APIAssembly::API_CORE, true);
} else if (!GDMonoUtils::mono_cache.godot_api_cache_updated) {
ERR_PRINT("The loaded Core API assembly is in sync, but the cache update failed");
@@ -806,11 +894,11 @@ Error GDMono::reload_scripts_domain() {
}
if (editor_api_assembly_out_of_sync) {
- ERR_PRINT("The loaded Editor API assembly is out of sync");
+ ERR_PRINT(OUT_OF_SYNC_ERR_MESSAGE(EDITOR_API_ASSEMBLY_NAME));
metadata_set_api_assembly_invalidated(APIAssembly::API_EDITOR, true);
}
- Error err = _unload_scripts_domain();
+ err = _unload_scripts_domain();
if (err != OK) {
WARN_PRINT("Mono: Failed to unload scripts domain");
}
@@ -847,14 +935,20 @@ Error GDMono::finalize_and_unload_domain(MonoDomain *p_domain) {
if (mono_domain_get() == p_domain)
mono_domain_set(root_domain, true);
- mono_gc_collect(mono_gc_max_generation());
if (!mono_domain_finalize(p_domain, 2000)) {
ERR_PRINT("Mono: Domain finalization timeout");
}
+
mono_gc_collect(mono_gc_max_generation());
_domain_assemblies_cleanup(mono_domain_get_id(p_domain));
+#ifdef TOOLS_ENABLED
+ if (p_domain == tools_domain) {
+ editor_tools_assembly = NULL;
+ }
+#endif
+
MonoException *exc = NULL;
mono_domain_try_unload(p_domain, (MonoObject **)&exc);
@@ -915,7 +1009,7 @@ void GDMono::unhandled_exception_hook(MonoObject *p_exc, void *) {
ScriptDebugger::get_singleton()->idle_poll();
#endif
abort();
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
GDMono::GDMono() {
@@ -946,23 +1040,29 @@ GDMono::GDMono() {
editor_tools_assembly = NULL;
#endif
-#ifdef DEBUG_METHODS_ENABLED
api_core_hash = 0;
#ifdef TOOLS_ENABLED
api_editor_hash = 0;
#endif
-#endif
}
GDMono::~GDMono() {
if (is_runtime_initialized()) {
- if (scripts_domain) {
+#ifdef TOOLS_ENABLED
+ if (tools_domain) {
+ Error err = finalize_and_unload_domain(tools_domain);
+ if (err != OK) {
+ ERR_PRINT("Mono: Failed to unload tools domain");
+ }
+ }
+#endif
+ if (scripts_domain) {
Error err = _unload_scripts_domain();
if (err != OK) {
- WARN_PRINT("Mono: Failed to unload scripts domain");
+ ERR_PRINT("Mono: Failed to unload scripts domain");
}
}
@@ -983,6 +1083,8 @@ GDMono::~GDMono() {
mono_jit_cleanup(root_domain);
+ print_verbose("Mono: Finalized");
+
runtime_initialized = false;
}
@@ -1074,17 +1176,9 @@ void _GodotSharp::_bind_methods() {
_GodotSharp::_GodotSharp() {
singleton = this;
- queue_empty = true;
-#ifndef NO_THREADS
- queue_mutex = Mutex::create();
-#endif
}
_GodotSharp::~_GodotSharp() {
singleton = NULL;
-
- if (queue_mutex) {
- memdelete(queue_mutex);
- }
}
diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h
index 13de3061b3..216c96a612 100644
--- a/modules/mono/mono_gd/gd_mono.h
+++ b/modules/mono/mono_gd/gd_mono.h
@@ -125,6 +125,8 @@ class GDMono {
String _get_api_assembly_metadata_path();
#endif
+ void _install_trace_listener();
+
void _register_internal_calls();
Error _load_scripts_domain();
@@ -134,13 +136,11 @@ class GDMono {
Error _load_tools_domain();
#endif
-#ifdef DEBUG_METHODS_ENABLED
uint64_t api_core_hash;
#ifdef TOOLS_ENABLED
uint64_t api_editor_hash;
#endif
void _initialize_and_check_api_hashes();
-#endif
GDMonoLog *gdmono_log;
@@ -148,15 +148,23 @@ class GDMono {
MonoRegInfo mono_reg_info;
#endif
+ void add_mono_shared_libs_dir_to_path();
+
protected:
static GDMono *singleton;
public:
-#ifdef DEBUG_METHODS_ENABLED
- uint64_t get_api_core_hash() { return api_core_hash; }
+ uint64_t get_api_core_hash() {
+ if (api_core_hash == 0)
+ api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
+ return api_core_hash;
+ }
#ifdef TOOLS_ENABLED
- uint64_t get_api_editor_hash() { return api_editor_hash; }
-#endif
+ uint64_t get_api_editor_hash() {
+ if (api_editor_hash == 0)
+ api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
+ return api_editor_hash;
+ }
#endif
#ifdef TOOLS_ENABLED
@@ -268,12 +276,6 @@ class _GodotSharp : public Object {
List<NodePath *> np_delete_queue;
List<RID *> rid_delete_queue;
- bool queue_empty;
-
-#ifndef NO_THREADS
- Mutex *queue_mutex;
-#endif
-
protected:
static _GodotSharp *singleton;
static void _bind_methods();
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index 85273bfdb4..8fec28b186 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -50,7 +50,7 @@ void GDMonoAssembly::fill_search_dirs(Vector<String> &r_search_dirs, const Strin
const char *rootdir = mono_assembly_getrootdir();
if (rootdir) {
- String framework_dir = String(rootdir).plus_file("mono").plus_file("4.5");
+ String framework_dir = String::utf8(rootdir).plus_file("mono").plus_file("4.5");
r_search_dirs.push_back(framework_dir);
r_search_dirs.push_back(framework_dir.plus_file("Facades"));
}
@@ -277,6 +277,7 @@ Error GDMonoAssembly::load(bool p_refonly) {
ERR_FAIL_NULL_V(image, ERR_FILE_CANT_OPEN);
#ifdef DEBUG_ENABLED
+ Vector<uint8_t> pdb_data;
String pdb_path(path + ".pdb");
if (!FileAccess::exists(pdb_path)) {
@@ -286,8 +287,9 @@ Error GDMonoAssembly::load(bool p_refonly) {
goto no_pdb;
}
- pdb_data.clear();
pdb_data = FileAccess::get_file_as_array(pdb_path);
+
+ // mono_debug_close_image doesn't seem to be needed
mono_debug_open_image_from_memory(image, &pdb_data[0], pdb_data.size());
no_pdb:
@@ -306,6 +308,9 @@ no_pdb:
ERR_FAIL_COND_V(status != MONO_IMAGE_OK || assembly == NULL, ERR_FILE_CANT_OPEN);
+ // Decrement refcount which was previously incremented by mono_image_open_from_data_with_name
+ mono_image_close(image);
+
loaded = true;
modified_time = last_modified_time;
@@ -321,8 +326,6 @@ Error GDMonoAssembly::wrapper_for_image(MonoImage *p_image) {
image = p_image;
- mono_image_addref(image);
-
loaded = true;
return OK;
@@ -332,13 +335,6 @@ void GDMonoAssembly::unload() {
ERR_FAIL_COND(!loaded);
-#ifdef DEBUG_ENABLED
- if (pdb_data.size()) {
- mono_debug_close_image(image);
- pdb_data.clear();
- }
-#endif
-
for (Map<MonoClass *, GDMonoClass *>::Element *E = cached_raw.front(); E; E = E->next()) {
memdelete(E->value());
}
@@ -346,8 +342,6 @@ void GDMonoAssembly::unload() {
cached_classes.clear();
cached_raw.clear();
- mono_image_close(image);
-
assembly = NULL;
image = NULL;
loaded = false;
diff --git a/modules/mono/mono_gd/gd_mono_assembly.h b/modules/mono/mono_gd/gd_mono_assembly.h
index 8f47ee26f8..32432af37d 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.h
+++ b/modules/mono/mono_gd/gd_mono_assembly.h
@@ -84,10 +84,6 @@ class GDMonoAssembly {
bool gdobject_class_cache_updated;
Map<StringName, GDMonoClass *> gdobject_class_cache;
-#ifdef DEBUG_ENABLED
- Vector<uint8_t> pdb_data;
-#endif
-
static bool no_search;
static bool in_preload;
static Vector<String> search_dirs;
diff --git a/modules/mono/mono_gd/gd_mono_class.cpp b/modules/mono/mono_gd/gd_mono_class.cpp
index bf2a84c708..92324d73f9 100644
--- a/modules/mono/mono_gd/gd_mono_class.cpp
+++ b/modules/mono/mono_gd/gd_mono_class.cpp
@@ -59,8 +59,16 @@ MonoType *GDMonoClass::get_mono_type() {
return get_mono_type(mono_class);
}
-bool GDMonoClass::is_assignable_from(GDMonoClass *p_from) const {
+uint32_t GDMonoClass::get_flags() const {
+ return mono_class_get_flags(mono_class);
+}
+bool GDMonoClass::is_static() const {
+ uint32_t static_class_flags = MONO_TYPE_ATTR_ABSTRACT | MONO_TYPE_ATTR_SEALED;
+ return (get_flags() & static_class_flags) == static_class_flags;
+}
+
+bool GDMonoClass::is_assignable_from(GDMonoClass *p_from) const {
return mono_class_is_assignable_from(mono_class, p_from->mono_class);
}
diff --git a/modules/mono/mono_gd/gd_mono_class.h b/modules/mono/mono_gd/gd_mono_class.h
index 08718ec1a4..4af909450e 100644
--- a/modules/mono/mono_gd/gd_mono_class.h
+++ b/modules/mono/mono_gd/gd_mono_class.h
@@ -109,6 +109,9 @@ public:
String get_full_name() const;
MonoType *get_mono_type();
+ uint32_t get_flags() const;
+ bool is_static() const;
+
bool is_assignable_from(GDMonoClass *p_from) const;
_FORCE_INLINE_ StringName get_namespace() const { return namespace_name; }
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index a9d993412e..5e9d4db122 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -49,7 +49,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
#define SET_FROM_ARRAY(m_type) \
{ \
MonoArray *managed = GDMonoMarshal::m_type##_to_mono_array(p_value.operator ::m_type()); \
- mono_field_set_value(p_object, mono_field, &managed); \
+ mono_field_set_value(p_object, mono_field, managed); \
}
switch (type.type_encoding) {
@@ -505,20 +505,20 @@ bool GDMonoField::is_static() {
return mono_field_get_flags(mono_field) & MONO_FIELD_ATTR_STATIC;
}
-GDMonoClassMember::Visibility GDMonoField::get_visibility() {
+IMonoClassMember::Visibility GDMonoField::get_visibility() {
switch (mono_field_get_flags(mono_field) & MONO_FIELD_ATTR_FIELD_ACCESS_MASK) {
case MONO_FIELD_ATTR_PRIVATE:
- return GDMonoClassMember::PRIVATE;
+ return IMonoClassMember::PRIVATE;
case MONO_FIELD_ATTR_FAM_AND_ASSEM:
- return GDMonoClassMember::PROTECTED_AND_INTERNAL;
+ return IMonoClassMember::PROTECTED_AND_INTERNAL;
case MONO_FIELD_ATTR_ASSEMBLY:
- return GDMonoClassMember::INTERNAL;
+ return IMonoClassMember::INTERNAL;
case MONO_FIELD_ATTR_FAMILY:
- return GDMonoClassMember::PROTECTED;
+ return IMonoClassMember::PROTECTED;
case MONO_FIELD_ATTR_PUBLIC:
- return GDMonoClassMember::PUBLIC;
+ return IMonoClassMember::PUBLIC;
default:
- ERR_FAIL_V(GDMonoClassMember::PRIVATE);
+ ERR_FAIL_V(IMonoClassMember::PRIVATE);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_field.h b/modules/mono/mono_gd/gd_mono_field.h
index 319e895ab9..e348583370 100644
--- a/modules/mono/mono_gd/gd_mono_field.h
+++ b/modules/mono/mono_gd/gd_mono_field.h
@@ -32,10 +32,10 @@
#define GDMONOFIELD_H
#include "gd_mono.h"
-#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
+#include "i_mono_class_member.h"
-class GDMonoField : public GDMonoClassMember {
+class GDMonoField : public IMonoClassMember {
GDMonoClass *owner;
MonoClassField *mono_field;
@@ -47,15 +47,15 @@ class GDMonoField : public GDMonoClassMember {
MonoCustomAttrInfo *attributes;
public:
- virtual MemberType get_member_type() { return MEMBER_TYPE_FIELD; }
+ virtual MemberType get_member_type() GD_FINAL { return MEMBER_TYPE_FIELD; }
- virtual StringName get_name() { return name; }
+ virtual StringName get_name() GD_FINAL { return name; }
- virtual bool is_static();
- virtual Visibility get_visibility();
+ virtual bool is_static() GD_FINAL;
+ virtual Visibility get_visibility() GD_FINAL;
- virtual bool has_attribute(GDMonoClass *p_attr_class);
- virtual MonoObject *get_attribute(GDMonoClass *p_attr_class);
+ virtual bool has_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) GD_FINAL;
void fetch_attributes();
_FORCE_INLINE_ ManagedType get_type() const { return type; }
diff --git a/modules/mono/mono_gd/gd_mono_header.h b/modules/mono/mono_gd/gd_mono_header.h
index 23306d11b9..dd8c047386 100644
--- a/modules/mono/mono_gd/gd_mono_header.h
+++ b/modules/mono/mono_gd/gd_mono_header.h
@@ -35,7 +35,7 @@
class GDMonoAssembly;
class GDMonoClass;
-class GDMonoClassMember;
+class IMonoClassMember;
class GDMonoField;
class GDMonoProperty;
class GDMonoMethod;
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index 0574b0025d..c8cba5cf1b 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -34,6 +34,8 @@
#include "../mono_gc_handle.h"
#include "../utils/macros.h"
#include "../utils/thread_local.h"
+#include "gd_mono_class.h"
+#include "gd_mono_marshal.h"
#include "gd_mono_utils.h"
#include <mono/metadata/exception.h>
@@ -55,10 +57,48 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
CRASH_COND(!klass);
- Ref<MonoGCHandle> gchandle = ref ? MonoGCHandle::create_weak(managed) :
- MonoGCHandle::create_strong(managed);
+ GDMonoClass *native = GDMonoUtils::get_class_native_base(klass);
- Ref<CSharpScript> script = CSharpScript::create_for_managed_type(klass);
+ CRASH_COND(native == NULL);
+
+ if (native == klass) {
+ // If it's just a wrapper Godot class and not a custom inheriting class, then attach a
+ // script binding instead. One of the advantages of this is that if a script is attached
+ // later and it's not a C# script, then the managed object won't have to be disposed.
+ // Another reason for doing this is that this instance could outlive CSharpLanguage, which would
+ // be problematic when using a script. See: https://github.com/godotengine/godot/issues/25621
+
+ CSharpScriptBinding script_binding;
+
+ script_binding.inited = true;
+ script_binding.type_name = NATIVE_GDMONOCLASS_NAME(klass);
+ script_binding.wrapper_class = klass;
+ script_binding.gchandle = MonoGCHandle::create_strong(managed);
+
+ Reference *kref = Object::cast_to<Reference>(unmanaged);
+ if (kref) {
+ // Unsafe refcount increment. The managed instance also counts as a reference.
+ // This way if the unmanaged world has no references to our owner
+ // but the managed instance is alive, the refcount will be 1 instead of 0.
+ // See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
+
+ kref->reference();
+ }
+
+ // The object was just created, no script instance binding should have been attached
+ CRASH_COND(unmanaged->has_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index()));
+
+ void *data = (void *)CSharpLanguage::get_singleton()->insert_script_binding(unmanaged, script_binding);
+
+ // Should be thread safe because the object was just created and nothing else should be referencing it
+ unmanaged->set_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index(), data);
+
+ return;
+ }
+
+ Ref<MonoGCHandle> gchandle = ref ? MonoGCHandle::create_weak(managed) : MonoGCHandle::create_strong(managed);
+
+ Ref<CSharpScript> script = CSharpScript::create_for_managed_type(klass, native);
CRASH_COND(script.is_null());
@@ -72,7 +112,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
void unhandled_exception(MonoException *p_exc) {
mono_unhandled_exception((MonoObject *)p_exc); // prints the exception as well
abort();
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
} // namespace GDMonoInternals
diff --git a/modules/mono/mono_gd/gd_mono_internals.h b/modules/mono/mono_gd/gd_mono_internals.h
index 09cb59ee6b..2d77bde27c 100644
--- a/modules/mono/mono_gd/gd_mono_internals.h
+++ b/modules/mono/mono_gd/gd_mono_internals.h
@@ -45,7 +45,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged);
* Do not call this function directly.
* Use GDMonoUtils::debug_unhandled_exception(MonoException *) instead.
*/
-_NO_RETURN_ void unhandled_exception(MonoException *p_exc);
+GD_NORETURN void unhandled_exception(MonoException *p_exc);
} // namespace GDMonoInternals
diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp
index fa4850ca8c..ec89df1959 100644
--- a/modules/mono/mono_gd/gd_mono_log.cpp
+++ b/modules/mono/mono_gd/gd_mono_log.cpp
@@ -52,7 +52,7 @@ static int log_level_get_id(const char *p_log_level) {
return -1;
}
-void gdmono_MonoLogCallback(const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data) {
+static void mono_log_callback(const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data) {
FileAccess *f = GDMonoLog::get_singleton()->get_log_file();
@@ -153,7 +153,7 @@ void GDMonoLog::initialize() {
if (log_file) {
print_verbose("Mono: Logfile is " + log_file_path);
- mono_trace_set_log_handler(gdmono_MonoLogCallback, this);
+ mono_trace_set_log_handler(mono_log_callback, this);
} else {
OS::get_singleton()->printerr("Mono: No log file, using default log handler\n");
}
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 74395de41c..7fe8ae608a 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -68,39 +68,39 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) {
} break;
case MONO_TYPE_VALUETYPE: {
- GDMonoClass *tclass = p_type.type_class;
+ GDMonoClass *vtclass = p_type.type_class;
- if (tclass == CACHED_CLASS(Vector2))
+ if (vtclass == CACHED_CLASS(Vector2))
return Variant::VECTOR2;
- if (tclass == CACHED_CLASS(Rect2))
+ if (vtclass == CACHED_CLASS(Rect2))
return Variant::RECT2;
- if (tclass == CACHED_CLASS(Transform2D))
+ if (vtclass == CACHED_CLASS(Transform2D))
return Variant::TRANSFORM2D;
- if (tclass == CACHED_CLASS(Vector3))
+ if (vtclass == CACHED_CLASS(Vector3))
return Variant::VECTOR3;
- if (tclass == CACHED_CLASS(Basis))
+ if (vtclass == CACHED_CLASS(Basis))
return Variant::BASIS;
- if (tclass == CACHED_CLASS(Quat))
+ if (vtclass == CACHED_CLASS(Quat))
return Variant::QUAT;
- if (tclass == CACHED_CLASS(Transform))
+ if (vtclass == CACHED_CLASS(Transform))
return Variant::TRANSFORM;
- if (tclass == CACHED_CLASS(AABB))
+ if (vtclass == CACHED_CLASS(AABB))
return Variant::AABB;
- if (tclass == CACHED_CLASS(Color))
+ if (vtclass == CACHED_CLASS(Color))
return Variant::COLOR;
- if (tclass == CACHED_CLASS(Plane))
+ if (vtclass == CACHED_CLASS(Plane))
return Variant::PLANE;
- if (mono_class_is_enum(tclass->get_mono_ptr()))
+ if (mono_class_is_enum(vtclass->get_mono_ptr()))
return Variant::INT;
} break;
@@ -294,60 +294,60 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
} break;
case MONO_TYPE_VALUETYPE: {
- GDMonoClass *tclass = p_type.type_class;
+ GDMonoClass *vtclass = p_type.type_class;
- if (tclass == CACHED_CLASS(Vector2)) {
+ if (vtclass == CACHED_CLASS(Vector2)) {
GDMonoMarshal::M_Vector2 from = MARSHALLED_OUT(Vector2, p_var->operator ::Vector2());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Vector2), &from);
}
- if (tclass == CACHED_CLASS(Rect2)) {
+ if (vtclass == CACHED_CLASS(Rect2)) {
GDMonoMarshal::M_Rect2 from = MARSHALLED_OUT(Rect2, p_var->operator ::Rect2());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Rect2), &from);
}
- if (tclass == CACHED_CLASS(Transform2D)) {
+ if (vtclass == CACHED_CLASS(Transform2D)) {
GDMonoMarshal::M_Transform2D from = MARSHALLED_OUT(Transform2D, p_var->operator ::Transform2D());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Transform2D), &from);
}
- if (tclass == CACHED_CLASS(Vector3)) {
+ if (vtclass == CACHED_CLASS(Vector3)) {
GDMonoMarshal::M_Vector3 from = MARSHALLED_OUT(Vector3, p_var->operator ::Vector3());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Vector3), &from);
}
- if (tclass == CACHED_CLASS(Basis)) {
+ if (vtclass == CACHED_CLASS(Basis)) {
GDMonoMarshal::M_Basis from = MARSHALLED_OUT(Basis, p_var->operator ::Basis());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Basis), &from);
}
- if (tclass == CACHED_CLASS(Quat)) {
+ if (vtclass == CACHED_CLASS(Quat)) {
GDMonoMarshal::M_Quat from = MARSHALLED_OUT(Quat, p_var->operator ::Quat());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Quat), &from);
}
- if (tclass == CACHED_CLASS(Transform)) {
+ if (vtclass == CACHED_CLASS(Transform)) {
GDMonoMarshal::M_Transform from = MARSHALLED_OUT(Transform, p_var->operator ::Transform());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Transform), &from);
}
- if (tclass == CACHED_CLASS(AABB)) {
+ if (vtclass == CACHED_CLASS(AABB)) {
GDMonoMarshal::M_AABB from = MARSHALLED_OUT(AABB, p_var->operator ::AABB());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(AABB), &from);
}
- if (tclass == CACHED_CLASS(Color)) {
+ if (vtclass == CACHED_CLASS(Color)) {
GDMonoMarshal::M_Color from = MARSHALLED_OUT(Color, p_var->operator ::Color());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Color), &from);
}
- if (tclass == CACHED_CLASS(Plane)) {
+ if (vtclass == CACHED_CLASS(Plane)) {
GDMonoMarshal::M_Plane from = MARSHALLED_OUT(Plane, p_var->operator ::Plane());
return mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(Plane), &from);
}
- if (mono_class_is_enum(tclass->get_mono_ptr())) {
- MonoType *enum_basetype = mono_class_enum_basetype(tclass->get_mono_ptr());
+ if (mono_class_is_enum(vtclass->get_mono_ptr())) {
+ MonoType *enum_basetype = mono_class_enum_basetype(vtclass->get_mono_ptr());
MonoClass *enum_baseclass = mono_class_from_mono_type(enum_basetype);
switch (mono_type_get_type(enum_basetype)) {
case MONO_TYPE_BOOLEAN: {
@@ -624,39 +624,39 @@ Variant mono_object_to_variant(MonoObject *p_obj) {
} break;
case MONO_TYPE_VALUETYPE: {
- GDMonoClass *tclass = type.type_class;
+ GDMonoClass *vtclass = type.type_class;
- if (tclass == CACHED_CLASS(Vector2))
+ if (vtclass == CACHED_CLASS(Vector2))
return MARSHALLED_IN(Vector2, (GDMonoMarshal::M_Vector2 *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Rect2))
+ if (vtclass == CACHED_CLASS(Rect2))
return MARSHALLED_IN(Rect2, (GDMonoMarshal::M_Rect2 *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Transform2D))
+ if (vtclass == CACHED_CLASS(Transform2D))
return MARSHALLED_IN(Transform2D, (GDMonoMarshal::M_Transform2D *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Vector3))
+ if (vtclass == CACHED_CLASS(Vector3))
return MARSHALLED_IN(Vector3, (GDMonoMarshal::M_Vector3 *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Basis))
+ if (vtclass == CACHED_CLASS(Basis))
return MARSHALLED_IN(Basis, (GDMonoMarshal::M_Basis *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Quat))
+ if (vtclass == CACHED_CLASS(Quat))
return MARSHALLED_IN(Quat, (GDMonoMarshal::M_Quat *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Transform))
+ if (vtclass == CACHED_CLASS(Transform))
return MARSHALLED_IN(Transform, (GDMonoMarshal::M_Transform *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(AABB))
+ if (vtclass == CACHED_CLASS(AABB))
return MARSHALLED_IN(AABB, (GDMonoMarshal::M_AABB *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Color))
+ if (vtclass == CACHED_CLASS(Color))
return MARSHALLED_IN(Color, (GDMonoMarshal::M_Color *)mono_object_unbox(p_obj));
- if (tclass == CACHED_CLASS(Plane))
+ if (vtclass == CACHED_CLASS(Plane))
return MARSHALLED_IN(Plane, (GDMonoMarshal::M_Plane *)mono_object_unbox(p_obj));
- if (mono_class_is_enum(tclass->get_mono_ptr()))
+ if (mono_class_is_enum(vtclass->get_mono_ptr()))
return unbox<int32_t>(p_obj);
} break;
@@ -698,7 +698,11 @@ Variant mono_object_to_variant(MonoObject *p_obj) {
// GodotObject
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
Object *ptr = unbox<Object *>(CACHED_FIELD(GodotObject, ptr)->get_value(p_obj));
- return ptr ? Variant(ptr) : Variant();
+ if (ptr != NULL) {
+ Reference *ref = Object::cast_to<Reference>(ptr);
+ return ref ? Variant(Ref<Reference>(ref)) : Variant(ptr);
+ }
+ return Variant();
}
if (CACHED_CLASS(NodePath) == type_class) {
@@ -736,7 +740,7 @@ Variant mono_object_to_variant(MonoObject *p_obj) {
UNLIKELY_UNHANDLED_EXCEPTION(exc);
if (is_dict) {
- MonoException *exc = NULL;
+ exc = NULL;
MonoObject *ret = type.type_class->get_method("GetPtr")->invoke(p_obj, &exc);
UNLIKELY_UNHANDLED_EXCEPTION(exc);
return *unbox<Dictionary *>(ret);
@@ -749,7 +753,7 @@ Variant mono_object_to_variant(MonoObject *p_obj) {
UNLIKELY_UNHANDLED_EXCEPTION(exc);
if (is_array) {
- MonoException *exc = NULL;
+ exc = NULL;
MonoObject *ret = type.type_class->get_method("GetPtr")->invoke(p_obj, &exc);
UNLIKELY_UNHANDLED_EXCEPTION(exc);
return *unbox<Array *>(ret);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 5e2deea43c..4f86e02f87 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -206,9 +206,10 @@ enum {
// In the future we may force this if we want to ref return these structs
#ifdef GD_MONO_FORCE_INTEROP_STRUCT_COPY
-// Sometimes clang-format can be an ass
-GD_STATIC_ASSERT(MATCHES_Vector2 &&MATCHES_Rect2 &&MATCHES_Transform2D &&MATCHES_Vector3 &&
- MATCHES_Basis &&MATCHES_Quat &&MATCHES_Transform &&MATCHES_AABB &&MATCHES_Color &&MATCHES_Plane);
+/* clang-format off */
+GD_STATIC_ASSERT(MATCHES_Vector2 && MATCHES_Rect2 && MATCHES_Transform2D && MATCHES_Vector3 &&
+ MATCHES_Basis && MATCHES_Quat && MATCHES_Transform && MATCHES_AABB && MATCHES_Color &&MATCHES_Plane);
+/* clang-format on */
#endif
} // namespace InteropLayout
diff --git a/modules/mono/mono_gd/gd_mono_method.cpp b/modules/mono/mono_gd/gd_mono_method.cpp
index 071d852ce7..7f11e4671d 100644
--- a/modules/mono/mono_gd/gd_mono_method.cpp
+++ b/modules/mono/mono_gd/gd_mono_method.cpp
@@ -78,20 +78,20 @@ bool GDMonoMethod::is_static() {
return mono_method_get_flags(mono_method, NULL) & MONO_METHOD_ATTR_STATIC;
}
-GDMonoClassMember::Visibility GDMonoMethod::get_visibility() {
+IMonoClassMember::Visibility GDMonoMethod::get_visibility() {
switch (mono_method_get_flags(mono_method, NULL) & MONO_METHOD_ATTR_ACCESS_MASK) {
case MONO_METHOD_ATTR_PRIVATE:
- return GDMonoClassMember::PRIVATE;
+ return IMonoClassMember::PRIVATE;
case MONO_METHOD_ATTR_FAM_AND_ASSEM:
- return GDMonoClassMember::PROTECTED_AND_INTERNAL;
+ return IMonoClassMember::PROTECTED_AND_INTERNAL;
case MONO_METHOD_ATTR_ASSEM:
- return GDMonoClassMember::INTERNAL;
+ return IMonoClassMember::INTERNAL;
case MONO_METHOD_ATTR_FAMILY:
- return GDMonoClassMember::PROTECTED;
+ return IMonoClassMember::PROTECTED;
case MONO_METHOD_ATTR_PUBLIC:
- return GDMonoClassMember::PUBLIC;
+ return IMonoClassMember::PUBLIC;
default:
- ERR_FAIL_V(GDMonoClassMember::PRIVATE);
+ ERR_FAIL_V(IMonoClassMember::PRIVATE);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_method.h b/modules/mono/mono_gd/gd_mono_method.h
index c4a994177e..f74cef438d 100644
--- a/modules/mono/mono_gd/gd_mono_method.h
+++ b/modules/mono/mono_gd/gd_mono_method.h
@@ -32,10 +32,10 @@
#define GD_MONO_METHOD_H
#include "gd_mono.h"
-#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
+#include "i_mono_class_member.h"
-class GDMonoMethod : public GDMonoClassMember {
+class GDMonoMethod : public IMonoClassMember {
StringName name;
@@ -57,17 +57,17 @@ class GDMonoMethod : public GDMonoClassMember {
MonoMethod *mono_method;
public:
- virtual MemberType get_member_type() { return MEMBER_TYPE_METHOD; }
+ virtual MemberType get_member_type() GD_FINAL { return MEMBER_TYPE_METHOD; }
- virtual StringName get_name() { return name; }
+ virtual StringName get_name() GD_FINAL { return name; }
- virtual bool is_static();
+ virtual bool is_static() GD_FINAL;
- virtual Visibility get_visibility();
+ virtual Visibility get_visibility() GD_FINAL;
- virtual bool has_attribute(GDMonoClass *p_attr_class);
- virtual MonoObject *get_attribute(GDMonoClass *p_attr_class);
- virtual void fetch_attributes();
+ virtual bool has_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ void fetch_attributes();
_FORCE_INLINE_ int get_parameters_count() { return params_count; }
_FORCE_INLINE_ ManagedType get_return_type() { return return_type; }
diff --git a/modules/mono/mono_gd/gd_mono_property.cpp b/modules/mono/mono_gd/gd_mono_property.cpp
index 04fd8b8e63..5842e26241 100644
--- a/modules/mono/mono_gd/gd_mono_property.cpp
+++ b/modules/mono/mono_gd/gd_mono_property.cpp
@@ -80,24 +80,24 @@ bool GDMonoProperty::is_static() {
return mono_method_get_flags(prop_method, NULL) & MONO_METHOD_ATTR_STATIC;
}
-GDMonoClassMember::Visibility GDMonoProperty::get_visibility() {
+IMonoClassMember::Visibility GDMonoProperty::get_visibility() {
MonoMethod *prop_method = mono_property_get_get_method(mono_property);
if (prop_method == NULL)
prop_method = mono_property_get_set_method(mono_property);
switch (mono_method_get_flags(prop_method, NULL) & MONO_METHOD_ATTR_ACCESS_MASK) {
case MONO_METHOD_ATTR_PRIVATE:
- return GDMonoClassMember::PRIVATE;
+ return IMonoClassMember::PRIVATE;
case MONO_METHOD_ATTR_FAM_AND_ASSEM:
- return GDMonoClassMember::PROTECTED_AND_INTERNAL;
+ return IMonoClassMember::PROTECTED_AND_INTERNAL;
case MONO_METHOD_ATTR_ASSEM:
- return GDMonoClassMember::INTERNAL;
+ return IMonoClassMember::INTERNAL;
case MONO_METHOD_ATTR_FAMILY:
- return GDMonoClassMember::PROTECTED;
+ return IMonoClassMember::PROTECTED;
case MONO_METHOD_ATTR_PUBLIC:
- return GDMonoClassMember::PUBLIC;
+ return IMonoClassMember::PUBLIC;
default:
- ERR_FAIL_V(GDMonoClassMember::PRIVATE);
+ ERR_FAIL_V(IMonoClassMember::PRIVATE);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_property.h b/modules/mono/mono_gd/gd_mono_property.h
index 934ce68904..2700c460b0 100644
--- a/modules/mono/mono_gd/gd_mono_property.h
+++ b/modules/mono/mono_gd/gd_mono_property.h
@@ -32,10 +32,10 @@
#define GD_MONO_PROPERTY_H
#include "gd_mono.h"
-#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
+#include "i_mono_class_member.h"
-class GDMonoProperty : public GDMonoClassMember {
+class GDMonoProperty : public IMonoClassMember {
GDMonoClass *owner;
MonoProperty *mono_property;
@@ -47,15 +47,15 @@ class GDMonoProperty : public GDMonoClassMember {
MonoCustomAttrInfo *attributes;
public:
- virtual MemberType get_member_type() { return MEMBER_TYPE_PROPERTY; }
+ virtual MemberType get_member_type() GD_FINAL { return MEMBER_TYPE_PROPERTY; }
- virtual StringName get_name() { return name; }
+ virtual StringName get_name() GD_FINAL { return name; }
- virtual bool is_static();
- virtual Visibility get_visibility();
+ virtual bool is_static() GD_FINAL;
+ virtual Visibility get_visibility() GD_FINAL;
- virtual bool has_attribute(GDMonoClass *p_attr_class);
- virtual MonoObject *get_attribute(GDMonoClass *p_attr_class);
+ virtual bool has_attribute(GDMonoClass *p_attr_class) GD_FINAL;
+ virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) GD_FINAL;
void fetch_attributes();
bool has_getter();
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 97a00a504d..6cc1c8afc2 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -39,6 +39,7 @@
#include "../csharp_script.h"
#include "../utils/macros.h"
+#include "../utils/mutex_utils.h"
#include "gd_mono.h"
#include "gd_mono_class.h"
#include "gd_mono_marshal.h"
@@ -265,61 +266,72 @@ void clear_cache() {
}
MonoObject *unmanaged_get_managed(Object *unmanaged) {
- if (unmanaged) {
- if (unmanaged->get_script_instance()) {
- CSharpInstance *cs_instance = CAST_CSHARP_INSTANCE(unmanaged->get_script_instance());
- if (cs_instance) {
- return cs_instance->get_mono_object();
- }
+ if (!unmanaged)
+ return NULL;
+
+ if (unmanaged->get_script_instance()) {
+ CSharpInstance *cs_instance = CAST_CSHARP_INSTANCE(unmanaged->get_script_instance());
+
+ if (cs_instance) {
+ return cs_instance->get_mono_object();
}
+ }
+
+ // If the owner does not have a CSharpInstance...
- // If the owner does not have a CSharpInstance...
+ void *data = unmanaged->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
- void *data = unmanaged->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
+ ERR_FAIL_NULL_V(data, NULL);
- if (data) {
- CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->value();
+ CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->value();
+
+ if (!script_binding.inited) {
+ SCOPED_MUTEX_LOCK(CSharpLanguage::get_singleton()->get_language_bind_mutex());
+
+ if (!script_binding.inited) { // Other thread may have set it up
+ // Already had a binding that needs to be setup
+ CSharpLanguage::get_singleton()->setup_csharp_script_binding(script_binding, unmanaged);
+
+ ERR_FAIL_COND_V(!script_binding.inited, NULL);
+ }
+ }
- Ref<MonoGCHandle> &gchandle = script_binding.gchandle;
- ERR_FAIL_COND_V(gchandle.is_null(), NULL);
+ Ref<MonoGCHandle> &gchandle = script_binding.gchandle;
+ ERR_FAIL_COND_V(gchandle.is_null(), NULL);
- MonoObject *target = gchandle->get_target();
+ MonoObject *target = gchandle->get_target();
- if (target)
- return target;
+ if (target)
+ return target;
- CSharpLanguage::get_singleton()->release_script_gchandle(gchandle);
+ CSharpLanguage::get_singleton()->release_script_gchandle(gchandle);
- // Create a new one
+ // Create a new one
#ifdef DEBUG_ENABLED
- CRASH_COND(script_binding.type_name == StringName());
- CRASH_COND(script_binding.wrapper_class == NULL);
+ CRASH_COND(script_binding.type_name == StringName());
+ CRASH_COND(script_binding.wrapper_class == NULL);
#endif
- MonoObject *mono_object = GDMonoUtils::create_managed_for_godot_object(script_binding.wrapper_class, script_binding.type_name, unmanaged);
- ERR_FAIL_NULL_V(mono_object, NULL);
+ MonoObject *mono_object = GDMonoUtils::create_managed_for_godot_object(script_binding.wrapper_class, script_binding.type_name, unmanaged);
+ ERR_FAIL_NULL_V(mono_object, NULL);
- gchandle->set_handle(MonoGCHandle::new_strong_handle(mono_object), MonoGCHandle::STRONG_HANDLE);
+ gchandle->set_handle(MonoGCHandle::new_strong_handle(mono_object), MonoGCHandle::STRONG_HANDLE);
- // Tie managed to unmanaged
- Reference *ref = Object::cast_to<Reference>(unmanaged);
+ // Tie managed to unmanaged
+ Reference *ref = Object::cast_to<Reference>(unmanaged);
- if (ref) {
- // Unsafe refcount increment. The managed instance also counts as a reference.
- // This way if the unmanaged world has no references to our owner
- // but the managed instance is alive, the refcount will be 1 instead of 0.
- // See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
+ if (ref) {
+ // Unsafe refcount increment. The managed instance also counts as a reference.
+ // This way if the unmanaged world has no references to our owner
+ // but the managed instance is alive, the refcount will be 1 instead of 0.
+ // See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
- ref->reference();
- }
-
- return mono_object;
- }
+ ref->reference();
}
- return NULL;
+ return mono_object;
}
void set_main_thread(MonoThread *p_thread) {
@@ -362,6 +374,11 @@ GDMonoClass *type_get_proxy_class(const StringName &p_type) {
GDMonoClass *klass = GDMono::get_singleton()->get_core_api_assembly()->get_class(BINDINGS_NAMESPACE, class_name);
+ if (klass && klass->is_static()) {
+ // A static class means this is a Godot singleton class. If an instance is needed we use Godot.Object.
+ return mono_cache.class_GodotObject;
+ }
+
#ifdef TOOLS_ENABLED
if (!klass) {
return GDMono::get_singleton()->get_editor_api_assembly()->get_class(BINDINGS_NAMESPACE, class_name);
@@ -565,7 +582,7 @@ void debug_send_unhandled_exception_error(MonoException *p_exc) {
if (unexpected_exc) {
GDMonoInternals::unhandled_exception(unexpected_exc);
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
Vector<ScriptLanguage::StackInfo> _si;
@@ -604,7 +621,7 @@ void debug_unhandled_exception(MonoException *p_exc) {
ScriptDebugger::get_singleton()->idle_poll();
#endif
GDMonoInternals::unhandled_exception(p_exc); // prints the exception as well
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
void print_unhandled_exception(MonoException *p_exc) {
@@ -615,7 +632,7 @@ void set_pending_exception(MonoException *p_exc) {
#ifdef HAS_PENDING_EXCEPTIONS
if (get_runtime_invoke_count() == 0) {
debug_unhandled_exception(p_exc);
- _UNREACHABLE_();
+ GD_UNREACHABLE();
}
if (!mono_runtime_set_pending_exception(p_exc, false)) {
@@ -624,7 +641,7 @@ void set_pending_exception(MonoException *p_exc) {
}
#else
debug_unhandled_exception(p_exc);
- _UNREACHABLE_();
+ GD_UNREACHABLE();
#endif
}
diff --git a/modules/mono/mono_gd/gd_mono_utils.h b/modules/mono/mono_gd/gd_mono_utils.h
index 6febc50a5f..e88bf1ced9 100644
--- a/modules/mono/mono_gd/gd_mono_utils.h
+++ b/modules/mono/mono_gd/gd_mono_utils.h
@@ -44,7 +44,7 @@
#define UNLIKELY_UNHANDLED_EXCEPTION(m_exc) \
if (unlikely(m_exc != NULL)) { \
GDMonoUtils::debug_unhandled_exception(m_exc); \
- _UNREACHABLE_(); \
+ GD_UNREACHABLE(); \
}
namespace GDMonoUtils {
@@ -214,7 +214,7 @@ void set_exception_message(MonoException *p_exc, String message);
void debug_print_unhandled_exception(MonoException *p_exc);
void debug_send_unhandled_exception_error(MonoException *p_exc);
-_NO_RETURN_ void debug_unhandled_exception(MonoException *p_exc);
+GD_NORETURN void debug_unhandled_exception(MonoException *p_exc);
void print_unhandled_exception(MonoException *p_exc);
/**
diff --git a/modules/mono/mono_gd/gd_mono_class_member.h b/modules/mono/mono_gd/i_mono_class_member.h
index 5bd21178ba..553d9edc72 100644
--- a/modules/mono/mono_gd/gd_mono_class_member.h
+++ b/modules/mono/mono_gd/i_mono_class_member.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gd_mono_class_member.h */
+/* i_mono_class_member.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,14 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef GD_MONO_CLASS_MEMBER_H
-#define GD_MONO_CLASS_MEMBER_H
+#ifndef I_MONO_CLASS_MEMBER_H
+#define I_MONO_CLASS_MEMBER_H
#include "gd_mono_header.h"
#include <mono/metadata/object.h>
-class GDMonoClassMember {
+class IMonoClassMember {
public:
enum Visibility {
PRIVATE,
@@ -51,7 +51,7 @@ public:
MEMBER_TYPE_METHOD
};
- virtual ~GDMonoClassMember() {}
+ virtual ~IMonoClassMember() {}
virtual MemberType get_member_type() = 0;
@@ -65,4 +65,4 @@ public:
virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) = 0;
};
-#endif // GD_MONO_CLASS_MEMBER_H
+#endif // I_MONO_CLASS_MEMBER_H
diff --git a/modules/mono/utils/macros.h b/modules/mono/utils/macros.h
index 94e1193adf..e44f254e1c 100644
--- a/modules/mono/utils/macros.h
+++ b/modules/mono/utils/macros.h
@@ -31,39 +31,53 @@
#ifndef UTIL_MACROS_H
#define UTIL_MACROS_H
-#define _GD_VARNAME_CONCAT_B(m_ignore, m_name) m_name
-#define _GD_VARNAME_CONCAT_A(m_a, m_b, m_c) _GD_VARNAME_CONCAT_B(hello there, m_a##m_b##m_c)
-#define _GD_VARNAME_CONCAT(m_a, m_b, m_c) _GD_VARNAME_CONCAT_A(m_a, m_b, m_c)
-#define GD_UNIQUE_NAME(m_name) _GD_VARNAME_CONCAT(m_name, _, __COUNTER__)
+#define _GD_VARNAME_CONCAT_B_(m_ignore, m_name) m_name
+#define _GD_VARNAME_CONCAT_A_(m_a, m_b, m_c) _GD_VARNAME_CONCAT_B_(hello there, m_a##m_b##m_c)
+#define _GD_VARNAME_CONCAT_(m_a, m_b, m_c) _GD_VARNAME_CONCAT_A_(m_a, m_b, m_c)
+#define GD_UNIQUE_NAME(m_name) _GD_VARNAME_CONCAT_(m_name, _, __COUNTER__)
-// noreturn
+// static assert
+// TODO: Get rid of this macro once we upgrade to C++11
-#if __cpp_static_assert
+#ifdef __cpp_static_assert
#define GD_STATIC_ASSERT(m_cond) static_assert((m_cond), "Condition '" #m_cond "' failed")
#else
#define GD_STATIC_ASSERT(m_cond) typedef int GD_UNIQUE_NAME(godot_static_assert)[((m_cond) ? 1 : -1)]
#endif
-#undef _NO_RETURN_
+// final
+// TODO: Get rid of this macro once we upgrade to C++11
+
+#if (__cplusplus >= 201103L)
+#define GD_FINAL final
+#else
+#define GD_FINAL
+#endif
+
+// noreturn
+// TODO: Get rid of this macro once we upgrade to C++11
-#ifdef __GNUC__
-#define _NO_RETURN_ __attribute__((noreturn))
-#elif _MSC_VER
-#define _NO_RETURN_ __declspec(noreturn)
+#if (__cplusplus >= 201103L)
+#define GD_NORETURN [[noreturn]]
+#elif defined(__GNUC__)
+#define GD_NORETURN __attribute__((noreturn))
+#elif defined(_MSC_VER)
+#define GD_NORETURN __declspec(noreturn)
#else
-#error Platform or compiler not supported
+#define GD_NORETURN
+#pragma message "Macro GD_NORETURN will have no effect"
#endif
// unreachable
#if defined(_MSC_VER)
-#define _UNREACHABLE_() __assume(0)
+#define GD_UNREACHABLE() __assume(0)
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
-#define _UNREACHABLE_() __builtin_unreachable()
+#define GD_UNREACHABLE() __builtin_unreachable()
#else
-#define _UNREACHABLE_() \
- CRASH_NOW(); \
- do { \
+#define GD_UNREACHABLE() \
+ CRASH_NOW(); \
+ do { \
} while (true);
#endif
diff --git a/modules/mono/utils/mono_reg_utils.cpp b/modules/mono/utils/mono_reg_utils.cpp
index 76b250e038..0eb4b3b8b3 100644
--- a/modules/mono/utils/mono_reg_utils.cpp
+++ b/modules/mono/utils/mono_reg_utils.cpp
@@ -158,8 +158,6 @@ MonoRegInfo find_mono() {
if (_find_mono_in_reg_old("Software\\Novell\\Mono", info) == ERROR_SUCCESS)
return info;
- ERR_PRINT("Cannot find mono in the registry");
-
return MonoRegInfo();
}
diff --git a/modules/mono/utils/osx_utils.cpp b/modules/mono/utils/osx_utils.cpp
index 5ed982200f..f1362be249 100644
--- a/modules/mono/utils/osx_utils.cpp
+++ b/modules/mono/utils/osx_utils.cpp
@@ -30,10 +30,10 @@
#include "osx_utils.h"
-#include "core/print_string.h"
-
#ifdef OSX_ENABLED
+#include "core/print_string.h"
+
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml
index ba54160a90..a91114b2f7 100644
--- a/modules/opensimplex/doc_classes/NoiseTexture.xml
+++ b/modules/opensimplex/doc_classes/NoiseTexture.xml
@@ -17,6 +17,8 @@
<member name="as_normalmap" type="bool" setter="set_as_normalmap" getter="is_normalmap">
If true, the resulting texture contains a normal map created from the original noise interpreted as a bump map.
</member>
+ <member name="bump_strength" type="float" setter="set_bump_strength" getter="get_bump_strength">
+ </member>
<member name="height" type="int" setter="set_height" getter="get_height">
Height of the generated texture.
</member>
diff --git a/modules/opensimplex/noise_texture.cpp b/modules/opensimplex/noise_texture.cpp
index b8126ab775..9240183265 100644
--- a/modules/opensimplex/noise_texture.cpp
+++ b/modules/opensimplex/noise_texture.cpp
@@ -41,6 +41,7 @@ NoiseTexture::NoiseTexture() {
size = Vector2i(512, 512);
seamless = false;
as_normalmap = false;
+ bump_strength = 8.0;
flags = FLAGS_DEFAULT;
noise = Ref<OpenSimplexNoise>();
@@ -68,6 +69,9 @@ void NoiseTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_as_normalmap", "as_normalmap"), &NoiseTexture::set_as_normalmap);
ClassDB::bind_method(D_METHOD("is_normalmap"), &NoiseTexture::is_normalmap);
+ ClassDB::bind_method(D_METHOD("set_bump_strength", "bump_strength"), &NoiseTexture::set_bump_strength);
+ ClassDB::bind_method(D_METHOD("get_bump_strength"), &NoiseTexture::get_bump_strength);
+
ClassDB::bind_method(D_METHOD("_update_texture"), &NoiseTexture::_update_texture);
ClassDB::bind_method(D_METHOD("_generate_texture"), &NoiseTexture::_generate_texture);
ClassDB::bind_method(D_METHOD("_thread_done", "image"), &NoiseTexture::_thread_done);
@@ -76,9 +80,19 @@ void NoiseTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "height", PROPERTY_HINT_RANGE, "1,2048,1,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "seamless"), "set_seamless", "get_seamless");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "as_normalmap"), "set_as_normalmap", "is_normalmap");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "bump_strength", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_bump_strength", "get_bump_strength");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "OpenSimplexNoise"), "set_noise", "get_noise");
}
+void NoiseTexture::_validate_property(PropertyInfo &property) const {
+
+ if (property.name == "bump_strength") {
+ if (!as_normalmap) {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+ }
+}
+
void NoiseTexture::_set_texture_data(const Ref<Image> &p_image) {
data = p_image;
if (data.is_valid()) {
@@ -129,7 +143,7 @@ Ref<Image> NoiseTexture::_generate_texture() {
}
if (as_normalmap) {
- image->bumpmap_to_normalmap();
+ image->bumpmap_to_normalmap(bump_strength);
}
return image;
@@ -202,12 +216,26 @@ void NoiseTexture::set_as_normalmap(bool p_as_normalmap) {
if (p_as_normalmap == as_normalmap) return;
as_normalmap = p_as_normalmap;
_queue_update();
+ _change_notify();
}
bool NoiseTexture::is_normalmap() {
return as_normalmap;
}
+void NoiseTexture::set_bump_strength(float p_bump_strength) {
+
+ if (p_bump_strength == bump_strength) return;
+ bump_strength = p_bump_strength;
+ if (as_normalmap)
+ _queue_update();
+}
+
+float NoiseTexture::get_bump_strength() {
+
+ return bump_strength;
+}
+
int NoiseTexture::get_width() const {
return size.x;
diff --git a/modules/opensimplex/noise_texture.h b/modules/opensimplex/noise_texture.h
index d1705f4070..0d00ee154d 100644
--- a/modules/opensimplex/noise_texture.h
+++ b/modules/opensimplex/noise_texture.h
@@ -58,6 +58,7 @@ private:
Vector2i size;
bool seamless;
bool as_normalmap;
+ float bump_strength;
void _thread_done(const Ref<Image> &p_image);
static void _thread_function(void *p_ud);
@@ -69,6 +70,7 @@ private:
protected:
static void _bind_methods();
+ virtual void _validate_property(PropertyInfo &property) const;
public:
void set_noise(Ref<OpenSimplexNoise> p_noise);
@@ -83,6 +85,9 @@ public:
void set_as_normalmap(bool p_seamless);
bool is_normalmap();
+ void set_bump_strength(float p_bump_strength);
+ float get_bump_strength();
+
int get_width() const;
int get_height() const;
diff --git a/modules/opus/SCsub b/modules/opus/SCsub
index 508aec7057..aa656c575a 100644
--- a/modules/opus/SCsub
+++ b/modules/opus/SCsub
@@ -12,187 +12,194 @@ if env['builtin_opus']:
thirdparty_dir = "#thirdparty/opus/"
thirdparty_sources = [
- "silk/tables_other.c",
- "silk/sum_sqr_shift.c",
- "silk/PLC.c",
- "silk/dec_API.c",
- "silk/decode_pulses.c",
- "silk/inner_prod_aligned.c",
- "silk/init_encoder.c",
- "silk/interpolate.c",
- "silk/stereo_encode_pred.c",
- "silk/decode_frame.c",
- "silk/NLSF_del_dec_quant.c",
- "silk/VAD.c",
- "silk/resampler_private_AR2.c",
- "silk/NLSF_unpack.c",
- "silk/resampler_down2.c",
- "silk/sort.c",
- "silk/resampler_private_IIR_FIR.c",
- "silk/resampler_down2_3.c",
- "silk/resampler_private_up2_HQ.c",
- "silk/tables_gain.c",
- "silk/stereo_find_predictor.c",
- "silk/stereo_quant_pred.c",
- "silk/NLSF_stabilize.c",
- "silk/ana_filt_bank_1.c",
- "silk/check_control_input.c",
- "silk/bwexpander.c",
- "silk/A2NLSF.c",
- "silk/LPC_inv_pred_gain.c",
- "silk/log2lin.c",
- "silk/process_NLSFs.c",
- "silk/sigm_Q15.c",
- "silk/VQ_WMat_EC.c",
- "silk/quant_LTP_gains.c",
- "silk/resampler_private_down_FIR.c",
- "silk/NLSF_decode.c",
- "silk/control_codec.c",
- "silk/NLSF_VQ_weights_laroia.c",
- "silk/decode_pitch.c",
- "silk/stereo_decode_pred.c",
- "silk/tables_pulses_per_block.c",
+
+ # Sync with opus_sources.mk
+ "opus.c",
+ "opus_decoder.c",
+ "opus_encoder.c",
+ "opus_multistream.c",
+ "opus_multistream_encoder.c",
+ "opus_multistream_decoder.c",
+ "repacketizer.c",
+
+ "analysis.c",
+ "mlp.c",
+ "mlp_data.c",
+
+ # Sync with libopusfile Makefile.am
+ "info.c",
+ "internal.c",
+ "opusfile.c",
+ "stream.c",
+
+ # Sync with celt_sources.mk
+ "celt/bands.c",
+ "celt/celt.c",
+ "celt/celt_encoder.c",
+ "celt/celt_decoder.c",
+ "celt/cwrs.c",
+ "celt/entcode.c",
+ "celt/entdec.c",
+ "celt/entenc.c",
+ "celt/kiss_fft.c",
+ "celt/laplace.c",
+ "celt/mathops.c",
+ "celt/mdct.c",
+ "celt/modes.c",
+ "celt/pitch.c",
+ "celt/celt_lpc.c",
+ "celt/quant_bands.c",
+ "celt/rate.c",
+ "celt/vq.c",
+ #"celt/arm/arm_celt_map.c",
+ #"celt/arm/armcpu.c",
+ #"celt/arm/celt_ne10_fft.c",
+ #"celt/arm/celt_ne10_mdct.c",
+ #"celt/arm/celt_neon_intr.c",
+
+ # Sync with silk_sources.mk
+ "silk/CNG.c",
+ "silk/code_signs.c",
"silk/init_decoder.c",
- "silk/table_LSF_cos.c",
"silk/decode_core.c",
- "silk/code_signs.c",
- "silk/enc_API.c",
- "silk/tables_LTP.c",
- "silk/pitch_est_tables.c",
- "silk/biquad_alt.c",
- "silk/encode_indices.c",
- "silk/tables_NLSF_CB_WB.c",
- "silk/debug.c",
+ "silk/decode_frame.c",
"silk/decode_parameters.c",
- "silk/tables_pitch_lag.c",
- "silk/NLSF2A.c",
- "silk/resampler.c",
"silk/decode_indices.c",
- "silk/NLSF_VQ.c",
- "silk/bwexpander_32.c",
- "silk/tables_NLSF_CB_NB_MB.c",
+ "silk/decode_pulses.c",
+ "silk/decoder_set_fs.c",
+ "silk/dec_API.c",
+ "silk/enc_API.c",
+ "silk/encode_indices.c",
"silk/encode_pulses.c",
+ "silk/gain_quant.c",
+ "silk/interpolate.c",
+ "silk/LP_variable_cutoff.c",
+ "silk/NLSF_decode.c",
+ "silk/NSQ.c",
"silk/NSQ_del_dec.c",
- "silk/control_SNR.c",
+ "silk/PLC.c",
"silk/shell_coder.c",
+ "silk/tables_gain.c",
+ "silk/tables_LTP.c",
+ "silk/tables_NLSF_CB_NB_MB.c",
+ "silk/tables_NLSF_CB_WB.c",
+ "silk/tables_other.c",
+ "silk/tables_pitch_lag.c",
+ "silk/tables_pulses_per_block.c",
+ "silk/VAD.c",
+ "silk/control_audio_bandwidth.c",
+ "silk/quant_LTP_gains.c",
+ "silk/VQ_WMat_EC.c",
+ "silk/HP_variable_cutoff.c",
"silk/NLSF_encode.c",
- "silk/stereo_MS_to_LR.c",
+ "silk/NLSF_VQ.c",
+ "silk/NLSF_unpack.c",
+ "silk/NLSF_del_dec_quant.c",
+ "silk/process_NLSFs.c",
"silk/stereo_LR_to_MS.c",
- "silk/HP_variable_cutoff.c",
+ "silk/stereo_MS_to_LR.c",
+ "silk/check_control_input.c",
+ "silk/control_SNR.c",
+ "silk/init_encoder.c",
+ "silk/control_codec.c",
+ "silk/A2NLSF.c",
+ "silk/ana_filt_bank_1.c",
+ "silk/biquad_alt.c",
+ "silk/bwexpander_32.c",
+ "silk/bwexpander.c",
+ "silk/debug.c",
+ "silk/decode_pitch.c",
+ "silk/inner_prod_aligned.c",
+ "silk/lin2log.c",
+ "silk/log2lin.c",
"silk/LPC_analysis_filter.c",
- "silk/CNG.c",
- "silk/decoder_set_fs.c",
+ "silk/LPC_inv_pred_gain.c",
+ "silk/table_LSF_cos.c",
+ "silk/NLSF2A.c",
+ "silk/NLSF_stabilize.c",
+ "silk/NLSF_VQ_weights_laroia.c",
+ "silk/pitch_est_tables.c",
+ "silk/resampler.c",
+ "silk/resampler_down2_3.c",
+ "silk/resampler_down2.c",
+ "silk/resampler_private_AR2.c",
+ "silk/resampler_private_down_FIR.c",
+ "silk/resampler_private_IIR_FIR.c",
+ "silk/resampler_private_up2_HQ.c",
"silk/resampler_rom.c",
- "silk/control_audio_bandwidth.c",
- "silk/lin2log.c",
- "silk/LP_variable_cutoff.c",
- "silk/NSQ.c",
- "silk/gain_quant.c",
- "celt/laplace.c",
- "celt/vq.c",
- "celt/quant_bands.c",
- "celt/kiss_fft.c",
- "celt/entcode.c",
- "celt/entenc.c",
- "celt/celt_lpc.c",
- "celt/pitch.c",
- "celt/rate.c",
- "celt/mathops.c",
- #"celt/arm/armcpu.c",
- #"celt/arm/celt_neon_intr.c",
- #"celt/arm/celt_ne10_mdct.c",
- #"celt/arm/celt_ne10_fft.c",
- #"celt/arm/arm_celt_map.c",
- "celt/celt_encoder.c",
- "celt/celt.c",
- "celt/bands.c",
- "celt/cwrs.c",
- "celt/entdec.c",
- "celt/celt_decoder.c",
- "celt/mdct.c",
- "celt/modes.c",
- "repacketizer.c",
- "mlp_data.c",
- "opus_multistream.c",
- "opusfile.c",
- "opus_encoder.c",
- "analysis.c",
- "mlp.c",
- "info.c",
- "stream.c",
- "opus_decoder.c",
- "internal.c",
- "wincerts.c",
- "opus.c",
- "opus_multistream_encoder.c",
- "http.c",
- "opus_multistream_decoder.c"
+ "silk/sigm_Q15.c",
+ "silk/sort.c",
+ "silk/sum_sqr_shift.c",
+ "silk/stereo_decode_pred.c",
+ "silk/stereo_encode_pred.c",
+ "silk/stereo_find_predictor.c",
+ "silk/stereo_quant_pred.c",
]
opus_sources_silk = []
- if("opus_fixed_point" in env and env.opus_fixed_point == "yes"):
+ if env["platform"] in ["android", "iphone", "javascript"]:
env_opus.Append(CFLAGS=["-DFIXED_POINT"])
opus_sources_silk = [
- "silk/fixed/schur64_FIX.c",
- "silk/fixed/residual_energy16_FIX.c",
+ "silk/fixed/LTP_analysis_filter_FIX.c",
+ "silk/fixed/LTP_scale_ctrl_FIX.c",
+ "silk/fixed/corrMatrix_FIX.c",
"silk/fixed/encode_frame_FIX.c",
- "silk/fixed/regularize_correlations_FIX.c",
- "silk/fixed/apply_sine_window_FIX.c",
- "silk/fixed/solve_LS_FIX.c",
- "silk/fixed/schur_FIX.c",
- "silk/fixed/pitch_analysis_core_FIX.c",
- "silk/fixed/noise_shape_analysis_FIX.c",
+ "silk/fixed/find_LPC_FIX.c",
"silk/fixed/find_LTP_FIX.c",
- "silk/fixed/vector_ops_FIX.c",
- "silk/fixed/autocorr_FIX.c",
- "silk/fixed/warped_autocorrelation_FIX.c",
"silk/fixed/find_pitch_lags_FIX.c",
- "silk/fixed/k2a_Q16_FIX.c",
- "silk/fixed/LTP_scale_ctrl_FIX.c",
- "silk/fixed/corrMatrix_FIX.c",
+ "silk/fixed/find_pred_coefs_FIX.c",
+ "silk/fixed/noise_shape_analysis_FIX.c",
"silk/fixed/prefilter_FIX.c",
- "silk/fixed/find_LPC_FIX.c",
- "silk/fixed/residual_energy_FIX.c",
"silk/fixed/process_gains_FIX.c",
- "silk/fixed/LTP_analysis_filter_FIX.c",
- "silk/fixed/k2a_FIX.c",
+ "silk/fixed/regularize_correlations_FIX.c",
+ "silk/fixed/residual_energy16_FIX.c",
+ "silk/fixed/residual_energy_FIX.c",
+ "silk/fixed/solve_LS_FIX.c",
+ "silk/fixed/warped_autocorrelation_FIX.c",
+ "silk/fixed/apply_sine_window_FIX.c",
+ "silk/fixed/autocorr_FIX.c",
"silk/fixed/burg_modified_FIX.c",
- "silk/fixed/find_pred_coefs_FIX.c"
+ "silk/fixed/k2a_FIX.c",
+ "silk/fixed/k2a_Q16_FIX.c",
+ "silk/fixed/pitch_analysis_core_FIX.c",
+ "silk/fixed/vector_ops_FIX.c",
+ "silk/fixed/schur64_FIX.c",
+ "silk/fixed/schur_FIX.c",
]
else:
opus_sources_silk = [
- "silk/float/LTP_scale_ctrl_FLP.c",
- "silk/float/regularize_correlations_FLP.c",
+ "silk/float/apply_sine_window_FLP.c",
"silk/float/corrMatrix_FLP.c",
+ "silk/float/encode_frame_FLP.c",
+ "silk/float/find_LPC_FLP.c",
+ "silk/float/find_LTP_FLP.c",
+ "silk/float/find_pitch_lags_FLP.c",
+ "silk/float/find_pred_coefs_FLP.c",
"silk/float/LPC_analysis_filter_FLP.c",
- "silk/float/levinsondurbin_FLP.c",
- "silk/float/schur_FLP.c",
- "silk/float/scale_vector_FLP.c",
- "silk/float/apply_sine_window_FLP.c",
- "silk/float/pitch_analysis_core_FLP.c",
- "silk/float/wrappers_FLP.c",
- "silk/float/bwexpander_FLP.c",
- "silk/float/warped_autocorrelation_FLP.c",
+ "silk/float/LTP_analysis_filter_FLP.c",
+ "silk/float/LTP_scale_ctrl_FLP.c",
+ "silk/float/noise_shape_analysis_FLP.c",
+ "silk/float/prefilter_FLP.c",
+ "silk/float/process_gains_FLP.c",
+ "silk/float/regularize_correlations_FLP.c",
+ "silk/float/residual_energy_FLP.c",
"silk/float/solve_LS_FLP.c",
- "silk/float/find_LPC_FLP.c",
+ "silk/float/warped_autocorrelation_FLP.c",
+ "silk/float/wrappers_FLP.c",
"silk/float/autocorrelation_FLP.c",
- "silk/float/find_pred_coefs_FLP.c",
- "silk/float/find_pitch_lags_FLP.c",
"silk/float/burg_modified_FLP.c",
- "silk/float/find_LTP_FLP.c",
+ "silk/float/bwexpander_FLP.c",
"silk/float/energy_FLP.c",
- "silk/float/sort_FLP.c",
- "silk/float/LPC_inv_pred_gain_FLP.c",
- "silk/float/k2a_FLP.c",
- "silk/float/noise_shape_analysis_FLP.c",
"silk/float/inner_product_FLP.c",
- "silk/float/process_gains_FLP.c",
- "silk/float/encode_frame_FLP.c",
+ "silk/float/k2a_FLP.c",
+ "silk/float/levinsondurbin_FLP.c",
+ "silk/float/LPC_inv_pred_gain_FLP.c",
+ "silk/float/pitch_analysis_core_FLP.c",
"silk/float/scale_copy_vector_FLP.c",
- "silk/float/residual_energy_FLP.c",
- "silk/float/LTP_analysis_filter_FLP.c",
- "silk/float/prefilter_FLP.c"
+ "silk/float/scale_vector_FLP.c",
+ "silk/float/schur_FLP.c",
+ "silk/float/sort_FLP.c",
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources + opus_sources_silk]
@@ -213,6 +220,12 @@ if env['builtin_opus']:
]
env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
+ if env["platform"] == "android" or env["platform"] == "iphone":
+ if ("arch" in env and env["arch"] == "arm") or ("android_arch" in env and env["android_arch"] in ["armv6", "armv7"]):
+ env_opus.Append(CFLAGS=["-DOPUS_ARM_OPT"])
+ elif ("arch" in env and env["arch"] == "arm64") or ("android_arch" in env and env["android_arch"] == "arm64v8"):
+ env_opus.Append(CFLAGS=["-DOPUS_ARM64_OPT"])
+
env_thirdparty = env_opus.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 01e011e64c..82f323e8cf 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -216,7 +216,7 @@ static void _compress_pvrtc4(Image *p_img) {
int ofs, size, w, h;
img->get_mipmap_offset_size_and_dimensions(i, ofs, size, w, h);
Javelin::RgbaBitmap bm(w, h);
- for (unsigned j = 0; j < size / 4; j++) {
+ for (int j = 0; j < size / 4; j++) {
Javelin::ColorRgba<unsigned char> *dp = bm.GetData();
/* red and Green colors are swapped. */
new (dp) Javelin::ColorRgba<unsigned char>(r[ofs + 4 * j + 2], r[ofs + 4 * j + 1], r[ofs + 4 * j], r[ofs + 4 * j + 3]);
diff --git a/modules/recast/navigation_mesh_generator.cpp b/modules/recast/navigation_mesh_generator.cpp
index 29f5e4c363..80e98a13a5 100644
--- a/modules/recast/navigation_mesh_generator.cpp
+++ b/modules/recast/navigation_mesh_generator.cpp
@@ -66,26 +66,26 @@ void NavigationMeshGenerator::_add_mesh(const Ref<Mesh> &p_mesh, const Transform
PoolVector<int> mesh_indices = a[Mesh::ARRAY_INDEX];
PoolVector<int>::Read ir = mesh_indices.read();
- for (int i = 0; i < mesh_vertices.size(); i++) {
- _add_vertex(p_xform.xform(vr[i]), p_verticies);
+ for (int j = 0; j < mesh_vertices.size(); j++) {
+ _add_vertex(p_xform.xform(vr[j]), p_verticies);
}
- for (int i = 0; i < face_count; i++) {
+ for (int j = 0; j < face_count; j++) {
// CCW
- p_indices.push_back(current_vertex_count + (ir[i * 3 + 0]));
- p_indices.push_back(current_vertex_count + (ir[i * 3 + 2]));
- p_indices.push_back(current_vertex_count + (ir[i * 3 + 1]));
+ p_indices.push_back(current_vertex_count + (ir[j * 3 + 0]));
+ p_indices.push_back(current_vertex_count + (ir[j * 3 + 2]));
+ p_indices.push_back(current_vertex_count + (ir[j * 3 + 1]));
}
} else {
face_count = mesh_vertices.size() / 3;
- for (int i = 0; i < face_count; i++) {
- _add_vertex(p_xform.xform(vr[i * 3 + 0]), p_verticies);
- _add_vertex(p_xform.xform(vr[i * 3 + 2]), p_verticies);
- _add_vertex(p_xform.xform(vr[i * 3 + 1]), p_verticies);
-
- p_indices.push_back(current_vertex_count + (i * 3 + 0));
- p_indices.push_back(current_vertex_count + (i * 3 + 1));
- p_indices.push_back(current_vertex_count + (i * 3 + 2));
+ for (int j = 0; j < face_count; j++) {
+ _add_vertex(p_xform.xform(vr[j * 3 + 0]), p_verticies);
+ _add_vertex(p_xform.xform(vr[j * 3 + 2]), p_verticies);
+ _add_vertex(p_xform.xform(vr[j * 3 + 1]), p_verticies);
+
+ p_indices.push_back(current_vertex_count + (j * 3 + 0));
+ p_indices.push_back(current_vertex_count + (j * 3 + 1));
+ p_indices.push_back(current_vertex_count + (j * 3 + 2));
}
}
}
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
index 6e12bc9bf0..7254f57672 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
@@ -76,7 +76,7 @@ void ResourceImporterOGGVorbis::get_import_options(List<ImportOption> *r_options
r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "loop_offset"), 0));
}
-Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
+Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
bool loop = p_options["loop"];
float loop_offset = p_options["loop_offset"];
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.h b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
index ca2d662e61..d3d0574d56 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.h
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
@@ -32,7 +32,7 @@
#define RESOURCEIMPORTEROGGVORBIS_H
#include "audio_stream_ogg_vorbis.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterOGGVorbis : public ResourceImporter {
GDCLASS(ResourceImporterOGGVorbis, ResourceImporter)
@@ -49,7 +49,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
ResourceImporterOGGVorbis();
};
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 31723c5c76..14c5ddd7f2 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -296,8 +296,8 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
if (ogg_sync_pageout(&oy, &og) > 0) {
queue_page(&og); /* demux into the appropriate stream */
} else {
- int ret = buffer_data(); /* someone needs more data */
- if (ret == 0) {
+ int ret2 = buffer_data(); /* someone needs more data */
+ if (ret2 == 0) {
fprintf(stderr, "End of file while searching for codec headers.\n");
clear();
return;
diff --git a/modules/upnp/register_types.cpp b/modules/upnp/register_types.cpp
index abb73a3605..fbf0ee8b97 100644
--- a/modules/upnp/register_types.cpp
+++ b/modules/upnp/register_types.cpp
@@ -33,7 +33,7 @@
#include "core/error_macros.h"
#include "upnp.h"
-#include "upnpdevice.h"
+#include "upnp_device.h"
void register_upnp_types() {
diff --git a/modules/upnp/upnp.h b/modules/upnp/upnp.h
index b73908724d..011b6d44b3 100644
--- a/modules/upnp/upnp.h
+++ b/modules/upnp/upnp.h
@@ -33,7 +33,7 @@
#include "core/reference.h"
-#include "upnpdevice.h"
+#include "upnp_device.h"
#include <miniupnpc/miniupnpc.h>
diff --git a/modules/upnp/upnpdevice.cpp b/modules/upnp/upnp_device.cpp
index 2fb2102df9..4d67e3ddc8 100644
--- a/modules/upnp/upnpdevice.cpp
+++ b/modules/upnp/upnp_device.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* upnpdevice.cpp */
+/* upnp_device.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "upnpdevice.h"
+#include "upnp_device.h"
#include "upnp.h"
diff --git a/modules/upnp/upnpdevice.h b/modules/upnp/upnp_device.h
index 20fe5c62fe..09fce6af89 100644
--- a/modules/upnp/upnpdevice.h
+++ b/modules/upnp/upnp_device.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* upnpdevice.h */
+/* upnp_device.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef GODOT_UPNPDEVICE_H
-#define GODOT_UPNPDEVICE_H
+#ifndef GODOT_UPNP_DEVICE_H
+#define GODOT_UPNP_DEVICE_H
#include "core/reference.h"
@@ -92,4 +92,4 @@ private:
VARIANT_ENUM_CAST(UPNPDevice::IGDStatus)
-#endif // GODOT_UPNPDEVICE_H
+#endif // GODOT_UPNP_DEVICE_H
diff --git a/modules/visual_script/doc_classes/VisualScriptCondition.xml b/modules/visual_script/doc_classes/VisualScriptCondition.xml
index 4657436c8f..a7b1028c0c 100644
--- a/modules/visual_script/doc_classes/VisualScriptCondition.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCondition.xml
@@ -4,7 +4,7 @@
A Visual Script node which branches the flow.
</brief_description>
<description>
- A Visual Script node that checks a [bool] input port. If [code]true[/code], it will exit via the “true†sequence port. If [code]false[/code], it will exit via the "false" sequence port. After exiting either, it exits via the “done†port. Sequence ports may be left disconnected.
+ A Visual Script node that checks a [bool] input port. If [code]true[/code], it will exit via the "true" sequence port. If [code]false[/code], it will exit via the "false" sequence port. After exiting either, it exits via the "done" port. Sequence ports may be left disconnected.
[b]Input Ports:[/b]
- Sequence: [code]if (cond) is[/code]
- Data (boolean): [code]cond[/code]
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 0027300e9f..581809fec9 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -48,22 +48,12 @@ bool VisualScriptNode::is_breakpoint() const {
void VisualScriptNode::_notification(int p_what) {
if (p_what == NOTIFICATION_POSTINITIALIZE) {
- _update_input_ports();
- }
-}
-
-void VisualScriptNode::_update_input_ports() {
- default_input_values.resize(MAX(default_input_values.size(), get_input_value_port_count())); //let it grow as big as possible, we don't want to lose values on resize
- int port_count = get_input_value_port_count();
- for (int i = 0; i < port_count; i++) {
- Variant::Type expected = get_input_value_port_info(i).type;
- Variant::CallError ce;
- set_default_input_value(i, Variant::construct(expected, NULL, 0, ce, false));
+ validate_input_default_values();
}
}
void VisualScriptNode::ports_changed_notify() {
- _update_input_ports();
+ validate_input_default_values();
emit_signal("ports_changed");
}
@@ -92,8 +82,7 @@ void VisualScriptNode::_set_default_input_values(Array p_values) {
}
void VisualScriptNode::validate_input_default_values() {
-
- default_input_values.resize(get_input_value_port_count());
+ default_input_values.resize(MAX(default_input_values.size(), get_input_value_port_count())); //let it grow as big as possible, we don't want to lose values on resize
//actually validate on save
for (int i = 0; i < get_input_value_port_count(); i++) {
@@ -119,8 +108,10 @@ void VisualScriptNode::validate_input_default_values() {
Array VisualScriptNode::_get_default_input_values() const {
//validate on save, since on load there is little info about this
+ Array values = default_input_values;
+ values.resize(get_input_value_port_count());
- return default_input_values;
+ return values;
}
String VisualScriptNode::get_text() const {
@@ -1165,9 +1156,9 @@ void VisualScript::_set_data(const Dictionary &p_data) {
Array nodes = func["nodes"];
- for (int i = 0; i < nodes.size(); i += 3) {
+ for (int j = 0; j < nodes.size(); j += 3) {
- add_node(name, nodes[i], nodes[i + 2], nodes[i + 1]);
+ add_node(name, nodes[j], nodes[j + 2], nodes[j + 1]);
}
Array sequence_connections = func["sequence_connections"];
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 0768ff61f7..0171b8e6f1 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -52,7 +52,6 @@ class VisualScriptNode : public Resource {
Array _get_default_input_values() const;
void validate_input_default_values();
- void _update_input_ports();
protected:
void _notification(int p_what);
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 040d61a31e..7e54891d97 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -3103,7 +3103,7 @@ void VisualScriptEditor::_comment_node_resized(const Vector2 &p_new_size, int p_
graph->set_block_minimum_size_adjust(true); //faster resize
- undo_redo->create_action("Resize Comment", UndoRedo::MERGE_ENDS);
+ undo_redo->create_action(TTR("Resize Comment"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(vsc.ptr(), "set_size", p_new_size / EDSCALE);
undo_redo->add_undo_method(vsc.ptr(), "set_size", vsc->get_size());
undo_redo->commit_action();
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index 23942fdd2a..a76e4bc36f 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -679,10 +679,10 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *expr2 = _parse_expression();
+ if (!expr2)
return NULL;
- dn->dict.push_back(expr);
+ dn->dict.push_back(expr2);
_get_token(tk);
if (tk.type != TK_COLON) {
@@ -690,11 +690,11 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
return NULL;
}
- expr = _parse_expression();
- if (!expr)
+ expr2 = _parse_expression();
+ if (!expr2)
return NULL;
- dn->dict.push_back(expr);
+ dn->dict.push_back(expr2);
cofs = str_ofs;
_get_token(tk);
@@ -723,10 +723,10 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *expr2 = _parse_expression();
+ if (!expr2)
return NULL;
- an->array.push_back(expr);
+ an->array.push_back(expr2);
cofs = str_ofs;
_get_token(tk);
@@ -807,11 +807,11 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *expr2 = _parse_expression();
+ if (!expr2)
return NULL;
- constructor->arguments.push_back(expr);
+ constructor->arguments.push_back(expr2);
cofs = str_ofs;
_get_token(tk);
@@ -848,11 +848,11 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
}
str_ofs = cofs; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *expr2 = _parse_expression();
+ if (!expr2)
return NULL;
- bifunc->arguments.push_back(expr);
+ bifunc->arguments.push_back(expr2);
cofs = str_ofs;
_get_token(tk);
@@ -947,25 +947,25 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
while (true) {
- int cofs = str_ofs;
+ int cofs3 = str_ofs;
_get_token(tk);
if (tk.type == TK_PARENTHESIS_CLOSE) {
break;
}
- str_ofs = cofs; //revert
+ str_ofs = cofs3; //revert
//parse an expression
- ENode *expr = _parse_expression();
- if (!expr)
+ ENode *expr2 = _parse_expression();
+ if (!expr2)
return NULL;
- func_call->arguments.push_back(expr);
+ func_call->arguments.push_back(expr2);
- cofs = str_ofs;
+ cofs3 = str_ofs;
_get_token(tk);
if (tk.type == TK_COMMA) {
//all good
} else if (tk.type == TK_PARENTHESIS_CLOSE) {
- str_ofs = cofs;
+ str_ofs = cofs3;
} else {
_set_error("Expected ',' or ')'");
}
@@ -1426,8 +1426,8 @@ public:
for (int i = 0; i < call->arguments.size(); i++) {
Variant value;
- bool ret = _execute(p_inputs, call->arguments[i], value, r_error_str, ce);
- if (ret)
+ bool ret2 = _execute(p_inputs, call->arguments[i], value, r_error_str, ce);
+ if (ret2)
return true;
arr.write[i] = value;
argp.write[i] = &arr[i];
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 7dba8fd488..bb0435a679 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -129,9 +129,8 @@ StringName VisualScriptFunctionCall::_get_base_type() const {
int VisualScriptFunctionCall::get_input_value_port_count() const {
if (call_mode == CALL_MODE_BASIC_TYPE) {
-
- Vector<StringName> names = Variant::get_method_argument_names(basic_type, function);
- return names.size() + (rpc_call_mode >= RPC_RELIABLE_TO_ID ? 1 : 0) + 1;
+ Vector<Variant::Type> types = Variant::get_method_argument_types(basic_type, function);
+ return types.size() + (rpc_call_mode >= RPC_RELIABLE_TO_ID ? 1 : 0) + 1;
} else {
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index 9dc0e4edfa..ac5f73d113 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -421,7 +421,7 @@ void VisualScriptPropertySelector::get_visual_node_names(const String &root_filt
}
Vector<String> desc = path[path.size() - 1].replace("(", "( ").replace(")", " )").replace(",", ", ").split(" ");
- for (size_t i = 0; i < desc.size(); i++) {
+ for (int i = 0; i < desc.size(); i++) {
desc.write[i] = desc[i].capitalize();
if (desc[i].ends_with(",")) {
desc.write[i] = desc[i].replace(",", ", ");
@@ -514,26 +514,26 @@ void VisualScriptPropertySelector::_item_selected() {
if (names->find(name) != NULL) {
Ref<VisualScriptOperator> operator_node = VisualScriptLanguage::singleton->create_node_from_name(name);
if (operator_node.is_valid()) {
- Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(operator_node->get_class_name());
- if (E) {
+ Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(operator_node->get_class_name());
+ if (F) {
text = Variant::get_operator_name(operator_node->get_operator());
}
}
Ref<VisualScriptTypeCast> typecast_node = VisualScriptLanguage::singleton->create_node_from_name(name);
if (typecast_node.is_valid()) {
- Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(typecast_node->get_class_name());
- if (E) {
- text = E->get().description;
+ Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(typecast_node->get_class_name());
+ if (F) {
+ text = F->get().description;
}
}
Ref<VisualScriptBuiltinFunc> builtin_node = VisualScriptLanguage::singleton->create_node_from_name(name);
if (builtin_node.is_valid()) {
- Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(builtin_node->get_class_name());
- if (E) {
- for (int i = 0; i < E->get().constants.size(); i++) {
- if (E->get().constants[i].value.to_int() == int(builtin_node->get_func())) {
- text = E->get().constants[i].description;
+ Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(builtin_node->get_class_name());
+ if (F) {
+ for (int i = 0; i < F->get().constants.size(); i++) {
+ if (F->get().constants[i].value.to_int() == int(builtin_node->get_func())) {
+ text = F->get().constants[i].description;
}
}
}
diff --git a/modules/webp/SCsub b/modules/webp/SCsub
index d215f19cef..fa3896c457 100644
--- a/modules/webp/SCsub
+++ b/modules/webp/SCsub
@@ -29,13 +29,11 @@ if env['builtin_libwebp']:
"dsp/cost.c",
"dsp/cost_mips32.c",
"dsp/cost_mips_dsp_r2.c",
+ "dsp/cost_neon.c",
"dsp/cost_sse2.c",
"dsp/cpu.c",
"dsp/dec.c",
"dsp/dec_clip_tables.c",
- "dsp/ssim.c",
- "dsp/ssim_sse2.c",
- "dsp/yuv_neon.c",
"dsp/dec_mips32.c",
"dsp/dec_mips_dsp_r2.c",
"dsp/dec_msa.c",
@@ -72,6 +70,8 @@ if env['builtin_libwebp']:
"dsp/rescaler_msa.c",
"dsp/rescaler_neon.c",
"dsp/rescaler_sse2.c",
+ "dsp/ssim.c",
+ "dsp/ssim_sse2.c",
"dsp/upsampling.c",
"dsp/upsampling_mips_dsp_r2.c",
"dsp/upsampling_msa.c",
@@ -81,6 +81,7 @@ if env['builtin_libwebp']:
"dsp/yuv.c",
"dsp/yuv_mips32.c",
"dsp/yuv_mips_dsp_r2.c",
+ "dsp/yuv_neon.c",
"dsp/yuv_sse2.c",
"dsp/yuv_sse41.c",
"enc/alpha_enc.c",
diff --git a/modules/websocket/SCsub b/modules/websocket/SCsub
index b67a836fe8..0345e533bc 100644
--- a/modules/websocket/SCsub
+++ b/modules/websocket/SCsub
@@ -9,85 +9,90 @@ env_lws = env_modules.Clone()
if env['builtin_libwebsockets'] and not env["platform"] == "javascript": # already builtin for javascript
thirdparty_dir = "#thirdparty/libwebsockets/"
- helper_dir = "win32helpers/"
+ helper_dir = "#thirdparty/libwebsockets/win32helpers/"
thirdparty_sources = [
- "core/alloc.c",
- "core/context.c",
- "core/libwebsockets.c",
- "core/output.c",
- "core/pollfd.c",
- "core/service.c",
-
- "event-libs/poll/poll.c",
-
- "misc/base64-decode.c",
- "misc/lejp.c",
- "misc/sha-1.c",
-
- "roles/h1/ops-h1.c",
- "roles/http/header.c",
- "roles/http/client/client.c",
- "roles/http/client/client-handshake.c",
- "roles/http/server/fops-zip.c",
- "roles/http/server/lejp-conf.c",
- "roles/http/server/parsers.c",
- "roles/http/server/server.c",
- "roles/listen/ops-listen.c",
- "roles/pipe/ops-pipe.c",
- "roles/raw/ops-raw.c",
-
- "roles/ws/client-ws.c",
- "roles/ws/client-parser-ws.c",
- "roles/ws/ops-ws.c",
- "roles/ws/server-ws.c",
-
- "tls/tls.c",
- "tls/tls-client.c",
- "tls/tls-server.c",
-
- "tls/mbedtls/wrapper/library/ssl_cert.c",
- "tls/mbedtls/wrapper/library/ssl_pkey.c",
- "tls/mbedtls/wrapper/library/ssl_stack.c",
- "tls/mbedtls/wrapper/library/ssl_methods.c",
- "tls/mbedtls/wrapper/library/ssl_lib.c",
- "tls/mbedtls/wrapper/library/ssl_x509.c",
- "tls/mbedtls/wrapper/platform/ssl_port.c",
- "tls/mbedtls/wrapper/platform/ssl_pm.c",
- "tls/mbedtls/lws-genhash.c",
- "tls/mbedtls/mbedtls-client.c",
- "tls/mbedtls/lws-genrsa.c",
- "tls/mbedtls/ssl.c",
- "tls/mbedtls/mbedtls-server.c"
+ "lib/core/adopt.c",
+ "lib/core/alloc.c",
+ "lib/core/connect.c",
+ "lib/core/context.c",
+ "lib/core/dummy-callback.c",
+ "lib/core/libwebsockets.c",
+ "lib/core/output.c",
+ "lib/core/pollfd.c",
+ "lib/core/service.c",
+
+ "lib/event-libs/poll/poll.c",
+
+ "lib/misc/base64-decode.c",
+ "lib/misc/lejp.c",
+ "lib/misc/sha-1.c",
+
+ "lib/roles/h1/ops-h1.c",
+ "lib/roles/http/header.c",
+ "lib/roles/http/client/client.c",
+ "lib/roles/http/client/client-handshake.c",
+ "lib/roles/http/server/fops-zip.c",
+ "lib/roles/http/server/lejp-conf.c",
+ "lib/roles/http/server/parsers.c",
+ "lib/roles/http/server/server.c",
+ "lib/roles/listen/ops-listen.c",
+ "lib/roles/pipe/ops-pipe.c",
+ "lib/roles/raw-skt/ops-raw-skt.c",
+ "lib/roles/raw-file/ops-raw-file.c",
+
+ "lib/roles/ws/client-ws.c",
+ "lib/roles/ws/client-parser-ws.c",
+ "lib/roles/ws/ops-ws.c",
+ "lib/roles/ws/server-ws.c",
+
+ "lib/tls/tls.c",
+ "lib/tls/tls-client.c",
+ "lib/tls/tls-server.c",
+
+ "lib/tls/mbedtls/wrapper/library/ssl_cert.c",
+ "lib/tls/mbedtls/wrapper/library/ssl_pkey.c",
+ "lib/tls/mbedtls/wrapper/library/ssl_stack.c",
+ "lib/tls/mbedtls/wrapper/library/ssl_methods.c",
+ "lib/tls/mbedtls/wrapper/library/ssl_lib.c",
+ "lib/tls/mbedtls/wrapper/library/ssl_x509.c",
+ "lib/tls/mbedtls/wrapper/platform/ssl_port.c",
+ "lib/tls/mbedtls/wrapper/platform/ssl_pm.c",
+ "lib/tls/mbedtls/lws-genhash.c",
+ "lib/tls/mbedtls/mbedtls-client.c",
+ "lib/tls/mbedtls/lws-genrsa.c",
+ "lib/tls/mbedtls/ssl.c",
+ "lib/tls/mbedtls/mbedtls-server.c"
]
if env["platform"] == "android": # Builtin getifaddrs
- thirdparty_sources += ["misc/getifaddrs.c"]
+ thirdparty_sources += ["lib/misc/getifaddrs.c"]
+
+ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
if env["platform"] == "windows" or env["platform"] == "uwp": # Winsock
- thirdparty_sources += ["plat/lws-plat-win.c", helper_dir + "getopt.c", helper_dir + "getopt_long.c", helper_dir + "gettimeofday.c"]
+ thirdparty_sources += Glob(thirdparty_dir + "lib/plat/windows/*.c") + [helper_dir + src for src in ["getopt.c", "getopt_long.c", "gettimeofday.c"]]
else: # Unix socket
- thirdparty_sources += ["plat/lws-plat-unix.c"]
-
- thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+ thirdparty_sources += Glob(thirdparty_dir + "lib/plat/unix/*.c")
- env_lws.Append(CPPPATH=[thirdparty_dir])
+ env_lws.Append(CPPPATH=[thirdparty_dir + 'include/'])
if env['builtin_mbedtls']:
mbedtls_includes = "#thirdparty/mbedtls/include"
env_lws.Prepend(CPPPATH=[mbedtls_includes])
- wrapper_includes = ["#thirdparty/libwebsockets/tls/mbedtls/wrapper/include/" + inc for inc in ["internal", "openssl", "platform", ""]]
+ wrapper_includes = ["#thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/" + inc for inc in ["internal", "openssl", "platform", ""]]
env_lws.Prepend(CPPPATH=wrapper_includes)
if env["platform"] == "windows" or env["platform"] == "uwp":
- env_lws.Append(CPPPATH=[thirdparty_dir + helper_dir])
+ env_lws.Append(CPPPATH=[helper_dir])
if env["platform"] == "uwp":
env_lws.Append(CCFLAGS=["/DLWS_MINGW_SUPPORT"])
env_thirdparty = env_lws.Clone()
env_thirdparty.disable_warnings()
+ env_thirdparty.Append(CPPPATH=[thirdparty_dir + 'lib/'])
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
env_lws.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/websocket/lws_client.cpp b/modules/websocket/lws_client.cpp
index 2fbb46f3e2..d09558ab22 100644
--- a/modules/websocket/lws_client.cpp
+++ b/modules/websocket/lws_client.cpp
@@ -34,7 +34,10 @@
#include "core/io/ip.h"
#include "core/io/stream_peer_ssl.h"
#include "core/project_settings.h"
-#include "tls/mbedtls/wrapper/include/openssl/ssl.h"
+#if defined(LWS_OPENSSL_SUPPORT)
+// Not openssl, just the mbedtls wrapper
+#include "openssl/ssl.h"
+#endif
Error LWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, PoolVector<String> p_protocols) {
@@ -121,6 +124,7 @@ int LWSClient::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
LWSPeer::PeerData *peer_data = (LWSPeer::PeerData *)user;
switch (reason) {
+#if defined(LWS_OPENSSL_SUPPORT)
case LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS: {
PoolByteArray arr = StreamPeerSSL::get_project_cert_array();
if (arr.size() > 0)
@@ -128,7 +132,7 @@ int LWSClient::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
else if (verify_ssl)
WARN_PRINTS("No CA cert specified in project settings, SSL will not work");
} break;
-
+#endif
case LWS_CALLBACK_CLIENT_ESTABLISHED:
peer->set_wsi(wsi, _in_buf_size, _in_pkt_size, _out_buf_size, _out_pkt_size);
peer_data->peer_id = 0;
@@ -144,9 +148,9 @@ int LWSClient::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
case LWS_CALLBACK_WS_PEER_INITIATED_CLOSE: {
int code;
- String reason = peer->get_close_reason(in, len, code);
+ String reason2 = peer->get_close_reason(in, len, code);
peer_data->clean_close = true;
- _on_close_request(code, reason);
+ _on_close_request(code, reason2);
return 0;
}
diff --git a/modules/websocket/lws_peer.cpp b/modules/websocket/lws_peer.cpp
index 8afcdfe62e..a7c85450fa 100644
--- a/modules/websocket/lws_peer.cpp
+++ b/modules/websocket/lws_peer.cpp
@@ -102,7 +102,7 @@ Error LWSPeer::write_wsi() {
return OK;
int read = 0;
- uint8_t is_string;
+ uint8_t is_string = 0;
PoolVector<uint8_t>::Write rw = _packet_buffer.write();
_out_buffer.read_packet(&(rw[LWS_PRE]), _packet_buffer.size() - LWS_PRE, &is_string, read);
diff --git a/modules/websocket/lws_server.cpp b/modules/websocket/lws_server.cpp
index fe7da99a9f..61ccdca74a 100644
--- a/modules/websocket/lws_server.cpp
+++ b/modules/websocket/lws_server.cpp
@@ -109,9 +109,9 @@ int LWSServer::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
if (_peer_map.has(id)) {
int code;
Ref<LWSPeer> peer = _peer_map[id];
- String reason = peer->get_close_reason(in, len, code);
+ String reason2 = peer->get_close_reason(in, len, code);
peer_data->clean_close = true;
- _on_close_request(id, code, reason);
+ _on_close_request(id, code, reason2);
}
return 0;
}
diff --git a/modules/websocket/packet_buffer.h b/modules/websocket/packet_buffer.h
index 5794288c2b..47786a87a6 100644
--- a/modules/websocket/packet_buffer.h
+++ b/modules/websocket/packet_buffer.h
@@ -50,7 +50,7 @@ public:
Error write_packet(const uint8_t *p_payload, uint32_t p_size, const T *p_info) {
#ifdef TOOLS_ENABLED
// Verbose buffer warnings
- if (p_payload && _payload.space_left() < p_size) {
+ if (p_payload && _payload.space_left() < (int32_t)p_size) {
ERR_PRINT("Buffer payload full! Dropping data.");
ERR_FAIL_V(ERR_OUT_OF_MEMORY);
}
@@ -83,8 +83,8 @@ public:
ERR_FAIL_COND_V(_packets.data_left() < 1, ERR_UNAVAILABLE);
_Packet p;
_packets.read(&p, 1);
- ERR_FAIL_COND_V(_payload.data_left() < p.size, ERR_BUG);
- ERR_FAIL_COND_V(p_bytes < p.size, ERR_OUT_OF_MEMORY);
+ ERR_FAIL_COND_V(_payload.data_left() < (int)p.size, ERR_BUG);
+ ERR_FAIL_COND_V(p_bytes < (int)p.size, ERR_OUT_OF_MEMORY);
r_read = p.size;
copymem(r_info, &p.info, sizeof(T));
diff --git a/modules/websocket/websocket_client.h b/modules/websocket/websocket_client.h
index 32db719435..c464d97c7f 100644
--- a/modules/websocket/websocket_client.h
+++ b/modules/websocket/websocket_client.h
@@ -32,7 +32,7 @@
#define WEBSOCKET_CLIENT_H
#include "core/error_list.h"
-#include "websocket_multiplayer.h"
+#include "websocket_multiplayer_peer.h"
#include "websocket_peer.h"
class WebSocketClient : public WebSocketMultiplayerPeer {
diff --git a/modules/websocket/websocket_multiplayer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index 11caac944b..6aab8a7e81 100644
--- a/modules/websocket/websocket_multiplayer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* websocket_multiplayer.cpp */
+/* websocket_multiplayer_peer.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "websocket_multiplayer.h"
+#include "websocket_multiplayer_peer.h"
+
#include "core/os/os.h"
WebSocketMultiplayerPeer::WebSocketMultiplayerPeer() {
@@ -212,7 +213,7 @@ void WebSocketMultiplayerPeer::_send_add(int32_t p_peer_id) {
_send_sys(get_peer(p_peer_id), SYS_ADD, 1);
for (Map<int, Ref<WebSocketPeer> >::Element *E = _peer_map.front(); E; E = E->next()) {
- uint32_t id = E->key();
+ int32_t id = E->key();
if (p_peer_id == id)
continue; // Skip the newwly added peer (already confirmed)
@@ -225,7 +226,7 @@ void WebSocketMultiplayerPeer::_send_add(int32_t p_peer_id) {
void WebSocketMultiplayerPeer::_send_del(int32_t p_peer_id) {
for (Map<int, Ref<WebSocketPeer> >::Element *E = _peer_map.front(); E; E = E->next()) {
- uint32_t id = E->key();
+ int32_t id = E->key();
if (p_peer_id != id)
_send_sys(get_peer(id), SYS_DEL, p_peer_id);
}
@@ -287,7 +288,7 @@ void WebSocketMultiplayerPeer::_process_multiplayer(Ref<WebSocketPeer> p_peer, u
data_size = size - PROTO_SIZE;
uint8_t type = 0;
- int32_t from = 0;
+ uint32_t from = 0;
int32_t to = 0;
copymem(&type, in_buffer, 1);
copymem(&from, &in_buffer[1], 4);
diff --git a/modules/websocket/websocket_multiplayer.h b/modules/websocket/websocket_multiplayer_peer.h
index 1aecad97a0..b050449ee0 100644
--- a/modules/websocket/websocket_multiplayer.h
+++ b/modules/websocket/websocket_multiplayer_peer.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* websocket_multiplayer.h */
+/* websocket_multiplayer_peer.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
diff --git a/modules/websocket/websocket_server.h b/modules/websocket/websocket_server.h
index 3f3e46db5a..7a94c4047b 100644
--- a/modules/websocket/websocket_server.h
+++ b/modules/websocket/websocket_server.h
@@ -32,7 +32,7 @@
#define WEBSOCKET_H
#include "core/reference.h"
-#include "websocket_multiplayer.h"
+#include "websocket_multiplayer_peer.h"
#include "websocket_peer.h"
class WebSocketServer : public WebSocketMultiplayerPeer {
diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp
index 840dd371ac..903b57f017 100644
--- a/modules/xatlas_unwrap/register_types.cpp
+++ b/modules/xatlas_unwrap/register_types.cpp
@@ -108,7 +108,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
float max_x = 0;
float max_y = 0;
- for (int i = 0; i < output->vertexCount; i++) {
+ for (uint32_t i = 0; i < output->vertexCount; i++) {
(*r_vertex)[i] = output->vertexArray[i].xref;
(*r_uv)[i * 2 + 0] = output->vertexArray[i].uv[0] / w;
(*r_uv)[i * 2 + 1] = output->vertexArray[i].uv[1] / h;
@@ -119,7 +119,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
printf("final texsize: %f,%f - max %f,%f\n", w, h, max_x, max_y);
*r_vertex_count = output->vertexCount;
- for (int i = 0; i < output->indexCount; i++) {
+ for (uint32_t i = 0; i < output->indexCount; i++) {
(*r_index)[i] = output->indexArray[i];
}
diff --git a/platform/android/AndroidManifest.xml.template b/platform/android/AndroidManifest.xml.template
index d8fb9326ea..daaf847f11 100644
--- a/platform/android/AndroidManifest.xml.template
+++ b/platform/android/AndroidManifest.xml.template
@@ -36,4 +36,9 @@ $$ADD_APPLICATION_CHUNKS$$
</application>
+ <instrumentation android:icon="@drawable/icon"
+ android:label="@string/godot_project_name_string"
+ android:name="org.godotengine.godot.GodotInstrumentation"
+ android:targetPackage="com.godot.game" />
+
</manifest>
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index e259380a63..8913950fac 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -211,6 +211,119 @@ void AudioDriverOpenSL::start() {
active = true;
}
+void AudioDriverOpenSL::_record_buffer_callback(SLAndroidSimpleBufferQueueItf queueItf) {
+
+ for (int i = 0; i < rec_buffer.size(); i++) {
+ int32_t sample = rec_buffer[i] << 16;
+ input_buffer_write(sample);
+ input_buffer_write(sample); // call twice to convert to Stereo
+ }
+
+ SLresult res = (*recordBufferQueueItf)->Enqueue(recordBufferQueueItf, rec_buffer.ptrw(), rec_buffer.size() * sizeof(int16_t));
+ ERR_FAIL_COND(res != SL_RESULT_SUCCESS);
+}
+
+void AudioDriverOpenSL::_record_buffer_callbacks(SLAndroidSimpleBufferQueueItf queueItf, void *pContext) {
+
+ AudioDriverOpenSL *ad = (AudioDriverOpenSL *)pContext;
+
+ ad->_record_buffer_callback(queueItf);
+}
+
+Error AudioDriverOpenSL::capture_init_device() {
+
+ SLDataLocator_IODevice loc_dev = {
+ SL_DATALOCATOR_IODEVICE,
+ SL_IODEVICE_AUDIOINPUT,
+ SL_DEFAULTDEVICEID_AUDIOINPUT,
+ NULL
+ };
+ SLDataSource recSource = { &loc_dev, NULL };
+
+ SLDataLocator_AndroidSimpleBufferQueue loc_bq = {
+ SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE,
+ 2
+ };
+ SLDataFormat_PCM format_pcm = {
+ SL_DATAFORMAT_PCM,
+ 1,
+ SL_SAMPLINGRATE_44_1,
+ SL_PCMSAMPLEFORMAT_FIXED_16,
+ SL_PCMSAMPLEFORMAT_FIXED_16,
+ SL_SPEAKER_FRONT_CENTER,
+ SL_BYTEORDER_LITTLEENDIAN
+ };
+ SLDataSink recSnk = { &loc_bq, &format_pcm };
+
+ const SLInterfaceID ids[2] = { SL_IID_ANDROIDSIMPLEBUFFERQUEUE, SL_IID_ANDROIDCONFIGURATION };
+ const SLboolean req[2] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE };
+
+ SLresult res = (*EngineItf)->CreateAudioRecorder(EngineItf, &recorder, &recSource, &recSnk, 2, ids, req);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ res = (*recorder)->Realize(recorder, SL_BOOLEAN_FALSE);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ res = (*recorder)->GetInterface(recorder, SL_IID_RECORD, (void *)&recordItf);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ res = (*recorder)->GetInterface(recorder, SL_IID_ANDROIDSIMPLEBUFFERQUEUE, (void *)&recordBufferQueueItf);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ res = (*recordBufferQueueItf)->RegisterCallback(recordBufferQueueItf, _record_buffer_callbacks, this);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ SLuint32 state;
+ res = (*recordItf)->GetRecordState(recordItf, &state);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ if (state != SL_RECORDSTATE_STOPPED) {
+ res = (*recordItf)->SetRecordState(recordItf, SL_RECORDSTATE_STOPPED);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ res = (*recordBufferQueueItf)->Clear(recordBufferQueueItf);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+ }
+
+ const int rec_buffer_frames = 2048;
+ rec_buffer.resize(rec_buffer_frames);
+ input_buffer_init(rec_buffer_frames);
+
+ res = (*recordBufferQueueItf)->Enqueue(recordBufferQueueItf, rec_buffer.ptrw(), rec_buffer.size() * sizeof(int16_t));
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ res = (*recordItf)->SetRecordState(recordItf, SL_RECORDSTATE_RECORDING);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ return OK;
+}
+
+Error AudioDriverOpenSL::capture_start() {
+
+ if (OS::get_singleton()->request_permission("RECORD_AUDIO")) {
+ return capture_init_device();
+ }
+
+ return OK;
+}
+
+Error AudioDriverOpenSL::capture_stop() {
+
+ SLuint32 state;
+ SLresult res = (*recordItf)->GetRecordState(recordItf, &state);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ if (state != SL_RECORDSTATE_STOPPED) {
+ res = (*recordItf)->SetRecordState(recordItf, SL_RECORDSTATE_STOPPED);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+
+ res = (*recordBufferQueueItf)->Clear(recordBufferQueueItf);
+ ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);
+ }
+
+ return OK;
+}
+
int AudioDriverOpenSL::get_mix_rate() const {
return 44100;
diff --git a/platform/android/audio_driver_opensl.h b/platform/android/audio_driver_opensl.h
index 77e16e507a..2981073cec 100644
--- a/platform/android/audio_driver_opensl.h
+++ b/platform/android/audio_driver_opensl.h
@@ -54,13 +54,18 @@ class AudioDriverOpenSL : public AudioDriver {
int32_t *mixdown_buffer;
int last_free;
+ Vector<int16_t> rec_buffer;
+
SLPlayItf playItf;
+ SLRecordItf recordItf;
SLObjectItf sl;
SLEngineItf EngineItf;
SLObjectItf OutputMix;
SLVolumeItf volumeItf;
SLObjectItf player;
+ SLObjectItf recorder;
SLAndroidSimpleBufferQueueItf bufferQueueItf;
+ SLAndroidSimpleBufferQueueItf recordBufferQueueItf;
SLDataSource audioSource;
SLDataFormat_PCM pcm;
SLDataSink audioSink;
@@ -76,6 +81,15 @@ class AudioDriverOpenSL : public AudioDriver {
SLAndroidSimpleBufferQueueItf queueItf,
void *pContext);
+ void _record_buffer_callback(
+ SLAndroidSimpleBufferQueueItf queueItf);
+
+ static void _record_buffer_callbacks(
+ SLAndroidSimpleBufferQueueItf queueItf,
+ void *pContext);
+
+ virtual Error capture_init_device();
+
public:
void set_singleton();
@@ -91,6 +105,9 @@ public:
virtual void set_pause(bool p_pause);
+ virtual Error capture_start();
+ virtual Error capture_stop();
+
AudioDriverOpenSL();
};
diff --git a/platform/android/detect.py b/platform/android/detect.py
index aa48252435..80cda68a9e 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -298,12 +298,6 @@ def configure(env):
env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED', '-DNO_FCNTL'])
env.Append(LIBS=['OpenSLES', 'EGL', 'GLESv3', 'android', 'log', 'z', 'dl'])
- # TODO: Move that to opus module's config
- if 'module_opus_enabled' in env and env['module_opus_enabled']:
- if (env["android_arch"] == "armv6" or env["android_arch"] == "armv7"):
- env.Append(CFLAGS=["-DOPUS_ARM_OPT"])
- env.opus_fixed_point = "yes"
-
# Return NDK version string in source.properties (adapted from the Chromium project).
def get_ndk_version(path):
if path is None:
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index 4b3d93aaa7..8c464465ca 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -31,6 +31,7 @@
#include "dir_access_jandroid.h"
#include "core/print_string.h"
#include "file_access_jandroid.h"
+#include "string_android.h"
#include "thread_jandroid.h"
jobject DirAccessJAndroid::io = NULL;
@@ -69,7 +70,7 @@ String DirAccessJAndroid::get_next() {
if (!str)
return "";
- String ret = String::utf8(env->GetStringUTFChars((jstring)str, NULL));
+ String ret = jstring_to_string((jstring)str, env);
env->DeleteLocalRef((jobject)str);
return ret;
}
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index f293eef2ba..e489bce3f8 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -206,9 +206,9 @@ static const LauncherIcon launcher_icons[] = {
{ "launcher_icons/mdpi_48x48", "res/drawable-mdpi-v4/icon.png" }
};
-class EditorExportAndroid : public EditorExportPlatform {
+class EditorExportPlatformAndroid : public EditorExportPlatform {
- GDCLASS(EditorExportAndroid, EditorExportPlatform)
+ GDCLASS(EditorExportPlatformAndroid, EditorExportPlatform)
Ref<ImageTexture> logo;
Ref<ImageTexture> run_icon;
@@ -235,7 +235,7 @@ class EditorExportAndroid : public EditorExportPlatform {
static void _device_poll_thread(void *ud) {
- EditorExportAndroid *ea = (EditorExportAndroid *)ud;
+ EditorExportPlatformAndroid *ea = (EditorExportPlatformAndroid *)ud;
while (!ea->quit_request) {
@@ -301,10 +301,10 @@ class EditorExportAndroid : public EditorExportPlatform {
args.push_back(d.id);
args.push_back("shell");
args.push_back("getprop");
- int ec;
+ int ec2;
String dp;
- OS::get_singleton()->execute(adb, args, true, NULL, &dp, &ec);
+ OS::get_singleton()->execute(adb, args, true, NULL, &dp, &ec2);
Vector<String> props = dp.split("\n");
String vendor;
@@ -658,6 +658,8 @@ class EditorExportAndroid : public EditorExportPlatform {
int orientation = p_preset->get("screen/orientation");
+ bool min_gles3 = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name") == "GLES3" &&
+ !ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2");
bool screen_support_small = p_preset->get("screen/support_small");
bool screen_support_normal = p_preset->get("screen/support_normal");
bool screen_support_large = p_preset->get("screen/support_large");
@@ -815,6 +817,11 @@ class EditorExportAndroid : public EditorExportPlatform {
}
}
+ if (tname == "uses-feature" && attrname == "glEsVersion") {
+
+ encode_uint32(min_gles3 ? 0x00030000 : 0x00020000, &p_manifest.write[iofs + 16]);
+ }
+
iofs += 20;
}
@@ -1114,17 +1121,14 @@ public:
public:
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
- // Re-enable when a GLES 2.0 backend is read
- /*int api = p_preset->get("graphics/api");
- if (api == 0)
- r_features->push_back("etc");
- else*/
String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
- if (driver == "GLES2" || driver == "GLES3") {
+ if (driver == "GLES2") {
r_features->push_back("etc");
- }
- if (driver == "GLES3") {
+ } else if (driver == "GLES3") {
r_features->push_back("etc2");
+ if (ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2")) {
+ r_features->push_back("etc");
+ }
}
Vector<String> abis = get_enabled_abis(p_preset);
@@ -1453,6 +1457,12 @@ public:
err += TTR("Invalid package name:") + " " + pn_err + "\n";
}
+ String etc_error = test_etc2();
+ if (etc_error != String()) {
+ valid = false;
+ err += etc_error;
+ }
+
r_error = err;
return valid;
}
@@ -1489,6 +1499,10 @@ public:
}
}
+ if (!DirAccess::exists(p_path.get_base_dir())) {
+ return ERR_FILE_BAD_PATH;
+ }
+
FileAccess *src_f = NULL;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
@@ -1925,7 +1939,7 @@ public:
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
}
- EditorExportAndroid() {
+ EditorExportPlatformAndroid() {
Ref<Image> img = memnew(Image(_android_logo));
logo.instance();
@@ -1941,7 +1955,7 @@ public:
device_thread = Thread::create(_device_poll_thread, this);
}
- ~EditorExportAndroid() {
+ ~EditorExportPlatformAndroid() {
quit_request = true;
Thread::wait_to_finish(device_thread);
memdelete(device_lock);
@@ -1969,6 +1983,6 @@ void register_android_exporter() {
EDITOR_DEF("export/android/timestamping_authority_url", "");
EDITOR_DEF("export/android/shutdown_adb_on_exit", true);
- Ref<EditorExportAndroid> exporter = Ref<EditorExportAndroid>(memnew(EditorExportAndroid));
+ Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>(memnew(EditorExportPlatformAndroid));
EditorExport::get_singleton()->add_export_platform(exporter);
}
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index a10d7876f4..e42099ba0b 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -38,12 +38,14 @@ import android.app.AlertDialog;
import android.app.PendingIntent;
import android.content.ClipData;
import android.content.ClipboardManager;
+import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.ConfigurationInfo;
+import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Point;
import android.graphics.Rect;
@@ -51,11 +53,13 @@ import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
+import android.Manifest;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Messenger;
import android.provider.Settings.Secure;
+import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.Display;
import android.view.KeyEvent;
@@ -98,6 +102,7 @@ import javax.microedition.khronos.opengles.GL10;
public class Godot extends Activity implements SensorEventListener, IDownloaderClient {
static final int MAX_SINGLETONS = 64;
+ static final int REQUEST_RECORD_AUDIO_PERMISSION = 1;
private IStub mDownloaderClientStub;
private IDownloaderService mRemoteService;
private TextView mStatusText;
@@ -258,6 +263,10 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
for (int i = 0; i < singleton_count; i++) {
singletons[i].onMainRequestPermissionsResult(requestCode, permissions, grantResults);
}
+
+ for (int i = 0; i < permissions.length; i++) {
+ GodotLib.requestPermissionResult(permissions[i], grantResults[i] == PackageManager.PERMISSION_GRANTED);
+ }
};
public void onVideoInit() {
@@ -318,6 +327,23 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
});
}
+ public void restart() {
+ // HACK:
+ //
+ // Currently it's very hard to properly deinitialize Godot on Android to restart the game
+ // from scratch. Therefore, we need to kill the whole app process and relaunch it.
+ //
+ // Restarting only the activity, wouldn't be enough unless it did proper cleanup (including
+ // releasing and reloading native libs or resetting their state somehow and clearing statics).
+ //
+ // Using instrumentation is a way of making the whole app process restart, because Android
+ // will kill any process of the same package which was already running.
+ //
+ Bundle args = new Bundle();
+ args.putParcelable("intent", mCurrentIntent);
+ startInstrumentation(new ComponentName(Godot.this, GodotInstrumentation.class), null, args);
+ }
+
public void alert(final String message, final String title) {
final Activity activity = this;
runOnUiThread(new Runnable() {
@@ -415,7 +441,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_GAME);
- GodotLib.initialize(this, io.needsReloadHooks(), getAssets(), use_apk_expansion);
+ GodotLib.initialize(this, getAssets(), use_apk_expansion);
result_callback = null;
@@ -918,13 +944,27 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
*/
- // Audio
+ public boolean requestPermission(String p_name) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+ // Not necessary, asked on install already
+ return true;
+ }
+
+ if (p_name.equals("RECORD_AUDIO")) {
+ if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {
+ requestPermissions(new String[] { Manifest.permission.RECORD_AUDIO }, REQUEST_RECORD_AUDIO_PERMISSION);
+ return false;
+ }
+ }
+
+ return true;
+ }
/**
- * The download state should trigger changes in the UI --- it may be useful
- * to show the state as being indeterminate at times. This sample can be
- * considered a guideline.
- */
+ * The download state should trigger changes in the UI --- it may be useful
+ * to show the state as being indeterminate at times. This sample can be
+ * considered a guideline.
+ */
@Override
public void onDownloadStateChanged(int newState) {
setState(newState);
diff --git a/platform/android/java/src/org/godotengine/godot/GodotIO.java b/platform/android/java/src/org/godotengine/godot/GodotIO.java
index 8cee20e435..1b2ff61314 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotIO.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotIO.java
@@ -500,11 +500,6 @@ public class GodotIO {
return (int)(metrics.density * 160f);
}
- public boolean needsReloadHooks() {
-
- return false;
- }
-
public void showKeyboard(String p_existing_text) {
if (edit != null)
edit.showKeyboard(p_existing_text);
@@ -516,14 +511,6 @@ public class GodotIO {
public void hideKeyboard() {
if (edit != null)
edit.hideKeyboard();
-
- InputMethodManager inputMgr = (InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
- View v = activity.getCurrentFocus();
- if (v != null) {
- inputMgr.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
- } else {
- inputMgr.hideSoftInputFromWindow(new View(activity).getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
- }
};
public void setScreenOrientation(int p_orientation) {
diff --git a/main/tests/test_image.h b/platform/android/java/src/org/godotengine/godot/GodotInstrumentation.java
index b9b3c0cb48..0466f380e8 100644
--- a/main/tests/test_image.h
+++ b/platform/android/java/src/org/godotengine/godot/GodotInstrumentation.java
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* test_image.h */
+/* GodotInstrumentation.java */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,18 +28,23 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef TEST_IMAGE_H
-#define TEST_IMAGE_H
+package org.godotengine.godot;
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
+import android.app.Instrumentation;
+import android.content.Intent;
+import android.os.Bundle;
-#include "core/os/main_loop.h"
+public class GodotInstrumentation extends Instrumentation {
+ private Intent intent;
-namespace TestImage {
+ @Override
+ public void onCreate(Bundle arguments) {
+ intent = arguments.getParcelable("intent");
+ start();
+ }
-MainLoop *test();
+ @Override
+ public void onStart() {
+ startActivitySync(intent);
+ }
}
-
-#endif
diff --git a/platform/android/java/src/org/godotengine/godot/GodotLib.java b/platform/android/java/src/org/godotengine/godot/GodotLib.java
index 29e7918645..6e6b398a5d 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotLib.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotLib.java
@@ -45,9 +45,9 @@ public class GodotLib {
* @param height the current view height
*/
- public static native void initialize(Godot p_instance, boolean need_reload_hook, Object p_asset_manager, boolean use_apk_expansion);
+ public static native void initialize(Godot p_instance, Object p_asset_manager, boolean use_apk_expansion);
public static native void setup(String[] p_cmdline);
- public static native void resize(int width, int height, boolean reload);
+ public static native void resize(int width, int height);
public static native void newcontext(boolean p_32_bits);
public static native void back();
public static native void step();
@@ -69,6 +69,7 @@ public class GodotLib {
public static native String getGlobal(String p_key);
public static native void callobject(int p_ID, String p_method, Object[] p_params);
public static native void calldeferred(int p_ID, String p_method, Object[] p_params);
+ public static native void requestPermissionResult(String p_permission, boolean p_result);
public static native void setVirtualKeyboardHeight(int p_height);
}
diff --git a/platform/android/java/src/org/godotengine/godot/GodotView.java b/platform/android/java/src/org/godotengine/godot/GodotView.java
index ba8e8bd07b..ccf78f26f3 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotView.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotView.java
@@ -79,7 +79,6 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
private Context ctx;
private GodotIO io;
- private static boolean firsttime = true;
private static boolean use_gl3 = false;
private static boolean use_32 = false;
private static boolean use_debug_opengl = false;
@@ -97,10 +96,8 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
activity = p_activity;
- if (!p_io.needsReloadHooks()) {
- //will only work on SDK 11+!!
- setPreserveEGLContextOnPause(true);
- }
+ setPreserveEGLContextOnPause(true);
+
mInputManager = InputManagerCompat.Factory.getInputManager(this.getContext());
mInputManager.registerInputDeviceListener(this, null);
init(false, 16, 0);
@@ -718,8 +715,7 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
public void onSurfaceChanged(GL10 gl, int width, int height) {
- GodotLib.resize(width, height, !firsttime);
- firsttime = false;
+ GodotLib.resize(width, height);
for (int i = 0; i < Godot.singleton_count; i++) {
Godot.singletons[i].onGLSurfaceChanged(gl, width, height);
}
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index 4be1106967..2bed1f0892 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "java_class_wrapper.h"
+#include "string_android.h"
#include "thread_jandroid.h"
bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error, Variant &ret) {
@@ -553,7 +554,7 @@ void JavaClassWrapper::_bind_methods() {
bool JavaClassWrapper::_get_type_sig(JNIEnv *env, jobject obj, uint32_t &sig, String &strsig) {
jstring name2 = (jstring)env->CallObjectMethod(obj, Class_getName);
- String str_type = env->GetStringUTFChars(name2, NULL);
+ String str_type = jstring_to_string(name2, env);
env->DeleteLocalRef(name2);
uint32_t t = 0;
@@ -697,7 +698,7 @@ bool JavaClass::_convert_object_to_variant(JNIEnv *env, jobject obj, Variant &va
} break;
case ARG_TYPE_STRING: {
- var = String::utf8(env->GetStringUTFChars((jstring)obj, NULL));
+ var = jstring_to_string((jstring)obj, env);
return true;
} break;
case ARG_TYPE_CLASS: {
@@ -1030,7 +1031,7 @@ bool JavaClass::_convert_object_to_variant(JNIEnv *env, jobject obj, Variant &va
if (!o)
ret.push_back(Variant());
else {
- String val = String::utf8(env->GetStringUTFChars((jstring)o, NULL));
+ String val = jstring_to_string((jstring)o, env);
ret.push_back(val);
}
env->DeleteLocalRef(o);
@@ -1075,7 +1076,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
ERR_CONTINUE(!obj);
jstring name = (jstring)env->CallObjectMethod(obj, getName);
- String str_method = env->GetStringUTFChars(name, NULL);
+ String str_method = jstring_to_string(name, env);
env->DeleteLocalRef(name);
Vector<String> params;
@@ -1204,7 +1205,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
ERR_CONTINUE(!obj);
jstring name = (jstring)env->CallObjectMethod(obj, Field_getName);
- String str_field = env->GetStringUTFChars(name, NULL);
+ String str_field = jstring_to_string(name, env);
env->DeleteLocalRef(name);
int mods = env->CallIntMethod(obj, Field_getModifiers);
if ((mods & 0x8) && (mods & 0x10) && (mods & 0x1)) { //static final public!
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 885fb185a7..e9c0e5564f 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -41,6 +41,7 @@
#include "main/input_default.h"
#include "main/main.h"
#include "os_android.h"
+#include "string_android.h"
#include "thread_jandroid.h"
#include <unistd.h>
@@ -223,7 +224,7 @@ String _get_class_name(JNIEnv *env, jclass cls, bool *array) {
jboolean isarr = env->CallBooleanMethod(cls, isArray);
(*array) = isarr ? true : false;
}
- String name = env->GetStringUTFChars(clsName, NULL);
+ String name = jstring_to_string(clsName, env);
env->DeleteLocalRef(clsName);
return name;
@@ -241,7 +242,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
if (name == "java.lang.String") {
- return String::utf8(env->GetStringUTFChars((jstring)obj, NULL));
+ return jstring_to_string((jstring)obj, env);
};
if (name == "[Ljava.lang.String;") {
@@ -252,7 +253,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
for (int i = 0; i < stringCount; i++) {
jstring string = (jstring)env->GetObjectArrayElement(arr, i);
- sarr.push_back(String::utf8(env->GetStringUTFChars(string, NULL)));
+ sarr.push_back(jstring_to_string(string, env));
env->DeleteLocalRef(string);
}
@@ -487,7 +488,7 @@ public:
case Variant::STRING: {
jobject o = env->CallObjectMethodA(instance, E->get().method, v);
- ret = String::utf8(env->GetStringUTFChars((jstring)o, NULL));
+ ret = jstring_to_string((jstring)o, env);
env->DeleteLocalRef(o);
} break;
case Variant::POOL_STRING_ARRAY: {
@@ -598,6 +599,7 @@ static jobject godot_io;
typedef void (*GFXInitFunc)(void *ud, bool gl2);
static jmethodID _on_video_init = 0;
+static jmethodID _restart = 0;
static jobject _godot_instance;
static jmethodID _openURI = 0;
@@ -619,6 +621,7 @@ static jmethodID _pauseVideo = 0;
static jmethodID _stopVideo = 0;
static jmethodID _setKeepScreenOn = 0;
static jmethodID _alertDialog = 0;
+static jmethodID _requestPermission = 0;
static void _gfx_init_func(void *ud, bool gl2) {
}
@@ -634,20 +637,20 @@ static String _get_user_data_dir() {
JNIEnv *env = ThreadAndroid::get_env();
jstring s = (jstring)env->CallObjectMethod(godot_io, _getDataDir);
- return String(env->GetStringUTFChars(s, NULL));
+ return jstring_to_string(s, env);
}
static String _get_locale() {
JNIEnv *env = ThreadAndroid::get_env();
jstring s = (jstring)env->CallObjectMethod(godot_io, _getLocale);
- return String(env->GetStringUTFChars(s, NULL));
+ return jstring_to_string(s, env);
}
static String _get_clipboard() {
JNIEnv *env = ThreadAndroid::get_env();
jstring s = (jstring)env->CallObjectMethod(_godot_instance, _getClipboard);
- return String(env->GetStringUTFChars(s, NULL));
+ return jstring_to_string(s, env);
}
static void _set_clipboard(const String &p_text) {
@@ -661,7 +664,7 @@ static String _get_model() {
JNIEnv *env = ThreadAndroid::get_env();
jstring s = (jstring)env->CallObjectMethod(godot_io, _getModel);
- return String(env->GetStringUTFChars(s, NULL));
+ return jstring_to_string(s, env);
}
static int _get_screen_dpi() {
@@ -674,7 +677,7 @@ static String _get_unique_id() {
JNIEnv *env = ThreadAndroid::get_env();
jstring s = (jstring)env->CallObjectMethod(godot_io, _getUniqueID);
- return String(env->GetStringUTFChars(s, NULL));
+ return jstring_to_string(s, env);
}
static void _show_vk(const String &p_existing) {
@@ -694,7 +697,7 @@ static String _get_system_dir(int p_dir) {
JNIEnv *env = ThreadAndroid::get_env();
jstring s = (jstring)env->CallObjectMethod(godot_io, _getSystemDir, p_dir);
- return String(env->GetStringUTFChars(s, NULL));
+ return jstring_to_string(s, env);
}
static int _get_gles_version_code() {
@@ -744,6 +747,12 @@ static void _alert(const String &p_message, const String &p_title) {
env->CallVoidMethod(_godot_instance, _alertDialog, jStrMessage, jStrTitle);
}
+static bool _request_permission(const String &p_name) {
+ JNIEnv *env = ThreadAndroid::get_env();
+ jstring jStrName = env->NewStringUTF(p_name.utf8().get_data());
+ return env->CallBooleanMethod(_godot_instance, _requestPermission, jStrName);
+}
+
// volatile because it can be changed from non-main thread and we need to
// ensure the change is immediately visible to other threads.
static volatile int virtual_keyboard_height;
@@ -756,7 +765,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHei
virtual_keyboard_height = p_height;
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobject p_asset_manager, jboolean p_use_apk_expansion) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jobject p_asset_manager, jboolean p_use_apk_expansion) {
initialized = true;
@@ -782,11 +791,13 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
godot_io = gob;
_on_video_init = env->GetMethodID(cls, "onVideoInit", "()V");
+ _restart = env->GetMethodID(cls, "restart", "()V");
_setKeepScreenOn = env->GetMethodID(cls, "setKeepScreenOn", "(Z)V");
_alertDialog = env->GetMethodID(cls, "alert", "(Ljava/lang/String;Ljava/lang/String;)V");
_getGLESVersionCode = env->GetMethodID(cls, "getGLESVersionCode", "()I");
_getClipboard = env->GetMethodID(cls, "getClipboard", "()Ljava/lang/String;");
_setClipboard = env->GetMethodID(cls, "setClipboard", "(Ljava/lang/String;)V");
+ _requestPermission = env->GetMethodID(cls, "requestPermission", "(Ljava/lang/String;)Z");
if (cls) {
jclass c = env->GetObjectClass(gob);
@@ -819,8 +830,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
AudioDriverAndroid::setup(gob);
}
- os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_user_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _get_vk_height, _set_screen_orient, _get_unique_id, _get_system_dir, _get_gles_version_code, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, _set_clipboard, _get_clipboard, p_use_apk_expansion);
- os_android->set_need_reload_hooks(p_need_reload_hook);
+ os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_user_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _get_vk_height, _set_screen_orient, _get_unique_id, _get_system_dir, _get_gles_version_code, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, _set_clipboard, _get_clipboard, _request_permission, p_use_apk_expansion);
char wd[500];
getcwd(wd, 500);
@@ -831,7 +841,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
static void _initialize_java_modules() {
if (!ProjectSettings::get_singleton()->has_setting("android/modules")) {
- print_line("Android modules: Nothing to load, aborting");
return;
}
@@ -851,19 +860,16 @@ static void _initialize_java_modules() {
jmethodID getClassLoader = env->GetMethodID(activityClass, "getClassLoader", "()Ljava/lang/ClassLoader;");
jobject cls = env->CallObjectMethod(_godot_instance, getClassLoader);
- //cls=env->NewGlobalRef(cls);
jclass classLoader = env->FindClass("java/lang/ClassLoader");
- //classLoader=(jclass)env->NewGlobalRef(classLoader);
jmethodID findClass = env->GetMethodID(classLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;");
for (int i = 0; i < mods.size(); i++) {
String m = mods[i];
- //jclass singletonClass = env->FindClass(m.utf8().get_data());
- print_line("Loading module: " + m);
+ print_line("Loading Android module: " + m);
jstring strClassName = env->NewStringUTF(m.utf8().get_data());
jclass singletonClass = (jclass)env->CallObjectMethod(cls, findClass, strClassName);
@@ -872,7 +878,6 @@ static void _initialize_java_modules() {
ERR_EXPLAIN("Couldn't find singleton for class: " + m);
ERR_CONTINUE(!singletonClass);
}
- //singletonClass=(jclass)env->NewGlobalRef(singletonClass);
jmethodID initialize = env->GetStaticMethodID(singletonClass, "initialize", "(Landroid/app/Activity;)Lorg/godotengine/godot/Godot$SingletonBase;");
@@ -891,12 +896,14 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
ThreadAndroid::setup_thread();
const char **cmdline = NULL;
+ jstring *j_cmdline = NULL;
int cmdlen = 0;
if (p_cmdline) {
cmdlen = env->GetArrayLength(p_cmdline);
if (cmdlen) {
- cmdline = (const char **)malloc((env->GetArrayLength(p_cmdline) + 1) * sizeof(const char *));
+ cmdline = (const char **)malloc((cmdlen + 1) * sizeof(const char *));
cmdline[cmdlen] = NULL;
+ j_cmdline = (jstring *)malloc(cmdlen * sizeof(jstring));
for (int i = 0; i < cmdlen; i++) {
@@ -904,12 +911,19 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
const char *rawString = env->GetStringUTFChars(string, 0);
cmdline[i] = rawString;
+ j_cmdline[i] = string;
}
}
}
Error err = Main::setup("apk", cmdlen, (char **)cmdline, false);
if (cmdline) {
+ if (j_cmdline) {
+ for (int i = 0; i < cmdlen; ++i) {
+ env->ReleaseStringUTFChars(j_cmdline[i], cmdline[i]);
+ }
+ free(j_cmdline);
+ }
free(cmdline);
}
@@ -922,7 +936,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
_initialize_java_modules();
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height, jboolean reload) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height) {
if (os_android)
os_android->set_display_size(Size2(width, height));
@@ -931,12 +945,15 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, j
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits) {
if (os_android) {
- os_android->set_context_is_16_bits(!p_32_bits);
- }
-
- if (os_android && step > 0) {
-
- os_android->reload_gfx();
+ if (step == 0) {
+ // During startup
+ os_android->set_context_is_16_bits(!p_32_bits);
+ } else {
+ // GL context recreated because it was lost; restart app to let it reload everything
+ os_android->main_loop_end();
+ env->CallVoidMethod(_godot_instance, _restart);
+ step = -1; // Ensure no further steps are attempted
+ }
}
}
@@ -948,6 +965,9 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, job
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj) {
+ if (step == -1)
+ return;
+
if (step == 0) {
// Since Godot is initialized on the UI thread, _main_thread_id was set to that thread's id,
@@ -1313,7 +1333,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, j
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(JNIEnv *env, jobject obj, jint p_device, jboolean p_connected, jstring p_name) {
if (os_android) {
- String name = env->GetStringUTFChars(p_name, NULL);
+ String name = jstring_to_string(p_name, env);
os_android->joy_connection_changed(p_device, p_connected, name);
}
}
@@ -1386,7 +1406,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_audio(JNIEnv *env, jo
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_singleton(JNIEnv *env, jobject obj, jstring name, jobject p_object) {
- String singname = env->GetStringUTFChars(name, NULL);
+ String singname = jstring_to_string(name, env);
JNISingleton *s = memnew(JNISingleton);
s->set_instance(env->NewGlobalRef(p_object));
jni_singletons[singname] = s;
@@ -1463,21 +1483,21 @@ static const char *get_jni_sig(const String &p_type) {
JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jobject obj, jstring path) {
- String js = env->GetStringUTFChars(path, NULL);
+ String js = jstring_to_string(path, env);
return env->NewStringUTF(ProjectSettings::get_singleton()->get(js).operator String().utf8().get_data());
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_method(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args) {
- String singname = env->GetStringUTFChars(sname, NULL);
+ String singname = jstring_to_string(sname, env);
ERR_FAIL_COND(!jni_singletons.has(singname));
JNISingleton *s = jni_singletons.get(singname);
- String mname = env->GetStringUTFChars(name, NULL);
- String retval = env->GetStringUTFChars(ret, NULL);
+ String mname = jstring_to_string(name, env);
+ String retval = jstring_to_string(ret, env);
Vector<Variant::Type> types;
String cs = "(";
@@ -1486,9 +1506,9 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_method(JNIEnv *env, j
for (int i = 0; i < stringCount; i++) {
jstring string = (jstring)env->GetObjectArrayElement(args, i);
- const char *rawString = env->GetStringUTFChars(string, 0);
- types.push_back(get_jni_type(String(rawString)));
- cs += get_jni_sig(String(rawString));
+ const String rawString = jstring_to_string(string, env);
+ types.push_back(get_jni_type(rawString));
+ cs += get_jni_sig(rawString);
}
cs += ")";
@@ -1511,7 +1531,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *en
int res = env->PushLocalFrame(16);
ERR_FAIL_COND(res != 0);
- String str_method = env->GetStringUTFChars(method, NULL);
+ String str_method = jstring_to_string(method, env);
int count = env->GetArrayLength(params);
Variant *vlist = (Variant *)alloca(sizeof(Variant) * count);
@@ -1543,7 +1563,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *
int res = env->PushLocalFrame(16);
ERR_FAIL_COND(res != 0);
- String str_method = env->GetStringUTFChars(method, NULL);
+ String str_method = jstring_to_string(method, env);
int count = env->GetArrayLength(params);
Variant args[VARIANT_ARG_MAX];
@@ -1561,6 +1581,9 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *
env->PopLocalFrame(NULL);
}
-//Main::cleanup();
-
-//return os.get_exit_code();
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResult(JNIEnv *env, jobject p_obj, jstring p_permission, jboolean p_result) {
+ String permission = jstring_to_string(p_permission, env);
+ if (permission == "android.permission.RECORD_AUDIO" && p_result) {
+ AudioDriver::get_singleton()->capture_start();
+ }
+}
diff --git a/platform/android/java_glue.h b/platform/android/java_glue.h
index e8d0d55bb3..3b93c9b42a 100644
--- a/platform/android/java_glue.h
+++ b/platform/android/java_glue.h
@@ -35,9 +35,9 @@
#include <jni.h>
extern "C" {
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobject p_asset_manager, jboolean p_use_apk_expansion);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jobject p_asset_manager, jboolean p_use_apk_expansion);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jobject obj, jobjectArray p_cmdline);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height, jboolean reload);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jobject obj);
@@ -60,6 +60,7 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *env, jobject p_obj, jint ID, jstring method, jobjectArray params);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jobject obj, jint p_height);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResult(JNIEnv *env, jobject p_obj, jstring p_permission, jboolean p_result);
}
#endif // JAVA_GLUE_H
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 2ee0b34c48..837713f9c9 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -131,7 +131,7 @@ Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) {
p_video_driver = VIDEO_DRIVER_GLES2;
use_gl3 = false;
continue;
@@ -175,7 +175,7 @@ Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
input = memnew(InputDefault);
input->set_fallback_mapping("Default Android Gamepad");
- //power_manager = memnew(power_android);
+ //power_manager = memnew(PowerAndroid);
return OK;
}
@@ -202,6 +202,12 @@ void OS_Android::alert(const String &p_alert, const String &p_title) {
alert_func(p_alert, p_title);
}
+bool OS_Android::request_permission(const String &p_name) {
+ if (request_permission_func)
+ return request_permission_func(p_name);
+ return false;
+}
+
Error OS_Android::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
p_library_handle = dlopen(p_path.utf8().get_data(), RTLD_NOW);
if (!p_library_handle) {
@@ -548,14 +554,6 @@ void OS_Android::set_display_size(Size2 p_size) {
default_videomode.height = p_size.y;
}
-void OS_Android::reload_gfx() {
-
- if (gfx_init_func)
- gfx_init_func(gfx_init_ud, use_gl2);
- //if (rasterizer)
- // rasterizer->reload_vram();
-}
-
Error OS_Android::shell_open(String p_uri) {
if (open_uri_func)
@@ -607,11 +605,6 @@ int OS_Android::get_screen_dpi(int p_screen) const {
return 160;
}
-void OS_Android::set_need_reload_hooks(bool p_needs_them) {
-
- use_reload_hooks = p_needs_them;
-}
-
String OS_Android::get_user_data_dir() const {
if (data_dir_cache != String())
@@ -706,7 +699,7 @@ String OS_Android::get_joy_guid(int p_device) const {
}
bool OS_Android::_check_internal_feature_support(const String &p_feature) {
- if (p_feature == "mobile" || p_feature == "etc" || p_feature == "etc2") {
+ if (p_feature == "mobile") {
//TODO support etc2 only if GLES3 driver is selected
return true;
}
@@ -726,7 +719,7 @@ bool OS_Android::_check_internal_feature_support(const String &p_feature) {
return false;
}
-OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetUserDataDirFunc p_get_user_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, GetGLVersionCodeFunc p_get_gl_version_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, SetClipboardFunc p_set_clipboard_func, GetClipboardFunc p_get_clipboard_func, bool p_use_apk_expansion) {
+OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetUserDataDirFunc p_get_user_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, GetGLVersionCodeFunc p_get_gl_version_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, SetClipboardFunc p_set_clipboard_func, GetClipboardFunc p_get_clipboard_func, RequestPermissionFunc p_request_permission, bool p_use_apk_expansion) {
use_apk_expansion = p_use_apk_expansion;
default_videomode.width = 800;
@@ -765,7 +758,7 @@ OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURI
set_screen_orientation_func = p_screen_orient;
set_keep_screen_on_func = p_set_keep_screen_on_func;
alert_func = p_alert_func;
- use_reload_hooks = false;
+ request_permission_func = p_request_permission;
Vector<Logger *> loggers;
loggers.push_back(memnew(AndroidLogger));
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index 3c591af4bb..44c5a206d4 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -63,6 +63,7 @@ typedef void (*VideoStopFunc)();
typedef void (*SetKeepScreenOnFunc)(bool p_enabled);
typedef void (*AlertFunc)(const String &, const String &);
typedef int (*VirtualKeyboardHeightFunc)();
+typedef bool (*RequestPermissionFunc)(const String &);
class OS_Android : public OS_Unix {
public:
@@ -94,7 +95,6 @@ private:
void *gfx_init_ud;
bool use_gl2;
- bool use_reload_hooks;
bool use_apk_expansion;
bool use_16bits_fbo;
@@ -133,8 +133,9 @@ private:
VideoStopFunc video_stop_func;
SetKeepScreenOnFunc set_keep_screen_on_func;
AlertFunc alert_func;
+ RequestPermissionFunc request_permission_func;
- //power_android *power_manager;
+ //PowerAndroid *power_manager;
int video_driver_index;
public:
@@ -160,6 +161,7 @@ public:
static OS *get_singleton();
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
+ virtual bool request_permission(const String &p_name);
virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false);
@@ -203,10 +205,8 @@ public:
void set_opengl_extensions(const char *p_gl_extensions);
void set_display_size(Size2 p_size);
- void reload_gfx();
void set_context_is_16_bits(bool p_is_16);
- void set_need_reload_hooks(bool p_needs_them);
virtual void set_screen_orientation(ScreenOrientation p_orientation);
virtual Error shell_open(String p_uri);
@@ -241,7 +241,7 @@ public:
void joy_connection_changed(int p_device, bool p_connected, String p_name);
virtual bool _check_internal_feature_support(const String &p_feature);
- OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetUserDataDirFunc p_get_user_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, GetGLVersionCodeFunc p_get_gl_version_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, SetClipboardFunc p_set_clipboard, GetClipboardFunc p_get_clipboard, bool p_use_apk_expansion);
+ OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetUserDataDirFunc p_get_user_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, GetGLVersionCodeFunc p_get_gl_version_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, SetClipboardFunc p_set_clipboard, GetClipboardFunc p_get_clipboard, RequestPermissionFunc p_request_permission, bool p_use_apk_expansion);
~OS_Android();
};
diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp
index 40b9d81189..4d2fbfbf1a 100644
--- a/platform/android/power_android.cpp
+++ b/platform/android/power_android.cpp
@@ -190,7 +190,7 @@ int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seco
return 0;
}
-bool power_android::GetPowerInfo_Android() {
+bool PowerAndroid::GetPowerInfo_Android() {
int battery;
int plugged;
int charged;
@@ -218,7 +218,7 @@ bool power_android::GetPowerInfo_Android() {
return true;
}
-OS::PowerState power_android::get_power_state() {
+OS::PowerState PowerAndroid::get_power_state() {
if (GetPowerInfo_Android()) {
return power_state;
} else {
@@ -227,7 +227,7 @@ OS::PowerState power_android::get_power_state() {
}
}
-int power_android::get_power_seconds_left() {
+int PowerAndroid::get_power_seconds_left() {
if (GetPowerInfo_Android()) {
return nsecs_left;
} else {
@@ -236,7 +236,7 @@ int power_android::get_power_seconds_left() {
}
}
-int power_android::get_power_percent_left() {
+int PowerAndroid::get_power_percent_left() {
if (GetPowerInfo_Android()) {
return percent_left;
} else {
@@ -245,11 +245,11 @@ int power_android::get_power_percent_left() {
}
}
-power_android::power_android() :
+PowerAndroid::PowerAndroid() :
nsecs_left(-1),
percent_left(-1),
power_state(OS::POWERSTATE_UNKNOWN) {
}
-power_android::~power_android() {
+PowerAndroid::~PowerAndroid() {
}
diff --git a/platform/android/power_android.h b/platform/android/power_android.h
index 9730c53674..6cb745b6c0 100644
--- a/platform/android/power_android.h
+++ b/platform/android/power_android.h
@@ -28,13 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_ANDROID_POWER_ANDROID_H_
-#define PLATFORM_ANDROID_POWER_ANDROID_H_
+#ifndef POWER_ANDROID_H
+#define POWER_ANDROID_H
#include "core/os/os.h"
+
#include <android/native_window_jni.h>
-class power_android {
+class PowerAndroid {
struct LocalReferenceHolder {
JNIEnv *m_env;
@@ -65,8 +66,8 @@ private:
public:
static int s_active;
- power_android();
- virtual ~power_android();
+ PowerAndroid();
+ virtual ~PowerAndroid();
static bool LocalReferenceHolder_Init(struct LocalReferenceHolder *refholder, JNIEnv *env);
static struct LocalReferenceHolder LocalReferenceHolder_Setup(const char *func);
static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder);
@@ -76,4 +77,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_ANDROID_POWER_ANDROID_H_ */
+#endif // POWER_ANDROID_H
diff --git a/core/os/shell.h b/platform/android/string_android.h
index c1bd995b5b..fe627a3e0c 100644
--- a/core/os/shell.h
+++ b/platform/android/string_android.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* shell.h */
+/* string_android.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,25 +28,31 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SHELL_H
-#define SHELL_H
-
-#include "core/typedefs.h"
+#ifndef STRING_ANDROID_H
+#define STRING_ANDROID_H
#include "core/ustring.h"
+#include "thread_jandroid.h"
+#include <jni.h>
/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class Shell {
-
- static Shell *singleton;
-
-public:
- static Shell *get_singleton();
- virtual void execute(String p_path) = 0;
-
- Shell();
- virtual ~Shell();
-};
+ * Converts JNI jstring to Godot String.
+ * @param source Source JNI string. If null an empty string is returned.
+ * @param env JNI environment instance. If null obtained by ThreadAndroid::get_env().
+ * @return Godot string instance.
+ */
+static inline String jstring_to_string(jstring source, JNIEnv *env = NULL) {
+ String result;
+ if (source) {
+ if (!env) {
+ env = ThreadAndroid::get_env();
+ }
+ const char *const source_utf8 = env->GetStringUTFChars(source, NULL);
+ if (source_utf8) {
+ result.parse_utf8(source_utf8);
+ env->ReleaseStringUTFChars(source, source_utf8);
+ }
+ }
+ return result;
+}
-#endif
+#endif // STRING_ANDROID_H
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index a5b2e66a22..a6d5a00852 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -322,7 +322,7 @@ String OS_Haiku::get_executable_path() const {
bool OS_Haiku::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc" || p_feature == "s3tc";
+ return p_feature == "pc";
}
String OS_Haiku::get_config_path() const {
diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub
index d5540fe8db..41991bce86 100644
--- a/platform/iphone/SCsub
+++ b/platform/iphone/SCsub
@@ -7,7 +7,7 @@ import os
iphone_lib = [
'godot_iphone.cpp',
'os_iphone.cpp',
- 'sem_iphone.cpp',
+ 'semaphore_iphone.cpp',
'gl_view.mm',
'main.m',
'app_delegate.mm',
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index bb0c11c767..64405bfa5b 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -598,8 +598,10 @@ static int frame_count = 0;
};
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
- OS::get_singleton()->get_main_loop()->notification(
- MainLoop::NOTIFICATION_OS_MEMORY_WARNING);
+ if (OS::get_singleton()->get_main_loop()) {
+ OS::get_singleton()->get_main_loop()->notification(
+ MainLoop::NOTIFICATION_OS_MEMORY_WARNING);
+ }
};
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@@ -613,18 +615,6 @@ static int frame_count = 0;
// Create a full-screen window
window = [[UIWindow alloc] initWithFrame:rect];
- // window.autoresizesSubviews = YES;
- //[window setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
- // UIViewAutoresizingFlexibleWidth];
-
- // Create the OpenGL ES view and add it to the window
- GLView *glView = [[GLView alloc] initWithFrame:rect];
- printf("glview is %p\n", glView);
- //[window addSubview:glView];
- glView.delegate = self;
- // glView.autoresizesSubviews = YES;
- //[glView setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
- // UIViewAutoresizingFlexibleWidth];
OS::VideoMode vm = _get_video_mode();
@@ -639,6 +629,12 @@ static int frame_count = 0;
return FALSE;
};
+ // WARNING: We must *always* create the GLView after we have constructed the
+ // OS with iphone_main. This allows the GLView to access project settings so
+ // it can properly initialize the OpenGL context
+ GLView *glView = [[GLView alloc] initWithFrame:rect];
+ glView.delegate = self;
+
view_controller = [[ViewController alloc] init];
view_controller.view = glView;
window.rootViewController = view_controller;
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index d0e6a4cefe..172572bcb4 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -174,11 +174,3 @@ def configure(env):
env.Append(CPPPATH=['#platform/iphone'])
env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES_ENABLED', '-DCOREAUDIO_ENABLED'])
-
- # TODO: Move that to opus module's config
- if 'module_opus_enabled' in env and env['module_opus_enabled']:
- env.opus_fixed_point = "yes"
- if (env["arch"] == "arm"):
- env.Append(CFLAGS=["-DOPUS_ARM_OPT"])
- elif (env["arch"] == "arm64"):
- env.Append(CFLAGS=["-DOPUS_ARM64_OPT"])
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index 849e6d4a14..85d4b9e847 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -196,15 +196,16 @@ public:
void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
- if (p_preset->get("texture_format/s3tc")) {
- r_features->push_back("s3tc");
- }
- if (p_preset->get("texture_format/etc")) {
+ String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
+ if (driver == "GLES2") {
r_features->push_back("etc");
- }
- if (p_preset->get("texture_format/etc2")) {
+ } else if (driver == "GLES3") {
r_features->push_back("etc2");
+ if (ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2")) {
+ r_features->push_back("etc");
+ }
}
+
Vector<String> architectures = _get_preset_architectures(p_preset);
for (int i = 0; i < architectures.size(); ++i) {
r_features->push_back(architectures[i]);
@@ -246,7 +247,7 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/app_store_team_id"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/provisioning_profile_uuid_debug"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/code_sign_identity_debug", PROPERTY_HINT_PLACEHOLDER_TEXT, "iPhone Developer"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/code_sign_identity_debug", PROPERTY_HINT_PLACEHOLDER_TEXT, "iPhone Developer"), "iPhone Developer"));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/export_method_debug", PROPERTY_HINT_ENUM, "App Store,Development,Ad-Hoc,Enterprise"), 1));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/provisioning_profile_uuid_release"), ""));
@@ -255,12 +256,26 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/name", PROPERTY_HINT_PLACEHOLDER_TEXT, "Game Name"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/info"), "Made with Godot Engine"));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/identifier", PROPERTY_HINT_PLACEHOLDER_TEXT, "come.example.game"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/identifier", PROPERTY_HINT_PLACEHOLDER_TEXT, "com.example.game"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/signature"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/short_version"), "1.0"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version"), "1.0"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/copyright"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/arkit"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/access_wifi"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/game_center"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/in_app_purchases"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/push_notifications"), false));
+
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/camera_usage_description"), "Godot would like to use your camera"));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/photolibrary_usage_description"), "Godot would like to use your photos"));
+
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "orientation/portrait"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "orientation/landscape_left"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "orientation/landscape_right"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "orientation/portrait_upside_down"), true));
+
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/iphone_120x120", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone/iPod Touch with retina display
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/ipad_76x76", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/app_store_1024x1024", PROPERTY_HINT_FILE, "*.png"), "")); // App Store
@@ -275,10 +290,6 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, loading_screen_infos[i].preset_key, PROPERTY_HINT_FILE, "*.png"), ""));
}
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), false));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), true));
-
Vector<ExportArchitecture> architectures = _get_supported_architectures();
for (int i = 0; i < architectures.size(); ++i) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "architectures/" + architectures[i].name), architectures[i].is_default));
@@ -337,6 +348,59 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_
strnew += lines[i].replace("$linker_flags", p_config.linker_flags) + "\n";
} else if (lines[i].find("$cpp_code") != -1) {
strnew += lines[i].replace("$cpp_code", p_config.cpp_code) + "\n";
+ } else if (lines[i].find("$access_wifi") != -1) {
+ bool is_on = p_preset->get("capabilities/access_wifi");
+ strnew += lines[i].replace("$access_wifi", is_on ? "1" : "0") + "\n";
+ } else if (lines[i].find("$game_center") != -1) {
+ bool is_on = p_preset->get("capabilities/game_center");
+ strnew += lines[i].replace("$game_center", is_on ? "1" : "0") + "\n";
+ } else if (lines[i].find("$in_app_purchases") != -1) {
+ bool is_on = p_preset->get("capabilities/in_app_purchases");
+ strnew += lines[i].replace("$in_app_purchases", is_on ? "1" : "0") + "\n";
+ } else if (lines[i].find("$push_notifications") != -1) {
+ bool is_on = p_preset->get("capabilities/push_notifications");
+ strnew += lines[i].replace("$push_notifications", is_on ? "1" : "0") + "\n";
+ } else if (lines[i].find("$required_device_capabilities") != -1) {
+ String capabilities;
+
+ // I've removed armv7 as we can run on 64bit only devices
+ // Note that capabilities listed here are requirements for the app to be installed.
+ // They don't enable anything.
+
+ if ((bool)p_preset->get("capabilities/arkit")) {
+ capabilities += "<string>arkit</string>\n";
+ }
+ if ((bool)p_preset->get("capabilities/game_center")) {
+ capabilities += "<string>gamekit</string>\n";
+ }
+ if ((bool)p_preset->get("capabilities/access_wifi")) {
+ capabilities += "<string>wifi</string>\n";
+ }
+
+ strnew += lines[i].replace("$required_device_capabilities", capabilities);
+ } else if (lines[i].find("$interface_orientations") != -1) {
+ String orientations;
+
+ if ((bool)p_preset->get("orientation/portrait")) {
+ orientations += "<string>UIInterfaceOrientationPortrait</string>\n";
+ }
+ if ((bool)p_preset->get("orientation/landscape_left")) {
+ orientations += "<string>UIInterfaceOrientationLandscapeLeft</string>\n";
+ }
+ if ((bool)p_preset->get("orientation/landscape_right")) {
+ orientations += "<string>UIInterfaceOrientationLandscapeRight</string>\n";
+ }
+ if ((bool)p_preset->get("orientation/portrait_upside_down")) {
+ orientations += "<string>UIInterfaceOrientationPortraitUpsideDown</string>\n";
+ }
+
+ strnew += lines[i].replace("$interface_orientations", orientations);
+ } else if (lines[i].find("$camera_usage_description") != -1) {
+ String description = p_preset->get("privacy/camera_usage_description");
+ strnew += lines[i].replace("$camera_usage_description", description) + "\n";
+ } else if (lines[i].find("$photolibrary_usage_description") != -1) {
+ String description = p_preset->get("privacy/photolibrary_usage_description");
+ strnew += lines[i].replace("$photolibrary_usage_description", description) + "\n";
} else {
strnew += lines[i] + "\n";
}
@@ -648,6 +712,10 @@ void EditorExportPlatformIOS::_add_assets_to_project(Vector<uint8_t> &p_project_
pbx_files += file_info_format.format(format_dict, "$_");
}
+ // Note, frameworks like gamekit are always included in our project.pbxprof file
+ // even if turned off in capabilities.
+ // Frameworks that are used by modules (like arkit) we may need to optionally add here.
+
String str = String::utf8((const char *)p_project_data.ptr(), p_project_data.size());
str = str.replace("$additional_pbx_files", pbx_files);
str = str.replace("$additional_pbx_frameworks_build", pbx_frameworks_build);
@@ -771,6 +839,10 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
}
}
+ if (!DirAccess::exists(dest_dir)) {
+ return ERR_FILE_BAD_PATH;
+ }
+
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (da) {
String current_dir = da->get_current_dir();
@@ -1075,6 +1147,12 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset
}
}
+ String etc_error = test_etc2();
+ if (etc_error != String()) {
+ valid = false;
+ err += etc_error;
+ }
+
if (!err.empty())
r_error = err;
diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm
index 6f4d0ddb57..1cb8d0e44e 100644
--- a/platform/iphone/gl_view.mm
+++ b/platform/iphone/gl_view.mm
@@ -284,19 +284,37 @@ static void clear_touches() {
kEAGLColorFormatRGBA8,
kEAGLDrawablePropertyColorFormat,
nil];
+ bool fallback_gl2 = false;
+ // Create a GL ES 3 context based on the gl driver from project settings
+ if (GLOBAL_GET("rendering/quality/driver/driver_name") == "GLES3") {
+ context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
+ NSLog(@"Setting up an OpenGL ES 3.0 context. Based on Project Settings \"rendering/quality/driver/driver_name\"");
+ if (!context && GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) {
+ gles3_available = false;
+ fallback_gl2 = true;
+ NSLog(@"Failed to create OpenGL ES 3.0 context. Falling back to OpenGL ES 2.0");
+ }
+ }
- // Create our EAGLContext, and if successful make it current and create our framebuffer.
- context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
-
- if (!context || ![EAGLContext setCurrentContext:context] || ![self createFramebuffer]) {
+ // Create GL ES 2 context
+ if (GLOBAL_GET("rendering/quality/driver/driver_name") == "GLES2" || fallback_gl2) {
context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
- gles3_available = false;
- if (!context || ![EAGLContext setCurrentContext:context] || ![self createFramebuffer]) {
- [self release];
+ NSLog(@"Setting up an OpenGL ES 2.0 context.");
+ if (!context) {
+ NSLog(@"Failed to create OpenGL ES 2.0 context!");
return nil;
}
}
+ if (![EAGLContext setCurrentContext:context]) {
+ NSLog(@"Failed to set EAGLContext!");
+ return nil;
+ }
+ if (![self createFramebuffer]) {
+ NSLog(@"Failed to create frame buffer!");
+ return nil;
+ }
+
// Default the animation interval to 1/60th of a second.
animationInterval = 1.0 / 60.0;
return self;
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 16634c3b30..7d0fdd2078 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -45,9 +45,10 @@
#include "core/project_settings.h"
#include "drivers/unix/syslog_logger.h"
-#include "sem_iphone.h"
+#include "semaphore_iphone.h"
#include "ios.h"
+
#include <dlfcn.h>
int OSIPhone::get_video_driver_count() const {
@@ -119,7 +120,7 @@ Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) {
p_video_driver = VIDEO_DRIVER_GLES2;
use_gl3 = false;
continue;
@@ -586,7 +587,7 @@ void OSIPhone::native_video_stop() {
bool OSIPhone::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "mobile" || p_feature == "etc" || p_feature == "pvrtc" || p_feature == "etc2";
+ return p_feature == "mobile";
}
// Initialization order between compilation units is not guaranteed,
diff --git a/platform/iphone/power_iphone.h b/platform/iphone/power_iphone.h
index eb930b99c5..d7d4bf4a69 100644
--- a/platform/iphone/power_iphone.h
+++ b/platform/iphone/power_iphone.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_IPHONE_POWER_IPHONE_H_
-#define PLATFORM_IPHONE_POWER_IPHONE_H_
+#ifndef POWER_IPHONE_H
+#define POWER_IPHONE_H
#include <os/os.h>
@@ -50,4 +50,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_IPHONE_POWER_IPHONE_H_ */
+#endif // POWER_IPHONE_H
diff --git a/platform/iphone/sem_iphone.cpp b/platform/iphone/semaphore_iphone.cpp
index 05cdb6a2f7..cc7dde72f7 100644
--- a/platform/iphone/sem_iphone.cpp
+++ b/platform/iphone/semaphore_iphone.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_iphone.cpp */
+/* semaphore_iphone.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "sem_iphone.h"
+#include "semaphore_iphone.h"
#include <fcntl.h>
#include <unistd.h>
@@ -71,6 +71,7 @@ void cgsem_destroy(cgsem_t *cgsem) {
}
#include "core/os/memory.h"
+
#include <errno.h>
Error SemaphoreIphone::wait() {
diff --git a/platform/iphone/sem_iphone.h b/platform/iphone/semaphore_iphone.h
index 134bc723d9..16658384e6 100644
--- a/platform/iphone/sem_iphone.h
+++ b/platform/iphone/semaphore_iphone.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_iphone.h */
+/* semaphore_iphone.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SEM_IPHONE_H
-#define SEM_IPHONE_H
+#ifndef SEMAPHORE_IPHONE_H
+#define SEMAPHORE_IPHONE_H
struct cgsem {
int pipefd[2];
@@ -56,4 +56,4 @@ public:
~SemaphoreIphone();
};
-#endif
+#endif // SEMAPHORE_IPHONE_H
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp
index 16fdc267f3..11104007e2 100644
--- a/platform/javascript/audio_driver_javascript.cpp
+++ b/platform/javascript/audio_driver_javascript.cpp
@@ -209,7 +209,7 @@ Error AudioDriverJavaScript::capture_start() {
}
function gotMediaInputError(e) {
- console.log(e);
+ out(e);
}
if (navigator.mediaDevices.getUserMedia) {
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 22b5f1f87a..47da8de5df 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -129,10 +129,6 @@ def configure(env):
# us since we don't know requirements at compile-time.
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
- # Since we use both memory growth and MEMFS preloading,
- # this avoids unecessary copying on start-up.
- env.Append(LINKFLAGS=['--no-heap-copy'])
-
# This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1.
env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1'])
@@ -140,7 +136,3 @@ def configure(env):
# TODO: Reevaluate usage of this setting now that engine.js manages engine runtime.
env.Append(LINKFLAGS=['-s', 'NO_EXIT_RUNTIME=1'])
-
- # TODO: Move that to opus module's config.
- if 'module_opus_enabled' in env and env['module_opus_enabled']:
- env.opus_fixed_point = 'yes'
diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js
index 91458eb4c3..860d6707ff 100644
--- a/platform/javascript/engine.js
+++ b/platform/javascript/engine.js
@@ -199,7 +199,8 @@
}
LIBS.FS.mkdirTree(dir);
}
- LIBS.FS.createDataFile('/', file.path, new Uint8Array(file.buffer), true, true, true);
+ // With memory growth, canOwn should be false.
+ LIBS.FS.createDataFile(file.path, null, new Uint8Array(file.buffer), true, true, false);
}, this);
preloadedFiles = null;
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 123c6ae645..487da77b10 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -104,22 +104,27 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t> &p_html, const Re
void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
- if (p_preset->get("texture_format/s3tc")) {
+ if (p_preset->get("vram_texture_compression/for_desktop")) {
r_features->push_back("s3tc");
}
- if (p_preset->get("texture_format/etc")) {
- r_features->push_back("etc");
- }
- if (p_preset->get("texture_format/etc2")) {
- r_features->push_back("etc2");
+
+ if (p_preset->get("vram_texture_compression/for_mobile")) {
+ String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
+ if (driver == "GLES2") {
+ r_features->push_back("etc");
+ } else if (driver == "GLES3") {
+ r_features->push_back("etc2");
+ if (ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2")) {
+ r_features->push_back("etc");
+ }
+ }
}
}
void EditorExportPlatformJavaScript::get_export_options(List<ExportOption> *r_options) {
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "vram_texture_compression/for_desktop"), true)); // S3TC
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "vram_texture_compression/for_mobile"), false)); // ETC or ETC2, depending on renderer
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/custom_html_shell", PROPERTY_HINT_FILE, "*.html"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/head_include", PROPERTY_HINT_MULTILINE_TEXT), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
@@ -167,10 +172,19 @@ bool EditorExportPlatformJavaScript::can_export(const Ref<EditorExportPreset> &p
}
}
+ r_missing_templates = !valid;
+
+ if (p_preset->get("vram_texture_compression/for_mobile")) {
+ String etc_error = test_etc2();
+ if (etc_error != String()) {
+ valid = false;
+ err += etc_error;
+ }
+ }
+
if (!err.empty())
r_error = err;
- r_missing_templates = !valid;
return valid;
}
@@ -200,6 +214,10 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese
template_path = find_export_template(EXPORT_TEMPLATE_WEBASSEMBLY_RELEASE);
}
+ if (!DirAccess::exists(p_path.get_base_dir())) {
+ return ERR_FILE_BAD_PATH;
+ }
+
if (template_path != String() && !FileAccess::exists(template_path)) {
EditorNode::get_singleton()->show_warning(TTR("Template file not found:") + "\n" + template_path);
return ERR_FILE_NOT_FOUND;
@@ -349,7 +367,7 @@ Error EditorExportPlatformJavaScript::run(const Ref<EditorExportPreset> &p_prese
if (err) {
return err;
}
- OS::get_singleton()->shell_open(path);
+ OS::get_singleton()->shell_open(String("file://") + path);
return OK;
}
diff --git a/platform/javascript/http_request.js b/platform/javascript/http_request.js
index 7acd32d8bf..66dacfc3d4 100644
--- a/platform/javascript/http_request.js
+++ b/platform/javascript/http_request.js
@@ -82,7 +82,7 @@ var GodotHTTPRequest = {
godot_xhr_send_string: function(xhrId, strPtr) {
if (!strPtr) {
- console.warn("Failed to send string per XHR: null pointer");
+ err("Failed to send string per XHR: null pointer");
return;
}
GodotHTTPRequest.requests[xhrId].send(UTF8ToString(strPtr));
@@ -90,11 +90,11 @@ var GodotHTTPRequest = {
godot_xhr_send_data: function(xhrId, ptr, len) {
if (!ptr) {
- console.warn("Failed to send data per XHR: null pointer");
+ err("Failed to send data per XHR: null pointer");
return;
}
if (len < 0) {
- console.warn("Failed to send data per XHR: buffer length less than 0");
+ err("Failed to send data per XHR: buffer length less than 0");
return;
}
GodotHTTPRequest.requests[xhrId].send(HEAPU8.subarray(ptr, ptr + len));
diff --git a/platform/javascript/javascript_eval.cpp b/platform/javascript/javascript_eval.cpp
index bb43e2d46b..dd3eba74e4 100644
--- a/platform/javascript/javascript_eval.cpp
+++ b/platform/javascript/javascript_eval.cpp
@@ -69,7 +69,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
eval_ret = eval(UTF8ToString(CODE));
}
} catch (e) {
- console.warn(e);
+ err(e);
eval_ret = null;
}
@@ -97,7 +97,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
if (array_ptr!==0) {
_free(array_ptr)
}
- console.warn(e);
+ err(e);
// fall through
}
break;
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index e820d07a2a..34781ce365 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -829,7 +829,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) {
p_video_driver = VIDEO_DRIVER_GLES2;
gles3 = false;
continue;
@@ -986,8 +986,8 @@ bool OS_JavaScript::main_loop_iterate() {
if (sync_wait_time < 0) {
/* clang-format off */
EM_ASM(
- FS.syncfs(function(err) {
- if (err) { console.warn('Failed to save IDB file system: ' + err.message); }
+ FS.syncfs(function(error) {
+ if (error) { err('Failed to save IDB file system: ' + error.message); }
});
);
/* clang-format on */
@@ -1071,16 +1071,6 @@ bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
return true;
#endif
- EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_get_current_context();
- // All extensions are already automatically enabled, this function allows
- // checking WebGL extension support without inline JavaScript
- if (p_feature == "s3tc")
- return emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_s3tc_srgb");
- if (p_feature == "etc")
- return emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_etc1");
- if (p_feature == "etc2")
- return emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_etc");
-
return false;
}
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index dc407eee9e..d2952ebdc0 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -10,7 +10,7 @@ files = [
'crash_handler_osx.mm',
'os_osx.mm',
'godot_main_osx.mm',
- 'sem_osx.cpp',
+ 'semaphore_osx.cpp',
'dir_access_osx.mm',
'joypad_osx.cpp',
'power_osx.cpp',
diff --git a/platform/osx/crash_handler_osx.h b/platform/osx/crash_handler_osx.h
index dead90ca90..6a72ce8ae9 100644
--- a/platform/osx/crash_handler_osx.h
+++ b/platform/osx/crash_handler_osx.h
@@ -45,4 +45,4 @@ public:
~CrashHandler();
};
-#endif
+#endif // CRASH_HANDLER_OSX_H
diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm
index 6684898085..ed8a955ae5 100644
--- a/platform/osx/crash_handler_osx.mm
+++ b/platform/osx/crash_handler_osx.mm
@@ -28,9 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "crash_handler_osx.h"
+
+#include "core/os/os.h"
#include "core/project_settings.h"
#include "main/main.h"
-#include "os_osx.h"
#include <string.h>
#include <unistd.h>
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index b8f6977b39..5e94bc457b 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -425,6 +425,10 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
}
+ if (!DirAccess::exists(p_path.get_base_dir())) {
+ return ERR_FILE_BAD_PATH;
+ }
+
FileAccess *src_f = NULL;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 927c8c9b00..dfe7b27bd0 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -34,7 +34,7 @@
#include "core/os/input.h"
#include "crash_handler_osx.h"
#include "drivers/coreaudio/audio_driver_coreaudio.h"
-#include "drivers/coremidi/core_midi.h"
+#include "drivers/coremidi/midi_driver_coremidi.h"
#include "drivers/unix/os_unix.h"
#include "joypad_osx.h"
#include "main/input_default.h"
@@ -43,6 +43,7 @@
#include "servers/visual/rasterizer.h"
#include "servers/visual/visual_server_wrap_mt.h"
#include "servers/visual_server.h"
+
#include <AppKit/AppKit.h>
#include <AppKit/NSCursor.h>
#include <ApplicationServices/ApplicationServices.h>
@@ -132,7 +133,7 @@ public:
String im_text;
Point2 im_selection;
- power_osx *power_manager;
+ PowerOSX *power_manager;
CrashHandler crash_handler;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 3f80d19fa1..b45d0d80e6 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -37,7 +37,7 @@
#include "drivers/gles2/rasterizer_gles2.h"
#include "drivers/gles3/rasterizer_gles3.h"
#include "main/main.h"
-#include "sem_osx.h"
+#include "semaphore_osx.h"
#include "servers/visual/visual_server_raster.h"
#include <mach-o/dyld.h>
@@ -102,8 +102,6 @@ static void push_to_key_event_buffer(const OS_OSX::KeyEvent &p_event) {
static int mouse_x = 0;
static int mouse_y = 0;
-static int prev_mouse_x = 0;
-static int prev_mouse_y = 0;
static int button_mask = 0;
static bool mouse_down_control = false;
@@ -282,7 +280,9 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
NSWindow *window = (NSWindow *)[notification object];
CGFloat newBackingScaleFactor = [window backingScaleFactor];
CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
- [OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
+ if (OS_OSX::singleton->is_hidpi_allowed()) {
+ [OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
+ }
if (newBackingScaleFactor != oldBackingScaleFactor) {
//Set new display scale and window size
@@ -599,12 +599,13 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) {
Ref<InputEventMouseButton> mb;
mb.instance();
-
+ const CGFloat backingScaleFactor = [[event window] backingScaleFactor];
+ const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor);
get_key_modifier_state([event modifierFlags], mb);
mb->set_button_index(index);
mb->set_pressed(pressed);
- mb->set_position(Vector2(mouse_x, mouse_y));
- mb->set_global_position(Vector2(mouse_x, mouse_y));
+ mb->set_position(pos);
+ mb->set_global_position(pos);
mb->set_button_mask(button_mask);
if (index == BUTTON_LEFT && pressed) {
mb->set_doubleclick([event clickCount] == 2);
@@ -640,8 +641,6 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) {
mm.instance();
mm->set_button_mask(button_mask);
- prev_mouse_x = mouse_x;
- prev_mouse_y = mouse_y;
const CGFloat backingScaleFactor = [[event window] backingScaleFactor];
const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor);
mm->set_position(pos);
@@ -763,9 +762,41 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) {
[super updateTrackingAreas];
}
+static bool isNumpadKey(unsigned int key) {
+
+ static const unsigned int table[] = {
+ 0x41, /* kVK_ANSI_KeypadDecimal */
+ 0x43, /* kVK_ANSI_KeypadMultiply */
+ 0x45, /* kVK_ANSI_KeypadPlus */
+ 0x47, /* kVK_ANSI_KeypadClear */
+ 0x4b, /* kVK_ANSI_KeypadDivide */
+ 0x4c, /* kVK_ANSI_KeypadEnter */
+ 0x4e, /* kVK_ANSI_KeypadMinus */
+ 0x51, /* kVK_ANSI_KeypadEquals */
+ 0x52, /* kVK_ANSI_Keypad0 */
+ 0x53, /* kVK_ANSI_Keypad1 */
+ 0x54, /* kVK_ANSI_Keypad2 */
+ 0x55, /* kVK_ANSI_Keypad3 */
+ 0x56, /* kVK_ANSI_Keypad4 */
+ 0x57, /* kVK_ANSI_Keypad5 */
+ 0x58, /* kVK_ANSI_Keypad6 */
+ 0x59, /* kVK_ANSI_Keypad7 */
+ 0x5b, /* kVK_ANSI_Keypad8 */
+ 0x5c, /* kVK_ANSI_Keypad9 */
+ 0x5f, /* kVK_JIS_KeypadComma */
+ 0x00
+ };
+ for (int i = 0; table[i] != 0; i++) {
+ if (key == table[i])
+ return true;
+ }
+ return false;
+}
+
// Translates a OS X keycode to a Godot keycode
//
static int translateKey(unsigned int key) {
+
// Keyboard symbol translation table
static const unsigned int table[128] = {
/* 00 */ KEY_A,
@@ -778,7 +809,7 @@ static int translateKey(unsigned int key) {
/* 07 */ KEY_X,
/* 08 */ KEY_C,
/* 09 */ KEY_V,
- /* 0a */ KEY_UNKNOWN,
+ /* 0a */ KEY_SECTION, /* ISO Section */
/* 0b */ KEY_B,
/* 0c */ KEY_Q,
/* 0d */ KEY_W,
@@ -832,7 +863,7 @@ static int translateKey(unsigned int key) {
/* 3d */ KEY_ALT,
/* 3e */ KEY_CONTROL,
/* 3f */ KEY_UNKNOWN, /* Function */
- /* 40 */ KEY_UNKNOWN,
+ /* 40 */ KEY_UNKNOWN, /* F17 */
/* 41 */ KEY_KP_PERIOD,
/* 42 */ KEY_UNKNOWN,
/* 43 */ KEY_KP_MULTIPLY,
@@ -840,16 +871,16 @@ static int translateKey(unsigned int key) {
/* 45 */ KEY_KP_ADD,
/* 46 */ KEY_UNKNOWN,
/* 47 */ KEY_NUMLOCK, /* Really KeypadClear... */
- /* 48 */ KEY_UNKNOWN, /* VolumeUp */
- /* 49 */ KEY_UNKNOWN, /* VolumeDown */
- /* 4a */ KEY_UNKNOWN, /* Mute */
+ /* 48 */ KEY_VOLUMEUP, /* VolumeUp */
+ /* 49 */ KEY_VOLUMEDOWN, /* VolumeDown */
+ /* 4a */ KEY_VOLUMEMUTE, /* Mute */
/* 4b */ KEY_KP_DIVIDE,
/* 4c */ KEY_KP_ENTER,
/* 4d */ KEY_UNKNOWN,
/* 4e */ KEY_KP_SUBTRACT,
- /* 4f */ KEY_UNKNOWN,
- /* 50 */ KEY_UNKNOWN,
- /* 51 */ KEY_EQUAL, //wtf equal?
+ /* 4f */ KEY_UNKNOWN, /* F18 */
+ /* 50 */ KEY_UNKNOWN, /* F19 */
+ /* 51 */ KEY_EQUAL, /* KeypadEqual */
/* 52 */ KEY_KP_0,
/* 53 */ KEY_KP_1,
/* 54 */ KEY_KP_2,
@@ -858,27 +889,27 @@ static int translateKey(unsigned int key) {
/* 57 */ KEY_KP_5,
/* 58 */ KEY_KP_6,
/* 59 */ KEY_KP_7,
- /* 5a */ KEY_UNKNOWN,
+ /* 5a */ KEY_UNKNOWN, /* F20 */
/* 5b */ KEY_KP_8,
/* 5c */ KEY_KP_9,
- /* 5d */ KEY_UNKNOWN,
- /* 5e */ KEY_UNKNOWN,
- /* 5f */ KEY_UNKNOWN,
+ /* 5d */ KEY_YEN, /* JIS Yen */
+ /* 5e */ KEY_UNDERSCORE, /* JIS Underscore */
+ /* 5f */ KEY_COMMA, /* JIS KeypadComma */
/* 60 */ KEY_F5,
/* 61 */ KEY_F6,
/* 62 */ KEY_F7,
/* 63 */ KEY_F3,
/* 64 */ KEY_F8,
/* 65 */ KEY_F9,
- /* 66 */ KEY_UNKNOWN,
+ /* 66 */ KEY_UNKNOWN, /* JIS Eisu */
/* 67 */ KEY_F11,
- /* 68 */ KEY_UNKNOWN,
+ /* 68 */ KEY_UNKNOWN, /* JIS Kana */
/* 69 */ KEY_F13,
/* 6a */ KEY_F16,
/* 6b */ KEY_F14,
/* 6c */ KEY_UNKNOWN,
/* 6d */ KEY_F10,
- /* 6e */ KEY_UNKNOWN,
+ /* 6e */ KEY_MENU,
/* 6f */ KEY_F12,
/* 70 */ KEY_UNKNOWN,
/* 71 */ KEY_F15,
@@ -969,6 +1000,9 @@ static const _KeyCodeMap _keycodes[55] = {
static int remapKey(unsigned int key) {
+ if (isNumpadKey(key))
+ return translateKey(key);
+
TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
if (!currentKeyboard)
return translateKey(key);
@@ -1094,6 +1128,7 @@ static int remapKey(unsigned int key) {
inline void sendScrollEvent(int button, double factor, int modifierFlags) {
unsigned int mask = 1 << (button - 1);
+ Vector2 mouse_pos = Vector2(mouse_x, mouse_y);
Ref<InputEventMouseButton> sc;
sc.instance();
@@ -1102,14 +1137,18 @@ inline void sendScrollEvent(int button, double factor, int modifierFlags) {
sc->set_button_index(button);
sc->set_factor(factor);
sc->set_pressed(true);
- Vector2 mouse_pos = Vector2(mouse_x, mouse_y);
sc->set_position(mouse_pos);
sc->set_global_position(mouse_pos);
button_mask |= mask;
sc->set_button_mask(button_mask);
OS_OSX::singleton->push_input(sc);
+ sc.instance();
+ sc->set_button_index(button);
+ sc->set_factor(factor);
sc->set_pressed(false);
+ sc->set_position(mouse_pos);
+ sc->set_global_position(mouse_pos);
button_mask &= ~mask;
sc->set_button_mask(button_mask);
OS_OSX::singleton->push_input(sc);
@@ -1418,7 +1457,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best" || editor) {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2") || editor) {
p_video_driver = VIDEO_DRIVER_GLES2;
gles3 = false;
continue;
@@ -1459,7 +1498,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
input = memnew(InputDefault);
joypad_osx = memnew(JoypadOSX);
- power_manager = memnew(power_osx);
+ power_manager = memnew(PowerOSX);
_ensure_user_data_dir();
@@ -2322,7 +2361,8 @@ bool OS_OSX::is_window_maximized() const {
void OS_OSX::move_window_to_foreground() {
- [window_object orderFrontRegardless];
+ [[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
+ [window_object makeKeyAndOrderFront:nil];
}
void OS_OSX::set_window_always_on_top(bool p_enabled) {
@@ -2526,6 +2566,8 @@ void OS_OSX::process_events() {
[autoreleasePool drain];
autoreleasePool = [[NSAutoreleasePool alloc] init];
+
+ input->flush_accumulated_events();
}
void OS_OSX::process_key_events() {
@@ -2568,7 +2610,7 @@ void OS_OSX::process_key_events() {
void OS_OSX::push_input(const Ref<InputEvent> &p_event) {
Ref<InputEvent> ev = p_event;
- input->parse_input_event(ev);
+ input->accumulate_input_event(ev);
}
void OS_OSX::force_process_input() {
@@ -2809,7 +2851,7 @@ OS_OSX::OS_OSX() {
}
bool OS_OSX::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc" || p_feature == "s3tc";
+ return p_feature == "pc";
}
void OS_OSX::disable_crash_handler() {
diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp
index a7cf9d831f..04d423d8c5 100644
--- a/platform/osx/power_osx.cpp
+++ b/platform/osx/power_osx.cpp
@@ -67,7 +67,7 @@ Adapted from corresponding SDL 2.0 code.
CFDictionaryGetValueIfPresent(dict, CFSTR(k), (const void **)v)
/* Note that AC power sources also include a laptop battery it is charging. */
-void power_osx::checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging) {
+void PowerOSX::checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging) {
CFStringRef strval; /* don't CFRelease() this. */
CFBooleanRef bval;
CFNumberRef numval;
@@ -169,7 +169,7 @@ void power_osx::checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery,
#undef STRMATCH
// CODE CHUNK IMPORTED FROM SDL 2.0
-bool power_osx::GetPowerInfo_MacOSX() {
+bool PowerOSX::GetPowerInfo_MacOSX() {
CFTypeRef blob = IOPSCopyPowerSourcesInfo();
nsecs_left = -1;
@@ -211,14 +211,14 @@ bool power_osx::GetPowerInfo_MacOSX() {
return true; /* always the definitive answer on Mac OS X. */
}
-bool power_osx::UpdatePowerInfo() {
+bool PowerOSX::UpdatePowerInfo() {
if (GetPowerInfo_MacOSX()) {
return true;
}
return false;
}
-OS::PowerState power_osx::get_power_state() {
+OS::PowerState PowerOSX::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
@@ -226,7 +226,7 @@ OS::PowerState power_osx::get_power_state() {
}
}
-int power_osx::get_power_seconds_left() {
+int PowerOSX::get_power_seconds_left() {
if (UpdatePowerInfo()) {
return nsecs_left;
} else {
@@ -234,7 +234,7 @@ int power_osx::get_power_seconds_left() {
}
}
-int power_osx::get_power_percent_left() {
+int PowerOSX::get_power_percent_left() {
if (UpdatePowerInfo()) {
return percent_left;
} else {
@@ -242,11 +242,11 @@ int power_osx::get_power_percent_left() {
}
}
-power_osx::power_osx() :
+PowerOSX::PowerOSX() :
nsecs_left(-1),
percent_left(-1),
power_state(OS::POWERSTATE_UNKNOWN) {
}
-power_osx::~power_osx() {
+PowerOSX::~PowerOSX() {
}
diff --git a/platform/osx/power_osx.h b/platform/osx/power_osx.h
index 0f18f9f691..40d0d40fd4 100644
--- a/platform/osx/power_osx.h
+++ b/platform/osx/power_osx.h
@@ -28,15 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_OSX_POWER_OSX_H_
-#define PLATFORM_OSX_POWER_OSX_H_
+#ifndef POWER_OSX_H
+#define POWER_OSX_H
#include "core/os/file_access.h"
#include "core/os/os.h"
#include "dir_access_osx.h"
+
#include <CoreFoundation/CoreFoundation.h>
-class power_osx {
+class PowerOSX {
private:
int nsecs_left;
@@ -47,12 +48,12 @@ private:
bool UpdatePowerInfo();
public:
- power_osx();
- virtual ~power_osx();
+ PowerOSX();
+ virtual ~PowerOSX();
OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
-#endif /* PLATFORM_OSX_POWER_OSX_H_ */
+#endif // POWER_OSX_H
diff --git a/platform/osx/sem_osx.cpp b/platform/osx/semaphore_osx.cpp
index 4c3bad4379..fe7d19bd9e 100644
--- a/platform/osx/sem_osx.cpp
+++ b/platform/osx/semaphore_osx.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_osx.cpp */
+/* semaphore_osx.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "sem_osx.h"
+#include "semaphore_osx.h"
#include <fcntl.h>
#include <unistd.h>
@@ -66,6 +66,7 @@ void cgsem_destroy(cgsem_t *cgsem) {
}
#include "core/os/memory.h"
+
#include <errno.h>
Error SemaphoreOSX::wait() {
diff --git a/platform/osx/sem_osx.h b/platform/osx/semaphore_osx.h
index 563bdfdcb1..c8e7c45227 100644
--- a/platform/osx/sem_osx.h
+++ b/platform/osx/semaphore_osx.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_osx.h */
+/* semaphore_osx.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SEM_OSX_H
-#define SEM_OSX_H
+#ifndef SEMAPHORE_OSX_H
+#define SEMAPHORE_OSX_H
struct cgsem {
int pipefd[2];
@@ -56,4 +56,4 @@ public:
~SemaphoreOSX();
};
-#endif
+#endif // SEMAPHORE_OSX_H
diff --git a/platform/server/SCsub b/platform/server/SCsub
index 51fd05a87e..62d45efbc0 100644
--- a/platform/server/SCsub
+++ b/platform/server/SCsub
@@ -13,7 +13,7 @@ common_server = [\
if sys.platform == "darwin":
common_server.append("#platform/osx/crash_handler_osx.mm")
common_server.append("#platform/osx/power_osx.cpp")
- common_server.append("#platform/osx/sem_osx.cpp")
+ common_server.append("#platform/osx/semaphore_osx.cpp")
else:
common_server.append("#platform/x11/crash_handler_x11.cpp")
common_server.append("#platform/x11/power_x11.cpp")
diff --git a/platform/server/detect.py b/platform/server/detect.py
index 392a987ee9..90a4092412 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -1,7 +1,10 @@
import os
import platform
import sys
+from methods import get_compiler_version, use_gcc
+# This file is mostly based on platform/x11/detect.py.
+# If editing this file, make sure to apply relevant changes here too.
def is_active():
return True
@@ -26,10 +29,16 @@ def can_build():
def get_opts():
- from SCons.Variables import BoolVariable
+ from SCons.Variables import BoolVariable, EnumVariable
return [
BoolVariable('use_llvm', 'Use the LLVM compiler', False),
BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
+ BoolVariable('use_ubsan', 'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)', False),
+ BoolVariable('use_asan', 'Use LLVM/GCC compiler address sanitizer (ASAN))', False),
+ BoolVariable('use_lsan', 'Use LLVM/GCC compiler leak sanitizer (LSAN))', False),
+ EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
+ BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False),
+ BoolVariable('execinfo', 'Use libexecinfo on systems where glibc is not available', False),
]
@@ -43,13 +52,30 @@ def configure(env):
## Build type
if (env["target"] == "release"):
- env.Append(CCFLAGS=['-O2', '-fomit-frame-pointer'])
+ if (env["optimize"] == "speed"): #optimize for speed (default)
+ env.Prepend(CCFLAGS=['-O3'])
+ else: #optimize for size
+ env.Prepend(CCFLAGS=['-Os'])
+
+ if (env["debug_symbols"] == "yes"):
+ env.Prepend(CCFLAGS=['-g1'])
+ if (env["debug_symbols"] == "full"):
+ env.Prepend(CCFLAGS=['-g2'])
elif (env["target"] == "release_debug"):
- env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
+ if (env["optimize"] == "speed"): #optimize for speed (default)
+ env.Prepend(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
+ else: #optimize for size
+ env.Prepend(CCFLAGS=['-Os', '-DDEBUG_ENABLED'])
+
+ if (env["debug_symbols"] == "yes"):
+ env.Prepend(CCFLAGS=['-g1'])
+ if (env["debug_symbols"] == "full"):
+ env.Prepend(CCFLAGS=['-g2'])
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Prepend(CCFLAGS=['-g3', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Append(LINKFLAGS=['-rdynamic'])
## Architecture
@@ -59,6 +85,10 @@ def configure(env):
## Compiler configuration
+ if 'CXX' in env and 'clang' in os.path.basename(env['CXX']):
+ # Convenience check to enforce the use_llvm overrides when CXX is clang(++)
+ env['use_llvm'] = True
+
if env['use_llvm']:
if ('clang++' not in os.path.basename(env['CXX'])):
env["CC"] = "clang"
@@ -67,6 +97,35 @@ def configure(env):
env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
env.extra_suffix = ".llvm" + env.extra_suffix
+
+ if env['use_ubsan'] or env['use_asan'] or env['use_lsan']:
+ env.extra_suffix += "s"
+
+ if env['use_ubsan']:
+ env.Append(CCFLAGS=['-fsanitize=undefined'])
+ env.Append(LINKFLAGS=['-fsanitize=undefined'])
+
+ if env['use_asan']:
+ env.Append(CCFLAGS=['-fsanitize=address'])
+ env.Append(LINKFLAGS=['-fsanitize=address'])
+
+ if env['use_lsan']:
+ env.Append(CCFLAGS=['-fsanitize=leak'])
+ env.Append(LINKFLAGS=['-fsanitize=leak'])
+
+ if env['use_lto']:
+ env.Append(CCFLAGS=['-flto'])
+ if not env['use_llvm'] and env.GetOption("num_jobs") > 1:
+ env.Append(LINKFLAGS=['-flto=' + str(env.GetOption("num_jobs"))])
+ else:
+ env.Append(LINKFLAGS=['-flto'])
+ if not env['use_llvm']:
+ env['RANLIB'] = 'gcc-ranlib'
+ env['AR'] = 'gcc-ar'
+
+ env.Append(CCFLAGS=['-pipe'])
+ env.Append(LINKFLAGS=['-pipe'])
+
## Dependencies
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
@@ -110,6 +169,10 @@ def configure(env):
env['builtin_libogg'] = False # Needed to link against system libtheora
env['builtin_libvorbis'] = False # Needed to link against system libtheora
env.ParseConfig('pkg-config theora theoradec --cflags --libs')
+ else:
+ list_of_x86 = ['x86_64', 'x86', 'i386', 'i586']
+ if any(platform.machine() in s for s in list_of_x86):
+ env["x86_libtheora_opt_gcc"] = True
if not env['builtin_libvpx']:
env.ParseConfig('pkg-config vpx --cflags --libs')
@@ -163,6 +226,9 @@ def configure(env):
env.Append(LIBS=['dl'])
if (platform.system().find("BSD") >= 0):
+ env["execinfo"] = True
+
+ if env["execinfo"]:
env.Append(LIBS=['execinfo'])
# Link those statically for portability
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 9b6e7864e1..e643d3e8bb 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -93,7 +93,7 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int
input = memnew(InputDefault);
#ifdef __APPLE__
- power_manager = memnew(power_osx);
+ power_manager = memnew(PowerOSX);
#else
power_manager = memnew(PowerX11);
#endif
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
index 7273a690ca..eebe8ae777 100644
--- a/platform/server/os_server.h
+++ b/platform/server/os_server.h
@@ -32,13 +32,12 @@
#define OS_SERVER_H
#include "drivers/dummy/texture_loader_dummy.h"
-#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "drivers/unix/os_unix.h"
#include "main/input_default.h"
#ifdef __APPLE__
#include "platform/osx/crash_handler_osx.h"
#include "platform/osx/power_osx.h"
-#include "platform/osx/sem_osx.h"
+#include "platform/osx/semaphore_osx.h"
#else
#include "platform/x11/crash_handler_x11.h"
#include "platform/x11/power_x11.h"
@@ -69,7 +68,7 @@ class OS_Server : public OS_Unix {
InputDefault *input;
#ifdef __APPLE__
- power_osx *power_manager;
+ PowerOSX *power_manager;
#else
PowerX11 *power_manager;
#endif
diff --git a/platform/uwp/SCsub b/platform/uwp/SCsub
index fb0c4a92ae..c14290f0c4 100644
--- a/platform/uwp/SCsub
+++ b/platform/uwp/SCsub
@@ -4,11 +4,11 @@ Import('env')
files = [
'thread_uwp.cpp',
- '#platform/windows/key_mapping_win.cpp',
+ '#platform/windows/key_mapping_windows.cpp',
'#platform/windows/windows_terminal_logger.cpp',
'joypad_uwp.cpp',
'power_uwp.cpp',
- 'gl_context_egl.cpp',
+ 'context_egl_uwp.cpp',
'app.cpp',
'os_uwp.cpp',
]
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index 1b8f9f3f9e..4f2ee0237a 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -39,7 +39,7 @@
#include "core/os/keyboard.h"
#include "main/main.h"
-#include "platform/windows/key_mapping_win.h"
+#include "platform/windows/key_mapping_windows.h"
#include <collection.h>
@@ -99,7 +99,7 @@ void App::Initialize(CoreApplicationView ^ applicationView) {
// Information about the Suspending and Resuming event handlers can be found here:
// http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx
- os = new OSUWP;
+ os = new OS_UWP;
}
// Called when the CoreWindow object is created (or re-created).
@@ -398,7 +398,7 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) {
void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs ^ key_args, Windows::UI::Core::CharacterReceivedEventArgs ^ char_args) {
- OSUWP::KeyEvent ke;
+ OS_UWP::KeyEvent ke;
ke.control = sender->GetAsyncKeyState(VirtualKey::Control) == CoreVirtualKeyStates::Down;
ke.alt = sender->GetAsyncKeyState(VirtualKey::Menu) == CoreVirtualKeyStates::Down;
@@ -408,14 +408,14 @@ void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Wind
if (key_args != nullptr) {
- ke.type = OSUWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
+ ke.type = OS_UWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
ke.unicode = 0;
ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown);
} else {
- ke.type = OSUWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
+ ke.type = OS_UWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
ke.unicode = char_args->KeyCode;
ke.scancode = 0;
ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown);
diff --git a/platform/uwp/app.h b/platform/uwp/app.h
index d403dace9d..0bd996d483 100644
--- a/platform/uwp/app.h
+++ b/platform/uwp/app.h
@@ -103,7 +103,7 @@ namespace GodotUWP
EGLSurface mEglSurface;
CoreWindow^ window;
- OSUWP* os;
+ OS_UWP* os;
int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse
int last_touch_y[32];
diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/context_egl_uwp.cpp
index db15be3e06..061c54687c 100644
--- a/platform/uwp/gl_context_egl.cpp
+++ b/platform/uwp/context_egl_uwp.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gl_context_egl.cpp */
+/* context_egl_uwp.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,33 +28,33 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "gl_context_egl.h"
+#include "context_egl_uwp.h"
#include "EGL/eglext.h"
using Platform::Exception;
-void ContextEGL::release_current() {
+void ContextEGL_UWP::release_current() {
eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, mEglContext);
};
-void ContextEGL::make_current() {
+void ContextEGL_UWP::make_current() {
eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext);
};
-int ContextEGL::get_window_width() {
+int ContextEGL_UWP::get_window_width() {
return width;
};
-int ContextEGL::get_window_height() {
+int ContextEGL_UWP::get_window_height() {
return height;
};
-void ContextEGL::reset() {
+void ContextEGL_UWP::reset() {
cleanup();
@@ -62,7 +62,7 @@ void ContextEGL::reset() {
initialize();
};
-void ContextEGL::swap_buffers() {
+void ContextEGL_UWP::swap_buffers() {
if (eglSwapBuffers(mEglDisplay, mEglSurface) != EGL_TRUE) {
cleanup();
@@ -74,7 +74,7 @@ void ContextEGL::swap_buffers() {
}
};
-Error ContextEGL::initialize() {
+Error ContextEGL_UWP::initialize() {
EGLint configAttribList[] = {
EGL_RED_SIZE, 8,
@@ -190,7 +190,7 @@ Error ContextEGL::initialize() {
return OK;
};
-void ContextEGL::cleanup() {
+void ContextEGL_UWP::cleanup() {
if (mEglDisplay != EGL_NO_DISPLAY && mEglSurface != EGL_NO_SURFACE) {
eglDestroySurface(mEglDisplay, mEglSurface);
@@ -208,14 +208,14 @@ void ContextEGL::cleanup() {
}
};
-ContextEGL::ContextEGL(CoreWindow ^ p_window, Driver p_driver) :
+ContextEGL_UWP::ContextEGL_UWP(CoreWindow ^ p_window, Driver p_driver) :
mEglDisplay(EGL_NO_DISPLAY),
mEglContext(EGL_NO_CONTEXT),
mEglSurface(EGL_NO_SURFACE),
driver(p_driver),
window(p_window) {}
-ContextEGL::~ContextEGL() {
+ContextEGL_UWP::~ContextEGL_UWP() {
cleanup();
};
diff --git a/platform/uwp/gl_context_egl.h b/platform/uwp/context_egl_uwp.h
index 60feed2e24..812bdfb688 100644
--- a/platform/uwp/gl_context_egl.h
+++ b/platform/uwp/context_egl_uwp.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gl_context_egl.h */
+/* context_egl_uwp.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,19 +28,20 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CONTEXT_EGL_H
-#define CONTEXT_EGL_H
+#ifndef CONTEXT_EGL_UWP_H
+#define CONTEXT_EGL_UWP_H
#include <wrl.h>
-#include "EGL/egl.h"
+#include <EGL/egl.h>
+
#include "core/error_list.h"
#include "core/os/os.h"
#include "drivers/gl_context/context_gl.h"
using namespace Windows::UI::Core;
-class ContextEGL : public ContextGL {
+class ContextEGL_UWP : public ContextGL {
public:
enum Driver {
@@ -79,8 +80,8 @@ public:
void cleanup();
- ContextEGL(CoreWindow ^ p_window, Driver p_driver);
- virtual ~ContextEGL();
+ ContextEGL_UWP(CoreWindow ^ p_window, Driver p_driver);
+ virtual ~ContextEGL_UWP();
};
-#endif
+#endif // CONTEXT_EGL_UWP_H
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index f25b9ba9cd..c32a11b396 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -29,7 +29,6 @@ def get_opts():
return [
('msvc_version', 'MSVC version to use (ignored if the VCINSTALLDIR environment variable is set)', None),
- BoolVariable('use_mingw', 'Use the MinGW compiler even if MSVC is installed (only used on Windows)', False),
]
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 6808016f13..8ccf122d9f 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -646,9 +646,9 @@ AppxPackager::~AppxPackager() {}
////////////////////////////////////////////////////////////////////
-class EditorExportUWP : public EditorExportPlatform {
+class EditorExportPlatformUWP : public EditorExportPlatform {
- GDCLASS(EditorExportUWP, EditorExportPlatform);
+ GDCLASS(EditorExportPlatformUWP, EditorExportPlatform);
Ref<ImageTexture> logo;
@@ -1035,13 +1035,13 @@ public:
r_features->push_back("s3tc");
r_features->push_back("etc");
switch ((int)p_preset->get("architecture/target")) {
- case EditorExportUWP::ARM: {
+ case EditorExportPlatformUWP::ARM: {
r_features->push_back("arm");
} break;
- case EditorExportUWP::X86: {
+ case EditorExportPlatformUWP::X86: {
r_features->push_back("32");
} break;
- case EditorExportUWP::X64: {
+ case EditorExportPlatformUWP::X64: {
r_features->push_back("64");
} break;
}
@@ -1123,13 +1123,13 @@ public:
String platform_infix;
switch (arch) {
- case EditorExportUWP::ARM: {
+ case EditorExportPlatformUWP::ARM: {
platform_infix = "arm";
} break;
- case EditorExportUWP::X86: {
+ case EditorExportPlatformUWP::X86: {
platform_infix = "x86";
} break;
- case EditorExportUWP::X64: {
+ case EditorExportPlatformUWP::X64: {
platform_infix = "x64";
} break;
}
@@ -1265,6 +1265,10 @@ public:
}
}
+ if (!DirAccess::exists(p_path.get_base_dir())) {
+ return ERR_FILE_BAD_PATH;
+ }
+
Error err = OK;
FileAccess *fa_pack = FileAccess::open(p_path, FileAccess::WRITE, &err);
@@ -1459,7 +1463,7 @@ public:
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
}
- EditorExportUWP() {
+ EditorExportPlatformUWP() {
Ref<Image> img = memnew(Image(_uwp_logo));
logo.instance();
logo->create_from_image(img);
@@ -1478,7 +1482,7 @@ void register_uwp_exporter() {
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "export/uwp/debug_algorithm", PROPERTY_HINT_ENUM, "MD5,SHA1,SHA256"));
#endif // WINDOWS_ENABLED
- Ref<EditorExportUWP> exporter;
+ Ref<EditorExportPlatformUWP> exporter;
exporter.instance();
EditorExport::get_singleton()->add_export_platform(exporter);
}
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index ea0193b8ed..bc74da8a1b 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -67,22 +67,22 @@ using namespace Windows::Devices::Sensors;
using namespace Windows::ApplicationModel::DataTransfer;
using namespace concurrency;
-int OSUWP::get_video_driver_count() const {
+int OS_UWP::get_video_driver_count() const {
return 2;
}
-Size2 OSUWP::get_window_size() const {
+Size2 OS_UWP::get_window_size() const {
Size2 size;
size.width = video_mode.width;
size.height = video_mode.height;
return size;
}
-int OSUWP::get_current_video_driver() const {
+int OS_UWP::get_current_video_driver() const {
return video_driver_index;
}
-void OSUWP::set_window_size(const Size2 p_size) {
+void OS_UWP::set_window_size(const Size2 p_size) {
Windows::Foundation::Size new_size;
new_size.Width = p_size.width;
@@ -97,7 +97,7 @@ void OSUWP::set_window_size(const Size2 p_size) {
}
}
-void OSUWP::set_window_fullscreen(bool p_enabled) {
+void OS_UWP::set_window_fullscreen(bool p_enabled) {
ApplicationView ^ view = ApplicationView::GetForCurrentView();
@@ -117,12 +117,12 @@ void OSUWP::set_window_fullscreen(bool p_enabled) {
}
}
-bool OSUWP::is_window_fullscreen() const {
+bool OS_UWP::is_window_fullscreen() const {
return ApplicationView::GetForCurrentView()->IsFullScreenMode;
}
-void OSUWP::set_keep_screen_on(bool p_enabled) {
+void OS_UWP::set_keep_screen_on(bool p_enabled) {
if (is_keep_screen_on() == p_enabled) return;
@@ -134,7 +134,7 @@ void OSUWP::set_keep_screen_on(bool p_enabled) {
OS::set_keep_screen_on(p_enabled);
}
-void OSUWP::initialize_core() {
+void OS_UWP::initialize_core() {
last_button_state = 0;
@@ -167,49 +167,49 @@ void OSUWP::initialize_core() {
cursor_shape = CURSOR_ARROW;
}
-bool OSUWP::can_draw() const {
+bool OS_UWP::can_draw() const {
return !minimized;
};
-void OSUWP::set_window(Windows::UI::Core::CoreWindow ^ p_window) {
+void OS_UWP::set_window(Windows::UI::Core::CoreWindow ^ p_window) {
window = p_window;
}
-void OSUWP::screen_size_changed() {
+void OS_UWP::screen_size_changed() {
gl_context->reset();
};
-Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
+Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
main_loop = NULL;
outside = true;
- ContextEGL::Driver opengl_api_type = ContextEGL::GLES_2_0;
+ ContextEGL_UWP::Driver opengl_api_type = ContextEGL_UWP::GLES_2_0;
if (p_video_driver == VIDEO_DRIVER_GLES2) {
- opengl_api_type = ContextEGL::GLES_2_0;
+ opengl_api_type = ContextEGL_UWP::GLES_2_0;
}
bool gl_initialization_error = false;
gl_context = NULL;
while (!gl_context) {
- gl_context = memnew(ContextEGL(window, opengl_api_type));
+ gl_context = memnew(ContextEGL_UWP(window, opengl_api_type));
if (gl_context->initialize() != OK) {
memdelete(gl_context);
gl_context = NULL;
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) {
if (p_video_driver == VIDEO_DRIVER_GLES2) {
gl_initialization_error = true;
break;
}
p_video_driver = VIDEO_DRIVER_GLES2;
- opengl_api_type = ContextEGL::GLES_2_0;
+ opengl_api_type = ContextEGL_UWP::GLES_2_0;
} else {
gl_initialization_error = true;
break;
@@ -218,15 +218,15 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
}
while (true) {
- if (opengl_api_type == ContextEGL::GLES_3_0) {
+ if (opengl_api_type == ContextEGL_UWP::GLES_3_0) {
if (RasterizerGLES3::is_viable() == OK) {
RasterizerGLES3::register_config();
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2")) {
p_video_driver = VIDEO_DRIVER_GLES2;
- opengl_api_type = ContextEGL::GLES_2_0;
+ opengl_api_type = ContextEGL_UWP::GLES_2_0;
continue;
} else {
gl_initialization_error = true;
@@ -235,7 +235,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
}
}
- if (opengl_api_type == ContextEGL::GLES_2_0) {
+ if (opengl_api_type == ContextEGL_UWP::GLES_2_0) {
if (RasterizerGLES2::is_viable() == OK) {
RasterizerGLES2::register_config();
RasterizerGLES2::make_current();
@@ -349,7 +349,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
return OK;
}
-void OSUWP::set_clipboard(const String &p_text) {
+void OS_UWP::set_clipboard(const String &p_text) {
DataPackage ^ clip = ref new DataPackage();
clip->RequestedOperation = DataPackageOperation::Copy;
@@ -358,7 +358,7 @@ void OSUWP::set_clipboard(const String &p_text) {
Clipboard::SetContent(clip);
};
-String OSUWP::get_clipboard() const {
+String OS_UWP::get_clipboard() const {
if (managed_object->clipboard != nullptr)
return managed_object->clipboard->Data();
@@ -366,25 +366,25 @@ String OSUWP::get_clipboard() const {
return "";
};
-void OSUWP::input_event(const Ref<InputEvent> &p_event) {
+void OS_UWP::input_event(const Ref<InputEvent> &p_event) {
input->parse_input_event(p_event);
};
-void OSUWP::delete_main_loop() {
+void OS_UWP::delete_main_loop() {
if (main_loop)
memdelete(main_loop);
main_loop = NULL;
}
-void OSUWP::set_main_loop(MainLoop *p_main_loop) {
+void OS_UWP::set_main_loop(MainLoop *p_main_loop) {
input->set_main_loop(p_main_loop);
main_loop = p_main_loop;
}
-void OSUWP::finalize() {
+void OS_UWP::finalize() {
if (main_loop)
memdelete(main_loop);
@@ -403,19 +403,19 @@ void OSUWP::finalize() {
joypad = nullptr;
}
-void OSUWP::finalize_core() {
+void OS_UWP::finalize_core() {
NetSocketPosix::cleanup();
}
-void OSUWP::alert(const String &p_alert, const String &p_title) {
+void OS_UWP::alert(const String &p_alert, const String &p_title) {
Platform::String ^ alert = ref new Platform::String(p_alert.c_str());
Platform::String ^ title = ref new Platform::String(p_title.c_str());
MessageDialog ^ msg = ref new MessageDialog(alert, title);
- UICommand ^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSUWP::ManagedType::alert_close));
+ UICommand ^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OS_UWP::ManagedType::alert_close));
msg->Commands->Append(close);
msg->DefaultCommandIndex = 0;
@@ -424,17 +424,17 @@ void OSUWP::alert(const String &p_alert, const String &p_title) {
msg->ShowAsync();
}
-void OSUWP::ManagedType::alert_close(IUICommand ^ command) {
+void OS_UWP::ManagedType::alert_close(IUICommand ^ command) {
alert_close_handle = false;
}
-void OSUWP::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
+void OS_UWP::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
update_clipboard();
}
-void OSUWP::ManagedType::update_clipboard() {
+void OS_UWP::ManagedType::update_clipboard() {
DataPackageView ^ data = Clipboard::GetContent();
@@ -446,7 +446,7 @@ void OSUWP::ManagedType::update_clipboard() {
}
}
-void OSUWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
+void OS_UWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
AccelerometerReading ^ reading = args->Reading;
@@ -456,7 +456,7 @@ void OSUWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender
reading->AccelerationZ));
}
-void OSUWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
+void OS_UWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
MagnetometerReading ^ reading = args->Reading;
@@ -466,7 +466,7 @@ void OSUWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender,
reading->MagneticFieldZ));
}
-void OSUWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
+void OS_UWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
GyrometerReading ^ reading = args->Reading;
@@ -476,7 +476,7 @@ void OSUWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, Gyrome
reading->AngularVelocityZ));
}
-void OSUWP::set_mouse_mode(MouseMode p_mode) {
+void OS_UWP::set_mouse_mode(MouseMode p_mode) {
if (p_mode == MouseMode::MOUSE_MODE_CAPTURED) {
@@ -501,41 +501,41 @@ void OSUWP::set_mouse_mode(MouseMode p_mode) {
SetEvent(mouse_mode_changed);
}
-OSUWP::MouseMode OSUWP::get_mouse_mode() const {
+OS_UWP::MouseMode OS_UWP::get_mouse_mode() const {
return mouse_mode;
}
-Point2 OSUWP::get_mouse_position() const {
+Point2 OS_UWP::get_mouse_position() const {
return Point2(old_x, old_y);
}
-int OSUWP::get_mouse_button_state() const {
+int OS_UWP::get_mouse_button_state() const {
return last_button_state;
}
-void OSUWP::set_window_title(const String &p_title) {
+void OS_UWP::set_window_title(const String &p_title) {
}
-void OSUWP::set_video_mode(const VideoMode &p_video_mode, int p_screen) {
+void OS_UWP::set_video_mode(const VideoMode &p_video_mode, int p_screen) {
video_mode = p_video_mode;
}
-OS::VideoMode OSUWP::get_video_mode(int p_screen) const {
+OS::VideoMode OS_UWP::get_video_mode(int p_screen) const {
return video_mode;
}
-void OSUWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
+void OS_UWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
}
-String OSUWP::get_name() {
+String OS_UWP::get_name() {
return "UWP";
}
-OS::Date OSUWP::get_date(bool utc) const {
+OS::Date OS_UWP::get_date(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -551,7 +551,7 @@ OS::Date OSUWP::get_date(bool utc) const {
date.dst = false;
return date;
}
-OS::Time OSUWP::get_time(bool utc) const {
+OS::Time OS_UWP::get_time(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -566,7 +566,7 @@ OS::Time OSUWP::get_time(bool utc) const {
return time;
}
-OS::TimeZoneInfo OSUWP::get_time_zone_info() const {
+OS::TimeZoneInfo OS_UWP::get_time_zone_info() const {
TIME_ZONE_INFORMATION info;
bool daylight = false;
if (GetTimeZoneInformation(&info) == TIME_ZONE_ID_DAYLIGHT)
@@ -579,11 +579,13 @@ OS::TimeZoneInfo OSUWP::get_time_zone_info() const {
ret.name = info.StandardName;
}
- ret.bias = info.Bias;
+ // Bias value returned by GetTimeZoneInformation is inverted of what we expect
+ // For example on GMT-3 GetTimeZoneInformation return a Bias of 180, so invert the value to get -180
+ ret.bias = -info.Bias;
return ret;
}
-uint64_t OSUWP::get_unix_time() const {
+uint64_t OS_UWP::get_unix_time() const {
FILETIME ft;
SYSTEMTIME st;
@@ -605,14 +607,14 @@ uint64_t OSUWP::get_unix_time() const {
return (*(uint64_t *)&ft - *(uint64_t *)&fep) / 10000000;
};
-void OSUWP::delay_usec(uint32_t p_usec) const {
+void OS_UWP::delay_usec(uint32_t p_usec) const {
int msec = p_usec < 1000 ? 1 : p_usec / 1000;
// no Sleep()
WaitForSingleObjectEx(GetCurrentThread(), msec, false);
}
-uint64_t OSUWP::get_ticks_usec() const {
+uint64_t OS_UWP::get_ticks_usec() const {
uint64_t ticks;
uint64_t time;
@@ -626,13 +628,13 @@ uint64_t OSUWP::get_ticks_usec() const {
return time;
}
-void OSUWP::process_events() {
+void OS_UWP::process_events() {
joypad->process_controllers();
process_key_events();
}
-void OSUWP::process_key_events() {
+void OS_UWP::process_key_events() {
for (int i = 0; i < key_event_pos; i++) {
@@ -653,7 +655,7 @@ void OSUWP::process_key_events() {
key_event_pos = 0;
}
-void OSUWP::queue_key_event(KeyEvent &p_event) {
+void OS_UWP::queue_key_event(KeyEvent &p_event) {
// This merges Char events with the previous Key event, so
// the unicode can be retrieved without sending duplicate events.
if (p_event.type == KeyEvent::MessageType::CHAR_EVENT_MESSAGE && key_event_pos > 0) {
@@ -670,7 +672,7 @@ void OSUWP::queue_key_event(KeyEvent &p_event) {
key_event_buffer[key_event_pos++] = p_event;
}
-void OSUWP::set_cursor_shape(CursorShape p_shape) {
+void OS_UWP::set_cursor_shape(CursorShape p_shape) {
ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
@@ -702,57 +704,62 @@ void OSUWP::set_cursor_shape(CursorShape p_shape) {
cursor_shape = p_shape;
}
-void OSUWP::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
+void OS_UWP::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
// TODO
}
-Error OSUWP::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
+Error OS_UWP::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
return FAILED;
};
-Error OSUWP::kill(const ProcessID &p_pid) {
+Error OS_UWP::kill(const ProcessID &p_pid) {
return FAILED;
};
-Error OSUWP::set_cwd(const String &p_cwd) {
+Error OS_UWP::set_cwd(const String &p_cwd) {
return FAILED;
}
-String OSUWP::get_executable_path() const {
+String OS_UWP::get_executable_path() const {
return "";
}
-void OSUWP::set_icon(const Ref<Image> &p_icon) {
+void OS_UWP::set_icon(const Ref<Image> &p_icon) {
}
-bool OSUWP::has_environment(const String &p_var) const {
+bool OS_UWP::has_environment(const String &p_var) const {
return false;
};
-String OSUWP::get_environment(const String &p_var) const {
+String OS_UWP::get_environment(const String &p_var) const {
return "";
};
-String OSUWP::get_stdin_string(bool p_block) {
+bool OS_UWP::set_environment(const String &p_var, const String &p_value) const {
+
+ return false;
+}
+
+String OS_UWP::get_stdin_string(bool p_block) {
return String();
}
-void OSUWP::move_window_to_foreground() {
+void OS_UWP::move_window_to_foreground() {
}
-Error OSUWP::shell_open(String p_uri) {
+Error OS_UWP::shell_open(String p_uri) {
return FAILED;
}
-String OSUWP::get_locale() const {
+String OS_UWP::get_locale() const {
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't
return "en";
@@ -762,39 +769,39 @@ String OSUWP::get_locale() const {
#endif
}
-void OSUWP::release_rendering_thread() {
+void OS_UWP::release_rendering_thread() {
gl_context->release_current();
}
-void OSUWP::make_rendering_thread() {
+void OS_UWP::make_rendering_thread() {
gl_context->make_current();
}
-void OSUWP::swap_buffers() {
+void OS_UWP::swap_buffers() {
gl_context->swap_buffers();
}
-bool OSUWP::has_touchscreen_ui_hint() const {
+bool OS_UWP::has_touchscreen_ui_hint() const {
TouchCapabilities ^ tc = ref new TouchCapabilities();
return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
}
-bool OSUWP::has_virtual_keyboard() const {
+bool OS_UWP::has_virtual_keyboard() const {
return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
}
-void OSUWP::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) {
+void OS_UWP::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) {
InputPane ^ pane = InputPane::GetForCurrentView();
pane->TryShow();
}
-void OSUWP::hide_virtual_keyboard() {
+void OS_UWP::hide_virtual_keyboard() {
InputPane ^ pane = InputPane::GetForCurrentView();
pane->TryHide();
@@ -813,7 +820,7 @@ static String format_error_message(DWORD id) {
return msg;
}
-Error OSUWP::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
+Error OS_UWP::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
String full_path = "game/" + p_path;
p_library_handle = (void *)LoadPackagedLibrary(full_path.c_str(), 0);
@@ -825,14 +832,14 @@ Error OSUWP::open_dynamic_library(const String p_path, void *&p_library_handle,
return OK;
}
-Error OSUWP::close_dynamic_library(void *p_library_handle) {
+Error OS_UWP::close_dynamic_library(void *p_library_handle) {
if (!FreeLibrary((HMODULE)p_library_handle)) {
return FAILED;
}
return OK;
}
-Error OSUWP::get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional) {
+Error OS_UWP::get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional) {
p_symbol_handle = (void *)GetProcAddress((HMODULE)p_library_handle, p_name.utf8().get_data());
if (!p_symbol_handle) {
if (!p_optional) {
@@ -845,7 +852,7 @@ Error OSUWP::get_dynamic_library_symbol_handle(void *p_library_handle, const Str
return OK;
}
-void OSUWP::run() {
+void OS_UWP::run() {
if (!main_loop)
return;
@@ -869,35 +876,35 @@ void OSUWP::run() {
main_loop->finish();
}
-MainLoop *OSUWP::get_main_loop() const {
+MainLoop *OS_UWP::get_main_loop() const {
return main_loop;
}
-String OSUWP::get_user_data_dir() const {
+String OS_UWP::get_user_data_dir() const {
Windows::Storage::StorageFolder ^ data_folder = Windows::Storage::ApplicationData::Current->LocalFolder;
return String(data_folder->Path->Data()).replace("\\", "/");
}
-bool OSUWP::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc" || p_feature == "s3tc";
+bool OS_UWP::_check_internal_feature_support(const String &p_feature) {
+ return p_feature == "pc";
}
-OS::PowerState OSUWP::get_power_state() {
+OS::PowerState OS_UWP::get_power_state() {
return power_manager->get_power_state();
}
-int OSUWP::get_power_seconds_left() {
+int OS_UWP::get_power_seconds_left() {
return power_manager->get_power_seconds_left();
}
-int OSUWP::get_power_percent_left() {
+int OS_UWP::get_power_percent_left() {
return power_manager->get_power_percent_left();
}
-OSUWP::OSUWP() {
+OS_UWP::OS_UWP() {
key_event_pos = 0;
force_quit = false;
@@ -931,7 +938,7 @@ OSUWP::OSUWP() {
_set_logger(memnew(CompositeLogger(loggers)));
}
-OSUWP::~OSUWP() {
+OS_UWP::~OS_UWP() {
#ifdef STDOUT_FILE
fclose(stdo);
#endif
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 491c9bce03..fd78b3cdf7 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -28,15 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef OSUWP_H
-#define OSUWP_H
+#ifndef OS_UWP_H
+#define OS_UWP_H
+#include "context_egl_uwp.h"
#include "core/math/transform_2d.h"
#include "core/os/input.h"
#include "core/os/os.h"
#include "core/ustring.h"
#include "drivers/xaudio2/audio_driver_xaudio2.h"
-#include "gl_context_egl.h"
#include "joypad_uwp.h"
#include "main/input_default.h"
#include "power_uwp.h"
@@ -52,7 +52,7 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-class OSUWP : public OS {
+class OS_UWP : public OS {
public:
struct KeyEvent {
@@ -95,7 +95,7 @@ private:
VisualServer *visual_server;
int pressrc;
- ContextEGL *gl_context;
+ ContextEGL_UWP *gl_context;
Windows::UI::Core::CoreWindow ^ window;
VideoMode video_mode;
@@ -144,7 +144,7 @@ private:
/* clang-format off */
internal:
ManagedType() { alert_close_handle = false; }
- property OSUWP* os;
+ property OS_UWP* os;
/* clang-format on */
};
ManagedType ^ managed_object;
@@ -213,6 +213,7 @@ public:
virtual bool has_environment(const String &p_var) const;
virtual String get_environment(const String &p_var) const;
+ virtual bool set_environment(const String &p_var, const String &p_value) const;
virtual void set_clipboard(const String &p_text);
virtual String get_clipboard() const;
@@ -261,8 +262,8 @@ public:
void queue_key_event(KeyEvent &p_event);
- OSUWP();
- ~OSUWP();
+ OS_UWP();
+ ~OS_UWP();
};
#endif
diff --git a/platform/uwp/power_uwp.h b/platform/uwp/power_uwp.h
index d6623f9340..cc19904a62 100644
--- a/platform/uwp/power_uwp.h
+++ b/platform/uwp/power_uwp.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_UWP_POWER_UWP_H_
-#define PLATFORM_UWP_POWER_UWP_H_
+#ifndef POWER_UWP_H
+#define POWER_UWP_H
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
@@ -53,4 +53,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_UWP_POWER_UWP_H_ */
+#endif // POWER_UWP_H
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index e07d373c4b..892d734734 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -7,13 +7,12 @@ from platform_methods import run_in_subprocess
import platform_windows_builders
common_win = [
- "godot_win.cpp",
- "context_gl_win.cpp",
- "crash_handler_win.cpp",
+ "godot_windows.cpp",
+ "context_gl_windows.cpp",
+ "crash_handler_windows.cpp",
"os_windows.cpp",
- "ctxgl_procaddr.cpp",
- "key_mapping_win.cpp",
- "joypad.cpp",
+ "key_mapping_windows.cpp",
+ "joypad_windows.cpp",
"power_windows.cpp",
"windows_terminal_logger.cpp"
]
diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_windows.cpp
index 9d267c699f..e715999378 100644
--- a/platform/windows/context_gl_win.cpp
+++ b/platform/windows/context_gl_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* context_gl_win.cpp */
+/* context_gl_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -32,7 +32,7 @@
// Author: Juan Linietsky <reduzio@gmail.com>, (C) 2008
-#include "context_gl_win.h"
+#include "context_gl_windows.h"
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
@@ -43,32 +43,32 @@
typedef HGLRC(APIENTRY *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int *);
-void ContextGL_Win::release_current() {
+void ContextGL_Windows::release_current() {
wglMakeCurrent(hDC, NULL);
}
-void ContextGL_Win::make_current() {
+void ContextGL_Windows::make_current() {
wglMakeCurrent(hDC, hRC);
}
-int ContextGL_Win::get_window_width() {
+int ContextGL_Windows::get_window_width() {
return OS::get_singleton()->get_video_mode().width;
}
-int ContextGL_Win::get_window_height() {
+int ContextGL_Windows::get_window_height() {
return OS::get_singleton()->get_video_mode().height;
}
-void ContextGL_Win::swap_buffers() {
+void ContextGL_Windows::swap_buffers() {
SwapBuffers(hDC);
}
-void ContextGL_Win::set_use_vsync(bool p_use) {
+void ContextGL_Windows::set_use_vsync(bool p_use) {
if (wglSwapIntervalEXT) {
wglSwapIntervalEXT(p_use ? 1 : 0);
@@ -76,14 +76,14 @@ void ContextGL_Win::set_use_vsync(bool p_use) {
use_vsync = p_use;
}
-bool ContextGL_Win::is_using_vsync() const {
+bool ContextGL_Windows::is_using_vsync() const {
return use_vsync;
}
#define _WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
-Error ContextGL_Win::initialize() {
+Error ContextGL_Windows::initialize() {
static PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
@@ -172,14 +172,14 @@ Error ContextGL_Win::initialize() {
return OK;
}
-ContextGL_Win::ContextGL_Win(HWND hwnd, bool p_opengl_3_context) {
+ContextGL_Windows::ContextGL_Windows(HWND hwnd, bool p_opengl_3_context) {
opengl_3_context = p_opengl_3_context;
hWnd = hwnd;
use_vsync = false;
}
-ContextGL_Win::~ContextGL_Win() {
+ContextGL_Windows::~ContextGL_Windows() {
}
#endif
diff --git a/platform/windows/context_gl_win.h b/platform/windows/context_gl_windows.h
index 3076bbb1e8..09801b9146 100644
--- a/platform/windows/context_gl_win.h
+++ b/platform/windows/context_gl_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* context_gl_win.h */
+/* context_gl_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -43,7 +43,7 @@
typedef bool(APIENTRY *PFNWGLSWAPINTERVALEXTPROC)(int interval);
-class ContextGL_Win : public ContextGL {
+class ContextGL_Windows : public ContextGL {
HDC hDC;
HGLRC hRC;
@@ -68,8 +68,8 @@ public:
virtual void set_use_vsync(bool p_use);
virtual bool is_using_vsync() const;
- ContextGL_Win(HWND hwnd, bool p_opengl_3_context);
- virtual ~ContextGL_Win();
+ ContextGL_Windows(HWND hwnd, bool p_opengl_3_context);
+ virtual ~ContextGL_Windows();
};
#endif
diff --git a/platform/windows/crash_handler_win.cpp b/platform/windows/crash_handler_windows.cpp
index 1d93c6d8dd..4006c4c60e 100644
--- a/platform/windows/crash_handler_win.cpp
+++ b/platform/windows/crash_handler_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* crash_handler_win.cpp */
+/* crash_handler_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,9 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "crash_handler_windows.h"
+
+#include "core/os/os.h"
#include "core/project_settings.h"
#include "main/main.h"
-#include "os_windows.h"
#ifdef CRASH_HANDLER_EXCEPTION
@@ -39,6 +41,7 @@
#include <psapi.h>
#include <algorithm>
#include <iterator>
+#include <vector>
#pragma comment(lib, "psapi.lib")
#pragma comment(lib, "dbghelp.lib")
diff --git a/platform/windows/crash_handler_win.h b/platform/windows/crash_handler_windows.h
index 016612a00e..eba72beb7e 100644
--- a/platform/windows/crash_handler_win.h
+++ b/platform/windows/crash_handler_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* crash_handler_win.h */
+/* crash_handler_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CRASH_HANDLER_WIN_H
-#define CRASH_HANDLER_WIN_H
+#ifndef CRASH_HANDLER_WINDOWS_H
+#define CRASH_HANDLER_WINDOWS_H
#include <windows.h>
@@ -54,4 +54,4 @@ public:
~CrashHandler();
};
-#endif
+#endif // CRASH_HANDLER_WINDOWS_H
diff --git a/platform/windows/ctxgl_procaddr.cpp b/platform/windows/ctxgl_procaddr.cpp
deleted file mode 100644
index ecff8f7a4d..0000000000
--- a/platform/windows/ctxgl_procaddr.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/*************************************************************************/
-/* ctxgl_procaddr.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifdef OPENGL_ENABLED
-#include "ctxgl_procaddr.h"
-#include <GL/gl.h>
-#include <stdio.h>
-
-static PROC _gl_procs[] = {
- (PROC)glCullFace,
- (PROC)glFrontFace,
- (PROC)glHint,
- (PROC)glLineWidth,
- (PROC)glPointSize,
- (PROC)glPolygonMode,
- (PROC)glScissor,
- (PROC)glTexParameterf,
- (PROC)glTexParameterfv,
- (PROC)glTexParameteri,
- (PROC)glTexParameteriv,
- (PROC)glTexImage1D,
- (PROC)glTexImage2D,
- (PROC)glDrawBuffer,
- (PROC)glClear,
- (PROC)glClearColor,
- (PROC)glClearStencil,
- (PROC)glClearDepth,
- (PROC)glStencilMask,
- (PROC)glColorMask,
- (PROC)glDepthMask,
- (PROC)glDisable,
- (PROC)glEnable,
- (PROC)glFinish,
- (PROC)glFlush,
- (PROC)glBlendFunc,
- (PROC)glLogicOp,
- (PROC)glStencilFunc,
- (PROC)glStencilOp,
- (PROC)glDepthFunc,
- (PROC)glPixelStoref,
- (PROC)glPixelStorei,
- (PROC)glReadBuffer,
- (PROC)glReadPixels,
- (PROC)glGetBooleanv,
- (PROC)glGetDoublev,
- (PROC)glGetError,
- (PROC)glGetFloatv,
- (PROC)glGetIntegerv,
- (PROC)glGetString,
- (PROC)glGetTexImage,
- (PROC)glGetTexParameterfv,
- (PROC)glGetTexParameteriv,
- (PROC)glGetTexLevelParameterfv,
- (PROC)glGetTexLevelParameteriv,
- (PROC)glIsEnabled,
- (PROC)glDepthRange,
- (PROC)glViewport,
- /* not detected in ATI */
- (PROC)glDrawArrays,
- (PROC)glDrawElements,
- (PROC)glGetPointerv,
- (PROC)glPolygonOffset,
- (PROC)glCopyTexImage1D,
- (PROC)glCopyTexImage2D,
- (PROC)glCopyTexSubImage1D,
- (PROC)glCopyTexSubImage2D,
- (PROC)glTexSubImage1D,
- (PROC)glTexSubImage2D,
- (PROC)glBindTexture,
- (PROC)glDeleteTextures,
- (PROC)glGenTextures,
- (PROC)glIsTexture,
-
- 0
-};
-
-static const char *_gl_proc_names[] = {
- "glCullFace",
- "glFrontFace",
- "glHint",
- "glLineWidth",
- "glPointSize",
- "glPolygonMode",
- "glScissor",
- "glTexParameterf",
- "glTexParameterfv",
- "glTexParameteri",
- "glTexParameteriv",
- "glTexImage1D",
- "glTexImage2D",
- "glDrawBuffer",
- "glClear",
- "glClearColor",
- "glClearStencil",
- "glClearDepth",
- "glStencilMask",
- "glColorMask",
- "glDepthMask",
- "glDisable",
- "glEnable",
- "glFinish",
- "glFlush",
- "glBlendFunc",
- "glLogicOp",
- "glStencilFunc",
- "glStencilOp",
- "glDepthFunc",
- "glPixelStoref",
- "glPixelStorei",
- "glReadBuffer",
- "glReadPixels",
- "glGetBooleanv",
- "glGetDoublev",
- "glGetError",
- "glGetFloatv",
- "glGetIntegerv",
- "glGetString",
- "glGetTexImage",
- "glGetTexParameterfv",
- "glGetTexParameteriv",
- "glGetTexLevelParameterfv",
- "glGetTexLevelParameteriv",
- "glIsEnabled",
- "glDepthRange",
- "glViewport",
- /* not detected in ati */
- "glDrawArrays",
- "glDrawElements",
- "glGetPointerv",
- "glPolygonOffset",
- "glCopyTexImage1D",
- "glCopyTexImage2D",
- "glCopyTexSubImage1D",
- "glCopyTexSubImage2D",
- "glTexSubImage1D",
- "glTexSubImage2D",
- "glBindTexture",
- "glDeleteTextures",
- "glGenTextures",
- "glIsTexture",
-
- 0
-};
-
-PROC get_gl_proc_address(const char *p_address) {
-
- PROC proc = wglGetProcAddress((const CHAR *)p_address);
- if (!proc) {
-
- int i = 0;
- while (_gl_procs[i]) {
-
- if (strcmp(p_address, _gl_proc_names[i]) == 0) {
- return _gl_procs[i];
- }
- i++;
- }
- }
- return proc;
-}
-#endif
diff --git a/platform/windows/ctxgl_procaddr.h b/platform/windows/ctxgl_procaddr.h
deleted file mode 100644
index cc40804ae6..0000000000
--- a/platform/windows/ctxgl_procaddr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************************************/
-/* ctxgl_procaddr.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef CTXGL_PROCADDR_H
-#define CTXGL_PROCADDR_H
-
-#ifdef OPENGL_ENABLED
-#include <windows.h>
-
-PROC get_gl_proc_address(const char *p_address);
-#endif
-#endif // CTXGL_PROCADDR_H
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 0662bc2edc..426a5e9e61 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -205,8 +205,8 @@ def configure_msvc(env, manual_msvc_config):
print("Missing environment variable: WindowsSdkDir")
env.AppendUnique(CPPDEFINES = ['WINDOWS_ENABLED', 'OPENGL_ENABLED',
- 'RTAUDIO_ENABLED', 'WASAPI_ENABLED',
- 'WINMIDI_ENABLED', 'TYPED_METHOD_BIND',
+ 'WASAPI_ENABLED', 'WINMIDI_ENABLED',
+ 'TYPED_METHOD_BIND',
'WIN32', 'MSVC',
'WINVER=%s' % env["target_win_version"],
'_WIN32_WINNT=%s' % env["target_win_version"]])
@@ -326,8 +326,8 @@ def configure_mingw(env):
env.Append(CCFLAGS=['-DWINDOWS_ENABLED', '-mwindows'])
env.Append(CCFLAGS=['-DOPENGL_ENABLED'])
- env.Append(CCFLAGS=['-DRTAUDIO_ENABLED'])
env.Append(CCFLAGS=['-DWASAPI_ENABLED'])
+ env.Append(CCFLAGS=['-DWINMIDI_ENABLED'])
env.Append(CCFLAGS=['-DWINVER=%s' % env['target_win_version'], '-D_WIN32_WINNT=%s' % env['target_win_version']])
env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser', 'imm32', 'bcrypt','avrt'])
@@ -347,12 +347,12 @@ def configure(env):
env['ENV']['TMP'] = os.environ['TMP']
# First figure out which compiler, version, and target arch we're using
- if os.getenv("VCINSTALLDIR"):
+ if os.getenv("VCINSTALLDIR") and not env["use_mingw"]:
# Manual setup of MSVC
setup_msvc_manual(env)
env.msvc = True
manual_msvc_config = True
- elif env.get('MSVC_VERSION', ''):
+ elif env.get('MSVC_VERSION', '') and not env["use_mingw"]:
setup_msvc_auto(env)
env.msvc = True
manual_msvc_config = False
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp
index ca2f71ca18..141ab96370 100644
--- a/platform/windows/export/export.cpp
+++ b/platform/windows/export/export.cpp
@@ -73,7 +73,7 @@ Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset>
}
#endif
- String icon_path = p_preset->get("application/icon");
+ String icon_path = ProjectSettings::get_singleton()->globalize_path(p_preset->get("application/icon"));
String file_verion = p_preset->get("application/file_version");
String product_version = p_preset->get("application/product_version");
String company_name = p_preset->get("application/company_name");
@@ -137,7 +137,7 @@ Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset>
void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_options) {
EditorExportPlatformPC::get_export_options(r_options);
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_GLOBAL_FILE, "*.ico"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_FILE, "*.ico"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/file_version"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/product_version"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/company_name", PROPERTY_HINT_PLACEHOLDER_TEXT, "Company Name"), ""));
diff --git a/platform/windows/godot.natvis b/platform/windows/godot.natvis
index 01963035a1..55c83c3f3c 100644
--- a/platform/windows/godot.natvis
+++ b/platform/windows/godot.natvis
@@ -2,92 +2,109 @@
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="Vector&lt;*&gt;">
<Expand>
- <Item Name="size">(_cowdata &amp;&amp; _cowdata-&gt;_ptr) ? (((const unsigned int *)(_cowdata-&gt;_ptr))[-1]) : 0</Item>
+ <Item Name="[size]">_cowdata._ptr ? (((const unsigned int *)(_cowdata._ptr))[-1]) : 0</Item>
<ArrayItems>
- <Size>(_cowdata &amp;&amp; _cowdata-&gt;_ptr) ? (((const unsigned int *)(_cowdata-&gt;_ptr))[-1]) : 0</Size>
- <ValuePointer>(_cowdata) ? (_cowdata-&gt;_ptr) : 0</ValuePointer>
+ <Size>_cowdata._ptr ? (((const unsigned int *)(_cowdata._ptr))[-1]) : 0</Size>
+ <ValuePointer>_cowdata._ptr</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="PoolVector&lt;*&gt;">
<Expand>
- <Item Name="size">alloc ? (alloc-&gt;size / sizeof($T1)) : 0</Item>
+ <Item Name="[size]">alloc ? (alloc-&gt;size / sizeof($T1)) : 0</Item>
<ArrayItems>
<Size>alloc ? (alloc-&gt;size / sizeof($T1)) : 0</Size>
<ValuePointer>alloc ? (($T1 *)alloc-&gt;mem) : 0</ValuePointer>
</ArrayItems>
</Expand>
</Type>
+
+ <Type Name="List&lt;*&gt;">
+ <Expand>
+ <Item Name="[size]">_data ? (_data->size_cache) : 0</Item>
+ <LinkedListItems>
+ <Size>_data ? (_data->size_cache) : 0</Size>
+ <HeadPointer>_data->first</HeadPointer>
+ <NextPointer>next_ptr</NextPointer>
+ <ValueNode>value</ValueNode>
+ </LinkedListItems>
+ </Expand>
+ </Type>
<Type Name="Variant">
- <DisplayString Condition="this-&gt;type == Variant::NIL">nil</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::BOOL">{_data._bool}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::INT">{_data._int}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::REAL">{_data._real}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::TRANSFORM2D">{_data._transform2d}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::AABB">{_data._aabb}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::BASIS">{_data._basis}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::TRANSFORM">{_data._transform}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::ARRAY">{*(Array *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::STRING &amp;&amp; ((String *)(&amp;_data._mem[0]))-&gt;_cowdata._ptr == 0">""</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::STRING &amp;&amp; ((String *)(&amp;_data._mem[0]))-&gt;_cowdata._ptr != 0">{((String *)(&amp;_data._mem[0]))-&gt;_cowdata._ptr,su}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::VECTOR2">{*(Vector2 *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::RECT2">{*(Rect2 *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::VECTOR3">{*(Vector3 *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::PLANE">{*(Plane *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::QUAT">{*(Quat *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::COLOR">{*(Color *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::NODE_PATH">{*(NodePath *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::_RID">{*(RID *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::OBJECT">{*(Object *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::DICTIONARY">{*(Dictionary *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::ARRAY">{*(Array *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::POOL_BYTE_ARRAY">{*(PoolByteArray *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::POOL_INT_ARRAY">{*(PoolIntArray *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::POOL_REAL_ARRAY">{*(PoolRealArray *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::POOL_STRING_ARRAY">{*(PoolStringArray *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::POOL_VECTOR2_ARRAY">{*(PoolVector2Array *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::POOL_VECTOR3_ARRAY">{*(PoolVector3Array *)_data._mem}</DisplayString>
- <DisplayString Condition="this-&gt;type == Variant::POOL_COLOR_ARRAY">{*(PoolColorArray *)_data._mem}</DisplayString>
-
- <StringView Condition="this-&gt;type == Variant::STRING &amp;&amp; ((String *)(&amp;_data._mem[0]))-&gt;_cowdata._ptr != 0">((String *)(&amp;_data._mem[0]))-&gt;_cowdata._ptr,su</StringView>
+ <DisplayString Condition="type == Variant::NIL">nil</DisplayString>
+ <DisplayString Condition="type == Variant::BOOL">{_data._bool}</DisplayString>
+ <DisplayString Condition="type == Variant::INT">{_data._int}</DisplayString>
+ <DisplayString Condition="type == Variant::REAL">{_data._real}</DisplayString>
+ <DisplayString Condition="type == Variant::TRANSFORM2D">{_data._transform2d}</DisplayString>
+ <DisplayString Condition="type == Variant::AABB">{_data._aabb}</DisplayString>
+ <DisplayString Condition="type == Variant::BASIS">{_data._basis}</DisplayString>
+ <DisplayString Condition="type == Variant::TRANSFORM">{_data._transform}</DisplayString>
+ <DisplayString Condition="type == Variant::STRING">{*(String *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::VECTOR2">{*(Vector2 *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::RECT2">{*(Rect2 *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::VECTOR3">{*(Vector3 *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::PLANE">{*(Plane *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::QUAT">{*(Quat *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::COLOR">{*(Color *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::NODE_PATH">{*(NodePath *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::_RID">{*(RID *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::OBJECT">{*(Object *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::DICTIONARY">{*(Dictionary *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::ARRAY">{*(Array *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::POOL_BYTE_ARRAY">{*(PoolByteArray *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::POOL_INT_ARRAY">{*(PoolIntArray *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::POOL_REAL_ARRAY">{*(PoolRealArray *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::POOL_STRING_ARRAY">{*(PoolStringArray *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::POOL_VECTOR2_ARRAY">{*(PoolVector2Array *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::POOL_VECTOR3_ARRAY">{*(PoolVector3Array *)_data._mem}</DisplayString>
+ <DisplayString Condition="type == Variant::POOL_COLOR_ARRAY">{*(PoolColorArray *)_data._mem}</DisplayString>
+ <StringView Condition="type == Variant::STRING &amp;&amp; ((String *)(_data._mem))->_cowdata._ptr">((String *)(_data._mem))->_cowdata._ptr,su</StringView>
+
<Expand>
- <Item Name="value" Condition="this-&gt;type == Variant::BOOL">_data._bool</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::INT">_data._int</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::REAL">_data._real</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::TRANSFORM2D">_data._transform2d</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::AABB">_data._aabb</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::BASIS">_data._basis</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::TRANSFORM">_data._transform</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::ARRAY">*(Array *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::STRING">*(String *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::VECTOR2">*(Vector2 *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::RECT2">*(Rect2 *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::VECTOR3">*(Vector3 *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::PLANE">*(Plane *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::QUAT">*(Quat *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::COLOR">*(Color *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::NODE_PATH">*(NodePath *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::_RID">*(RID *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::OBJECT">*(Object *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::DICTIONARY">*(Dictionary *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::ARRAY">*(Array *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::POOL_BYTE_ARRAY">*(PoolByteArray *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::POOL_INT_ARRAY">*(PoolIntArray *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::POOL_REAL_ARRAY">*(PoolRealArray *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::POOL_STRING_ARRAY">*(PoolStringArray *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::POOL_VECTOR2_ARRAY">*(PoolVector2Array *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::POOL_VECTOR3_ARRAY">*(PoolVector3Array *)_data._mem</Item>
- <Item Name="value" Condition="this-&gt;type == Variant::POOL_COLOR_ARRAY">*(PoolColorArray *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::BOOL">_data._bool</Item>
+ <Item Name="[value]" Condition="type == Variant::INT">_data._int</Item>
+ <Item Name="[value]" Condition="type == Variant::REAL">_data._real</Item>
+ <Item Name="[value]" Condition="type == Variant::TRANSFORM2D">_data._transform2d</Item>
+ <Item Name="[value]" Condition="type == Variant::AABB">_data._aabb</Item>
+ <Item Name="[value]" Condition="type == Variant::BASIS">_data._basis</Item>
+ <Item Name="[value]" Condition="type == Variant::TRANSFORM">_data._transform</Item>
+ <Item Name="[value]" Condition="type == Variant::STRING">*(String *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::VECTOR2">*(Vector2 *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::RECT2">*(Rect2 *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::VECTOR3">*(Vector3 *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::PLANE">*(Plane *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::QUAT">*(Quat *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::COLOR">*(Color *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::NODE_PATH">*(NodePath *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::_RID">*(RID *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::OBJECT">*(Object *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::DICTIONARY">*(Dictionary *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::ARRAY">*(Array *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::POOL_BYTE_ARRAY">*(PoolByteArray *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::POOL_INT_ARRAY">*(PoolIntArray *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::POOL_REAL_ARRAY">*(PoolRealArray *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::POOL_STRING_ARRAY">*(PoolStringArray *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::POOL_VECTOR2_ARRAY">*(PoolVector2Array *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::POOL_VECTOR3_ARRAY">*(PoolVector3Array *)_data._mem</Item>
+ <Item Name="[value]" Condition="type == Variant::POOL_COLOR_ARRAY">*(PoolColorArray *)_data._mem</Item>
</Expand>
</Type>
<Type Name="String">
- <DisplayString Condition="this-&gt;_cowdata._ptr == 0">empty</DisplayString>
- <DisplayString Condition="this-&gt;_cowdata._ptr != 0">{this->_cowdata._ptr,su}</DisplayString>
- <StringView Condition="this-&gt;_cowdata._ptr != 0">this->_cowdata._ptr,su</StringView>
+ <DisplayString Condition="_cowdata._ptr == 0">[empty]</DisplayString>
+ <DisplayString Condition="_cowdata._ptr != 0">{_cowdata._ptr,su}</DisplayString>
+ <StringView Condition="_cowdata._ptr != 0">_cowdata._ptr,su</StringView>
+ </Type>
+
+ <Type Name="StringName">
+ <DisplayString Condition="_data &amp;&amp; _data->cname">{_data->cname}</DisplayString>
+ <DisplayString Condition="_data &amp;&amp; !_data->cname">{_data->name,su}</DisplayString>
+ <DisplayString Condition="!_data">[empty]</DisplayString>
+ <StringView Condition="_data &amp;&amp; _data->cname">_data->cname</StringView>
+ <StringView Condition="_data &amp;&amp; !_data->cname">_data->name,su</StringView>
</Type>
<Type Name="Vector2">
diff --git a/platform/windows/godot_win.cpp b/platform/windows/godot_windows.cpp
index 0f5065d816..0b52682c7c 100644
--- a/platform/windows/godot_win.cpp
+++ b/platform/windows/godot_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* godot_win.cpp */
+/* godot_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,6 +30,7 @@
#include "main/main.h"
#include "os_windows.h"
+
#include <locale.h>
#include <stdio.h>
diff --git a/platform/windows/joypad.cpp b/platform/windows/joypad_windows.cpp
index 5fafc7c8c0..5a399cdf90 100644
--- a/platform/windows/joypad.cpp
+++ b/platform/windows/joypad_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad.cpp */
+/* joypad_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "joypad.h"
+#include "joypad_windows.h"
#include <oleauto.h>
#include <wbemidl.h>
diff --git a/platform/windows/joypad.h b/platform/windows/joypad_windows.h
index 3a6c0cef9f..4af5d9bd6a 100644
--- a/platform/windows/joypad.h
+++ b/platform/windows/joypad_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad.h */
+/* joypad_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,10 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef JOYPAD_H
-#define JOYPAD_H
+#ifndef JOYPAD_WINDOWS_H
+#define JOYPAD_WINDOWS_H
#include "os_windows.h"
+
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <xinput.h> // on unix the file is called "xinput.h", on windows I'm sure it won't mind
@@ -145,4 +146,4 @@ private:
XInputSetState_t xinput_set_state;
};
-#endif
+#endif // JOYPAD_WINDOWS_H
diff --git a/platform/windows/key_mapping_win.cpp b/platform/windows/key_mapping_windows.cpp
index f9b01e5532..01bbb072bb 100644
--- a/platform/windows/key_mapping_win.cpp
+++ b/platform/windows/key_mapping_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* key_mapping_win.cpp */
+/* key_mapping_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "key_mapping_win.h"
+#include "key_mapping_windows.h"
#include <stdio.h>
diff --git a/platform/windows/key_mapping_win.h b/platform/windows/key_mapping_windows.h
index e4f8a61d04..dbb8c20f1e 100644
--- a/platform/windows/key_mapping_win.h
+++ b/platform/windows/key_mapping_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* key_mapping_win.h */
+/* key_mapping_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -45,4 +45,4 @@ public:
static unsigned int get_keysym(unsigned int p_code);
};
-#endif
+#endif // KEY_MAPPING_WINDOWS_H
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 35f9d541ef..6125455e74 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -43,15 +43,16 @@
#include "drivers/windows/rw_lock_windows.h"
#include "drivers/windows/semaphore_windows.h"
#include "drivers/windows/thread_windows.h"
-#include "joypad.h"
+#include "joypad_windows.h"
#include "lang_table.h"
#include "main/main.h"
#include "servers/audio_server.h"
#include "servers/visual/visual_server_raster.h"
#include "servers/visual/visual_server_wrap_mt.h"
#include "windows_terminal_logger.h"
-#include <avrt.h>
+#include <avrt.h>
+#include <direct.h>
#include <process.h>
#include <regstr.h>
#include <shlobj.h>
@@ -270,7 +271,7 @@ void OS_Windows::_touch_event(bool p_pressed, float p_x, float p_y, int idx) {
event->set_position(Vector2(p_x, p_y));
if (main_loop) {
- input->parse_input_event(event);
+ input->accumulate_input_event(event);
}
};
@@ -292,11 +293,21 @@ void OS_Windows::_drag_event(float p_x, float p_y, int idx) {
event->set_position(Vector2(p_x, p_y));
if (main_loop)
- input->parse_input_event(event);
+ input->accumulate_input_event(event);
};
LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
+ if (drop_events) {
+
+ if (user_proc) {
+
+ return CallWindowProcW(user_proc, hWnd, uMsg, wParam, lParam);
+ } else {
+ return DefWindowProcW(hWnd, uMsg, wParam, lParam);
+ }
+ };
+
switch (uMsg) // Check For Windows Messages
{
case WM_SETFOCUS: {
@@ -447,7 +458,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
if (window_has_focus && main_loop && mm->get_relative() != Vector2())
- input->parse_input_event(mm);
+ input->accumulate_input_event(mm);
}
delete[] lpb;
} break;
@@ -534,7 +545,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
old_x = mm->get_position().x;
old_y = mm->get_position().y;
if (window_has_focus && main_loop)
- input->parse_input_event(mm);
+ input->accumulate_input_event(mm);
} break;
case WM_LBUTTONDOWN:
@@ -707,14 +718,14 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
mb->set_global_position(mb->get_position());
if (main_loop) {
- input->parse_input_event(mb);
+ input->accumulate_input_event(mb);
if (mb->is_pressed() && mb->get_button_index() > 3 && mb->get_button_index() < 8) {
//send release for mouse wheel
Ref<InputEventMouseButton> mbd = mb->duplicate();
last_button_state &= ~(1 << (mbd->get_button_index() - 1));
mbd->set_button_mask(last_button_state);
mbd->set_pressed(false);
- input->parse_input_event(mbd);
+ input->accumulate_input_event(mbd);
}
}
} break;
@@ -977,7 +988,7 @@ void OS_Windows::process_key_events() {
if (k->get_unicode() < 32)
k->set_unicode(0);
- input->parse_input_event(k);
+ input->accumulate_input_event(k);
}
//do nothing
@@ -1015,7 +1026,7 @@ void OS_Windows::process_key_events() {
k->set_echo((ke.uMsg == WM_KEYDOWN && (ke.lParam & (1 << 30))));
- input->parse_input_event(k);
+ input->accumulate_input_event(k);
} break;
}
@@ -1273,13 +1284,13 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
gl_context = NULL;
while (!gl_context) {
- gl_context = memnew(ContextGL_Win(hWnd, gles3_context));
+ gl_context = memnew(ContextGL_Windows(hWnd, gles3_context));
if (gl_context->initialize() != OK) {
memdelete(gl_context);
gl_context = NULL;
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best" || editor) {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2") || editor) {
if (p_video_driver == VIDEO_DRIVER_GLES2) {
gl_initialization_error = true;
break;
@@ -1301,7 +1312,7 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best" || editor) {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2") || editor) {
p_video_driver = VIDEO_DRIVER_GLES2;
gles3_context = false;
continue;
@@ -1394,6 +1405,8 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
}
+ update_real_mouse_position();
+
return OK;
}
@@ -1595,6 +1608,19 @@ Point2 OS_Windows::get_mouse_position() const {
return Point2(old_x, old_y);
}
+void OS_Windows::update_real_mouse_position() {
+
+ POINT mouse_pos;
+ if (GetCursorPos(&mouse_pos) && ScreenToClient(hWnd, &mouse_pos)) {
+ if (mouse_pos.x > 0 && mouse_pos.y > 0 && mouse_pos.x <= video_mode.width && mouse_pos.y <= video_mode.height) {
+ old_x = mouse_pos.x;
+ old_y = mouse_pos.y;
+ old_invalid = false;
+ input->set_mouse_position(Point2i(mouse_pos.x, mouse_pos.y));
+ }
+ }
+}
+
int OS_Windows::get_mouse_button_state() const {
return last_button_state;
@@ -1737,6 +1763,7 @@ void OS_Windows::set_window_position(const Point2 &p_position) {
}
last_pos = p_position;
+ update_real_mouse_position();
}
Size2 OS_Windows::get_window_size() const {
@@ -2137,7 +2164,9 @@ OS::TimeZoneInfo OS_Windows::get_time_zone_info() const {
ret.name = info.StandardName;
}
- ret.bias = info.Bias;
+ // Bias value returned by GetTimeZoneInformation is inverted of what we expect
+ // For example on GMT-3 GetTimeZoneInformation return a Bias of 180, so invert the value to get -180
+ ret.bias = -info.Bias;
return ret;
}
@@ -2211,7 +2240,9 @@ void OS_Windows::process_events() {
MSG msg;
- joypad->process_joypads();
+ if (!drop_events) {
+ joypad->process_joypads();
+ }
while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) {
@@ -2219,7 +2250,10 @@ void OS_Windows::process_events() {
DispatchMessageW(&msg);
}
- process_key_events();
+ if (!drop_events) {
+ process_key_events();
+ input->flush_accumulated_events();
+ }
}
void OS_Windows::set_cursor_shape(CursorShape p_shape) {
@@ -2604,6 +2638,11 @@ String OS_Windows::get_environment(const String &p_var) const {
return "";
}
+bool OS_Windows::set_environment(const String &p_var, const String &p_value) const {
+
+ return (bool)SetEnvironmentVariableW(p_var.c_str(), p_value.c_str());
+}
+
String OS_Windows::get_stdin_string(bool p_block) {
if (p_block) {
@@ -2952,7 +2991,7 @@ int OS_Windows::get_power_percent_left() {
bool OS_Windows::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc" || p_feature == "s3tc" || p_feature == "bptc";
+ return p_feature == "pc";
}
void OS_Windows::disable_crash_handler() {
@@ -2963,6 +3002,13 @@ bool OS_Windows::is_disable_crash_handler() const {
return crash_handler.is_disabled();
}
+void OS_Windows::process_and_drop_events() {
+
+ drop_events = true;
+ process_events();
+ drop_events = false;
+}
+
Error OS_Windows::move_to_trash(const String &p_path) {
SHFILEOPSTRUCTW sf;
WCHAR *from = new WCHAR[p_path.length() + 2];
@@ -2991,6 +3037,7 @@ Error OS_Windows::move_to_trash(const String &p_path) {
OS_Windows::OS_Windows(HINSTANCE _hInstance) {
+ drop_events = false;
key_event_pos = 0;
layered_window = false;
hBitmap = NULL;
@@ -3014,9 +3061,6 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) {
#ifdef WASAPI_ENABLED
AudioDriverManager::add_driver(&driver_wasapi);
#endif
-#ifdef RTAUDIO_ENABLED
- AudioDriverManager::add_driver(&driver_rtaudio);
-#endif
#ifdef XAUDIO2_ENABLED
AudioDriverManager::add_driver(&driver_xaudio2);
#endif
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 4936a69120..2d03532c69 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -30,14 +30,17 @@
#ifndef OS_WINDOWS_H
#define OS_WINDOWS_H
-#include "context_gl_win.h"
+
+#include "context_gl_windows.h"
#include "core/os/input.h"
#include "core/os/os.h"
#include "core/project_settings.h"
-#include "crash_handler_win.h"
-#include "drivers/rtaudio/audio_driver_rtaudio.h"
+#include "crash_handler_windows.h"
+#include "drivers/unix/ip_unix.h"
#include "drivers/wasapi/audio_driver_wasapi.h"
-#include "drivers/winmidi/win_midi.h"
+#include "drivers/winmidi/midi_driver_winmidi.h"
+#include "key_mapping_windows.h"
+#include "main/input_default.h"
#include "power_windows.h"
#include "servers/audio_server.h"
#include "servers/visual/rasterizer.h"
@@ -45,9 +48,6 @@
#ifdef XAUDIO2_ENABLED
#include "drivers/xaudio2/audio_driver_xaudio2.h"
#endif
-#include "drivers/unix/ip_unix.h"
-#include "key_mapping_win.h"
-#include "main/input_default.h"
#include <fcntl.h>
#include <io.h>
@@ -86,7 +86,7 @@ class OS_Windows : public OS {
int old_x, old_y;
Point2i center;
#if defined(OPENGL_ENABLED)
- ContextGL_Win *gl_context;
+ ContextGL_Windows *gl_context;
#endif
VisualServer *visual_server;
int pressrc;
@@ -127,6 +127,7 @@ class OS_Windows : public OS {
bool window_has_focus;
uint32_t last_button_state;
bool use_raw_input;
+ bool drop_events;
HCURSOR cursors[CURSOR_MAX] = { NULL };
CursorShape cursor_shape;
@@ -141,9 +142,6 @@ class OS_Windows : public OS {
#ifdef WASAPI_ENABLED
AudioDriverWASAPI driver_wasapi;
#endif
-#ifdef RTAUDIO_ENABLED
- AudioDriverRtAudio driver_rtaudio;
-#endif
#ifdef XAUDIO2_ENABLED
AudioDriverXAudio2 driver_xaudio2;
#endif
@@ -200,6 +198,7 @@ public:
virtual void warp_mouse_position(const Point2 &p_to);
virtual Point2 get_mouse_position() const;
+ void update_real_mouse_position();
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
@@ -268,6 +267,7 @@ public:
virtual bool has_environment(const String &p_var) const;
virtual String get_environment(const String &p_var) const;
+ virtual bool set_environment(const String &p_var, const String &p_value) const;
virtual void set_clipboard(const String &p_text);
virtual String get_clipboard() const;
@@ -331,6 +331,8 @@ public:
virtual Error move_to_trash(const String &p_path);
+ virtual void process_and_drop_events();
+
OS_Windows(HINSTANCE _hInstance);
~OS_Windows();
};
diff --git a/platform/windows/power_windows.h b/platform/windows/power_windows.h
index 4d83d75e00..ef75ce6271 100644
--- a/platform/windows/power_windows.h
+++ b/platform/windows/power_windows.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_WINDOWS_POWER_WINDOWS_H_
-#define PLATFORM_WINDOWS_POWER_WINDOWS_H_
+#ifndef POWER_WINDOWS_H
+#define POWER_WINDOWS_H
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
@@ -55,4 +55,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_WINDOWS_POWER_WINDOWS_H_ */
+#endif // POWER_WINDOWS_H
diff --git a/platform/x11/crash_handler_x11.cpp b/platform/x11/crash_handler_x11.cpp
index 8737a2b92b..1e7f393bdd 100644
--- a/platform/x11/crash_handler_x11.cpp
+++ b/platform/x11/crash_handler_x11.cpp
@@ -28,15 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifdef DEBUG_ENABLED
-#define CRASH_HANDLER_ENABLED 1
-#endif
-
#include "crash_handler_x11.h"
+
#include "core/os/os.h"
#include "core/project_settings.h"
#include "main/main.h"
+#ifdef DEBUG_ENABLED
+#define CRASH_HANDLER_ENABLED 1
+#endif
+
#ifdef CRASH_HANDLER_ENABLED
#include <cxxabi.h>
#include <dlfcn.h>
diff --git a/platform/x11/crash_handler_x11.h b/platform/x11/crash_handler_x11.h
index 6efdd33d9d..d0664aef85 100644
--- a/platform/x11/crash_handler_x11.h
+++ b/platform/x11/crash_handler_x11.h
@@ -45,4 +45,4 @@ public:
~CrashHandler();
};
-#endif
+#endif // CRASH_HANDLER_X11_H
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 72139538b7..b5ad59e60a 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -2,7 +2,7 @@ import os
import platform
import sys
from compat import decode_utf8
-
+from methods import get_compiler_version, use_gcc
def is_active():
return True
@@ -20,12 +20,10 @@ def can_build():
# Check the minimal dependencies
x11_error = os.system("pkg-config --version > /dev/null")
if (x11_error):
- print("pkg-config not found.. x11 disabled.")
return False
x11_error = os.system("pkg-config x11 --modversion > /dev/null ")
if (x11_error):
- print("X11 not found.. x11 disabled.")
return False
x11_error = os.system("pkg-config xcursor --modversion > /dev/null ")
@@ -161,16 +159,10 @@ def configure(env):
env.Append(CCFLAGS=['-pipe'])
env.Append(LINKFLAGS=['-pipe'])
- # Check for gcc version > 5 before adding -no-pie
- import re
- import subprocess
- proc = subprocess.Popen([env['CXX'], '--version'], stdout=subprocess.PIPE)
- (stdout, _) = proc.communicate()
- stdout = decode_utf8(stdout)
- match = re.search('[0-9][0-9.]*', stdout)
- if match is not None:
- version = match.group().split('.')
- if (version[0] > '5'):
+ # Check for gcc version >= 6 before adding -no-pie
+ if use_gcc(env):
+ version = get_compiler_version(env)
+ if version != None and version[0] >= '6':
env.Append(CCFLAGS=['-fpie'])
env.Append(LINKFLAGS=['-no-pie'])
diff --git a/platform/x11/detect_prime.cpp b/platform/x11/detect_prime.cpp
index 04a825fac9..0fde2a0c04 100644
--- a/platform/x11/detect_prime.cpp
+++ b/platform/x11/detect_prime.cpp
@@ -180,8 +180,8 @@ int detect_prime() {
const char *vendor = (const char *)glGetString(GL_VENDOR);
const char *renderer = (const char *)glGetString(GL_RENDERER);
- int vendor_len = strlen(vendor) + 1;
- int renderer_len = strlen(renderer) + 1;
+ unsigned int vendor_len = strlen(vendor) + 1;
+ unsigned int renderer_len = strlen(renderer) + 1;
if (vendor_len + renderer_len >= sizeof(string)) {
renderer_len = 200 - vendor_len;
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index 907c652ab4..c4dd8fe0e0 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -367,12 +367,12 @@ void JoypadLinux::open_joypad(const char *p_path) {
joy.fd = fd;
joy.devpath = String(p_path);
setup_joypad_properties(joy_num);
- sprintf(uid, "%04x%04x", __bswap_16(inpid.bustype), 0);
+ sprintf(uid, "%04x%04x", BSWAP16(inpid.bustype), 0);
if (inpid.vendor && inpid.product && inpid.version) {
- uint16_t vendor = __bswap_16(inpid.vendor);
- uint16_t product = __bswap_16(inpid.product);
- uint16_t version = __bswap_16(inpid.version);
+ uint16_t vendor = BSWAP16(inpid.vendor);
+ uint16_t product = BSWAP16(inpid.product);
+ uint16_t version = BSWAP16(inpid.version);
sprintf(uid + String(uid).length(), "%04x%04x%04x%04x%04x%04x", vendor, 0, product, 0, version, 0);
input->joy_connection_changed(joy_num, true, name, uid);
@@ -476,7 +476,7 @@ void JoypadLinux::process_joypads() {
// ev may be tainted and out of MAX_KEY range, which will cause
// joy->key_map[ev.code] to crash
- if (ev.code < 0 || ev.code >= MAX_KEY)
+ if (ev.code >= MAX_KEY)
return;
switch (ev.type) {
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index e0924fc982..0fe91f3d00 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -243,8 +243,37 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
// maybe contextgl wants to be in charge of creating the window
#if defined(OPENGL_ENABLED)
if (getenv("DRI_PRIME") == NULL) {
- print_verbose("Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic.");
- int use_prime = detect_prime();
+ int use_prime = -1;
+
+ if (getenv("PRIMUS_DISPLAY") ||
+ getenv("PRIMUS_libGLd") ||
+ getenv("PRIMUS_libGLa") ||
+ getenv("PRIMUS_libGL") ||
+ getenv("PRIMUS_LOAD_GLOBAL") ||
+ getenv("BUMBLEBEE_SOCKET")) {
+
+ print_verbose("Optirun/primusrun detected. Skipping GPU detection");
+ use_prime = 0;
+ }
+
+ if (getenv("LD_LIBRARY_PATH")) {
+ String ld_library_path(getenv("LD_LIBRARY_PATH"));
+ Vector<String> libraries = ld_library_path.split(":");
+
+ for (int i = 0; i < libraries.size(); ++i) {
+ if (FileAccess::exists(libraries[i] + "/libGL.so.1") ||
+ FileAccess::exists(libraries[i] + "/libGL.so")) {
+
+ print_verbose("Custom libGL override detected. Skipping GPU detection");
+ use_prime = 0;
+ }
+ }
+ }
+
+ if (use_prime == -1) {
+ print_verbose("Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic.");
+ use_prime = detect_prime();
+ }
if (use_prime) {
print_line("Found discrete GPU, setting DRI_PRIME=1 to use it.");
@@ -270,7 +299,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
memdelete(context_gl);
context_gl = NULL;
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best" || editor) {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2") || editor) {
if (p_video_driver == VIDEO_DRIVER_GLES2) {
gl_initialization_error = true;
break;
@@ -292,7 +321,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
RasterizerGLES3::make_current();
break;
} else {
- if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best" || editor) {
+ if (GLOBAL_GET("rendering/quality/driver/fallback_to_gles2") || editor) {
p_video_driver = VIDEO_DRIVER_GLES2;
opengl_api_type = ContextGL_X11::GLES_2_0_COMPATIBLE;
continue;
@@ -1631,7 +1660,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
k->set_shift(true);
}
- input->parse_input_event(k);
+ input->accumulate_input_event(k);
}
return;
}
@@ -1714,7 +1743,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
// is correct, but the xorg developers are
// not very helpful today.
- ::Time tresh = ABS(peek_event.xkey.time - xkeyevent->time);
+ ::Time tresh = ABSDIFF(peek_event.xkey.time, xkeyevent->time);
if (peek_event.type == KeyPress && tresh < 5) {
KeySym rk;
XLookupString((XKeyEvent *)&peek_event, str, 256, &rk, NULL);
@@ -1775,7 +1804,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
}
//printf("key: %x\n",k->get_scancode());
- input->parse_input_event(k);
+ input->accumulate_input_event(k);
}
struct Property {
@@ -1962,12 +1991,12 @@ void OS_X11::process_xevents() {
// in a spurious mouse motion event being sent to Godot; remember it to be able to filter it out
xi.mouse_pos_to_filter = pos;
}
- input->parse_input_event(st);
+ input->accumulate_input_event(st);
} else {
if (!xi.state.has(index)) // Defensive
break;
xi.state.erase(index);
- input->parse_input_event(st);
+ input->accumulate_input_event(st);
}
} break;
@@ -1985,7 +2014,7 @@ void OS_X11::process_xevents() {
sd->set_index(index);
sd->set_position(pos);
sd->set_relative(pos - curr_pos_elem->value());
- input->parse_input_event(sd);
+ input->accumulate_input_event(sd);
curr_pos_elem->value() = pos;
}
@@ -2073,7 +2102,7 @@ void OS_X11::process_xevents() {
st.instance();
st->set_index(E->key());
st->set_position(E->get());
- input->parse_input_event(st);
+ input->accumulate_input_event(st);
}
xi.state.clear();
#endif
@@ -2134,7 +2163,7 @@ void OS_X11::process_xevents() {
}
}
- input->parse_input_event(mb);
+ input->accumulate_input_event(mb);
} break;
case MotionNotify: {
@@ -2244,7 +2273,7 @@ void OS_X11::process_xevents() {
// this is so that the relative motion doesn't get messed up
// after we regain focus.
if (window_has_focus || !mouse_mode_grab)
- input->parse_input_event(mm);
+ input->accumulate_input_event(mm);
} break;
case KeyPress:
@@ -2326,7 +2355,7 @@ void OS_X11::process_xevents() {
Vector<String> files = String((char *)p.data).split("\n", false);
for (int i = 0; i < files.size(); i++) {
- files.write[i] = files[i].replace("file://", "").replace("%20", " ").strip_escapes();
+ files.write[i] = files[i].replace("file://", "").http_unescape().strip_escapes();
}
main_loop->drop_files(files);
@@ -2428,6 +2457,8 @@ void OS_X11::process_xevents() {
printf("Win: %d,%d\n", win_x, win_y);
*/
}
+
+ input->flush_accumulated_events();
}
MainLoop *OS_X11::get_main_loop() const {
@@ -2564,7 +2595,7 @@ Error OS_X11::shell_open(String p_uri) {
bool OS_X11::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc" || p_feature == "s3tc" || p_feature == "bptc";
+ return p_feature == "pc";
}
String OS_X11::get_config_path() const {
@@ -3004,7 +3035,9 @@ bool OS_X11::is_vsync_enabled() const {
*/
void OS_X11::set_context(int p_context) {
+ char *config_name = NULL;
XClassHint *classHint = XAllocClassHint();
+
if (classHint) {
char *wm_class = (char *)"Godot";
@@ -3015,13 +3048,21 @@ void OS_X11::set_context(int p_context) {
if (p_context == CONTEXT_ENGINE) {
classHint->res_name = (char *)"Godot_Engine";
- wm_class = (char *)((String)GLOBAL_GET("application/config/name")).utf8().ptrw();
+ String config_name_tmp = GLOBAL_GET("application/config/name");
+ if (config_name_tmp.length() > 0) {
+ config_name = strdup(config_name_tmp.utf8().get_data());
+ } else {
+ config_name = strdup("Godot Engine");
+ }
+
+ wm_class = config_name;
}
classHint->res_class = wm_class;
XSetClassHint(x11_display, x11_window, classHint);
XFree(classHint);
+ free(config_name);
}
}
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index cf1619bae2..6d1a66af84 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -35,7 +35,7 @@
#include "core/os/input.h"
#include "crash_handler_x11.h"
#include "drivers/alsa/audio_driver_alsa.h"
-#include "drivers/alsamidi/alsa_midi.h"
+#include "drivers/alsamidi/midi_driver_alsamidi.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
#include "drivers/unix/os_unix.h"
#include "joypad_linux.h"
diff --git a/platform/x11/power_x11.h b/platform/x11/power_x11.h
index 56fbd602f4..469e3910f4 100644
--- a/platform/x11/power_x11.h
+++ b/platform/x11/power_x11.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef X11_POWER_H_
-#define X11_POWER_H_
+#ifndef POWER_X11_H
+#define POWER_X11_H
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
@@ -63,4 +63,4 @@ public:
int get_power_percent_left();
};
-#endif /* X11_POWER_H_ */
+#endif // POWER_X11_H
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index 28ddf6b5f8..f8384bd1e4 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -93,7 +93,7 @@ Rect2 AnimatedSprite::_get_rect() const {
Point2 ofs = offset;
if (centered)
- ofs -= s / 2;
+ ofs -= Size2(s) / 2;
if (s == Size2(0, 0))
s = Size2(1, 1);
@@ -276,9 +276,9 @@ void SpriteFrames::_set_animations(const Array &p_animations) {
anim.speed = d["speed"];
anim.loop = d["loop"];
Array frames = d["frames"];
- for (int i = 0; i < frames.size(); i++) {
+ for (int j = 0; j < frames.size(); j++) {
- RES res = frames[i];
+ RES res = frames[j];
anim.frames.push_back(res);
}
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 63c4758a34..2a225e5797 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -426,10 +426,10 @@ bool Area2D::is_monitoring() const {
void Area2D::set_monitorable(bool p_enable) {
- if (locked || Physics2DServer::get_singleton()->is_flushing_queries()) {
+ if (locked || (is_inside_tree() && Physics2DServer::get_singleton()->is_flushing_queries())) {
ERR_EXPLAIN("Function blocked during in/out signal. Use set_deferred(\"monitorable\",true/false)");
+ ERR_FAIL();
}
- ERR_FAIL_COND(locked || Physics2DServer::get_singleton()->is_flushing_queries());
if (p_enable == monitorable)
return;
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 961d2b00ef..7b28ad2c12 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -37,7 +37,7 @@
void AudioStreamPlayer2D::_mix_audio() {
if (!stream_playback.is_valid() || !active ||
- (stream_paused && !stream_paused_fade_out)) {
+ (stream_paused && !stream_fade_out)) {
return;
}
@@ -50,7 +50,7 @@ void AudioStreamPlayer2D::_mix_audio() {
AudioFrame *buffer = mix_buffer.ptrw();
int buffer_size = mix_buffer.size();
- if (stream_paused_fade_out) {
+ if (stream_fade_out) {
// Short fadeout ramp
buffer_size = MIN(buffer_size, 128);
}
@@ -84,10 +84,10 @@ void AudioStreamPlayer2D::_mix_audio() {
}
//mix!
- AudioFrame target_volume = stream_paused_fade_out ? AudioFrame(0.f, 0.f) : current.vol;
- AudioFrame vol_prev = stream_paused_fade_in ? AudioFrame(0.f, 0.f) : prev_outputs[i].vol;
+ AudioFrame target_volume = stream_fade_out ? AudioFrame(0.f, 0.f) : current.vol;
+ AudioFrame vol_prev = stream_fade_in ? AudioFrame(0.f, 0.f) : prev_outputs[i].vol;
AudioFrame vol_inc = (target_volume - vol_prev) / float(buffer_size);
- AudioFrame vol = stream_paused_fade_in ? AudioFrame(0.f, 0.f) : current.vol;
+ AudioFrame vol = stream_fade_in ? AudioFrame(0.f, 0.f) : current.vol;
int cc = AudioServer::get_singleton()->get_channel_count();
@@ -139,9 +139,15 @@ void AudioStreamPlayer2D::_mix_audio() {
active = false;
}
+ if (stream_stop) {
+ active = false;
+ set_physics_process_internal(false);
+ setplay = -1;
+ }
+
output_ready = false;
- stream_paused_fade_in = false;
- stream_paused_fade_out = false;
+ stream_fade_in = false;
+ stream_fade_out = false;
}
void AudioStreamPlayer2D::_notification(int p_what) {
@@ -323,6 +329,7 @@ void AudioStreamPlayer2D::play(float p_from_pos) {
}
if (stream_playback.is_valid()) {
+ stream_stop = false;
active = true;
setplay = p_from_pos;
output_ready = false;
@@ -340,9 +347,8 @@ void AudioStreamPlayer2D::seek(float p_seconds) {
void AudioStreamPlayer2D::stop() {
if (stream_playback.is_valid()) {
- active = false;
- set_physics_process_internal(false);
- setplay = -1;
+ stream_stop = true;
+ stream_fade_out = true;
}
}
@@ -457,8 +463,8 @@ void AudioStreamPlayer2D::set_stream_paused(bool p_pause) {
if (p_pause != stream_paused) {
stream_paused = p_pause;
- stream_paused_fade_in = p_pause ? false : true;
- stream_paused_fade_out = p_pause ? true : false;
+ stream_fade_in = p_pause ? false : true;
+ stream_fade_out = p_pause ? true : false;
}
}
@@ -537,8 +543,9 @@ AudioStreamPlayer2D::AudioStreamPlayer2D() {
output_ready = false;
area_mask = 1;
stream_paused = false;
- stream_paused_fade_in = false;
- stream_paused_fade_out = false;
+ stream_fade_in = false;
+ stream_fade_out = false;
+ stream_stop = false;
AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed");
}
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h
index cc00b59010..caf5c6ee49 100644
--- a/scene/2d/audio_stream_player_2d.h
+++ b/scene/2d/audio_stream_player_2d.h
@@ -73,8 +73,9 @@ private:
float pitch_scale;
bool autoplay;
bool stream_paused;
- bool stream_paused_fade_in;
- bool stream_paused_fade_out;
+ bool stream_fade_in;
+ bool stream_fade_out;
+ bool stream_stop;
StringName bus;
void _mix_audio();
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index dced688899..2739f71543 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -131,19 +131,15 @@ void CanvasItemMaterial::_update_shader() {
code += "\tVERTEX.xy /= vec2(h_frames, v_frames);\n";
- code += "\tint total_frames = particles_anim_h_frames * particles_anim_v_frames;\n";
- code += "\tint frame = int(float(total_frames) * INSTANCE_CUSTOM.z);\n";
- code += "\tif (particles_anim_loop) {\n";
- code += "\t\tframe = abs(frame) % total_frames;\n";
+ code += "\tfloat particle_total_frames = float(particles_anim_h_frames * particles_anim_v_frames);\n";
+ code += "\tfloat particle_frame = floor(INSTANCE_CUSTOM.z * float(particle_total_frames));\n";
+ code += "\tif (!particles_anim_loop) {\n";
+ code += "\t\tparticle_frame = clamp(particle_frame, 0.0, particle_total_frames - 1.0);\n";
code += "\t} else {\n";
- code += "\t\tframe = clamp(frame, 0, total_frames - 1);\n";
- code += "\t}\n";
-
- code += "\tfloat frame_w = 1.0 / h_frames;\n";
- code += "\tfloat frame_h = 1.0 / v_frames;\n";
- code += "\tUV.x = UV.x * frame_w + frame_w * float(frame % particles_anim_h_frames);\n";
- code += "\tUV.y = UV.y * frame_h + frame_h * float(frame / particles_anim_h_frames);\n";
-
+ code += "\t\tparticle_frame = mod(particle_frame, particle_total_frames);\n";
+ code += "\t}";
+ code += "\tUV /= vec2(h_frames, v_frames);\n";
+ code += "\tUV += vec2(mod(particle_frame, h_frames) / h_frames, floor(particle_frame / h_frames) / v_frames);\n";
code += "}\n";
}
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 5edd49b3a3..ef7644fcab 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -78,40 +78,7 @@ void CollisionPolygon2D::_build_polygon() {
}
Vector<Vector<Vector2> > CollisionPolygon2D::_decompose_in_convex() {
-
- Vector<Vector<Vector2> > decomp;
- List<TriangulatorPoly> in_poly, out_poly;
-
- TriangulatorPoly inp;
- inp.Init(polygon.size());
- for (int i = 0; i < polygon.size(); i++) {
- inp.GetPoint(i) = polygon[i];
- }
- inp.SetOrientation(TRIANGULATOR_CCW);
- in_poly.push_back(inp);
- TriangulatorPartition tpart;
- if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
- ERR_PRINT("Convex decomposing failed!");
- return decomp;
- }
-
- decomp.resize(out_poly.size());
- int idx = 0;
-
- for (List<TriangulatorPoly>::Element *I = out_poly.front(); I; I = I->next()) {
-
- TriangulatorPoly &tp = I->get();
-
- decomp.write[idx].resize(tp.GetNumPoints());
-
- for (int i = 0; i < tp.GetNumPoints(); i++) {
-
- decomp.write[idx].write[i] = tp.GetPoint(i);
- }
-
- idx++;
- }
-
+ Vector<Vector<Vector2> > decomp = Geometry::decompose_polygon_in_convex(polygon);
return decomp;
}
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index c756f49bbd..5440a1d8c3 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -36,9 +36,9 @@
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/line_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/shape_line_2d.h"
void CollisionShape2D::_shape_changed() {
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 21feb6e226..05c2253a5b 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -37,20 +37,7 @@
void CPUParticles2D::set_emitting(bool p_emitting) {
emitting = p_emitting;
- if (!is_processing_internal()) {
- set_process_internal(true);
- if (is_inside_tree()) {
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true);
-
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
- }
- }
+ set_process_internal(true);
}
void CPUParticles2D::set_amount(int p_amount) {
@@ -365,7 +352,8 @@ void CPUParticles2D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv
} break;
case PARAM_ANIM_OFFSET: {
} break;
- default: {}
+ default: {
+ }
}
}
Ref<Curve> CPUParticles2D::get_param_curve(Parameter p_param) const {
@@ -586,7 +574,7 @@ void CPUParticles2D::_particles_process(float p_delta) {
if (restart_time >= prev_time && restart_time < time) {
restart = true;
if (fractional_delta) {
- local_delta = (time - restart_time) * lifetime;
+ local_delta = time - restart_time;
}
}
@@ -594,13 +582,13 @@ void CPUParticles2D::_particles_process(float p_delta) {
if (restart_time >= prev_time) {
restart = true;
if (fractional_delta) {
- local_delta = (1.0 - restart_time + time) * lifetime;
+ local_delta = lifetime - restart_time + time;
}
} else if (restart_time < time) {
restart = true;
if (fractional_delta) {
- local_delta = (time - restart_time) * lifetime;
+ local_delta = time - restart_time;
}
}
}
@@ -941,6 +929,26 @@ void CPUParticles2D::_update_particle_data_buffer() {
#endif
}
+void CPUParticles2D::_set_redraw(bool p_redraw) {
+ if (redraw == p_redraw)
+ return;
+ redraw = p_redraw;
+#ifndef NO_THREADS
+ update_mutex->lock();
+#endif
+ if (redraw) {
+ VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
+ VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true);
+ } else {
+ VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
+ VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false);
+ }
+#ifndef NO_THREADS
+ update_mutex->unlock();
+#endif
+ update(); // redraw to update render list
+}
+
void CPUParticles2D::_update_render_thread() {
#ifndef NO_THREADS
@@ -957,38 +965,19 @@ void CPUParticles2D::_update_render_thread() {
void CPUParticles2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- if (is_processing_internal()) {
-
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true);
-
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
- }
+ _set_redraw(true);
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- if (is_processing_internal()) {
-
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false);
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
- }
+ _set_redraw(false);
}
if (p_what == NOTIFICATION_PAUSED || p_what == NOTIFICATION_UNPAUSED) {
}
if (p_what == NOTIFICATION_DRAW) {
+ if (!redraw)
+ return; // dont add to render list
RID texrid;
if (texture.is_valid()) {
@@ -1005,26 +994,21 @@ void CPUParticles2D::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
- if (particles.size() == 0 || !is_visible_in_tree())
+ if (particles.size() == 0 || !is_visible_in_tree()) {
+ _set_redraw(false);
return;
+ }
float delta = get_process_delta_time();
if (emitting) {
-
+ _set_redraw(true);
inactive_time = 0;
} else {
inactive_time += delta;
if (inactive_time > lifetime * 1.2) {
set_process_internal(false);
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false);
+ _set_redraw(false);
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
//reset variables
time = 0;
inactive_time = 0;
@@ -1189,7 +1173,7 @@ void CPUParticles2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
@@ -1354,6 +1338,7 @@ CPUParticles2D::CPUParticles2D() {
inactive_time = 0;
frame_remainder = 0;
cycle = 0;
+ redraw = false;
mesh = VisualServer::get_singleton()->mesh_create();
multimesh = VisualServer::get_singleton()->multimesh_create();
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index b1adf62980..23d2586331 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -103,6 +103,7 @@ private:
float inactive_time;
float frame_remainder;
int cycle;
+ bool redraw;
RID mesh;
RID multimesh;
@@ -179,6 +180,8 @@ private:
void _update_mesh_texture();
+ void _set_redraw(bool p_redraw);
+
protected:
static void _bind_methods();
void _notification(int p_what);
diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h
index 2ca28d09c4..b961385e33 100644
--- a/scene/2d/line_builder.h
+++ b/scene/2d/line_builder.h
@@ -34,7 +34,7 @@
#include "core/color.h"
#include "core/math/vector2.h"
#include "line_2d.h"
-#include "scene/resources/color_ramp.h"
+#include "scene/resources/gradient.h"
class LineBuilder {
public:
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation_2d.cpp
index 1c0e924433..57e0a5b118 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation_2d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* navigation2d.cpp */
+/* navigation_2d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "navigation2d.h"
+#include "navigation_2d.h"
#define USE_ENTRY_POINT
diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation_2d.h
index fc1762221c..b4d659ff5c 100644
--- a/scene/2d/navigation2d.h
+++ b/scene/2d/navigation_2d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* navigation2d.h */
+/* navigation_2d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -171,4 +171,4 @@ public:
Navigation2D();
};
-#endif // Navigation2D2D_H
+#endif // NAVIGATION_2D_H
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index 50618c6baa..0f6af358bd 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -32,7 +32,7 @@
#include "core/core_string_names.h"
#include "core/engine.h"
-#include "navigation2d.h"
+#include "navigation_2d.h"
#include "thirdparty/misc/triangulator.h"
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 9a94092840..f4430d93f6 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -376,7 +376,7 @@ void Node2D::look_at(const Vector2 &p_pos) {
float Node2D::get_angle_to(const Vector2 &p_pos) const {
- return (get_global_transform().affine_inverse().xform(p_pos)).angle();
+ return (to_local(p_pos) * get_scale()).angle();
}
Point2 Node2D::to_local(Point2 p_global) const {
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index c005c33a19..9701998f5d 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -30,6 +30,7 @@
#include "particles_2d.h"
+#include "core/os/os.h"
#include "scene/resources/particles_material.h"
#include "scene/scene_string_names.h"
@@ -213,6 +214,10 @@ bool Particles2D::get_fractional_delta() const {
String Particles2D::get_configuration_warning() const {
+ if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
+ return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles2D node instead. You can use the \"Convert to CPUParticles\" option for this purpose.");
+ }
+
String warnings;
if (process_material.is_null()) {
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 271e132002..fec861ad2f 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -170,6 +170,9 @@ void PathFollow2D::_update_transform() {
return;
float path_length = c->get_baked_length();
+ if (path_length == 0) {
+ return;
+ }
float bounded_offset = offset;
if (loop)
bounded_offset = Math::fposmod(bounded_offset, path_length);
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index f4bc8ad6b9..1b7e1a6b8b 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -1198,6 +1198,9 @@ bool KinematicBody2D::separate_raycast_shapes(bool p_infinite_inertia, Collision
bool KinematicBody2D::move_and_collide(const Vector2 &p_motion, bool p_infinite_inertia, Collision &r_collision, bool p_exclude_raycast_shapes, bool p_test_only) {
+ if (sync_to_physics) {
+ ERR_PRINT("Functions move_and_slide and move_and_collide do not work together with 'sync to physics' option. Please read the documentation.");
+ }
Transform2D gt = get_global_transform();
Physics2DServer::MotionResult result;
bool colliding = Physics2DServer::get_singleton()->body_test_motion(get_rid(), gt, p_motion, p_infinite_inertia, margin, &result, p_exclude_raycast_shapes);
@@ -1290,7 +1293,7 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const
floor_velocity = collision.collider_vel;
if (p_stop_on_slope) {
- if (Vector2() == lv_n + p_floor_direction && collision.travel.length() < 1) {
+ if ((lv_n + p_floor_direction).length() < 0.01 && collision.travel.length() < 1) {
Transform2D gt = get_global_transform();
gt.elements[2] -= collision.travel.project(p_floor_direction.tangent());
set_global_transform(gt);
@@ -1309,9 +1312,6 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const
motion = motion.slide(n);
lv = lv.slide(n);
}
-
- if (p_stop_on_slope)
- break;
}
if (!found_collision) {
@@ -1338,13 +1338,27 @@ Vector2 KinematicBody2D::move_and_slide_with_snap(const Vector2 &p_linear_veloci
Transform2D gt = get_global_transform();
if (move_and_collide(p_snap, p_infinite_inertia, col, false, true)) {
- gt.elements[2] += col.travel;
- if (p_floor_direction != Vector2() && Math::acos(p_floor_direction.normalized().dot(col.normal)) < p_floor_max_angle) {
- on_floor = true;
- on_floor_body = col.collider_rid;
- floor_velocity = col.collider_vel;
+ bool apply = true;
+ if (p_floor_direction != Vector2()) {
+ if (Math::acos(p_floor_direction.normalized().dot(col.normal)) < p_floor_max_angle) {
+ on_floor = true;
+ on_floor_body = col.collider_rid;
+ floor_velocity = col.collider_vel;
+ if (p_stop_on_slope) {
+ // move and collide may stray the object a bit because of pre un-stucking,
+ // so only ensure that motion happens on floor direction in this case.
+ col.travel = p_floor_direction * p_floor_direction.dot(col.travel);
+ }
+
+ } else {
+ apply = false;
+ }
+ }
+
+ if (apply) {
+ gt.elements[2] += col.travel;
+ set_global_transform(gt);
}
- set_global_transform(gt);
}
return ret;
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index 54b304f851..f6f1bad581 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -88,6 +88,10 @@ bool Polygon2D::_edit_is_selected_on_click(const Point2 &p_point, double p_toler
return Geometry::is_point_in_polygon(p_point - get_offset(), polygon2d);
}
+void Polygon2D::_skeleton_bone_setup_changed() {
+ update();
+}
+
void Polygon2D::_notification(int p_what) {
switch (p_what) {
@@ -102,10 +106,27 @@ void Polygon2D::_notification(int p_what) {
skeleton_node = Object::cast_to<Skeleton2D>(get_node(skeleton));
}
- if (skeleton_node)
+ ObjectID new_skeleton_id = 0;
+
+ if (skeleton_node) {
VS::get_singleton()->canvas_item_attach_skeleton(get_canvas_item(), skeleton_node->get_skeleton());
- else
+ new_skeleton_id = skeleton_node->get_instance_id();
+ } else {
VS::get_singleton()->canvas_item_attach_skeleton(get_canvas_item(), RID());
+ }
+
+ if (new_skeleton_id != current_skeleton_id) {
+ Object *old_skeleton = ObjectDB::get_instance(current_skeleton_id);
+ if (old_skeleton) {
+ old_skeleton->disconnect("bone_setup_changed", this, "_skeleton_bone_setup_changed");
+ }
+
+ if (skeleton_node) {
+ skeleton_node->connect("bone_setup_changed", this, "_skeleton_bone_setup_changed");
+ }
+
+ current_skeleton_id = new_skeleton_id;
+ }
Vector<Vector2> points;
Vector<Vector2> uvs;
@@ -286,7 +307,9 @@ void Polygon2D::_notification(int p_what) {
if (invert || polygons.size() == 0) {
Vector<int> indices = Geometry::triangulate_polygon(points);
- VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID());
+ if (indices.size()) {
+ VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID());
+ }
} else {
//draw individual polygons
Vector<int> total_indices;
@@ -809,6 +832,8 @@ void Polygon2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_bones", "bones"), &Polygon2D::_set_bones);
ClassDB::bind_method(D_METHOD("_get_bones"), &Polygon2D::_get_bones);
+ ClassDB::bind_method(D_METHOD("_skeleton_bone_setup_changed"), &Polygon2D::_skeleton_bone_setup_changed);
+
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "antialiased"), "set_antialiased", "get_antialiased");
@@ -846,4 +871,5 @@ Polygon2D::Polygon2D() {
color = Color(1, 1, 1);
rect_cache_dirty = true;
internal_vertices = 0;
+ current_skeleton_id = 0;
}
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index c1d6ebe46e..f25b3885b0 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -65,10 +65,13 @@ class Polygon2D : public Node2D {
mutable Rect2 item_rect;
NodePath skeleton;
+ ObjectID current_skeleton_id;
Array _get_bones() const;
void _set_bones(const Array &p_bones);
+ void _skeleton_bone_setup_changed();
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index 2a674e64e6..aa15255384 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -203,6 +203,7 @@ void Skeleton2D::_update_bone_setup() {
transform_dirty = true;
_update_transform();
+ emit_signal("bone_setup_changed");
}
void Skeleton2D::_make_transform_dirty() {
@@ -291,6 +292,8 @@ void Skeleton2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_bone", "idx"), &Skeleton2D::get_bone);
ClassDB::bind_method(D_METHOD("get_skeleton"), &Skeleton2D::get_skeleton);
+
+ ADD_SIGNAL(MethodInfo("bone_setup_changed"));
}
Skeleton2D::Skeleton2D() {
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index ba103a8bf0..a8c7622828 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -363,7 +363,7 @@ Rect2 Sprite::get_rect() const {
Point2 ofs = offset;
if (centered)
- ofs -= s / 2;
+ ofs -= Size2(s) / 2;
if (s == Size2(0, 0))
s = Size2(1, 1);
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 44730062c4..ed0a9c4915 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -75,15 +75,15 @@ void TileMap::_notification(int p_what) {
Quadrant &q = E->get();
if (navigation) {
- for (Map<PosKey, Quadrant::NavPoly>::Element *E = q.navpoly_ids.front(); E; E = E->next()) {
+ for (Map<PosKey, Quadrant::NavPoly>::Element *F = q.navpoly_ids.front(); F; F = F->next()) {
- navigation->navpoly_remove(E->get().id);
+ navigation->navpoly_remove(F->get().id);
}
q.navpoly_ids.clear();
}
- for (Map<PosKey, Quadrant::Occluder>::Element *E = q.occluder_instances.front(); E; E = E->next()) {
- VS::get_singleton()->free(E->get().id);
+ for (Map<PosKey, Quadrant::Occluder>::Element *F = q.occluder_instances.front(); F; F = F->next()) {
+ VS::get_singleton()->free(F->get().id);
}
q.occluder_instances.clear();
}
@@ -129,14 +129,14 @@ void TileMap::_update_quadrant_transform() {
Physics2DServer::get_singleton()->body_set_state(q.body, Physics2DServer::BODY_STATE_TRANSFORM, xform);
if (navigation) {
- for (Map<PosKey, Quadrant::NavPoly>::Element *E = q.navpoly_ids.front(); E; E = E->next()) {
+ for (Map<PosKey, Quadrant::NavPoly>::Element *F = q.navpoly_ids.front(); F; F = F->next()) {
- navigation->navpoly_set_transform(E->get().id, nav_rel * E->get().xform);
+ navigation->navpoly_set_transform(F->get().id, nav_rel * F->get().xform);
}
}
- for (Map<PosKey, Quadrant::Occluder>::Element *E = q.occluder_instances.front(); E; E = E->next()) {
- VS::get_singleton()->canvas_light_occluder_set_transform(E->get().id, global_transform * E->get().xform);
+ for (Map<PosKey, Quadrant::Occluder>::Element *F = q.occluder_instances.front(); F; F = F->next()) {
+ VS::get_singleton()->canvas_light_occluder_set_transform(F->get().id, global_transform * F->get().xform);
}
}
}
@@ -462,27 +462,45 @@ void TileMap::update_dirty_quadrants() {
Vector<TileSet::ShapeData> shapes = tile_set->tile_get_shapes(c.id);
- for (int i = 0; i < shapes.size(); i++) {
- Ref<Shape2D> shape = shapes[i].shape;
+ for (int j = 0; j < shapes.size(); j++) {
+ Ref<Shape2D> shape = shapes[j].shape;
if (shape.is_valid()) {
- if (tile_set->tile_get_tile_mode(c.id) == TileSet::SINGLE_TILE || (shapes[i].autotile_coord.x == c.autotile_coord_x && shapes[i].autotile_coord.y == c.autotile_coord_y)) {
+ if (tile_set->tile_get_tile_mode(c.id) == TileSet::SINGLE_TILE || (shapes[j].autotile_coord.x == c.autotile_coord_x && shapes[j].autotile_coord.y == c.autotile_coord_y)) {
Transform2D xform;
xform.set_origin(offset.floor());
- Vector2 shape_ofs = shapes[i].shape_transform.get_origin();
+ Vector2 shape_ofs = shapes[j].shape_transform.get_origin();
_fix_cell_transform(xform, c, shape_ofs + center_ofs, s);
- xform *= shapes[i].shape_transform.untranslated();
+ xform *= shapes[j].shape_transform.untranslated();
if (debug_canvas_item.is_valid()) {
vs->canvas_item_add_set_transform(debug_canvas_item, xform);
shape->draw(debug_canvas_item, debug_collision_color);
}
- ps->body_add_shape(q.body, shape->get_rid(), xform);
- ps->body_set_shape_metadata(q.body, shape_idx, Vector2(E->key().x, E->key().y));
- ps->body_set_shape_as_one_way_collision(q.body, shape_idx, shapes[i].one_way_collision, shapes[i].one_way_collision_margin);
- shape_idx++;
+
+ if (shape->has_meta("decomposed")) {
+ Array _shapes = shape->get_meta("decomposed");
+ for (int k = 0; k < _shapes.size(); k++) {
+ Ref<ConvexPolygonShape2D> convex = _shapes[k];
+ if (convex.is_valid()) {
+ ps->body_add_shape(q.body, convex->get_rid(), xform);
+ ps->body_set_shape_metadata(q.body, shape_idx, Vector2(E->key().x, E->key().y));
+ ps->body_set_shape_as_one_way_collision(q.body, shape_idx, shapes[j].one_way_collision, shapes[j].one_way_collision_margin);
+ shape_idx++;
+#ifdef DEBUG_ENABLED
+ } else {
+ print_error("The TileSet asigned to the TileMap " + get_name() + " has an invalid convex shape.");
+#endif
+ }
+ }
+ } else {
+ ps->body_add_shape(q.body, shape->get_rid(), xform);
+ ps->body_set_shape_metadata(q.body, shape_idx, Vector2(E->key().x, E->key().y));
+ ps->body_set_shape_as_one_way_collision(q.body, shape_idx, shapes[j].one_way_collision, shapes[j].one_way_collision_margin);
+ shape_idx++;
+ }
}
}
}
@@ -531,23 +549,23 @@ void TileMap::update_dirty_quadrants() {
colors.resize(vsize);
{
PoolVector<Vector2>::Read vr = navigation_polygon_vertices.read();
- for (int i = 0; i < vsize; i++) {
- vertices.write[i] = vr[i];
- colors.write[i] = debug_navigation_color;
+ for (int j = 0; j < vsize; j++) {
+ vertices.write[j] = vr[j];
+ colors.write[j] = debug_navigation_color;
}
}
Vector<int> indices;
- for (int i = 0; i < navpoly->get_polygon_count(); i++) {
- Vector<int> polygon = navpoly->get_polygon(i);
+ for (int j = 0; j < navpoly->get_polygon_count(); j++) {
+ Vector<int> polygon = navpoly->get_polygon(j);
- for (int j = 2; j < polygon.size(); j++) {
+ for (int k = 2; k < polygon.size(); k++) {
- int kofs[3] = { 0, j - 1, j };
- for (int k = 0; k < 3; k++) {
+ int kofs[3] = { 0, k - 1, k };
+ for (int l = 0; l < 3; l++) {
- int idx = polygon[kofs[k]];
+ int idx = polygon[kofs[l]];
ERR_FAIL_INDEX(idx, vsize);
indices.push_back(idx);
}
@@ -601,9 +619,9 @@ void TileMap::update_dirty_quadrants() {
for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) {
Quadrant &q = E->get();
- for (List<RID>::Element *E = q.canvas_items.front(); E; E = E->next()) {
+ for (List<RID>::Element *F = q.canvas_items.front(); F; F = F->next()) {
- VS::get_singleton()->canvas_item_set_draw_index(E->get(), index++);
+ VS::get_singleton()->canvas_item_set_draw_index(F->get(), index++);
}
}
@@ -1053,9 +1071,9 @@ void TileMap::_update_all_items_material_state() {
for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) {
Quadrant &q = E->get();
- for (List<RID>::Element *E = q.canvas_items.front(); E; E = E->next()) {
+ for (List<RID>::Element *F = q.canvas_items.front(); F; F = F->next()) {
- _update_item_material_state(E->get());
+ _update_item_material_state(F->get());
}
}
}
@@ -1453,7 +1471,7 @@ Vector2 TileMap::world_to_map(const Vector2 &p_pos) const {
}
// Account for precision errors on the border (GH-23250).
- // 0.00005 is 5*CMP_EPSILON, results would start being unpredictible if
+ // 0.00005 is 5*CMP_EPSILON, results would start being unpredictable if
// cell size is > 15,000, but we can hardly have more precision anyway with
// floating point.
ret += Vector2(0.00005, 0.00005);
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index a44098fd77..e450e1e256 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -33,7 +33,7 @@
#include "core/self_list.h"
#include "core/vset.h"
-#include "scene/2d/navigation2d.h"
+#include "scene/2d/navigation_2d.h"
#include "scene/2d/node_2d.h"
#include "scene/resources/tile_set.h"
diff --git a/scene/2d/screen_button.cpp b/scene/2d/touch_screen_button.cpp
index fb1558a404..9a1a759e72 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* screen_button.cpp */
+/* touch_screen_button.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "screen_button.h"
+#include "touch_screen_button.h"
+
#include "core/input_map.h"
#include "core/os/input.h"
#include "core/os/os.h"
diff --git a/scene/2d/screen_button.h b/scene/2d/touch_screen_button.h
index fd944ead64..df54e5340b 100644
--- a/scene/2d/screen_button.h
+++ b/scene/2d/touch_screen_button.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* screen_button.h */
+/* touch_screen_button.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SCREEN_BUTTON_H
-#define SCREEN_BUTTON_H
+#ifndef TOUCH_SCREEN_BUTTON_H
+#define TOUCH_SCREEN_BUTTON_H
#include "scene/2d/node_2d.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/texture.h"
@@ -112,4 +112,4 @@ public:
VARIANT_ENUM_CAST(TouchScreenButton::VisibilityMode);
-#endif // SCREEN_BUTTON_H
+#endif // TOUCH_SCREEN_BUTTON_H
diff --git a/scene/3d/SCsub b/scene/3d/SCsub
index 35cc7479d8..200cf4316f 100644
--- a/scene/3d/SCsub
+++ b/scene/3d/SCsub
@@ -7,6 +7,6 @@ if env['disable_3d']:
env.scene_sources.append("3d/skeleton.cpp")
env.scene_sources.append("3d/particles.cpp")
env.scene_sources.append("3d/visual_instance.cpp")
- env.scene_sources.append("3d/scenario_fx.cpp")
+ env.scene_sources.append("3d/world_environment.cpp")
else:
env.add_source_files(env.scene_sources, "*.cpp")
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 99f43b1242..e58e26d2d1 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -439,10 +439,10 @@ Array Area::get_overlapping_bodies() const {
void Area::set_monitorable(bool p_enable) {
- if (locked || PhysicsServer::get_singleton()->is_flushing_queries()) {
+ if (locked || (is_inside_tree() && PhysicsServer::get_singleton()->is_flushing_queries())) {
ERR_EXPLAIN("Function blocked during in/out signal. Use set_deferred(\"monitorable\",true/false)");
+ ERR_FAIL();
}
- ERR_FAIL_COND(locked || PhysicsServer::get_singleton()->is_flushing_queries());
if (p_enable == monitorable)
return;
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 0f4d0383a4..4b3934c4ea 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -32,12 +32,13 @@
#include "core/engine.h"
#include "scene/3d/area.h"
#include "scene/3d/camera.h"
+#include "scene/3d/listener.h"
#include "scene/main/viewport.h"
void AudioStreamPlayer3D::_mix_audio() {
if (!stream_playback.is_valid() || !active ||
- (stream_paused && !stream_paused_fade_out)) {
+ (stream_paused && !stream_fade_out)) {
return;
}
@@ -52,7 +53,7 @@ void AudioStreamPlayer3D::_mix_audio() {
AudioFrame *buffer = mix_buffer.ptrw();
int buffer_size = mix_buffer.size();
- if (stream_paused_fade_out) {
+ if (stream_fade_out) {
// Short fadeout ramp
buffer_size = MIN(buffer_size, 128);
}
@@ -108,10 +109,10 @@ void AudioStreamPlayer3D::_mix_audio() {
int buffers = AudioServer::get_singleton()->get_channel_count();
for (int k = 0; k < buffers; k++) {
- AudioFrame target_volume = stream_paused_fade_out ? AudioFrame(0.f, 0.f) : current.vol[k];
- AudioFrame vol_prev = stream_paused_fade_in ? AudioFrame(0.f, 0.f) : prev_outputs[i].vol[k];
+ AudioFrame target_volume = stream_fade_out ? AudioFrame(0.f, 0.f) : current.vol[k];
+ AudioFrame vol_prev = stream_fade_in ? AudioFrame(0.f, 0.f) : prev_outputs[i].vol[k];
AudioFrame vol_inc = (target_volume - vol_prev) / float(buffer_size);
- AudioFrame vol = stream_paused_fade_in ? AudioFrame(0.f, 0.f) : current.vol[k];
+ AudioFrame vol = stream_fade_in ? AudioFrame(0.f, 0.f) : current.vol[k];
if (!AudioServer::get_singleton()->thread_has_channel_mix_buffer(current.bus_index, k))
continue; //may have been deleted, will be updated on process
@@ -197,9 +198,15 @@ void AudioStreamPlayer3D::_mix_audio() {
active = false;
}
+ if (stream_stop) {
+ active = false;
+ set_physics_process_internal(false);
+ setplay = -1;
+ }
+
output_ready = false;
- stream_paused_fade_in = false;
- stream_paused_fade_out = false;
+ stream_fade_in = false;
+ stream_fade_out = false;
}
float AudioStreamPlayer3D::_get_attenuation_db(float p_distance) const {
@@ -324,16 +331,25 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (!vp->is_audio_listener())
continue;
- Vector3 local_pos = camera->get_global_transform().orthonormalized().affine_inverse().xform(global_pos);
+ bool listener_is_camera = true;
+ Spatial *listener_node = camera;
+
+ Listener *listener = vp->get_listener();
+ if (listener) {
+ listener_node = listener;
+ listener_is_camera = false;
+ }
+
+ Vector3 local_pos = listener_node->get_global_transform().orthonormalized().affine_inverse().xform(global_pos);
float dist = local_pos.length();
Vector3 area_sound_pos;
- Vector3 cam_area_pos;
+ Vector3 listener_area_pos;
if (area && area->is_using_reverb_bus() && area->get_reverb_uniformity() > 0) {
- area_sound_pos = space_state->get_closest_point_to_object_volume(area->get_rid(), camera->get_global_transform().origin);
- cam_area_pos = camera->get_global_transform().affine_inverse().xform(area_sound_pos);
+ area_sound_pos = space_state->get_closest_point_to_object_volume(area->get_rid(), listener_node->get_global_transform().origin);
+ listener_area_pos = listener_node->get_global_transform().affine_inverse().xform(area_sound_pos);
}
if (max_distance > 0) {
@@ -341,10 +357,10 @@ void AudioStreamPlayer3D::_notification(int p_what) {
float total_max = max_distance;
if (area && area->is_using_reverb_bus() && area->get_reverb_uniformity() > 0) {
- total_max = MAX(total_max, cam_area_pos.length());
+ total_max = MAX(total_max, listener_area_pos.length());
}
if (total_max > max_distance) {
- continue; //can't hear this sound in this camera
+ continue; //can't hear this sound in this listener
}
}
@@ -361,8 +377,8 @@ void AudioStreamPlayer3D::_notification(int p_what) {
float db_att = (1.0 - MIN(1.0, multiplier)) * attenuation_filter_db;
if (emission_angle_enabled) {
- Vector3 camtopos = global_pos - camera->get_global_transform().origin;
- float c = camtopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative
+ Vector3 listenertopos = global_pos - listener_node->get_global_transform().origin;
+ float c = listenertopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative
float angle = Math::rad2deg(Math::acos(c));
if (angle > emission_angle)
db_att -= -emission_angle_filter_attenuation_db;
@@ -382,8 +398,8 @@ void AudioStreamPlayer3D::_notification(int p_what) {
output.vol[0].l = 1.0 - c;
output.vol[0].r = c;
} else {
- Vector3 camtopos = global_pos - camera->get_global_transform().origin;
- float c = camtopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative
+ Vector3 listenertopos = global_pos - listener_node->get_global_transform().origin;
+ float c = listenertopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative
float angle = Math::rad2deg(Math::acos(c));
float av = angle * (flat_pos.x < 0 ? -1 : 1) / 180.0;
@@ -406,20 +422,20 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (cc >= 3) {
// Side pair
- float sl = Math::abs(1.0 - Math::abs(-0.4 - av));
- float sr = Math::abs(1.0 - Math::abs(0.4 - av));
+ float sleft = Math::abs(1.0 - Math::abs(-0.4 - av));
+ float sright = Math::abs(1.0 - Math::abs(0.4 - av));
- output.vol[2].l = sl;
- output.vol[2].r = sr;
+ output.vol[2].l = sleft;
+ output.vol[2].r = sright;
}
if (cc >= 4) {
// Rear pair
- float rl = Math::abs(1.0 - Math::abs(-0.2 - av));
- float rr = Math::abs(1.0 - Math::abs(0.2 - av));
+ float rleft = Math::abs(1.0 - Math::abs(-0.2 - av));
+ float rright = Math::abs(1.0 - Math::abs(0.2 - av));
- output.vol[3].l = rl;
- output.vol[3].r = rr;
+ output.vol[3].l = rleft;
+ output.vol[3].r = rright;
}
}
@@ -449,7 +465,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (uniformity > 0.0) {
- float distance = cam_area_pos.length();
+ float distance = listener_area_pos.length();
float attenuation = Math::db2linear(_get_attenuation_db(distance));
//float dist_att_db = -20 * Math::log(dist + 0.00001); //logarithmic attenuation, like in real life
@@ -459,7 +475,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (attenuation < 1.0) {
//pan the uniform sound
- Vector3 rev_pos = cam_area_pos;
+ Vector3 rev_pos = listener_area_pos;
rev_pos.y = 0;
rev_pos.normalize();
@@ -518,9 +534,13 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (doppler_tracking != DOPPLER_TRACKING_DISABLED) {
- Vector3 camera_velocity = camera->get_doppler_tracked_velocity();
+ Vector3 listener_velocity;
- Vector3 local_velocity = camera->get_global_transform().orthonormalized().basis.xform_inv(linear_velocity - camera_velocity);
+ if (listener_is_camera) {
+ listener_velocity = camera->get_doppler_tracked_velocity();
+ }
+
+ Vector3 local_velocity = listener_node->get_global_transform().orthonormalized().basis.xform_inv(linear_velocity - listener_velocity);
if (local_velocity == Vector3()) {
output.pitch_scale = 1.0;
@@ -642,6 +662,7 @@ float AudioStreamPlayer3D::get_pitch_scale() const {
void AudioStreamPlayer3D::play(float p_from_pos) {
if (stream_playback.is_valid()) {
+ stream_stop = false;
active = true;
setplay = p_from_pos;
output_ready = false;
@@ -659,9 +680,8 @@ void AudioStreamPlayer3D::seek(float p_seconds) {
void AudioStreamPlayer3D::stop() {
if (stream_playback.is_valid()) {
- active = false;
- set_physics_process_internal(false);
- setplay = -1;
+ stream_stop = true;
+ stream_fade_out = true;
}
}
@@ -840,7 +860,9 @@ void AudioStreamPlayer3D::set_doppler_tracking(DopplerTracking p_tracking) {
if (doppler_tracking != DOPPLER_TRACKING_DISABLED) {
set_notify_transform(true);
velocity_tracker->set_track_physics_step(doppler_tracking == DOPPLER_TRACKING_PHYSICS_STEP);
- velocity_tracker->reset(get_global_transform().origin);
+ if (is_inside_tree()) {
+ velocity_tracker->reset(get_global_transform().origin);
+ }
} else {
set_notify_transform(false);
}
@@ -855,8 +877,8 @@ void AudioStreamPlayer3D::set_stream_paused(bool p_pause) {
if (p_pause != stream_paused) {
stream_paused = p_pause;
- stream_paused_fade_in = stream_paused ? false : true;
- stream_paused_fade_out = stream_paused ? true : false;
+ stream_fade_in = stream_paused ? false : true;
+ stream_fade_out = stream_paused ? true : false;
}
}
@@ -994,8 +1016,9 @@ AudioStreamPlayer3D::AudioStreamPlayer3D() {
out_of_range_mode = OUT_OF_RANGE_MIX;
doppler_tracking = DOPPLER_TRACKING_DISABLED;
stream_paused = false;
- stream_paused_fade_in = false;
- stream_paused_fade_out = false;
+ stream_fade_in = false;
+ stream_fade_out = false;
+ stream_stop = false;
velocity_tracker.instance();
AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed");
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index 881652da64..e467c170fb 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -109,8 +109,9 @@ private:
float pitch_scale;
bool autoplay;
bool stream_paused;
- bool stream_paused_fade_in;
- bool stream_paused_fade_out;
+ bool stream_fade_in;
+ bool stream_fade_out;
+ bool stream_stop;
StringName bus;
void _mix_audio();
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index ed9374e422..368cebeeab 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -449,7 +449,9 @@ void Camera::set_doppler_tracking(DopplerTracking p_tracking) {
doppler_tracking = p_tracking;
if (p_tracking != DOPPLER_TRACKING_DISABLED) {
velocity_tracker->set_track_physics_step(doppler_tracking == DOPPLER_TRACKING_PHYSICS_STEP);
- velocity_tracker->reset(get_global_transform().origin);
+ if (is_inside_tree()) {
+ velocity_tracker->reset(get_global_transform().origin);
+ }
}
_update_camera_mode();
}
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp
index daee291ba3..ac33e2b714 100644
--- a/scene/3d/collision_shape.cpp
+++ b/scene/3d/collision_shape.cpp
@@ -124,6 +124,10 @@ String CollisionShape::get_configuration_warning() const {
return TTR("A shape must be provided for CollisionShape to function. Please create a shape resource for it!");
}
+ if (shape->is_class("PlaneShape")) {
+ return TTR("Plane shapes don't work well and will be removed in future versions. Please don't use them.");
+ }
+
return String();
}
diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp
index 29610cb0bf..85bc2dd529 100644
--- a/scene/3d/cpu_particles.cpp
+++ b/scene/3d/cpu_particles.cpp
@@ -47,20 +47,7 @@ PoolVector<Face3> CPUParticles::get_faces(uint32_t p_usage_flags) const {
void CPUParticles::set_emitting(bool p_emitting) {
emitting = p_emitting;
- if (!is_processing_internal()) {
- set_process_internal(true);
- if (is_inside_tree()) {
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, true);
-
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
- }
- }
+ set_process_internal(true);
}
void CPUParticles::set_amount(int p_amount) {
@@ -343,7 +330,8 @@ void CPUParticles::set_param_curve(Parameter p_param, const Ref<Curve> &p_curve)
} break;
case PARAM_ANIM_OFFSET: {
} break;
- default: {}
+ default: {
+ }
}
}
Ref<Curve> CPUParticles::get_param_curve(Parameter p_param) const {
@@ -556,7 +544,7 @@ void CPUParticles::_particles_process(float p_delta) {
if (restart_time >= prev_time && restart_time < time) {
restart = true;
if (fractional_delta) {
- local_delta = (time - restart_time) * lifetime;
+ local_delta = time - restart_time;
}
}
@@ -564,13 +552,13 @@ void CPUParticles::_particles_process(float p_delta) {
if (restart_time >= prev_time) {
restart = true;
if (fractional_delta) {
- local_delta = (1.0 - restart_time + time) * lifetime;
+ local_delta = lifetime - restart_time + time;
}
} else if (restart_time < time) {
restart = true;
if (fractional_delta) {
- local_delta = (time - restart_time) * lifetime;
+ local_delta = time - restart_time;
}
}
}
@@ -1004,6 +992,25 @@ void CPUParticles::_update_particle_data_buffer() {
#endif
}
+void CPUParticles::_set_redraw(bool p_redraw) {
+ if (redraw == p_redraw)
+ return;
+ redraw = p_redraw;
+#ifndef NO_THREADS
+ update_mutex->lock();
+#endif
+ if (redraw) {
+ VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
+ VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, true);
+ } else {
+ VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
+ VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, false);
+ }
+#ifndef NO_THREADS
+ update_mutex->unlock();
+#endif
+}
+
void CPUParticles::_update_render_thread() {
#ifndef NO_THREADS
@@ -1022,31 +1029,11 @@ void CPUParticles::_update_render_thread() {
void CPUParticles::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- if (is_processing_internal()) {
-
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, true);
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
- }
+ _set_redraw(true);
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- if (is_processing_internal()) {
-
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, false);
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
- }
+ _set_redraw(false);
}
if (p_what == NOTIFICATION_PAUSED || p_what == NOTIFICATION_UNPAUSED) {
@@ -1054,26 +1041,22 @@ void CPUParticles::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
- if (particles.size() == 0 || !is_visible_in_tree())
+ if (particles.size() == 0 || !is_visible_in_tree()) {
+ _set_redraw(false);
return;
+ }
float delta = get_process_delta_time();
if (emitting) {
+ _set_redraw(true);
inactive_time = 0;
} else {
inactive_time += delta;
if (inactive_time > lifetime * 1.2) {
set_process_internal(false);
-#ifndef NO_THREADS
- update_mutex->lock();
-#endif
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
- VS::get_singleton()->instance_geometry_set_flag(get_instance(), VS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE, false);
+ _set_redraw(false);
-#ifndef NO_THREADS
- update_mutex->unlock();
-#endif
//reset variables
time = 0;
inactive_time = 0;
@@ -1238,7 +1221,7 @@ void CPUParticles::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
@@ -1406,6 +1389,7 @@ CPUParticles::CPUParticles() {
inactive_time = 0;
frame_remainder = 0;
cycle = 0;
+ redraw = false;
multimesh = VisualServer::get_singleton()->multimesh_create();
set_base(multimesh);
diff --git a/scene/3d/cpu_particles.h b/scene/3d/cpu_particles.h
index b50befe7be..b863a3cb3f 100644
--- a/scene/3d/cpu_particles.h
+++ b/scene/3d/cpu_particles.h
@@ -104,6 +104,7 @@ private:
float inactive_time;
float frame_remainder;
int cycle;
+ bool redraw;
RID multimesh;
@@ -178,6 +179,8 @@ private:
void _update_render_thread();
+ void _set_redraw(bool p_redraw);
+
protected:
static void _bind_methods();
void _notification(int p_what);
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 5b08ea7790..c491275f00 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -30,6 +30,8 @@
#include "gi_probe.h"
+#include "core/os/os.h"
+
#include "mesh_instance.h"
#include "voxel_light_baker.h"
@@ -490,6 +492,14 @@ PoolVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const {
return PoolVector<Face3>();
}
+String GIProbe::get_configuration_warning() const {
+
+ if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
+ return TTR("GIProbes are not supported by the GLES2 video driver.\nUse a BakedLightmap instead.");
+ }
+ return String();
+}
+
void GIProbe::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_probe_data", "data"), &GIProbe::set_probe_data);
diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h
index 87664e06b8..4badabbadf 100644
--- a/scene/3d/gi_probe.h
+++ b/scene/3d/gi_probe.h
@@ -168,6 +168,8 @@ public:
virtual AABB get_aabb() const;
virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual String get_configuration_warning() const;
+
GIProbe();
~GIProbe();
};
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 3b514dab8c..cf1af918f7 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -210,6 +210,13 @@ bool Light::is_editor_only() const {
return editor_only;
}
+void Light::_validate_property(PropertyInfo &property) const {
+
+ if (VisualServer::get_singleton()->is_low_end() && property.name == "shadow_contact") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+}
+
void Light::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_editor_only", "editor_only"), &Light::set_editor_only);
diff --git a/scene/3d/light.h b/scene/3d/light.h
index 85e0ce3c24..ddd5bc6b3a 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -92,6 +92,7 @@ protected:
static void _bind_methods();
void _notification(int p_what);
+ virtual void _validate_property(PropertyInfo &property) const;
Light(VisualServer::LightType p_type);
diff --git a/scene/3d/navigation_mesh.cpp b/scene/3d/navigation_mesh.cpp
index 75301af657..93731c4023 100644
--- a/scene/3d/navigation_mesh.cpp
+++ b/scene/3d/navigation_mesh.cpp
@@ -292,11 +292,11 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
if (ek.from < ek.to)
SWAP(ek.from, ek.to);
- Map<_EdgeKey, bool>::Element *E = edge_map.find(ek);
+ Map<_EdgeKey, bool>::Element *F = edge_map.find(ek);
- if (E) {
+ if (F) {
- E->get() = false;
+ F->get() = false;
} else {
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 2add50dd5d..57ab01f7be 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -29,6 +29,8 @@
/*************************************************************************/
#include "particles.h"
+
+#include "core/os/os.h"
#include "scene/resources/particles_material.h"
#include "servers/visual_server.h"
@@ -224,6 +226,10 @@ bool Particles::get_fractional_delta() const {
String Particles::get_configuration_warning() const {
+ if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
+ return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles node instead. You can use the \"Convert to CPUParticles\" option for this purpose.");
+ }
+
String warnings;
bool meshes_found = false;
@@ -348,7 +354,7 @@ void Particles::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index 9fae5a9a54..190967d76c 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -107,6 +107,9 @@ void PathFollow::_update_transform() {
}
float bl = c->get_baked_length();
+ if (bl == 0.0) {
+ return;
+ }
float bi = c->get_bake_interval();
float o = offset;
float o_next = offset + bi;
@@ -122,11 +125,10 @@ void PathFollow::_update_transform() {
Vector3 pos = c->interpolate_baked(o, cubic);
Transform t = get_transform();
// Vector3 pos_offset = Vector3(h_offset, v_offset, 0); not used in all cases
- // will be replaced by "Vector3(h_offset, v_offset, 0)" where it was formely used
+ // will be replaced by "Vector3(h_offset, v_offset, 0)" where it was formerly used
if (rotation_mode == ROTATION_ORIENTED) {
- Vector3 pos = c->interpolate_baked(o, cubic);
Vector3 forward = c->interpolate_baked(o_next, cubic) - pos;
if (forward.length_squared() < CMP_EPSILON2)
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 50abbd483a..05214ed669 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -1104,10 +1104,10 @@ void RigidBody::_reload_physics_characteristics() {
//////////////////////////////////////////////////////
//////////////////////////
-Ref<KinematicCollision> KinematicBody::_move(const Vector3 &p_motion, bool p_infinite_inertia, bool p_test_only) {
+Ref<KinematicCollision> KinematicBody::_move(const Vector3 &p_motion, bool p_infinite_inertia, bool p_exclude_raycast_shapes, bool p_test_only) {
Collision col;
- if (move_and_collide(p_motion, p_infinite_inertia, col, p_test_only)) {
+ if (move_and_collide(p_motion, p_infinite_inertia, col, p_exclude_raycast_shapes, p_test_only)) {
if (motion_cache.is_null()) {
motion_cache.instance();
motion_cache->owner = this;
@@ -1121,11 +1121,11 @@ Ref<KinematicCollision> KinematicBody::_move(const Vector3 &p_motion, bool p_inf
return Ref<KinematicCollision>();
}
-bool KinematicBody::move_and_collide(const Vector3 &p_motion, bool p_infinite_inertia, Collision &r_collision, bool p_test_only) {
+bool KinematicBody::move_and_collide(const Vector3 &p_motion, bool p_infinite_inertia, Collision &r_collision, bool p_exclude_raycast_shapes, bool p_test_only) {
Transform gt = get_global_transform();
PhysicsServer::MotionResult result;
- bool colliding = PhysicsServer::get_singleton()->body_test_motion(get_rid(), gt, p_motion, p_infinite_inertia, &result);
+ bool colliding = PhysicsServer::get_singleton()->body_test_motion(get_rid(), gt, p_motion, p_infinite_inertia, &result, p_exclude_raycast_shapes);
if (colliding) {
r_collision.collider_metadata = result.collider_metadata;
@@ -1222,7 +1222,7 @@ Vector3 KinematicBody::move_and_slide(const Vector3 &p_linear_velocity, const Ve
floor_velocity = collision.collider_vel;
if (p_stop_on_slope) {
- if (Vector3() == lv_n + p_floor_direction) {
+ if ((lv_n + p_floor_direction).length() < 0.01) {
Transform gt = get_global_transform();
gt.origin -= collision.travel;
set_global_transform(gt);
@@ -1243,6 +1243,7 @@ Vector3 KinematicBody::move_and_slide(const Vector3 &p_linear_velocity, const Ve
motion = motion.slide(p_floor_direction);
lv = lv.slide(p_floor_direction);
} else {
+
Vector3 n = collision.normal;
motion = motion.slide(n);
lv = lv.slide(n);
@@ -1279,14 +1280,27 @@ Vector3 KinematicBody::move_and_slide_with_snap(const Vector3 &p_linear_velocity
Collision col;
Transform gt = get_global_transform();
- if (move_and_collide(p_snap, p_infinite_inertia, col, true)) {
- gt.origin += col.travel;
- if (p_floor_direction != Vector3() && Math::acos(p_floor_direction.normalized().dot(col.normal)) < p_floor_max_angle) {
- on_floor = true;
- on_floor_body = col.collider_rid;
- floor_velocity = col.collider_vel;
+ if (move_and_collide(p_snap, p_infinite_inertia, col, false, true)) {
+
+ bool apply = true;
+ if (p_floor_direction != Vector3()) {
+ if (Math::acos(p_floor_direction.normalized().dot(col.normal)) < p_floor_max_angle) {
+ on_floor = true;
+ on_floor_body = col.collider_rid;
+ floor_velocity = col.collider_vel;
+ if (p_stop_on_slope) {
+ // move and collide may stray the object a bit because of pre un-stucking,
+ // so only ensure that motion happens on floor direction in this case.
+ col.travel = p_floor_direction * p_floor_direction.dot(col.travel);
+ }
+ } else {
+ apply = false; //snapped with floor direction, but did not snap to a floor, do not snap.
+ }
+ }
+ if (apply) {
+ gt.origin += col.travel;
+ set_global_transform(gt);
}
- set_global_transform(gt);
}
return ret;
@@ -1401,7 +1415,7 @@ Ref<KinematicCollision> KinematicBody::_get_slide_collision(int p_bounce) {
void KinematicBody::_bind_methods() {
- ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec", "infinite_inertia", "test_only"), &KinematicBody::_move, DEFVAL(true), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec", "infinite_inertia", "exclude_raycast_shapes", "test_only"), &KinematicBody::_move, DEFVAL(true), DEFVAL(true), DEFVAL(false));
ClassDB::bind_method(D_METHOD("move_and_slide", "linear_velocity", "floor_normal", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody::move_and_slide, DEFVAL(Vector3(0, 0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((float)45)), DEFVAL(true));
ClassDB::bind_method(D_METHOD("move_and_slide_with_snap", "linear_velocity", "snap", "floor_normal", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody::move_and_slide_with_snap, DEFVAL(Vector3(0, 0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((float)45)), DEFVAL(true));
diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h
index 5570d0c86b..589af98062 100644
--- a/scene/3d/physics_body.h
+++ b/scene/3d/physics_body.h
@@ -310,14 +310,14 @@ private:
_FORCE_INLINE_ bool _ignores_mode(PhysicsServer::BodyMode) const;
- Ref<KinematicCollision> _move(const Vector3 &p_motion, bool p_infinite_inertia = true, bool p_test_only = false);
+ Ref<KinematicCollision> _move(const Vector3 &p_motion, bool p_infinite_inertia = true, bool p_exclude_raycast_shapes = true, bool p_test_only = false);
Ref<KinematicCollision> _get_slide_collision(int p_bounce);
protected:
static void _bind_methods();
public:
- bool move_and_collide(const Vector3 &p_motion, bool p_infinite_inertia, Collision &r_collisionz, bool p_test_only = false);
+ bool move_and_collide(const Vector3 &p_motion, bool p_infinite_inertia, Collision &r_collisionz, bool p_exclude_raycast_shapes = true, bool p_test_only = false);
bool test_move(const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia);
bool separate_raycast_shapes(bool p_infinite_inertia, Collision &r_collision);
diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h
index 2921a3a881..48d65b79f7 100644
--- a/scene/3d/reflection_probe.h
+++ b/scene/3d/reflection_probe.h
@@ -32,7 +32,7 @@
#define REFLECTIONPROBE_H
#include "scene/3d/visual_instance.h"
-#include "scene/resources/sky_box.h"
+#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
#include "servers/visual_server.h"
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index 8caf4e8e39..b7279e4d4f 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -70,9 +70,9 @@ bool Skeleton::_set(const StringName &p_path, const Variant &p_value) {
for (int i = 0; i < children.size(); i++) {
- NodePath path = children[i];
- ERR_CONTINUE(path.operator String() == "");
- Node *node = get_node(path);
+ NodePath npath = children[i];
+ ERR_CONTINUE(npath.operator String() == "");
+ Node *node = get_node(npath);
ERR_CONTINUE(!node);
bind_child_node_to_bone(which, node);
}
@@ -115,8 +115,8 @@ bool Skeleton::_get(const StringName &p_path, Variant &r_ret) const {
ERR_CONTINUE(!obj);
Node *node = Object::cast_to<Node>(obj);
ERR_CONTINUE(!node);
- NodePath path = get_path_to(node);
- children.push_back(path);
+ NodePath npath = get_path_to(node);
+ children.push_back(npath);
}
r_ret = children;
@@ -198,11 +198,7 @@ void Skeleton::_notification(int p_what) {
case NOTIFICATION_ENTER_WORLD: {
- if (dirty) {
-
- dirty = false;
- _make_dirty(); // property make it dirty
- }
+ VS::get_singleton()->skeleton_set_world_transform(skeleton, use_bones_in_world_transform, get_global_transform());
} break;
case NOTIFICATION_EXIT_WORLD: {
@@ -210,21 +206,7 @@ void Skeleton::_notification(int p_what) {
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
- if (dirty)
- break; //will be eventually updated
-
- //if moved, just update transforms
- VisualServer *vs = VisualServer::get_singleton();
- const Bone *bonesptr = bones.ptr();
- int len = bones.size();
- Transform global_transform = get_global_transform();
- Transform global_transform_inverse = global_transform.affine_inverse();
-
- for (int i = 0; i < len; i++) {
-
- const Bone &b = bonesptr[i];
- vs->skeleton_bone_set_transform(skeleton, i, global_transform * (b.transform_final * global_transform_inverse));
- }
+ VS::get_singleton()->skeleton_set_world_transform(skeleton, use_bones_in_world_transform, get_global_transform());
} break;
case NOTIFICATION_UPDATE_SKELETON: {
@@ -232,7 +214,7 @@ void Skeleton::_notification(int p_what) {
Bone *bonesptr = bones.ptrw();
int len = bones.size();
- vs->skeleton_allocate(skeleton, len); // if same size, nothin really happens
+ vs->skeleton_allocate(skeleton, len); // if same size, nothing really happens
_update_process_order();
@@ -257,9 +239,6 @@ void Skeleton::_notification(int p_what) {
rest_global_inverse_dirty = false;
}
- Transform global_transform = get_global_transform();
- Transform global_transform_inverse = global_transform.affine_inverse();
-
for (int i = 0; i < len; i++) {
Bone &b = bonesptr[order[i]];
@@ -320,7 +299,7 @@ void Skeleton::_notification(int p_what) {
}
b.transform_final = b.pose_global * b.rest_global_inverse;
- vs->skeleton_bone_set_transform(skeleton, order[i], global_transform * (b.transform_final * global_transform_inverse));
+ vs->skeleton_bone_set_transform(skeleton, order[i], b.transform_final);
for (List<uint32_t>::Element *E = b.nodes_bound.front(); E; E = E->next()) {
@@ -594,10 +573,6 @@ void Skeleton::_make_dirty() {
if (dirty)
return;
- if (!is_inside_tree()) {
- dirty = true;
- return;
- }
MessageQueue::get_singleton()->push_notification(this, NOTIFICATION_UPDATE_SKELETON);
dirty = true;
}
@@ -771,6 +746,16 @@ void Skeleton::physical_bones_remove_collision_exception(RID p_exception) {
#endif // _3D_DISABLED
+void Skeleton::set_use_bones_in_world_transform(bool p_enable) {
+ use_bones_in_world_transform = p_enable;
+ if (is_inside_tree()) {
+ VS::get_singleton()->skeleton_set_world_transform(skeleton, use_bones_in_world_transform, get_global_transform());
+ }
+}
+bool Skeleton::is_using_bones_in_world_transform() const {
+ return use_bones_in_world_transform;
+}
+
void Skeleton::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_bone", "name"), &Skeleton::add_bone);
@@ -807,6 +792,9 @@ void Skeleton::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_bone_transform", "bone_idx"), &Skeleton::get_bone_transform);
+ ClassDB::bind_method(D_METHOD("set_use_bones_in_world_transform", "enable"), &Skeleton::set_use_bones_in_world_transform);
+ ClassDB::bind_method(D_METHOD("is_using_bones_in_world_transform"), &Skeleton::is_using_bones_in_world_transform);
+
#ifndef _3D_DISABLED
ClassDB::bind_method(D_METHOD("physical_bones_stop_simulation"), &Skeleton::physical_bones_stop_simulation);
@@ -818,6 +806,7 @@ void Skeleton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_bone_ignore_animation", "bone", "ignore"), &Skeleton::set_bone_ignore_animation);
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bones_in_world_transform"), "set_use_bones_in_world_transform", "is_using_bones_in_world_transform");
BIND_CONSTANT(NOTIFICATION_UPDATE_SKELETON);
}
@@ -828,6 +817,7 @@ Skeleton::Skeleton() {
process_order_dirty = true;
skeleton = VisualServer::get_singleton()->skeleton_create();
set_notify_transform(true);
+ use_bones_in_world_transform = false;
}
Skeleton::~Skeleton() {
diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h
index 0f463c9ea7..5f43b3c6c3 100644
--- a/scene/3d/skeleton.h
+++ b/scene/3d/skeleton.h
@@ -100,6 +100,7 @@ class Skeleton : public Spatial {
void _make_dirty();
bool dirty;
+ bool use_bones_in_world_transform;
// bind helpers
Array _get_bound_child_nodes_to_bone(int p_bone) const {
@@ -179,6 +180,9 @@ public:
void localize_rests(); // used for loaders and tools
int get_process_order(int p_idx);
+ void set_use_bones_in_world_transform(bool p_enable);
+ bool is_using_bones_in_world_transform() const;
+
#ifndef _3D_DISABLED
// Physical bone API
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index d6544c39da..83f99a2e3c 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -178,7 +178,7 @@ void Spatial::_notification(int p_what) {
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_enter_world, NULL, 0);
}
#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
+ if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) {
//get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this);
get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this);
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index a3fa2ac98d..6b70eef662 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -382,36 +382,30 @@ void Sprite3D::_draw() {
VS::get_singleton()->immediate_clear(immediate);
if (!texture.is_valid())
- return; //no texuture no life
+ return;
Vector2 tsize = texture->get_size();
if (tsize.x == 0 || tsize.y == 0)
return;
- Size2i s;
- Rect2 src_rect;
-
- if (region) {
-
- s = region_rect.size;
- src_rect = region_rect;
- } else {
- s = texture->get_size();
- s = s / Size2(hframes, vframes);
+ Rect2 base_rect;
+ if (region)
+ base_rect = region_rect;
+ else
+ base_rect = Rect2(0, 0, texture->get_width(), texture->get_height());
- src_rect.size = s;
- src_rect.position.x += (frame % hframes) * s.x;
- src_rect.position.y += (frame / hframes) * s.y;
- }
+ Size2 frame_size = base_rect.size / Size2(hframes, vframes);
+ Point2 frame_offset = Point2(frame % hframes, frame / hframes);
+ frame_offset *= frame_size;
- Point2 ofs = get_offset();
+ Point2 dest_offset = get_offset();
if (is_centered())
- ofs -= s / 2;
-
- Rect2 dst_rect(ofs, s);
+ dest_offset -= frame_size / 2;
+ Rect2 src_rect(base_rect.position + frame_offset, frame_size);
+ Rect2 final_dst_rect(dest_offset, frame_size);
Rect2 final_rect;
Rect2 final_src_rect;
- if (!texture->get_rect_region(dst_rect, src_rect, final_rect, final_src_rect))
+ if (!texture->get_rect_region(final_dst_rect, src_rect, final_rect, final_src_rect))
return;
if (final_rect.size.x == 0 || final_rect.size.y == 0)
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp
index 30e38c8ee2..750ed97ae6 100644
--- a/scene/3d/voxel_light_baker.cpp
+++ b/scene/3d/voxel_light_baker.cpp
@@ -887,7 +887,7 @@ void VoxelLightBaker::plot_light_directional(const Vector3 &p_direction, const C
distance -= distance_adv;
}
- if (result == idx) {
+ if (result == (uint32_t)idx) {
//cell hit itself! hooray!
Vector3 normal(cells[idx].normal[0], cells[idx].normal[1], cells[idx].normal[2]);
@@ -1018,7 +1018,7 @@ void VoxelLightBaker::plot_light_omni(const Vector3 &p_pos, const Color &p_color
distance -= distance_adv;
}
- if (result == idx) {
+ if (result == (uint32_t)idx) {
//cell hit itself! hooray!
if (normal == Vector3()) {
@@ -1152,7 +1152,7 @@ void VoxelLightBaker::plot_light_spot(const Vector3 &p_pos, const Vector3 &p_axi
distance -= distance_adv;
}
- if (result == idx) {
+ if (result == (uint32_t)idx) {
//cell hit itself! hooray!
if (normal == Vector3()) {
@@ -1730,7 +1730,7 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V
//int level_limit = max_level;
cell = 0; //start from root
- for (int i = 0; i < max_level; i++) {
+ for (int j = 0; j < max_level; j++) {
const Cell *bc = &cells[cell];
@@ -1759,14 +1759,14 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V
}
if (unlikely(cell != CHILD_EMPTY)) {
- for (int i = 0; i < 6; i++) {
+ for (int j = 0; j < 6; j++) {
//anisotropic read light
- float amount = direction.dot(aniso_normal[i]);
+ float amount = direction.dot(aniso_normal[j]);
if (amount <= 0)
continue;
- accum.x += light[cell].accum[i][0] * amount;
- accum.y += light[cell].accum[i][1] * amount;
- accum.z += light[cell].accum[i][2] * amount;
+ accum.x += light[cell].accum[j][0] * amount;
+ accum.y += light[cell].accum[j][1] * amount;
+ accum.z += light[cell].accum[j][2] * amount;
}
accum.x += cells[cell].emission[0];
accum.y += cells[cell].emission[1];
@@ -1833,16 +1833,16 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh
}
int faces = ic ? ic / 3 : vc / 3;
- for (int i = 0; i < faces; i++) {
+ for (int j = 0; j < faces; j++) {
Vector3 vertex[3];
Vector3 normal[3];
Vector2 uv[3];
- for (int j = 0; j < 3; j++) {
- int idx = ic ? ir[i * 3 + j] : i * 3 + j;
- vertex[j] = xform.xform(vr[idx]);
- normal[j] = xform.basis.xform(nr[idx]).normalized();
- uv[j] = u2r[idx];
+ for (int k = 0; k < 3; k++) {
+ int idx = ic ? ir[j * 3 + k] : j * 3 + k;
+ vertex[k] = xform.xform(vr[idx]);
+ normal[k] = xform.basis.xform(nr[idx]).normalized();
+ uv[k] = u2r[idx];
}
_plot_triangle(uv, vertex, normal, lightmap.ptrw(), width, height);
@@ -2208,7 +2208,7 @@ PoolVector<int> VoxelLightBaker::create_gi_probe_data() {
}
{
- uint16_t alpha = CLAMP(uint32_t(bake_cells[i].alpha * 65535.0), 0, 65535);
+ uint16_t alpha = MIN(uint32_t(bake_cells[i].alpha * 65535.0), 65535);
uint16_t level = bake_cells[i].level;
w32[ofs++] = (uint32_t(level) << 16) | uint32_t(alpha);
@@ -2252,7 +2252,7 @@ void VoxelLightBaker::_debug_mesh(int p_idx, int p_level, const AABB &p_aabb, Re
uint32_t child = bake_cells[p_idx].children[i];
- if (child == CHILD_EMPTY || child >= max_original_cells)
+ if (child == CHILD_EMPTY || child >= (uint32_t)max_original_cells)
continue;
AABB aabb = p_aabb;
diff --git a/scene/3d/scenario_fx.cpp b/scene/3d/world_environment.cpp
index ad9b61e1ff..3cd43cbf5b 100644
--- a/scene/3d/scenario_fx.cpp
+++ b/scene/3d/world_environment.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scenario_fx.cpp */
+/* world_environment.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "scenario_fx.h"
+#include "world_environment.h"
#include "scene/main/viewport.h"
void WorldEnvironment::_notification(int p_what) {
diff --git a/scene/3d/scenario_fx.h b/scene/3d/world_environment.h
index 6317dae75d..bf36a0a532 100644
--- a/scene/3d/scenario_fx.h
+++ b/scene/3d/world_environment.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scenario_fx.h */
+/* world_environment.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index 1fe14e633b..95d4644004 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -461,9 +461,9 @@ float AnimationNodeBlendSpace2D::process(float p_time, bool p_seek) {
points[j],
points[(j + 1) % 3]
};
- Vector2 closest = Geometry::get_closest_point_to_segment_2d(blend_pos, s);
- if (first || closest.distance_to(blend_pos) < best_point.distance_to(blend_pos)) {
- best_point = closest;
+ Vector2 closest2 = Geometry::get_closest_point_to_segment_2d(blend_pos, s);
+ if (first || closest2.distance_to(blend_pos) < best_point.distance_to(blend_pos)) {
+ best_point = closest2;
blend_triangle = i;
first = false;
float d = s[0].distance_to(s[1]);
@@ -472,7 +472,7 @@ float AnimationNodeBlendSpace2D::process(float p_time, bool p_seek) {
blend_weights[(j + 1) % 3] = 0.0;
blend_weights[(j + 2) % 3] = 0.0;
} else {
- float c = s[0].distance_to(closest) / d;
+ float c = s[0].distance_to(closest2) / d;
blend_weights[j] = 1.0 - c;
blend_weights[(j + 1) % 3] = c;
diff --git a/scene/animation/animation_cache.cpp b/scene/animation/animation_cache.cpp
index 6c67af5777..feefe3ddd4 100644
--- a/scene/animation/animation_cache.cpp
+++ b/scene/animation/animation_cache.cpp
@@ -133,19 +133,19 @@ void AnimationCache::_update_cache() {
} else {
if (np.get_subname_count() > 0) {
- RES res;
+ RES res2;
Vector<StringName> leftover_subpath;
// We don't want to cache the last resource unless it is a method call
bool is_method = animation->track_get_type(i) == Animation::TYPE_METHOD;
- root->get_node_and_resource(np, res, leftover_subpath, is_method);
+ root->get_node_and_resource(np, res2, leftover_subpath, is_method);
- if (res.is_valid()) {
- path.resource = res;
+ if (res2.is_valid()) {
+ path.resource = res2;
} else {
path.node = node;
}
- path.object = res.is_valid() ? res.ptr() : (Object *)node;
+ path.object = res2.is_valid() ? res2.ptr() : (Object *)node;
path.subpath = leftover_subpath;
} else {
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index 08cc655cdd..5df3da93e1 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -421,7 +421,8 @@ float AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *sm,
if (sm->transitions[i].from == current && auto_advance) {
- if (sm->transitions[i].transition->get_priority() < priority_best) {
+ if (sm->transitions[i].transition->get_priority() <= priority_best) {
+ priority_best = sm->transitions[i].transition->get_priority();
auto_advance_to = i;
}
}
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 1d2001c30d..016db15b73 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -287,7 +287,6 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim) {
// broken track (nonexistent bone)
p_anim->node_cache[i]->skeleton = NULL;
p_anim->node_cache[i]->spatial = NULL;
- printf("bone is %ls\n", String(bone_name).c_str());
ERR_CONTINUE(p_anim->node_cache[i]->bone_idx < 0);
}
} else {
@@ -344,10 +343,16 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
for (int i = 0; i < a->get_track_count(); i++) {
+ // If an animation changes this animation (or it animates itself)
+ // we need to recreate our animation cache
+ if (p_anim->node_cache.size() != a->get_track_count()) {
+ _ensure_node_caches(p_anim);
+ }
+
TrackNodeCache *nc = p_anim->node_cache[i];
- if (!nc) // no node cache for this track, skip it
- continue;
+ if (!nc)
+ continue; // no node cache for this track, skip it
if (!a->track_is_enabled(i))
continue; // do nothing if the track is disabled
@@ -985,25 +990,12 @@ void AnimationPlayer::remove_animation(const StringName &p_name) {
void AnimationPlayer::_ref_anim(const Ref<Animation> &p_anim) {
- if (used_anims.has(p_anim))
- used_anims[p_anim]++;
- else {
- used_anims[p_anim] = 1;
- Ref<Animation>(p_anim)->connect("changed", this, "_animation_changed");
- }
+ Ref<Animation>(p_anim)->connect(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed", varray(), CONNECT_REFERENCE_COUNTED);
}
void AnimationPlayer::_unref_anim(const Ref<Animation> &p_anim) {
- ERR_FAIL_COND(!used_anims.has(p_anim));
-
- int &n = used_anims[p_anim];
- n--;
- if (n == 0) {
-
- Ref<Animation>(p_anim)->disconnect("changed", this, "_animation_changed");
- used_anims.erase(p_anim);
- }
+ Ref<Animation>(p_anim)->disconnect(SceneStringNames::get_singleton()->tracks_changed, this, "_animation_changed");
}
void AnimationPlayer::rename_animation(const StringName &p_name, const StringName &p_new_name) {
@@ -1140,8 +1132,6 @@ void AnimationPlayer::play_backwards(const StringName &p_name, float p_custom_bl
void AnimationPlayer::play(const StringName &p_name, float p_custom_blend, float p_custom_scale, bool p_from_end) {
- //printf("animation is %ls\n", String(p_name).c_str());
- //ERR_FAIL_COND(!is_inside_scene());
StringName name = p_name;
if (String(name) == "")
@@ -1199,9 +1189,21 @@ void AnimationPlayer::play(const StringName &p_name, float p_custom_blend, float
_stop_playing_caches();
c.current.from = &animation_set[name];
- c.current.pos = p_from_end ? c.current.from->animation->get_length() : 0;
+
+ if (c.assigned != name) { // reset
+ c.current.pos = p_from_end ? c.current.from->animation->get_length() : 0;
+ } else {
+ if (p_from_end && c.current.pos == 0) {
+ // Animation reset BUT played backwards, set position to the end
+ c.current.pos = c.current.from->animation->get_length();
+ } else if (!p_from_end && c.current.pos == c.current.from->animation->get_length()) {
+ // Animation resumed but already ended, set position to the beggining
+ c.current.pos = 0;
+ }
+ }
+
c.current.speed_scale = p_custom_scale;
- c.assigned = p_name;
+ c.assigned = name;
c.seeked = false;
c.started = true;
@@ -1280,6 +1282,7 @@ void AnimationPlayer::stop(bool p_reset) {
if (p_reset) {
c.current.from = NULL;
c.current.speed_scale = 1;
+ c.current.pos = 0;
}
_set_process(false);
queued.clear();
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 175072edcf..fea4819821 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -114,10 +114,12 @@ private:
Variant value_accum;
uint64_t accum_pass;
Variant capture;
- PropertyAnim() {
- accum_pass = 0;
- object = NULL;
- }
+
+ PropertyAnim() :
+ owner(NULL),
+ special(SP_NONE),
+ object(NULL),
+ accum_pass(0) {}
};
Map<StringName, PropertyAnim> property_anim;
@@ -129,25 +131,28 @@ private:
float bezier_accum;
Object *object;
uint64_t accum_pass;
- BezierAnim() {
- accum_pass = 0;
- bezier_accum = 0;
- object = NULL;
- }
+
+ BezierAnim() :
+ owner(NULL),
+ bezier_accum(0.0),
+ object(NULL),
+ accum_pass(0) {}
};
Map<StringName, BezierAnim> bezier_anim;
- TrackNodeCache() {
- skeleton = NULL;
- spatial = NULL;
- node = NULL;
- accum_pass = 0;
- bone_idx = -1;
- node_2d = NULL;
- audio_playing = false;
- animation_playing = false;
- }
+ TrackNodeCache() :
+ id(0),
+ node(NULL),
+ spatial(NULL),
+ node_2d(NULL),
+ skeleton(NULL),
+ bone_idx(-1),
+ accum_pass(0),
+ audio_playing(false),
+ audio_start(0.0),
+ audio_len(0.0),
+ animation_playing(false) {}
};
struct TrackNodeCacheKey {
@@ -176,8 +181,6 @@ private:
int cache_update_bezier_size;
Set<TrackNodeCache *> playing_caches;
- Map<Ref<Animation>, int> used_anims;
-
uint64_t accum_pass;
float speed_scale;
float default_blend_time;
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index c32001dbcd..0b6fa26bfc 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -1009,10 +1009,10 @@ void AnimationTree::_process_graph(float p_delta) {
a->method_track_get_key_indices(i, time, delta, &indices);
- for (List<int>::Element *E = indices.front(); E; E = E->next()) {
+ for (List<int>::Element *F = indices.front(); F; F = F->next()) {
- StringName method = a->method_track_get_name(i, E->get());
- Vector<Variant> params = a->method_track_get_params(i, E->get());
+ StringName method = a->method_track_get_name(i, F->get());
+ Vector<Variant> params = a->method_track_get_params(i, F->get());
int s = params.size();
@@ -1151,9 +1151,9 @@ void AnimationTree::_process_graph(float p_delta) {
TrackCacheAnimation *t = static_cast<TrackCacheAnimation *>(track);
- AnimationPlayer *player = Object::cast_to<AnimationPlayer>(t->object);
+ AnimationPlayer *player2 = Object::cast_to<AnimationPlayer>(t->object);
- if (!player)
+ if (!player2)
continue;
if (delta == 0 || seeked) {
@@ -1165,10 +1165,10 @@ void AnimationTree::_process_graph(float p_delta) {
float pos = a->track_get_key_time(i, idx);
StringName anim_name = a->animation_track_get_key_animation(i, idx);
- if (String(anim_name) == "[stop]" || !player->has_animation(anim_name))
+ if (String(anim_name) == "[stop]" || !player2->has_animation(anim_name))
continue;
- Ref<Animation> anim = player->get_animation(anim_name);
+ Ref<Animation> anim = player2->get_animation(anim_name);
float at_anim_pos;
@@ -1178,14 +1178,14 @@ void AnimationTree::_process_graph(float p_delta) {
at_anim_pos = MAX(anim->get_length(), time - pos); //seek to end
}
- if (player->is_playing() || seeked) {
- player->play(anim_name);
- player->seek(at_anim_pos);
+ if (player2->is_playing() || seeked) {
+ player2->play(anim_name);
+ player2->seek(at_anim_pos);
t->playing = true;
playing_caches.insert(t);
} else {
- player->set_assigned_animation(anim_name);
- player->seek(at_anim_pos, true);
+ player2->set_assigned_animation(anim_name);
+ player2->seek(at_anim_pos, true);
}
} else {
//find stuff to play
@@ -1195,15 +1195,15 @@ void AnimationTree::_process_graph(float p_delta) {
int idx = to_play.back()->get();
StringName anim_name = a->animation_track_get_key_animation(i, idx);
- if (String(anim_name) == "[stop]" || !player->has_animation(anim_name)) {
+ if (String(anim_name) == "[stop]" || !player2->has_animation(anim_name)) {
if (playing_caches.has(t)) {
playing_caches.erase(t);
- player->stop();
+ player2->stop();
t->playing = false;
}
} else {
- player->play(anim_name);
+ player2->play(anim_name);
t->playing = true;
playing_caches.insert(t);
}
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index e3a21d8b46..3420b48ae3 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -136,9 +136,9 @@ bool AnimationTreePlayer::_set(const StringName &p_name, const Variant &p_value)
else
animation_node_set_animation(id, node.get_valid("animation"));
Array filters = node.get_valid("filter");
- for (int i = 0; i < filters.size(); i++) {
+ for (int j = 0; j < filters.size(); j++) {
- animation_node_set_filter_path(id, filters[i], true);
+ animation_node_set_filter_path(id, filters[j], true);
}
} break;
case NODE_ONESHOT: {
@@ -150,9 +150,9 @@ bool AnimationTreePlayer::_set(const StringName &p_name, const Variant &p_value)
oneshot_node_set_autorestart_delay(id, node.get_valid("autorestart_delay"));
oneshot_node_set_autorestart_random_delay(id, node.get_valid("autorestart_random_delay"));
Array filters = node.get_valid("filter");
- for (int i = 0; i < filters.size(); i++) {
+ for (int j = 0; j < filters.size(); j++) {
- oneshot_node_set_filter_path(id, filters[i], true);
+ oneshot_node_set_filter_path(id, filters[j], true);
}
} break;
@@ -162,9 +162,9 @@ bool AnimationTreePlayer::_set(const StringName &p_name, const Variant &p_value)
case NODE_BLEND2: {
blend2_node_set_amount(id, node.get_valid("blend"));
Array filters = node.get_valid("filter");
- for (int i = 0; i < filters.size(); i++) {
+ for (int j = 0; j < filters.size(); j++) {
- blend2_node_set_filter_path(id, filters[i], true);
+ blend2_node_set_filter_path(id, filters[j], true);
}
} break;
case NODE_BLEND3: {
@@ -278,8 +278,8 @@ bool AnimationTreePlayer::_get(const StringName &p_name, Variant &r_ret) const {
an->filter.get_key_list(&keys);
k.resize(keys.size());
int i = 0;
- for (List<NodePath>::Element *E = keys.front(); E; E = E->next()) {
- k[i++] = E->get();
+ for (List<NodePath>::Element *F = keys.front(); F; F = F->next()) {
+ k[i++] = F->get();
}
node["filter"] = k;
} break;
@@ -297,8 +297,8 @@ bool AnimationTreePlayer::_get(const StringName &p_name, Variant &r_ret) const {
osn->filter.get_key_list(&keys);
k.resize(keys.size());
int i = 0;
- for (List<NodePath>::Element *E = keys.front(); E; E = E->next()) {
- k[i++] = E->get();
+ for (List<NodePath>::Element *F = keys.front(); F; F = F->next()) {
+ k[i++] = F->get();
}
node["filter"] = k;
@@ -315,8 +315,8 @@ bool AnimationTreePlayer::_get(const StringName &p_name, Variant &r_ret) const {
bn->filter.get_key_list(&keys);
k.resize(keys.size());
int i = 0;
- for (List<NodePath>::Element *E = keys.front(); E; E = E->next()) {
- k[i++] = E->get();
+ for (List<NodePath>::Element *F = keys.front(); F; F = F->next()) {
+ k[i++] = F->get();
}
node["filter"] = k;
@@ -874,10 +874,10 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
List<int> indices;
a->method_track_get_key_indices(tr.local_track, anim_list->time, anim_list->step, &indices);
- for (List<int>::Element *E = indices.front(); E; E = E->next()) {
+ for (List<int>::Element *F = indices.front(); F; F = F->next()) {
- StringName method = a->method_track_get_name(tr.local_track, E->get());
- Vector<Variant> args = a->method_track_get_params(tr.local_track, E->get());
+ StringName method = a->method_track_get_name(tr.local_track, F->get());
+ Vector<Variant> args = a->method_track_get_params(tr.local_track, F->get());
args.resize(VARIANT_ARG_MAX);
tr.track->object->call(method, args[0], args[1], args[2], args[3], args[4]);
}
diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h
index 12e514f7d5..9ec6325969 100644
--- a/scene/animation/animation_tree_player.h
+++ b/scene/animation/animation_tree_player.h
@@ -109,6 +109,14 @@ private:
Variant value;
bool skip;
+
+ Track() :
+ id(0),
+ object(NULL),
+ spatial(NULL),
+ skeleton(NULL),
+ bone_idx(-1),
+ skip(false) {}
};
typedef Map<TrackKey, Track> TrackMap;
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_stream_player.cpp
index 4eae3b04e7..2688041d18 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* audio_player.cpp */
+/* audio_stream_player.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "audio_player.h"
+#include "audio_stream_player.h"
#include "core/engine.h"
@@ -91,13 +91,19 @@ void AudioStreamPlayer::_mix_internal(bool p_fadeout) {
void AudioStreamPlayer::_mix_audio() {
- if (!stream_playback.is_valid() || !active)
+ if (!stream_playback.is_valid() || !active ||
+ (stream_paused && !stream_fade)) {
return;
+ }
- if (stream_paused) {
- if (stream_paused_fade) {
- _mix_internal(true);
- stream_paused_fade = false;
+ if (stream_fade) {
+ _mix_internal(true);
+ stream_fade = false;
+
+ if (stream_stop) {
+ stream_playback->stop();
+ active = false;
+ set_process_internal(false);
}
return;
}
@@ -203,6 +209,7 @@ void AudioStreamPlayer::play(float p_from_pos) {
if (stream_playback.is_valid()) {
//mix_volume_db = volume_db; do not reset volume ramp here, can cause clicks
+ stream_stop = false;
setseek = p_from_pos;
active = true;
set_process_internal(true);
@@ -219,9 +226,8 @@ void AudioStreamPlayer::seek(float p_seconds) {
void AudioStreamPlayer::stop() {
if (stream_playback.is_valid()) {
- stream_playback->stop();
- active = false;
- set_process_internal(false);
+ stream_stop = true;
+ stream_fade = true;
}
}
@@ -295,7 +301,7 @@ void AudioStreamPlayer::set_stream_paused(bool p_pause) {
if (p_pause != stream_paused) {
stream_paused = p_pause;
- stream_paused_fade = p_pause ? true : false;
+ stream_fade = p_pause ? true : false;
}
}
@@ -385,7 +391,8 @@ AudioStreamPlayer::AudioStreamPlayer() {
setseek = -1;
active = false;
stream_paused = false;
- stream_paused_fade = false;
+ stream_fade = false;
+ stream_stop = false;
mix_target = MIX_TARGET_STEREO;
AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed");
diff --git a/scene/audio/audio_player.h b/scene/audio/audio_stream_player.h
index 2e9526c335..fba8ce7dd3 100644
--- a/scene/audio/audio_player.h
+++ b/scene/audio/audio_stream_player.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* audio_player.h */
+/* audio_stream_player.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef AUDIOPLAYER_H
-#define AUDIOPLAYER_H
+#ifndef AUDIO_STREAM_PLAYER_H
+#define AUDIO_STREAM_PLAYER_H
#include "scene/main/node.h"
#include "servers/audio/audio_stream.h"
@@ -58,7 +58,8 @@ private:
float volume_db;
bool autoplay;
bool stream_paused;
- bool stream_paused_fade;
+ bool stream_fade;
+ bool stream_stop;
StringName bus;
MixTarget mix_target;
@@ -110,4 +111,5 @@ public:
};
VARIANT_ENUM_CAST(AudioStreamPlayer::MixTarget)
-#endif // AUDIOPLAYER_H
+
+#endif // AUDIO_STREAM_PLAYER_H
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index b77b57ddd4..c734136895 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -140,8 +140,8 @@ void Button::_notification(int p_what) {
if (has_focus()) {
- Ref<StyleBox> style = get_stylebox("focus");
- style->draw(ci, Rect2(Point2(), size));
+ Ref<StyleBox> style2 = get_stylebox("focus");
+ style2->draw(ci, Rect2(Point2(), size));
}
Ref<Font> font = get_font("font");
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 4b1c7b3db7..7aca6acd00 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -737,7 +737,7 @@ ColorPicker::ColorPicker() :
bt_add_preset = memnew(Button);
bbc->add_child(bt_add_preset);
- bt_add_preset->set_tooltip(TTR("Add current color as a preset"));
+ bt_add_preset->set_tooltip(TTR("Add current color as a preset."));
bt_add_preset->connect("pressed", this, "_add_preset_pressed");
}
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 2579321773..7f1ca58d58 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -169,6 +169,19 @@ void Container::_notification(int p_what) {
}
}
+String Container::get_configuration_warning() const {
+
+ String warning = Control::get_configuration_warning();
+
+ if (get_class() == "Container" && get_script().is_null()) {
+ if (warning != String()) {
+ warning += "\n";
+ }
+ warning += TTR("Container by itself serves no purpose unless a script configures it's children placement behavior.\nIf you dont't intend to add a script, then please use a plain 'Control' node instead.");
+ }
+ return warning;
+}
+
void Container::_bind_methods() {
ClassDB::bind_method(D_METHOD("_sort_children"), &Container::_sort_children);
diff --git a/scene/gui/container.h b/scene/gui/container.h
index 0b014137f4..80d3f6ee5d 100644
--- a/scene/gui/container.h
+++ b/scene/gui/container.h
@@ -57,6 +57,8 @@ public:
void fit_child_in_rect(Control *p_child, const Rect2 &p_rect);
+ virtual String get_configuration_warning() const;
+
Container();
};
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 513befb8f3..86894ce070 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -206,65 +206,62 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) {
if (name.begins_with("custom_icons/")) {
String dname = name.get_slicec('/', 1);
+ if (data.icon_override.has(dname)) {
+ data.icon_override[dname]->disconnect("changed", this, "_override_changed");
+ }
data.icon_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
- update();
} else if (name.begins_with("custom_shaders/")) {
String dname = name.get_slicec('/', 1);
+ if (data.shader_override.has(dname)) {
+ data.shader_override[dname]->disconnect("changed", this, "_override_changed");
+ }
data.shader_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
- update();
} else if (name.begins_with("custom_styles/")) {
String dname = name.get_slicec('/', 1);
+ if (data.style_override.has(dname)) {
+ data.style_override[dname]->disconnect("changed", this, "_override_changed");
+ }
data.style_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
- update();
} else if (name.begins_with("custom_fonts/")) {
String dname = name.get_slicec('/', 1);
if (data.font_override.has(dname)) {
- _unref_font(data.font_override[dname]);
+ data.font_override[dname]->disconnect("changed", this, "_override_changed");
}
data.font_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
- update();
} else if (name.begins_with("custom_colors/")) {
String dname = name.get_slicec('/', 1);
data.color_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
- update();
} else if (name.begins_with("custom_constants/")) {
String dname = name.get_slicec('/', 1);
data.constant_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
- update();
} else
return false;
} else {
if (name.begins_with("custom_icons/")) {
String dname = name.get_slicec('/', 1);
- notification(NOTIFICATION_THEME_CHANGED);
add_icon_override(dname, p_value);
} else if (name.begins_with("custom_shaders/")) {
String dname = name.get_slicec('/', 1);
add_shader_override(dname, p_value);
- notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("custom_styles/")) {
String dname = name.get_slicec('/', 1);
add_style_override(dname, p_value);
- notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("custom_fonts/")) {
String dname = name.get_slicec('/', 1);
add_font_override(dname, p_value);
- notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("custom_colors/")) {
String dname = name.get_slicec('/', 1);
add_color_override(dname, p_value);
- notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("custom_constants/")) {
String dname = name.get_slicec('/', 1);
add_constant_override(dname, p_value);
- notification(NOTIFICATION_THEME_CHANGED);
} else
return false;
}
@@ -1800,51 +1797,63 @@ Rect2 Control::get_anchorable_rect() const {
void Control::add_icon_override(const StringName &p_name, const Ref<Texture> &p_icon) {
ERR_FAIL_COND(p_icon.is_null());
+ if (data.icon_override.has(p_name)) {
+ data.icon_override[p_name]->disconnect("changed", this, "_override_changed");
+ }
data.icon_override[p_name] = p_icon;
+ if (data.icon_override[p_name].is_valid()) {
+ data.icon_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
+ }
notification(NOTIFICATION_THEME_CHANGED);
- update();
}
void Control::add_shader_override(const StringName &p_name, const Ref<Shader> &p_shader) {
ERR_FAIL_COND(p_shader.is_null());
+ if (data.shader_override.has(p_name)) {
+ data.shader_override[p_name]->disconnect("changed", this, "_override_changed");
+ }
data.shader_override[p_name] = p_shader;
+ if (data.shader_override[p_name].is_valid()) {
+ data.shader_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
+ }
notification(NOTIFICATION_THEME_CHANGED);
- update();
}
void Control::add_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) {
ERR_FAIL_COND(p_style.is_null());
+ if (data.style_override.has(p_name)) {
+ data.style_override[p_name]->disconnect("changed", this, "_override_changed");
+ }
data.style_override[p_name] = p_style;
+ if (data.style_override[p_name].is_valid()) {
+ data.style_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
+ }
+
notification(NOTIFICATION_THEME_CHANGED);
- update();
}
void Control::add_font_override(const StringName &p_name, const Ref<Font> &p_font) {
ERR_FAIL_COND(p_font.is_null());
if (data.font_override.has(p_name)) {
- _unref_font(data.font_override[p_name]);
+ data.font_override[p_name]->disconnect("changed", this, "_override_changed");
}
data.font_override[p_name] = p_font;
-
- if (p_font.is_valid()) {
- _ref_font(p_font);
+ if (data.font_override[p_name].is_valid()) {
+ data.font_override[p_name]->connect("changed", this, "_override_changed", Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
}
notification(NOTIFICATION_THEME_CHANGED);
- update();
}
void Control::add_color_override(const StringName &p_name, const Color &p_color) {
data.color_override[p_name] = p_color;
notification(NOTIFICATION_THEME_CHANGED);
- update();
}
void Control::add_constant_override(const StringName &p_name, int p_constant) {
data.constant_override[p_name] = p_constant;
notification(NOTIFICATION_THEME_CHANGED);
- update();
}
void Control::set_focus_mode(FocusMode p_focus_mode) {
@@ -2143,7 +2152,6 @@ void Control::_propagate_theme_changed(CanvasItem *p_at, Control *p_owner, bool
c->data.theme_owner = p_owner;
}
c->notification(NOTIFICATION_THEME_CHANGED);
- c->update();
}
}
@@ -2550,32 +2558,10 @@ float Control::get_rotation_degrees() const {
return Math::rad2deg(get_rotation());
}
-//needed to update the control if the font changes..
-void Control::_ref_font(Ref<Font> p_sc) {
+void Control::_override_changed() {
- if (!data.font_refcount.has(p_sc)) {
- data.font_refcount[p_sc] = 1;
- p_sc->connect("changed", this, "_font_changed");
- } else {
- data.font_refcount[p_sc] += 1;
- }
-}
-
-void Control::_unref_font(Ref<Font> p_sc) {
-
- ERR_FAIL_COND(!data.font_refcount.has(p_sc));
- data.font_refcount[p_sc]--;
- if (data.font_refcount[p_sc] == 0) {
- p_sc->disconnect("changed", this, "_font_changed");
- data.font_refcount.erase(p_sc);
- }
-}
-
-void Control::_font_changed() {
-
- update();
notification(NOTIFICATION_THEME_CHANGED);
- minimum_size_changed(); //fonts affect minimum size pretty much almost always
+ minimum_size_changed(); // overrides are likely to affect minimum size
}
void Control::set_pivot_offset(const Vector2 &p_pivot) {
@@ -2735,7 +2721,7 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_scale"), &Control::get_scale);
ClassDB::bind_method(D_METHOD("get_pivot_offset"), &Control::get_pivot_offset);
ClassDB::bind_method(D_METHOD("get_custom_minimum_size"), &Control::get_custom_minimum_size);
- ClassDB::bind_method(D_METHOD("get_parent_area_size"), &Control::get_size);
+ ClassDB::bind_method(D_METHOD("get_parent_area_size"), &Control::get_parent_area_size);
ClassDB::bind_method(D_METHOD("get_global_position"), &Control::get_global_position);
ClassDB::bind_method(D_METHOD("get_rect"), &Control::get_rect);
ClassDB::bind_method(D_METHOD("get_global_rect"), &Control::get_global_rect);
@@ -2829,7 +2815,7 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("_theme_changed"), &Control::_theme_changed);
- ClassDB::bind_method(D_METHOD("_font_changed"), &Control::_font_changed);
+ ClassDB::bind_method(D_METHOD("_override_changed"), &Control::_override_changed);
BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_get_minimum_size"));
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 0812457bd2..5e33f6ba43 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -207,7 +207,6 @@ private:
HashMap<StringName, Ref<Font> > font_override;
HashMap<StringName, Color> color_override;
HashMap<StringName, int> constant_override;
- Map<Ref<Font>, int> font_refcount;
} data;
@@ -234,9 +233,7 @@ private:
void _size_changed();
String _get_tooltip() const;
- void _ref_font(Ref<Font> p_sc);
- void _unref_font(Ref<Font> p_sc);
- void _font_changed();
+ void _override_changed();
void _update_canvas_item_transform();
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 5599c64daa..059e59ea21 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -861,7 +861,7 @@ FileDialog::FileDialog() {
HBoxContainer *hbc = memnew(HBoxContainer);
dir_up = memnew(ToolButton);
- dir_up->set_tooltip(RTR("Go to parent folder"));
+ dir_up->set_tooltip(RTR("Go to parent folder."));
hbc->add_child(dir_up);
dir_up->connect("pressed", this, "_go_up");
@@ -871,6 +871,7 @@ FileDialog::FileDialog() {
dir->set_h_size_flags(SIZE_EXPAND_FILL);
refresh = memnew(ToolButton);
+ refresh->set_tooltip(RTR("Refresh"));
refresh->connect("pressed", this, "_update_file_list");
hbc->add_child(refresh);
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index fd340b3f6c..662278a17b 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -33,8 +33,8 @@
#include "scene/gui/color_picker.h"
#include "scene/gui/popup.h"
-#include "scene/resources/color_ramp.h"
#include "scene/resources/default_theme/theme_data.h"
+#include "scene/resources/gradient.h"
#define POINT_WIDTH (8 * EDSCALE)
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 94c65b3e64..68e734502b 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -221,8 +221,8 @@ void GraphEdit::_graph_node_raised(Node *p_gn) {
}
int first_not_comment = 0;
for (int i = 0; i < get_child_count(); i++) {
- GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
- if (gn && !gn->is_comment()) {
+ GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
+ if (gn2 && !gn2->is_comment()) {
first_not_comment = i;
break;
}
@@ -261,8 +261,9 @@ void GraphEdit::add_child_notify(Node *p_child) {
void GraphEdit::remove_child_notify(Node *p_child) {
Control::remove_child_notify(p_child);
-
- top_layer->call_deferred("raise"); //top layer always on top!
+ if (is_inside_tree()) {
+ top_layer->call_deferred("raise"); //top layer always on top!
+ }
GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
gn->disconnect("offset_changed", this, "_graph_node_moved");
@@ -958,33 +959,33 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
- if (!gn || !gn->is_selected())
+ GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
+ if (!gn2 || !gn2->is_selected())
continue;
- previus_selected.push_back(gn);
+ previus_selected.push_back(gn2);
}
} else if (b->get_shift()) {
box_selection_mode_aditive = false;
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
- if (!gn || !gn->is_selected())
+ GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
+ if (!gn2 || !gn2->is_selected())
continue;
- previus_selected.push_back(gn);
+ previus_selected.push_back(gn2);
}
} else {
box_selection_mode_aditive = true;
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
- if (!gn)
+ GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
+ if (!gn2)
continue;
- gn->set_selected(false);
+ gn2->set_selected(false);
}
}
}
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 8c588109d6..e8692d56d2 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -164,7 +164,6 @@ void GraphNode::_resort() {
vofs += size.y;
}
- _change_notify();
update();
connpos_dirty = true;
}
@@ -409,9 +408,12 @@ Size2 GraphNode::get_minimum_size() const {
void GraphNode::set_title(const String &p_title) {
+ if (title == p_title)
+ return;
title = p_title;
- minimum_size_changed();
update();
+ _change_notify("title");
+ minimum_size_changed();
}
String GraphNode::get_title() const {
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index efe452305b..026374ded1 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1094,7 +1094,7 @@ void ItemList::_notification(int p_what) {
if (items[i].disabled)
modulate.a *= 0.5;
- // If the icon is transposed, we have to swith the size so that it is drawn correctly
+ // If the icon is transposed, we have to switch the size so that it is drawn correctly
if (items[i].icon_transposed) {
Size2 size_tmp = draw_rect.size;
draw_rect.size.x = size_tmp.y;
@@ -1114,13 +1114,13 @@ void ItemList::_notification(int p_what) {
int max_len = -1;
- Vector2 size = font->get_string_size(items[i].text);
+ Vector2 size2 = font->get_string_size(items[i].text);
if (fixed_column_width)
max_len = fixed_column_width;
else if (same_column_width)
max_len = items[i].rect_cache.size.x;
else
- max_len = size.x;
+ max_len = size2.x;
Color modulate = items[i].selected ? font_color_selected : (items[i].custom_fg != Color() ? items[i].custom_fg : font_color);
if (items[i].disabled)
@@ -1170,12 +1170,12 @@ void ItemList::_notification(int p_what) {
} else {
if (fixed_column_width > 0)
- size.x = MIN(size.x, fixed_column_width);
+ size2.x = MIN(size2.x, fixed_column_width);
if (icon_mode == ICON_MODE_TOP) {
- text_ofs.x += (items[i].rect_cache.size.width - size.x) / 2;
+ text_ofs.x += (items[i].rect_cache.size.width - size2.x) / 2;
} else {
- text_ofs.y += (items[i].rect_cache.size.height - size.y) / 2;
+ text_ofs.y += (items[i].rect_cache.size.height - size2.y) / 2;
}
text_ofs.y += font->get_ascent();
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 4a2bb3dad1..bf6833e512 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -1154,9 +1154,7 @@ void LineEdit::set_cursor_position(int p_pos) {
if (cursor_pos <= window_pos) {
/* Adjust window if cursor goes too much to the left */
- if (window_pos > 0)
- set_window_pos(window_pos - 1);
-
+ set_window_pos(MAX(0, cursor_pos - 1));
} else if (cursor_pos > window_pos) {
/* Adjust window if cursor goes too much to the right */
int window_width = get_size().width - style->get_minimum_size().width;
diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h
index ffe248ac5e..17c4bca67b 100644
--- a/scene/gui/link_button.h
+++ b/scene/gui/link_button.h
@@ -32,7 +32,7 @@
#define LINKBUTTON_H
#include "scene/gui/base_button.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
class LinkButton : public BaseButton {
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 98f427cc07..b9b270ce0c 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -160,6 +160,12 @@ int OptionButton::get_item_id(int p_idx) const {
return popup->get_item_id(p_idx);
}
+
+int OptionButton::get_item_index(int p_id) const {
+
+ return popup->get_item_index(p_id);
+}
+
Variant OptionButton::get_item_metadata(int p_idx) const {
return popup->get_item_metadata(p_idx);
@@ -306,6 +312,7 @@ void OptionButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &OptionButton::get_item_text);
ClassDB::bind_method(D_METHOD("get_item_icon", "idx"), &OptionButton::get_item_icon);
ClassDB::bind_method(D_METHOD("get_item_id", "idx"), &OptionButton::get_item_id);
+ ClassDB::bind_method(D_METHOD("get_item_index", "id"), &OptionButton::get_item_index);
ClassDB::bind_method(D_METHOD("get_item_metadata", "idx"), &OptionButton::get_item_metadata);
ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &OptionButton::is_item_disabled);
ClassDB::bind_method(D_METHOD("get_item_count"), &OptionButton::get_item_count);
diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h
index 121b4c002d..63b451377a 100644
--- a/scene/gui/option_button.h
+++ b/scene/gui/option_button.h
@@ -71,6 +71,7 @@ public:
String get_item_text(int p_idx) const;
Ref<Texture> get_item_icon(int p_idx) const;
int get_item_id(int p_idx) const;
+ int get_item_index(int p_id) const;
Variant get_item_metadata(int p_idx) const;
bool is_item_disabled(int p_idx) const;
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 2d2c54594a..80ec7049fc 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -124,49 +124,22 @@ void Popup::popup_centered_minsize(const Size2 &p_minsize) {
void Popup::popup_centered(const Size2 &p_size) {
- Point2 window_size = get_viewport_rect().size;
-
- emit_signal("about_to_show");
Rect2 rect;
+ Size2 window_size = get_viewport_rect().size;
rect.size = p_size == Size2() ? get_size() : p_size;
-
rect.position = ((window_size - rect.size) / 2.0).floor();
- set_position(rect.position);
- set_size(rect.size);
-
- show_modal(exclusive);
- _fix_size();
- Control *focusable = find_next_valid_focus();
- if (focusable)
- focusable->grab_focus();
-
- _post_popup();
- notification(NOTIFICATION_POST_POPUP);
- popped_up = true;
+ popup(rect);
}
void Popup::popup_centered_ratio(float p_screen_ratio) {
- emit_signal("about_to_show");
-
Rect2 rect;
- Point2 window_size = get_viewport_rect().size;
+ Size2 window_size = get_viewport_rect().size;
rect.size = (window_size * p_screen_ratio).floor();
rect.position = ((window_size - rect.size) / 2.0).floor();
- set_position(rect.position);
- set_size(rect.size);
- show_modal(exclusive);
- _fix_size();
-
- Control *focusable = find_next_valid_focus();
- if (focusable)
- focusable->grab_focus();
-
- _post_popup();
- notification(NOTIFICATION_POST_POPUP);
- popped_up = true;
+ popup(rect);
}
void Popup::popup(const Rect2 &p_bounds) {
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index ac94ac63ec..28b124d143 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -519,9 +519,9 @@ void PopupMenu::_notification(int p_what) {
if (items[i].accel || (items[i].shortcut.is_valid() && items[i].shortcut->is_valid())) {
//accelerator
- String text = _get_accel_text(i);
- item_ofs.x = size.width - style->get_margin(MARGIN_RIGHT) - font->get_string_size(text).width;
- font->draw(ci, item_ofs + Point2(0, Math::floor((h - font_h) / 2.0)), text, i == mouse_over ? font_color_hover : font_color_accel);
+ String text2 = _get_accel_text(i);
+ item_ofs.x = size.width - style->get_margin(MARGIN_RIGHT) - font->get_string_size(text2).width;
+ font->draw(ci, item_ofs + Point2(0, Math::floor((h - font_h) / 2.0)), text2, i == mouse_over ? font_color_hover : font_color_accel);
}
items.write[i]._ofs_cache = ofs.y;
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp
index 2195ec9778..264eda4035 100644
--- a/scene/gui/progress_bar.cpp
+++ b/scene/gui/progress_bar.cpp
@@ -39,9 +39,12 @@ Size2 ProgressBar::get_minimum_size() const {
Size2 minimum_size = bg->get_minimum_size();
minimum_size.height = MAX(minimum_size.height, fg->get_minimum_size().height);
minimum_size.width = MAX(minimum_size.width, fg->get_minimum_size().width);
- //if (percent_visible) { this is needed, else the progressbar will collapse
- minimum_size.height = MAX(minimum_size.height, bg->get_minimum_size().height + font->get_height());
- //}
+ if (percent_visible) {
+ minimum_size.height = MAX(minimum_size.height, bg->get_minimum_size().height + font->get_height());
+ } else { // this is needed, else the progressbar will collapse
+ minimum_size.width = MAX(minimum_size.width, 1);
+ minimum_size.height = MAX(minimum_size.height, 1);
+ }
return minimum_size;
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 2e466fd582..8968923b2c 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -544,7 +544,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
Vector2 draw_ofs = Point2(wofs, y);
Color font_color_shadow = get_color("font_color_shadow");
bool use_outline = get_constant("shadow_as_outline");
- Point2 shadow_ofs(get_constant("shadow_offset_x"), get_constant("shadow_offset_y"));
+ Point2 shadow_ofs2(get_constant("shadow_offset_x"), get_constant("shadow_offset_y"));
if (p_mode == PROCESS_CACHE) {
@@ -568,7 +568,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
for (int i = 0; i < frame->lines.size(); i++) {
- _process_line(frame, Point2(), ly, available_width, i, PROCESS_CACHE, cfont, Color(), font_color_shadow, use_outline, shadow_ofs);
+ _process_line(frame, Point2(), ly, available_width, i, PROCESS_CACHE, cfont, Color(), font_color_shadow, use_outline, shadow_ofs2);
table->columns.write[column].min_width = MAX(table->columns[column].min_width, frame->lines[i].minimum_width);
table->columns.write[column].max_width = MAX(table->columns[column].max_width, frame->lines[i].maximum_width);
}
@@ -641,7 +641,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
for (int i = 0; i < frame->lines.size(); i++) {
int ly = 0;
- _process_line(frame, Point2(), ly, table->columns[column].width, i, PROCESS_CACHE, cfont, Color(), font_color_shadow, use_outline, shadow_ofs);
+ _process_line(frame, Point2(), ly, table->columns[column].width, i, PROCESS_CACHE, cfont, Color(), font_color_shadow, use_outline, shadow_ofs2);
frame->lines.write[i].height_cache = ly; //actual height
frame->lines.write[i].height_accum_cache = ly; //actual height
}
@@ -674,9 +674,9 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
if (visible) {
if (p_mode == PROCESS_DRAW) {
- nonblank_line_count += _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_DRAW, cfont, ccolor, font_color_shadow, use_outline, shadow_ofs);
+ nonblank_line_count += _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_DRAW, cfont, ccolor, font_color_shadow, use_outline, shadow_ofs2);
} else if (p_mode == PROCESS_POINTER) {
- _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_POINTER, cfont, ccolor, font_color_shadow, use_outline, shadow_ofs, p_click_pos, r_click_item, r_click_char, r_outside);
+ _process_line(frame, p_ofs + offset + draw_ofs + Vector2(0, yofs), ly, table->columns[column].width, i, PROCESS_POINTER, cfont, ccolor, font_color_shadow, use_outline, shadow_ofs2, p_click_pos, r_click_item, r_click_char, r_outside);
if (r_click_item && *r_click_item) {
RETURN; // exit early
}
@@ -900,21 +900,13 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item
Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const {
- if (!underline_meta || selection.click)
+ if (selection.click)
return CURSOR_ARROW;
if (main->first_invalid_line < main->lines.size())
return CURSOR_ARROW; //invalid
- int line = 0;
- Item *item = NULL;
-
- ((RichTextLabel *)(this))->_find_click(main, p_pos, &item, &line);
-
- if (item && ((RichTextLabel *)(this))->_find_meta(item, NULL))
- return CURSOR_POINTING_HAND;
-
- return CURSOR_ARROW;
+ return get_default_cursor_shape();
}
void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
@@ -1133,12 +1125,13 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
}
Variant meta;
- if (item && !outside && _find_meta(item, &meta)) {
- if (meta_hovering != item) {
+ ItemMeta *item_meta;
+ if (item && !outside && _find_meta(item, &meta, &item_meta)) {
+ if (meta_hovering != item_meta) {
if (meta_hovering) {
emit_signal("meta_hover_ended", current_meta);
}
- meta_hovering = static_cast<ItemMeta *>(item);
+ meta_hovering = item_meta;
current_meta = meta;
emit_signal("meta_hover_started", meta);
}
@@ -1269,7 +1262,7 @@ bool RichTextLabel::_find_strikethrough(Item *p_item) {
return false;
}
-bool RichTextLabel::_find_meta(Item *p_item, Variant *r_meta) {
+bool RichTextLabel::_find_meta(Item *p_item, Variant *r_meta, ItemMeta **r_item) {
Item *item = p_item;
@@ -1280,6 +1273,8 @@ bool RichTextLabel::_find_meta(Item *p_item, Variant *r_meta) {
ItemMeta *meta = static_cast<ItemMeta *>(item);
if (r_meta)
*r_meta = meta->meta;
+ if (r_item)
+ *r_item = meta;
return true;
}
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index bec2c5ac02..114c6103e2 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -285,7 +285,7 @@ private:
Color _find_color(Item *p_item, const Color &p_default_color);
bool _find_underline(Item *p_item);
bool _find_strikethrough(Item *p_item);
- bool _find_meta(Item *p_item, Variant *r_meta);
+ bool _find_meta(Item *p_item, Variant *r_meta, ItemMeta **r_item = NULL);
void _update_scroll();
void _scroll_changed(double);
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 28292309b9..e50a71b0ff 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -368,8 +368,10 @@ void ScrollContainer::update_scrollbars() {
Ref<StyleBox> sb = get_stylebox("bg");
size -= sb->get_minimum_size();
- Size2 hmin = h_scroll->get_combined_minimum_size();
- Size2 vmin = v_scroll->get_combined_minimum_size();
+ Size2 hmin;
+ Size2 vmin;
+ if (scroll_h) hmin = h_scroll->get_combined_minimum_size();
+ if (scroll_v) vmin = v_scroll->get_combined_minimum_size();
Size2 min = child_max_size;
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index d6a93238b2..e5d1844d39 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -164,34 +164,31 @@ void SplitContainer::_notification(int p_what) {
_resort();
} break;
- case NOTIFICATION_MOUSE_ENTER: {
-
- mouse_inside = true;
- update();
- } break;
case NOTIFICATION_MOUSE_EXIT: {
mouse_inside = false;
- update();
+ if (get_constant("autohide"))
+ update();
} break;
case NOTIFICATION_DRAW: {
if (!_getch(0) || !_getch(1))
return;
- if (collapsed || (!mouse_inside && get_constant("autohide")))
+ if (collapsed || (!dragging && !mouse_inside && get_constant("autohide")))
+ return;
+
+ if (dragger_visibility != DRAGGER_VISIBLE)
return;
int sep = dragger_visibility != DRAGGER_HIDDEN_COLLAPSED ? get_constant("separation") : 0;
Ref<Texture> tex = get_icon("grabber");
Size2 size = get_size();
- if (dragger_visibility == DRAGGER_VISIBLE) {
- if (vertical)
- draw_texture(tex, Point2i((size.x - tex->get_width()) / 2, middle_sep + (sep - tex->get_height()) / 2));
- else
- draw_texture(tex, Point2i(middle_sep + (sep - tex->get_width()) / 2, (size.y - tex->get_height()) / 2));
- }
+ if (vertical)
+ draw_texture(tex, Point2i((size.x - tex->get_width()) / 2, middle_sep + (sep - tex->get_height()) / 2));
+ else
+ draw_texture(tex, Point2i(middle_sep + (sep - tex->get_width()) / 2, (size.y - tex->get_height()) / 2));
} break;
case NOTIFICATION_THEME_CHANGED: {
@@ -241,7 +238,23 @@ void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid() && dragging) {
+ if (mm.is_valid()) {
+
+ bool mouse_inside_state = false;
+ if (vertical)
+ mouse_inside_state = mm->get_position().y > middle_sep && mm->get_position().y < middle_sep + get_constant("separation");
+ else
+ mouse_inside_state = mm->get_position().x > middle_sep && mm->get_position().x < middle_sep + get_constant("separation");
+
+ if (mouse_inside != mouse_inside_state) {
+
+ mouse_inside = mouse_inside_state;
+ if (get_constant("autohide"))
+ update();
+ }
+
+ if (!dragging)
+ return;
split_offset = drag_ofs + ((vertical ? mm->get_position().y : mm->get_position().x) - drag_from);
should_clamp_split_offset = true;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 09fbb39866..2bf2364873 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -666,7 +666,7 @@ void TextEdit::_notification(int p_what) {
bool brace_close_matching = false;
bool brace_close_mismatch = false;
- if (brace_matching_enabled) {
+ if (brace_matching_enabled && cursor.line >= 0 && cursor.line < text.size() && cursor.column >= 0) {
if (cursor.column < text[cursor.line].length()) {
//check for open
@@ -861,6 +861,9 @@ void TextEdit::_notification(int p_what) {
const String &str = wrap_rows[line_wrap_index];
int indent_px = line_wrap_index != 0 ? get_indent_level(line) * cache.font->get_char_size(' ').width : 0;
+ if (indent_px >= wrap_at) {
+ indent_px = 0;
+ }
if (line_wrap_index > 0)
last_wrap_column += wrap_rows[line_wrap_index - 1].length();
@@ -1381,8 +1384,8 @@ void TextEdit::_notification(int p_what) {
}
}
- Size2 size = Size2(max_w, sc * font->get_height() + spacing);
- Size2 minsize = size + sb->get_minimum_size();
+ Size2 size2 = Size2(max_w, sc * font->get_height() + spacing);
+ Size2 minsize = size2 + sb->get_minimum_size();
if (completion_hint_offset == -0xFFFF) {
completion_hint_offset = cursor_pos.x - offset;
@@ -1714,10 +1717,10 @@ void TextEdit::_get_mouse_pos(const Point2i &p_mouse, int &r_row, int &r_col) co
col = get_char_pos_for_line(colx, row, wrap_index);
if (is_wrap_enabled() && wrap_index < times_line_wraps(row)) {
// move back one if we are at the end of the row
- Vector<String> rows = get_wrap_rows_text(row);
+ Vector<String> rows2 = get_wrap_rows_text(row);
int row_end_col = 0;
for (int i = 0; i < wrap_index + 1; i++) {
- row_end_col += rows[i].length();
+ row_end_col += rows2[i].length();
}
if (col >= row_end_col)
col -= 1;
@@ -2202,10 +2205,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
bool had_selection = selection.active;
// stuff to do when selection is active..
- if (selection.active) {
-
- if (readonly)
- return;
+ if (!readonly && selection.active) {
bool clear = false;
bool unselect = false;
@@ -2645,24 +2645,26 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
case KEY_UP: {
- if (k->get_shift())
- _pre_shift_selection();
if (k->get_alt()) {
scancode_handled = false;
break;
}
#ifndef APPLE_STYLE_KEYS
if (k->get_command()) {
- _scroll_lines_up();
- break;
- }
#else
if (k->get_command() && k->get_alt()) {
+#endif
_scroll_lines_up();
break;
}
+ if (k->get_shift()) {
+ _pre_shift_selection();
+ }
+
+#ifdef APPLE_STYLE_KEYS
if (k->get_command()) {
+
cursor_set_line(0);
} else
#endif
@@ -2696,24 +2698,24 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
case KEY_DOWN: {
- if (k->get_shift())
- _pre_shift_selection();
if (k->get_alt()) {
scancode_handled = false;
break;
}
#ifndef APPLE_STYLE_KEYS
if (k->get_command()) {
- _scroll_lines_down();
- break;
- }
-
#else
if (k->get_command() && k->get_alt()) {
+#endif
_scroll_lines_down();
break;
}
+ if (k->get_shift()) {
+ _pre_shift_selection();
+ }
+
+#ifdef APPLE_STYLE_KEYS
if (k->get_command()) {
cursor_set_line(get_last_unhidden_line(), true, false, 9999);
} else
@@ -3373,20 +3375,20 @@ void TextEdit::_base_insert_text(int p_line, int p_char, const String &p_text, i
String preinsert_text = text[p_line].substr(0, p_char);
String postinsert_text = text[p_line].substr(p_char, text[p_line].size());
- for (int i = 0; i < substrings.size(); i++) {
+ for (int j = 0; j < substrings.size(); j++) {
//insert the substrings
- if (i == 0) {
+ if (j == 0) {
- text.set(p_line, preinsert_text + substrings[i]);
+ text.set(p_line, preinsert_text + substrings[j]);
} else {
- text.insert(p_line + i, substrings[i]);
+ text.insert(p_line + j, substrings[j]);
}
- if (i == substrings.size() - 1) {
+ if (j == substrings.size() - 1) {
- text.set(p_line + i, text[p_line + i] + postinsert_text);
+ text.set(p_line + j, text[p_line + j] + postinsert_text);
}
}
@@ -3789,6 +3791,9 @@ Vector<String> TextEdit::get_wrap_rows_text(int p_line) const {
int cur_wrap_index = 0;
int tab_offset_px = get_indent_level(p_line) * cache.font->get_char_size(' ').width;
+ if (tab_offset_px >= wrap_at) {
+ tab_offset_px = 0;
+ }
while (col < line_text.length()) {
CharType c = line_text[col];
@@ -3796,29 +3801,36 @@ Vector<String> TextEdit::get_wrap_rows_text(int p_line) const {
int indent_ofs = (cur_wrap_index != 0 ? tab_offset_px : 0);
- word_str += c;
- word_px += w;
- if (c == ' ') {
- // end of a word; add this word to the substring
+ if (indent_ofs + word_px + w > wrap_at) {
+ // not enough space to add this char; start next line
wrap_substring += word_str;
- px += word_px;
- word_str = "";
- word_px = 0;
- }
+ lines.push_back(wrap_substring);
+ cur_wrap_index++;
+ wrap_substring = "";
+ px = 0;
- if ((indent_ofs + px + word_px) > wrap_at) {
- // do not want to add this word
- if (indent_ofs + word_px > wrap_at) {
- // not enough space; add it anyway
+ word_str = "";
+ word_str += c;
+ word_px = w;
+ } else {
+ word_str += c;
+ word_px += w;
+ if (c == ' ') {
+ // end of a word; add this word to the substring
wrap_substring += word_str;
+ px += word_px;
word_str = "";
word_px = 0;
}
- lines.push_back(wrap_substring);
- // reset for next wrap
- cur_wrap_index++;
- wrap_substring = "";
- px = 0;
+
+ if (indent_ofs + px + word_px > wrap_at) {
+ // this word will be moved to the next line
+ lines.push_back(wrap_substring);
+ // reset for next wrap
+ cur_wrap_index++;
+ wrap_substring = "";
+ px = 0;
+ }
}
col++;
}
@@ -4031,6 +4043,9 @@ int TextEdit::get_char_pos_for_line(int p_px, int p_line, int p_wrap_index) cons
int line_wrap_amount = times_line_wraps(p_line);
int wrap_offset_px = get_indent_level(p_line) * cache.font->get_char_size(' ').width;
+ if (wrap_offset_px >= wrap_at) {
+ wrap_offset_px = 0;
+ }
if (p_wrap_index > line_wrap_amount)
p_wrap_index = line_wrap_amount;
if (p_wrap_index > 0)
@@ -4072,6 +4087,9 @@ int TextEdit::get_column_x_offset_for_line(int p_char, int p_line) const {
int px = get_column_x_offset(n_char, rows[wrap_index]);
int wrap_offset_px = get_indent_level(p_line) * cache.font->get_char_size(' ').width;
+ if (wrap_offset_px >= wrap_at) {
+ wrap_offset_px = 0;
+ }
if (wrap_index != 0)
px += wrap_offset_px;
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 95aab95253..19bef9fdf5 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -64,7 +64,9 @@ bool TextureButton::has_point(const Point2 &p_point) const {
Rect2 rect = Rect2();
Size2 mask_size = click_mask->get_size();
- if (_tile) {
+ if (_position_rect.no_area()) {
+ rect.size = mask_size;
+ } else if (_tile) {
// if the stretch mode is tile we offset the point to keep it inside the mask size
rect.size = mask_size;
if (_position_rect.has_point(point)) {
@@ -206,8 +208,8 @@ void TextureButton::_notification(int p_what) {
Size2 scaleSize(size.width / tex_size.width, size.height / tex_size.height);
float scale = scaleSize.width > scaleSize.height ? scaleSize.width : scaleSize.height;
Size2 scaledTexSize = tex_size * scale;
- Point2 ofs = ((scaledTexSize - size) / scale).abs() / 2.0f;
- _texture_region = Rect2(ofs, size / scale);
+ Point2 ofs2 = ((scaledTexSize - size) / scale).abs() / 2.0f;
+ _texture_region = Rect2(ofs2, size / scale);
} break;
}
}
@@ -216,6 +218,8 @@ void TextureButton::_notification(int p_what) {
draw_texture_rect(texdraw, _position_rect, _tile);
else
draw_texture_rect_region(texdraw, _position_rect, _texture_region);
+ } else {
+ _position_rect = Rect2();
}
if (has_focus() && focused.is_valid()) {
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h
index 4dc0de5358..d9224de686 100644
--- a/scene/gui/texture_button.h
+++ b/scene/gui/texture_button.h
@@ -32,7 +32,7 @@
#define TEXTURE_BUTTON_H
#include "scene/gui/base_button.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
class TextureButton : public BaseButton {
GDCLASS(TextureButton, BaseButton);
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 778d86d546..c534df5cbe 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -160,23 +160,27 @@ Point2 TextureProgress::unit_val_to_uv(float val) {
if (edge == 0) {
if (dir.x > 0)
continue;
- cp = -dir.x;
cq = -(edgeLeft - p.x);
+ dir.x *= 2.0 * cq;
+ cp = -dir.x;
} else if (edge == 1) {
if (dir.x < 0)
continue;
- cp = dir.x;
cq = (edgeRight - p.x);
+ dir.x *= 2.0 * cq;
+ cp = dir.x;
} else if (edge == 2) {
if (dir.y > 0)
continue;
- cp = -dir.y;
cq = -(edgeBottom - p.y);
+ dir.y *= 2.0 * cq;
+ cp = -dir.y;
} else if (edge == 3) {
if (dir.y < 0)
continue;
- cp = dir.y;
cq = (edgeTop - p.y);
+ dir.y *= 2.0 * cq;
+ cp = dir.y;
}
cr = cq / cp;
if (cr >= 0 && cr < t1)
@@ -247,12 +251,14 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F
middle_section_size *= MIN(1.0, (MAX(0.0, width_filled - first_section_size) / MAX(1.0, width_total - first_section_size - last_section_size)));
last_section_size = MAX(0.0, last_section_size - (width_total - width_filled));
+ first_section_size = MIN(first_section_size, width_filled);
width_texture = MIN(width_texture, first_section_size + middle_section_size + last_section_size);
switch (mode) {
case FILL_LEFT_TO_RIGHT: {
src_rect.size.x = width_texture;
dst_rect.size.x = width_filled;
+ topleft.x = first_section_size;
bottomright.x = last_section_size;
} break;
case FILL_RIGHT_TO_LEFT: {
@@ -261,11 +267,13 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F
dst_rect.position.x += width_total - width_filled;
dst_rect.size.x = width_filled;
topleft.x = last_section_size;
+ bottomright.x = first_section_size;
} break;
case FILL_TOP_TO_BOTTOM: {
src_rect.size.y = width_texture;
dst_rect.size.y = width_filled;
bottomright.y = last_section_size;
+ topleft.y = first_section_size;
} break;
case FILL_BOTTOM_TO_TOP: {
src_rect.position.y += src_rect.size.y - width_texture;
@@ -273,6 +281,7 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F
dst_rect.position.y += width_total - width_filled;
dst_rect.size.y = width_filled;
topleft.y = last_section_size;
+ bottomright.y = first_section_size;
} break;
case FILL_BILINEAR_LEFT_AND_RIGHT: {
// TODO: Implement
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 514be00227..49cad6fccf 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1071,11 +1071,11 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
int font_ascent = font->get_ascent();
int ofs = p_pos.x + ((p_item->disable_folding || hide_folding) ? cache.hseparation : cache.item_margin);
- int skip = 0;
+ int skip2 = 0;
for (int i = 0; i < columns.size(); i++) {
- if (skip) {
- skip--;
+ if (skip2) {
+ skip2--;
continue;
}
@@ -1102,7 +1102,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
while (i + plus < columns.size() && !p_item->cells[i + plus].editable && p_item->cells[i + plus].mode == TreeItem::CELL_MODE_STRING && p_item->cells[i + plus].text == "" && p_item->cells[i + plus].icon.is_null()) {
w += get_column_width(i + plus);
plus++;
- skip++;
+ skip2++;
}
}
@@ -1165,8 +1165,8 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
cache.selected->draw(ci, r);
}
if (text_editor->is_visible_in_tree()) {
- Vector2 ofs(0, (text_editor->get_size().height - r.size.height) / 2);
- text_editor->set_position(get_global_position() + r.position - ofs);
+ Vector2 ofs2(0, (text_editor->get_size().height - r.size.height) / 2);
+ text_editor->set_position(get_global_position() + r.position - ofs2);
}
}
@@ -1416,12 +1416,15 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
TreeItem *c = p_item->children;
+ int prev_ofs = children_pos.y - cache.offset.y + p_draw_ofs.y;
+
while (c) {
if (cache.draw_relationship_lines > 0 && (!hide_root || c->parent != root)) {
int root_ofs = children_pos.x + ((p_item->disable_folding || hide_folding) ? cache.hseparation : cache.item_margin);
int parent_ofs = p_pos.x + ((p_item->disable_folding || hide_folding) ? cache.hseparation : cache.item_margin);
Point2i root_pos = Point2i(root_ofs, children_pos.y + label_h / 2) - cache.offset + p_draw_ofs;
+
if (c->get_children() != NULL)
root_pos -= Point2i(cache.arrow->get_width(), 0);
@@ -1434,12 +1437,13 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
if (root_pos.y + line_width >= 0) {
VisualServer::get_singleton()->canvas_item_add_line(ci, root_pos, Point2i(parent_pos.x - Math::floor(line_width / 2), root_pos.y), cache.relationship_line_color, line_width);
- VisualServer::get_singleton()->canvas_item_add_line(ci, Point2i(parent_pos.x, root_pos.y), parent_pos, cache.relationship_line_color, line_width);
+ VisualServer::get_singleton()->canvas_item_add_line(ci, Point2i(parent_pos.x, root_pos.y), Point2i(parent_pos.x, prev_ofs), cache.relationship_line_color, line_width);
}
if (htotal < 0) {
return -1;
}
+ prev_ofs = root_pos.y;
}
if (htotal >= 0) {
@@ -1601,7 +1605,7 @@ void Tree::_range_click_timeout() {
mb.instance();
;
- propagate_mouse_activated = false; //done from outside, so signal handler cant clear the tree in the middle of emit(which is a common case)
+ propagate_mouse_activated = false; // done from outside, so signal handler can't clear the tree in the middle of emit (which is a common case)
blocked++;
propagate_mouse_event(pos + cache.offset, 0, 0, false, root, BUTTON_LEFT, mb);
blocked--;
@@ -2698,8 +2702,8 @@ bool Tree::edit_selected() {
popup_menu->clear();
for (int i = 0; i < c.text.get_slice_count(","); i++) {
- String s = c.text.get_slicec(',', i);
- popup_menu->add_item(s.get_slicec(':', 0), s.get_slicec(':', 1).empty() ? i : s.get_slicec(':', 1).to_int());
+ String s2 = c.text.get_slicec(',', i);
+ popup_menu->add_item(s2.get_slicec(':', 0), s2.get_slicec(':', 1).empty() ? i : s2.get_slicec(':', 1).to_int());
}
popup_menu->set_size(Size2(rect.size.width, 0));
@@ -2951,14 +2955,14 @@ void Tree::_notification(int p_what) {
if (show_column_titles) {
//title buttons
- int ofs = cache.bg->get_margin(MARGIN_LEFT);
+ int ofs2 = cache.bg->get_margin(MARGIN_LEFT);
for (int i = 0; i < columns.size(); i++) {
Ref<StyleBox> sb = (cache.click_type == Cache::CLICK_TITLE && cache.click_index == i) ? cache.title_button_pressed : ((cache.hover_type == Cache::CLICK_TITLE && cache.hover_index == i) ? cache.title_button_hover : cache.title_button);
Ref<Font> f = cache.tb_font;
- Rect2 tbrect = Rect2(ofs - cache.offset.x, bg->get_margin(MARGIN_TOP), get_column_width(i), tbh);
+ Rect2 tbrect = Rect2(ofs2 - cache.offset.x, bg->get_margin(MARGIN_TOP), get_column_width(i), tbh);
sb->draw(ci, tbrect);
- ofs += tbrect.size.width;
+ ofs2 += tbrect.size.width;
//text
int clip_w = tbrect.size.width - sb->get_minimum_size().width;
f->draw_halign(ci, tbrect.position + Point2i(sb->get_offset().x, (tbrect.size.height - f->get_height()) / 2 + f->get_ascent()), HALIGN_CENTER, clip_w, columns[i].title, cache.title_button_color);
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 6aa3891035..04d7107fa4 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1311,7 +1311,7 @@ Node *Node::_get_child_by_name(const StringName &p_name) const {
return NULL;
}
-Node *Node::_get_node(const NodePath &p_path) const {
+Node *Node::get_node_or_null(const NodePath &p_path) const {
if (!data.inside_tree && p_path.is_absolute()) {
ERR_EXPLAIN("Can't use get_node() with absolute paths from outside the active scene tree.");
@@ -1376,7 +1376,7 @@ Node *Node::_get_node(const NodePath &p_path) const {
Node *Node::get_node(const NodePath &p_path) const {
- Node *node = _get_node(p_path);
+ Node *node = get_node_or_null(p_path);
if (!node) {
ERR_EXPLAIN("Node not found: " + p_path);
ERR_FAIL_COND_V(!node, NULL);
@@ -1386,7 +1386,7 @@ Node *Node::get_node(const NodePath &p_path) const {
bool Node::has_node(const NodePath &p_path) const {
- return _get_node(p_path) != NULL;
+ return get_node_or_null(p_path) != NULL;
}
Node *Node::find_node(const String &p_mask, bool p_recursive, bool p_owned) const {
@@ -2709,6 +2709,7 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_child", "idx"), &Node::get_child);
ClassDB::bind_method(D_METHOD("has_node", "path"), &Node::has_node);
ClassDB::bind_method(D_METHOD("get_node", "path"), &Node::get_node);
+ ClassDB::bind_method(D_METHOD("get_node_or_null", "path"), &Node::get_node_or_null);
ClassDB::bind_method(D_METHOD("get_parent"), &Node::get_parent);
ClassDB::bind_method(D_METHOD("find_node", "mask", "recursive", "owned"), &Node::find_node, DEFVAL(true), DEFVAL(true));
ClassDB::bind_method(D_METHOD("find_parent", "mask"), &Node::find_parent);
diff --git a/scene/main/node.h b/scene/main/node.h
index 1c451ef567..e6189389cb 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -153,7 +153,6 @@ private:
void _print_tree_pretty(const String prefix, const bool last);
void _print_tree(const Node *p_node);
- Node *_get_node(const NodePath &p_path) const;
Node *_get_child_by_name(const StringName &p_name) const;
void _replace_connections_target(Node *p_new_target);
@@ -252,6 +251,7 @@ public:
Node *get_child(int p_index) const;
bool has_node(const NodePath &p_path) const;
Node *get_node(const NodePath &p_path) const;
+ Node *get_node_or_null(const NodePath &p_path) const;
Node *find_node(const String &p_mask, bool p_recursive = true, bool p_owned = true) const;
bool has_node_and_resource(const NodePath &p_path) const;
Node *get_node_and_resource(const NodePath &p_path, RES &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property = true) const;
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index f713851090..689f18a09d 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1154,13 +1154,14 @@ void SceneTree::_update_root_rect() {
float viewport_aspect = desired_res.aspect();
float video_mode_aspect = video_mode.aspect();
+ if (use_font_oversampling && stretch_aspect == STRETCH_ASPECT_IGNORE) {
+ WARN_PRINT("Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.");
+ }
+
if (stretch_aspect == STRETCH_ASPECT_IGNORE || ABS(viewport_aspect - video_mode_aspect) < CMP_EPSILON) {
//same aspect or ignore aspect
viewport_size = desired_res;
screen_size = video_mode;
- if (use_font_oversampling) {
- WARN_PRINT("Font oversampling only works with the following resize modes 'Keep Width', 'Keep Height', and 'Expand'.")
- }
} else if (viewport_aspect < video_mode_aspect) {
// screen ratio is smaller vertically
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 3a1ff5cb06..e15a64604d 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -43,7 +43,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-class SceneTree;
class PackedScene;
class Node;
class Viewport;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 61d6fc7401..a5d86c3e1a 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -37,8 +37,8 @@
#include "scene/3d/camera.h"
#include "scene/3d/collision_object.h"
#include "scene/3d/listener.h"
-#include "scene/3d/scenario_fx.h"
#include "scene/3d/spatial.h"
+#include "scene/3d/world_environment.h"
#include "scene/gui/control.h"
#include "scene/gui/label.h"
#include "scene/gui/menu_button.h"
@@ -232,16 +232,16 @@ void Viewport::update_worlds() {
find_world()->_update(get_tree()->get_frame());
}
-void Viewport::_collision_object_input_event(CollisionObject *p_object, Camera *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape, bool p_discard_empty_motion) {
+void Viewport::_collision_object_input_event(CollisionObject *p_object, Camera *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape) {
Transform object_transform = p_object->get_global_transform();
Transform camera_transform = p_camera->get_global_transform();
ObjectID id = p_object->get_instance_id();
- if (p_discard_empty_motion) {
- //avoid sending the event unnecesarily if nothing really changed in the context
+ //avoid sending the fake event unnecessarily if nothing really changed in the context
+ if (object_transform == physics_last_object_transform && camera_transform == physics_last_camera_transform && physics_last_id == id) {
Ref<InputEventMouseMotion> mm = p_input_event;
- if (mm.is_valid() && object_transform == physics_last_object_transform && camera_transform == physics_last_camera_transform && physics_last_id == id) {
+ if (mm.is_valid() && mm->get_device() == InputEvent::DEVICE_ID_INTERNAL) {
return; //discarded
}
}
@@ -251,31 +251,6 @@ void Viewport::_collision_object_input_event(CollisionObject *p_object, Camera *
physics_last_id = id;
}
-void Viewport::_test_new_mouseover(ObjectID new_collider) {
-#ifndef _3D_DISABLED
- if (new_collider != physics_object_over) {
-
- if (physics_object_over) {
-
- CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(physics_object_over));
- if (co) {
- co->_mouse_exit();
- }
- }
-
- if (new_collider) {
-
- CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(new_collider));
- if (co) {
- co->_mouse_enter();
- }
- }
-
- physics_object_over = new_collider;
- }
-#endif
-}
-
void Viewport::_notification(int p_what) {
switch (p_what) {
@@ -422,22 +397,22 @@ void Viewport::_notification(int p_what) {
PhysicsDirectSpaceState::RayResult result;
Physics2DDirectSpaceState *ss2d = Physics2DServer::get_singleton()->space_get_direct_state(find_world_2d()->get_space());
- bool discard_empty_motion = false;
-
- { // if no motion event exists, create a new one. This is necessary because objects or camera may have moved.
- // while this extra event is sent, it is checked if both camera and last object and last ID did not move. If nothing changed, the event is discarded to avoid flooding with unnecesary motion events every frame
- bool has_mouse_motion = false;
+ if (physics_has_last_mousepos) {
+ // if no mouse event exists, create a motion one. This is necessary because objects or camera may have moved.
+ // while this extra event is sent, it is checked if both camera and last object and last ID did not move. If nothing changed, the event is discarded to avoid flooding with unnecessary motion events every frame
+ bool has_mouse_event = false;
for (List<Ref<InputEvent> >::Element *E = physics_picking_events.front(); E; E = E->next()) {
- Ref<InputEventMouseMotion> mm = E->get();
- if (mm.is_valid()) {
- has_mouse_motion = true;
+ Ref<InputEventMouse> m = E->get();
+ if (m.is_valid()) {
+ has_mouse_event = true;
break;
}
}
- if (!has_mouse_motion && physics_has_last_mousepos) {
+ if (!has_mouse_event) {
Ref<InputEventMouseMotion> mm;
mm.instance();
+ mm->set_device(InputEvent::DEVICE_ID_INTERNAL);
mm->set_global_position(physics_last_mousepos);
mm->set_position(physics_last_mousepos);
mm->set_alt(physics_last_mouse_state.alt);
@@ -446,25 +421,24 @@ void Viewport::_notification(int p_what) {
mm->set_metakey(physics_last_mouse_state.meta);
mm->set_button_mask(physics_last_mouse_state.mouse_mask);
physics_picking_events.push_back(mm);
- discard_empty_motion = true;
}
}
- bool motion_tested = false;
-
while (physics_picking_events.size()) {
Ref<InputEvent> ev = physics_picking_events.front()->get();
physics_picking_events.pop_front();
Vector2 pos;
+ bool is_mouse = false;
Ref<InputEventMouseMotion> mm = ev;
if (mm.is_valid()) {
pos = mm->get_position();
- motion_tested = true;
+ is_mouse = true;
+
physics_has_last_mousepos = true;
physics_last_mousepos = pos;
physics_last_mouse_state.alt = mm->get_alt();
@@ -477,7 +451,12 @@ void Viewport::_notification(int p_what) {
Ref<InputEventMouseButton> mb = ev;
if (mb.is_valid()) {
+
pos = mb->get_position();
+ is_mouse = true;
+
+ physics_has_last_mousepos = true;
+ physics_last_mousepos = pos;
physics_last_mouse_state.alt = mb->get_alt();
physics_last_mouse_state.shift = mb->get_shift();
physics_last_mouse_state.control = mb->get_control();
@@ -487,6 +466,11 @@ void Viewport::_notification(int p_what) {
physics_last_mouse_state.mouse_mask |= (1 << (mb->get_button_index() - 1));
} else {
physics_last_mouse_state.mouse_mask &= ~(1 << (mb->get_button_index() - 1));
+
+ // If touch mouse raised, assume we don't know last mouse pos until new events come
+ if (mb->get_device() == InputEvent::DEVICE_ID_TOUCH_MOUSE) {
+ physics_has_last_mousepos = false;
+ }
}
}
@@ -539,40 +523,51 @@ void Viewport::_notification(int p_what) {
if (res[i].collider_id && res[i].collider) {
CollisionObject2D *co = Object::cast_to<CollisionObject2D>(res[i].collider);
if (co) {
-
- Map<ObjectID, uint64_t>::Element *E = physics_2d_mouseover.find(res[i].collider_id);
- if (!E) {
- E = physics_2d_mouseover.insert(res[i].collider_id, frame);
- co->_mouse_enter();
- } else {
- E->get() = frame;
+ bool send_event = true;
+ if (is_mouse) {
+ Map<ObjectID, uint64_t>::Element *F = physics_2d_mouseover.find(res[i].collider_id);
+
+ if (!F) {
+ F = physics_2d_mouseover.insert(res[i].collider_id, frame);
+ co->_mouse_enter();
+ } else {
+ F->get() = frame;
+ // It was already hovered, so don't send the event if it's faked
+ if (mm.is_valid() && mm->get_device() == InputEvent::DEVICE_ID_INTERNAL) {
+ send_event = false;
+ }
+ }
}
- co->_input_event(this, ev, res[i].shape);
+ if (send_event) {
+ co->_input_event(this, ev, res[i].shape);
+ }
}
}
}
}
- List<Map<ObjectID, uint64_t>::Element *> to_erase;
+ if (is_mouse) {
+ List<Map<ObjectID, uint64_t>::Element *> to_erase;
- for (Map<ObjectID, uint64_t>::Element *E = physics_2d_mouseover.front(); E; E = E->next()) {
- if (E->get() != frame) {
- Object *o = ObjectDB::get_instance(E->key());
- if (o) {
+ for (Map<ObjectID, uint64_t>::Element *E = physics_2d_mouseover.front(); E; E = E->next()) {
+ if (E->get() != frame) {
+ Object *o = ObjectDB::get_instance(E->key());
+ if (o) {
- CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o);
- if (co) {
- co->_mouse_exit();
+ CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o);
+ if (co) {
+ co->_mouse_exit();
+ }
}
+ to_erase.push_back(E);
}
- to_erase.push_back(E);
}
- }
- while (to_erase.size()) {
- physics_2d_mouseover.erase(to_erase.front()->get());
- to_erase.pop_front();
+ while (to_erase.size()) {
+ physics_2d_mouseover.erase(to_erase.front()->get());
+ to_erase.pop_front();
+ }
}
}
@@ -583,7 +578,7 @@ void Viewport::_notification(int p_what) {
CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(physics_object_capture));
if (co) {
- _collision_object_input_event(co, camera, ev, Vector3(), Vector3(), 0, discard_empty_motion);
+ _collision_object_input_event(co, camera, ev, Vector3(), Vector3(), 0);
captured = true;
if (mb.is_valid() && mb->get_button_index() == 1 && !mb->is_pressed()) {
physics_object_capture = 0;
@@ -601,7 +596,7 @@ void Viewport::_notification(int p_what) {
if (last_id) {
if (ObjectDB::get_instance(last_id) && last_object) {
//good, exists
- _collision_object_input_event(last_object, camera, ev, result.position, result.normal, result.shape, discard_empty_motion);
+ _collision_object_input_event(last_object, camera, ev, result.position, result.normal, result.shape);
if (last_object->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
physics_object_capture = last_id;
}
@@ -624,7 +619,7 @@ void Viewport::_notification(int p_what) {
CollisionObject *co = Object::cast_to<CollisionObject>(result.collider);
if (co) {
- _collision_object_input_event(co, camera, ev, result.position, result.normal, result.shape, discard_empty_motion);
+ _collision_object_input_event(co, camera, ev, result.position, result.normal, result.shape);
last_object = co;
last_id = result.collider_id;
new_collider = last_id;
@@ -634,35 +629,30 @@ void Viewport::_notification(int p_what) {
}
}
- if (mm.is_valid()) {
- _test_new_mouseover(new_collider);
- }
- }
+ if (is_mouse && new_collider != physics_object_over) {
- last_pos = pos;
- }
- }
- }
+ if (physics_object_over) {
- if (!motion_tested && camera && physics_has_last_mousepos) {
+ CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(physics_object_over));
+ if (co) {
+ co->_mouse_exit();
+ }
+ }
- //test anyway for mouseenter/exit because objects might move
- Vector3 from = camera->project_ray_origin(physics_last_mousepos);
- Vector3 dir = camera->project_ray_normal(physics_last_mousepos);
+ if (new_collider) {
- PhysicsDirectSpaceState *space = PhysicsServer::get_singleton()->space_get_direct_state(find_world()->get_space());
- if (space) {
+ CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(new_collider));
+ if (co) {
+ co->_mouse_enter();
+ }
+ }
- bool col = space->intersect_ray(from, from + dir * 10000, result, Set<RID>(), 0xFFFFFFFF, true, true, true);
- ObjectID new_collider = 0;
- if (col) {
- CollisionObject *co = Object::cast_to<CollisionObject>(result.collider);
- if (co) {
- new_collider = result.collider_id;
+ physics_object_over = new_collider;
+ }
}
- }
- _test_new_mouseover(new_collider);
+ last_pos = pos;
+ }
}
#endif
}
@@ -1486,7 +1476,8 @@ void Viewport::_gui_show_tooltip() {
gui.tooltip_popup->set_as_toplevel(true);
//gui.tooltip_popup->hide();
- Rect2 r(gui.tooltip_pos + Point2(10, 10), gui.tooltip_popup->get_minimum_size());
+ Point2 tooltip_offset = ProjectSettings::get_singleton()->get("display/mouse_cursor/tooltip_position_offset");
+ Rect2 r(gui.tooltip_pos + tooltip_offset, gui.tooltip_popup->get_minimum_size());
Rect2 vr = gui.tooltip_popup->get_viewport_rect();
if (r.size.x + r.position.x > vr.size.x)
r.position.x = vr.size.x - r.size.x;
@@ -1747,8 +1738,8 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
while (!gui.modal_stack.empty()) {
Control *top = gui.modal_stack.back()->get();
- Vector2 pos = top->get_global_transform_with_canvas().affine_inverse().xform(mpos);
- if (!top->has_point(pos)) {
+ Vector2 pos2 = top->get_global_transform_with_canvas().affine_inverse().xform(mpos);
+ if (!top->has_point(pos2)) {
if (top->data.modal_exclusive || top->data.modal_frame == Engine::get_singleton()->get_frames_drawn()) {
//cancel event, sorry, modal exclusive EATS UP ALL
@@ -1783,13 +1774,15 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
*/
gui.mouse_focus = _gui_find_control(pos);
- gui.mouse_focus_mask = 1 << (mb->get_button_index() - 1);
gui.last_mouse_focus = gui.mouse_focus;
if (!gui.mouse_focus) {
+ gui.mouse_focus_mask = 0;
return;
}
+ gui.mouse_focus_mask = 1 << (mb->get_button_index() - 1);
+
if (mb->get_button_index() == BUTTON_LEFT) {
gui.drag_accum = Vector2();
gui.drag_attempted = false;
@@ -2303,32 +2296,32 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (from && p_event->is_pressed()) {
Control *next = NULL;
- if (p_event->is_action("ui_focus_next")) {
+ if (p_event->is_action_pressed("ui_focus_next")) {
next = from->find_next_valid_focus();
}
- if (p_event->is_action("ui_focus_prev")) {
+ if (p_event->is_action_pressed("ui_focus_prev")) {
next = from->find_prev_valid_focus();
}
- if (!mods && p_event->is_action("ui_up")) {
+ if (!mods && p_event->is_action_pressed("ui_up")) {
next = from->_get_focus_neighbour(MARGIN_TOP);
}
- if (!mods && p_event->is_action("ui_left")) {
+ if (!mods && p_event->is_action_pressed("ui_left")) {
next = from->_get_focus_neighbour(MARGIN_LEFT);
}
- if (!mods && p_event->is_action("ui_right")) {
+ if (!mods && p_event->is_action_pressed("ui_right")) {
next = from->_get_focus_neighbour(MARGIN_RIGHT);
}
- if (!mods && p_event->is_action("ui_down")) {
+ if (!mods && p_event->is_action_pressed("ui_down")) {
next = from->_get_focus_neighbour(MARGIN_BOTTOM);
}
@@ -2496,6 +2489,9 @@ void Viewport::_gui_remove_control(Control *p_control) {
gui.mouse_focus = NULL;
gui.mouse_focus_mask = 0;
}
+ if (gui.last_mouse_focus == p_control) {
+ gui.last_mouse_focus = NULL;
+ }
if (gui.key_focus == p_control)
gui.key_focus = NULL;
if (gui.mouse_over == p_control)
@@ -2920,6 +2916,13 @@ bool Viewport::is_handling_input_locally() const {
return handle_input_locally;
}
+void Viewport::_validate_property(PropertyInfo &property) const {
+
+ if (VisualServer::get_singleton()->is_low_end() && property.name == "hdr") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+}
+
void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_arvr", "use"), &Viewport::set_use_arvr);
@@ -3199,6 +3202,8 @@ Viewport::Viewport() {
gui.drag_attempted = false;
gui.canvas_sort_index = 0;
gui.roots_order_dirty = false;
+ gui.mouse_focus = NULL;
+ gui.last_mouse_focus = NULL;
msaa = MSAA_DISABLED;
hdr = true;
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 4d0a4e8c87..831c285517 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -221,12 +221,11 @@ private:
} physics_last_mouse_state;
- void _collision_object_input_event(CollisionObject *p_object, Camera *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape, bool p_discard_empty_motion);
+ void _collision_object_input_event(CollisionObject *p_object, Camera *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape);
bool handle_input_locally;
bool local_input_handled;
- void _test_new_mouseover(ObjectID new_collider);
Map<ObjectID, uint64_t> physics_2d_mouseover;
Ref<World2D> world_2d;
@@ -390,6 +389,7 @@ private:
protected:
void _notification(int p_what);
static void _bind_methods();
+ virtual void _validate_property(PropertyInfo &property) const;
public:
Listener *get_listener() const;
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index a50a09f095..49c9c4c23c 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -48,7 +48,7 @@
#include "scene/2d/light_occluder_2d.h"
#include "scene/2d/line_2d.h"
#include "scene/2d/mesh_instance_2d.h"
-#include "scene/2d/navigation2d.h"
+#include "scene/2d/navigation_2d.h"
#include "scene/2d/parallax_background.h"
#include "scene/2d/parallax_layer.h"
#include "scene/2d/particles_2d.h"
@@ -58,10 +58,10 @@
#include "scene/2d/position_2d.h"
#include "scene/2d/ray_cast_2d.h"
#include "scene/2d/remote_transform_2d.h"
-#include "scene/2d/screen_button.h"
#include "scene/2d/skeleton_2d.h"
#include "scene/2d/sprite.h"
#include "scene/2d/tile_map.h"
+#include "scene/2d/touch_screen_button.h"
#include "scene/2d/visibility_notifier_2d.h"
#include "scene/2d/y_sort.h"
#include "scene/animation/animation_blend_space_1d.h"
@@ -73,7 +73,7 @@
#include "scene/animation/animation_tree_player.h"
#include "scene/animation/root_motion_view.h"
#include "scene/animation/tween.h"
-#include "scene/audio/audio_player.h"
+#include "scene/audio/audio_stream_player.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/center_container.h"
@@ -125,12 +125,11 @@
#include "scene/main/timer.h"
#include "scene/main/viewport.h"
#include "scene/resources/audio_stream_sample.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/box_shape.h"
#include "scene/resources/capsule_shape.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
-#include "scene/resources/color_ramp.h"
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape.h"
@@ -139,21 +138,23 @@
#include "scene/resources/default_theme/default_theme.h"
#include "scene/resources/dynamic_font.h"
#include "scene/resources/dynamic_font_stb.h"
+#include "scene/resources/gradient.h"
+#include "scene/resources/line_shape_2d.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
#include "scene/resources/mesh_data_tool.h"
#include "scene/resources/mesh_library.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/particles_material.h"
+#include "scene/resources/physics_material.h"
#include "scene/resources/plane_shape.h"
#include "scene/resources/polygon_path_finder.h"
#include "scene/resources/primitive_meshes.h"
#include "scene/resources/ray_shape.h"
#include "scene/resources/rectangle_shape_2d.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/shape_line_2d.h"
-#include "scene/resources/sky_box.h"
+#include "scene/resources/sky.h"
#include "scene/resources/sphere_shape.h"
#include "scene/resources/surface_tool.h"
#include "scene/resources/text_file.h"
@@ -166,8 +167,8 @@
#include "scene/resources/world_2d.h"
#include "scene/scene_string_names.h"
-#include "scene/3d/scenario_fx.h"
#include "scene/3d/spatial.h"
+#include "scene/3d/world_environment.h"
#ifndef _3D_DISABLED
#include "scene/3d/area.h"
@@ -207,7 +208,6 @@
#include "scene/3d/visibility_notifier.h"
#include "scene/animation/skeleton_ik.h"
#include "scene/resources/environment.h"
-#include "scene/resources/physics_material.h"
#endif
static Ref<ResourceFormatSaverText> resource_saver_text;
@@ -602,8 +602,8 @@ void register_scene_types() {
ClassDB::register_class<SpatialVelocityTracker>();
- ClassDB::register_class<PhysicsMaterial>();
#endif
+ ClassDB::register_class<PhysicsMaterial>();
ClassDB::register_class<World>();
ClassDB::register_class<Environment>();
ClassDB::register_class<World2D>();
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 3156e12c50..3eb16c544c 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "animation.h"
+#include "scene/scene_string_names.h"
#include "core/math/geometry.h"
@@ -268,19 +269,19 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
for (int i = 0; i < valcount; i++) {
- Dictionary d = clips[i];
- if (!d.has("start_offset"))
+ Dictionary d2 = clips[i];
+ if (!d2.has("start_offset"))
continue;
- if (!d.has("end_offset"))
+ if (!d2.has("end_offset"))
continue;
- if (!d.has("stream"))
+ if (!d2.has("stream"))
continue;
TKey<AudioKey> ak;
ak.time = rt[i];
- ak.value.start_offset = d["start_offset"];
- ak.value.end_offset = d["end_offset"];
- ak.value.stream = d["stream"];
+ ak.value.start_offset = d2["start_offset"];
+ ak.value.end_offset = d2["end_offset"];
+ ak.value.stream = d2["stream"];
ad->values.push_back(ak);
}
@@ -668,6 +669,7 @@ int Animation::add_track(TrackType p_type, int p_at_pos) {
}
}
emit_changed();
+ emit_signal(SceneStringNames::get_singleton()->tracks_changed);
return p_at_pos;
}
@@ -719,6 +721,7 @@ void Animation::remove_track(int p_track) {
memdelete(t);
tracks.remove(p_track);
emit_changed();
+ emit_signal(SceneStringNames::get_singleton()->tracks_changed);
}
int Animation::get_track_count() const {
@@ -737,6 +740,7 @@ void Animation::track_set_path(int p_track, const NodePath &p_path) {
ERR_FAIL_INDEX(p_track, tracks.size());
tracks[p_track]->path = p_path;
emit_changed();
+ emit_signal(SceneStringNames::get_singleton()->tracks_changed);
}
NodePath Animation::track_get_path(int p_track) const {
@@ -1410,6 +1414,8 @@ void Animation::track_set_key_value(int p_track, int p_key_idx, const Variant &p
} break;
}
+
+ emit_changed();
}
void Animation::track_set_key_transition(int p_track, int p_key_idx, float p_transition) {
@@ -1445,6 +1451,8 @@ void Animation::track_set_key_transition(int p_track, int p_key_idx, float p_tra
// they don't use transition
} break;
}
+
+ emit_changed();
}
template <class K>
@@ -1828,9 +1836,14 @@ Variant Animation::value_track_interpolate(int p_track, float p_time) const {
void Animation::_value_track_get_key_indices_in_range(const ValueTrack *vt, float from_time, float to_time, List<int> *p_indices) const {
if (from_time != length && to_time == length)
- to_time = length * 1.01; //include a little more if at the end
+ to_time = length * 1.001; //include a little more if at the end
int to = _find(vt->values, to_time);
+ if (to >= 0 && from_time == to_time && vt->values[to].time == from_time) {
+ //find exact (0 delta), return if found
+ p_indices->push_back(to);
+ return;
+ }
// can't really send the events == time, will be sent in the next frame.
// if event>=len then it will probably never be requested by the anim player.
@@ -1876,7 +1889,7 @@ void Animation::value_track_get_key_indices(int p_track, float p_time, float p_d
if (from_time > to_time) {
// handle loop by splitting
- _value_track_get_key_indices_in_range(vt, length - from_time, length, p_indices);
+ _value_track_get_key_indices_in_range(vt, from_time, length, p_indices);
_value_track_get_key_indices_in_range(vt, 0, to_time, p_indices);
return;
}
@@ -2554,6 +2567,7 @@ void Animation::track_move_up(int p_track) {
}
emit_changed();
+ emit_signal(SceneStringNames::get_singleton()->tracks_changed);
}
void Animation::track_set_imported(int p_track, bool p_imported) {
@@ -2588,6 +2602,7 @@ void Animation::track_move_down(int p_track) {
SWAP(tracks.write[p_track], tracks.write[p_track - 1]);
}
emit_changed();
+ emit_signal(SceneStringNames::get_singleton()->tracks_changed);
}
void Animation::track_swap(int p_track, int p_with_track) {
@@ -2598,6 +2613,7 @@ void Animation::track_swap(int p_track, int p_with_track) {
return;
SWAP(tracks.write[p_track], tracks.write[p_with_track]);
emit_changed();
+ emit_signal(SceneStringNames::get_singleton()->tracks_changed);
}
void Animation::set_step(float p_step) {
@@ -2716,6 +2732,8 @@ void Animation::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step");
+ ADD_SIGNAL(MethodInfo("tracks_changed"));
+
BIND_ENUM_CONSTANT(TYPE_VALUE);
BIND_ENUM_CONSTANT(TYPE_TRANSFORM);
BIND_ENUM_CONSTANT(TYPE_METHOD);
@@ -2740,6 +2758,8 @@ void Animation::clear() {
tracks.clear();
loop = false;
length = 1;
+ emit_changed();
+ emit_signal(SceneStringNames::get_singleton()->tracks_changed);
}
bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, const TKey<TransformKey> &t1, const TKey<TransformKey> &t2, float p_alowed_linear_err, float p_alowed_angular_err, float p_max_optimizable_angle, const Vector3 &p_norm) {
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index a89cf108bc..4b3e392013 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -515,10 +515,10 @@ PoolVector<uint8_t> AudioStreamSample::get_data() const {
return pv;
}
-void AudioStreamSample::save_to_wav(String p_path) {
+Error AudioStreamSample::save_to_wav(const String &p_path) {
if (format == AudioStreamSample::FORMAT_IMA_ADPCM) {
WARN_PRINTS("Saving IMA_ADPC samples are not supported yet");
- return;
+ return ERR_UNAVAILABLE;
}
int sub_chunk_2_size = data_bytes; //Subchunk2Size = Size of data in bytes
@@ -544,8 +544,9 @@ void AudioStreamSample::save_to_wav(String p_path) {
file_path += ".wav";
}
- Error err;
- FileAccess *file = FileAccess::open(file_path, FileAccess::WRITE, &err); //Overrides existing file if present
+ FileAccessRef file = FileAccess::open(file_path, FileAccess::WRITE); //Overrides existing file if present
+
+ ERR_FAIL_COND_V(!file, ERR_FILE_CANT_WRITE);
// Create WAV Header
file->store_string("RIFF"); //ChunkID
@@ -583,6 +584,8 @@ void AudioStreamSample::save_to_wav(String p_path) {
}
file->close();
+
+ return OK;
}
Ref<AudioStreamPlayback> AudioStreamSample::instance_playback() {
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index bd701ddd12..d4c5511f34 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -141,7 +141,7 @@ public:
void set_data(const PoolVector<uint8_t> &p_data);
PoolVector<uint8_t> get_data() const;
- void save_to_wav(String p_path);
+ Error save_to_wav(const String &p_path);
virtual Ref<AudioStreamPlayback> instance_playback();
virtual String get_stream_name() const;
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_map.cpp
index 0e2152f244..d2e4d28b44 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_map.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* bit_mask.cpp */
+/* bit_map.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "bit_mask.h"
+#include "bit_map.h"
#include "core/io/image_loader.h"
@@ -332,7 +332,7 @@ Vector<Vector2> BitMap::_march_square(const Rect2i &rect, const Point2i &start)
prevx = stepx;
prevy = stepy;
- ERR_FAIL_COND_V(count > width * height, _points);
+ ERR_FAIL_COND_V((int)count > width * height, _points);
} while (curx != startx || cury != starty);
return _points;
}
diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_map.h
index 4575064260..b3c86afd38 100644
--- a/scene/resources/bit_mask.h
+++ b/scene/resources/bit_map.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* bit_mask.h */
+/* bit_map.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef BIT_MASK_H
-#define BIT_MASK_H
+#ifndef BIT_MAP_H
+#define BIT_MAP_H
#include "core/image.h"
#include "core/io/resource_loader.h"
@@ -72,4 +72,4 @@ public:
BitMap();
};
-#endif // BIT_MASK_H
+#endif // BIT_MAP_H
diff --git a/scene/resources/bounds.cpp b/scene/resources/bounds.cpp
deleted file mode 100644
index e6fa5b818d..0000000000
--- a/scene/resources/bounds.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************/
-/* bounds.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "bounds.h"
-
-void Bounds::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("set_bsp_tree", "bsp_tree"), &Bounds::set_bsp_tree);
- ClassDB::bind_method(D_METHOD("get_bsp_tree"), &Bounds::get_bsp_tree);
-
- ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "bsp_tree"), "set_bsp_tree", "get_bsp_tree");
-}
-
-void Bounds::set_bsp_tree(const BSP_Tree &p_bsp_tree) {
-
- bsp_tree = p_bsp_tree;
-}
-
-BSP_Tree Bounds::get_bsp_tree() const {
-
- return bsp_tree;
-}
-
-Bounds::Bounds() {
-}
diff --git a/scene/resources/bounds.h b/scene/resources/bounds.h
deleted file mode 100644
index 9a1801f23d..0000000000
--- a/scene/resources/bounds.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************/
-/* bounds.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef BOUNDS_H
-#define BOUNDS_H
-
-#include "core/math/bsp_tree.h"
-#include "core/resource.h"
-
-class Bounds : public Resource {
-
- GDCLASS(Bounds, Resource);
- BSP_Tree bsp_tree;
-
-protected:
- static void _bind_methods();
-
-public:
- void set_bsp_tree(const BSP_Tree &p_bsp_tree);
- BSP_Tree get_bsp_tree() const;
-
- Bounds();
-};
-
-#endif // BOUNDS_H
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 7ed51a2f8f..c7a815d8a4 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -682,6 +682,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("tab_fg", "TabContainer", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2));
theme->set_stylebox("tab_bg", "TabContainer", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
+ theme->set_stylebox("tab_disabled", "TabContainer", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
theme->set_stylebox("panel", "TabContainer", tc_sb);
theme->set_icon("increment", "TabContainer", make_icon(scroll_button_right_png));
@@ -707,6 +708,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("tab_fg", "Tabs", sb_expand(make_stylebox(tab_current_png, 4, 3, 4, 1, 16, 3, 16, 2), 2, 2, 2, 2));
theme->set_stylebox("tab_bg", "Tabs", sb_expand(make_stylebox(tab_behind_png, 5, 4, 5, 1, 16, 5, 16, 2), 3, 3, 3, 3));
+ theme->set_stylebox("tab_disabled", "Tabs", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
theme->set_stylebox("panel", "Tabs", tc_sb);
theme->set_stylebox("button_pressed", "Tabs", make_stylebox(button_pressed_png, 4, 4, 4, 4));
theme->set_stylebox("button", "Tabs", make_stylebox(button_normal_png, 4, 4, 4, 4));
diff --git a/scene/resources/default_theme/tab_disabled.png b/scene/resources/default_theme/tab_disabled.png
new file mode 100644
index 0000000000..97157a58dd
--- /dev/null
+++ b/scene/resources/default_theme/tab_disabled.png
Binary files differ
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
index 353e7eddbe..2b251e5f81 100644
--- a/scene/resources/default_theme/theme_data.h
+++ b/scene/resources/default_theme/theme_data.h
@@ -71,7 +71,7 @@ static const unsigned char dropdown_png[] = {
};
static const unsigned char error_icon_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x20, 0x8, 0x4, 0x0, 0x0, 0x0, 0xd9, 0x73, 0xb2, 0x7f, 0x0, 0x0, 0x0, 0x36, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x36, 0x18, 0x5, 0xa3, 0x60, 0x14, 0xfc, 0x87, 0x40, 0x38, 0xb, 0x21, 0x6, 0x6, 0x18, 0x62, 0x98, 0x6, 0xa0, 0xb1, 0xfe, 0xe3, 0x67, 0xd1, 0xc2, 0x0, 0x10, 0xc4, 0xc5, 0x82, 0x91, 0x43, 0xc0, 0xb, 0xb8, 0x15, 0x63, 0x78, 0x6, 0x5, 0x8c, 0x82, 0x51, 0x30, 0xa, 0x0, 0x35, 0xa3, 0x4c, 0xb4, 0x7c, 0x8a, 0x7, 0x6, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x2, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x87, 0x8f, 0xcc, 0xbf, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe2, 0xb, 0xf, 0x0, 0x22, 0x18, 0xc, 0x35, 0xef, 0x18, 0x0, 0x0, 0x0, 0xe, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0x18, 0x5, 0xa3, 0x0, 0x1, 0x0, 0x2, 0x10, 0x0, 0x1, 0x14, 0xc2, 0xc0, 0x92, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char focus_png[] = {
@@ -386,6 +386,10 @@ static const unsigned char tab_current_png[] = {
0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x99, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x3d, 0x48, 0x5b, 0x58, 0x66, 0x5b, 0x57, 0x65, 0x57, 0x54, 0x62, 0x55, 0x53, 0x62, 0x4a, 0x46, 0x52, 0x46, 0x41, 0x4e, 0x45, 0x41, 0x4d, 0x55, 0x52, 0x60, 0x44, 0x41, 0x4c, 0x53, 0x50, 0x5e, 0x43, 0x40, 0x4b, 0x52, 0x4e, 0x5d, 0x41, 0x3e, 0x4a, 0x4f, 0x4d, 0x5a, 0x3f, 0x3d, 0x48, 0x4e, 0x4b, 0x59, 0x3e, 0x3c, 0x47, 0x4d, 0x4a, 0x58, 0x3d, 0x3b, 0x46, 0x4b, 0x49, 0x54, 0x3c, 0x3a, 0x44, 0x4b, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x3b, 0x39, 0x42, 0x3b, 0x38, 0x43, 0x3b, 0x38, 0x42, 0x3a, 0x37, 0x41, 0x39, 0x37, 0x41, 0x3a, 0x38, 0x41, 0x39, 0x36, 0x3f, 0x38, 0x36, 0x3f, 0x39, 0x36, 0x40, 0x38, 0x36, 0x40, 0x37, 0x35, 0x3e, 0x37, 0x34, 0x3e, 0x36, 0x35, 0x3d, 0xd7, 0x41, 0xa4, 0x19, 0x0, 0x0, 0x0, 0x11, 0x74, 0x52, 0x4e, 0x53, 0x4, 0xa, 0x11, 0x19, 0x1f, 0x22, 0x24, 0x15, 0x25, 0x34, 0x3f, 0x46, 0x47, 0x48, 0x77, 0xef, 0xef, 0xa3, 0x31, 0x6b, 0xc2, 0x0, 0x0, 0x0, 0x60, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x55, 0xca, 0x85, 0xd, 0xc0, 0x40, 0x14, 0xc3, 0x50, 0x27, 0xf7, 0xd5, 0xfd, 0xd7, 0x2d, 0xa6, 0x4c, 0x16, 0x3f, 0xb9, 0xd0, 0x11, 0x90, 0xa3, 0x52, 0x77, 0x49, 0x8e, 0x86, 0xd2, 0x26, 0x16, 0x7b, 0x59, 0x32, 0x68, 0x3, 0x37, 0x5d, 0xe0, 0x59, 0x3b, 0x74, 0x31, 0x67, 0x4b, 0x3b, 0xf, 0x71, 0xe5, 0xe8, 0xf, 0xec, 0xc0, 0x1f, 0x28, 0xf8, 0x2, 0x14, 0xf9, 0x42, 0xa8, 0xfc, 0x21, 0x3b, 0xe4, 0x1, 0x6f, 0x0, 0x18, 0x11, 0xac, 0x99, 0xc0, 0xe, 0x25, 0x22, 0x2d, 0x76, 0xc6, 0x13, 0x1a, 0x8, 0xac, 0x78, 0xfc, 0x1c, 0x70, 0x30, 0x2b, 0xba, 0xe9, 0x31, 0x70, 0xc1, 0x7f, 0x3b, 0x77, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
+static const unsigned char tab_disabled_png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x3, 0xa7, 0x7a, 0x54, 0x58, 0x74, 0x52, 0x61, 0x77, 0x20, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x65, 0x78, 0x69, 0x66, 0x0, 0x0, 0x78, 0xda, 0xcd, 0x96, 0x59, 0x92, 0xe3, 0x2a, 0x10, 0x45, 0xff, 0x59, 0x45, 0x2f, 0x81, 0xcc, 0x24, 0x19, 0x96, 0x83, 0x18, 0x22, 0x7a, 0x7, 0x6f, 0xf9, 0x7d, 0xc1, 0x48, 0x1e, 0xab, 0x5c, 0x65, 0xfb, 0xe3, 0x89, 0xb0, 0x40, 0x29, 0x48, 0xae, 0xee, 0x41, 0xc8, 0xa6, 0xfd, 0xf7, 0xb7, 0x9b, 0x3f, 0x38, 0x28, 0x45, 0x6f, 0x9c, 0x86, 0xe8, 0x93, 0xf7, 0x16, 0x87, 0x4b, 0x2e, 0x71, 0x46, 0x23, 0xda, 0xd3, 0x71, 0xaa, 0xc9, 0xba, 0x79, 0x5e, 0x17, 0x76, 0x6f, 0x5c, 0xc5, 0xcd, 0x71, 0x83, 0x11, 0x12, 0xd4, 0x72, 0xba, 0xf4, 0x6d, 0xf5, 0xcf, 0x88, 0xeb, 0x79, 0x40, 0x70, 0x2b, 0xbe, 0x5d, 0xc7, 0x4d, 0x28, 0x2b, 0x4f, 0x5c, 0x89, 0xe8, 0x48, 0x3c, 0xf, 0x19, 0x33, 0x8f, 0xf6, 0xea, 0x17, 0x57, 0x22, 0xe1, 0x53, 0x9c, 0xd6, 0xb5, 0x49, 0x6b, 0x5c, 0x76, 0x17, 0x8f, 0xb3, 0x7e, 0x5c, 0x56, 0xda, 0x95, 0xfc, 0xf6, 0xda, 0x5, 0x98, 0x51, 0x15, 0xf9, 0x84, 0xd, 0x37, 0x21, 0xb1, 0x38, 0xc7, 0x31, 0x8b, 0x40, 0x81, 0x24, 0xc9, 0x32, 0xda, 0x79, 0xde, 0x19, 0x91, 0x80, 0xb6, 0x43, 0x9d, 0x45, 0x84, 0x1e, 0x7b, 0x67, 0x8e, 0xe6, 0x8d, 0x79, 0x47, 0xeb, 0xc6, 0x3b, 0x9b, 0x57, 0x5c, 0xae, 0xad, 0x30, 0xd6, 0xaf, 0xe, 0xfe, 0xc6, 0xa3, 0x15, 0x27, 0xbd, 0x89, 0xcb, 0x31, 0xd, 0xdf, 0x52, 0xdb, 0x67, 0xbe, 0xba, 0x91, 0xcb, 0x31, 0xc5, 0x9d, 0x77, 0xbd, 0xd7, 0xd8, 0x7b, 0x3b, 0x3d, 0x5d, 0x76, 0x1e, 0x4e, 0x79, 0xb3, 0x1e, 0x6a, 0x7f, 0x94, 0xd9, 0x42, 0xc7, 0xd, 0x56, 0xca, 0x1c, 0xe6, 0x51, 0x2, 0x7e, 0x8a, 0x76, 0x98, 0x25, 0xa1, 0x44, 0x3c, 0x62, 0x1, 0xb1, 0xa, 0x9a, 0x1b, 0x4a, 0x31, 0x94, 0x88, 0xe1, 0x69, 0x27, 0x47, 0x95, 0x32, 0x75, 0x6a, 0xb3, 0x2e, 0x54, 0x20, 0xd1, 0x71, 0xe3, 0x80, 0x9a, 0xb9, 0xb0, 0xcc, 0x58, 0x94, 0xc0, 0x89, 0xcb, 0x84, 0xe2, 0x46, 0xa1, 0xce, 0x1, 0x78, 0xaa, 0x91, 0x8, 0x3e, 0x5, 0xd4, 0x4, 0x61, 0x3e, 0xb4, 0xd0, 0x9c, 0x37, 0xcd, 0xf9, 0xa, 0x45, 0xcc, 0x5c, 0x9, 0x3d, 0x99, 0x90, 0x8c, 0x30, 0xe2, 0xae, 0x98, 0x47, 0xc1, 0x57, 0xca, 0x91, 0xa8, 0xf7, 0xb1, 0x74, 0x89, 0x6c, 0x3c, 0xbc, 0x82, 0x2e, 0x1e, 0x6b, 0x1a, 0x32, 0x6, 0xb9, 0x71, 0x46, 0x2f, 0x0, 0xa1, 0xbe, 0x3c, 0xd5, 0xe9, 0xef, 0x2c, 0xe6, 0x62, 0xdd, 0xd8, 0xb, 0xb0, 0x2, 0x82, 0x3a, 0x6d, 0x8e, 0x78, 0xc0, 0x6c, 0xb7, 0x53, 0x8a, 0x4d, 0xe9, 0xbc, 0xb6, 0x64, 0x72, 0x16, 0xf4, 0x53, 0xeb, 0x8c, 0x3d, 0xbd, 0x1a, 0x14, 0xea, 0x4a, 0x0, 0x8b, 0x30, 0xb7, 0x42, 0xc, 0x9, 0x8, 0x58, 0x4f, 0xa2, 0xe4, 0xc9, 0x6, 0xe6, 0x40, 0x4, 0x1f, 0x23, 0xf8, 0x64, 0x28, 0x67, 0x71, 0xbc, 0x81, 0x0, 0xa9, 0x72, 0x25, 0xd3, 0xc1, 0x46, 0xc4, 0x3, 0x4e, 0xe4, 0x31, 0x37, 0xc6, 0x4, 0x9a, 0x7d, 0x59, 0xf9, 0x14, 0xc6, 0xd6, 0x2, 0x10, 0x2a, 0x1e, 0xaf, 0x4a, 0x1c, 0x2f, 0x10, 0x60, 0x39, 0xa7, 0x58, 0x3f, 0xc1, 0x45, 0xac, 0xa1, 0xac, 0xa2, 0xce, 0xa8, 0xaa, 0xd7, 0xa0, 0x51, 0x93, 0x66, 0x2f, 0xde, 0x79, 0xf5, 0xde, 0x7, 0x3f, 0xf6, 0xa8, 0x1c, 0x24, 0xb8, 0xa0, 0xc1, 0x87, 0x10, 0x62, 0x48, 0x21, 0x47, 0x89, 0x2e, 0x6a, 0xf4, 0x31, 0xc4, 0x18, 0x53, 0xcc, 0x89, 0x93, 0x60, 0xb, 0xd3, 0xe4, 0x53, 0x30, 0x29, 0xa6, 0x94, 0x72, 0xc6, 0xa4, 0x19, 0xa9, 0x33, 0x46, 0x67, 0xf4, 0xc8, 0x79, 0xe3, 0x4d, 0x36, 0xb7, 0xe9, 0xe6, 0xb7, 0xb0, 0xc5, 0x2d, 0x6d, 0xb9, 0x60, 0xf9, 0x14, 0x57, 0xb4, 0xf8, 0x12, 0x4a, 0x2c, 0xa9, 0xe4, 0xca, 0x55, 0x2a, 0x5e, 0xff, 0xea, 0x6b, 0x30, 0x35, 0xd6, 0x54, 0x73, 0xa3, 0x86, 0xa5, 0xd4, 0x5c, 0xd3, 0xe6, 0x5b, 0x68, 0xb1, 0xa5, 0x96, 0x3b, 0xd6, 0x5a, 0x97, 0xee, 0xba, 0x76, 0xdf, 0x43, 0x8f, 0x3d, 0xf5, 0x7c, 0x50, 0x5b, 0x54, 0xaf, 0xa9, 0xd1, 0xd, 0xb9, 0xef, 0xa9, 0xd1, 0xa2, 0x36, 0x88, 0xb9, 0xd9, 0x2f, 0x9c, 0xa9, 0x21, 0x1c, 0xc2, 0x9e, 0x82, 0xc6, 0x76, 0xa2, 0x83, 0x19, 0x88, 0xb1, 0x23, 0x10, 0xf, 0x83, 0x0, 0x16, 0x34, 0xf, 0x66, 0x36, 0x92, 0x73, 0x3c, 0xc8, 0xd, 0x66, 0x36, 0x31, 0x5e, 0xa, 0x65, 0x50, 0x23, 0x1d, 0x70, 0x2a, 0xd, 0x62, 0x20, 0xe8, 0x1a, 0xb1, 0x76, 0x3a, 0xd8, 0x9d, 0xc9, 0x7d, 0xcb, 0xcd, 0xa8, 0xfb, 0x15, 0x37, 0xfe, 0x8a, 0x9c, 0x19, 0xe8, 0x3e, 0x41, 0xce, 0xc, 0x74, 0x8b, 0xdc, 0x3d, 0xb7, 0x7, 0xd4, 0x6a, 0x9e, 0x5f, 0x14, 0x99, 0x80, 0xc6, 0x5b, 0x38, 0x3c, 0xb5, 0xd2, 0xb1, 0xb1, 0xa1, 0x43, 0x8b, 0x99, 0x63, 0x1e, 0xdf, 0xa4, 0x97, 0x6b, 0xf3, 0x6e, 0x82, 0xff, 0x59, 0xa2, 0x76, 0x98, 0x52, 0xcd, 0x96, 0x67, 0xd4, 0xe2, 0x7b, 0x78, 0x6a, 0xd8, 0xd7, 0x6a, 0x83, 0x5d, 0x64, 0x45, 0x84, 0x8e, 0x89, 0x9e, 0x4a, 0xe9, 0x9a, 0xf6, 0x51, 0x92, 0x67, 0xc, 0xd4, 0xe2, 0x2e, 0xcf, 0xfd, 0x52, 0xb, 0xf9, 0x35, 0x30, 0x1d, 0x1e, 0xe1, 0x3, 0xb4, 0xf2, 0x97, 0x94, 0x9f, 0x8a, 0x71, 0x37, 0x62, 0x3e, 0x48, 0xd, 0x42, 0xcc, 0xae, 0x24, 0xb7, 0xa7, 0x4a, 0xf8, 0x50, 0xd2, 0x3e, 0x8d, 0xbf, 0xda, 0xc3, 0x12, 0xb3, 0xf9, 0xa7, 0x4a, 0xe8, 0x91, 0x27, 0x9f, 0x51, 0x74, 0x1, 0x67, 0x5b, 0xc9, 0xcd, 0xd7, 0x4a, 0x5c, 0xff, 0xce, 0x93, 0xf7, 0x14, 0x5d, 0x78, 0x52, 0x6e, 0xee, 0x99, 0x7, 0x4a, 0xea, 0xfe, 0xd6, 0x44, 0x25, 0xa7, 0xe3, 0x6f, 0xeb, 0xf, 0x6a, 0xf3, 0x93, 0x8e, 0x14, 0xf6, 0x67, 0xeb, 0xc2, 0x5f, 0x2c, 0x73, 0x73, 0x88, 0xad, 0xb2, 0x6b, 0xca, 0x73, 0xb8, 0x8e, 0xff, 0xd0, 0x3f, 0xaf, 0xcd, 0x77, 0x1d, 0xb4, 0x9f, 0x2d, 0x79, 0xe6, 0xb7, 0xe9, 0x2e, 0xbf, 0x62, 0xc9, 0x5d, 0x6d, 0x9e, 0x58, 0xa2, 0x4f, 0x76, 0x0, 0xa9, 0xec, 0xf7, 0x6d, 0xe4, 0x25, 0x4b, 0xee, 0x6a, 0xf3, 0xd8, 0x92, 0xfa, 0x74, 0x33, 0x71, 0xe9, 0x7a, 0xb9, 0x9a, 0xcf, 0x6c, 0xfd, 0xa7, 0x44, 0x17, 0xeb, 0xf5, 0xf7, 0x4a, 0x2e, 0x13, 0xbd, 0xbd, 0xad, 0xd9, 0x99, 0xe8, 0x4d, 0x25, 0x9f, 0x50, 0x74, 0x65, 0x89, 0x79, 0x57, 0xc9, 0x3b, 0x8a, 0x1e, 0xc2, 0xd9, 0x15, 0x75, 0xfc, 0x61, 0x49, 0xe6, 0x1f, 0xbf, 0x1c, 0xa8, 0x52, 0x2b, 0xb1, 0xc9, 0xd4, 0x0, 0x0, 0x0, 0x2, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x87, 0x8f, 0xcc, 0xbf, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0x2e, 0x23, 0x0, 0x0, 0x2e, 0x23, 0x1, 0x78, 0xa5, 0x3f, 0x76, 0x0, 0x0, 0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe3, 0x2, 0xa, 0x13, 0x29, 0x21, 0x5f, 0x36, 0xe2, 0x14, 0x0, 0x0, 0x0, 0xaf, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x7d, 0x91, 0x41, 0xa, 0xc2, 0x40, 0x10, 0x4, 0x6b, 0x92, 0x61, 0x37, 0xb0, 0x87, 0xec, 0x39, 0x3e, 0xc6, 0x3f, 0xf8, 0x9a, 0x3c, 0xc1, 0xd7, 0xf8, 0x3, 0xf, 0x3e, 0xc6, 0xab, 0x44, 0x50, 0x30, 0x26, 0x66, 0x3c, 0x2c, 0x6, 0x3, 0xd9, 0xf4, 0x69, 0xa0, 0xab, 0x9b, 0x86, 0x11, 0x14, 0x87, 0xa7, 0xc2, 0x51, 0x52, 0x90, 0x34, 0xf1, 0xe1, 0xcd, 0x8b, 0x9e, 0xb7, 0xe2, 0x8, 0x44, 0x6a, 0x2, 0x1e, 0x41, 0x0, 0xc3, 0xe8, 0x79, 0x72, 0xa7, 0x3, 0xc5, 0x13, 0xf7, 0x87, 0x5d, 0x3b, 0x46, 0x16, 0xd2, 0xee, 0x7a, 0xbc, 0x9c, 0x18, 0x95, 0x8a, 0xba, 0x69, 0x6f, 0x71, 0xc4, 0xfe, 0x6c, 0x41, 0x63, 0xd3, 0x72, 0xe6, 0xa1, 0x38, 0xc2, 0x10, 0x87, 0x65, 0x1c, 0x63, 0x60, 0x88, 0x4, 0x9c, 0x52, 0xe2, 0xa7, 0x45, 0x9a, 0x79, 0x29, 0x9e, 0x52, 0x29, 0x10, 0x63, 0x5a, 0x1, 0xc, 0x84, 0x42, 0x1, 0xc9, 0x36, 0x8, 0x68, 0x3a, 0x33, 0x0, 0x9, 0x30, 0x5b, 0x5, 0xc, 0x6c, 0x6e, 0x98, 0x36, 0x1b, 0x24, 0xdb, 0xf0, 0xdb, 0xc0, 0x2a, 0x90, 0x54, 0x6c, 0xba, 0x96, 0x0, 0xc9, 0x2, 0xc2, 0xfc, 0xe0, 0xac, 0xbe, 0xe, 0x38, 0x38, 0x83, 0xbf, 0x35, 0x30, 0x94, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
static const unsigned char tab_menu_png[] = {
0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x36, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x40, 0x5, 0xa3, 0xe0, 0xc1, 0x7f, 0x54, 0x48, 0x3, 0x5, 0xf, 0xe3, 0x1e, 0x7c, 0x81, 0x4b, 0x7f, 0x7b, 0x98, 0x86, 0xc5, 0x15, 0xf7, 0x35, 0xee, 0x5f, 0x2, 0x4b, 0x5f, 0x7f, 0xac, 0x8b, 0xc3, 0xa1, 0x2f, 0xb8, 0x1f, 0xce, 0x7f, 0x38, 0xff, 0x5, 0x37, 0x75, 0xbd, 0xf, 0x0, 0x52, 0xd4, 0x48, 0xb8, 0x2d, 0x78, 0x5a, 0x91, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index 39e81ca43d..887c7b42c8 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -54,8 +54,9 @@ public:
struct {
uint32_t size : 16;
uint32_t outline_size : 8;
- bool mipmaps : 1;
- bool filter : 1;
+ uint32_t mipmaps : 1;
+ uint32_t filter : 1;
+ uint32_t unused : 6;
};
uint32_t key;
};
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index a57b7bbb42..17609ed505 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -303,7 +303,7 @@ Ref<Texture> Environment::get_adjustment_color_correction() const {
void Environment::_validate_property(PropertyInfo &property) const {
- if (property.name == "background_sky" || property.name == "background_sky_custom_fov" || property.name == "background_sky_orientation" || property.name == "ambient_light/sky_contribution") {
+ if (property.name == "background_sky" || property.name == "background_sky_custom_fov" || property.name == "background_sky_orientation" || property.name == "background_sky_rotation" || property.name == "background_sky_rotation_degrees" || property.name == "ambient_light/sky_contribution") {
if (bg_mode != BG_SKY && bg_mode != BG_COLOR_SKY) {
property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
}
@@ -1291,7 +1291,14 @@ void Environment::_bind_methods() {
BIND_ENUM_CONSTANT(SSAO_QUALITY_HIGH);
}
-Environment::Environment() {
+Environment::Environment() :
+ bg_mode(BG_CLEAR_COLOR),
+ tone_mapper(TONE_MAPPER_LINEAR),
+ ssao_blur(SSAO_BLUR_DISABLED),
+ ssao_quality(SSAO_QUALITY_LOW),
+ glow_blend_mode(GLOW_BLEND_MODE_ADDITIVE),
+ dof_blur_far_quality(DOF_BLUR_QUALITY_LOW),
+ dof_blur_near_quality(DOF_BLUR_QUALITY_LOW) {
environment = VS::get_singleton()->environment_create();
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 666112b473..a54f13a88f 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -32,7 +32,7 @@
#define ENVIRONMENT_H
#include "core/resource.h"
-#include "scene/resources/sky_box.h"
+#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/color_ramp.cpp b/scene/resources/gradient.cpp
index 845a1474a4..99ce8ef821 100644
--- a/scene/resources/color_ramp.cpp
+++ b/scene/resources/gradient.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* color_ramp.cpp */
+/* gradient.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "color_ramp.h"
+#include "gradient.h"
+
#include "core/core_string_names.h"
//setter and getter names for property serialization
diff --git a/scene/resources/color_ramp.h b/scene/resources/gradient.h
index 7a96bb429b..a51a0ca0d0 100644
--- a/scene/resources/color_ramp.h
+++ b/scene/resources/gradient.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* color_ramp.h */
+/* gradient.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SCENE_RESOURCES_COLOR_RAMP_H_
-#define SCENE_RESOURCES_COLOR_RAMP_H_
+#ifndef GRADIENT_H
+#define GRADIENT_H
#include "core/resource.h"
@@ -126,4 +126,4 @@ public:
int get_points_count() const;
};
-#endif /* SCENE_RESOURCES_COLOR_RAMP_H_ */
+#endif // GRADIENT_H
diff --git a/scene/resources/shape_line_2d.cpp b/scene/resources/line_shape_2d.cpp
index 4ca535658f..f5d5fb561a 100644
--- a/scene/resources/shape_line_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* shape_line_2d.cpp */
+/* line_shape_2d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "shape_line_2d.h"
+#include "line_shape_2d.h"
+
#include "servers/physics_2d_server.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/shape_line_2d.h b/scene/resources/line_shape_2d.h
index dd3dbe3a43..f684862025 100644
--- a/scene/resources/shape_line_2d.h
+++ b/scene/resources/line_shape_2d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* shape_line_2d.h */
+/* line_shape_2d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SHAPE_LINE_2D_H
-#define SHAPE_LINE_2D_H
+#ifndef LINE_SHAPE_2D_H
+#define LINE_SHAPE_2D_H
#include "scene/resources/shape_2d.h"
@@ -59,4 +59,4 @@ public:
LineShape2D();
};
-#endif // SHAPE_LINE_2D_H
+#endif // LINE_SHAPE_2D_H
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 5ffaf41581..536eb11a27 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -113,6 +113,9 @@ bool ShaderMaterial::_set(const StringName &p_name, const Variant &p_value) {
if (n.find("param/") == 0) { //backwards compatibility
pr = n.substr(6, n.length());
}
+ if (n.find("shader_param/") == 0) { //backwards compatibility
+ pr = n.replace_first("shader_param/", "");
+ }
}
if (pr) {
VisualServer::get_singleton()->material_set_param(_get_material(), pr, p_value);
@@ -128,6 +131,16 @@ bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const {
if (shader.is_valid()) {
StringName pr = shader->remap_param(p_name);
+ if (!pr) {
+ String n = p_name;
+ if (n.find("param/") == 0) { //backwards compatibility
+ pr = n.substr(6, n.length());
+ }
+ if (n.find("shader_param/") == 0) { //backwards compatibility
+ pr = n.replace_first("shader_param/", "");
+ }
+ }
+
if (pr) {
r_ret = VisualServer::get_singleton()->material_get_param(_get_material(), pr);
return true;
@@ -594,17 +607,17 @@ void SpatialMaterial::_update_shader() {
code += "\tMODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat4(CAMERA_MATRIX[0],CAMERA_MATRIX[1],CAMERA_MATRIX[2],WORLD_MATRIX[3]);\n";
if (flags[FLAG_BILLBOARD_KEEP_SCALE]) {
- code += "\tMODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(WORLD_MATRIX[0].xyz),0,0,0),vec4(0,length(WORLD_MATRIX[1].xyz),0,0),vec4(0,0,length(WORLD_MATRIX[2].xyz),0),vec4(0,0,0,1));\n";
+ code += "\tMODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(WORLD_MATRIX[0].xyz), 0.0, 0.0, 0.0),vec4(0.0, length(WORLD_MATRIX[1].xyz), 0.0, 0.0),vec4(0.0, 0.0, length(WORLD_MATRIX[2].xyz), 0.0),vec4(0.0, 0.0, 0.0, 1.0));\n";
}
} break;
case BILLBOARD_FIXED_Y: {
- code += "\tMODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat4(CAMERA_MATRIX[0],WORLD_MATRIX[1],vec4(normalize(cross(CAMERA_MATRIX[0].xyz,WORLD_MATRIX[1].xyz)),0.0),WORLD_MATRIX[3]);\n";
+ code += "\tMODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat4(CAMERA_MATRIX[0],WORLD_MATRIX[1],vec4(normalize(cross(CAMERA_MATRIX[0].xyz,WORLD_MATRIX[1].xyz)), 0.0),WORLD_MATRIX[3]);\n";
if (flags[FLAG_BILLBOARD_KEEP_SCALE]) {
- code += "\tMODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(WORLD_MATRIX[0].xyz),0,0,0),vec4(0,1,0,0),vec4(0,0,length(WORLD_MATRIX[2].xyz),0),vec4(0,0,0,1));\n";
+ code += "\tMODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(WORLD_MATRIX[0].xyz), 0.0, 0.0, 0.0),vec4(0.0, 1.0, 0.0, 0.0),vec4(0.0, 0.0, length(WORLD_MATRIX[2].xyz), 0.0), vec4(0.0, 0.0, 0.0, 1.0));\n";
} else {
- code += "\tMODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(1,0,0,0),vec4(0,1.0/length(WORLD_MATRIX[1].xyz),0,0),vec4(0,0,1,0),vec4(0,0,0,1));\n";
+ code += "\tMODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(1.0, 0.0, 0.0, 0.0),vec4(0.0, 1.0/length(WORLD_MATRIX[1].xyz), 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0),vec4(0.0, 0.0, 0.0 ,1.0));\n";
}
} break;
case BILLBOARD_PARTICLES: {
@@ -612,16 +625,22 @@ void SpatialMaterial::_update_shader() {
//make billboard
code += "\tmat4 mat_world = mat4(normalize(CAMERA_MATRIX[0])*length(WORLD_MATRIX[0]),normalize(CAMERA_MATRIX[1])*length(WORLD_MATRIX[0]),normalize(CAMERA_MATRIX[2])*length(WORLD_MATRIX[2]),WORLD_MATRIX[3]);\n";
//rotate by rotation
- code += "\tmat_world = mat_world * mat4( vec4(cos(INSTANCE_CUSTOM.x),-sin(INSTANCE_CUSTOM.x),0.0,0.0), vec4(sin(INSTANCE_CUSTOM.x),cos(INSTANCE_CUSTOM.x),0.0,0.0),vec4(0.0,0.0,1.0,0.0),vec4(0.0,0.0,0.0,1.0));\n";
+ code += "\tmat_world = mat_world * mat4( vec4(cos(INSTANCE_CUSTOM.x),-sin(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(sin(INSTANCE_CUSTOM.x), cos(INSTANCE_CUSTOM.x), 0.0, 0.0),vec4(0.0, 0.0, 1.0, 0.0),vec4(0.0, 0.0, 0.0, 1.0));\n";
//set modelview
code += "\tMODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat_world;\n";
//handle animation
+ code += "\tfloat h_frames = float(particles_anim_h_frames);\n";
+ code += "\tfloat v_frames = float(particles_anim_v_frames);\n";
code += "\tfloat particle_total_frames = float(particles_anim_h_frames * particles_anim_v_frames);\n";
code += "\tfloat particle_frame = floor(INSTANCE_CUSTOM.z * float(particle_total_frames));\n";
- code += "\tif (!particles_anim_loop) particle_frame=clamp(particle_frame,0.0,particle_total_frames-1.0); else particle_frame=mod(particle_frame,float(particle_total_frames));\n";
- code += "\tUV /= vec2(float(particles_anim_h_frames),float(particles_anim_v_frames));\n";
- code += "\tUV += vec2(mod(particle_frame,float(particles_anim_h_frames)) / float(particles_anim_h_frames), floor(particle_frame / float(particles_anim_h_frames)) / float(particles_anim_v_frames));\n";
+ code += "\tif (!particles_anim_loop) {\n";
+ code += "\t\tparticle_frame = clamp(particle_frame, 0.0, particle_total_frames - 1.0);\n";
+ code += "\t} else {\n";
+ code += "\t\tparticle_frame = mod(particle_frame, particle_total_frames);\n";
+ code += "\t}";
+ code += "\tUV /= vec2(h_frames, v_frames);\n";
+ code += "\tUV += vec2(mod(particle_frame, h_frames) / h_frames, floor(particle_frame / h_frames) / v_frames);\n";
} break;
}
@@ -702,7 +721,7 @@ void SpatialMaterial::_update_shader() {
code += "\tvec2 base_uv2 = UV2;\n";
}
- if (features[FEATURE_DEPTH_MAPPING] && !flags[FLAG_UV1_USE_TRIPLANAR]) { //depthmap not supported with triplanar
+ if (!VisualServer::get_singleton()->is_low_end() && features[FEATURE_DEPTH_MAPPING] && !flags[FLAG_UV1_USE_TRIPLANAR]) { //depthmap not supported with triplanar
code += "\t{\n";
code += "\t\tvec3 view_dir = normalize(normalize(-VERTEX)*mat3(TANGENT*depth_flip.x,-BINORMAL*depth_flip.y,NORMAL));\n"; // binormal is negative due to mikktspace, flip 'unflips' it ;-)
@@ -824,7 +843,7 @@ void SpatialMaterial::_update_shader() {
code += "\tALPHA = albedo.a * albedo_tex.a;\n";
}
- if (!VisualServer::get_singleton()->is_low_end() && proximity_fade_enabled) {
+ if (proximity_fade_enabled) {
code += "\tfloat depth_tex = textureLod(DEPTH_TEXTURE,SCREEN_UV,0.0).r;\n";
code += "\tvec4 world_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV*2.0-1.0,depth_tex*2.0-1.0,1.0);\n";
code += "\tworld_pos.xyz/=world_pos.w;\n";
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 805d30245a..85018f38d7 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -84,15 +84,15 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
PoolVector<int> indices = a[ARRAY_INDEX];
PoolVector<int>::Read ir = indices.read();
- for (int i = 0; i < ic; i++) {
- int index = ir[i];
+ for (int j = 0; j < ic; j++) {
+ int index = ir[j];
facesw[widx++] = vr[index];
}
} else {
- for (int i = 0; i < vc; i++)
- facesw[widx++] = vr[i];
+ for (int j = 0; j < vc; j++)
+ facesw[widx++] = vr[j];
}
}
@@ -787,7 +787,6 @@ void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &
Surface s;
VisualServer::get_singleton()->mesh_add_surface_from_arrays(mesh, (VisualServer::PrimitiveType)p_primitive, p_arrays, p_blend_shapes, p_flags);
- surfaces.push_back(s);
/* make aABB? */ {
@@ -808,8 +807,9 @@ void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &
aabb.expand_to(vtx[i]);
}
- surfaces.write[surfaces.size() - 1].aabb = aabb;
- surfaces.write[surfaces.size() - 1].is_2d = arr.get_type() == Variant::POOL_VECTOR2_ARRAY;
+ s.aabb = aabb;
+ s.is_2d = arr.get_type() == Variant::POOL_VECTOR2_ARRAY;
+ surfaces.push_back(s);
_recompute_aabb();
}
@@ -1028,34 +1028,6 @@ AABB ArrayMesh::get_custom_aabb() const {
return custom_aabb;
}
-void ArrayMesh::center_geometry() {
-
- /*
- Vector3 ofs = aabb.pos+aabb.size*0.5;
-
- for(int i=0;i<get_surface_count();i++) {
-
- PoolVector<Vector3> geom = surface_get_array(i,ARRAY_VERTEX);
- int gc =geom.size();
- PoolVector<Vector3>::Write w = geom.write();
- surfaces[i].aabb.pos-=ofs;
-
- for(int i=0;i<gc;i++) {
-
- w[i]-=ofs;
- }
-
- w = PoolVector<Vector3>::Write();
-
- surface_set_array(i,ARRAY_VERTEX,geom);
-
- }
-
- aabb.pos-=ofs;
-
-*/
-}
-
void ArrayMesh::regen_normalmaps() {
Vector<Ref<SurfaceTool> > surfs;
@@ -1295,8 +1267,6 @@ void ArrayMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_trimesh_shape"), &ArrayMesh::create_trimesh_shape);
ClassDB::bind_method(D_METHOD("create_convex_shape"), &ArrayMesh::create_convex_shape);
ClassDB::bind_method(D_METHOD("create_outline", "margin"), &ArrayMesh::create_outline);
- ClassDB::bind_method(D_METHOD("center_geometry"), &ArrayMesh::center_geometry);
- ClassDB::set_method_flags(get_class_static(), _scs_create("center_geometry"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
ClassDB::bind_method(D_METHOD("regen_normalmaps"), &ArrayMesh::regen_normalmaps);
ClassDB::set_method_flags(get_class_static(), _scs_create("regen_normalmaps"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
ClassDB::bind_method(D_METHOD("lightmap_unwrap", "transform", "texel_size"), &ArrayMesh::lightmap_unwrap);
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index 2d0aef8ab0..dabfc6ea60 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -223,7 +223,6 @@ public:
AABB get_aabb() const;
virtual RID get_rid() const;
- void center_geometry();
void regen_normalmaps();
Error lightmap_unwrap(const Transform &p_base_transform = Transform(), float p_texel_size = 0.05);
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index c5125d576d..d40a5dee2e 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -56,6 +56,8 @@ bool MeshLibrary::_set(const StringName &p_name, const Variant &p_value) {
set_item_preview(idx, p_value);
else if (what == "navmesh")
set_item_navmesh(idx, p_value);
+ else if (what == "navmesh_transform")
+ set_item_navmesh_transform(idx, p_value);
else
return false;
@@ -80,6 +82,8 @@ bool MeshLibrary::_get(const StringName &p_name, Variant &r_ret) const {
r_ret = _get_item_shapes(idx);
else if (what == "navmesh")
r_ret = get_item_navmesh(idx);
+ else if (what == "navmesh_transform")
+ r_ret = get_item_navmesh_transform(idx);
else if (what == "preview")
r_ret = get_item_preview(idx);
else
@@ -95,8 +99,10 @@ void MeshLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
String name = "item/" + itos(E->key()) + "/";
p_list->push_back(PropertyInfo(Variant::STRING, name + "name"));
p_list->push_back(PropertyInfo(Variant::OBJECT, name + "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh"));
+ p_list->push_back(PropertyInfo(Variant::TRANSFORM, name + "mesh_transform"));
p_list->push_back(PropertyInfo(Variant::ARRAY, name + "shapes"));
p_list->push_back(PropertyInfo(Variant::OBJECT, name + "navmesh", PROPERTY_HINT_RESOURCE_TYPE, "NavigationMesh"));
+ p_list->push_back(PropertyInfo(Variant::TRANSFORM, name + "navmesh_transform"));
p_list->push_back(PropertyInfo(Variant::OBJECT, name + "preview", PROPERTY_HINT_RESOURCE_TYPE, "Texture", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_HELPER));
}
}
@@ -116,6 +122,7 @@ void MeshLibrary::set_item_name(int p_item, const String &p_name) {
emit_changed();
_change_notify();
}
+
void MeshLibrary::set_item_mesh(int p_item, const Ref<Mesh> &p_mesh) {
ERR_FAIL_COND(!item_map.has(p_item));
@@ -145,6 +152,15 @@ void MeshLibrary::set_item_navmesh(int p_item, const Ref<NavigationMesh> &p_navm
_change_notify();
}
+void MeshLibrary::set_item_navmesh_transform(int p_item, const Transform &p_transform) {
+
+ ERR_FAIL_COND(!item_map.has(p_item));
+ item_map[p_item].navmesh_transform = p_transform;
+ notify_change_to_owners();
+ emit_changed();
+ _change_notify();
+}
+
void MeshLibrary::set_item_preview(int p_item, const Ref<Texture> &p_preview) {
ERR_FAIL_COND(!item_map.has(p_item));
@@ -152,11 +168,13 @@ void MeshLibrary::set_item_preview(int p_item, const Ref<Texture> &p_preview) {
emit_changed();
_change_notify();
}
+
String MeshLibrary::get_item_name(int p_item) const {
ERR_FAIL_COND_V(!item_map.has(p_item), "");
return item_map[p_item].name;
}
+
Ref<Mesh> MeshLibrary::get_item_mesh(int p_item) const {
ERR_FAIL_COND_V(!item_map.has(p_item), Ref<Mesh>());
@@ -175,6 +193,12 @@ Ref<NavigationMesh> MeshLibrary::get_item_navmesh(int p_item) const {
return item_map[p_item].navmesh;
}
+Transform MeshLibrary::get_item_navmesh_transform(int p_item) const {
+
+ ERR_FAIL_COND_V(!item_map.has(p_item), Transform());
+ return item_map[p_item].navmesh_transform;
+}
+
Ref<Texture> MeshLibrary::get_item_preview(int p_item) const {
ERR_FAIL_COND_V(!item_map.has(p_item), Ref<Texture>());
@@ -268,11 +292,13 @@ void MeshLibrary::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_item_name", "id", "name"), &MeshLibrary::set_item_name);
ClassDB::bind_method(D_METHOD("set_item_mesh", "id", "mesh"), &MeshLibrary::set_item_mesh);
ClassDB::bind_method(D_METHOD("set_item_navmesh", "id", "navmesh"), &MeshLibrary::set_item_navmesh);
+ ClassDB::bind_method(D_METHOD("set_item_navmesh_transform", "id", "navmesh"), &MeshLibrary::set_item_navmesh_transform);
ClassDB::bind_method(D_METHOD("set_item_shapes", "id", "shapes"), &MeshLibrary::_set_item_shapes);
ClassDB::bind_method(D_METHOD("set_item_preview", "id", "texture"), &MeshLibrary::set_item_preview);
ClassDB::bind_method(D_METHOD("get_item_name", "id"), &MeshLibrary::get_item_name);
ClassDB::bind_method(D_METHOD("get_item_mesh", "id"), &MeshLibrary::get_item_mesh);
ClassDB::bind_method(D_METHOD("get_item_navmesh", "id"), &MeshLibrary::get_item_navmesh);
+ ClassDB::bind_method(D_METHOD("get_item_navmesh_transform", "id"), &MeshLibrary::get_item_navmesh_transform);
ClassDB::bind_method(D_METHOD("get_item_shapes", "id"), &MeshLibrary::_get_item_shapes);
ClassDB::bind_method(D_METHOD("get_item_preview", "id"), &MeshLibrary::get_item_preview);
ClassDB::bind_method(D_METHOD("remove_item", "id"), &MeshLibrary::remove_item);
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h
index 849a0577eb..4ae4fc6483 100644
--- a/scene/resources/mesh_library.h
+++ b/scene/resources/mesh_library.h
@@ -52,6 +52,7 @@ public:
Ref<Mesh> mesh;
Vector<ShapeData> shapes;
Ref<Texture> preview;
+ Transform navmesh_transform;
Ref<NavigationMesh> navmesh;
};
@@ -72,11 +73,13 @@ public:
void set_item_name(int p_item, const String &p_name);
void set_item_mesh(int p_item, const Ref<Mesh> &p_mesh);
void set_item_navmesh(int p_item, const Ref<NavigationMesh> &p_navmesh);
+ void set_item_navmesh_transform(int p_item, const Transform &p_transform);
void set_item_shapes(int p_item, const Vector<ShapeData> &p_shapes);
void set_item_preview(int p_item, const Ref<Texture> &p_preview);
String get_item_name(int p_item) const;
Ref<Mesh> get_item_mesh(int p_item) const;
Ref<NavigationMesh> get_item_navmesh(int p_item) const;
+ Transform get_item_navmesh_transform(int p_item) const;
Vector<ShapeData> get_item_shapes(int p_item) const;
Ref<Texture> get_item_preview(int p_item) const;
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 7084c3b4e1..1b406551ab 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -166,11 +166,22 @@ void MultiMesh::set_instance_transform(int p_instance, const Transform &p_transf
VisualServer::get_singleton()->multimesh_instance_set_transform(multimesh, p_instance, p_transform);
}
+
+void MultiMesh::set_instance_transform_2d(int p_instance, const Transform2D &p_transform) {
+
+ VisualServer::get_singleton()->multimesh_instance_set_transform_2d(multimesh, p_instance, p_transform);
+}
+
Transform MultiMesh::get_instance_transform(int p_instance) const {
return VisualServer::get_singleton()->multimesh_instance_get_transform(multimesh, p_instance);
}
+Transform2D MultiMesh::get_instance_transform_2d(int p_instance) const {
+
+ return VisualServer::get_singleton()->multimesh_instance_get_transform_2d(multimesh, p_instance);
+}
+
void MultiMesh::set_instance_color(int p_instance, const Color &p_color) {
VisualServer::get_singleton()->multimesh_instance_set_color(multimesh, p_instance, p_color);
@@ -245,7 +256,9 @@ void MultiMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_instance_count", "count"), &MultiMesh::set_instance_count);
ClassDB::bind_method(D_METHOD("get_instance_count"), &MultiMesh::get_instance_count);
ClassDB::bind_method(D_METHOD("set_instance_transform", "instance", "transform"), &MultiMesh::set_instance_transform);
+ ClassDB::bind_method(D_METHOD("set_instance_transform_2d", "instance", "transform"), &MultiMesh::set_instance_transform_2d);
ClassDB::bind_method(D_METHOD("get_instance_transform", "instance"), &MultiMesh::get_instance_transform);
+ ClassDB::bind_method(D_METHOD("get_instance_transform_2d", "instance"), &MultiMesh::get_instance_transform_2d);
ClassDB::bind_method(D_METHOD("set_instance_color", "instance", "color"), &MultiMesh::set_instance_color);
ClassDB::bind_method(D_METHOD("get_instance_color", "instance"), &MultiMesh::get_instance_color);
ClassDB::bind_method(D_METHOD("set_instance_custom_data", "instance", "custom_data"), &MultiMesh::set_instance_custom_data);
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h
index 4e70907399..ac2c69e022 100644
--- a/scene/resources/multimesh.h
+++ b/scene/resources/multimesh.h
@@ -94,7 +94,9 @@ public:
int get_instance_count() const;
void set_instance_transform(int p_instance, const Transform &p_transform);
+ void set_instance_transform_2d(int p_instance, const Transform2D &p_transform);
Transform get_instance_transform(int p_instance) const;
+ Transform2D get_instance_transform_2d(int p_instance) const;
void set_instance_color(int p_instance, const Color &p_color);
Color get_instance_color(int p_instance) const;
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index ea810edf8c..626ed9f5b4 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -55,7 +55,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
Node *p_name; \
if (p_id & FLAG_ID_IS_PATH) { \
NodePath np = node_paths[p_id & FLAG_MASK]; \
- p_name = ret_nodes[0]->_get_node(np); \
+ p_name = ret_nodes[0]->get_node_or_null(np); \
} else { \
ERR_FAIL_INDEX_V(p_id &FLAG_MASK, nc, NULL); \
p_name = ret_nodes[p_id & FLAG_MASK]; \
@@ -92,6 +92,8 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
if (i > 0) {
+ ERR_EXPLAIN(vformat("Invalid scene: node %s does not specify its parent node.", snames[n.name]))
+ ERR_FAIL_COND_V(n.parent == -1, NULL)
NODE_FROM_ID(nparent, n.parent);
#ifdef DEBUG_ENABLED
if (!nparent && (n.parent & FLAG_ID_IS_PATH)) {
@@ -175,8 +177,8 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
node = Object::cast_to<Node>(obj);
} else {
- print_line("Class is disabled for: " + itos(n.type));
- print_line("name: " + String(snames[n.type]));
+ //print_line("Class is disabled for: " + itos(n.type));
+ //print_line("name: " + String(snames[n.type]));
}
if (node) {
@@ -236,8 +238,8 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
} else {
//for instances, a copy must be made
- Node *base = i == 0 ? node : ret_nodes[0];
- Ref<Resource> local_dupe = res->duplicate_for_local_scene(base, resources_local_to_scene);
+ Node *base2 = i == 0 ? node : ret_nodes[0];
+ Ref<Resource> local_dupe = res->duplicate_for_local_scene(base2, resources_local_to_scene);
resources_local_to_scene[res] = local_dupe;
res = local_dupe;
value = local_dupe;
@@ -296,8 +298,8 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
ret_nodes[i] = node;
if (node && gen_node_path_cache && ret_nodes[0]) {
- NodePath n = ret_nodes[0]->get_path_to(node);
- node_path_cache[n] = i;
+ NodePath n2 = ret_nodes[0]->get_path_to(node);
+ node_path_cache[n2] = i;
}
}
@@ -342,7 +344,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
}
for (int i = 0; i < editable_instances.size(); i++) {
- Node *ei = ret_nodes[0]->_get_node(editable_instances[i]);
+ Node *ei = ret_nodes[0]->get_node_or_null(editable_instances[i]);
if (ei) {
ret_nodes[0]->set_editable_instance(ei, true);
}
@@ -749,7 +751,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
{
Node *nl = p_node;
- bool exists = false;
+ bool exists2 = false;
while (nl) {
@@ -763,7 +765,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
if (from_node >= 0 && to_node >= 0) {
//this one has state for this node, save
if (state->is_connection(from_node, c.signal, to_node, c.method)) {
- exists = true;
+ exists2 = true;
break;
}
}
@@ -781,7 +783,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
if (from_node >= 0 && to_node >= 0) {
//this one has state for this node, save
if (state->is_connection(from_node, c.signal, to_node, c.method)) {
- exists = true;
+ exists2 = true;
break;
}
}
@@ -791,7 +793,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
}
}
- if (exists) {
+ if (exists2) {
continue;
}
}
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index 59fde7787e..ef67e6ea80 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -311,8 +311,8 @@ void ParticlesMaterial::_update_shader() {
//initiate velocity spread in 3D
code += " float angle1_rad = rand_from_seed_m1_p1(alt_seed) * spread_rad;\n";
code += " float angle2_rad = rand_from_seed_m1_p1(alt_seed) * spread_rad * (1.0 - flatness);\n";
- code += " vec3 direction_xz = vec3(sin(angle1_rad), 0, cos(angle1_rad));\n";
- code += " vec3 direction_yz = vec3(0, sin(angle2_rad), cos(angle2_rad));\n";
+ code += " vec3 direction_xz = vec3(sin(angle1_rad), 0.0, cos(angle1_rad));\n";
+ code += " vec3 direction_yz = vec3(0.0, sin(angle2_rad), cos(angle2_rad));\n";
code += " direction_yz.z = direction_yz.z / max(0.0001,sqrt(abs(direction_yz.z))); // better uniform distribution\n";
code += " vec3 direction = vec3(direction_xz.x * direction_yz.z, direction_yz.y, direction_xz.z * direction_yz.z);\n";
code += " direction = normalize(direction);\n";
@@ -347,7 +347,7 @@ void ParticlesMaterial::_update_shader() {
code += " VELOCITY.xy = rotm * VELOCITY.xy;\n";
} else {
code += " vec3 normal = texelFetch(emission_texture_normal, emission_tex_ofs, 0).xyz;\n";
- code += " vec3 v0 = abs(normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0, 1.0, 0.0);\n";
+ code += " vec3 v0 = abs(normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);\n";
code += " vec3 tangent = normalize(cross(v0, normal));\n";
code += " vec3 bitangent = normalize(cross(tangent, normal));\n";
code += " VELOCITY = mat3(tangent, bitangent, normal) * VELOCITY;\n";
diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp
index a45a55a258..52fc21ac11 100644
--- a/scene/resources/polygon_path_finder.cpp
+++ b/scene/resources/polygon_path_finder.cpp
@@ -441,9 +441,9 @@ void PolygonPathFinder::_set_data(const Dictionary &p_data) {
PoolVector<float> penalties = p_data["penalties"];
if (penalties.size() == pc) {
- PoolVector<float>::Read pr = penalties.read();
+ PoolVector<float>::Read pr2 = penalties.read();
for (int i = 0; i < pc; i++) {
- points.write[i].penalty = pr[i];
+ points.write[i].penalty = pr2[i];
}
}
}
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 9ef12aa4e6..db58fe7823 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -376,17 +376,17 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
z = radius * cos(0.5 * Math_PI * v);
for (i = 0; i <= radial_segments; i++) {
- float u = i;
- u /= radial_segments;
+ float u2 = i;
+ u2 /= radial_segments;
- x = sin(u * (Math_PI * 2.0));
- y = -cos(u * (Math_PI * 2.0));
+ x = sin(u2 * (Math_PI * 2.0));
+ y = -cos(u2 * (Math_PI * 2.0));
Vector3 p = Vector3(x * radius * w, y * radius * w, z);
points.push_back(p + Vector3(0.0, 0.0, -0.5 * mid_height));
normals.push_back(p.normalized());
ADD_TANGENT(-y, x, 0.0, 1.0)
- uvs.push_back(Vector2(u, twothirds + ((v - 1.0) * onethird)));
+ uvs.push_back(Vector2(u2, twothirds + ((v - 1.0) * onethird)));
point++;
if (i > 0 && j > 0) {
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/resource_format_text.cpp
index 558810d92a..b6efca9acc 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scene_format_text.cpp */
+/* resource_format_text.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "scene_format_text.h"
+#include "resource_format_text.h"
+
#include "core/io/resource_format_binary.h"
#include "core/os/dir_access.h"
#include "core/project_settings.h"
@@ -1360,7 +1361,9 @@ String ResourceFormatSaverTextInstance::_write_resource(const RES &res) {
if (internal_resources.has(res)) {
return "SubResource( " + itos(internal_resources[res]) + " )";
} else if (res->get_path().length() && res->get_path().find("::") == -1) {
-
+ if (res->get_path() == local_path) { //circular reference attempt
+ return "null";
+ }
//external resource
String path = relative_paths ? local_path.path_to_file(res->get_path()) : res->get_path();
return "Resource( \"" + path + "\" )";
@@ -1385,6 +1388,10 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
return;
if (!p_main && (!bundle_resources) && res->get_path().length() && res->get_path().find("::") == -1) {
+ if (res->get_path() == local_path) {
+ ERR_PRINTS("Circular reference to resource being saved found: '" + local_path + "' will be null next time it's loaded.");
+ return;
+ }
int index = external_resources.size();
external_resources[res] = index;
return;
@@ -1407,7 +1414,20 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
if (pi.usage & PROPERTY_USAGE_STORAGE) {
Variant v = res->get(I->get().name);
- _find_resources(v);
+
+ if (pi.usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) {
+ RES sres = v;
+ if (sres.is_valid()) {
+ NonPersistentKey npk;
+ npk.base = res;
+ npk.property = pi.name;
+ non_persistent_map[npk] = sres;
+ resource_set.insert(sres);
+ saved_resources.push_back(sres);
+ }
+ } else {
+ _find_resources(v);
+ }
}
I = I->next();
@@ -1562,7 +1582,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
break; //save as a scene
if (main) {
- f->store_line("[resource]\n");
+ f->store_line("[resource]");
} else {
String line = "[sub_resource ";
if (res->get_subindex() == 0) {
@@ -1577,7 +1597,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
int idx = res->get_subindex();
line += "type=\"" + res->get_class() + "\" id=" + itos(idx);
- f->store_line(line + "]\n");
+ f->store_line(line + "]");
if (takeover_paths) {
res->set_path(p_path + "::" + itos(idx), true);
}
@@ -1599,7 +1619,17 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
if (PE->get().usage & PROPERTY_USAGE_STORAGE) {
String name = PE->get().name;
- Variant value = res->get(name);
+ Variant value;
+ if (PE->get().usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) {
+ NonPersistentKey npk;
+ npk.base = res;
+ npk.property = name;
+ if (non_persistent_map.has(npk)) {
+ value = non_persistent_map[npk];
+ }
+ } else {
+ value = res->get(name);
+ }
Variant default_value = ClassDB::class_get_default_property_value(res->get_class(), name);
if (default_value.get_type() != Variant::NIL && bool(Variant::evaluate(Variant::OP_EQUAL, value, default_value))) {
@@ -1615,7 +1645,8 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
}
}
- f->store_string("\n");
+ if (E->next())
+ f->store_line(String());
}
if (packed_scene.is_valid()) {
@@ -1684,7 +1715,8 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
f->store_string(_valprop(String(state->get_node_property_name(i, j))) + " = " + vars + "\n");
}
- f->store_line(String());
+ if (i < state->get_node_count() - 1)
+ f->store_line(String());
}
for (int i = 0; i < state->get_connection_count(); i++) {
diff --git a/scene/resources/scene_format_text.h b/scene/resources/resource_format_text.h
index 8fedbd0dd6..8d78ab33b0 100644
--- a/scene/resources/scene_format_text.h
+++ b/scene/resources/resource_format_text.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scene_format_text.h */
+/* resource_format_text.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SCENE_FORMAT_TEXT_H
-#define SCENE_FORMAT_TEXT_H
+#ifndef RESOURCE_FORMAT_TEXT_H
+#define RESOURCE_FORMAT_TEXT_H
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
@@ -155,6 +155,15 @@ class ResourceFormatSaverTextInstance {
bool bundle_resources;
bool skip_editor;
FileAccess *f;
+
+ struct NonPersistentKey { //for resource properties generated on the fly
+ RES base;
+ StringName property;
+ bool operator<(const NonPersistentKey &p_key) const { return base == p_key.base ? property < p_key.property : base < p_key.base; }
+ };
+
+ Map<NonPersistentKey, RES> non_persistent_map;
+
Set<RES> resource_set;
List<RES> saved_resources;
Map<RES, int> external_resources;
@@ -180,4 +189,4 @@ public:
ResourceFormatSaverText();
};
-#endif // SCENE_FORMAT_TEXT_H
+#endif // RESOURCE_FORMAT_TEXT_H
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky.cpp
index d9da85310e..f9f8ff19e4 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sky_box.cpp */
+/* sky.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "sky_box.h"
+#include "sky.h"
+
#include "core/io/image_loader.h"
void Sky::set_radiance_size(RadianceSize p_size) {
@@ -155,7 +156,10 @@ Ref<Image> ProceduralSky::_generate_sky() {
Color ground_bottom_linear = ground_bottom_color.to_linear();
Color ground_horizon_linear = ground_horizon_color.to_linear();
- //Color sun_linear = sun_color.to_linear();
+ Color sun_linear;
+ sun_linear.r = sun_color.r * sun_energy;
+ sun_linear.g = sun_color.g * sun_energy;
+ sun_linear.b = sun_color.b * sun_energy;
Vector3 sun(0, 0, -1);
@@ -203,13 +207,13 @@ Ref<Image> ProceduralSky::_generate_sky() {
float sun_angle = Math::rad2deg(Math::acos(CLAMP(sun.dot(normal), -1.0, 1.0)));
if (sun_angle < sun_angle_min) {
- color = color.blend(sun_color);
+ color = color.blend(sun_linear);
} else if (sun_angle < sun_angle_max) {
float c2 = (sun_angle - sun_angle_min) / (sun_angle_max - sun_angle_min);
c2 = Math::ease(c2, sun_curve);
- color = color.blend(sun_color).linear_interpolate(color, c2);
+ color = color.blend(sun_linear).linear_interpolate(color, c2);
}
}
@@ -532,7 +536,7 @@ void ProceduralSky::_bind_methods() {
BIND_ENUM_CONSTANT(TEXTURE_SIZE_MAX);
}
-ProceduralSky::ProceduralSky() {
+ProceduralSky::ProceduralSky(bool p_desaturate) {
sky = VS::get_singleton()->sky_create();
texture = VS::get_singleton()->texture_create();
@@ -548,13 +552,19 @@ ProceduralSky::ProceduralSky() {
ground_curve = 0.02;
ground_energy = 1;
+ if (p_desaturate) {
+ sky_top_color.set_hsv(sky_top_color.get_h(),0,sky_top_color.get_v());
+ sky_horizon_color.set_hsv(sky_horizon_color.get_h(),0,sky_horizon_color.get_v());
+ ground_bottom_color.set_hsv(ground_bottom_color.get_h(),0,ground_bottom_color.get_v());
+ ground_horizon_color.set_hsv(ground_horizon_color.get_h(),0,ground_horizon_color.get_v());
+ }
sun_color = Color(1, 1, 1);
sun_latitude = 35;
sun_longitude = 0;
sun_angle_min = 1;
sun_angle_max = 100;
sun_curve = 0.05;
- sun_energy = 16;
+ sun_energy = 1;
texture_size = TEXTURE_SIZE_1024;
sky_thread = NULL;
diff --git a/scene/resources/sky_box.h b/scene/resources/sky.h
index af10803b36..7327b2a627 100644
--- a/scene/resources/sky_box.h
+++ b/scene/resources/sky.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sky_box.h */
+/* sky.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SKY_BOX_H
-#define SKY_BOX_H
+#ifndef SKY_H
+#define SKY_H
#include "core/os/thread.h"
#include "scene/resources/texture.h"
+
class Sky : public Resource {
GDCLASS(Sky, Resource);
@@ -190,10 +191,10 @@ public:
virtual RID get_rid() const;
- ProceduralSky();
+ ProceduralSky(bool p_desaturate=false);
~ProceduralSky();
};
VARIANT_ENUM_CAST(ProceduralSky::TextureSize)
-#endif // SKY_BOX_H
+#endif // SKY_H
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index affe9a3e24..cdd65c7642 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -903,6 +903,7 @@ int StyleBoxLine::get_thickness() const {
void StyleBoxLine::set_vertical(bool p_vertical) {
vertical = p_vertical;
+ emit_changed();
}
bool StyleBoxLine::is_vertical() const {
return vertical;
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 2116dd0b1e..83f29503fa 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -190,10 +190,10 @@ void SurfaceTool::add_smooth_group(bool p_smooth) {
}
}
-void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertexes, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const Vector<Plane> &p_tangents) {
+void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const Vector<Plane> &p_tangents) {
ERR_FAIL_COND(!begun);
ERR_FAIL_COND(primitive != Mesh::PRIMITIVE_TRIANGLES);
- ERR_FAIL_COND(p_vertexes.size() < 3);
+ ERR_FAIL_COND(p_vertices.size() < 3);
#define ADD_POINT(n) \
{ \
@@ -207,10 +207,10 @@ void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertexes, const Vect
add_normal(p_normals[n]); \
if (p_tangents.size() > n) \
add_tangent(p_tangents[n]); \
- add_vertex(p_vertexes[n]); \
+ add_vertex(p_vertices[n]); \
}
- for (int i = 0; i < p_vertexes.size() - 2; i++) {
+ for (int i = 0; i < p_vertices.size() - 2; i++) {
ADD_POINT(0);
ADD_POINT(i + 1);
ADD_POINT(i + 2);
@@ -1012,7 +1012,7 @@ void SurfaceTool::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_weights", "weights"), &SurfaceTool::add_weights);
ClassDB::bind_method(D_METHOD("add_smooth_group", "smooth"), &SurfaceTool::add_smooth_group);
- ClassDB::bind_method(D_METHOD("add_triangle_fan", "vertexes", "uvs", "colors", "uv2s", "normals", "tangents"), &SurfaceTool::add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Vector3>()), DEFVAL(Vector<Plane>()));
+ ClassDB::bind_method(D_METHOD("add_triangle_fan", "vertices", "uvs", "colors", "uv2s", "normals", "tangents"), &SurfaceTool::add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Vector3>()), DEFVAL(Vector<Plane>()));
ClassDB::bind_method(D_METHOD("add_index", "index"), &SurfaceTool::add_index);
diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h
index ef13238c13..a3b110f0d8 100644
--- a/scene/resources/surface_tool.h
+++ b/scene/resources/surface_tool.h
@@ -109,7 +109,7 @@ public:
void add_weights(const Vector<float> &p_weights);
void add_smooth_group(bool p_smooth);
- void add_triangle_fan(const Vector<Vector3> &p_vertexes, const Vector<Vector2> &p_uvs = Vector<Vector2>(), const Vector<Color> &p_colors = Vector<Color>(), const Vector<Vector2> &p_uv2s = Vector<Vector2>(), const Vector<Vector3> &p_normals = Vector<Vector3>(), const Vector<Plane> &p_tangents = Vector<Plane>());
+ void add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs = Vector<Vector2>(), const Vector<Color> &p_colors = Vector<Color>(), const Vector<Vector2> &p_uv2s = Vector<Vector2>(), const Vector<Vector3> &p_normals = Vector<Vector3>(), const Vector<Plane> &p_tangents = Vector<Plane>());
void add_index(int p_index);
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index ff5900cd3e..3ca2b56d08 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -34,7 +34,7 @@
#include "core/io/image_loader.h"
#include "core/method_bind_ext.gen.inc"
#include "core/os/os.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
Size2 Texture::get_size() const {
@@ -157,7 +157,7 @@ bool ImageTexture::_get(const StringName &p_name, Variant &r_ret) const {
void ImageTexture::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter,Anisotropic,sRGB,Mirrored Repeat"));
- p_list->push_back(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Image", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, ""));
}
@@ -178,12 +178,6 @@ void ImageTexture::_reload_hook(const RID &p_hook) {
_change_notify();
}
-bool ImageTexture::keep_images_cached = false;
-
-void ImageTexture::set_keep_images_cached(bool p_enable) {
- keep_images_cached = p_enable;
-}
-
void ImageTexture::create(int p_width, int p_height, Image::Format p_format, uint32_t p_flags) {
flags = p_flags;
@@ -205,9 +199,7 @@ void ImageTexture::create_from_image(const Ref<Image> &p_image, uint32_t p_flags
VisualServer::get_singleton()->texture_set_data(texture, p_image);
_change_notify();
- if (keep_images_cached) {
- image_cache = p_image;
- }
+ image_stored = true;
}
void ImageTexture::set_flags(uint32_t p_flags) {
@@ -255,10 +247,7 @@ void ImageTexture::set_data(const Ref<Image> &p_image) {
_change_notify();
alpha_cache.unref();
-
- if (keep_images_cached) {
- image_cache = p_image;
- }
+ image_stored = true;
}
void ImageTexture::_resource_path_changed() {
@@ -268,10 +257,10 @@ void ImageTexture::_resource_path_changed() {
Ref<Image> ImageTexture::get_data() const {
- if (image_cache.is_valid()) {
- return image_cache;
- } else {
+ if (image_stored) {
return VisualServer::get_singleton()->texture_get_data(texture);
+ } else {
+ return Ref<Image>();
}
}
@@ -437,6 +426,8 @@ ImageTexture::ImageTexture() {
texture = VisualServer::get_singleton()->texture_create();
storage = STORAGE_RAW;
lossy_storage_quality = 0.7;
+ image_stored = false;
+ format = Image::FORMAT_L8;
}
ImageTexture::~ImageTexture() {
@@ -492,7 +483,7 @@ Image::Format StreamTexture::get_format() const {
return format;
}
-Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> &image, int p_size_limit) {
+Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &tw_custom, int &th_custom, int &flags, Ref<Image> &image, int p_size_limit) {
alpha_cache.unref();
@@ -508,8 +499,11 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
ERR_FAIL_COND_V(header[0] != 'G' || header[1] != 'D' || header[2] != 'S' || header[3] != 'T', ERR_FILE_CORRUPT);
}
- tw = f->get_32();
- th = f->get_32();
+ tw = f->get_16();
+ tw_custom = f->get_16();
+ th = f->get_16();
+ th_custom = f->get_16();
+
flags = f->get_32(); //texture flags!
uint32_t df = f->get_32(); //data format
@@ -662,16 +656,16 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
int sw = tw;
int sh = th;
- int mipmaps = Image::get_image_required_mipmaps(tw, th, format);
+ int mipmaps2 = Image::get_image_required_mipmaps(tw, th, format);
int total_size = Image::get_image_data_size(tw, th, format, true);
int idx = 0;
int ofs = 0;
- while (mipmaps > 1 && p_size_limit > 0 && (sw > p_size_limit || sh > p_size_limit)) {
+ while (mipmaps2 > 1 && p_size_limit > 0 && (sw > p_size_limit || sh > p_size_limit)) {
sw = MAX(sw >> 1, 1);
sh = MAX(sh >> 1, 1);
- mipmaps--;
+ mipmaps2--;
idx++;
}
@@ -698,7 +692,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
int expected = total_size - ofs;
if (bytes < expected) {
- //this is a compatibility workaround for older format, which saved less mipmaps. It is still recommended the image is reimported.
+ //this is a compatibility workaround for older format, which saved less mipmaps2. It is still recommended the image is reimported.
zeromem(w.ptr() + bytes, (expected - bytes));
} else if (bytes != expected) {
ERR_FAIL_V(ERR_FILE_CORRUPT);
@@ -716,18 +710,26 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
Error StreamTexture::load(const String &p_path) {
- int lw, lh, lflags;
+ int lw, lh, lwc, lhc, lflags;
Ref<Image> image;
image.instance();
- Error err = _load_data(p_path, lw, lh, lflags, image);
+ Error err = _load_data(p_path, lw, lh, lwc, lhc, lflags, image);
if (err)
return err;
+ if (get_path() == String()) {
+ //temporarily set path if no path set for resource, helps find errors
+ VisualServer::get_singleton()->texture_set_path(texture, p_path);
+ }
VS::get_singleton()->texture_allocate(texture, image->get_width(), image->get_height(), 0, image->get_format(), VS::TEXTURE_TYPE_2D, lflags);
VS::get_singleton()->texture_set_data(texture, image);
+ if (lwc || lhc) {
+ VS::get_singleton()->texture_set_size_override(texture, lwc, lhc, 0);
+ } else {
+ }
- w = lw;
- h = lh;
+ w = lwc ? lwc : lw;
+ h = lhc ? lhc : lh;
flags = lflags;
path_to_file = p_path;
format = image->get_format();
@@ -795,6 +797,7 @@ bool StreamTexture::is_pixel_opaque(int p_x, int p_y) const {
decom->decompress();
img = decom;
}
+
alpha_cache.instance();
alpha_cache->create_from_image_alpha(img);
}
@@ -839,6 +842,12 @@ void StreamTexture::reload_from_file() {
load(path);
}
+void StreamTexture::_validate_property(PropertyInfo &property) const {
+ if (property.name == "flags") {
+ property.usage = PROPERTY_USAGE_NOEDITOR;
+ }
+}
+
void StreamTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("load", "path"), &StreamTexture::load);
@@ -1513,6 +1522,7 @@ CubeMap::CubeMap() {
cubemap = VisualServer::get_singleton()->texture_create();
storage = STORAGE_RAW;
lossy_storage_quality = 0.7;
+ format = Image::FORMAT_BPTC_RGBA;
}
CubeMap::~CubeMap() {
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 4b5b504510..281a33929c 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -37,8 +37,8 @@
#include "core/os/rw_lock.h"
#include "core/os/thread_safe.h"
#include "core/resource.h"
-#include "scene/resources/color_ramp.h"
#include "scene/resources/curve.h"
+#include "scene/resources/gradient.h"
#include "servers/visual_server.h"
/**
@@ -111,7 +111,7 @@ private:
Size2 size_override;
float lossy_storage_quality;
mutable Ref<BitMap> alpha_cache;
- Ref<Image> image_cache;
+ bool image_stored;
protected:
virtual void reload_from_file();
@@ -126,11 +126,7 @@ protected:
void _set_data(Dictionary p_data);
- static bool keep_images_cached;
-
public:
- static void set_keep_images_cached(bool p_enable);
-
void create(int p_width, int p_height, Image::Format p_format, uint32_t p_flags = FLAGS_DEFAULT);
void create_from_image(const Ref<Image> &p_image, uint32_t p_flags = FLAGS_DEFAULT);
@@ -191,7 +187,7 @@ public:
};
private:
- Error _load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> &image, int p_size_limit = 0);
+ Error _load_data(const String &p_path, int &tw, int &th, int &tw_custom, int &th_custom, int &flags, Ref<Image> &image, int p_size_limit = 0);
String path_to_file;
RID texture;
Image::Format format;
@@ -207,6 +203,7 @@ private:
protected:
static void _bind_methods();
+ void _validate_property(PropertyInfo &property) const;
public:
typedef void (*TextureFormatRequestCallback)(const Ref<StreamTexture> &);
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 8d1a24dbf8..69258bc834 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -621,8 +621,8 @@ void Theme::clear() {
void Theme::copy_default_theme() {
- Ref<Theme> default_theme = get_default();
- copy_theme(default_theme);
+ Ref<Theme> default_theme2 = get_default();
+ copy_theme(default_theme2);
}
void Theme::copy_theme(const Ref<Theme> &p_other) {
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 5a2e7245a2..4ddfc0331b 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -30,6 +30,7 @@
#include "tile_set.h"
#include "core/array.h"
+#include "core/engine.h"
bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
@@ -614,7 +615,7 @@ Vector2 TileSet::autotile_get_subtile_for_bitmask(int p_id, uint16_t p_bitmask,
if (coords.size() == 0) {
return autotile_get_icon_coordinate(p_id);
} else {
- return coords[Math::random(0, (int)coords.size())];
+ return coords[Math::rand() % coords.size()];
}
}
@@ -662,6 +663,7 @@ void TileSet::tile_set_shape(int p_id, int p_shape_id, const Ref<Shape2D> &p_sha
if (tile_map[p_id].shapes_data.size() <= p_shape_id)
tile_map[p_id].shapes_data.resize(p_shape_id + 1);
tile_map[p_id].shapes_data.write[p_shape_id].shape = p_shape;
+ _decompose_convex_shape(p_shape);
emit_changed();
}
@@ -844,6 +846,9 @@ void TileSet::tile_set_shapes(int p_id, const Vector<ShapeData> &p_shapes) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map[p_id].shapes_data = p_shapes;
+ for (int i = 0; i < p_shapes.size(); i++) {
+ _decompose_convex_shape(p_shapes[i].shape);
+ }
emit_changed();
}
@@ -888,9 +893,10 @@ void TileSet::_tile_set_shapes(int p_id, const Array &p_shapes) {
} else if (p_shapes[i].get_type() == Variant::DICTIONARY) {
Dictionary d = p_shapes[i];
- if (d.has("shape") && d["shape"].get_type() == Variant::OBJECT)
+ if (d.has("shape") && d["shape"].get_type() == Variant::OBJECT) {
s.shape = d["shape"];
- else
+ _decompose_convex_shape(s.shape);
+ } else
continue;
if (d.has("shape_transform") && d["shape_transform"].get_type() == Variant::TRANSFORM2D)
@@ -956,6 +962,26 @@ Array TileSet::_get_tiles_ids() const {
return arr;
}
+void TileSet::_decompose_convex_shape(Ref<Shape2D> p_shape) {
+ if (Engine::get_singleton()->is_editor_hint())
+ return;
+ Ref<ConvexPolygonShape2D> convex = p_shape;
+ if (!convex.is_valid())
+ return;
+ Vector<Vector<Vector2> > decomp = Geometry::decompose_polygon_in_convex(convex->get_points());
+ if (decomp.size() > 1) {
+ Array sub_shapes;
+ for (int i = 0; i < decomp.size(); i++) {
+ Ref<ConvexPolygonShape2D> _convex = memnew(ConvexPolygonShape2D);
+ _convex->set_points(decomp[i]);
+ sub_shapes.append(_convex);
+ }
+ convex->set_meta("decomposed", sub_shapes);
+ } else {
+ convex->set_meta("decomposed", Variant());
+ }
+}
+
void TileSet::get_tile_list(List<int> *p_tiles) const {
for (Map<int, TileData>::Element *E = tile_map.front(); E; E = E->next()) {
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index 4800371d3c..fac48243d0 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -35,6 +35,7 @@
#include "core/resource.h"
#include "scene/2d/light_occluder_2d.h"
#include "scene/2d/navigation_polygon.h"
+#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/shape_2d.h"
#include "scene/resources/texture.h"
@@ -134,6 +135,7 @@ protected:
void _tile_set_shapes(int p_id, const Array &p_shapes);
Array _tile_get_shapes(int p_id) const;
Array _get_tiles_ids() const;
+ void _decompose_convex_shape(Ref<Shape2D> p_shape);
static void _bind_methods();
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index d96b37938f..4e5909eb2e 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -569,7 +569,7 @@ bool VisualShader::_set(const StringName &p_name, const Variant &p_value) {
String mode = name.get_slicec('/', 1);
int value = p_value;
if (value == 0) {
- modes.erase(mode); //means its default anyway, so dont store it
+ modes.erase(mode); //means it's default anyway, so don't store it
} else {
modes[mode] = value;
}
@@ -1087,6 +1087,8 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "attenuation", "ATTENUATION" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "albedo", "ALBEDO" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "transmission", "TRANSMISSION" },
+ { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "diffuse", "DIFFUSE_LIGHT" },
+ { Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR, "specular", "SPECULAR_LIGHT" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "roughness", "ROUGHNESS" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_TRANSFORM, "world", "WORLD_MATRIX" },
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index a89b70d1ea..e47069d723 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -324,7 +324,7 @@ String VisualShaderNodeTexture::generate_global(Shader::Mode p_mode, VisualShade
String u = "uniform sampler2D " + make_unique_id(p_type, p_id, "tex");
switch (texture_type) {
case TYPE_DATA: break;
- case TYPE_COLOR: u += " : hint_color"; break;
+ case TYPE_COLOR: u += " : hint_albedo"; break;
case TYPE_NORMALMAP: u += " : hint_normal"; break;
}
return u + ";";
@@ -554,7 +554,7 @@ String VisualShaderNodeCubeMap::generate_global(Shader::Mode p_mode, VisualShade
String u = "uniform sampler2DCube " + make_unique_id(p_type, p_id, "cube");
switch (texture_type) {
case TYPE_DATA: break;
- case TYPE_COLOR: u += " : hint_color"; break;
+ case TYPE_COLOR: u += " : hint_albedo"; break;
case TYPE_NORMALMAP: u += " : hint_normal"; break;
}
return u + ";";
@@ -1136,7 +1136,7 @@ String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShad
"round($)",
"ceil($)",
"fract($)",
- "min(max($,0),1)",
+ "min(max($,0.0),1.0)",
"-($)",
};
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index 305e4fc735..634f4d7160 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -203,4 +203,6 @@ SceneStringNames::SceneStringNames() {
_mesh_changed = StaticCString::create("_mesh_changed");
parameters_base_path = "parameters/";
+
+ tracks_changed = "tracks_changed";
}
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index 103b06dbc1..bc75165b8c 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -32,7 +32,7 @@
#define SCENE_STRING_NAMES_H
#include "core/node_path.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
class SceneStringNames {
friend void register_scene_types();
@@ -205,6 +205,8 @@ public:
StringName parameters_base_path;
+ StringName tracks_changed;
+
enum {
MAX_MATERIALS = 32
};
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index 51b9d5a4a2..1a6430c499 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -83,8 +83,8 @@ void AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale,
_mix_internal(internal_buffer + 4, INTERNAL_BUFFER_LEN);
} else {
//fill with silence, not playing
- for (int i = 0; i < INTERNAL_BUFFER_LEN; ++i) {
- internal_buffer[i + 4] = AudioFrame(0, 0);
+ for (int j = 0; j < INTERNAL_BUFFER_LEN; ++j) {
+ internal_buffer[j + 4] = AudioFrame(0, 0);
}
}
mix_offset -= (INTERNAL_BUFFER_LEN << FP_BITS);
@@ -138,7 +138,7 @@ void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_fr
Vector<int32_t> buf = AudioDriver::get_singleton()->get_input_buffer();
unsigned int input_size = AudioDriver::get_singleton()->get_input_size();
int mix_rate = AudioDriver::get_singleton()->get_mix_rate();
- int playback_delay = MIN(((50 * mix_rate) / 1000) * 2, buf.size() >> 1);
+ unsigned int playback_delay = MIN(((50 * mix_rate) / 1000) * 2, buf.size() >> 1);
#ifdef DEBUG_ENABLED
unsigned int input_position = AudioDriver::get_singleton()->get_input_position();
#endif
@@ -150,13 +150,13 @@ void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_fr
input_ofs = 0;
} else {
for (int i = 0; i < p_frames; i++) {
- if (input_size > input_ofs) {
+ if (input_size > input_ofs && (int)input_ofs < buf.size()) {
float l = (buf[input_ofs++] >> 16) / 32768.f;
- if (input_ofs >= buf.size()) {
+ if ((int)input_ofs >= buf.size()) {
input_ofs = 0;
}
float r = (buf[input_ofs++] >> 16) / 32768.f;
- if (input_ofs >= buf.size()) {
+ if ((int)input_ofs >= buf.size()) {
input_ofs = 0;
}
@@ -168,7 +168,7 @@ void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_fr
}
#ifdef DEBUG_ENABLED
- if (input_ofs > input_position && (input_ofs - input_position) < (p_frames * 2)) {
+ if (input_ofs > input_position && (int)(input_ofs - input_position) < (p_frames * 2)) {
print_verbose(String(get_class_name()) + " buffer underrun: input_position=" + itos(input_position) + " input_ofs=" + itos(input_ofs) + " input_size=" + itos(input_size));
}
#endif
@@ -186,6 +186,10 @@ float AudioStreamPlaybackMicrophone::get_stream_sampling_rate() {
void AudioStreamPlaybackMicrophone::start(float p_from_pos) {
+ if (active) {
+ return;
+ }
+
if (!GLOBAL_GET("audio/enable_audio_input")) {
WARN_PRINTS("Need to enable Project settings > Audio > Enable Audio Input option to use capturing.");
return;
@@ -193,15 +197,17 @@ void AudioStreamPlaybackMicrophone::start(float p_from_pos) {
input_ofs = 0;
- AudioDriver::get_singleton()->capture_start();
-
- active = true;
- _begin_resample();
+ if (AudioDriver::get_singleton()->capture_start() == OK) {
+ active = true;
+ _begin_resample();
+ }
}
void AudioStreamPlaybackMicrophone::stop() {
- AudioDriver::get_singleton()->capture_stop();
- active = false;
+ if (active) {
+ AudioDriver::get_singleton()->capture_stop();
+ active = false;
+ }
}
bool AudioStreamPlaybackMicrophone::is_playing() const {
diff --git a/servers/audio/reverb_sw.cpp b/servers/audio/reverb_sw.cpp
index 8adc21b406..63bf1a7eaa 100644
--- a/servers/audio/reverb_sw.cpp
+++ b/servers/audio/reverb_sw.cpp
@@ -39,9 +39,6 @@
#define rangeloop(c, min, max) \
for ((c) = (min); (c) < (max); (c)++)
-#define ABSDIFF(x, y) \
- (((x) < (y)) ? ((y) - (x)) : ((x) - (y)))
-
#define MULSHIFT_S32(Factor1, Factor2, Bits) \
((int)(((int64_t)(Factor1) * (Factor2)) >> (Bits)))
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 3b1734287a..8c092a02a2 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -90,12 +90,16 @@ void AudioDriver::input_buffer_init(int driver_buffer_frames) {
void AudioDriver::input_buffer_write(int32_t sample) {
- input_buffer.write[input_position++] = sample;
- if (input_position >= input_buffer.size()) {
- input_position = 0;
- }
- if (input_size < input_buffer.size()) {
- input_size++;
+ if ((int)input_position < input_buffer.size()) {
+ input_buffer.write[input_position++] = sample;
+ if ((int)input_position >= input_buffer.size()) {
+ input_position = 0;
+ }
+ if ((int)input_size < input_buffer.size()) {
+ input_size++;
+ }
+ } else {
+ WARN_PRINTS("input_buffer_write: Invalid input_position=" + itos(input_position) + " input_buffer.size()=" + itos(input_buffer.size()));
}
}
@@ -145,6 +149,8 @@ AudioDriver::AudioDriver() {
_last_mix_time = 0;
_mix_amount = 0;
+ input_position = 0;
+ input_size = 0;
#ifdef DEBUG_ENABLED
prof_time = 0;
@@ -253,11 +259,13 @@ void AudioServer::_driver_process(int p_frames, int32_t *p_buffer) {
float l = CLAMP(buf[from + j].l, -1.0, 1.0);
int32_t vl = l * ((1 << 20) - 1);
- p_buffer[(from_buf + j) * (cs * 2) + k * 2 + 0] = vl << 11;
+ int32_t vl2 = (vl < 0 ? -1 : 1) * (ABS(vl) << 11);
+ p_buffer[(from_buf + j) * (cs * 2) + k * 2 + 0] = vl2;
float r = CLAMP(buf[from + j].r, -1.0, 1.0);
int32_t vr = r * ((1 << 20) - 1);
- p_buffer[(from_buf + j) * (cs * 2) + k * 2 + 1] = vr << 11;
+ int32_t vr2 = (vr < 0 ? -1 : 1) * (ABS(vr) << 11);
+ p_buffer[(from_buf + j) * (cs * 2) + k * 2 + 1] = vr2;
}
} else {
@@ -977,7 +985,7 @@ void AudioServer::update() {
uint64_t driver_time = AudioDriver::get_singleton()->get_profiling_time();
uint64_t server_time = prof_time;
- // Substract the server time from the driver time
+ // Subtract the server time from the driver time
if (driver_time > server_time)
driver_time -= server_time;
@@ -995,7 +1003,7 @@ void AudioServer::update() {
values.push_back(String(bus->name) + bus->effects[j].effect->get_name());
values.push_back(USEC_TO_SEC(bus->effects[j].prof_time));
- // Substract the effect time from the driver and server times
+ // Subtract the effect time from the driver and server times
if (driver_time > bus->effects[j].prof_time)
driver_time -= bus->effects[j].prof_time;
if (server_time > bus->effects[j].prof_time)
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp
index 23f16c246e..f0fbbafe1c 100644
--- a/servers/physics/body_sw.cpp
+++ b/servers/physics/body_sw.cpp
@@ -652,7 +652,7 @@ void BodySW::simulate_motion(const Transform& p_xform,real_t p_step) {
linear_velocity=(p_xform.origin - get_transform().origin)/p_step;
//compute a FAKE angular velocity, not so easy
- Matrix3 rot=get_transform().basis.orthonormalized().transposed() * p_xform.basis.orthonormalized();
+ Basis rot=get_transform().basis.orthonormalized().transposed() * p_xform.basis.orthonormalized();
Vector3 axis;
real_t angle;
diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h
index 6e6b66dac2..5c14d5aaf9 100644
--- a/servers/physics/collision_object_sw.h
+++ b/servers/physics/collision_object_sw.h
@@ -130,7 +130,7 @@ public:
_FORCE_INLINE_ const Transform &get_shape_transform(int p_index) const { return shapes[p_index].xform; }
_FORCE_INLINE_ const Transform &get_shape_inv_transform(int p_index) const { return shapes[p_index].xform_inv; }
_FORCE_INLINE_ const AABB &get_shape_aabb(int p_index) const { return shapes[p_index].aabb_cache; }
- _FORCE_INLINE_ const real_t get_shape_area(int p_index) const { return shapes[p_index].area_cache; }
+ _FORCE_INLINE_ real_t get_shape_area(int p_index) const { return shapes[p_index].area_cache; }
_FORCE_INLINE_ Transform get_transform() const { return transform; }
_FORCE_INLINE_ Transform get_inv_transform() const { return inv_transform; }
diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp
index fd919343f0..baf7431e28 100644
--- a/servers/physics/collision_solver_sat.cpp
+++ b/servers/physics/collision_solver_sat.cpp
@@ -821,9 +821,9 @@ static void _collision_box_capsule(const ShapeSW *p_a, const Transform &p_transf
// test edges of A
- for (int i = 0; i < 3; i++) {
+ for (int j = 0; j < 3; j++) {
- Vector3 axis = point_axis.cross(p_transform_a.basis.get_axis(i)).cross(p_transform_a.basis.get_axis(i)).normalized();
+ Vector3 axis = point_axis.cross(p_transform_a.basis.get_axis(j)).cross(p_transform_a.basis.get_axis(j)).normalized();
if (!separator.test_axis(axis))
return;
@@ -1337,7 +1337,7 @@ static void _collision_convex_polygon_convex_polygon(const ShapeSW *p_a, const T
return;
}
}
- //edge-vertex( hsell)
+ //edge-vertex (shell)
for (int i = 0; i < edge_count_A; i++) {
@@ -1438,7 +1438,7 @@ static void _collision_convex_polygon_face(const ShapeSW *p_a, const Transform &
return;
}
}
- //edge-vertex( hsell)
+ //edge-vertex (shell)
for (int i = 0; i < edge_count; i++) {
diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp
index 05778ee9b0..268b9eefeb 100644
--- a/servers/physics/joints/cone_twist_joint_sw.cpp
+++ b/servers/physics/joints/cone_twist_joint_sw.cpp
@@ -205,9 +205,9 @@ bool ConeTwistJointSW::setup(real_t p_timestep) {
// Twist limits
if (m_twistSpan >= real_t(0.)) {
- Vector3 b2Axis2 = B->get_transform().basis.xform(this->m_rbBFrame.basis.get_axis(1));
+ Vector3 b2Axis22 = B->get_transform().basis.xform(this->m_rbBFrame.basis.get_axis(1));
Quat rotationArc = Quat(b2Axis1, b1Axis1);
- Vector3 TwistRef = rotationArc.xform(b2Axis2);
+ Vector3 TwistRef = rotationArc.xform(b2Axis22);
real_t twist = atan2fast(TwistRef.dot(b1Axis3), TwistRef.dot(b1Axis2));
real_t lockedFreeFactor = (m_twistSpan > real_t(0.05f)) ? m_limitSoftness : real_t(0.);
diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp
index 2975ae9453..36d18e8901 100644
--- a/servers/physics/physics_server_sw.cpp
+++ b/servers/physics/physics_server_sw.cpp
@@ -40,10 +40,10 @@
#include "joints/pin_joint_sw.h"
#include "joints/slider_joint_sw.h"
-#define FLUSH_QUERY_CHECK \
- if (flushing_queries) { \
- ERR_EXPLAIN("Can't change this state while flushing queries. Use call_deferred()/set_deferred() to change monitoring state instead"); \
- ERR_FAIL(); \
+#define FLUSH_QUERY_CHECK(m_object) \
+ if (m_object->get_space() && flushing_queries) { \
+ ERR_EXPLAIN("Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead"); \
+ ERR_FAIL(); \
}
RID PhysicsServerSW::shape_create(ShapeType p_shape) {
@@ -358,11 +358,10 @@ void PhysicsServerSW::area_clear_shapes(RID p_area) {
void PhysicsServerSW::area_set_shape_disabled(RID p_area, int p_shape_idx, bool p_disabled) {
- FLUSH_QUERY_CHECK
-
AreaSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
ERR_FAIL_INDEX(p_shape_idx, area->get_shape_count());
+ FLUSH_QUERY_CHECK(area);
area->set_shape_as_disabled(p_shape_idx, p_disabled);
}
@@ -443,10 +442,9 @@ void PhysicsServerSW::area_set_collision_mask(RID p_area, uint32_t p_mask) {
void PhysicsServerSW::area_set_monitorable(RID p_area, bool p_monitorable) {
- FLUSH_QUERY_CHECK
-
AreaSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
+ FLUSH_QUERY_CHECK(area);
area->set_monitorable(p_monitorable);
}
@@ -592,11 +590,11 @@ RID PhysicsServerSW::body_get_shape(RID p_body, int p_shape_idx) const {
void PhysicsServerSW::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) {
- FLUSH_QUERY_CHECK
-
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
+ FLUSH_QUERY_CHECK(body);
+
body->set_shape_as_disabled(p_shape_idx, p_disabled);
}
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index fdc5eccc5a..d40de669fd 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -32,7 +32,7 @@
#include "core/math/geometry.h"
#include "core/math/quick_hull.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#define _POINT_SNAP 0.001953125
#define _EDGE_IS_VALID_SUPPORT_THRESHOLD 0.0002
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index 1087cd2483..4ab92715f4 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -277,7 +277,7 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform
real_t hi = 1;
Vector3 mnormal = p_motion.normalized();
- for (int i = 0; i < 8; i++) { //steps should be customizable..
+ for (int j = 0; j < 8; j++) { //steps should be customizable..
real_t ofs = (low + hi) * 0.5;
@@ -387,6 +387,7 @@ struct _RestCallbackData {
Vector3 best_contact;
Vector3 best_normal;
real_t best_len;
+ real_t min_allowed_depth;
};
static void _rest_cbk_result(const Vector3 &p_point_A, const Vector3 &p_point_B, void *p_userdata) {
@@ -395,6 +396,8 @@ static void _rest_cbk_result(const Vector3 &p_point_A, const Vector3 &p_point_B,
Vector3 contact_rel = p_point_B - p_point_A;
real_t len = contact_rel.length();
+ if (len < rd->min_allowed_depth)
+ return;
if (len <= rd->best_len)
return;
@@ -418,6 +421,7 @@ bool PhysicsDirectSpaceStateSW::rest_info(RID p_shape, const Transform &p_shape_
rcd.best_len = 0;
rcd.best_object = NULL;
rcd.best_shape = 0;
+ rcd.min_allowed_depth = space->test_motion_min_contact_depth;
for (int i = 0; i < amount; i++) {
@@ -593,7 +597,6 @@ int SpaceSW::test_body_ray_separation(BodySW *p_body, const Transform &p_transfo
bool collided = false;
int amount = _cull_aabb_for_body(p_body, body_aabb);
- int ray_index = 0;
for (int j = 0; j < p_body->get_shape_count(); j++) {
if (p_body->is_shape_set_as_disabled(j))
@@ -627,7 +630,19 @@ int SpaceSW::test_body_ray_separation(BodySW *p_body, const Transform &p_transfo
collided = true;
}
- if (ray_index < p_result_max) {
+ int ray_index = -1; //reuse shape
+ for (int k = 0; k < rays_found; k++) {
+ if (r_results[ray_index].collision_local_shape == j) {
+ ray_index = k;
+ }
+ }
+
+ if (ray_index == -1 && rays_found < p_result_max) {
+ ray_index = rays_found;
+ rays_found++;
+ }
+
+ if (ray_index != -1) {
PhysicsServer::SeparationResult &result = r_results[ray_index];
for (int k = 0; k < cbk.amount; k++) {
@@ -642,9 +657,10 @@ int SpaceSW::test_body_ray_separation(BodySW *p_body, const Transform &p_transfo
result.collision_depth = depth;
result.collision_point = b;
result.collision_normal = (b - a).normalized();
- result.collision_local_shape = shape_idx;
+ result.collision_local_shape = j;
result.collider = col_obj->get_self();
result.collider_id = col_obj->get_instance_id();
+ result.collider_shape = shape_idx;
//result.collider_metadata = col_obj->get_shape_metadata(shape_idx);
if (col_obj->get_type() == CollisionObjectSW::TYPE_BODY) {
BodySW *body = (BodySW *)col_obj;
@@ -658,12 +674,8 @@ int SpaceSW::test_body_ray_separation(BodySW *p_body, const Transform &p_transfo
}
}
}
-
- ray_index++;
}
- rays_found = MAX(ray_index, rays_found);
-
if (!collided || recover_motion == Vector3()) {
break;
}
@@ -717,6 +729,11 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve
}
if (!shapes_found) {
+ if (r_result) {
+ *r_result = PhysicsServer::MotionResult();
+ r_result->motion = p_motion;
+ }
+
return false;
}
@@ -855,7 +872,7 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve
real_t hi = 1;
Vector3 mnormal = p_motion.normalized();
- for (int i = 0; i < 8; i++) { //steps should be customizable..
+ for (int k = 0; k < 8; k++) { //steps should be customizable..
real_t ofs = (low + hi) * 0.5;
@@ -924,6 +941,7 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve
rcd.best_len = 0;
rcd.best_object = NULL;
rcd.best_shape = 0;
+ rcd.min_allowed_depth = test_motion_min_contact_depth;
Transform body_shape_xform = ugt * p_body->get_shape_transform(best_shape);
ShapeSW *body_shape = p_body->get_shape(best_shape);
@@ -1148,6 +1166,7 @@ void SpaceSW::set_param(PhysicsServer::SpaceParameter p_param, real_t p_value) {
case PhysicsServer::SPACE_PARAM_BODY_TIME_TO_SLEEP: body_time_to_sleep = p_value; break;
case PhysicsServer::SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO: body_angular_velocity_damp_ratio = p_value; break;
case PhysicsServer::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: constraint_bias = p_value; break;
+ case PhysicsServer::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH: test_motion_min_contact_depth = p_value; break;
}
}
@@ -1163,6 +1182,7 @@ real_t SpaceSW::get_param(PhysicsServer::SpaceParameter p_param) const {
case PhysicsServer::SPACE_PARAM_BODY_TIME_TO_SLEEP: return body_time_to_sleep;
case PhysicsServer::SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO: return body_angular_velocity_damp_ratio;
case PhysicsServer::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: return constraint_bias;
+ case PhysicsServer::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH: return test_motion_min_contact_depth;
}
return 0;
}
@@ -1198,6 +1218,7 @@ SpaceSW::SpaceSW() {
contact_recycle_radius = 0.01;
contact_max_separation = 0.05;
contact_max_allowed_penetration = 0.01;
+ test_motion_min_contact_depth = 0.00001;
constraint_bias = 0.01;
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_linear", 0.1);
diff --git a/servers/physics/space_sw.h b/servers/physics/space_sw.h
index ae6f349e51..3aaa552845 100644
--- a/servers/physics/space_sw.h
+++ b/servers/physics/space_sw.h
@@ -96,6 +96,7 @@ private:
real_t contact_max_separation;
real_t contact_max_allowed_penetration;
real_t constraint_bias;
+ real_t test_motion_min_contact_depth;
enum {
diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp
index ccdaf0b508..46ea0fd65d 100644
--- a/servers/physics_2d/body_pair_2d_sw.cpp
+++ b/servers/physics_2d/body_pair_2d_sw.cpp
@@ -303,7 +303,7 @@ bool BodyPair2DSW::setup(real_t p_step) {
Contact &c = contacts[i];
if (!c.reused)
continue;
- if (c.normal.dot(direction) < 0)
+ if (c.normal.dot(direction) > 0) //greater (normal inverted)
continue;
valid = true;
@@ -326,7 +326,7 @@ bool BodyPair2DSW::setup(real_t p_step) {
Contact &c = contacts[i];
if (!c.reused)
continue;
- if (c.normal.dot(direction) < 0)
+ if (c.normal.dot(direction) < 0) //less (normal ok)
continue;
valid = true;
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index 4d1c56b843..283d20876d 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -36,8 +36,8 @@
#include "core/project_settings.h"
#include "core/script_language.h"
-#define FLUSH_QUERY_CHECK \
- if (flushing_queries) { \
+#define FLUSH_QUERY_CHECK(m_object) \
+ if (m_object->get_space() && flushing_queries) { \
ERR_EXPLAIN("Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead"); \
ERR_FAIL(); \
}
@@ -410,12 +410,11 @@ void Physics2DServerSW::area_set_shape_transform(RID p_area, int p_shape_idx, co
void Physics2DServerSW::area_set_shape_disabled(RID p_area, int p_shape, bool p_disabled) {
- FLUSH_QUERY_CHECK
-
Area2DSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
-
ERR_FAIL_INDEX(p_shape, area->get_shape_count());
+ FLUSH_QUERY_CHECK(area);
+
area->set_shape_as_disabled(p_shape, p_disabled);
}
@@ -550,10 +549,9 @@ void Physics2DServerSW::area_set_pickable(RID p_area, bool p_pickable) {
void Physics2DServerSW::area_set_monitorable(RID p_area, bool p_monitorable) {
- FLUSH_QUERY_CHECK
-
Area2DSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
+ FLUSH_QUERY_CHECK(area);
area->set_monitorable(p_monitorable);
}
@@ -630,10 +628,9 @@ RID Physics2DServerSW::body_get_space(RID p_body) const {
void Physics2DServerSW::body_set_mode(RID p_body, BodyMode p_mode) {
- FLUSH_QUERY_CHECK
-
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
+ FLUSH_QUERY_CHECK(body);
body->set_mode(p_mode);
};
@@ -734,12 +731,10 @@ void Physics2DServerSW::body_clear_shapes(RID p_body) {
void Physics2DServerSW::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) {
- FLUSH_QUERY_CHECK
-
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
-
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
+ FLUSH_QUERY_CHECK(body);
body->set_shape_as_disabled(p_shape_idx, p_disabled);
}
@@ -747,8 +742,8 @@ void Physics2DServerSW::body_set_shape_as_one_way_collision(RID p_body, int p_sh
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
-
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
+ FLUSH_QUERY_CHECK(body);
body->set_shape_as_one_way_collision(p_shape_idx, p_enable, p_margin);
}
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 558700f400..56b87f620c 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -31,7 +31,7 @@
#include "shape_2d_sw.h"
#include "core/math/geometry.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
void Shape2DSW::configure(const Rect2 &p_aabb) {
aabb = p_aabb;
@@ -369,8 +369,11 @@ void RectangleShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_suppor
}
bool RectangleShape2DSW::contains_point(const Vector2 &p_point) const {
-
- return Math::abs(p_point.x) < half_extents.x && Math::abs(p_point.y) < half_extents.y;
+ float x = p_point.x;
+ float y = p_point.y;
+ float edge_x = half_extents.x;
+ float edge_y = half_extents.y;
+ return (x >= -edge_x) && (x < edge_x) && (y >= -edge_y) && (y < edge_y);
}
bool RectangleShape2DSW::intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const {
@@ -775,22 +778,22 @@ bool ConcavePolygonShape2DSW::intersect_segment(const Vector2 &p_begin, const Ve
while (true) {
uint32_t node = stack[level] & NODE_IDX_MASK;
- const BVH &b = bvhptr[node];
+ const BVH &bvh = bvhptr[node];
bool done = false;
switch (stack[level] >> VISITED_BIT_SHIFT) {
case TEST_AABB_BIT: {
- bool valid = b.aabb.intersects_segment(p_begin, p_end);
+ bool valid = bvh.aabb.intersects_segment(p_begin, p_end);
if (!valid) {
stack[level] = (VISIT_DONE_BIT << VISITED_BIT_SHIFT) | node;
} else {
- if (b.left < 0) {
+ if (bvh.left < 0) {
- const Segment &s = segmentptr[b.right];
+ const Segment &s = segmentptr[bvh.right];
Vector2 a = pointptr[s.points[0]];
Vector2 b = pointptr[s.points[1]];
@@ -820,14 +823,14 @@ bool ConcavePolygonShape2DSW::intersect_segment(const Vector2 &p_begin, const Ve
case VISIT_LEFT_BIT: {
stack[level] = (VISIT_RIGHT_BIT << VISITED_BIT_SHIFT) | node;
- stack[level + 1] = b.left | TEST_AABB_BIT;
+ stack[level + 1] = bvh.left | TEST_AABB_BIT;
level++;
}
continue;
case VISIT_RIGHT_BIT: {
stack[level] = (VISIT_DONE_BIT << VISITED_BIT_SHIFT) | node;
- stack[level + 1] = b.right | TEST_AABB_BIT;
+ stack[level + 1] = bvh.right | TEST_AABB_BIT;
level++;
}
continue;
@@ -1025,21 +1028,21 @@ void ConcavePolygonShape2DSW::cull(const Rect2 &p_local_aabb, Callback p_callbac
while (true) {
uint32_t node = stack[level] & NODE_IDX_MASK;
- const BVH &b = bvhptr[node];
+ const BVH &bvh = bvhptr[node];
switch (stack[level] >> VISITED_BIT_SHIFT) {
case TEST_AABB_BIT: {
- bool valid = p_local_aabb.intersects(b.aabb);
+ bool valid = p_local_aabb.intersects(bvh.aabb);
if (!valid) {
stack[level] = (VISIT_DONE_BIT << VISITED_BIT_SHIFT) | node;
} else {
- if (b.left < 0) {
+ if (bvh.left < 0) {
- const Segment &s = segmentptr[b.right];
+ const Segment &s = segmentptr[bvh.right];
Vector2 a = pointptr[s.points[0]];
Vector2 b = pointptr[s.points[1]];
@@ -1058,14 +1061,14 @@ void ConcavePolygonShape2DSW::cull(const Rect2 &p_local_aabb, Callback p_callbac
case VISIT_LEFT_BIT: {
stack[level] = (VISIT_RIGHT_BIT << VISITED_BIT_SHIFT) | node;
- stack[level + 1] = b.left | TEST_AABB_BIT;
+ stack[level + 1] = bvh.left | TEST_AABB_BIT;
level++;
}
continue;
case VISIT_RIGHT_BIT: {
stack[level] = (VISIT_DONE_BIT << VISITED_BIT_SHIFT) | node;
- stack[level + 1] = b.right | TEST_AABB_BIT;
+ stack[level + 1] = bvh.right | TEST_AABB_BIT;
level++;
}
continue;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 5ed70803ed..831764b40c 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -280,7 +280,7 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transfor
real_t hi = 1;
Vector2 mnormal = p_motion.normalized();
- for (int i = 0; i < 8; i++) { //steps should be customizable..
+ for (int j = 0; j < 8; j++) { //steps should be customizable..
real_t ofs = (low + hi) * 0.5;
@@ -375,6 +375,7 @@ struct _RestCallbackData2D {
real_t best_len;
Vector2 valid_dir;
real_t valid_depth;
+ real_t min_allowed_depth;
};
static void _rest_cbk_result(const Vector2 &p_point_A, const Vector2 &p_point_B, void *p_userdata) {
@@ -390,6 +391,10 @@ static void _rest_cbk_result(const Vector2 &p_point_A, const Vector2 &p_point_B,
Vector2 contact_rel = p_point_B - p_point_A;
real_t len = contact_rel.length();
+
+ if (len < rd->min_allowed_depth)
+ return;
+
if (len <= rd->best_len)
return;
@@ -416,6 +421,7 @@ bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Transform2D &p_sh
rcd.best_len = 0;
rcd.best_object = NULL;
rcd.best_shape = 0;
+ rcd.min_allowed_depth = space->test_motion_min_contact_depth;
for (int i = 0; i < amount; i++) {
@@ -512,6 +518,9 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
if (p_body->is_shape_set_as_disabled(i))
continue;
+ if (p_body->get_shape(i)->get_type() != Physics2DServer::SHAPE_RAY)
+ continue;
+
if (!shapes_found) {
body_aabb = p_body->get_shape_aabb(i);
shapes_found = true;
@@ -555,7 +564,6 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
bool collided = false;
int amount = _cull_aabb_for_body(p_body, body_aabb);
- int ray_index = 0;
for (int j = 0; j < p_body->get_shape_count(); j++) {
if (p_body->is_shape_set_as_disabled(j))
@@ -587,6 +595,10 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
Transform2D col_obj_shape_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx);
+ /*
+ * There is no point in supporting one way collisions with ray shapes, as they will always collide in the desired
+ * direction. Use a short ray shape if you want to achieve a similar effect.
+ *
if (col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized();
@@ -594,10 +606,15 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
cbk.invalid_by_dir = 0;
} else {
- cbk.valid_dir = Vector2();
- cbk.valid_depth = 0;
- cbk.invalid_by_dir = 0;
+*/
+
+ cbk.valid_dir = Vector2();
+ cbk.valid_depth = 0;
+ cbk.invalid_by_dir = 0;
+
+ /*
}
+ */
Shape2DSW *against_shape = col_obj->get_shape(shape_idx);
if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj_shape_xform, Vector2(), cbkres, cbkptr, NULL, p_margin)) {
@@ -605,7 +622,20 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
collided = true;
}
- if (ray_index < p_result_max) {
+ int ray_index = -1; //reuse shape
+ for (int k = 0; k < rays_found; k++) {
+ if (r_results[ray_index].collision_local_shape == j) {
+ ray_index = k;
+ }
+ }
+
+ if (ray_index == -1 && rays_found < p_result_max) {
+ ray_index = rays_found;
+ rays_found++;
+ }
+
+ if (ray_index != -1) {
+
Physics2DServer::SeparationResult &result = r_results[ray_index];
for (int k = 0; k < cbk.amount; k++) {
@@ -620,7 +650,8 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
result.collision_depth = depth;
result.collision_point = b;
result.collision_normal = (b - a).normalized();
- result.collision_local_shape = shape_idx;
+ result.collision_local_shape = j;
+ result.collider_shape = shape_idx;
result.collider = col_obj->get_self();
result.collider_id = col_obj->get_instance_id();
result.collider_metadata = col_obj->get_shape_metadata(shape_idx);
@@ -635,12 +666,8 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
}
}
}
-
- ray_index++;
}
- rays_found = MAX(ray_index, rays_found);
-
if (!collided || recover_motion == Vector2()) {
break;
}
@@ -686,6 +713,9 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
if (p_body->is_shape_set_as_disabled(i))
continue;
+ if (p_exclude_raycast_shapes && p_body->get_shape(i)->get_type() == Physics2DServer::SHAPE_RAY)
+ continue;
+
if (!shapes_found) {
body_aabb = p_body->get_shape_aabb(i);
shapes_found = true;
@@ -695,6 +725,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
}
if (!shapes_found) {
+ if (r_result) {
+ *r_result = Physics2DServer::MotionResult();
+ r_result->motion = p_motion;
+ }
return false;
}
@@ -990,15 +1024,24 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
rcd.best_len = 0;
rcd.best_object = NULL;
rcd.best_shape = 0;
+ rcd.min_allowed_depth = test_motion_min_contact_depth;
//optimization
int from_shape = best_shape != -1 ? best_shape : 0;
int to_shape = best_shape != -1 ? best_shape + 1 : p_body->get_shape_count();
for (int j = from_shape; j < to_shape; j++) {
+
+ if (p_body->is_shape_set_as_disabled(j))
+ continue;
+
Transform2D body_shape_xform = ugt * p_body->get_shape_transform(j);
Shape2DSW *body_shape = p_body->get_shape(j);
+ if (p_exclude_raycast_shapes && body_shape->get_type() == Physics2DServer::SHAPE_RAY) {
+ continue;
+ }
+
body_aabb.position += p_motion * unsafe;
int amount = _cull_aabb_for_body(p_body, body_aabb);
@@ -1249,6 +1292,7 @@ void Space2DSW::set_param(Physics2DServer::SpaceParameter p_param, real_t p_valu
case Physics2DServer::SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD: body_angular_velocity_sleep_threshold = p_value; break;
case Physics2DServer::SPACE_PARAM_BODY_TIME_TO_SLEEP: body_time_to_sleep = p_value; break;
case Physics2DServer::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: constraint_bias = p_value; break;
+ case Physics2DServer::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH: test_motion_min_contact_depth = p_value; break;
}
}
@@ -1263,6 +1307,7 @@ real_t Space2DSW::get_param(Physics2DServer::SpaceParameter p_param) const {
case Physics2DServer::SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD: return body_angular_velocity_sleep_threshold;
case Physics2DServer::SPACE_PARAM_BODY_TIME_TO_SLEEP: return body_time_to_sleep;
case Physics2DServer::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: return constraint_bias;
+ case Physics2DServer::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH: return test_motion_min_contact_depth;
}
return 0;
}
@@ -1299,6 +1344,7 @@ Space2DSW::Space2DSW() {
contact_recycle_radius = 1.0;
contact_max_separation = 1.5;
contact_max_allowed_penetration = 0.3;
+ test_motion_min_contact_depth = 0.005;
constraint_bias = 0.2;
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0);
diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h
index 64f8c9e156..14c24959b7 100644
--- a/servers/physics_2d/space_2d_sw.h
+++ b/servers/physics_2d/space_2d_sw.h
@@ -104,6 +104,7 @@ private:
real_t contact_max_separation;
real_t contact_max_allowed_penetration;
real_t constraint_bias;
+ real_t test_motion_min_contact_depth;
enum {
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index ca914b67e0..3a05791f17 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -693,6 +693,7 @@ void Physics2DServer::_bind_methods() {
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD);
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH);
BIND_ENUM_CONSTANT(SHAPE_LINE);
BIND_ENUM_CONSTANT(SHAPE_RAY);
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index df7fe46f76..1de9c7df93 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -289,6 +289,7 @@ public:
SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD,
SPACE_PARAM_BODY_TIME_TO_SLEEP,
SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS,
+ SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH,
};
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) = 0;
@@ -504,6 +505,12 @@ public:
RID collider;
int collider_shape;
Variant collider_metadata;
+
+ MotionResult() {
+ collision_local_shape = 0;
+ collider_shape = 0;
+ collider_id = 0;
+ }
};
virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin = 0.001, MotionResult *r_result = NULL, bool p_exclude_raycast_shapes = true) = 0;
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 967e74d322..0629af663e 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -709,6 +709,8 @@ void PhysicsServer::_bind_methods() {
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO);
BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH);
+
BIND_ENUM_CONSTANT(BODY_AXIS_LINEAR_X);
BIND_ENUM_CONSTANT(BODY_AXIS_LINEAR_Y);
BIND_ENUM_CONSTANT(BODY_AXIS_LINEAR_Z);
@@ -737,11 +739,11 @@ const String PhysicsServerManager::setting_property_name("physics/3d/physics_eng
void PhysicsServerManager::on_servers_changed() {
- String physics_servers("DEFAULT");
+ String physics_servers2("DEFAULT");
for (int i = get_servers_count() - 1; 0 <= i; --i) {
- physics_servers += "," + get_server_name(i);
+ physics_servers2 += "," + get_server_name(i);
}
- ProjectSettings::get_singleton()->set_custom_property_info(setting_property_name, PropertyInfo(Variant::STRING, setting_property_name, PROPERTY_HINT_ENUM, physics_servers));
+ ProjectSettings::get_singleton()->set_custom_property_info(setting_property_name, PropertyInfo(Variant::STRING, setting_property_name, PROPERTY_HINT_ENUM, physics_servers2));
}
void PhysicsServerManager::register_server(const String &p_name, CreatePhysicsServerCallback p_creat_callback) {
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 4ba096a994..c71bb01943 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -274,6 +274,7 @@ public:
SPACE_PARAM_BODY_TIME_TO_SLEEP,
SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO,
SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS,
+ SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH
};
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) = 0;
@@ -492,6 +493,11 @@ public:
RID collider;
int collider_shape;
Variant collider_metadata;
+ MotionResult() {
+ collision_local_shape = 0;
+ collider_id = 0;
+ collider_shape = 0;
+ }
};
virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = NULL, bool p_exclude_raycast_shapes = true) = 0;
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index 4e167be300..0cc1cc119c 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -73,7 +73,11 @@ static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsag
usage.vram = E->get().bytes;
usage.id = E->get().texture;
usage.type = "Texture";
- usage.format = itos(E->get().width) + "x" + itos(E->get().height) + " " + Image::get_format_name(E->get().format);
+ if (E->get().depth == 0) {
+ usage.format = itos(E->get().width) + "x" + itos(E->get().height) + " " + Image::get_format_name(E->get().format);
+ } else {
+ usage.format = itos(E->get().width) + "x" + itos(E->get().height) + "x" + itos(E->get().depth) + " " + Image::get_format_name(E->get().format);
+ }
r_usage->push_back(usage);
}
}
@@ -88,8 +92,21 @@ Physics2DServer *_createGodotPhysics2DCallback() {
return Physics2DServerWrapMT::init_server<Physics2DServerSW>();
}
+static bool has_server_feature_callback(const String &p_feature) {
+
+ if (VisualServer::get_singleton()) {
+ if (VisualServer::get_singleton()->has_os_feature(p_feature)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
void register_server_types() {
+ OS::get_singleton()->set_has_server_feature_callback(has_server_feature_callback);
+
ClassDB::register_virtual_class<VisualServer>();
ClassDB::register_class<AudioServer>();
ClassDB::register_virtual_class<PhysicsServer>();
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 33081dcd0c..dd54698471 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -355,6 +355,7 @@ public:
virtual void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) = 0;
virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const = 0;
virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) = 0;
+ virtual void skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_world_transform) = 0;
/* Light API */
@@ -870,7 +871,7 @@ public:
Rect2 global_rect_cache;
const Rect2 &get_rect() const {
- if (custom_rect || !rect_dirty)
+ if (custom_rect || (!rect_dirty && !update_when_visible))
return rect;
//must update rect
@@ -940,9 +941,8 @@ public:
const Item::CommandPrimitive *primitive = static_cast<const Item::CommandPrimitive *>(c);
r.position = primitive->points[0];
- for (int i = 1; i < primitive->points.size(); i++) {
-
- r.expand_to(primitive->points[i]);
+ for (int j = 1; j < primitive->points.size(); j++) {
+ r.expand_to(primitive->points[j]);
}
} break;
case Item::Command::TYPE_POLYGON: {
@@ -951,9 +951,8 @@ public:
int l = polygon->points.size();
const Point2 *pp = &polygon->points[0];
r.position = pp[0];
- for (int i = 1; i < l; i++) {
-
- r.expand_to(pp[i]);
+ for (int j = 1; j < l; j++) {
+ r.expand_to(pp[j]);
}
} break;
case Item::Command::TYPE_MESH: {
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index c2dae7c2d5..1f9d263354 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -2075,7 +2075,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p
for (int i = 0; i < argcount; i++) {
if (get_scalar_type(args[i]) == args[i] && p_func->arguments[i + 1]->type == Node::TYPE_CONSTANT && convert_constant(static_cast<ConstantNode *>(p_func->arguments[i + 1]), builtin_func_defs[idx].args[i])) {
- //all good
+ //all good, but needs implicit conversion later
} else if (args[i] != builtin_func_defs[idx].args[i]) {
fail = true;
break;
@@ -2121,6 +2121,24 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p
outarg_idx++;
}
+ //implicitly convert values if possible
+ for (int i = 0; i < argcount; i++) {
+
+ if (get_scalar_type(args[i]) != args[i] || args[i] == builtin_func_defs[idx].args[i] || p_func->arguments[i + 1]->type != Node::TYPE_CONSTANT) {
+ //can't do implicit conversion here
+ continue;
+ }
+
+ //this is an implicit conversion
+ ConstantNode *constant = static_cast<ConstantNode *>(p_func->arguments[i + 1]);
+ ConstantNode *conversion = alloc_node<ConstantNode>();
+
+ conversion->datatype = builtin_func_defs[idx].args[i];
+ conversion->values.resize(1);
+
+ convert_constant(constant, builtin_func_defs[idx].args[i], conversion->values.ptrw());
+ p_func->arguments.write[i + 1] = conversion;
+ }
if (r_ret_type)
*r_ret_type = builtin_func_defs[idx].rettype;
@@ -2184,17 +2202,37 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p
bool fail = false;
- for (int i = 0; i < args.size(); i++) {
+ for (int j = 0; j < args.size(); j++) {
- if (get_scalar_type(args[i]) == args[i] && p_func->arguments[i + 1]->type == Node::TYPE_CONSTANT && convert_constant(static_cast<ConstantNode *>(p_func->arguments[i + 1]), pfunc->arguments[i].type)) {
- //all good
- } else if (args[i] != pfunc->arguments[i].type) {
+ if (get_scalar_type(args[j]) == args[j] && p_func->arguments[j + 1]->type == Node::TYPE_CONSTANT && convert_constant(static_cast<ConstantNode *>(p_func->arguments[j + 1]), pfunc->arguments[j].type)) {
+ //all good, but it needs implicit conversion later
+ } else if (args[j] != pfunc->arguments[j].type) {
fail = true;
break;
}
}
if (!fail) {
+
+ //implicitly convert values if possible
+ for (int k = 0; k < args.size(); k++) {
+
+ if (get_scalar_type(args[k]) != args[k] || args[k] == pfunc->arguments[k].type || p_func->arguments[k + 1]->type != Node::TYPE_CONSTANT) {
+ //can't do implicit conversion here
+ continue;
+ }
+
+ //this is an implicit conversion
+ ConstantNode *constant = static_cast<ConstantNode *>(p_func->arguments[k + 1]);
+ ConstantNode *conversion = alloc_node<ConstantNode>();
+
+ conversion->datatype = pfunc->arguments[k].type;
+ conversion->values.resize(1);
+
+ convert_constant(constant, pfunc->arguments[k].type, conversion->values.ptrw());
+ p_func->arguments.write[k + 1] = conversion;
+ }
+
if (r_ret_type)
*r_ret_type = pfunc->return_type;
return true;
@@ -2897,7 +2935,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
/* OK now see what's NEXT to the operator.. */
while (true) {
- TkPos pos = _get_tkpos();
+ TkPos pos2 = _get_tkpos();
tk = _get_token();
if (tk.type == TK_CURSOR) {
@@ -3181,7 +3219,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
expr = op;
} else {
- _set_tkpos(pos);
+ _set_tkpos(pos2);
break;
}
}
@@ -3374,10 +3412,10 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (!_validate_operator(op, &op->return_cache)) {
String at;
- for (int i = 0; i < op->arguments.size(); i++) {
- if (i > 0)
+ for (int j = 0; j < op->arguments.size(); j++) {
+ if (j > 0)
at += " and ";
- at += get_datatype_name(op->arguments[i]->get_datatype());
+ at += get_datatype_name(op->arguments[j]->get_datatype());
}
_set_error("Invalid arguments to unary operator '" + get_operator_text(op->op) + "' :" + at);
return NULL;
@@ -4103,17 +4141,17 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (uniform) {
- ShaderNode::Uniform uniform;
+ ShaderNode::Uniform uniform2;
if (is_sampler_type(type)) {
- uniform.texture_order = texture_uniforms++;
- uniform.order = -1;
+ uniform2.texture_order = texture_uniforms++;
+ uniform2.order = -1;
} else {
- uniform.texture_order = -1;
- uniform.order = uniforms++;
+ uniform2.texture_order = -1;
+ uniform2.order = uniforms++;
}
- uniform.type = type;
- uniform.precission = precision;
+ uniform2.type = type;
+ uniform2.precision = precision;
//todo parse default value
@@ -4124,26 +4162,26 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
if (tk.type == TK_HINT_WHITE_TEXTURE) {
- uniform.hint = ShaderNode::Uniform::HINT_WHITE;
+ uniform2.hint = ShaderNode::Uniform::HINT_WHITE;
} else if (tk.type == TK_HINT_BLACK_TEXTURE) {
- uniform.hint = ShaderNode::Uniform::HINT_BLACK;
+ uniform2.hint = ShaderNode::Uniform::HINT_BLACK;
} else if (tk.type == TK_HINT_NORMAL_TEXTURE) {
- uniform.hint = ShaderNode::Uniform::HINT_NORMAL;
+ uniform2.hint = ShaderNode::Uniform::HINT_NORMAL;
} else if (tk.type == TK_HINT_ANISO_TEXTURE) {
- uniform.hint = ShaderNode::Uniform::HINT_ANISO;
+ uniform2.hint = ShaderNode::Uniform::HINT_ANISO;
} else if (tk.type == TK_HINT_ALBEDO_TEXTURE) {
- uniform.hint = ShaderNode::Uniform::HINT_ALBEDO;
+ uniform2.hint = ShaderNode::Uniform::HINT_ALBEDO;
} else if (tk.type == TK_HINT_BLACK_ALBEDO_TEXTURE) {
- uniform.hint = ShaderNode::Uniform::HINT_BLACK_ALBEDO;
+ uniform2.hint = ShaderNode::Uniform::HINT_BLACK_ALBEDO;
} else if (tk.type == TK_HINT_COLOR) {
if (type != TYPE_VEC4) {
_set_error("Color hint is for vec4 only");
return ERR_PARSE_ERROR;
}
- uniform.hint = ShaderNode::Uniform::HINT_COLOR;
+ uniform2.hint = ShaderNode::Uniform::HINT_COLOR;
} else if (tk.type == TK_HINT_RANGE) {
- uniform.hint = ShaderNode::Uniform::HINT_RANGE;
+ uniform2.hint = ShaderNode::Uniform::HINT_RANGE;
if (type != TYPE_FLOAT && type != TYPE_INT) {
_set_error("Range hint is for float and int only");
return ERR_PARSE_ERROR;
@@ -4169,8 +4207,8 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
return ERR_PARSE_ERROR;
}
- uniform.hint_range[0] = tk.constant;
- uniform.hint_range[0] *= sign;
+ uniform2.hint_range[0] = tk.constant;
+ uniform2.hint_range[0] *= sign;
tk = _get_token();
@@ -4193,8 +4231,8 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
return ERR_PARSE_ERROR;
}
- uniform.hint_range[1] = tk.constant;
- uniform.hint_range[1] *= sign;
+ uniform2.hint_range[1] = tk.constant;
+ uniform2.hint_range[1] *= sign;
tk = _get_token();
@@ -4206,13 +4244,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
return ERR_PARSE_ERROR;
}
- uniform.hint_range[2] = tk.constant;
+ uniform2.hint_range[2] = tk.constant;
tk = _get_token();
} else {
if (type == TYPE_INT) {
- uniform.hint_range[2] = 1;
+ uniform2.hint_range[2] = 1;
} else {
- uniform.hint_range[2] = 0.001;
+ uniform2.hint_range[2] = 0.001;
}
}
@@ -4225,7 +4263,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
_set_error("Expected valid type hint after ':'.");
}
- if (uniform.hint != ShaderNode::Uniform::HINT_RANGE && uniform.hint != ShaderNode::Uniform::HINT_NONE && uniform.hint != ShaderNode::Uniform::HINT_COLOR && type <= TYPE_MAT4) {
+ if (uniform2.hint != ShaderNode::Uniform::HINT_RANGE && uniform2.hint != ShaderNode::Uniform::HINT_NONE && uniform2.hint != ShaderNode::Uniform::HINT_COLOR && type <= TYPE_MAT4) {
_set_error("This hint is only for sampler types");
return ERR_PARSE_ERROR;
}
@@ -4245,16 +4283,16 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
ConstantNode *cn = static_cast<ConstantNode *>(expr);
- uniform.default_value.resize(cn->values.size());
+ uniform2.default_value.resize(cn->values.size());
- if (!convert_constant(cn, uniform.type, uniform.default_value.ptrw())) {
- _set_error("Can't convert constant to " + get_datatype_name(uniform.type));
+ if (!convert_constant(cn, uniform2.type, uniform2.default_value.ptrw())) {
+ _set_error("Can't convert constant to " + get_datatype_name(uniform2.type));
return ERR_PARSE_ERROR;
}
tk = _get_token();
}
- shader->uniforms[name] = uniform;
+ shader->uniforms[name] = uniform2;
if (tk.type != TK_SEMICOLON) {
_set_error("Expected ';'");
@@ -4264,7 +4302,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
ShaderNode::Varying varying;
varying.type = type;
- varying.precission = precision;
+ varying.precision = precision;
varying.interpolation = interpolation;
shader->varyings[name] = varying;
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h
index b908f9539b..67c273d267 100644
--- a/servers/visual/shader_language.h
+++ b/servers/visual/shader_language.h
@@ -33,7 +33,7 @@
#include "core/list.h"
#include "core/map.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/typedefs.h"
#include "core/ustring.h"
#include "core/variant.h"
@@ -42,7 +42,6 @@ class ShaderLanguage {
public:
enum TokenType {
-
TK_EMPTY,
TK_IDENTIFIER,
TK_TRUE,
@@ -267,18 +266,15 @@ public:
FLOW_OP_SWITCH,
FLOW_OP_CONTINUE,
FLOW_OP_DISCARD
-
};
enum ArgumentQualifier {
ARGUMENT_QUALIFIER_IN,
ARGUMENT_QUALIFIER_OUT,
ARGUMENT_QUALIFIER_INOUT,
-
};
struct Node {
-
Node *next;
enum Type {
@@ -296,7 +292,9 @@ public:
Type type;
virtual DataType get_datatype() const { return TYPE_VOID; }
-
+ Node(Type t) :
+ next(NULL),
+ type(t) {}
virtual ~Node() {}
};
@@ -311,18 +309,17 @@ public:
Node *nodes;
struct OperatorNode : public Node {
-
DataType return_cache;
DataPrecision return_precision_cache;
Operator op;
Vector<Node *> arguments;
virtual DataType get_datatype() const { return return_cache; }
- OperatorNode() {
- type = TYPE_OPERATOR;
- return_cache = TYPE_VOID;
- return_precision_cache = PRECISION_DEFAULT;
- }
+ OperatorNode() :
+ Node(TYPE_OPERATOR),
+ return_cache(TYPE_VOID),
+ return_precision_cache(PRECISION_DEFAULT),
+ op(OP_EQUAL) {}
};
struct VariableNode : public Node {
@@ -330,20 +327,16 @@ public:
StringName name;
virtual DataType get_datatype() const { return datatype_cache; }
- VariableNode() {
-
- type = TYPE_VARIABLE;
- datatype_cache = TYPE_VOID;
- }
+ VariableNode() :
+ Node(TYPE_VARIABLE),
+ datatype_cache(TYPE_VOID) {}
};
struct VariableDeclarationNode : public Node {
-
DataPrecision precision;
DataType datatype;
struct Declaration {
-
StringName name;
Node *initializer;
};
@@ -351,13 +344,13 @@ public:
Vector<Declaration> declarations;
virtual DataType get_datatype() const { return datatype; }
- VariableDeclarationNode() {
- type = TYPE_VARIABLE_DECLARATION;
- }
+ VariableDeclarationNode() :
+ Node(TYPE_VARIABLE_DECLARATION),
+ precision(PRECISION_DEFAULT),
+ datatype(TYPE_VOID) {}
};
struct ConstantNode : public Node {
-
DataType datatype;
union Value {
@@ -370,7 +363,9 @@ public:
Vector<Value> values;
virtual DataType get_datatype() const { return datatype; }
- ConstantNode() { type = TYPE_CONSTANT; }
+ ConstantNode() :
+ Node(TYPE_CONSTANT),
+ datatype(TYPE_VOID) {}
};
struct FunctionNode;
@@ -388,39 +383,41 @@ public:
Map<StringName, Variable> variables;
List<Node *> statements;
bool single_statement;
- BlockNode() {
- type = TYPE_BLOCK;
- parent_block = NULL;
- parent_function = NULL;
- single_statement = false;
- }
+
+ BlockNode() :
+ Node(TYPE_BLOCK),
+ parent_function(NULL),
+ parent_block(NULL),
+ single_statement(false) {}
};
struct ControlFlowNode : public Node {
-
FlowOperation flow_op;
Vector<Node *> expressions;
Vector<BlockNode *> blocks;
- ControlFlowNode() {
- type = TYPE_CONTROL_FLOW;
- flow_op = FLOW_OP_IF;
- }
+
+ ControlFlowNode() :
+ Node(TYPE_CONTROL_FLOW),
+ flow_op(FLOW_OP_IF) {}
};
struct MemberNode : public Node {
-
DataType basetype;
DataType datatype;
StringName name;
Node *owner;
+
virtual DataType get_datatype() const { return datatype; }
- MemberNode() { type = TYPE_MEMBER; }
+
+ MemberNode() :
+ Node(TYPE_MEMBER),
+ basetype(TYPE_VOID),
+ datatype(TYPE_VOID),
+ owner(NULL) {}
};
struct FunctionNode : public Node {
-
struct Argument {
-
ArgumentQualifier qualifier;
StringName name;
DataType type;
@@ -434,16 +431,15 @@ public:
BlockNode *body;
bool can_discard;
- FunctionNode() {
- type = TYPE_FUNCTION;
- return_type = TYPE_VOID;
- return_precision = PRECISION_DEFAULT;
- can_discard = false;
- }
+ FunctionNode() :
+ Node(TYPE_FUNCTION),
+ return_type(TYPE_VOID),
+ return_precision(PRECISION_DEFAULT),
+ body(NULL),
+ can_discard(false) {}
};
struct ShaderNode : public Node {
-
struct Function {
StringName name;
FunctionNode *function;
@@ -454,7 +450,12 @@ public:
struct Varying {
DataType type;
DataInterpolation interpolation;
- DataPrecision precission;
+ DataPrecision precision;
+
+ Varying() :
+ type(TYPE_VOID),
+ interpolation(INTERPOLATION_FLAT),
+ precision(PRECISION_DEFAULT) {}
};
struct Uniform {
@@ -474,16 +475,20 @@ public:
int order;
int texture_order;
DataType type;
- DataPrecision precission;
+ DataPrecision precision;
Vector<ConstantNode::Value> default_value;
Hint hint;
float hint_range[3];
- Uniform() {
- hint = HINT_NONE;
- hint_range[0] = 0;
- hint_range[1] = 1;
- hint_range[2] = 0.001;
+ Uniform() :
+ order(0),
+ texture_order(0),
+ type(TYPE_VOID),
+ precision(PRECISION_DEFAULT),
+ hint(HINT_NONE) {
+ hint_range[0] = 0.0f;
+ hint_range[1] = 1.0f;
+ hint_range[2] = 0.001f;
}
};
@@ -493,11 +498,11 @@ public:
Vector<Function> functions;
- ShaderNode() { type = TYPE_SHADER; }
+ ShaderNode() :
+ Node(TYPE_SHADER) {}
};
struct Expression {
-
bool is_op;
union {
Operator op;
@@ -506,7 +511,6 @@ public:
};
struct VarInfo {
-
StringName name;
DataType type;
};
@@ -522,7 +526,6 @@ public:
};
struct Token {
-
TokenType type;
StringName text;
double constant;
@@ -556,11 +559,14 @@ public:
struct BuiltInInfo {
DataType type;
bool constant;
- BuiltInInfo() {}
- BuiltInInfo(DataType p_type, bool p_constant = false) {
- type = p_type;
- constant = p_constant;
- }
+
+ BuiltInInfo() :
+ type(TYPE_VOID),
+ constant(false) {}
+
+ BuiltInInfo(DataType p_type, bool p_constant = false) :
+ type(p_type),
+ constant(p_constant) {}
};
struct FunctionInfo {
@@ -573,6 +579,7 @@ private:
TokenType token;
const char *text;
};
+
static const KeyWord keyword_list[];
bool error_set;
@@ -628,22 +635,18 @@ private:
};
bool _find_identifier(const BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, const StringName &p_identifier, DataType *r_data_type = NULL, IdentifierType *r_type = NULL);
-
bool _is_operator_assign(Operator p_op) const;
bool _validate_assign(Node *p_node, const Map<StringName, BuiltInInfo> &p_builtin_types, String *r_message = NULL);
-
bool _validate_operator(OperatorNode *p_op, DataType *r_ret_type = NULL);
struct BuiltinFuncDef {
-
enum { MAX_ARGS = 5 };
const char *name;
DataType rettype;
const DataType args[MAX_ARGS];
};
- struct BuiltinFuncOutArgs { //arguments used as out in built in funcions
-
+ struct BuiltinFuncOutArgs { //arguments used as out in built in functions
const char *name;
int argument;
};
@@ -656,20 +659,17 @@ private:
int completion_argument;
bool _get_completable_identifier(BlockNode *p_block, CompletionType p_type, StringName &identifier);
-
static const BuiltinFuncDef builtin_func_defs[];
static const BuiltinFuncOutArgs builtin_func_out_args[];
- bool _validate_function_call(BlockNode *p_block, OperatorNode *p_func, DataType *r_ret_type);
+ bool _validate_function_call(BlockNode *p_block, OperatorNode *p_func, DataType *r_ret_type);
bool _parse_function_arguments(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, OperatorNode *p_func, int *r_complete_arg = NULL);
Node *_parse_expression(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types);
-
ShaderLanguage::Node *_reduce_expression(BlockNode *p_block, ShaderLanguage::Node *p_node);
- Node *_parse_and_reduce_expression(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types);
+ Node *_parse_and_reduce_expression(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types);
Error _parse_block(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, bool p_just_one = false, bool p_can_break = false, bool p_can_continue = false);
-
Error _parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<StringName> &p_render_modes, const Set<String> &p_shader_types);
public:
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index bb02027479..85dcaa6b03 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_raster.h"
#include "visual_server_viewport.h"
@@ -267,24 +267,24 @@ void VisualServerCanvas::render_canvas(Canvas *p_canvas, const Transform2D &p_tr
for (int i = 0; i < l; i++) {
- const Canvas::ChildItem &ci = p_canvas->child_items[i];
- _render_canvas_item_tree(ci.item, p_transform, p_clip_rect, p_canvas->modulate, p_lights);
+ const Canvas::ChildItem &ci2 = p_canvas->child_items[i];
+ _render_canvas_item_tree(ci2.item, p_transform, p_clip_rect, p_canvas->modulate, p_lights);
//mirroring (useful for scrolling backgrounds)
- if (ci.mirror.x != 0) {
+ if (ci2.mirror.x != 0) {
- Transform2D xform2 = p_transform * Transform2D(0, Vector2(ci.mirror.x, 0));
- _render_canvas_item_tree(ci.item, xform2, p_clip_rect, p_canvas->modulate, p_lights);
+ Transform2D xform2 = p_transform * Transform2D(0, Vector2(ci2.mirror.x, 0));
+ _render_canvas_item_tree(ci2.item, xform2, p_clip_rect, p_canvas->modulate, p_lights);
}
- if (ci.mirror.y != 0) {
+ if (ci2.mirror.y != 0) {
- Transform2D xform2 = p_transform * Transform2D(0, Vector2(0, ci.mirror.y));
- _render_canvas_item_tree(ci.item, xform2, p_clip_rect, p_canvas->modulate, p_lights);
+ Transform2D xform2 = p_transform * Transform2D(0, Vector2(0, ci2.mirror.y));
+ _render_canvas_item_tree(ci2.item, xform2, p_clip_rect, p_canvas->modulate, p_lights);
}
- if (ci.mirror.y != 0 && ci.mirror.x != 0) {
+ if (ci2.mirror.y != 0 && ci2.mirror.x != 0) {
- Transform2D xform2 = p_transform * Transform2D(0, ci.mirror);
- _render_canvas_item_tree(ci.item, xform2, p_clip_rect, p_canvas->modulate, p_lights);
+ Transform2D xform2 = p_transform * Transform2D(0, ci2.mirror);
+ _render_canvas_item_tree(ci2.item, xform2, p_clip_rect, p_canvas->modulate, p_lights);
}
}
}
@@ -758,11 +758,12 @@ void VisualServerCanvas::canvas_item_add_triangle_array(RID p_item, const Vector
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
- int ps = p_points.size();
- ERR_FAIL_COND(!p_colors.empty() && p_colors.size() != ps && p_colors.size() != 1);
- ERR_FAIL_COND(!p_uvs.empty() && p_uvs.size() != ps);
- ERR_FAIL_COND(!p_bones.empty() && p_bones.size() != ps * 4);
- ERR_FAIL_COND(!p_weights.empty() && p_weights.size() != ps * 4);
+ int vertex_count = p_points.size();
+ ERR_FAIL_COND(vertex_count == 0);
+ ERR_FAIL_COND(!p_colors.empty() && p_colors.size() != vertex_count && p_colors.size() != 1);
+ ERR_FAIL_COND(!p_uvs.empty() && p_uvs.size() != vertex_count);
+ ERR_FAIL_COND(!p_bones.empty() && p_bones.size() != vertex_count * 4);
+ ERR_FAIL_COND(!p_weights.empty() && p_weights.size() != vertex_count * 4);
Vector<int> indices = p_indices;
@@ -770,9 +771,9 @@ void VisualServerCanvas::canvas_item_add_triangle_array(RID p_item, const Vector
if (indices.empty()) {
- ERR_FAIL_COND(ps % 3 != 0);
+ ERR_FAIL_COND(vertex_count % 3 != 0);
if (p_count == -1)
- count = ps;
+ count = vertex_count;
} else {
ERR_FAIL_COND(indices.size() % 3 != 0);
diff --git a/servers/visual/visual_server_global.cpp b/servers/visual/visual_server_globals.cpp
index 2d6d489759..5c247c7f0f 100644
--- a/servers/visual/visual_server_global.cpp
+++ b/servers/visual/visual_server_globals.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* visual_server_global.cpp */
+/* visual_server_globals.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
RasterizerStorage *VisualServerGlobals::storage = NULL;
RasterizerCanvas *VisualServerGlobals::canvas_render = NULL;
diff --git a/servers/visual/visual_server_global.h b/servers/visual/visual_server_globals.h
index b510307e81..04d52aa1eb 100644
--- a/servers/visual/visual_server_global.h
+++ b/servers/visual/visual_server_globals.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* visual_server_global.h */
+/* visual_server_globals.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef VISUALSERVERGLOBAL_H
-#define VISUALSERVERGLOBAL_H
+#ifndef VISUAL_SERVER_GLOBALS_H
+#define VISUAL_SERVER_GLOBALS_H
#include "rasterizer.h"
@@ -51,4 +51,4 @@ public:
#define VSG VisualServerGlobals
-#endif // VISUALSERVERGLOBAL_H
+#endif // VISUAL_SERVER_GLOBALS_H
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 7be3bc562d..a9ca920178 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -33,9 +33,9 @@
#include "core/io/marshalls.h"
#include "core/os/os.h"
#include "core/project_settings.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_scene.h"
// careful, these may run in different threads than the visual server
@@ -123,7 +123,6 @@ void VisualServerRaster::draw(bool p_swap_buffers, double frame_step) {
frame_drawn_callbacks.pop_front();
}
-
VS::get_singleton()->emit_signal("frame_post_draw");
}
void VisualServerRaster::sync() {
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index e6434189f9..a1204c7573 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -31,12 +31,11 @@
#ifndef VISUAL_SERVER_RASTER_H
#define VISUAL_SERVER_RASTER_H
-#include "core/allocators.h"
#include "core/math/octree.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual_server.h"
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_scene.h"
#include "visual_server_viewport.h"
/**
@@ -297,6 +296,7 @@ public:
BIND3(skeleton_bone_set_transform_2d, RID, int, const Transform2D &)
BIND2RC(Transform2D, skeleton_bone_get_transform_2d, RID, int)
BIND2(skeleton_set_base_transform_2d, RID, const Transform2D &)
+ BIND3(skeleton_set_world_transform, RID, bool, const Transform &)
/* Light API */
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index c8d64fca45..2590e29aef 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -30,7 +30,7 @@
#include "visual_server_scene.h"
#include "core/os/os.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_raster.h"
#include <new>
/* CAMERA API */
@@ -445,6 +445,9 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
InstanceGeometryData *geom = memnew(InstanceGeometryData);
instance->base_data = geom;
+ if (instance->base_type == VS::INSTANCE_MESH) {
+ instance->blend_values.resize(VSG::storage->mesh_get_blend_shape_count(p_base));
+ }
} break;
case VS::INSTANCE_REFLECTION_PROBE: {
@@ -2480,7 +2483,7 @@ void VisualServerScene::_setup_gi_probe(Instance *p_instance) {
uint32_t a = uint32_t(alpha_block[x][y]) - min_alpha;
//convert range to 3 bits
a = int((a * 7.0 / (max_alpha - min_alpha)) + 0.5);
- a = CLAMP(a, 0, 7); //just to be sure
+ a = MIN(a, 7); //just to be sure
a = 7 - a; //because range is inverted in this mode
if (a == 0) {
//do none, remain
@@ -2916,7 +2919,7 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
uint32_t idx = level_cells[j];
- uint32_t r = (uint32_t(local_data[idx].energy[0]) / probe_data->dynamic.bake_dynamic_range) >> 2;
+ uint32_t r2 = (uint32_t(local_data[idx].energy[0]) / probe_data->dynamic.bake_dynamic_range) >> 2;
uint32_t g = (uint32_t(local_data[idx].energy[1]) / probe_data->dynamic.bake_dynamic_range) >> 2;
uint32_t b = (uint32_t(local_data[idx].energy[2]) / probe_data->dynamic.bake_dynamic_range) >> 2;
uint32_t a = (cells[idx].level_alpha >> 8) & 0xFF;
@@ -2924,10 +2927,10 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
uint32_t mm_ofs = sizes[0] * sizes[1] * (local_data[idx].pos[2]) + sizes[0] * (local_data[idx].pos[1]) + (local_data[idx].pos[0]);
mm_ofs *= 4; //for RGBA (4 bytes)
- mipmapw[mm_ofs + 0] = uint8_t(CLAMP(r, 0, 255));
- mipmapw[mm_ofs + 1] = uint8_t(CLAMP(g, 0, 255));
- mipmapw[mm_ofs + 2] = uint8_t(CLAMP(b, 0, 255));
- mipmapw[mm_ofs + 3] = uint8_t(CLAMP(a, 0, 255));
+ mipmapw[mm_ofs + 0] = uint8_t(MIN(r2, 255));
+ mipmapw[mm_ofs + 1] = uint8_t(MIN(g, 255));
+ mipmapw[mm_ofs + 2] = uint8_t(MIN(b, 255));
+ mipmapw[mm_ofs + 3] = uint8_t(MIN(a, 255));
}
}
} else if (probe_data->dynamic.compression == RasterizerStorage::GI_PROBE_S3TC) {
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index 539855bdc4..7583acd88f 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -33,7 +33,6 @@
#include "servers/visual/rasterizer.h"
-#include "core/allocators.h"
#include "core/math/geometry.h"
#include "core/math/octree.h"
#include "core/os/semaphore.h"
@@ -120,7 +119,6 @@ public:
VS::ScenarioDebugMode debug;
RID self;
- // well wtf, balloon allocator is slower?
Octree<Instance, true> octree;
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index 7a7ae3a823..2c6709662f 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -32,7 +32,7 @@
#include "core/project_settings.h"
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_scene.h"
void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::Eyes p_eye) {
@@ -167,7 +167,7 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
RasterizerCanvas::Light *light = lights_with_shadow;
while (light) {
- VSG::canvas_render->canvas_light_shadow_buffer_update(light->shadow_buffer, light->xform_cache.affine_inverse(), light->item_mask, light->radius_cache / 1000.0, light->radius_cache * 1.1, occluders, &light->shadow_matrix_cache);
+ VSG::canvas_render->canvas_light_shadow_buffer_update(light->shadow_buffer, light->xform_cache.affine_inverse(), light->item_shadow_mask, light->radius_cache / 1000.0, light->radius_cache * 1.1, occluders, &light->shadow_matrix_cache);
light = light->shadows_next_ptr;
}
diff --git a/servers/visual/visual_server_viewport.h b/servers/visual/visual_server_viewport.h
index 4e3015c020..5176551540 100644
--- a/servers/visual/visual_server_viewport.h
+++ b/servers/visual/visual_server_viewport.h
@@ -90,7 +90,8 @@ public:
}
CanvasKey(const RID &p_canvas, int p_layer, int p_sublayer) {
canvas = p_canvas;
- stacking = ((int64_t)p_layer << 32) + p_sublayer;
+ int64_t sign = p_layer < 0 ? -1 : 1;
+ stacking = sign * (((int64_t)ABS(p_layer)) << 32) + p_sublayer;
}
int get_layer() const { return stacking >> 32; }
};
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index a6f0bd9d16..c6da6799a5 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -232,6 +232,7 @@ public:
FUNC3(skeleton_bone_set_transform_2d, RID, int, const Transform2D &)
FUNC2RC(Transform2D, skeleton_bone_get_transform_2d, RID, int)
FUNC2(skeleton_set_base_transform_2d, RID, const Transform2D &)
+ FUNC3(skeleton_set_world_transform, RID, bool, const Transform &)
/* Light API */
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 14c9a29ae5..19c6106502 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -776,7 +776,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
continue; //break;
ERR_FAIL_INDEX_V(idx, total_bones, ERR_INVALID_DATA);
- if (bptr->size.x < 0) {
+ if (bptr[idx].size.x < 0) {
//first
bptr[idx] = AABB(v, SMALL_VEC3);
any_valid = true;
@@ -1163,11 +1163,11 @@ void VisualServer::mesh_add_surface_from_arrays(RID p_mesh, PrimitiveType p_prim
PoolVector<uint8_t> noindex;
AABB laabb;
- Error err = _surface_set_data(p_blend_shapes[i], format & ~ARRAY_FORMAT_INDEX, offsets, total_elem_size, vertex_array_shape, array_len, noindex, 0, laabb, bone_aabb);
+ Error err2 = _surface_set_data(p_blend_shapes[i], format & ~ARRAY_FORMAT_INDEX, offsets, total_elem_size, vertex_array_shape, array_len, noindex, 0, laabb, bone_aabb);
aabb.merge_with(laabb);
- if (err) {
+ if (err2) {
ERR_EXPLAIN("Invalid blend shape array format for surface");
- ERR_FAIL_COND(err != OK);
+ ERR_FAIL_COND(err2 != OK);
}
blend_shape_data.push_back(vertex_array_shape);
@@ -2368,11 +2368,11 @@ VisualServer::VisualServer() {
//ERR_FAIL_COND(singleton);
singleton = this;
- GLOBAL_DEF("rendering/vram_compression/import_bptc", false);
- GLOBAL_DEF("rendering/vram_compression/import_s3tc", true);
- GLOBAL_DEF("rendering/vram_compression/import_etc", false);
- GLOBAL_DEF("rendering/vram_compression/import_etc2", true);
- GLOBAL_DEF("rendering/vram_compression/import_pvrtc", false);
+ GLOBAL_DEF_RST("rendering/vram_compression/import_bptc", false);
+ GLOBAL_DEF_RST("rendering/vram_compression/import_s3tc", true);
+ GLOBAL_DEF_RST("rendering/vram_compression/import_etc", false);
+ GLOBAL_DEF_RST("rendering/vram_compression/import_etc2", true);
+ GLOBAL_DEF_RST("rendering/vram_compression/import_pvrtc", false);
GLOBAL_DEF("rendering/quality/directional_shadow/size", 4096);
GLOBAL_DEF("rendering/quality/directional_shadow/size.mobile", 2048);
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 96a5d19efd..63ddc3328a 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -393,6 +393,7 @@ public:
virtual void skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) = 0;
virtual Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const = 0;
virtual void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) = 0;
+ virtual void skeleton_set_world_transform(RID p_skeleton, bool p_enable, const Transform &p_base_transform) = 0;
/* Light API */
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 738835c70a..4fb4786d67 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -19,7 +19,7 @@ comments.
## bullet
- Upstream: https://github.com/bulletphysics/bullet3
-- Version: git (126b676, 2018-12-31)
+- Version: 2.88
- License: zlib
Files extracted from upstream source:
@@ -128,7 +128,7 @@ Files extracted from upstream source:
## glad
- Upstream: https://github.com/Dav1dde/glad
-- Version: 0.1.28
+- Version: 0.1.29
- License: MIT
The files we package are automatically generated.
@@ -239,7 +239,7 @@ from the Android NDK r18.
## libwebp
- Upstream: https://chromium.googlesource.com/webm/libwebp/
-- Version: 1.0.1
+- Version: 1.0.2
- License: BSD-3-Clause
Files extracted from upstream source:
@@ -255,23 +255,25 @@ changes are marked with `// -- GODOT --` comments.
## libwebsockets
- Upstream: https://github.com/warmcat/libwebsockets
-- Version: 3.0.0
+- Version: 3.1.0
- License: LGPLv2.1 + static linking exception
File extracted from upstream source:
-- From `lib/` into `thirdparty/libwebsockets`:
+- From `lib/` into `thirdparty/libwebsockets/lib`:
- Everything from `core`
- - From `event-libs` only the `poll` subfolder
- - From `misc` only `base64-decode.c`, `getifaddrs.c`, `getifaddrs.h`, `lejp.c`, and `sha-1.c`
- - From `plat` only `lws-plat-unix.c` and `lws-plat-win.c`
+ - From `event-libs` only the `poll` subfolder and the `private.h` header
+ - From `misc` only `base64-decode.c`, `getifaddrs.c`, `getifaddrs.h`, `lejp.c`, and `sha-1.c` (and the `private.h` header)
+ - From `plat` everything from `unix` and `windows` (and the `private.h` header)
- From `roles` only `private.h`, `h1`, `http`, `listen`, `pipe`, `raw`, `ws`
- - From `roles/http` exclude `minilex.c`
+ - From `roles/http` exclude `minilex.c` and the `compression` subfolder
- From `roles/http/server` exclude `access-log.c`, `lws-spa.c`, `ranges.c`, and `rewrite.c`
- From `roles/ws` exclude `ext` folder.
- From `tls` exclude `openssl` folder.
- Also copy `win32helpers/` from `win32port/` inside `thirdparty/libwebsockets`
- A fix has been added to allow building for 32-bits UWP, replacing `GetFileSize[Ex]` and `CreateFileW` with supported functions.
There is a diff for this change in `thirdparty/libwebsockets/uwp_fixes.diff`
+- A fix to disable V6ONLY flag from IPv6 sockets (on by default on some systems) has been also applied.
+ The diff for this change can be found in `thirdparty/libwebsockets/ipv6_fixes.diff`
Important: `lws_config.h` and `lws_config_private.h` contains custom
Godot build configurations, check them out when updating.
@@ -280,22 +282,23 @@ Godot build configurations, check them out when updating.
## mbedtls
- Upstream: https://tls.mbed.org/
-- Version: 2.12.0
+- Version: 2.16.0
- License: Apache 2.0
-File extracted from upstream release tarball `mbedtls-2.12.0-apache.tgz`:
+File extracted from upstream release tarball `mbedtls-2.16.0-apache.tgz`:
- All `*.h` from `include/mbedtls/` to `thirdparty/mbedtls/include/mbedtls/`
- All `*.c` from `library/` to `thirdparty/mbedtls/library/`
- Applied the patch in `thirdparty/mbedtls/1453.diff` (PR 1453). Soon to be merged upstream. Check it out at next update.
-
+- Applied the patch in `thirdparty/mbedtls/padlock.diff`. This disables VIA padlock support which defines a symbol `unsupported` which clashses with a symbol in libwebsockets.
## miniupnpc
- Upstream: https://github.com/miniupnp/miniupnp/tree/master/miniupnpc
-- Version: 2.1 (git 25615e0, 2018-05-08) with modifications
+- Version: git (25615e0, 2018)
- License: BSD-3-Clause
-The only modified file is miniupnpcstrings.h, which was created for Godot (is usually autogenerated by cmake).
+The only modified file is miniupnpcstrings.h, which was created for Godot
+(it is usually autogenerated by cmake).
## minizip
@@ -380,7 +383,7 @@ Collection of single-file libraries used in Godot components.
- `ifaddrs-android.{cc,h}`
* Upstream: https://chromium.googlesource.com/external/webrtc/stable/talk/+/master/base/ifaddrs-android.h
- * Version: 5976650 (2013)
+ * Version: git (5976650, 2013)
* License: BSD-3-Clause
### scene
@@ -395,18 +398,18 @@ Collection of single-file libraries used in Godot components.
* License: zlib
- `stb_truetype.h`
* Upstream: https://github.com/nothings/stb
- * Version: 1.19
+ * Version: 1.21
* License: Public Domain (Unlicense) or MIT
- `stb_vorbis.c`
* Upstream: https://github.com/nothings/stb
- * Version: 1.14
+ * Version: 1.15
* License: Public Domain (Unlicense) or MIT
## nanosvg
- Upstream: https://github.com/memononen/nanosvg
-- Version: 9a74da4 (git)
+- Version: git (c1f6e20, 2018)
- License: zlib
Files extracted from the upstream source:
@@ -423,9 +426,11 @@ Files extracted from the upstream source:
Files extracted from upstream source:
-- all .c and .h files in src/ (both opus and opusfile),
- except `opus_demo.c`
+- all .c and .h files in src/ (both opus and opusfile)
- all .h files in include/ (both opus and opusfile) as opus/
+- remove unused `opus_demo.c`,
+- remove `http.c`, `wincerts.c` and `winerrno.h` (part of
+ unused libopusurl)
- celt/ and silk/ subfolders
- COPYING
@@ -433,16 +438,16 @@ Files extracted from upstream source:
## pcre2
- Upstream: http://www.pcre.org/
-- Version: 10.31
+- Version: 10.32
- License: BSD-3-Clause
Files extracted from upstream source:
- Files listed in the file NON-AUTOTOOLS-BUILD steps 1-4
-- All .h files in src/
+- All .h files in src/ apart from pcre2posix.h
+- src/pcre2_jit_compile.c
- src/pcre2_jit_match.c
- src/pcre2_jit_misc.c
-- src/pcre2_jit_maketables.c
- src/sljit/*
- AUTHORS and LICENCE
@@ -471,17 +476,6 @@ Files extracted from upstream source:
- License.txt
-## rtaudio
-
-- Upstream: http://www.music.mcgill.ca/~gary/rtaudio/
-- Version: 4.1.2
-- License: MIT-like
-
-Files extracted from upstream source:
-
-- `RtAudio.{cpp,h}`
-
-
## squish
- Upstream: https://sourceforge.net/projects/libsquish
@@ -515,7 +509,7 @@ changes are marked with `// -- GODOT --` comments.
## tinyexr
- Upstream: https://github.com/syoyo/tinyexr
-- Version: git (5ae30aa, 2018)
+- Version: git (65f9859, 2018)
- License: BSD-3-Clause
Files extracted from upstream source:
diff --git a/thirdparty/glad/LICENSE b/thirdparty/glad/LICENSE
new file mode 100644
index 0000000000..b6e2ca25b0
--- /dev/null
+++ b/thirdparty/glad/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2018 David Herberth
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/thirdparty/glad/glad.c b/thirdparty/glad/glad.c
index 8cc09e46e1..e7c64a7e17 100644
--- a/thirdparty/glad/glad.c
+++ b/thirdparty/glad/glad.c
@@ -1,6 +1,6 @@
/*
- OpenGL loader generated by glad 0.1.28 on Thu Nov 22 16:50:04 2018.
+ OpenGL loader generated by glad 0.1.29 on Mon Mar 4 12:47:22 2019.
Language/Generator: C/C++
Specification: gl
@@ -180,11 +180,7 @@ static int get_exts(void) {
num_exts_i = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i);
if (num_exts_i > 0) {
- char **tmp_exts_i = (char **)realloc((void *)exts_i, (size_t)num_exts_i * (sizeof *exts_i));
- if (tmp_exts_i == NULL) {
- return 0;
- }
- exts_i = tmp_exts_i;
+ exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i));
}
if (exts_i == NULL) {
diff --git a/thirdparty/glad/glad/glad.h b/thirdparty/glad/glad/glad.h
index 52b05e0ae6..6345de6f7a 100644
--- a/thirdparty/glad/glad/glad.h
+++ b/thirdparty/glad/glad/glad.h
@@ -1,6 +1,6 @@
/*
- OpenGL loader generated by glad 0.1.28 on Thu Nov 22 16:50:04 2018.
+ OpenGL loader generated by glad 0.1.29 on Mon Mar 4 12:47:22 2019.
Language/Generator: C/C++
Specification: gl
diff --git a/thirdparty/libpng/LICENSE b/thirdparty/libpng/LICENSE
index 6ee9c8f554..62ab8e48dc 100644
--- a/thirdparty/libpng/LICENSE
+++ b/thirdparty/libpng/LICENSE
@@ -1,14 +1,43 @@
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+=========================================
-This copy of the libpng notices is provided for your convenience. In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
+PNG Reference Library License version 2
+---------------------------------------
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+ * Copyright (c) 1995-2018 The PNG Reference Library Authors.
+ * Copyright (c) 2018 Cosmin Truta.
+ * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ * Copyright (c) 1996-1997 Andreas Dilger.
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
-If you modify libpng you may insert additional notices immediately following
-this sentence.
+The software is supplied "as is", without warranty of any kind,
+express or implied, including, without limitation, the warranties
+of merchantability, fitness for a particular purpose, title, and
+non-infringement. In no even shall the Copyright owners, or
+anyone distributing the software, be liable for any damages or
+other liability, whether in contract, tort or otherwise, arising
+from, out of, or in connection with the software, or the use or
+other dealings in the software, even if advised of the possibility
+of such damage.
-This code is released under the libpng license.
+Permission is hereby granted to use, copy, modify, and distribute
+this software, or portions hereof, for any purpose, without fee,
+subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+ must not claim that you wrote the original software. If you
+ use this software in a product, an acknowledgment in the product
+ documentation would be appreciated, but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+
+PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
+-----------------------------------------------------------------------
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
@@ -16,38 +45,38 @@ derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:
- Simon-Pierre Cadieux
- Eric S. Raymond
- Mans Rullgard
- Cosmin Truta
- Gilles Vollant
- James Yu
- Mandar Sahastrabuddhe
- Google Inc.
- Vadim Barkov
+ Simon-Pierre Cadieux
+ Eric S. Raymond
+ Mans Rullgard
+ Cosmin Truta
+ Gilles Vollant
+ James Yu
+ Mandar Sahastrabuddhe
+ Google Inc.
+ Vadim Barkov
and with the following additions to the disclaimer:
- There is no warranty against interference with your enjoyment of the
- library or against infringement. There is no warranty that our
- efforts or the library will fulfill any of your particular purposes
- or needs. This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and effort is with
- the user.
+ There is no warranty against interference with your enjoyment of
+ the library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is
+ with the user.
Some files in the "contrib" directory and some configure-generated
-files that are distributed with libpng have other copyright owners and
+files that are distributed with libpng have other copyright owners, and
are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
libpng-0.96, and are distributed according to the same disclaimer and
-license as libpng-0.96, with the following individuals added to the list
-of Contributing Authors:
+license as libpng-0.96, with the following individuals added to the
+list of Contributing Authors:
- Tom Lane
- Glenn Randers-Pehrson
- Willem van Schaik
+ Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
@@ -55,14 +84,14 @@ and are distributed according to the same disclaimer and license as
libpng-0.88, with the following individuals added to the list of
Contributing Authors:
- John Bowler
- Kevin Bracey
- Sam Bushell
- Magnus Holmgren
- Greg Roelofs
- Tom Tanner
+ John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner
-Some files in the "scripts" directory have other copyright owners
+Some files in the "scripts" directory have other copyright owners,
but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
@@ -71,63 +100,35 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
- Andreas Dilger
- Dave Martindale
- Guy Eric Schalnat
- Paul Schmidt
- Tim Wegner
-
-The PNG Reference Library is supplied "AS IS". The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose. The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
+ Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner
+
+The PNG Reference Library is supplied "AS IS". The Contributing
+Authors and Group 42, Inc. disclaim all warranties, expressed or
+implied, including, without limitation, the warranties of
+merchantability and of fitness for any purpose. The Contributing
+Authors and Group 42, Inc. assume no liability for direct, indirect,
+incidental, special, exemplary, or consequential damages, which may
+result from the use of the PNG Reference Library, even if advised of
+the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
- 1. The origin of this source code must not be misrepresented.
-
- 2. Altered versions must be plainly marked as such and must not
- be misrepresented as being the original source.
-
- 3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products. If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
-
-TRADEMARK:
-
-The name "libpng" has not been registered by the Copyright owner
-as a trademark in any jurisdiction. However, because libpng has
-been distributed and maintained world-wide, continually since 1995,
-the Copyright owner claims "common-law trademark protection" in any
-jurisdiction where common-law trademark is recognized.
-
-OSI CERTIFICATION:
-
-Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
-a certification mark of the Open Source Initiative. OSI has not addressed
-the additional disclaimers inserted at version 1.0.7.
+ 1. The origin of this source code must not be misrepresented.
-EXPORT CONTROL:
+ 2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
-The Copyright owner believes that the Export Control Classification
-Number (ECCN) for libpng is EAR99, which means not subject to export
-controls or International Traffic in Arms Regulations (ITAR) because
-it is open source, publicly available software, that does not contain
-any encryption software. See the EAR, paragraphs 734.3(b)(3) and
-734.7(b).
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-July 15, 2018
+The Contributing Authors and Group 42, Inc. specifically permit,
+without fee, and encourage the use of this source code as a component
+to supporting the PNG file format in commercial products. If you use
+this source code in a product, acknowledgment is not required but would
+be appreciated.
diff --git a/thirdparty/libpng/arm/arm_init.c b/thirdparty/libpng/arm/arm_init.c
index 02df812e77..a34ecdbef7 100644
--- a/thirdparty/libpng/arm/arm_init.c
+++ b/thirdparty/libpng/arm/arm_init.c
@@ -1,14 +1,15 @@
/* arm_init.c - NEON optimised filter functions
*
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
- * Last changed in libpng 1.6.22 [May 26, 2016]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
+
/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are
* called.
*/
diff --git a/thirdparty/libpng/arm/filter_neon.S b/thirdparty/libpng/arm/filter_neon.S
index 000764cd21..2308aad13e 100644
--- a/thirdparty/libpng/arm/filter_neon.S
+++ b/thirdparty/libpng/arm/filter_neon.S
@@ -1,9 +1,9 @@
/* filter_neon.S - NEON optimised filter functions
*
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2014,2017 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
- * Last changed in libpng 1.6.31 [July 27, 2017]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/arm/filter_neon_intrinsics.c b/thirdparty/libpng/arm/filter_neon_intrinsics.c
index ea7e356bcc..553c0be21c 100644
--- a/thirdparty/libpng/arm/filter_neon_intrinsics.c
+++ b/thirdparty/libpng/arm/filter_neon_intrinsics.c
@@ -1,12 +1,11 @@
/* filter_neon_intrinsics.c - NEON optimised filter functions
*
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
* Written by James Yu <james.yu at linaro.org>, October 2013.
* Based on filter_neon.S, written by Mans Rullgard, 2011.
*
- * Last changed in libpng 1.6.22 [May 26, 2016]
- *
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
@@ -19,7 +18,11 @@
/* This code requires -mfpu=neon on the command line: */
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
-#include <arm_neon.h>
+#if defined(_MSC_VER) && defined(_M_ARM64)
+# include <arm64_neon.h>
+#else
+# include <arm_neon.h>
+#endif
/* libpng row pointers are not necessarily aligned to any particular boundary,
* however this code will only work with appropriate alignment. arm/arm_init.c
@@ -33,6 +36,11 @@
* 'type'. This is written this way just to hide the GCC strict aliasing
* warning; note that the code is safe because there never is an alias between
* the input and output pointers.
+ *
+ * When compiling with MSVC ARM64, the png_ldr macro can't be passed directly
+ * to vst4_lane_u32, because of an internal compiler error inside MSVC.
+ * To avoid this compiler bug, we use a temporary variable (vdest_val) to store
+ * the result of png_ldr.
*/
#define png_ldr(type,pointer)\
(temp_pointer = png_ptr(type,pointer), *temp_pointer)
@@ -125,12 +133,15 @@ png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
uint8x8x4_t *vrpt = png_ptr(uint8x8x4_t,&vtmp);
uint8x8x4_t vrp = *vrpt;
uint32x2x4_t *temp_pointer;
+ uint32x2x4_t vdest_val;
vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]);
vdest.val[1] = vadd_u8(vdest.val[0], vrp.val[1]);
vdest.val[2] = vadd_u8(vdest.val[1], vrp.val[2]);
vdest.val[3] = vadd_u8(vdest.val[2], vrp.val[3]);
- vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0);
+
+ vdest_val = png_ldr(uint32x2x4_t, &vdest);
+ vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
}
PNG_UNUSED(prev_row)
@@ -223,6 +234,7 @@ png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
uint8x8x4_t *vrpt, *vppt;
uint8x8x4_t vrp, vpp;
uint32x2x4_t *temp_pointer;
+ uint32x2x4_t vdest_val;
vtmp = vld4_u32(png_ptr(uint32_t,rp));
vrpt = png_ptr(uint8x8x4_t,&vtmp);
@@ -240,7 +252,8 @@ png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
vdest.val[3] = vhadd_u8(vdest.val[2], vpp.val[3]);
vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]);
- vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0);
+ vdest_val = png_ldr(uint32x2x4_t, &vdest);
+ vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
}
}
@@ -359,6 +372,7 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
uint8x8x4_t *vrpt, *vppt;
uint8x8x4_t vrp, vpp;
uint32x2x4_t *temp_pointer;
+ uint32x2x4_t vdest_val;
vtmp = vld4_u32(png_ptr(uint32_t,rp));
vrpt = png_ptr(uint8x8x4_t,&vtmp);
@@ -378,7 +392,8 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
vlast = vpp.val[3];
- vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0);
+ vdest_val = png_ldr(uint32x2x4_t, &vdest);
+ vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
}
}
diff --git a/thirdparty/libpng/arm/palette_neon_intrinsics.c b/thirdparty/libpng/arm/palette_neon_intrinsics.c
new file mode 100644
index 0000000000..fa02d6a8b3
--- /dev/null
+++ b/thirdparty/libpng/arm/palette_neon_intrinsics.c
@@ -0,0 +1,149 @@
+
+/* palette_neon_intrinsics.c - NEON optimised palette expansion functions
+ *
+ * Copyright (c) 2018 Cosmin Truta
+ * Copyright (c) 2017-2018 Arm Holdings. All rights reserved.
+ * Written by Richard Townsend <Richard.Townsend@arm.com>, February 2017.
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+#include "../pngpriv.h"
+
+#if PNG_ARM_NEON_IMPLEMENTATION == 1
+
+#if defined(_MSC_VER) && defined(_M_ARM64)
+# include <arm64_neon.h>
+#else
+# include <arm_neon.h>
+#endif
+
+/* Build an RGBA palette from the RGB and separate alpha palettes. */
+void
+png_riffle_palette_rgba(png_structrp png_ptr, png_row_infop row_info)
+{
+ png_const_colorp palette = png_ptr->palette;
+ png_bytep riffled_palette = png_ptr->riffled_palette;
+ png_const_bytep trans_alpha = png_ptr->trans_alpha;
+ int num_trans = png_ptr->num_trans;
+ int i;
+
+ /* Initially black, opaque. */
+ uint8x16x4_t w = {{
+ vdupq_n_u8(0x00),
+ vdupq_n_u8(0x00),
+ vdupq_n_u8(0x00),
+ vdupq_n_u8(0xff),
+ }};
+
+ if (row_info->bit_depth != 8)
+ {
+ png_error(png_ptr, "bit_depth must be 8 for png_riffle_palette_rgba");
+ return;
+ }
+
+ /* First, riffle the RGB colours into a RGBA palette, the A value is
+ * set to opaque for now.
+ */
+ for (i = 0; i < (1 << row_info->bit_depth); i += 16)
+ {
+ uint8x16x3_t v = vld3q_u8((png_const_bytep)(palette + i));
+ w.val[0] = v.val[0];
+ w.val[1] = v.val[1];
+ w.val[2] = v.val[2];
+ vst4q_u8(riffled_palette + (i << 2), w);
+ }
+
+ /* Fix up the missing transparency values. */
+ for (i = 0; i < num_trans; i++)
+ riffled_palette[(i << 2) + 3] = trans_alpha[i];
+}
+
+/* Expands a palettized row into RGBA. */
+int
+png_do_expand_palette_neon_rgba(png_structrp png_ptr, png_row_infop row_info,
+ png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
+{
+ png_uint_32 row_width = row_info->width;
+ const png_uint_32 *riffled_palette =
+ (const png_uint_32 *)png_ptr->riffled_palette;
+ const png_int_32 pixels_per_chunk = 4;
+ int i;
+
+ if (row_width < pixels_per_chunk)
+ return 0;
+
+ /* This function originally gets the last byte of the output row.
+ * The NEON part writes forward from a given position, so we have
+ * to seek this back by 4 pixels x 4 bytes.
+ */
+ *ddp = *ddp - ((pixels_per_chunk * sizeof(png_uint_32)) - 1);
+
+ for (i = 0; i < row_width; i += pixels_per_chunk)
+ {
+ uint32x4_t cur;
+ png_bytep sp = *ssp - i, dp = *ddp - (i << 2);
+ cur = vld1q_dup_u32 (riffled_palette + *(sp - 3));
+ cur = vld1q_lane_u32(riffled_palette + *(sp - 2), cur, 1);
+ cur = vld1q_lane_u32(riffled_palette + *(sp - 1), cur, 2);
+ cur = vld1q_lane_u32(riffled_palette + *(sp - 0), cur, 3);
+ vst1q_u32((void *)dp, cur);
+ }
+ if (i != row_width)
+ {
+ /* Remove the amount that wasn't processed. */
+ i -= pixels_per_chunk;
+ }
+
+ /* Decrement output pointers. */
+ *ssp = *ssp - i;
+ *ddp = *ddp - (i << 2);
+ return i;
+}
+
+/* Expands a palettized row into RGB format. */
+int
+png_do_expand_palette_neon_rgb(png_structrp png_ptr, png_row_infop row_info,
+ png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
+{
+ png_uint_32 row_width = row_info->width;
+ png_const_bytep palette = (png_const_bytep)png_ptr->palette;
+ const png_uint_32 pixels_per_chunk = 8;
+ int i;
+
+ if (row_width <= pixels_per_chunk)
+ return 0;
+
+ /* Seeking this back by 8 pixels x 3 bytes. */
+ *ddp = *ddp - ((pixels_per_chunk * sizeof(png_color)) - 1);
+
+ for (i = 0; i < row_width; i += pixels_per_chunk)
+ {
+ uint8x8x3_t cur;
+ png_bytep sp = *ssp - i, dp = *ddp - ((i << 1) + i);
+ cur = vld3_dup_u8(palette + sizeof(png_color) * (*(sp - 7)));
+ cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 6)), cur, 1);
+ cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 5)), cur, 2);
+ cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 4)), cur, 3);
+ cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 3)), cur, 4);
+ cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 2)), cur, 5);
+ cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 1)), cur, 6);
+ cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 0)), cur, 7);
+ vst3_u8((void *)dp, cur);
+ }
+
+ if (i != row_width)
+ {
+ /* Remove the amount that wasn't processed. */
+ i -= pixels_per_chunk;
+ }
+
+ /* Decrement output pointers. */
+ *ssp = *ssp - i;
+ *ddp = *ddp - ((i << 1) + i);
+ return i;
+}
+
+#endif /* PNG_ARM_NEON_IMPLEMENTATION */
diff --git a/thirdparty/libpng/png.c b/thirdparty/libpng/png.c
index a25afebcc8..3dce191d17 100644
--- a/thirdparty/libpng/png.c
+++ b/thirdparty/libpng/png.c
@@ -1,10 +1,10 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_35 Your_png_h_is_not_version_1_6_35;
+typedef png_libpng_version_1_6_36 Your_png_h_is_not_version_1_6_36;
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
@@ -736,7 +736,7 @@ png_save_int_32(png_bytep buf, png_int_32 i)
int PNGAPI
png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime)
{
- static PNG_CONST char short_months[12][4] =
+ static const char short_months[12][4] =
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
@@ -814,20 +814,14 @@ png_get_copyright(png_const_structrp png_ptr)
#ifdef PNG_STRING_COPYRIGHT
return PNG_STRING_COPYRIGHT
#else
-# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.6.35 - July 15, 2018" PNG_STRING_NEWLINE \
+ "libpng version 1.6.36" PNG_STRING_NEWLINE \
+ "Copyright (c) 2018 Cosmin Truta" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
-# else
- return "libpng version 1.6.35 - July 15, 2018\
- Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson\
- Copyright (c) 1996-1997 Andreas Dilger\
- Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
-# endif
#endif
}
@@ -1121,7 +1115,7 @@ png_colorspace_set_gamma(png_const_structrp png_ptr,
png_colorspacerp colorspace, png_fixed_point gAMA)
{
/* Changed in libpng-1.5.4 to limit the values to ensure overflow can't
- * occur. Since the fixed point representation is asymetrical it is
+ * occur. Since the fixed point representation is asymmetrical it is
* possible for 1/gamma to overflow the limit of 21474 and this means the
* gamma value must be at least 5/100000 and hence at most 20000.0. For
* safety the limits here are a little narrower. The values are 0.00016 to
@@ -3134,11 +3128,11 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
/* The total output count (max) is now 4+precision */
/* Check for an exponent, if we don't need one we are
- * done and just need to terminate the string. At
- * this point exp_b10==(-1) is effectively a flag - it got
- * to '-1' because of the decrement after outputting
- * the decimal point above (the exponent required is
- * *not* -1!)
+ * done and just need to terminate the string. At this
+ * point, exp_b10==(-1) is effectively a flag: it got
+ * to '-1' because of the decrement, after outputting
+ * the decimal point above. (The exponent required is
+ * *not* -1.)
*/
if (exp_b10 >= (-1) && exp_b10 <= 2)
{
@@ -3976,18 +3970,18 @@ png_gamma_correct(png_structrp png_ptr, unsigned int value,
*/
static void
png_build_16bit_table(png_structrp png_ptr, png_uint_16pp *ptable,
- PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val)
+ unsigned int shift, png_fixed_point gamma_val)
{
/* Various values derived from 'shift': */
- PNG_CONST unsigned int num = 1U << (8U - shift);
+ unsigned int num = 1U << (8U - shift);
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
/* CSE the division and work round wacky GCC warnings (see the comments
* in png_gamma_8bit_correct for where these come from.)
*/
- PNG_CONST double fmax = 1./(((png_int_32)1 << (16U - shift))-1);
+ double fmax = 1.0 / (((png_int_32)1 << (16U - shift)) - 1);
#endif
- PNG_CONST unsigned int max = (1U << (16U - shift))-1U;
- PNG_CONST unsigned int max_by_2 = 1U << (15U-shift);
+ unsigned int max = (1U << (16U - shift)) - 1U;
+ unsigned int max_by_2 = 1U << (15U - shift);
unsigned int i;
png_uint_16pp table = *ptable =
@@ -4053,10 +4047,10 @@ png_build_16bit_table(png_structrp png_ptr, png_uint_16pp *ptable,
*/
static void
png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable,
- PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val)
+ unsigned int shift, png_fixed_point gamma_val)
{
- PNG_CONST unsigned int num = 1U << (8U - shift);
- PNG_CONST unsigned int max = (1U << (16U - shift))-1U;
+ unsigned int num = 1U << (8U - shift);
+ unsigned int max = (1U << (16U - shift))-1U;
unsigned int i;
png_uint_32 last;
@@ -4121,7 +4115,7 @@ png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable,
*/
static void
png_build_8bit_table(png_structrp png_ptr, png_bytepp ptable,
- PNG_CONST png_fixed_point gamma_val)
+ png_fixed_point gamma_val)
{
unsigned int i;
png_bytep table = *ptable = (png_bytep)png_malloc(png_ptr, 256);
diff --git a/thirdparty/libpng/png.h b/thirdparty/libpng/png.h
index 19e464cc17..8e272a0553 100644
--- a/thirdparty/libpng/png.h
+++ b/thirdparty/libpng/png.h
@@ -1,29 +1,65 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.6.35, July 15, 2018
+ * libpng version 1.6.36 - December 1, 2018
*
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
- * This code is released under the libpng license (See LICENSE, below)
+ * This code is released under the libpng license. (See LICENSE, below.)
*
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.6.35, July 15, 2018:
+ * libpng versions 0.97, January 1998, through 1.6.35, July 2018:
* Glenn Randers-Pehrson.
+ * libpng version 1.6.36, December 1, 2018: Cosmin Truta
* See also "Contributing Authors", below.
*/
/*
- * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+ * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+ * =========================================
+ *
+ * PNG Reference Library License version 2
+ * ---------------------------------------
+ *
+ * * Copyright (c) 1995-2018 The PNG Reference Library Authors.
+ * * Copyright (c) 2018 Cosmin Truta.
+ * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ * * Copyright (c) 1996-1997 Andreas Dilger.
+ * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+ *
+ * The software is supplied "as is", without warranty of any kind,
+ * express or implied, including, without limitation, the warranties
+ * of merchantability, fitness for a particular purpose, title, and
+ * non-infringement. In no even shall the Copyright owners, or
+ * anyone distributing the software, be liable for any damages or
+ * other liability, whether in contract, tort or otherwise, arising
+ * from, out of, or in connection with the software, or the use or
+ * other dealings in the software, even if advised of the possibility
+ * of such damage.
+ *
+ * Permission is hereby granted to use, copy, modify, and distribute
+ * this software, or portions hereof, for any purpose, without fee,
+ * subject to the following restrictions:
*
- * If you modify libpng you may insert additional notices immediately following
- * this sentence.
+ * 1. The origin of this software must not be misrepresented; you
+ * must not claim that you wrote the original software. If you
+ * use this software in a product, an acknowledgment in the product
+ * documentation would be appreciated, but is not required.
*
- * This code is released under the libpng license.
+ * 2. Altered source versions must be plainly marked as such, and must
+ * not be misrepresented as being the original software.
+ *
+ * 3. This Copyright notice may not be removed or altered from any
+ * source or altered source distribution.
+ *
+ *
+ * PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
+ * -----------------------------------------------------------------------
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
@@ -31,38 +67,38 @@
* disclaimer and license as libpng-1.0.6 with the following individuals
* added to the list of Contributing Authors:
*
- * Simon-Pierre Cadieux
- * Eric S. Raymond
- * Mans Rullgard
- * Cosmin Truta
- * Gilles Vollant
- * James Yu
- * Mandar Sahastrabuddhe
- * Google Inc.
- * Vadim Barkov
+ * Simon-Pierre Cadieux
+ * Eric S. Raymond
+ * Mans Rullgard
+ * Cosmin Truta
+ * Gilles Vollant
+ * James Yu
+ * Mandar Sahastrabuddhe
+ * Google Inc.
+ * Vadim Barkov
*
* and with the following additions to the disclaimer:
*
- * There is no warranty against interference with your enjoyment of the
- * library or against infringement. There is no warranty that our
- * efforts or the library will fulfill any of your particular purposes
- * or needs. This library is provided with all faults, and the entire
- * risk of satisfactory quality, performance, accuracy, and effort is with
- * the user.
+ * There is no warranty against interference with your enjoyment of
+ * the library or against infringement. There is no warranty that our
+ * efforts or the library will fulfill any of your particular purposes
+ * or needs. This library is provided with all faults, and the entire
+ * risk of satisfactory quality, performance, accuracy, and effort is
+ * with the user.
*
* Some files in the "contrib" directory and some configure-generated
- * files that are distributed with libpng have other copyright owners and
+ * files that are distributed with libpng have other copyright owners, and
* are released under other open source licenses.
*
* libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
* Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
* libpng-0.96, and are distributed according to the same disclaimer and
- * license as libpng-0.96, with the following individuals added to the list
- * of Contributing Authors:
+ * license as libpng-0.96, with the following individuals added to the
+ * list of Contributing Authors:
*
- * Tom Lane
- * Glenn Randers-Pehrson
- * Willem van Schaik
+ * Tom Lane
+ * Glenn Randers-Pehrson
+ * Willem van Schaik
*
* libpng versions 0.89, June 1996, through 0.96, May 1997, are
* Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
@@ -70,14 +106,14 @@
* libpng-0.88, with the following individuals added to the list of
* Contributing Authors:
*
- * John Bowler
- * Kevin Bracey
- * Sam Bushell
- * Magnus Holmgren
- * Greg Roelofs
- * Tom Tanner
+ * John Bowler
+ * Kevin Bracey
+ * Sam Bushell
+ * Magnus Holmgren
+ * Greg Roelofs
+ * Tom Tanner
*
- * Some files in the "scripts" directory have other copyright owners
+ * Some files in the "scripts" directory have other copyright owners,
* but are released under this license.
*
* libpng versions 0.5, May 1995, through 0.88, January 1996, are
@@ -86,62 +122,49 @@
* For the purposes of this copyright and license, "Contributing Authors"
* is defined as the following set of individuals:
*
- * Andreas Dilger
- * Dave Martindale
- * Guy Eric Schalnat
- * Paul Schmidt
- * Tim Wegner
- *
- * The PNG Reference Library is supplied "AS IS". The Contributing Authors
- * and Group 42, Inc. disclaim all warranties, expressed or implied,
- * including, without limitation, the warranties of merchantability and of
- * fitness for any purpose. The Contributing Authors and Group 42, Inc.
- * assume no liability for direct, indirect, incidental, special, exemplary,
- * or consequential damages, which may result from the use of the PNG
- * Reference Library, even if advised of the possibility of such damage.
+ * Andreas Dilger
+ * Dave Martindale
+ * Guy Eric Schalnat
+ * Paul Schmidt
+ * Tim Wegner
+ *
+ * The PNG Reference Library is supplied "AS IS". The Contributing
+ * Authors and Group 42, Inc. disclaim all warranties, expressed or
+ * implied, including, without limitation, the warranties of
+ * merchantability and of fitness for any purpose. The Contributing
+ * Authors and Group 42, Inc. assume no liability for direct, indirect,
+ * incidental, special, exemplary, or consequential damages, which may
+ * result from the use of the PNG Reference Library, even if advised of
+ * the possibility of such damage.
*
* Permission is hereby granted to use, copy, modify, and distribute this
* source code, or portions hereof, for any purpose, without fee, subject
* to the following restrictions:
*
- * 1. The origin of this source code must not be misrepresented.
+ * 1. The origin of this source code must not be misrepresented.
*
- * 2. Altered versions must be plainly marked as such and must not
- * be misrepresented as being the original source.
+ * 2. Altered versions must be plainly marked as such and must not
+ * be misrepresented as being the original source.
*
- * 3. This Copyright notice may not be removed or altered from any
- * source or altered source distribution.
+ * 3. This Copyright notice may not be removed or altered from any
+ * source or altered source distribution.
*
- * The Contributing Authors and Group 42, Inc. specifically permit, without
- * fee, and encourage the use of this source code as a component to
- * supporting the PNG file format in commercial products. If you use this
- * source code in a product, acknowledgment is not required but would be
- * appreciated.
+ * The Contributing Authors and Group 42, Inc. specifically permit,
+ * without fee, and encourage the use of this source code as a component
+ * to supporting the PNG file format in commercial products. If you use
+ * this source code in a product, acknowledgment is not required but would
+ * be appreciated.
*
* END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
*
- * TRADEMARK:
+ * TRADEMARK
+ * =========
*
- * The name "libpng" has not been registered by the Copyright owner
+ * The name "libpng" has not been registered by the Copyright owners
* as a trademark in any jurisdiction. However, because libpng has
* been distributed and maintained world-wide, continually since 1995,
- * the Copyright owner claims "common-law trademark protection" in any
+ * the Copyright owners claim "common-law trademark protection" in any
* jurisdiction where common-law trademark is recognized.
- *
- * OSI CERTIFICATION:
- *
- * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
- * a certification mark of the Open Source Initiative. OSI has not addressed
- * the additional disclaimers inserted at version 1.0.7.
- *
- * EXPORT CONTROL:
- *
- * The Copyright owner believes that the Export Control Classification
- * Number (ECCN) for libpng is EAR99, which means not subject to export
- * controls or International Traffic in Arms Regulations (ITAR) because
- * it is open source, publicly available software, that does not contain
- * any encryption software. See the EAR, paragraphs 734.3(b)(3) and
- * 734.7(b).
*/
/*
@@ -207,23 +230,25 @@
* 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
* 1.0.7 1 10007 (still compatible)
* ...
- * 1.0.19 10 10019 10.so.0.19[.0]
+ * 1.0.69 10 10069 10.so.0.69[.0]
* ...
- * 1.2.59 13 10257 12.so.0.59[.0]
+ * 1.2.59 13 10259 12.so.0.59[.0]
* ...
- * 1.5.30 15 10527 15.so.15.30[.0]
+ * 1.4.20 14 10420 14.so.0.20[.0]
* ...
- * 1.6.35 16 10635 16.so.16.35[.0]
- *
- * Henceforth the source version will match the shared-library major
- * and minor numbers; the shared-library major version number will be
- * used for changes in backward compatibility, as it is intended. The
- * PNG_LIBPNG_VER macro, which is not used within libpng but is available
- * for applications, is an unsigned integer of the form xyyzz corresponding
- * to the source version x.y.z (leading zeros in y and z). Beta versions
- * were given the previous public release number plus a letter, until
- * version 1.0.6j; from then on they were given the upcoming public
- * release number plus "betaNN" or "rcNN".
+ * 1.5.30 15 10530 15.so.15.30[.0]
+ * ...
+ * 1.6.36 16 10636 16.so.16.36[.0]
+ *
+ * Henceforth the source version will match the shared-library major and
+ * minor numbers; the shared-library major version number will be used for
+ * changes in backward compatibility, as it is intended.
+ * The PNG_LIBPNG_VER macro, which is not used within libpng but is
+ * available for applications, is an unsigned integer of the form XYYZZ
+ * corresponding to the source version X.Y.Z (leading zeros in Y and Z).
+ * Beta versions were given the previous public release number plus a
+ * letter, until version 1.0.6j; from then on they were given the upcoming
+ * public release number plus "betaNN" or "rcNN".
*
* Binary incompatibility exists only when applications make direct access
* to the info_ptr or png_ptr members through png.h, and the compiled
@@ -233,65 +258,8 @@
* in binary compatibility (e.g., when a new feature is added).
*
* See libpng.txt or libpng.3 for more information. The PNG specification
- * is available as a W3C Recommendation and as an ISO Specification,
- * <https://www.w3.org/TR/2003/REC-PNG-20031110/
- */
-
-/*
- * Y2K compliance in libpng:
- * =========================
- *
- * July 15, 2018
- *
- * Since the PNG Development group is an ad-hoc body, we can't make
- * an official declaration.
- *
- * This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.6.35 are Y2K compliant. It is my belief that
- * earlier versions were also Y2K compliant.
- *
- * Libpng only has two year fields. One is a 2-byte unsigned integer
- * that will hold years up to 65535. The other, which is deprecated,
- * holds the date in text format, and will hold years up to 9999.
- *
- * The integer is
- * "png_uint_16 year" in png_time_struct.
- *
- * The string is
- * "char time_buffer[29]" in png_struct. This is no longer used
- * in libpng-1.6.x and will be removed from libpng-1.7.0.
- *
- * There are seven time-related functions:
- * png.c: png_convert_to_rfc_1123_buffer() in png.c
- * (formerly png_convert_to_rfc_1123() prior to libpng-1.5.x and
- * png_convert_to_rfc_1152() in error prior to libpng-0.98)
- * png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
- * png_convert_from_time_t() in pngwrite.c
- * png_get_tIME() in pngget.c
- * png_handle_tIME() in pngrutil.c, called in pngread.c
- * png_set_tIME() in pngset.c
- * png_write_tIME() in pngwutil.c, called in pngwrite.c
- *
- * All handle dates properly in a Y2K environment. The
- * png_convert_from_time_t() function calls gmtime() to convert from system
- * clock time, which returns (year - 1900), which we properly convert to
- * the full 4-digit year. There is a possibility that libpng applications
- * are not passing 4-digit years into the png_convert_to_rfc_1123_buffer()
- * function, or that they are incorrectly passing only a 2-digit year
- * instead of "year - 1900" into the png_convert_from_struct_tm() function,
- * but this is not under our control. The libpng documentation has always
- * stated that it works with 4-digit years, and the APIs have been
- * documented as such.
- *
- * The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
- * integer to hold the year, and can hold years as large as 65535.
- *
- * zlib, upon which libpng depends, is also Y2K compliant. It contains
- * no date-related code.
- *
- * Glenn Randers-Pehrson
- * libpng maintainer
- * PNG Development Group
+ * is available as a W3C Recommendation and as an ISO/IEC Standard; see
+ * <https://www.w3.org/TR/2003/REC-PNG-20031110/>
*/
#ifndef PNG_H
@@ -309,8 +277,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.35"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.35 - July 15, 2018\n"
+#define PNG_LIBPNG_VER_STRING "1.6.36"
+#define PNG_HEADER_VERSION_STRING " libpng version 1.6.36 - December 1, 2018\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -318,13 +286,13 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
-#define PNG_LIBPNG_VER_RELEASE 35
+#define PNG_LIBPNG_VER_RELEASE 36
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
-#define PNG_LIBPNG_VER_BUILD 02
+#define PNG_LIBPNG_VER_BUILD 0
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -341,15 +309,16 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
-#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
-/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
- * We must not include leading zeros.
- * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
- * version 1.0.0 was mis-numbered 100 instead of 10000). From
- * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
+/* Careful here. At one time, Guy wanted to use 082, but that
+ * would be octal. We must not include leading zeros.
+ * Versions 0.7 through 1.0.0 were in the range 0 to 100 here
+ * (only version 1.0.0 was mis-numbered 100 instead of 10000).
+ * From version 1.0.1 it is:
+ * XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
-#define PNG_LIBPNG_VER 10635 /* 1.6.35 */
+#define PNG_LIBPNG_VER 10636 /* 1.6.36 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -459,7 +428,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_6_35;
+typedef char* png_libpng_version_1_6_36;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -2013,12 +1982,12 @@ PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr,
PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr,
png_inforp info_ptr, png_bytep *exif));
PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr,
- png_inforp info_ptr, const png_bytep exif));
+ png_inforp info_ptr, png_bytep exif));
PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr,
png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif));
PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr,
- png_inforp info_ptr, const png_uint_32 num_exif, const png_bytep exif));
+ png_inforp info_ptr, png_uint_32 num_exif, png_bytep exif));
#endif
#ifdef PNG_gAMA_SUPPORTED
@@ -2764,7 +2733,7 @@ typedef struct
*
* When the simplified API needs to convert between sRGB and linear colorspaces,
* the actual sRGB transfer curve defined in the sRGB specification (see the
- * article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+ * article at <https://en.wikipedia.org/wiki/SRGB>) is used, not the gamma=1/2.2
* approximation used elsewhere in libpng.
*
* When an alpha channel is present it is expected to denote pixel coverage
@@ -2967,7 +2936,7 @@ typedef struct
* 'flags' field of png_image.
*/
#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01
- /* This indicates the the RGB values of the in-memory bitmap do not
+ /* This indicates that the RGB values of the in-memory bitmap do not
* correspond to the red, green and blue end-points defined by sRGB.
*/
diff --git a/thirdparty/libpng/pngconf.h b/thirdparty/libpng/pngconf.h
index a4646bab85..5e641b2509 100644
--- a/thirdparty/libpng/pngconf.h
+++ b/thirdparty/libpng/pngconf.h
@@ -1,11 +1,12 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.6.35, July 15, 2018
+ * libpng version 1.6.36
*
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -57,14 +58,13 @@
#endif /* PNG_BUILDING_SYMBOL_TABLE */
-/* Prior to 1.6.0 it was possible to turn off 'const' in declarations using
- * PNG_NO_CONST; this is no longer supported except for data declarations which
- * apparently still cause problems in 2011 on some compilers.
+/* Prior to 1.6.0, it was possible to turn off 'const' in declarations,
+ * using PNG_NO_CONST. This is no longer supported.
*/
#define PNG_CONST const /* backward compatibility only */
-/* This controls optimization of the reading of 16-bit and 32-bit values
- * from PNG files. It can be set on a per-app-file basis - it
+/* This controls optimization of the reading of 16-bit and 32-bit
+ * values from PNG files. It can be set on a per-app-file basis: it
* just changes whether a macro is used when the function is called.
* The library builder sets the default; if read functions are not
* built into the library the macro implementation is forced on.
diff --git a/thirdparty/libpng/pngdebug.h b/thirdparty/libpng/pngdebug.h
index 15a7ed0c95..00d5a4569e 100644
--- a/thirdparty/libpng/pngdebug.h
+++ b/thirdparty/libpng/pngdebug.h
@@ -1,10 +1,10 @@
/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c
*
- * Last changed in libpng 1.6.8 [December 19, 2013]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/pngerror.c b/thirdparty/libpng/pngerror.c
index ad48bfb986..ec3a709b9d 100644
--- a/thirdparty/libpng/pngerror.c
+++ b/thirdparty/libpng/pngerror.c
@@ -1,10 +1,10 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
- * Last changed in libpng 1.6.31 [July 27, 2017]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -425,7 +425,7 @@ png_app_error(png_const_structrp png_ptr, png_const_charp error_message)
* if the character is invalid.
*/
#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
-static PNG_CONST char png_digit[16] = {
+static const char png_digit[16] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
};
@@ -885,7 +885,7 @@ PNG_FUNCTION(void /* PRIVATE */, (PNGCBAPI
png_safe_error),(png_structp png_nonconst_ptr, png_const_charp error_message),
PNG_NORETURN)
{
- const png_const_structrp png_ptr = png_nonconst_ptr;
+ png_const_structrp png_ptr = png_nonconst_ptr;
png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr);
/* An error is always logged here, overwriting anything (typically a warning)
@@ -920,7 +920,7 @@ png_safe_error),(png_structp png_nonconst_ptr, png_const_charp error_message),
void /* PRIVATE */ PNGCBAPI
png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message)
{
- const png_const_structrp png_ptr = png_nonconst_ptr;
+ png_const_structrp png_ptr = png_nonconst_ptr;
png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr);
/* A warning is only logged if there is no prior warning or error. */
diff --git a/thirdparty/libpng/pngget.c b/thirdparty/libpng/pngget.c
index 2325508f1d..5abf1efd9f 100644
--- a/thirdparty/libpng/pngget.c
+++ b/thirdparty/libpng/pngget.c
@@ -1,10 +1,10 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/pnginfo.h b/thirdparty/libpng/pnginfo.h
index 2fcf868dac..1f98dedc42 100644
--- a/thirdparty/libpng/pnginfo.h
+++ b/thirdparty/libpng/pnginfo.h
@@ -1,10 +1,10 @@
/* pnginfo.h - header file for PNG reference library
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/pnglibconf.h b/thirdparty/libpng/pnglibconf.h
index 00acecc69b..00340c678b 100644
--- a/thirdparty/libpng/pnglibconf.h
+++ b/thirdparty/libpng/pnglibconf.h
@@ -1,10 +1,9 @@
-/* libpng 1.6.35 STANDARD API DEFINITION */
-
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.35 - July 15, 2018 */
+/* libpng version 1.6.36 */
-/* Copyright (c) 1998-2018 Glenn Randers-Pehrson */
+/* Copyright (c) 2018 Cosmin Truta */
+/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
/* This code is released under the libpng license. */
/* For conditions of distribution and use, see the disclaimer */
@@ -20,8 +19,6 @@
#define PNG_ALIGNED_MEMORY_SUPPORTED
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
-/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/
-/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/
#define PNG_BENIGN_ERRORS_SUPPORTED
#define PNG_BENIGN_READ_ERRORS_SUPPORTED
/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
@@ -46,6 +43,8 @@
#define PNG_IO_STATE_SUPPORTED
#define PNG_MNG_FEATURES_SUPPORTED
#define PNG_POINTER_INDEXING_SUPPORTED
+/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/
+/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/
#define PNG_PROGRESSIVE_READ_SUPPORTED
#define PNG_READ_16BIT_SUPPORTED
#define PNG_READ_ALPHA_MODE_SUPPORTED
diff --git a/thirdparty/libpng/pngmem.c b/thirdparty/libpng/pngmem.c
index ff3ef7e88c..09ed9c1c99 100644
--- a/thirdparty/libpng/pngmem.c
+++ b/thirdparty/libpng/pngmem.c
@@ -1,10 +1,10 @@
/* pngmem.c - stub functions for memory allocation
*
- * Last changed in libpng 1.6.26 [October 20, 2016]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2014,2016 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/pngpread.c b/thirdparty/libpng/pngpread.c
index c4ba51c4d4..e283627b77 100644
--- a/thirdparty/libpng/pngpread.c
+++ b/thirdparty/libpng/pngpread.c
@@ -1,10 +1,10 @@
/* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -972,20 +972,20 @@ png_read_push_finish_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
- static PNG_CONST png_byte png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
+ static const png_byte png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
- static PNG_CONST png_byte png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
+ static const png_byte png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
/* Start of interlace block in the y direction */
- static PNG_CONST png_byte png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
+ static const png_byte png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
/* Offset to next interlace block in the y direction */
- static PNG_CONST png_byte png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
+ static const png_byte png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
/* Height of interlace block. This is not currently used - if you need
* it, uncomment it here and in png.h
- static PNG_CONST png_byte png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
+ static const png_byte png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
#endif
diff --git a/thirdparty/libpng/pngpriv.h b/thirdparty/libpng/pngpriv.h
index 3581f67919..973c3eac1f 100644
--- a/thirdparty/libpng/pngpriv.h
+++ b/thirdparty/libpng/pngpriv.h
@@ -1,10 +1,10 @@
/* pngpriv.h - private declarations for use inside libpng
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -174,7 +174,10 @@
# else /* !defined __ARM_NEON__ */
/* The 'intrinsics' code simply won't compile without this -mfpu=neon:
*/
-# define PNG_ARM_NEON_IMPLEMENTATION 2
+# if !defined(__aarch64__)
+ /* The assembler code currently does not work on ARM64 */
+# define PNG_ARM_NEON_IMPLEMENTATION 2
+# endif /* __aarch64__ */
# endif /* __ARM_NEON__ */
# endif /* !PNG_ARM_NEON_IMPLEMENTATION */
@@ -1534,10 +1537,10 @@ PNG_INTERNAL_FUNCTION(void,png_handle_zTXt,(png_structrp png_ptr,
#endif
PNG_INTERNAL_FUNCTION(void,png_check_chunk_name,(png_const_structrp png_ptr,
- const png_uint_32 chunk_name),PNG_EMPTY);
+ png_uint_32 chunk_name),PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_check_chunk_length,(png_const_structrp png_ptr,
- const png_uint_32 chunk_length),PNG_EMPTY);
+ png_uint_32 chunk_length),PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_handle_unknown,(png_structrp png_ptr,
png_inforp info_ptr, png_uint_32 length, int keep),PNG_EMPTY);
@@ -2114,6 +2117,29 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2,
PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
png_const_charp key, png_bytep new_key), PNG_EMPTY);
+#if PNG_ARM_NEON_IMPLEMENTATION == 1
+PNG_INTERNAL_FUNCTION(void,
+ png_riffle_palette_rgba,
+ (png_structrp, png_row_infop),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int,
+ png_do_expand_palette_neon_rgba,
+ (png_structrp,
+ png_row_infop,
+ png_const_bytep,
+ const png_bytepp,
+ const png_bytepp),
+ PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(int,
+ png_do_expand_palette_neon_rgb,
+ (png_structrp,
+ png_row_infop,
+ png_const_bytep,
+ const png_bytepp,
+ const png_bytepp),
+ PNG_EMPTY);
+#endif
+
/* Maintainer: Put new private prototypes here ^ */
#include "pngdebug.h"
diff --git a/thirdparty/libpng/pngread.c b/thirdparty/libpng/pngread.c
index bff7503ee3..f8e762196e 100644
--- a/thirdparty/libpng/pngread.c
+++ b/thirdparty/libpng/pngread.c
@@ -1,10 +1,10 @@
/* pngread.c - read a PNG file
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -1621,7 +1621,7 @@ png_image_skip_unused_chunks(png_structrp png_ptr)
* errors (which are unfortunately quite common.)
*/
{
- static PNG_CONST png_byte chunks_to_process[] = {
+ static const png_byte chunks_to_process[] = {
98, 75, 71, 68, '\0', /* bKGD */
99, 72, 82, 77, '\0', /* cHRM */
103, 65, 77, 65, '\0', /* gAMA */
@@ -1758,9 +1758,9 @@ png_create_colormap_entry(png_image_read_control *display,
png_uint_32 alpha, int encoding)
{
png_imagep image = display->image;
- const int output_encoding = (image->format & PNG_FORMAT_FLAG_LINEAR) != 0 ?
+ int output_encoding = (image->format & PNG_FORMAT_FLAG_LINEAR) != 0 ?
P_LINEAR : P_sRGB;
- const int convert_to_Y = (image->format & PNG_FORMAT_FLAG_COLOR) == 0 &&
+ int convert_to_Y = (image->format & PNG_FORMAT_FLAG_COLOR) == 0 &&
(red != green || green != blue);
if (ip > 255)
@@ -1869,13 +1869,13 @@ png_create_colormap_entry(png_image_read_control *display,
/* Store the value. */
{
# ifdef PNG_FORMAT_AFIRST_SUPPORTED
- const int afirst = (image->format & PNG_FORMAT_FLAG_AFIRST) != 0 &&
+ int afirst = (image->format & PNG_FORMAT_FLAG_AFIRST) != 0 &&
(image->format & PNG_FORMAT_FLAG_ALPHA) != 0;
# else
# define afirst 0
# endif
# ifdef PNG_FORMAT_BGR_SUPPORTED
- const int bgr = (image->format & PNG_FORMAT_FLAG_BGR) != 0 ? 2 : 0;
+ int bgr = (image->format & PNG_FORMAT_FLAG_BGR) != 0 ? 2 : 0;
# else
# define bgr 0
# endif
@@ -2085,11 +2085,11 @@ png_image_read_colormap(png_voidp argument)
{
png_image_read_control *display =
png_voidcast(png_image_read_control*, argument);
- const png_imagep image = display->image;
+ png_imagep image = display->image;
- const png_structrp png_ptr = image->opaque->png_ptr;
- const png_uint_32 output_format = image->format;
- const int output_encoding = (output_format & PNG_FORMAT_FLAG_LINEAR) != 0 ?
+ png_structrp png_ptr = image->opaque->png_ptr;
+ png_uint_32 output_format = image->format;
+ int output_encoding = (output_format & PNG_FORMAT_FLAG_LINEAR) != 0 ?
P_LINEAR : P_sRGB;
unsigned int cmap_entries;
@@ -2802,7 +2802,7 @@ png_image_read_colormap(png_voidp argument)
unsigned int num_trans = png_ptr->num_trans;
png_const_bytep trans = num_trans > 0 ? png_ptr->trans_alpha : NULL;
png_const_colorp colormap = png_ptr->palette;
- const int do_background = trans != NULL &&
+ int do_background = trans != NULL &&
(output_format & PNG_FORMAT_FLAG_ALPHA) == 0;
unsigned int i;
@@ -3946,7 +3946,7 @@ png_image_read_direct(png_voidp argument)
*/
if (linear != 0)
{
- PNG_CONST png_uint_16 le = 0x0001;
+ png_uint_16 le = 0x0001;
if ((*(png_const_bytep) & le) != 0)
png_set_swap(png_ptr);
@@ -4108,7 +4108,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
* original PNG format because it may not occur in the output PNG format
* and libpng deals with the issues of reading the original.
*/
- const unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format);
+ unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format);
/* The following checks just the 'row_stride' calculation to ensure it
* fits in a signed 32-bit value. Because channels/components can be
@@ -4119,7 +4119,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
if (image->width <= 0x7fffffffU/channels) /* no overflow */
{
png_uint_32 check;
- const png_uint_32 png_row_stride = image->width * channels;
+ png_uint_32 png_row_stride = image->width * channels;
if (row_stride == 0)
row_stride = (png_int_32)/*SAFE*/png_row_stride;
diff --git a/thirdparty/libpng/pngrio.c b/thirdparty/libpng/pngrio.c
index 372221483f..7946358101 100644
--- a/thirdparty/libpng/pngrio.c
+++ b/thirdparty/libpng/pngrio.c
@@ -1,10 +1,10 @@
/* pngrio.c - functions for data input
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/pngrtran.c b/thirdparty/libpng/pngrtran.c
index 67d1f249a6..ccc58ce6f1 100644
--- a/thirdparty/libpng/pngrtran.c
+++ b/thirdparty/libpng/pngrtran.c
@@ -1,10 +1,10 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -18,6 +18,17 @@
#include "pngpriv.h"
+#ifdef PNG_ARM_NEON_IMPLEMENTATION
+# if PNG_ARM_NEON_IMPLEMENTATION == 1
+# define PNG_ARM_NEON_INTRINSICS_AVAILABLE
+# if defined(_MSC_VER) && defined(_M_ARM64)
+# include <arm64_neon.h>
+# else
+# include <arm_neon.h>
+# endif
+# endif
+#endif
+
#ifdef PNG_READ_SUPPORTED
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
@@ -2986,7 +2997,6 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
*/
static int
png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
-
{
int rgb_error = 0;
@@ -2995,12 +3005,11 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
if ((row_info->color_type & PNG_COLOR_MASK_PALETTE) == 0 &&
(row_info->color_type & PNG_COLOR_MASK_COLOR) != 0)
{
- PNG_CONST png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;
- PNG_CONST png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff;
- PNG_CONST png_uint_32 bc = 32768 - rc - gc;
- PNG_CONST png_uint_32 row_width = row_info->width;
- PNG_CONST int have_alpha =
- (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0;
+ png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;
+ png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff;
+ png_uint_32 bc = 32768 - rc - gc;
+ png_uint_32 row_width = row_info->width;
+ int have_alpha = (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0;
if (row_info->bit_depth == 8)
{
@@ -4143,12 +4152,11 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
{
if (row_info->bit_depth == 8)
{
- PNG_CONST png_bytep table = png_ptr->gamma_from_1;
+ png_bytep table = png_ptr->gamma_from_1;
if (table != NULL)
{
- PNG_CONST int step =
- (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2;
+ int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2;
/* The alpha channel is the last component: */
row += step - 1;
@@ -4162,13 +4170,12 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
else if (row_info->bit_depth == 16)
{
- PNG_CONST png_uint_16pp table = png_ptr->gamma_16_from_1;
- PNG_CONST int gamma_shift = png_ptr->gamma_shift;
+ png_uint_16pp table = png_ptr->gamma_16_from_1;
+ int gamma_shift = png_ptr->gamma_shift;
if (table != NULL)
{
- PNG_CONST int step =
- (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4;
+ int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4;
/* The alpha channel is the last component: */
row += step - 2;
@@ -4199,8 +4206,9 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
* upon whether you supply trans and num_trans.
*/
static void
-png_do_expand_palette(png_row_infop row_info, png_bytep row,
- png_const_colorp palette, png_const_bytep trans_alpha, int num_trans)
+png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
+ png_bytep row, png_const_colorp palette, png_const_bytep trans_alpha,
+ int num_trans)
{
int shift, value;
png_bytep sp, dp;
@@ -4304,14 +4312,25 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
sp = row + (size_t)row_width - 1;
dp = row + ((size_t)row_width << 2) - 1;
- for (i = 0; i < row_width; i++)
+ i = 0;
+#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
+ if (png_ptr->riffled_palette != NULL)
+ {
+ /* The RGBA optimization works with png_ptr->bit_depth == 8
+ * but sometimes row_info->bit_depth has been changed to 8.
+ * In these cases, the palette hasn't been riffled.
+ */
+ i = png_do_expand_palette_neon_rgba(png_ptr, row_info, row,
+ &sp, &dp);
+ }
+#endif
+
+ for (; i < row_width; i++)
{
if ((int)(*sp) >= num_trans)
*dp-- = 0xff;
-
else
*dp-- = trans_alpha[*sp];
-
*dp-- = palette[*sp].blue;
*dp-- = palette[*sp].green;
*dp-- = palette[*sp].red;
@@ -4328,8 +4347,13 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
{
sp = row + (size_t)row_width - 1;
dp = row + (size_t)(row_width * 3) - 1;
+ i = 0;
+#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
+ i = png_do_expand_palette_neon_rgb(png_ptr, row_info, row,
+ &sp, &dp);
+#endif
- for (i = 0; i < row_width; i++)
+ for (; i < row_width; i++)
{
*dp-- = palette[*sp].blue;
*dp-- = palette[*sp].green;
@@ -4743,8 +4767,22 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
{
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
{
- png_do_expand_palette(row_info, png_ptr->row_buf + 1,
- png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
+#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
+ if ((png_ptr->num_trans > 0) && (png_ptr->bit_depth == 8))
+ {
+ /* Allocate space for the decompressed full palette. */
+ if (png_ptr->riffled_palette == NULL)
+ {
+ png_ptr->riffled_palette = png_malloc(png_ptr, 256*4);
+ if (png_ptr->riffled_palette == NULL)
+ png_error(png_ptr, "NULL row buffer");
+ /* Build the RGBA palette. */
+ png_riffle_palette_rgba(png_ptr, row_info);
+ }
+ }
+#endif
+ png_do_expand_palette(png_ptr, row_info, png_ptr->row_buf + 1,
+ png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
}
else
diff --git a/thirdparty/libpng/pngrutil.c b/thirdparty/libpng/pngrutil.c
index 7001f1976e..d5fa08c397 100644
--- a/thirdparty/libpng/pngrutil.c
+++ b/thirdparty/libpng/pngrutil.c
@@ -1,10 +1,10 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -1461,8 +1461,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
/* We have the ICC profile header; do the basic header checks.
*/
- const png_uint_32 profile_length =
- png_get_uint_32(profile_header);
+ png_uint_32 profile_length = png_get_uint_32(profile_header);
if (png_icc_check_length(png_ptr, &png_ptr->colorspace,
keyword, profile_length) != 0)
@@ -1479,8 +1478,8 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
* profile. The header check has already validated
* that none of this stuff will overflow.
*/
- const png_uint_32 tag_count = png_get_uint_32(
- profile_header+128);
+ png_uint_32 tag_count =
+ png_get_uint_32(profile_header + 128);
png_bytep profile = png_read_buffer(png_ptr,
profile_length, 2/*silent*/);
@@ -3132,7 +3131,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
*/
void /* PRIVATE */
-png_check_chunk_name(png_const_structrp png_ptr, const png_uint_32 chunk_name)
+png_check_chunk_name(png_const_structrp png_ptr, png_uint_32 chunk_name)
{
int i;
png_uint_32 cn=chunk_name;
@@ -3151,7 +3150,7 @@ png_check_chunk_name(png_const_structrp png_ptr, const png_uint_32 chunk_name)
}
void /* PRIVATE */
-png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length)
+png_check_chunk_length(png_const_structrp png_ptr, png_uint_32 length)
{
png_alloc_size_t limit = PNG_UINT_31_MAX;
@@ -3363,7 +3362,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
/* Hence the pre-compiled masks indexed by PACKSWAP (or not), depth and
* then pass:
*/
- static PNG_CONST png_uint_32 row_mask[2/*PACKSWAP*/][3/*depth*/][6] =
+ static const png_uint_32 row_mask[2/*PACKSWAP*/][3/*depth*/][6] =
{
/* Little-endian byte masks for PACKSWAP */
{ S_MASKS(1,0), S_MASKS(2,0), S_MASKS(4,0) },
@@ -3374,7 +3373,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
/* display_mask has only three entries for the odd passes, so index by
* pass>>1.
*/
- static PNG_CONST png_uint_32 display_mask[2][3][3] =
+ static const png_uint_32 display_mask[2][3][3] =
{
/* Little-endian byte masks for PACKSWAP */
{ B_MASKS(1,0), B_MASKS(2,0), B_MASKS(4,0) },
@@ -3687,7 +3686,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
{
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Offset to next interlace block */
- static PNG_CONST unsigned int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
+ static const unsigned int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
png_debug(1, "in png_do_read_interlace");
if (row != NULL && row_info != NULL)
@@ -4329,16 +4328,16 @@ png_read_finish_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
- static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
+ static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
- static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
+ static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
/* Start of interlace block in the y direction */
- static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
+ static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
/* Offset to next interlace block in the y direction */
- static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
+ static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
png_debug(1, "in png_read_finish_row");
png_ptr->row_number++;
@@ -4394,16 +4393,16 @@ png_read_start_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
- static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
+ static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
- static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
+ static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
/* Start of interlace block in the y direction */
- static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
+ static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
/* Offset to next interlace block in the y direction */
- static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
+ static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
unsigned int max_pixel_depth;
size_t row_bytes;
diff --git a/thirdparty/libpng/pngset.c b/thirdparty/libpng/pngset.c
index 7cf54d9248..ec75dbe369 100644
--- a/thirdparty/libpng/pngset.c
+++ b/thirdparty/libpng/pngset.c
@@ -1,10 +1,10 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -137,7 +137,7 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X,
#ifdef PNG_eXIf_SUPPORTED
void PNGAPI
png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
- const png_bytep eXIf_buf)
+ png_bytep eXIf_buf)
{
png_warning(png_ptr, "png_set_eXIf does not work; use png_set_eXIf_1");
PNG_UNUSED(info_ptr)
@@ -146,7 +146,7 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
void PNGAPI
png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr,
- const png_uint_32 num_exif, const png_bytep eXIf_buf)
+ png_uint_32 num_exif, png_bytep eXIf_buf)
{
int i;
@@ -1399,7 +1399,7 @@ png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
/* Ignore all unknown chunks and all chunks recognized by
* libpng except for IHDR, PLTE, tRNS, IDAT, and IEND
*/
- static PNG_CONST png_byte chunks_to_ignore[] = {
+ static const png_byte chunks_to_ignore[] = {
98, 75, 71, 68, '\0', /* bKGD */
99, 72, 82, 77, '\0', /* cHRM */
101, 88, 73, 102, '\0', /* eXIf */
diff --git a/thirdparty/libpng/pngstruct.h b/thirdparty/libpng/pngstruct.h
index 699e8ac68a..94a6d041ff 100644
--- a/thirdparty/libpng/pngstruct.h
+++ b/thirdparty/libpng/pngstruct.h
@@ -1,10 +1,10 @@
/* pngstruct.h - header file for PNG reference library
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -228,6 +228,10 @@ struct png_struct_def
* big_row_buf; while writing it is separately
* allocated.
*/
+#ifdef PNG_READ_EXPAND_SUPPORTED
+ /* Buffer to accelerate palette transformations. */
+ png_bytep riffled_palette;
+#endif
#ifdef PNG_WRITE_FILTER_SUPPORTED
png_bytep try_row; /* buffer to save trial row when filtering */
png_bytep tst_row; /* buffer to save best trial row when filtering */
diff --git a/thirdparty/libpng/pngtrans.c b/thirdparty/libpng/pngtrans.c
index de84aa6d6b..1100f46ebe 100644
--- a/thirdparty/libpng/pngtrans.c
+++ b/thirdparty/libpng/pngtrans.c
@@ -1,10 +1,10 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -345,7 +345,7 @@ png_do_swap(png_row_infop row_info, png_bytep row)
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-static PNG_CONST png_byte onebppswaptable[256] = {
+static const png_byte onebppswaptable[256] = {
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
@@ -380,7 +380,7 @@ static PNG_CONST png_byte onebppswaptable[256] = {
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
};
-static PNG_CONST png_byte twobppswaptable[256] = {
+static const png_byte twobppswaptable[256] = {
0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0,
0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0,
0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4,
@@ -415,7 +415,7 @@ static PNG_CONST png_byte twobppswaptable[256] = {
0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF
};
-static PNG_CONST png_byte fourbppswaptable[256] = {
+static const png_byte fourbppswaptable[256] = {
0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70,
0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0,
0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71,
diff --git a/thirdparty/libpng/pngwio.c b/thirdparty/libpng/pngwio.c
index e5391687a2..10e919dd03 100644
--- a/thirdparty/libpng/pngwio.c
+++ b/thirdparty/libpng/pngwio.c
@@ -1,10 +1,10 @@
/* pngwio.c - functions for data output
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2014,2016,2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/pngwrite.c b/thirdparty/libpng/pngwrite.c
index 5bd87f373e..160c877d38 100644
--- a/thirdparty/libpng/pngwrite.c
+++ b/thirdparty/libpng/pngwrite.c
@@ -1,10 +1,10 @@
/* pngwrite.c - general routines to write a PNG file
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -469,7 +469,7 @@ png_write_end(png_structrp png_ptr, png_inforp info_ptr)
#ifdef PNG_CONVERT_tIME_SUPPORTED
void PNGAPI
-png_convert_from_struct_tm(png_timep ptime, PNG_CONST struct tm * ttime)
+png_convert_from_struct_tm(png_timep ptime, const struct tm * ttime)
{
png_debug(1, "in png_convert_from_struct_tm");
@@ -948,6 +948,10 @@ png_write_destroy(png_structrp png_ptr)
png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list);
png_free(png_ptr, png_ptr->row_buf);
png_ptr->row_buf = NULL;
+#ifdef PNG_READ_EXPANDED_SUPPORTED
+ png_free(png_ptr, png_ptr->riffled_palette);
+ png_ptr->riffled_palette = NULL;
+#endif
#ifdef PNG_WRITE_FILTER_SUPPORTED
png_free(png_ptr, png_ptr->prev_row);
png_free(png_ptr, png_ptr->try_row);
@@ -1536,7 +1540,7 @@ png_write_image_16bit(png_voidp argument)
display->first_row);
png_uint_16p output_row = png_voidcast(png_uint_16p, display->local_row);
png_uint_16p row_end;
- const unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ?
+ unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ?
3 : 1;
int aindex = 0;
png_uint_32 y = image->height;
@@ -1573,7 +1577,7 @@ png_write_image_16bit(png_voidp argument)
while (out_ptr < row_end)
{
- const png_uint_16 alpha = in_ptr[aindex];
+ png_uint_16 alpha = in_ptr[aindex];
png_uint_32 reciprocal = 0;
int c;
@@ -1695,7 +1699,7 @@ png_write_image_8bit(png_voidp argument)
display->first_row);
png_bytep output_row = png_voidcast(png_bytep, display->local_row);
png_uint_32 y = image->height;
- const unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ?
+ unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ?
3 : 1;
if ((image->format & PNG_FORMAT_FLAG_ALPHA) != 0)
@@ -1783,25 +1787,25 @@ png_write_image_8bit(png_voidp argument)
static void
png_image_set_PLTE(png_image_write_control *display)
{
- const png_imagep image = display->image;
+ png_imagep image = display->image;
const void *cmap = display->colormap;
- const int entries = image->colormap_entries > 256 ? 256 :
+ int entries = image->colormap_entries > 256 ? 256 :
(int)image->colormap_entries;
/* NOTE: the caller must check for cmap != NULL and entries != 0 */
- const png_uint_32 format = image->format;
- const unsigned int channels = PNG_IMAGE_SAMPLE_CHANNELS(format);
+ png_uint_32 format = image->format;
+ unsigned int channels = PNG_IMAGE_SAMPLE_CHANNELS(format);
# if defined(PNG_FORMAT_BGR_SUPPORTED) &&\
defined(PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED)
- const int afirst = (format & PNG_FORMAT_FLAG_AFIRST) != 0 &&
+ int afirst = (format & PNG_FORMAT_FLAG_AFIRST) != 0 &&
(format & PNG_FORMAT_FLAG_ALPHA) != 0;
# else
# define afirst 0
# endif
# ifdef PNG_FORMAT_BGR_SUPPORTED
- const int bgr = (format & PNG_FORMAT_FLAG_BGR) != 0 ? 2 : 0;
+ int bgr = (format & PNG_FORMAT_FLAG_BGR) != 0 ? 2 : 0;
# else
# define bgr 0
# endif
@@ -1951,12 +1955,12 @@ png_image_write_main(png_voidp argument)
* and total image size to ensure that they are within the system limits.
*/
{
- const unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format);
+ unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format);
if (image->width <= 0x7fffffffU/channels) /* no overflow */
{
png_uint_32 check;
- const png_uint_32 png_row_stride = image->width * channels;
+ png_uint_32 png_row_stride = image->width * channels;
if (display->row_stride == 0)
display->row_stride = (png_int_32)/*SAFE*/png_row_stride;
@@ -2052,7 +2056,7 @@ png_image_write_main(png_voidp argument)
*/
if (write_16bit != 0)
{
- PNG_CONST png_uint_16 le = 0x0001;
+ png_uint_16 le = 0x0001;
if ((*(png_const_bytep) & le) != 0)
png_set_swap(png_ptr);
@@ -2166,7 +2170,7 @@ image_memory_write)(png_structp png_ptr, png_bytep/*const*/ data, size_t size)
{
png_image_write_control *display = png_voidcast(png_image_write_control*,
png_ptr->io_ptr/*backdoor: png_get_io_ptr(png_ptr)*/);
- const png_alloc_size_t ob = display->output_bytes;
+ png_alloc_size_t ob = display->output_bytes;
/* Check for overflow; this should never happen: */
if (size <= ((png_alloc_size_t)-1) - ob)
diff --git a/thirdparty/libpng/pngwtran.c b/thirdparty/libpng/pngwtran.c
index 3a1e0a21d2..49a13c1e98 100644
--- a/thirdparty/libpng/pngwtran.c
+++ b/thirdparty/libpng/pngwtran.c
@@ -1,10 +1,10 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -254,8 +254,7 @@ png_do_shift(png_row_infop row_info, png_bytep row,
for (i = 0; i < istop; i++, bp++)
{
-
- const unsigned int c = i%channels;
+ unsigned int c = i%channels;
int j;
unsigned int v, out;
@@ -283,7 +282,7 @@ png_do_shift(png_row_infop row_info, png_bytep row,
for (bp = row, i = 0; i < istop; i++)
{
- const unsigned int c = i%channels;
+ unsigned int c = i%channels;
int j;
unsigned int value, v;
diff --git a/thirdparty/libpng/pngwutil.c b/thirdparty/libpng/pngwutil.c
index ab431e712c..16345e4c0b 100644
--- a/thirdparty/libpng/pngwutil.c
+++ b/thirdparty/libpng/pngwutil.c
@@ -1,10 +1,10 @@
/* pngwutil.c - utilities to write a PNG file
*
- * Last changed in libpng 1.6.35 [July 15, 2018]
+ * Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ * Copyright (c) 1996-1997 Andreas Dilger
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -1893,16 +1893,16 @@ png_write_start_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
- static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
+ static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
- static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
+ static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
/* Start of interlace block in the y direction */
- static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
+ static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
/* Offset to next interlace block in the y direction */
- static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
+ static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
#endif
png_alloc_size_t buf_size;
@@ -2008,16 +2008,16 @@ png_write_finish_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
- static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
+ static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
- static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
+ static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
/* Start of interlace block in the y direction */
- static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
+ static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
/* Offset to next interlace block in the y direction */
- static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
+ static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
#endif
png_debug(1, "in png_write_finish_row");
@@ -2098,10 +2098,10 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
- static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
+ static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
- static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
+ static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
png_debug(1, "in png_do_write_interlace");
@@ -2276,7 +2276,7 @@ png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
#ifdef PNG_WRITE_FILTER_SUPPORTED
static size_t /* PRIVATE */
-png_setup_sub_row(png_structrp png_ptr, const png_uint_32 bpp,
+png_setup_sub_row(png_structrp png_ptr, png_uint_32 bpp,
size_t row_bytes, size_t lmins)
{
png_bytep rp, dp, lp;
@@ -2315,7 +2315,7 @@ png_setup_sub_row(png_structrp png_ptr, const png_uint_32 bpp,
}
static void /* PRIVATE */
-png_setup_sub_row_only(png_structrp png_ptr, const png_uint_32 bpp,
+png_setup_sub_row_only(png_structrp png_ptr, png_uint_32 bpp,
size_t row_bytes)
{
png_bytep rp, dp, lp;
@@ -2380,7 +2380,7 @@ png_setup_up_row_only(png_structrp png_ptr, size_t row_bytes)
}
static size_t /* PRIVATE */
-png_setup_avg_row(png_structrp png_ptr, const png_uint_32 bpp,
+png_setup_avg_row(png_structrp png_ptr, png_uint_32 bpp,
size_t row_bytes, size_t lmins)
{
png_bytep rp, dp, pp, lp;
@@ -2420,7 +2420,7 @@ png_setup_avg_row(png_structrp png_ptr, const png_uint_32 bpp,
return (sum);
}
static void /* PRIVATE */
-png_setup_avg_row_only(png_structrp png_ptr, const png_uint_32 bpp,
+png_setup_avg_row_only(png_structrp png_ptr, png_uint_32 bpp,
size_t row_bytes)
{
png_bytep rp, dp, pp, lp;
@@ -2442,7 +2442,7 @@ png_setup_avg_row_only(png_structrp png_ptr, const png_uint_32 bpp,
}
static size_t /* PRIVATE */
-png_setup_paeth_row(png_structrp png_ptr, const png_uint_32 bpp,
+png_setup_paeth_row(png_structrp png_ptr, png_uint_32 bpp,
size_t row_bytes, size_t lmins)
{
png_bytep rp, dp, pp, cp, lp;
@@ -2503,7 +2503,7 @@ png_setup_paeth_row(png_structrp png_ptr, const png_uint_32 bpp,
return (sum);
}
static void /* PRIVATE */
-png_setup_paeth_row_only(png_structrp png_ptr, const png_uint_32 bpp,
+png_setup_paeth_row_only(png_structrp png_ptr, png_uint_32 bpp,
size_t row_bytes)
{
png_bytep rp, dp, pp, cp, lp;
diff --git a/thirdparty/libvpx/rtcd/vpx_dsp_rtcd_x86.h b/thirdparty/libvpx/rtcd/vpx_dsp_rtcd_x86.h
index 82574e096c..c2a68330ac 100644
--- a/thirdparty/libvpx/rtcd/vpx_dsp_rtcd_x86.h
+++ b/thirdparty/libvpx/rtcd/vpx_dsp_rtcd_x86.h
@@ -22,7 +22,6 @@ extern "C" {
void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
-void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
RTCD_EXTERN void (*vpx_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -43,13 +42,11 @@ RTCD_EXTERN void (*vpx_convolve8_avg_vert)(const uint8_t *src, ptrdiff_t src_str
void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
-void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
RTCD_EXTERN void (*vpx_convolve8_horiz)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
-void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
RTCD_EXTERN void (*vpx_convolve8_vert)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
@@ -343,12 +340,10 @@ RTCD_EXTERN void (*vpx_lpf_horizontal_8_dual)(uint8_t *s, int pitch, const uint8
void vpx_lpf_horizontal_edge_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vpx_lpf_horizontal_edge_16_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
-void vpx_lpf_horizontal_edge_16_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
RTCD_EXTERN void (*vpx_lpf_horizontal_edge_16)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vpx_lpf_horizontal_edge_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vpx_lpf_horizontal_edge_8_sse2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
-void vpx_lpf_horizontal_edge_8_avx2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
RTCD_EXTERN void (*vpx_lpf_horizontal_edge_8)(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vpx_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
@@ -440,7 +435,6 @@ static void setup_rtcd_internal(void)
vpx_convolve8 = vpx_convolve8_c;
if (flags & HAS_SSE2) vpx_convolve8 = vpx_convolve8_sse2;
if (flags & HAS_SSSE3) vpx_convolve8 = vpx_convolve8_ssse3;
- if (flags & HAS_AVX2) vpx_convolve8 = vpx_convolve8_avx2;
vpx_convolve8_avg = vpx_convolve8_avg_c;
if (flags & HAS_SSE2) vpx_convolve8_avg = vpx_convolve8_avg_sse2;
if (flags & HAS_SSSE3) vpx_convolve8_avg = vpx_convolve8_avg_ssse3;
@@ -453,11 +447,9 @@ static void setup_rtcd_internal(void)
vpx_convolve8_horiz = vpx_convolve8_horiz_c;
if (flags & HAS_SSE2) vpx_convolve8_horiz = vpx_convolve8_horiz_sse2;
if (flags & HAS_SSSE3) vpx_convolve8_horiz = vpx_convolve8_horiz_ssse3;
- if (flags & HAS_AVX2) vpx_convolve8_horiz = vpx_convolve8_horiz_avx2;
vpx_convolve8_vert = vpx_convolve8_vert_c;
if (flags & HAS_SSE2) vpx_convolve8_vert = vpx_convolve8_vert_sse2;
if (flags & HAS_SSSE3) vpx_convolve8_vert = vpx_convolve8_vert_ssse3;
- if (flags & HAS_AVX2) vpx_convolve8_vert = vpx_convolve8_vert_avx2;
vpx_convolve_avg = vpx_convolve_avg_c;
if (flags & HAS_SSE2) vpx_convolve_avg = vpx_convolve_avg_sse2;
vpx_convolve_copy = vpx_convolve_copy_c;
@@ -570,10 +562,8 @@ static void setup_rtcd_internal(void)
if (flags & HAS_SSE2) vpx_lpf_horizontal_8_dual = vpx_lpf_horizontal_8_dual_sse2;
vpx_lpf_horizontal_edge_16 = vpx_lpf_horizontal_edge_16_c;
if (flags & HAS_SSE2) vpx_lpf_horizontal_edge_16 = vpx_lpf_horizontal_edge_16_sse2;
- if (flags & HAS_AVX2) vpx_lpf_horizontal_edge_16 = vpx_lpf_horizontal_edge_16_avx2;
vpx_lpf_horizontal_edge_8 = vpx_lpf_horizontal_edge_8_c;
if (flags & HAS_SSE2) vpx_lpf_horizontal_edge_8 = vpx_lpf_horizontal_edge_8_sse2;
- if (flags & HAS_AVX2) vpx_lpf_horizontal_edge_8 = vpx_lpf_horizontal_edge_8_avx2;
vpx_lpf_vertical_16 = vpx_lpf_vertical_16_c;
if (flags & HAS_SSE2) vpx_lpf_vertical_16 = vpx_lpf_vertical_16_sse2;
vpx_lpf_vertical_16_dual = vpx_lpf_vertical_16_dual_c;
diff --git a/thirdparty/libvpx/vpx_config.h b/thirdparty/libvpx/vpx_config.h
index 6caec50c81..e8e91fa6ef 100644
--- a/thirdparty/libvpx/vpx_config.h
+++ b/thirdparty/libvpx/vpx_config.h
@@ -29,7 +29,7 @@
#define HAVE_MMX 1
#define HAVE_SSE2 1
#define HAVE_SSSE3 1
- #define HAVE_AVX2 1
+ #define HAVE_AVX2 0
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
#define ARCH_X86 0
#define ARCH_X86_64 1
@@ -41,7 +41,7 @@
#define HAVE_MMX 1
#define HAVE_SSE2 1
#define HAVE_SSSE3 1
- #define HAVE_AVX2 1
+ #define HAVE_AVX2 0
#elif defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM)
#define ARCH_X86 0
#define ARCH_X86_64 0
diff --git a/thirdparty/libwebp/AUTHORS b/thirdparty/libwebp/AUTHORS
index 83c7b9c5eb..0d70b7fb2a 100644
--- a/thirdparty/libwebp/AUTHORS
+++ b/thirdparty/libwebp/AUTHORS
@@ -1,4 +1,5 @@
Contributors:
+- Alan Browning (browning at google dot com)
- Charles Munger (clm at google dot com)
- Christian Duvivier (cduvivier at google dot com)
- Djordje Pesut (djordje dot pesut at imgtec dot com)
@@ -6,9 +7,10 @@ Contributors:
- James Zern (jzern at google dot com)
- Jan Engelhardt (jengelh at medozas dot de)
- Jehan (jehan at girinstud dot io)
-- Johann (johann dot koenig at duck dot com)
+- Johann Koenig (johann dot koenig at duck dot com)
- Jovan Zelincevic (jovan dot zelincevic at imgtec dot com)
- Jyrki Alakuijala (jyrki at google dot com)
+- Konstantin Ivlev (tomskside at gmail dot com)
- Lode Vandevenne (lode at google dot com)
- Lou Quillio (louquillio at google dot com)
- Mans Rullgard (mans at mansr dot com)
@@ -37,3 +39,4 @@ Contributors:
- Vincent Rabaud (vrabaud at google dot com)
- Vlad Tsyrklevich (vtsyrklevich at chromium dot org)
- Yang Zhang (yang dot zhang at arm dot com)
+- Yannis Guyon (yguyon at google dot com)
diff --git a/thirdparty/libwebp/src/dec/vp8i_dec.h b/thirdparty/libwebp/src/dec/vp8i_dec.h
index e5e89df57d..2d7900aae1 100644
--- a/thirdparty/libwebp/src/dec/vp8i_dec.h
+++ b/thirdparty/libwebp/src/dec/vp8i_dec.h
@@ -32,7 +32,7 @@ extern "C" {
// version numbers
#define DEC_MAJ_VERSION 1
#define DEC_MIN_VERSION 0
-#define DEC_REV_VERSION 1
+#define DEC_REV_VERSION 2
// YUV-cache parameters. Cache is 32-bytes wide (= one cacheline).
// Constraints are: We need to store one 16x16 block of luma samples (y),
diff --git a/thirdparty/libwebp/src/demux/demux.c b/thirdparty/libwebp/src/demux/demux.c
index a69c65b7cf..d8f7a40a56 100644
--- a/thirdparty/libwebp/src/demux/demux.c
+++ b/thirdparty/libwebp/src/demux/demux.c
@@ -25,7 +25,7 @@
#define DMUX_MAJ_VERSION 1
#define DMUX_MIN_VERSION 0
-#define DMUX_REV_VERSION 1
+#define DMUX_REV_VERSION 2
typedef struct {
size_t start_; // start location of the data
diff --git a/thirdparty/libwebp/src/dsp/cost.c b/thirdparty/libwebp/src/dsp/cost.c
index 634ccc2085..cc681cdd4b 100644
--- a/thirdparty/libwebp/src/dsp/cost.c
+++ b/thirdparty/libwebp/src/dsp/cost.c
@@ -377,6 +377,7 @@ VP8SetResidualCoeffsFunc VP8SetResidualCoeffs;
extern void VP8EncDspCostInitMIPS32(void);
extern void VP8EncDspCostInitMIPSdspR2(void);
extern void VP8EncDspCostInitSSE2(void);
+extern void VP8EncDspCostInitNEON(void);
WEBP_DSP_INIT_FUNC(VP8EncDspCostInit) {
VP8GetResidualCost = GetResidualCost_C;
@@ -399,6 +400,11 @@ WEBP_DSP_INIT_FUNC(VP8EncDspCostInit) {
VP8EncDspCostInitSSE2();
}
#endif
+#if defined(WEBP_USE_NEON)
+ if (VP8GetCPUInfo(kNEON)) {
+ VP8EncDspCostInitNEON();
+ }
+#endif
}
}
diff --git a/thirdparty/libwebp/src/dsp/cost_neon.c b/thirdparty/libwebp/src/dsp/cost_neon.c
new file mode 100644
index 0000000000..8cc8ce58aa
--- /dev/null
+++ b/thirdparty/libwebp/src/dsp/cost_neon.c
@@ -0,0 +1,122 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the COPYING file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+// -----------------------------------------------------------------------------
+//
+// ARM NEON version of cost functions
+
+#include "src/dsp/dsp.h"
+
+#if defined(WEBP_USE_NEON)
+
+#include "src/dsp/neon.h"
+#include "src/enc/cost_enc.h"
+
+static const uint8_t position[16] = { 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16 };
+
+static void SetResidualCoeffs_NEON(const int16_t* const coeffs,
+ VP8Residual* const res) {
+ const int16x8_t minus_one = vdupq_n_s16(-1);
+ const int16x8_t coeffs_0 = vld1q_s16(coeffs);
+ const int16x8_t coeffs_1 = vld1q_s16(coeffs + 8);
+ const uint16x8_t eob_0 = vtstq_s16(coeffs_0, minus_one);
+ const uint16x8_t eob_1 = vtstq_s16(coeffs_1, minus_one);
+ const uint8x16_t eob = vcombine_u8(vqmovn_u16(eob_0), vqmovn_u16(eob_1));
+ const uint8x16_t masked = vandq_u8(eob, vld1q_u8(position));
+
+#ifdef __aarch64__
+ res->last = vmaxvq_u8(masked) - 1;
+#else
+ const uint8x8_t eob_8x8 = vmax_u8(vget_low_u8(masked), vget_high_u8(masked));
+ const uint16x8_t eob_16x8 = vmovl_u8(eob_8x8);
+ const uint16x4_t eob_16x4 =
+ vmax_u16(vget_low_u16(eob_16x8), vget_high_u16(eob_16x8));
+ const uint32x4_t eob_32x4 = vmovl_u16(eob_16x4);
+ uint32x2_t eob_32x2 =
+ vmax_u32(vget_low_u32(eob_32x4), vget_high_u32(eob_32x4));
+ eob_32x2 = vpmax_u32(eob_32x2, eob_32x2);
+
+ vst1_lane_s32(&res->last, vreinterpret_s32_u32(eob_32x2), 0);
+ --res->last;
+#endif // __aarch64__
+
+ res->coeffs = coeffs;
+}
+
+static int GetResidualCost_NEON(int ctx0, const VP8Residual* const res) {
+ uint8_t levels[16], ctxs[16];
+ uint16_t abs_levels[16];
+ int n = res->first;
+ // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1
+ const int p0 = res->prob[n][ctx0][0];
+ CostArrayPtr const costs = res->costs;
+ const uint16_t* t = costs[n][ctx0];
+ // bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0
+ // (as required by the syntax). For ctx0 == 0, we need to add it here or it'll
+ // be missing during the loop.
+ int cost = (ctx0 == 0) ? VP8BitCost(1, p0) : 0;
+
+ if (res->last < 0) {
+ return VP8BitCost(0, p0);
+ }
+
+ { // precompute clamped levels and contexts, packed to 8b.
+ const uint8x16_t kCst2 = vdupq_n_u8(2);
+ const uint8x16_t kCst67 = vdupq_n_u8(MAX_VARIABLE_LEVEL);
+ const int16x8_t c0 = vld1q_s16(res->coeffs);
+ const int16x8_t c1 = vld1q_s16(res->coeffs + 8);
+ const uint16x8_t E0 = vreinterpretq_u16_s16(vabsq_s16(c0));
+ const uint16x8_t E1 = vreinterpretq_u16_s16(vabsq_s16(c1));
+ const uint8x16_t F = vcombine_u8(vqmovn_u16(E0), vqmovn_u16(E1));
+ const uint8x16_t G = vminq_u8(F, kCst2); // context = 0,1,2
+ const uint8x16_t H = vminq_u8(F, kCst67); // clamp_level in [0..67]
+
+ vst1q_u8(ctxs, G);
+ vst1q_u8(levels, H);
+
+ vst1q_u16(abs_levels, E0);
+ vst1q_u16(abs_levels + 8, E1);
+ }
+ for (; n < res->last; ++n) {
+ const int ctx = ctxs[n];
+ const int level = levels[n];
+ const int flevel = abs_levels[n]; // full level
+ cost += VP8LevelFixedCosts[flevel] + t[level]; // simplified VP8LevelCost()
+ t = costs[n + 1][ctx];
+ }
+ // Last coefficient is always non-zero
+ {
+ const int level = levels[n];
+ const int flevel = abs_levels[n];
+ assert(flevel != 0);
+ cost += VP8LevelFixedCosts[flevel] + t[level];
+ if (n < 15) {
+ const int b = VP8EncBands[n + 1];
+ const int ctx = ctxs[n];
+ const int last_p0 = res->prob[b][ctx][0];
+ cost += VP8BitCost(0, last_p0);
+ }
+ }
+ return cost;
+}
+
+//------------------------------------------------------------------------------
+// Entry point
+
+extern void VP8EncDspCostInitNEON(void);
+
+WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitNEON(void) {
+ VP8SetResidualCoeffs = SetResidualCoeffs_NEON;
+ VP8GetResidualCost = GetResidualCost_NEON;
+}
+
+#else // !WEBP_USE_NEON
+
+WEBP_DSP_INIT_STUB(VP8EncDspCostInitNEON)
+
+#endif // WEBP_USE_NEON
diff --git a/thirdparty/libwebp/src/dsp/quant.h b/thirdparty/libwebp/src/dsp/quant.h
new file mode 100644
index 0000000000..5ba6f9c377
--- /dev/null
+++ b/thirdparty/libwebp/src/dsp/quant.h
@@ -0,0 +1,70 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the COPYING file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+// -----------------------------------------------------------------------------
+
+#ifndef WEBP_DSP_QUANT_H_
+#define WEBP_DSP_QUANT_H_
+
+#include "src/dsp/dsp.h"
+#include "src/webp/types.h"
+
+#if defined(WEBP_USE_NEON) && !defined(WEBP_ANDROID_NEON) && \
+ !defined(WEBP_HAVE_NEON_RTCD)
+#include <arm_neon.h>
+
+#define IsFlat IsFlat_NEON
+
+static uint32x2_t horizontal_add_uint32x4(const uint32x4_t a) {
+ const uint64x2_t b = vpaddlq_u32(a);
+ return vadd_u32(vreinterpret_u32_u64(vget_low_u64(b)),
+ vreinterpret_u32_u64(vget_high_u64(b)));
+}
+
+static WEBP_INLINE int IsFlat(const int16_t* levels, int num_blocks,
+ int thresh) {
+ const int16x8_t tst_ones = vdupq_n_s16(-1);
+ uint32x4_t sum = vdupq_n_u32(0);
+
+ for (int i = 0; i < num_blocks; ++i) {
+ // Set DC to zero.
+ const int16x8_t a_0 = vsetq_lane_s16(0, vld1q_s16(levels), 0);
+ const int16x8_t a_1 = vld1q_s16(levels + 8);
+
+ const uint16x8_t b_0 = vshrq_n_u16(vtstq_s16(a_0, tst_ones), 15);
+ const uint16x8_t b_1 = vshrq_n_u16(vtstq_s16(a_1, tst_ones), 15);
+
+ sum = vpadalq_u16(sum, b_0);
+ sum = vpadalq_u16(sum, b_1);
+
+ levels += 16;
+ }
+ return thresh >= (int32_t)vget_lane_u32(horizontal_add_uint32x4(sum), 0);
+}
+
+#else
+
+#define IsFlat IsFlat_C
+
+static WEBP_INLINE int IsFlat(const int16_t* levels, int num_blocks,
+ int thresh) {
+ int score = 0;
+ while (num_blocks-- > 0) { // TODO(skal): refine positional scoring?
+ int i;
+ for (i = 1; i < 16; ++i) { // omit DC, we're only interested in AC
+ score += (levels[i] != 0);
+ if (score > thresh) return 0;
+ }
+ levels += 16;
+ }
+ return 1;
+}
+
+#endif // defined(WEBP_USE_NEON) && !defined(WEBP_ANDROID_NEON) &&
+ // !defined(WEBP_HAVE_NEON_RTCD)
+
+#endif // WEBP_DSP_QUANT_H_
diff --git a/thirdparty/libwebp/src/enc/histogram_enc.c b/thirdparty/libwebp/src/enc/histogram_enc.c
index 4e49e0a201..8ac6fa8e02 100644
--- a/thirdparty/libwebp/src/enc/histogram_enc.c
+++ b/thirdparty/libwebp/src/enc/histogram_enc.c
@@ -165,7 +165,7 @@ VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits) {
void VP8LHistogramSetClear(VP8LHistogramSet* const set) {
int i;
const int cache_bits = set->histograms[0]->palette_code_bits_;
- const int size = set->size;
+ const int size = set->max_size;
const size_t total_size = HistogramSetTotalSize(size, cache_bits);
uint8_t* memory = (uint8_t*)set;
@@ -180,6 +180,20 @@ void VP8LHistogramSetClear(VP8LHistogramSet* const set) {
}
}
+// Removes the histogram 'i' from 'set' by setting it to NULL.
+static void HistogramSetRemoveHistogram(VP8LHistogramSet* const set, int i,
+ int* const num_used) {
+ assert(set->histograms[i] != NULL);
+ set->histograms[i] = NULL;
+ --*num_used;
+ // If we remove the last valid one, shrink until the next valid one.
+ if (i == set->size - 1) {
+ while (set->size >= 1 && set->histograms[set->size - 1] == NULL) {
+ --set->size;
+ }
+ }
+}
+
// -----------------------------------------------------------------------------
void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const histo,
@@ -447,7 +461,9 @@ static double HistogramAddEval(const VP8LHistogram* const a,
static double HistogramAddThresh(const VP8LHistogram* const a,
const VP8LHistogram* const b,
double cost_threshold) {
- double cost = -a->bit_cost_;
+ double cost;
+ assert(a != NULL && b != NULL);
+ cost = -a->bit_cost_;
GetCombinedHistogramEntropy(a, b, cost_threshold, &cost);
return cost;
}
@@ -561,14 +577,17 @@ static void HistogramBuild(
}
// Copies the histograms and computes its bit_cost.
-static void HistogramCopyAndAnalyze(
- VP8LHistogramSet* const orig_histo, VP8LHistogramSet* const image_histo) {
- int i;
- const int histo_size = orig_histo->size;
+static const uint16_t kInvalidHistogramSymbol = (uint16_t)(-1);
+static void HistogramCopyAndAnalyze(VP8LHistogramSet* const orig_histo,
+ VP8LHistogramSet* const image_histo,
+ int* const num_used,
+ uint16_t* const histogram_symbols) {
+ int i, cluster_id;
+ int num_used_orig = *num_used;
VP8LHistogram** const orig_histograms = orig_histo->histograms;
VP8LHistogram** const histograms = image_histo->histograms;
- image_histo->size = 0;
- for (i = 0; i < histo_size; ++i) {
+ assert(image_histo->max_size == orig_histo->max_size);
+ for (cluster_id = 0, i = 0; i < orig_histo->max_size; ++i) {
VP8LHistogram* const histo = orig_histograms[i];
UpdateHistogramCost(histo);
@@ -576,10 +595,19 @@ static void HistogramCopyAndAnalyze(
// with no information (when they are skipped because of LZ77).
if (!histo->is_used_[0] && !histo->is_used_[1] && !histo->is_used_[2]
&& !histo->is_used_[3] && !histo->is_used_[4]) {
- continue;
+ // The first histogram is always used. If an histogram is empty, we set
+ // its id to be the same as the previous one: this will improve
+ // compressibility for later LZ77.
+ assert(i > 0);
+ HistogramSetRemoveHistogram(image_histo, i, num_used);
+ HistogramSetRemoveHistogram(orig_histo, i, &num_used_orig);
+ histogram_symbols[i] = kInvalidHistogramSymbol;
+ } else {
+ // Copy histograms from orig_histo[] to image_histo[].
+ HistogramCopy(histo, histograms[i]);
+ histogram_symbols[i] = cluster_id++;
+ assert(cluster_id <= image_histo->max_size);
}
- // Copy histograms from orig_histo[] to image_histo[].
- HistogramCopy(histo, histograms[image_histo->size++]);
}
}
@@ -596,29 +624,33 @@ static void HistogramAnalyzeEntropyBin(VP8LHistogramSet* const image_histo,
// Analyze the dominant (literal, red and blue) entropy costs.
for (i = 0; i < histo_size; ++i) {
+ if (histograms[i] == NULL) continue;
UpdateDominantCostRange(histograms[i], &cost_range);
}
// bin-hash histograms on three of the dominant (literal, red and blue)
// symbol costs and store the resulting bin_id for each histogram.
for (i = 0; i < histo_size; ++i) {
+ // bin_map[i] is not set to a special value as its use will later be guarded
+ // by another (histograms[i] == NULL).
+ if (histograms[i] == NULL) continue;
bin_map[i] = GetHistoBinIndex(histograms[i], &cost_range, low_effort);
}
}
-// Compact image_histo[] by merging some histograms with same bin_id together if
-// it's advantageous.
+// Merges some histograms with same bin_id together if it's advantageous.
+// Sets the remaining histograms to NULL.
static void HistogramCombineEntropyBin(VP8LHistogramSet* const image_histo,
+ int *num_used,
+ const uint16_t* const clusters,
+ uint16_t* const cluster_mappings,
VP8LHistogram* cur_combo,
const uint16_t* const bin_map,
- int bin_map_size, int num_bins,
+ int num_bins,
double combine_cost_factor,
int low_effort) {
VP8LHistogram** const histograms = image_histo->histograms;
int idx;
- // Work in-place: processed histograms are put at the beginning of
- // image_histo[]. At the end, we just have to truncate the array.
- int size = 0;
struct {
int16_t first; // position of the histogram that accumulates all
// histograms with the same bin_id
@@ -631,16 +663,19 @@ static void HistogramCombineEntropyBin(VP8LHistogramSet* const image_histo,
bin_info[idx].num_combine_failures = 0;
}
- for (idx = 0; idx < bin_map_size; ++idx) {
- const int bin_id = bin_map[idx];
- const int first = bin_info[bin_id].first;
- assert(size <= idx);
+ // By default, a cluster matches itself.
+ for (idx = 0; idx < *num_used; ++idx) cluster_mappings[idx] = idx;
+ for (idx = 0; idx < image_histo->size; ++idx) {
+ int bin_id, first;
+ if (histograms[idx] == NULL) continue;
+ bin_id = bin_map[idx];
+ first = bin_info[bin_id].first;
if (first == -1) {
- // just move histogram #idx to its final position
- histograms[size] = histograms[idx];
- bin_info[bin_id].first = size++;
+ bin_info[bin_id].first = idx;
} else if (low_effort) {
HistogramAdd(histograms[idx], histograms[first], histograms[first]);
+ HistogramSetRemoveHistogram(image_histo, idx, num_used);
+ cluster_mappings[clusters[idx]] = clusters[first];
} else {
// try to merge #idx into #first (both share the same bin_id)
const double bit_cost = histograms[idx]->bit_cost_;
@@ -663,19 +698,18 @@ static void HistogramCombineEntropyBin(VP8LHistogramSet* const image_histo,
bin_info[bin_id].num_combine_failures >= max_combine_failures) {
// move the (better) merged histogram to its final slot
HistogramSwap(&cur_combo, &histograms[first]);
+ HistogramSetRemoveHistogram(image_histo, idx, num_used);
+ cluster_mappings[clusters[idx]] = clusters[first];
} else {
- histograms[size++] = histograms[idx];
++bin_info[bin_id].num_combine_failures;
}
- } else {
- histograms[size++] = histograms[idx];
}
}
}
- image_histo->size = size;
if (low_effort) {
// for low_effort case, update the final cost when everything is merged
- for (idx = 0; idx < size; ++idx) {
+ for (idx = 0; idx < image_histo->size; ++idx) {
+ if (histograms[idx] == NULL) continue;
UpdateHistogramCost(histograms[idx]);
}
}
@@ -706,16 +740,9 @@ typedef struct {
int max_size;
} HistoQueue;
-static int HistoQueueInit(HistoQueue* const histo_queue, const int max_index) {
+static int HistoQueueInit(HistoQueue* const histo_queue, const int max_size) {
histo_queue->size = 0;
- // max_index^2 for the queue size is safe. If you look at
- // HistogramCombineGreedy, and imagine that UpdateQueueFront always pushes
- // data to the queue, you insert at most:
- // - max_index*(max_index-1)/2 (the first two for loops)
- // - max_index - 1 in the last for loop at the first iteration of the while
- // loop, max_index - 2 at the second iteration ... therefore
- // max_index*(max_index-1)/2 overall too
- histo_queue->max_size = max_index * max_index;
+ histo_queue->max_size = max_size;
// We allocate max_size + 1 because the last element at index "size" is
// used as temporary data (and it could be up to max_size).
histo_queue->queue = (HistogramPair*)WebPSafeMalloc(
@@ -778,6 +805,8 @@ static double HistoQueuePush(HistoQueue* const histo_queue,
const VP8LHistogram* h2;
HistogramPair pair;
+ // Stop here if the queue is full.
+ if (histo_queue->size == histo_queue->max_size) return 0.;
assert(threshold <= 0.);
if (idx1 > idx2) {
const int tmp = idx2;
@@ -794,8 +823,6 @@ static double HistoQueuePush(HistoQueue* const histo_queue,
// Do not even consider the pair if it does not improve the entropy.
if (pair.cost_diff >= threshold) return 0.;
- // We cannot add more elements than the capacity.
- assert(histo_queue->size < histo_queue->max_size);
histo_queue->queue[histo_queue->size++] = pair;
HistoQueueUpdateHead(histo_queue, &histo_queue->queue[histo_queue->size - 1]);
@@ -806,42 +833,43 @@ static double HistoQueuePush(HistoQueue* const histo_queue,
// Combines histograms by continuously choosing the one with the highest cost
// reduction.
-static int HistogramCombineGreedy(VP8LHistogramSet* const image_histo) {
+static int HistogramCombineGreedy(VP8LHistogramSet* const image_histo,
+ int* const num_used) {
int ok = 0;
- int image_histo_size = image_histo->size;
+ const int image_histo_size = image_histo->size;
int i, j;
VP8LHistogram** const histograms = image_histo->histograms;
- // Indexes of remaining histograms.
- int* const clusters =
- (int*)WebPSafeMalloc(image_histo_size, sizeof(*clusters));
// Priority queue of histogram pairs.
HistoQueue histo_queue;
- if (!HistoQueueInit(&histo_queue, image_histo_size) || clusters == NULL) {
+ // image_histo_size^2 for the queue size is safe. If you look at
+ // HistogramCombineGreedy, and imagine that UpdateQueueFront always pushes
+ // data to the queue, you insert at most:
+ // - image_histo_size*(image_histo_size-1)/2 (the first two for loops)
+ // - image_histo_size - 1 in the last for loop at the first iteration of
+ // the while loop, image_histo_size - 2 at the second iteration ...
+ // therefore image_histo_size*(image_histo_size-1)/2 overall too
+ if (!HistoQueueInit(&histo_queue, image_histo_size * image_histo_size)) {
goto End;
}
for (i = 0; i < image_histo_size; ++i) {
- // Initialize clusters indexes.
- clusters[i] = i;
+ if (image_histo->histograms[i] == NULL) continue;
for (j = i + 1; j < image_histo_size; ++j) {
- // Initialize positions array.
+ // Initialize queue.
+ if (image_histo->histograms[j] == NULL) continue;
HistoQueuePush(&histo_queue, histograms, i, j, 0.);
}
}
- while (image_histo_size > 1 && histo_queue.size > 0) {
+ while (histo_queue.size > 0) {
const int idx1 = histo_queue.queue[0].idx1;
const int idx2 = histo_queue.queue[0].idx2;
HistogramAdd(histograms[idx2], histograms[idx1], histograms[idx1]);
histograms[idx1]->bit_cost_ = histo_queue.queue[0].cost_combo;
+
// Remove merged histogram.
- for (i = 0; i + 1 < image_histo_size; ++i) {
- if (clusters[i] >= idx2) {
- clusters[i] = clusters[i + 1];
- }
- }
- --image_histo_size;
+ HistogramSetRemoveHistogram(image_histo, idx2, num_used);
// Remove pairs intersecting the just combined best pair.
for (i = 0; i < histo_queue.size;) {
@@ -856,24 +884,15 @@ static int HistogramCombineGreedy(VP8LHistogramSet* const image_histo) {
}
// Push new pairs formed with combined histogram to the queue.
- for (i = 0; i < image_histo_size; ++i) {
- if (clusters[i] != idx1) {
- HistoQueuePush(&histo_queue, histograms, idx1, clusters[i], 0.);
- }
- }
- }
- // Move remaining histograms to the beginning of the array.
- for (i = 0; i < image_histo_size; ++i) {
- if (i != clusters[i]) { // swap the two histograms
- HistogramSwap(&histograms[i], &histograms[clusters[i]]);
+ for (i = 0; i < image_histo->size; ++i) {
+ if (i == idx1 || image_histo->histograms[i] == NULL) continue;
+ HistoQueuePush(&histo_queue, image_histo->histograms, idx1, i, 0.);
}
}
- image_histo->size = image_histo_size;
ok = 1;
End:
- WebPSafeFree(clusters);
HistoQueueClear(&histo_queue);
return ok;
}
@@ -881,47 +900,69 @@ static int HistogramCombineGreedy(VP8LHistogramSet* const image_histo) {
// Perform histogram aggregation using a stochastic approach.
// 'do_greedy' is set to 1 if a greedy approach needs to be performed
// afterwards, 0 otherwise.
+static int PairComparison(const void* idx1, const void* idx2) {
+ // To be used with bsearch: <0 when *idx1<*idx2, >0 if >, 0 when ==.
+ return (*(int*) idx1 - *(int*) idx2);
+}
static int HistogramCombineStochastic(VP8LHistogramSet* const image_histo,
- int min_cluster_size,
+ int* const num_used, int min_cluster_size,
int* const do_greedy) {
- int iter;
+ int j, iter;
uint32_t seed = 1;
int tries_with_no_success = 0;
- int image_histo_size = image_histo->size;
- const int outer_iters = image_histo_size;
+ const int outer_iters = *num_used;
const int num_tries_no_success = outer_iters / 2;
VP8LHistogram** const histograms = image_histo->histograms;
- // Priority queue of histogram pairs. Its size of "kCostHeapSizeSqrt"^2
+ // Priority queue of histogram pairs. Its size of 'kHistoQueueSize'
// impacts the quality of the compression and the speed: the smaller the
// faster but the worse for the compression.
HistoQueue histo_queue;
- const int kHistoQueueSizeSqrt = 3;
+ const int kHistoQueueSize = 9;
int ok = 0;
+ // mapping from an index in image_histo with no NULL histogram to the full
+ // blown image_histo.
+ int* mappings;
- if (!HistoQueueInit(&histo_queue, kHistoQueueSizeSqrt)) {
+ if (*num_used < min_cluster_size) {
+ *do_greedy = 1;
+ return 1;
+ }
+
+ mappings = (int*) WebPSafeMalloc(*num_used, sizeof(*mappings));
+ if (mappings == NULL || !HistoQueueInit(&histo_queue, kHistoQueueSize)) {
goto End;
}
+ // Fill the initial mapping.
+ for (j = 0, iter = 0; iter < image_histo->size; ++iter) {
+ if (histograms[iter] == NULL) continue;
+ mappings[j++] = iter;
+ }
+ assert(j == *num_used);
+
// Collapse similar histograms in 'image_histo'.
- ++min_cluster_size;
- for (iter = 0; iter < outer_iters && image_histo_size >= min_cluster_size &&
- ++tries_with_no_success < num_tries_no_success;
+ for (iter = 0;
+ iter < outer_iters && *num_used >= min_cluster_size &&
+ ++tries_with_no_success < num_tries_no_success;
++iter) {
+ int* mapping_index;
double best_cost =
(histo_queue.size == 0) ? 0. : histo_queue.queue[0].cost_diff;
int best_idx1 = -1, best_idx2 = 1;
- int j;
- const uint32_t rand_range = (image_histo_size - 1) * image_histo_size;
- // image_histo_size / 2 was chosen empirically. Less means faster but worse
+ const uint32_t rand_range = (*num_used - 1) * (*num_used);
+ // (*num_used) / 2 was chosen empirically. Less means faster but worse
// compression.
- const int num_tries = image_histo_size / 2;
+ const int num_tries = (*num_used) / 2;
- for (j = 0; j < num_tries; ++j) {
+ // Pick random samples.
+ for (j = 0; *num_used >= 2 && j < num_tries; ++j) {
double curr_cost;
// Choose two different histograms at random and try to combine them.
const uint32_t tmp = MyRand(&seed) % rand_range;
- const uint32_t idx1 = tmp / (image_histo_size - 1);
- uint32_t idx2 = tmp % (image_histo_size - 1);
+ uint32_t idx1 = tmp / (*num_used - 1);
+ uint32_t idx2 = tmp % (*num_used - 1);
if (idx2 >= idx1) ++idx2;
+ idx1 = mappings[idx1];
+ idx2 = mappings[idx2];
// Calculate cost reduction on combination.
curr_cost =
@@ -934,18 +975,21 @@ static int HistogramCombineStochastic(VP8LHistogramSet* const image_histo,
}
if (histo_queue.size == 0) continue;
- // Merge the two best histograms.
+ // Get the best histograms.
best_idx1 = histo_queue.queue[0].idx1;
best_idx2 = histo_queue.queue[0].idx2;
assert(best_idx1 < best_idx2);
- HistogramAddEval(histograms[best_idx1], histograms[best_idx2],
- histograms[best_idx1], 0);
- // Swap the best_idx2 histogram with the last one (which is now unused).
- --image_histo_size;
- if (best_idx2 != image_histo_size) {
- HistogramSwap(&histograms[image_histo_size], &histograms[best_idx2]);
- }
- histograms[image_histo_size] = NULL;
+ // Pop best_idx2 from mappings.
+ mapping_index = (int*) bsearch(&best_idx2, mappings, *num_used,
+ sizeof(best_idx2), &PairComparison);
+ assert(mapping_index != NULL);
+ memmove(mapping_index, mapping_index + 1, sizeof(*mapping_index) *
+ ((*num_used) - (mapping_index - mappings) - 1));
+ // Merge the histograms and remove best_idx2 from the queue.
+ HistogramAdd(histograms[best_idx2], histograms[best_idx1],
+ histograms[best_idx1]);
+ histograms[best_idx1]->bit_cost_ = histo_queue.queue[0].cost_combo;
+ HistogramSetRemoveHistogram(image_histo, best_idx2, num_used);
// Parse the queue and update each pair that deals with best_idx1,
// best_idx2 or image_histo_size.
for (j = 0; j < histo_queue.size;) {
@@ -968,12 +1012,6 @@ static int HistogramCombineStochastic(VP8LHistogramSet* const image_histo,
p->idx2 = best_idx1;
do_eval = 1;
}
- if (p->idx2 == image_histo_size) {
- // No need to re-evaluate here as it does not involve a pair
- // containing best_idx1 or best_idx2.
- p->idx2 = best_idx2;
- }
- assert(p->idx2 < image_histo_size);
// Make sure the index order is respected.
if (p->idx1 > p->idx2) {
const int tmp = p->idx2;
@@ -991,15 +1029,14 @@ static int HistogramCombineStochastic(VP8LHistogramSet* const image_histo,
HistoQueueUpdateHead(&histo_queue, p);
++j;
}
-
tries_with_no_success = 0;
}
- image_histo->size = image_histo_size;
- *do_greedy = (image_histo->size <= min_cluster_size);
+ *do_greedy = (*num_used <= min_cluster_size);
ok = 1;
End:
HistoQueueClear(&histo_queue);
+ WebPSafeFree(mappings);
return ok;
}
@@ -1007,23 +1044,29 @@ End:
// Histogram refinement
// Find the best 'out' histogram for each of the 'in' histograms.
+// At call-time, 'out' contains the histograms of the clusters.
// Note: we assume that out[]->bit_cost_ is already up-to-date.
static void HistogramRemap(const VP8LHistogramSet* const in,
- const VP8LHistogramSet* const out,
+ VP8LHistogramSet* const out,
uint16_t* const symbols) {
int i;
VP8LHistogram** const in_histo = in->histograms;
VP8LHistogram** const out_histo = out->histograms;
- const int in_size = in->size;
+ const int in_size = out->max_size;
const int out_size = out->size;
if (out_size > 1) {
for (i = 0; i < in_size; ++i) {
int best_out = 0;
double best_bits = MAX_COST;
int k;
+ if (in_histo[i] == NULL) {
+ // Arbitrarily set to the previous value if unused to help future LZ77.
+ symbols[i] = symbols[i - 1];
+ continue;
+ }
for (k = 0; k < out_size; ++k) {
- const double cur_bits =
- HistogramAddThresh(out_histo[k], in_histo[i], best_bits);
+ double cur_bits;
+ cur_bits = HistogramAddThresh(out_histo[k], in_histo[i], best_bits);
if (k == 0 || cur_bits < best_bits) {
best_bits = cur_bits;
best_out = k;
@@ -1039,12 +1082,13 @@ static void HistogramRemap(const VP8LHistogramSet* const in,
}
// Recompute each out based on raw and symbols.
- for (i = 0; i < out_size; ++i) {
- HistogramClear(out_histo[i]);
- }
+ VP8LHistogramSetClear(out);
+ out->size = out_size;
for (i = 0; i < in_size; ++i) {
- const int idx = symbols[i];
+ int idx;
+ if (in_histo[i] == NULL) continue;
+ idx = symbols[i];
HistogramAdd(in_histo[i], out_histo[idx], out_histo[idx]);
}
}
@@ -1060,6 +1104,70 @@ static double GetCombineCostFactor(int histo_size, int quality) {
return combine_cost_factor;
}
+// Given a HistogramSet 'set', the mapping of clusters 'cluster_mapping' and the
+// current assignment of the cells in 'symbols', merge the clusters and
+// assign the smallest possible clusters values.
+static void OptimizeHistogramSymbols(const VP8LHistogramSet* const set,
+ uint16_t* const cluster_mappings,
+ int num_clusters,
+ uint16_t* const cluster_mappings_tmp,
+ uint16_t* const symbols) {
+ int i, cluster_max;
+ int do_continue = 1;
+ // First, assign the lowest cluster to each pixel.
+ while (do_continue) {
+ do_continue = 0;
+ for (i = 0; i < num_clusters; ++i) {
+ int k;
+ k = cluster_mappings[i];
+ while (k != cluster_mappings[k]) {
+ cluster_mappings[k] = cluster_mappings[cluster_mappings[k]];
+ k = cluster_mappings[k];
+ }
+ if (k != cluster_mappings[i]) {
+ do_continue = 1;
+ cluster_mappings[i] = k;
+ }
+ }
+ }
+ // Create a mapping from a cluster id to its minimal version.
+ cluster_max = 0;
+ memset(cluster_mappings_tmp, 0,
+ set->max_size * sizeof(*cluster_mappings_tmp));
+ assert(cluster_mappings[0] == 0);
+ // Re-map the ids.
+ for (i = 0; i < set->max_size; ++i) {
+ int cluster;
+ if (symbols[i] == kInvalidHistogramSymbol) continue;
+ cluster = cluster_mappings[symbols[i]];
+ assert(symbols[i] < num_clusters);
+ if (cluster > 0 && cluster_mappings_tmp[cluster] == 0) {
+ ++cluster_max;
+ cluster_mappings_tmp[cluster] = cluster_max;
+ }
+ symbols[i] = cluster_mappings_tmp[cluster];
+ }
+
+ // Make sure all cluster values are used.
+ cluster_max = 0;
+ for (i = 0; i < set->max_size; ++i) {
+ if (symbols[i] == kInvalidHistogramSymbol) continue;
+ if (symbols[i] <= cluster_max) continue;
+ ++cluster_max;
+ assert(symbols[i] == cluster_max);
+ }
+}
+
+static void RemoveEmptyHistograms(VP8LHistogramSet* const image_histo) {
+ uint32_t size;
+ int i;
+ for (i = 0, size = 0; i < image_histo->size; ++i) {
+ if (image_histo->histograms[i] == NULL) continue;
+ image_histo->histograms[size++] = image_histo->histograms[i];
+ }
+ image_histo->size = size;
+}
+
int VP8LGetHistoImageSymbols(int xsize, int ysize,
const VP8LBackwardRefs* const refs,
int quality, int low_effort,
@@ -1078,27 +1186,36 @@ int VP8LGetHistoImageSymbols(int xsize, int ysize,
// maximum quality q==100 (to preserve the compression gains at that level).
const int entropy_combine_num_bins = low_effort ? NUM_PARTITIONS : BIN_SIZE;
int entropy_combine;
-
- if (orig_histo == NULL) goto Error;
+ uint16_t* const map_tmp =
+ WebPSafeMalloc(2 * image_histo_raw_size, sizeof(map_tmp));
+ uint16_t* const cluster_mappings = map_tmp + image_histo_raw_size;
+ int num_used = image_histo_raw_size;
+ if (orig_histo == NULL || map_tmp == NULL) goto Error;
// Construct the histograms from backward references.
HistogramBuild(xsize, histo_bits, refs, orig_histo);
// Copies the histograms and computes its bit_cost.
- HistogramCopyAndAnalyze(orig_histo, image_histo);
+ // histogram_symbols is optimized
+ HistogramCopyAndAnalyze(orig_histo, image_histo, &num_used,
+ histogram_symbols);
+
entropy_combine =
- (image_histo->size > entropy_combine_num_bins * 2) && (quality < 100);
+ (num_used > entropy_combine_num_bins * 2) && (quality < 100);
+
if (entropy_combine) {
- const int bin_map_size = image_histo->size;
- // Reuse histogram_symbols storage. By definition, it's guaranteed to be ok.
- uint16_t* const bin_map = histogram_symbols;
+ uint16_t* const bin_map = map_tmp;
const double combine_cost_factor =
GetCombineCostFactor(image_histo_raw_size, quality);
+ const uint32_t num_clusters = num_used;
HistogramAnalyzeEntropyBin(image_histo, bin_map, low_effort);
// Collapse histograms with similar entropy.
- HistogramCombineEntropyBin(image_histo, tmp_histo, bin_map, bin_map_size,
+ HistogramCombineEntropyBin(image_histo, &num_used, histogram_symbols,
+ cluster_mappings, tmp_histo, bin_map,
entropy_combine_num_bins, combine_cost_factor,
low_effort);
+ OptimizeHistogramSymbols(image_histo, cluster_mappings, num_clusters,
+ map_tmp, histogram_symbols);
}
// Don't combine the histograms using stochastic and greedy heuristics for
@@ -1108,21 +1225,26 @@ int VP8LGetHistoImageSymbols(int xsize, int ysize,
// cubic ramp between 1 and MAX_HISTO_GREEDY:
const int threshold_size = (int)(1 + (x * x * x) * (MAX_HISTO_GREEDY - 1));
int do_greedy;
- if (!HistogramCombineStochastic(image_histo, threshold_size, &do_greedy)) {
+ if (!HistogramCombineStochastic(image_histo, &num_used, threshold_size,
+ &do_greedy)) {
goto Error;
}
- if (do_greedy && !HistogramCombineGreedy(image_histo)) {
- goto Error;
+ if (do_greedy) {
+ RemoveEmptyHistograms(image_histo);
+ if (!HistogramCombineGreedy(image_histo, &num_used)) {
+ goto Error;
+ }
}
}
- // TODO(vrabaud): Optimize HistogramRemap for low-effort compression mode.
// Find the optimal map from original histograms to the final ones.
+ RemoveEmptyHistograms(image_histo);
HistogramRemap(orig_histo, image_histo, histogram_symbols);
ok = 1;
Error:
VP8LFreeHistogramSet(orig_histo);
+ WebPSafeFree(map_tmp);
return ok;
}
diff --git a/thirdparty/libwebp/src/enc/predictor_enc.c b/thirdparty/libwebp/src/enc/predictor_enc.c
index f3715f515e..802e89693e 100644
--- a/thirdparty/libwebp/src/enc/predictor_enc.c
+++ b/thirdparty/libwebp/src/enc/predictor_enc.c
@@ -177,12 +177,15 @@ static uint8_t NearLosslessComponent(uint8_t value, uint8_t predict,
}
}
+static WEBP_INLINE uint8_t NearLosslessDiff(uint8_t a, uint8_t b) {
+ return (uint8_t)((((int)(a) - (int)(b))) & 0xff);
+}
+
// Quantize every component of the difference between the actual pixel value and
// its prediction to a multiple of a quantization (a power of 2, not larger than
// max_quantization which is a power of 2, smaller than max_diff). Take care if
// value and predict have undergone subtract green, which means that red and
// blue are represented as offsets from green.
-#define NEAR_LOSSLESS_DIFF(a, b) (uint8_t)((((int)(a) - (int)(b))) & 0xff)
static uint32_t NearLossless(uint32_t value, uint32_t predict,
int max_quantization, int max_diff,
int used_subtract_green) {
@@ -199,7 +202,7 @@ static uint32_t NearLossless(uint32_t value, uint32_t predict,
}
if ((value >> 24) == 0 || (value >> 24) == 0xff) {
// Preserve transparency of fully transparent or fully opaque pixels.
- a = NEAR_LOSSLESS_DIFF(value >> 24, predict >> 24);
+ a = NearLosslessDiff(value >> 24, predict >> 24);
} else {
a = NearLosslessComponent(value >> 24, predict >> 24, 0xff, quantization);
}
@@ -212,16 +215,15 @@ static uint32_t NearLossless(uint32_t value, uint32_t predict,
// The amount by which green has been adjusted during quantization. It is
// subtracted from red and blue for compensation, to avoid accumulating two
// quantization errors in them.
- green_diff = NEAR_LOSSLESS_DIFF(new_green, value >> 8);
+ green_diff = NearLosslessDiff(new_green, value >> 8);
}
- r = NearLosslessComponent(NEAR_LOSSLESS_DIFF(value >> 16, green_diff),
+ r = NearLosslessComponent(NearLosslessDiff(value >> 16, green_diff),
(predict >> 16) & 0xff, 0xff - new_green,
quantization);
- b = NearLosslessComponent(NEAR_LOSSLESS_DIFF(value, green_diff),
+ b = NearLosslessComponent(NearLosslessDiff(value, green_diff),
predict & 0xff, 0xff - new_green, quantization);
return ((uint32_t)a << 24) | ((uint32_t)r << 16) | ((uint32_t)g << 8) | b;
}
-#undef NEAR_LOSSLESS_DIFF
#endif // (WEBP_NEAR_LOSSLESS == 1)
// Stores the difference between the pixel and its prediction in "out".
diff --git a/thirdparty/libwebp/src/enc/quant_enc.c b/thirdparty/libwebp/src/enc/quant_enc.c
index 35bfaf21ef..03c682e3ae 100644
--- a/thirdparty/libwebp/src/enc/quant_enc.c
+++ b/thirdparty/libwebp/src/enc/quant_enc.c
@@ -15,6 +15,7 @@
#include <math.h>
#include <stdlib.h> // for abs()
+#include "src/dsp/quant.h"
#include "src/enc/vp8i_enc.h"
#include "src/enc/cost_enc.h"
@@ -977,19 +978,6 @@ static void SwapOut(VP8EncIterator* const it) {
SwapPtr(&it->yuv_out_, &it->yuv_out2_);
}
-static score_t IsFlat(const int16_t* levels, int num_blocks, score_t thresh) {
- score_t score = 0;
- while (num_blocks-- > 0) { // TODO(skal): refine positional scoring?
- int i;
- for (i = 1; i < 16; ++i) { // omit DC, we're only interested in AC
- score += (levels[i] != 0);
- if (score > thresh) return 0;
- }
- levels += 16;
- }
- return 1;
-}
-
static void PickBestIntra16(VP8EncIterator* const it, VP8ModeScore* rd) {
const int kNumBlocks = 16;
VP8SegmentInfo* const dqm = &it->enc_->dqm_[it->mb_->segment_];
diff --git a/thirdparty/libwebp/src/enc/vp8i_enc.h b/thirdparty/libwebp/src/enc/vp8i_enc.h
index 92439febb8..3a1967da88 100644
--- a/thirdparty/libwebp/src/enc/vp8i_enc.h
+++ b/thirdparty/libwebp/src/enc/vp8i_enc.h
@@ -32,7 +32,7 @@ extern "C" {
// version numbers
#define ENC_MAJ_VERSION 1
#define ENC_MIN_VERSION 0
-#define ENC_REV_VERSION 1
+#define ENC_REV_VERSION 2
enum { MAX_LF_LEVELS = 64, // Maximum loop filter level
MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost
diff --git a/thirdparty/libwebp/src/enc/vp8l_enc.c b/thirdparty/libwebp/src/enc/vp8l_enc.c
index 2713edcd95..2efd403f77 100644
--- a/thirdparty/libwebp/src/enc/vp8l_enc.c
+++ b/thirdparty/libwebp/src/enc/vp8l_enc.c
@@ -462,6 +462,7 @@ static int GetHuffBitLengthsAndCodes(
for (i = 0; i < histogram_image_size; ++i) {
const VP8LHistogram* const histo = histogram_image->histograms[i];
HuffmanTreeCode* const codes = &huffman_codes[5 * i];
+ assert(histo != NULL);
for (k = 0; k < 5; ++k) {
const int num_symbols =
(k == 0) ? VP8LHistogramNumCodes(histo->palette_code_bits_) :
diff --git a/thirdparty/libwebp/src/mux/muxi.h b/thirdparty/libwebp/src/mux/muxi.h
index df9f74c63c..3e9d8c48d8 100644
--- a/thirdparty/libwebp/src/mux/muxi.h
+++ b/thirdparty/libwebp/src/mux/muxi.h
@@ -29,7 +29,7 @@ extern "C" {
#define MUX_MAJ_VERSION 1
#define MUX_MIN_VERSION 0
-#define MUX_REV_VERSION 1
+#define MUX_REV_VERSION 2
// Chunk object.
typedef struct WebPChunk WebPChunk;
diff --git a/thirdparty/libwebp/src/utils/bit_writer_utils.c b/thirdparty/libwebp/src/utils/bit_writer_utils.c
index f4f476ce3f..7f83b4c8a2 100644
--- a/thirdparty/libwebp/src/utils/bit_writer_utils.c
+++ b/thirdparty/libwebp/src/utils/bit_writer_utils.c
@@ -248,6 +248,7 @@ int VP8LBitWriterClone(const VP8LBitWriter* const src,
dst->bits_ = src->bits_;
dst->used_ = src->used_;
dst->error_ = src->error_;
+ dst->cur_ = dst->buf_ + current_size;
return 1;
}
diff --git a/thirdparty/libwebp/src/utils/utils.h b/thirdparty/libwebp/src/utils/utils.h
index da97b5d38f..c7620f91ec 100644
--- a/thirdparty/libwebp/src/utils/utils.h
+++ b/thirdparty/libwebp/src/utils/utils.h
@@ -107,19 +107,6 @@ static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) {
PutLE16(data + 2, (int)(val >> 16));
}
-// Returns 31 ^ clz(n) = log2(n). This is the default C-implementation, either
-// based on table or not. Can be used as fallback if clz() is not available.
-#define WEBP_NEED_LOG_TABLE_8BIT
-extern const uint8_t WebPLogTable8bit[256];
-static WEBP_INLINE int WebPLog2FloorC(uint32_t n) {
- int log_value = 0;
- while (n >= 256) {
- log_value += 8;
- n >>= 8;
- }
- return log_value + WebPLogTable8bit[n];
-}
-
// Returns (int)floor(log2(n)). n must be > 0.
// use GNU builtins where available.
#if defined(__GNUC__) && \
@@ -138,6 +125,19 @@ static WEBP_INLINE int BitsLog2Floor(uint32_t n) {
return first_set_bit;
}
#else // default: use the C-version.
+// Returns 31 ^ clz(n) = log2(n). This is the default C-implementation, either
+// based on table or not. Can be used as fallback if clz() is not available.
+#define WEBP_NEED_LOG_TABLE_8BIT
+extern const uint8_t WebPLogTable8bit[256];
+static WEBP_INLINE int WebPLog2FloorC(uint32_t n) {
+ int log_value = 0;
+ while (n >= 256) {
+ log_value += 8;
+ n >>= 8;
+ }
+ return log_value + WebPLogTable8bit[n];
+}
+
static WEBP_INLINE int BitsLog2Floor(uint32_t n) { return WebPLog2FloorC(n); }
#endif
diff --git a/thirdparty/libwebp/src/webp/decode.h b/thirdparty/libwebp/src/webp/decode.h
index 95d31e7619..ae8bfe840e 100644
--- a/thirdparty/libwebp/src/webp/decode.h
+++ b/thirdparty/libwebp/src/webp/decode.h
@@ -42,6 +42,12 @@ WEBP_EXTERN int WebPGetDecoderVersion(void);
// This function will also validate the header, returning true on success,
// false otherwise. '*width' and '*height' are only valid on successful return.
// Pointers 'width' and 'height' can be passed NULL if deemed irrelevant.
+// Note: The following chunk sequences (before the raw VP8/VP8L data) are
+// considered valid by this function:
+// RIFF + VP8(L)
+// RIFF + VP8X + (optional chunks) + VP8(L)
+// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
+// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
WEBP_EXTERN int WebPGetInfo(const uint8_t* data, size_t data_size,
int* width, int* height);
@@ -425,6 +431,12 @@ WEBP_EXTERN VP8StatusCode WebPGetFeaturesInternal(
// Returns VP8_STATUS_OK when the features are successfully retrieved. Returns
// VP8_STATUS_NOT_ENOUGH_DATA when more data is needed to retrieve the
// features from headers. Returns error in other cases.
+// Note: The following chunk sequences (before the raw VP8/VP8L data) are
+// considered valid by this function:
+// RIFF + VP8(L)
+// RIFF + VP8X + (optional chunks) + VP8(L)
+// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
+// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
static WEBP_INLINE VP8StatusCode WebPGetFeatures(
const uint8_t* data, size_t data_size,
WebPBitstreamFeatures* features) {
diff --git a/thirdparty/libwebsockets/include/libwebsockets.h b/thirdparty/libwebsockets/include/libwebsockets.h
new file mode 100644
index 0000000000..7cc5c28b78
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets.h
@@ -0,0 +1,435 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+/** @file */
+
+#ifndef LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
+#define LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
+
+#ifdef __cplusplus
+#include <cstddef>
+#include <cstdarg>
+
+extern "C" {
+#else
+#include <stdarg.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "lws_config.h"
+
+/*
+ * CARE: everything using cmake defines needs to be below here
+ */
+
+#if defined(LWS_HAS_INTPTR_T)
+#include <stdint.h>
+#define lws_intptr_t intptr_t
+#else
+typedef unsigned long long lws_intptr_t;
+#endif
+
+#if defined(WIN32) || defined(_WIN32)
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <stddef.h>
+#include <basetsd.h>
+#include <io.h>
+#ifndef _WIN32_WCE
+#include <fcntl.h>
+#else
+#define _O_RDONLY 0x0000
+#define O_RDONLY _O_RDONLY
+#endif
+
+#define LWS_INLINE __inline
+#define LWS_VISIBLE
+#define LWS_WARN_UNUSED_RESULT
+#define LWS_WARN_DEPRECATED
+#define LWS_FORMAT(string_index)
+
+#if !defined(LWS_EXTERN)
+#ifdef LWS_DLL
+#ifdef LWS_INTERNAL
+#define LWS_EXTERN extern __declspec(dllexport)
+#else
+#define LWS_EXTERN extern __declspec(dllimport)
+#endif
+#else
+#define LWS_EXTERN
+#endif
+#endif
+
+#define LWS_INVALID_FILE INVALID_HANDLE_VALUE
+#define LWS_O_RDONLY _O_RDONLY
+#define LWS_O_WRONLY _O_WRONLY
+#define LWS_O_CREAT _O_CREAT
+#define LWS_O_TRUNC _O_TRUNC
+
+#ifndef __func__
+#define __func__ __FUNCTION__
+#endif
+
+#else /* NOT WIN32 */
+#include <unistd.h>
+#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
+#include <sys/capability.h>
+#endif
+
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__QNX__) || defined(__OpenBSD__)
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+#define LWS_INLINE inline
+#define LWS_O_RDONLY O_RDONLY
+#define LWS_O_WRONLY O_WRONLY
+#define LWS_O_CREAT O_CREAT
+#define LWS_O_TRUNC O_TRUNC
+
+#if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_TA) && !defined(LWS_WITH_ESP32)
+#include <poll.h>
+#include <netdb.h>
+#define LWS_INVALID_FILE -1
+#else
+#define getdtablesize() (30)
+#if defined(LWS_WITH_ESP32)
+#define LWS_INVALID_FILE NULL
+#else
+#define LWS_INVALID_FILE NULL
+#endif
+#endif
+
+#if defined(__GNUC__)
+
+/* warn_unused_result attribute only supported by GCC 3.4 or later */
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#define LWS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#else
+#define LWS_WARN_UNUSED_RESULT
+#endif
+
+#define LWS_VISIBLE __attribute__((visibility("default")))
+#define LWS_WARN_DEPRECATED __attribute__ ((deprecated))
+#define LWS_FORMAT(string_index) __attribute__ ((format(printf, string_index, string_index+1)))
+#else
+#define LWS_VISIBLE
+#define LWS_WARN_UNUSED_RESULT
+#define LWS_WARN_DEPRECATED
+#define LWS_FORMAT(string_index)
+#endif
+
+#if defined(__ANDROID__)
+#include <netinet/in.h>
+#include <unistd.h>
+#define getdtablesize() sysconf(_SC_OPEN_MAX)
+#endif
+
+#endif
+
+#if defined(LWS_WITH_LIBEV)
+#include <ev.h>
+#endif /* LWS_WITH_LIBEV */
+#ifdef LWS_WITH_LIBUV
+#include <uv.h>
+#ifdef LWS_HAVE_UV_VERSION_H
+#include <uv-version.h>
+#endif
+#ifdef LWS_HAVE_NEW_UV_VERSION_H
+#include <uv/version.h>
+#endif
+#endif /* LWS_WITH_LIBUV */
+#if defined(LWS_WITH_LIBEVENT)
+#include <event2/event.h>
+#endif /* LWS_WITH_LIBEVENT */
+
+#ifndef LWS_EXTERN
+#define LWS_EXTERN extern
+#endif
+
+#ifdef _WIN32
+#define random rand
+#else
+#if !defined(OPTEE_TA)
+#include <sys/time.h>
+#include <unistd.h>
+#endif
+#endif
+
+#if defined(LWS_WITH_TLS)
+
+#ifdef USE_WOLFSSL
+#ifdef USE_OLD_CYASSL
+#ifdef _WIN32
+/*
+ * Include user-controlled settings for windows from
+ * <wolfssl-root>/IDE/WIN/user_settings.h
+ */
+#include <IDE/WIN/user_settings.h>
+#include <cyassl/ctaocrypt/settings.h>
+#else
+#include <cyassl/options.h>
+#endif
+#include <cyassl/openssl/ssl.h>
+#include <cyassl/error-ssl.h>
+
+#else
+#ifdef _WIN32
+/*
+ * Include user-controlled settings for windows from
+ * <wolfssl-root>/IDE/WIN/user_settings.h
+ */
+#include <IDE/WIN/user_settings.h>
+#include <wolfssl/wolfcrypt/settings.h>
+#else
+#include <wolfssl/options.h>
+#endif
+#include <wolfssl/openssl/ssl.h>
+#include <wolfssl/error-ssl.h>
+#endif /* not USE_OLD_CYASSL */
+#else
+#if defined(LWS_WITH_MBEDTLS)
+#if defined(LWS_WITH_ESP32)
+/* this filepath is passed to us but without quotes or <> */
+#undef MBEDTLS_CONFIG_FILE
+#define MBEDTLS_CONFIG_FILE <mbedtls/esp_config.h>
+#endif
+#include <mbedtls/ssl.h>
+#else
+#include <openssl/ssl.h>
+#if !defined(LWS_WITH_MBEDTLS)
+#include <openssl/err.h>
+#endif
+#endif
+#endif /* not USE_WOLFSSL */
+#endif
+
+/*
+ * Helpers for pthread mutex in user code... if lws is built for
+ * multiple service threads, these resolve to pthread mutex
+ * operations. In the case LWS_MAX_SMP is 1 (the default), they
+ * are all NOPs and no pthread type or api is referenced.
+ */
+
+#if LWS_MAX_SMP > 1
+
+#include <pthread.h>
+
+#define lws_pthread_mutex(name) pthread_mutex_t name;
+
+static LWS_INLINE void
+lws_pthread_mutex_init(pthread_mutex_t *lock)
+{
+ pthread_mutex_init(lock, NULL);
+}
+
+static LWS_INLINE void
+lws_pthread_mutex_destroy(pthread_mutex_t *lock)
+{
+ pthread_mutex_destroy(lock);
+}
+
+static LWS_INLINE void
+lws_pthread_mutex_lock(pthread_mutex_t *lock)
+{
+ pthread_mutex_lock(lock);
+}
+
+static LWS_INLINE void
+lws_pthread_mutex_unlock(pthread_mutex_t *lock)
+{
+ pthread_mutex_unlock(lock);
+}
+
+#else
+#define lws_pthread_mutex(name)
+#define lws_pthread_mutex_init(_a)
+#define lws_pthread_mutex_destroy(_a)
+#define lws_pthread_mutex_lock(_a)
+#define lws_pthread_mutex_unlock(_a)
+#endif
+
+
+#define CONTEXT_PORT_NO_LISTEN -1
+#define CONTEXT_PORT_NO_LISTEN_SERVER -2
+
+#include <libwebsockets/lws-logs.h>
+
+
+#include <stddef.h>
+
+#ifndef lws_container_of
+#define lws_container_of(P,T,M) ((T *)((char *)(P) - offsetof(T, M)))
+#endif
+
+struct lws;
+
+typedef int64_t lws_usec_t;
+
+/* api change list for user code to test against */
+
+#define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_ARG
+
+/* the struct lws_protocols has the id field present */
+#define LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
+
+/* you can call lws_get_peer_write_allowance */
+#define LWS_FEATURE_PROTOCOLS_HAS_PEER_WRITE_ALLOWANCE
+
+/* extra parameter introduced in 917f43ab821 */
+#define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_LEN
+
+/* File operations stuff exists */
+#define LWS_FEATURE_FOPS
+
+
+#if defined(_WIN32)
+#if !defined(LWS_WIN32_HANDLE_TYPES)
+typedef SOCKET lws_sockfd_type;
+typedef HANDLE lws_filefd_type;
+#endif
+
+struct lws_pollfd {
+ lws_sockfd_type fd; /**< file descriptor */
+ SHORT events; /**< which events to respond to */
+ SHORT revents; /**< which events happened */
+};
+#define LWS_POLLHUP (FD_CLOSE)
+#define LWS_POLLIN (FD_READ | FD_ACCEPT)
+#define LWS_POLLOUT (FD_WRITE)
+#else
+
+
+#if defined(LWS_WITH_ESP32)
+#include <libwebsockets/lws-esp32.h>
+#else
+typedef int lws_sockfd_type;
+typedef int lws_filefd_type;
+#endif
+
+#define lws_pollfd pollfd
+#define LWS_POLLHUP (POLLHUP|POLLERR)
+#define LWS_POLLIN (POLLIN)
+#define LWS_POLLOUT (POLLOUT)
+#endif
+
+
+#if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
+/* ... */
+#define ssize_t SSIZE_T
+#endif
+
+#if defined(WIN32) && defined(LWS_HAVE__STAT32I64)
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+
+#if defined(LWS_HAVE_STDINT_H)
+#include <stdint.h>
+#else
+#if defined(WIN32) || defined(_WIN32)
+/* !!! >:-[ */
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int8 uint8_t;
+#else
+typedef unsigned int uint32_t;
+typedef unsigned short uint16_t;
+typedef unsigned char uint8_t;
+#endif
+#endif
+
+typedef unsigned long long lws_filepos_t;
+typedef long long lws_fileofs_t;
+typedef uint32_t lws_fop_flags_t;
+
+/** struct lws_pollargs - argument structure for all external poll related calls
+ * passed in via 'in' */
+struct lws_pollargs {
+ lws_sockfd_type fd; /**< applicable socket descriptor */
+ int events; /**< the new event mask */
+ int prev_events; /**< the previous event mask */
+};
+
+struct lws_extension; /* needed even with ws exts disabled for create context */
+struct lws_token_limits;
+struct lws_context;
+struct lws_tokens;
+struct lws_vhost;
+struct lws;
+
+#include <libwebsockets/lws-ws-close.h>
+#include <libwebsockets/lws-callbacks.h>
+#include <libwebsockets/lws-ws-state.h>
+#include <libwebsockets/lws-ws-ext.h>
+#include <libwebsockets/lws-protocols-plugins.h>
+#include <libwebsockets/lws-plugin-generic-sessions.h>
+#include <libwebsockets/lws-context-vhost.h>
+#include <libwebsockets/lws-client.h>
+#include <libwebsockets/lws-http.h>
+#include <libwebsockets/lws-spa.h>
+#include <libwebsockets/lws-purify.h>
+#include <libwebsockets/lws-timeout-timer.h>
+#include <libwebsockets/lws-service.h>
+#include <libwebsockets/lws-write.h>
+#include <libwebsockets/lws-writeable.h>
+#include <libwebsockets/lws-adopt.h>
+#include <libwebsockets/lws-network-helper.h>
+#include <libwebsockets/lws-misc.h>
+#include <libwebsockets/lws-ring.h>
+#include <libwebsockets/lws-sha1-base64.h>
+#include <libwebsockets/lws-x509.h>
+#include <libwebsockets/lws-cgi.h>
+#include <libwebsockets/lws-vfs.h>
+#include <libwebsockets/lws-lejp.h>
+#include <libwebsockets/lws-stats.h>
+#include <libwebsockets/lws-threadpool.h>
+#include <libwebsockets/lws-tokenize.h>
+#include <libwebsockets/lws-lwsac.h>
+#include <libwebsockets/lws-fts.h>
+#include <libwebsockets/lws-diskcache.h>
+
+#if defined(LWS_WITH_TLS)
+
+#if defined(LWS_WITH_MBEDTLS)
+#include <mbedtls/sha1.h>
+#include <mbedtls/sha256.h>
+#include <mbedtls/sha512.h>
+#endif
+
+#include <libwebsockets/lws-genhash.h>
+#include <libwebsockets/lws-genrsa.h>
+#include <libwebsockets/lws-jwk.h>
+#include <libwebsockets/lws-jws.h>
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-adopt.h b/thirdparty/libwebsockets/include/libwebsockets/lws-adopt.h
new file mode 100644
index 0000000000..256e3f9fdf
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-adopt.h
@@ -0,0 +1,185 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup sock-adopt Socket adoption helpers
+ * ##Socket adoption helpers
+ *
+ * When integrating with an external app with its own event loop, these can
+ * be used to accept connections from someone else's listening socket.
+ *
+ * When using lws own event loop, these are not needed.
+ */
+///@{
+
+/**
+ * lws_adopt_socket() - adopt foreign socket as if listen socket accepted it
+ * for the default vhost of context.
+ *
+ * \param context: lws context
+ * \param accept_fd: fd of already-accepted socket to adopt
+ *
+ * Either returns new wsi bound to accept_fd, or closes accept_fd and
+ * returns NULL, having cleaned up any new wsi pieces.
+ *
+ * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
+ * to ws or just serve http.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_adopt_socket(struct lws_context *context, lws_sockfd_type accept_fd);
+/**
+ * lws_adopt_socket_vhost() - adopt foreign socket as if listen socket accepted
+ * it for vhost
+ *
+ * \param vh: lws vhost
+ * \param accept_fd: fd of already-accepted socket to adopt
+ *
+ * Either returns new wsi bound to accept_fd, or closes accept_fd and
+ * returns NULL, having cleaned up any new wsi pieces.
+ *
+ * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
+ * to ws or just serve http.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_adopt_socket_vhost(struct lws_vhost *vh, lws_sockfd_type accept_fd);
+
+typedef enum {
+ LWS_ADOPT_RAW_FILE_DESC = 0, /* convenience constant */
+ LWS_ADOPT_HTTP = 1, /* flag: absent implies RAW */
+ LWS_ADOPT_SOCKET = 2, /* flag: absent implies file descr */
+ LWS_ADOPT_ALLOW_SSL = 4, /* flag: if set requires LWS_ADOPT_SOCKET */
+ LWS_ADOPT_FLAG_UDP = 16, /* flag: socket is UDP */
+
+ LWS_ADOPT_RAW_SOCKET_UDP = LWS_ADOPT_SOCKET | LWS_ADOPT_FLAG_UDP,
+} lws_adoption_type;
+
+typedef union {
+ lws_sockfd_type sockfd;
+ lws_filefd_type filefd;
+} lws_sock_file_fd_type;
+
+#if !defined(LWS_WITH_ESP32)
+struct lws_udp {
+ struct sockaddr sa;
+ socklen_t salen;
+
+ struct sockaddr sa_pending;
+ socklen_t salen_pending;
+};
+#endif
+
+/*
+* lws_adopt_descriptor_vhost() - adopt foreign socket or file descriptor
+* if socket descriptor, should already have been accepted from listen socket
+*
+* \param vhost: lws vhost
+* \param type: OR-ed combinations of lws_adoption_type flags
+* \param fd: union with either .sockfd or .filefd set
+* \param vh_prot_name: NULL or vh protocol name to bind raw connection to
+* \param parent: NULL or struct lws to attach new_wsi to as a child
+*
+* Either returns new wsi bound to accept_fd, or closes accept_fd and
+* returns NULL, having cleaned up any new wsi pieces.
+*
+* If LWS_ADOPT_SOCKET is set, LWS adopts the socket in http serving mode, it's
+* ready to accept an upgrade to ws or just serve http.
+*
+* parent may be NULL, if given it should be an existing wsi that will become the
+* parent of the new wsi created by this call.
+*/
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_adopt_descriptor_vhost(struct lws_vhost *vh, lws_adoption_type type,
+ lws_sock_file_fd_type fd, const char *vh_prot_name,
+ struct lws *parent);
+
+/**
+ * lws_adopt_socket_readbuf() - adopt foreign socket and first rx as if listen socket accepted it
+ * for the default vhost of context.
+ * \param context: lws context
+ * \param accept_fd: fd of already-accepted socket to adopt
+ * \param readbuf: NULL or pointer to data that must be drained before reading from
+ * accept_fd
+ * \param len: The length of the data held at \param readbuf
+ *
+ * Either returns new wsi bound to accept_fd, or closes accept_fd and
+ * returns NULL, having cleaned up any new wsi pieces.
+ *
+ * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
+ * to ws or just serve http.
+ *
+ * If your external code did not already read from the socket, you can use
+ * lws_adopt_socket() instead.
+ *
+ * This api is guaranteed to use the data at \param readbuf first, before reading from
+ * the socket.
+ *
+ * readbuf is limited to the size of the ah rx buf, currently 2048 bytes.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_adopt_socket_readbuf(struct lws_context *context, lws_sockfd_type accept_fd,
+ const char *readbuf, size_t len);
+/**
+ * lws_adopt_socket_vhost_readbuf() - adopt foreign socket and first rx as if listen socket
+ * accepted it for vhost.
+ * \param vhost: lws vhost
+ * \param accept_fd: fd of already-accepted socket to adopt
+ * \param readbuf: NULL or pointer to data that must be drained before
+ * reading from accept_fd
+ * \param len: The length of the data held at \param readbuf
+ *
+ * Either returns new wsi bound to accept_fd, or closes accept_fd and
+ * returns NULL, having cleaned up any new wsi pieces.
+ *
+ * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
+ * to ws or just serve http.
+ *
+ * If your external code did not already read from the socket, you can use
+ * lws_adopt_socket() instead.
+ *
+ * This api is guaranteed to use the data at \param readbuf first, before reading from
+ * the socket.
+ *
+ * readbuf is limited to the size of the ah rx buf, currently 2048 bytes.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_adopt_socket_vhost_readbuf(struct lws_vhost *vhost,
+ lws_sockfd_type accept_fd, const char *readbuf,
+ size_t len);
+
+#define LWS_CAUDP_BIND 1
+
+/**
+ * lws_create_adopt_udp() - create, bind and adopt a UDP socket
+ *
+ * \param vhost: lws vhost
+ * \param port: UDP port to bind to, -1 means unbound
+ * \param flags: 0 or LWS_CAUDP_NO_BIND
+ * \param protocol_name: Name of protocol on vhost to bind wsi to
+ * \param parent_wsi: NULL or parent wsi new wsi will be a child of
+ *
+ * Either returns new wsi bound to accept_fd, or closes accept_fd and
+ * returns NULL, having cleaned up any new wsi pieces.
+ * */
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_create_adopt_udp(struct lws_vhost *vhost, int port, int flags,
+ const char *protocol_name, struct lws *parent_wsi);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-callbacks.h b/thirdparty/libwebsockets/include/libwebsockets/lws-callbacks.h
new file mode 100644
index 0000000000..8b49218e9c
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-callbacks.h
@@ -0,0 +1,807 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup usercb User Callback
+ *
+ * ##User protocol callback
+ *
+ * The protocol callback is the primary way lws interacts with
+ * user code. For one of a list of a few dozen reasons the callback gets
+ * called at some event to be handled.
+ *
+ * All of the events can be ignored, returning 0 is taken as "OK" and returning
+ * nonzero in most cases indicates that the connection should be closed.
+ */
+///@{
+
+struct lws_ssl_info {
+ int where;
+ int ret;
+};
+
+enum lws_cert_update_state {
+ LWS_CUS_IDLE,
+ LWS_CUS_STARTING,
+ LWS_CUS_SUCCESS,
+ LWS_CUS_FAILED,
+
+ LWS_CUS_CREATE_KEYS,
+ LWS_CUS_REG,
+ LWS_CUS_AUTH,
+ LWS_CUS_CHALLENGE,
+ LWS_CUS_CREATE_REQ,
+ LWS_CUS_REQ,
+ LWS_CUS_CONFIRM,
+ LWS_CUS_ISSUE,
+};
+
+enum {
+ LWS_TLS_REQ_ELEMENT_COUNTRY,
+ LWS_TLS_REQ_ELEMENT_STATE,
+ LWS_TLS_REQ_ELEMENT_LOCALITY,
+ LWS_TLS_REQ_ELEMENT_ORGANIZATION,
+ LWS_TLS_REQ_ELEMENT_COMMON_NAME,
+ LWS_TLS_REQ_ELEMENT_EMAIL,
+
+ LWS_TLS_REQ_ELEMENT_COUNT,
+
+ LWS_TLS_SET_DIR_URL = LWS_TLS_REQ_ELEMENT_COUNT,
+ LWS_TLS_SET_AUTH_PATH,
+ LWS_TLS_SET_CERT_PATH,
+ LWS_TLS_SET_KEY_PATH,
+
+ LWS_TLS_TOTAL_COUNT
+};
+
+struct lws_acme_cert_aging_args {
+ struct lws_vhost *vh;
+ const char *element_overrides[LWS_TLS_TOTAL_COUNT]; /* NULL = use pvo */
+};
+
+/*
+ * NOTE: These public enums are part of the abi. If you want to add one,
+ * add it at where specified so existing users are unaffected.
+ */
+/** enum lws_callback_reasons - reason you're getting a protocol callback */
+enum lws_callback_reasons {
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to wsi and protocol binding lifecycle -----
+ */
+
+ LWS_CALLBACK_PROTOCOL_INIT = 27,
+ /**< One-time call per protocol, per-vhost using it, so it can
+ * do initial setup / allocations etc */
+
+ LWS_CALLBACK_PROTOCOL_DESTROY = 28,
+ /**< One-time call per protocol, per-vhost using it, indicating
+ * this protocol won't get used at all after this callback, the
+ * vhost is getting destroyed. Take the opportunity to
+ * deallocate everything that was allocated by the protocol. */
+
+ LWS_CALLBACK_WSI_CREATE = 29,
+ /**< outermost (earliest) wsi create notification to protocols[0] */
+
+ LWS_CALLBACK_WSI_DESTROY = 30,
+ /**< outermost (latest) wsi destroy notification to protocols[0] */
+
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to Server TLS -----
+ */
+
+ LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS = 21,
+ /**< if configured for
+ * including OpenSSL support, this callback allows your user code
+ * to perform extra SSL_CTX_load_verify_locations() or similar
+ * calls to direct OpenSSL where to find certificates the client
+ * can use to confirm the remote server identity. user is the
+ * OpenSSL SSL_CTX* */
+
+ LWS_CALLBACK_OPENSSL_LOAD_EXTRA_SERVER_VERIFY_CERTS = 22,
+ /**< if configured for
+ * including OpenSSL support, this callback allows your user code
+ * to load extra certificates into the server which allow it to
+ * verify the validity of certificates returned by clients. user
+ * is the server's OpenSSL SSL_CTX* and in is the lws_vhost */
+
+ LWS_CALLBACK_OPENSSL_PERFORM_CLIENT_CERT_VERIFICATION = 23,
+ /**< if the libwebsockets vhost was created with the option
+ * LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT, then this
+ * callback is generated during OpenSSL verification of the cert
+ * sent from the client. It is sent to protocol[0] callback as
+ * no protocol has been negotiated on the connection yet.
+ * Notice that the libwebsockets context and wsi are both NULL
+ * during this callback. See
+ * http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html
+ * to understand more detail about the OpenSSL callback that
+ * generates this libwebsockets callback and the meanings of the
+ * arguments passed. In this callback, user is the x509_ctx,
+ * in is the ssl pointer and len is preverify_ok
+ * Notice that this callback maintains libwebsocket return
+ * conventions, return 0 to mean the cert is OK or 1 to fail it.
+ * This also means that if you don't handle this callback then
+ * the default callback action of returning 0 allows the client
+ * certificates. */
+
+ LWS_CALLBACK_OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY = 37,
+ /**< if configured for including OpenSSL support but no private key
+ * file has been specified (ssl_private_key_filepath is NULL), this is
+ * called to allow the user to set the private key directly via
+ * libopenssl and perform further operations if required; this might be
+ * useful in situations where the private key is not directly accessible
+ * by the OS, for example if it is stored on a smartcard.
+ * user is the server's OpenSSL SSL_CTX* */
+
+ LWS_CALLBACK_SSL_INFO = 67,
+ /**< SSL connections only. An event you registered an
+ * interest in at the vhost has occurred on a connection
+ * using the vhost. in is a pointer to a
+ * struct lws_ssl_info containing information about the
+ * event*/
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to Client TLS -----
+ */
+
+ LWS_CALLBACK_OPENSSL_PERFORM_SERVER_CERT_VERIFICATION = 58,
+ /**< Similar to LWS_CALLBACK_OPENSSL_PERFORM_CLIENT_CERT_VERIFICATION
+ * this callback is called during OpenSSL verification of the cert
+ * sent from the server to the client. It is sent to protocol[0]
+ * callback as no protocol has been negotiated on the connection yet.
+ * Notice that the wsi is set because lws_client_connect_via_info was
+ * successful.
+ *
+ * See http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html
+ * to understand more detail about the OpenSSL callback that
+ * generates this libwebsockets callback and the meanings of the
+ * arguments passed. In this callback, user is the x509_ctx,
+ * in is the ssl pointer and len is preverify_ok.
+ *
+ * THIS IS NOT RECOMMENDED BUT if a cert validation error shall be
+ * overruled and cert shall be accepted as ok,
+ * X509_STORE_CTX_set_error((X509_STORE_CTX*)user, X509_V_OK); must be
+ * called and return value must be 0 to mean the cert is OK;
+ * returning 1 will fail the cert in any case.
+ *
+ * This also means that if you don't handle this callback then
+ * the default callback action of returning 0 will not accept the
+ * certificate in case of a validation error decided by the SSL lib.
+ *
+ * This is expected and secure behaviour when validating certificates.
+ *
+ * Note: LCCSCF_ALLOW_SELFSIGNED and
+ * LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK still work without this
+ * callback being implemented.
+ */
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to HTTP Server -----
+ */
+
+ LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED = 19,
+ /**< A new client has been accepted by the ws server. This
+ * callback allows setting any relevant property to it. Because this
+ * happens immediately after the instantiation of a new client,
+ * there's no websocket protocol selected yet so this callback is
+ * issued only to protocol 0. Only wsi is defined, pointing to the
+ * new client, and the return value is ignored. */
+
+ LWS_CALLBACK_HTTP = 12,
+ /**< an http request has come from a client that is not
+ * asking to upgrade the connection to a websocket
+ * one. This is a chance to serve http content,
+ * for example, to send a script to the client
+ * which will then open the websockets connection.
+ * in points to the URI path requested and
+ * lws_serve_http_file() makes it very
+ * simple to send back a file to the client.
+ * Normally after sending the file you are done
+ * with the http connection, since the rest of the
+ * activity will come by websockets from the script
+ * that was delivered by http, so you will want to
+ * return 1; to close and free up the connection. */
+
+ LWS_CALLBACK_HTTP_BODY = 13,
+ /**< the next len bytes data from the http
+ * request body HTTP connection is now available in in. */
+
+ LWS_CALLBACK_HTTP_BODY_COMPLETION = 14,
+ /**< the expected amount of http request body has been delivered */
+
+ LWS_CALLBACK_HTTP_FILE_COMPLETION = 15,
+ /**< a file requested to be sent down http link has completed. */
+
+ LWS_CALLBACK_HTTP_WRITEABLE = 16,
+ /**< you can write more down the http protocol link now. */
+
+ LWS_CALLBACK_CLOSED_HTTP = 5,
+ /**< when a HTTP (non-websocket) session ends */
+
+ LWS_CALLBACK_FILTER_HTTP_CONNECTION = 18,
+ /**< called when the request has
+ * been received and parsed from the client, but the response is
+ * not sent yet. Return non-zero to disallow the connection.
+ * user is a pointer to the connection user space allocation,
+ * in is the URI, eg, "/"
+ * In your handler you can use the public APIs
+ * lws_hdr_total_length() / lws_hdr_copy() to access all of the
+ * headers using the header enums lws_token_indexes from
+ * libwebsockets.h to check for and read the supported header
+ * presence and content before deciding to allow the http
+ * connection to proceed or to kill the connection. */
+
+ LWS_CALLBACK_ADD_HEADERS = 53,
+ /**< This gives your user code a chance to add headers to a server
+ * transaction bound to your protocol. `in` points to a
+ * `struct lws_process_html_args` describing a buffer and length
+ * you can add headers into using the normal lws apis.
+ *
+ * (see LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER to add headers to
+ * a client transaction)
+ *
+ * Only `args->p` and `args->len` are valid, and `args->p` should
+ * be moved on by the amount of bytes written, if any. Eg
+ *
+ * case LWS_CALLBACK_ADD_HEADERS:
+ *
+ * struct lws_process_html_args *args =
+ * (struct lws_process_html_args *)in;
+ *
+ * if (lws_add_http_header_by_name(wsi,
+ * (unsigned char *)"set-cookie:",
+ * (unsigned char *)cookie, cookie_len,
+ * (unsigned char **)&args->p,
+ * (unsigned char *)args->p + args->max_len))
+ * return 1;
+ *
+ * break;
+ */
+
+ LWS_CALLBACK_CHECK_ACCESS_RIGHTS = 51,
+ /**< This gives the user code a chance to forbid an http access.
+ * `in` points to a `struct lws_process_html_args`, which
+ * describes the URL, and a bit mask describing the type of
+ * authentication required. If the callback returns nonzero,
+ * the transaction ends with HTTP_STATUS_UNAUTHORIZED. */
+
+ LWS_CALLBACK_PROCESS_HTML = 52,
+ /**< This gives your user code a chance to mangle outgoing
+ * HTML. `in` points to a `struct lws_process_html_args`
+ * which describes the buffer containing outgoing HTML.
+ * The buffer may grow up to `.max_len` (currently +128
+ * bytes per buffer).
+ */
+
+ LWS_CALLBACK_HTTP_BIND_PROTOCOL = 49,
+ /**< By default, all HTTP handling is done in protocols[0].
+ * However you can bind different protocols (by name) to
+ * different parts of the URL space using callback mounts. This
+ * callback occurs in the new protocol when a wsi is bound
+ * to that protocol. Any protocol allocation related to the
+ * http transaction processing should be created then.
+ * These specific callbacks are necessary because with HTTP/1.1,
+ * a single connection may perform at series of different
+ * transactions at different URLs, thus the lifetime of the
+ * protocol bind is just for one transaction, not connection. */
+
+ LWS_CALLBACK_HTTP_DROP_PROTOCOL = 50,
+ /**< This is called when a transaction is unbound from a protocol.
+ * It indicates the connection completed its transaction and may
+ * do something different now. Any protocol allocation related
+ * to the http transaction processing should be destroyed. */
+
+ LWS_CALLBACK_HTTP_CONFIRM_UPGRADE = 86,
+ /**< This is your chance to reject an HTTP upgrade action. The
+ * name of the protocol being upgraded to is in 'in', and the ah
+ * is still bound to the wsi, so you can look at the headers.
+ *
+ * The default of returning 0 (ie, also if not handled) means the
+ * upgrade may proceed. Return <0 to just hang up the connection,
+ * or >0 if you have rejected the connection by returning http headers
+ * and response code yourself.
+ *
+ * There is no need for you to call transaction_completed() as the
+ * caller will take care of it when it sees you returned >0.
+ */
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to HTTP Client -----
+ */
+
+ LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP = 44,
+ /**< The HTTP client connection has succeeded, and is now
+ * connected to the server */
+
+ LWS_CALLBACK_CLOSED_CLIENT_HTTP = 45,
+ /**< The HTTP client connection is closing */
+
+ LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ = 48,
+ /**< This is generated by lws_http_client_read() used to drain
+ * incoming data. In the case the incoming data was chunked, it will
+ * be split into multiple smaller callbacks for each chunk block,
+ * removing the chunk headers. If not chunked, it will appear all in
+ * one callback. */
+
+ LWS_CALLBACK_RECEIVE_CLIENT_HTTP = 46,
+ /**< This simply indicates data was received on the HTTP client
+ * connection. It does NOT drain or provide the data.
+ * This exists to neatly allow a proxying type situation,
+ * where this incoming data will go out on another connection.
+ * If the outgoing connection stalls, we should stall processing
+ * the incoming data. So a handler for this in that case should
+ * simply set a flag to indicate there is incoming data ready
+ * and ask for a writeable callback on the outgoing connection.
+ * In the writable callback he can check the flag and then get
+ * and drain the waiting incoming data using lws_http_client_read().
+ * This will use callbacks to LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ
+ * to get and drain the incoming data, where it should be sent
+ * back out on the outgoing connection. */
+ LWS_CALLBACK_COMPLETED_CLIENT_HTTP = 47,
+ /**< The client transaction completed... at the moment this
+ * is the same as closing since transaction pipelining on
+ * client side is not yet supported. */
+
+ LWS_CALLBACK_CLIENT_HTTP_WRITEABLE = 57,
+ /**< when doing an HTTP type client connection, you can call
+ * lws_client_http_body_pending(wsi, 1) from
+ * LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER to get these callbacks
+ * sending the HTTP headers.
+ *
+ * From this callback, when you have sent everything, you should let
+ * lws know by calling lws_client_http_body_pending(wsi, 0)
+ */
+
+ LWS_CALLBACK_CLIENT_HTTP_BIND_PROTOCOL = 85,
+ LWS_CALLBACK_CLIENT_HTTP_DROP_PROTOCOL = 76,
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to Websocket Server -----
+ */
+
+ LWS_CALLBACK_ESTABLISHED = 0,
+ /**< (VH) after the server completes a handshake with an incoming
+ * client. If you built the library with ssl support, in is a
+ * pointer to the ssl struct associated with the connection or NULL.
+ *
+ * b0 of len is set if the connection was made using ws-over-h2
+ */
+
+ LWS_CALLBACK_CLOSED = 4,
+ /**< when the websocket session ends */
+
+ LWS_CALLBACK_SERVER_WRITEABLE = 11,
+ /**< See LWS_CALLBACK_CLIENT_WRITEABLE */
+
+ LWS_CALLBACK_RECEIVE = 6,
+ /**< data has appeared for this server endpoint from a
+ * remote client, it can be found at *in and is
+ * len bytes long */
+
+ LWS_CALLBACK_RECEIVE_PONG = 7,
+ /**< servers receive PONG packets with this callback reason */
+
+ LWS_CALLBACK_WS_PEER_INITIATED_CLOSE = 38,
+ /**< The peer has sent an unsolicited Close WS packet. in and
+ * len are the optional close code (first 2 bytes, network
+ * order) and the optional additional information which is not
+ * defined in the standard, and may be a string or non human-readable
+ * data.
+ * If you return 0 lws will echo the close and then close the
+ * connection. If you return nonzero lws will just close the
+ * connection. */
+
+ LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION = 20,
+ /**< called when the handshake has
+ * been received and parsed from the client, but the response is
+ * not sent yet. Return non-zero to disallow the connection.
+ * user is a pointer to the connection user space allocation,
+ * in is the requested protocol name
+ * In your handler you can use the public APIs
+ * lws_hdr_total_length() / lws_hdr_copy() to access all of the
+ * headers using the header enums lws_token_indexes from
+ * libwebsockets.h to check for and read the supported header
+ * presence and content before deciding to allow the handshake
+ * to proceed or to kill the connection. */
+
+ LWS_CALLBACK_CONFIRM_EXTENSION_OKAY = 25,
+ /**< When the server handshake code
+ * sees that it does support a requested extension, before
+ * accepting the extension by additing to the list sent back to
+ * the client it gives this callback just to check that it's okay
+ * to use that extension. It calls back to the requested protocol
+ * and with in being the extension name, len is 0 and user is
+ * valid. Note though at this time the ESTABLISHED callback hasn't
+ * happened yet so if you initialize user content there, user
+ * content during this callback might not be useful for anything. */
+
+ LWS_CALLBACK_WS_SERVER_BIND_PROTOCOL = 77,
+ LWS_CALLBACK_WS_SERVER_DROP_PROTOCOL = 78,
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to Websocket Client -----
+ */
+
+ LWS_CALLBACK_CLIENT_CONNECTION_ERROR = 1,
+ /**< the request client connection has been unable to complete a
+ * handshake with the remote server. If in is non-NULL, you can
+ * find an error string of length len where it points to
+ *
+ * Diagnostic strings that may be returned include
+ *
+ * "getaddrinfo (ipv6) failed"
+ * "unknown address family"
+ * "getaddrinfo (ipv4) failed"
+ * "set socket opts failed"
+ * "insert wsi failed"
+ * "lws_ssl_client_connect1 failed"
+ * "lws_ssl_client_connect2 failed"
+ * "Peer hung up"
+ * "read failed"
+ * "HS: URI missing"
+ * "HS: Redirect code but no Location"
+ * "HS: URI did not parse"
+ * "HS: Redirect failed"
+ * "HS: Server did not return 200"
+ * "HS: OOM"
+ * "HS: disallowed by client filter"
+ * "HS: disallowed at ESTABLISHED"
+ * "HS: ACCEPT missing"
+ * "HS: ws upgrade response not 101"
+ * "HS: UPGRADE missing"
+ * "HS: Upgrade to something other than websocket"
+ * "HS: CONNECTION missing"
+ * "HS: UPGRADE malformed"
+ * "HS: PROTOCOL malformed"
+ * "HS: Cannot match protocol"
+ * "HS: EXT: list too big"
+ * "HS: EXT: failed setting defaults"
+ * "HS: EXT: failed parsing defaults"
+ * "HS: EXT: failed parsing options"
+ * "HS: EXT: Rejects server options"
+ * "HS: EXT: unknown ext"
+ * "HS: Accept hash wrong"
+ * "HS: Rejected by filter cb"
+ * "HS: OOM"
+ * "HS: SO_SNDBUF failed"
+ * "HS: Rejected at CLIENT_ESTABLISHED"
+ */
+
+ LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH = 2,
+ /**< this is the last chance for the client user code to examine the
+ * http headers and decide to reject the connection. If the
+ * content in the headers is interesting to the
+ * client (url, etc) it needs to copy it out at
+ * this point since it will be destroyed before
+ * the CLIENT_ESTABLISHED call */
+
+ LWS_CALLBACK_CLIENT_ESTABLISHED = 3,
+ /**< after your client connection completed the websocket upgrade
+ * handshake with the remote server */
+
+ LWS_CALLBACK_CLIENT_CLOSED = 75,
+ /**< when a client websocket session ends */
+
+ LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER = 24,
+ /**< this callback happens
+ * when a client handshake is being compiled. user is NULL,
+ * in is a char **, it's pointing to a char * which holds the
+ * next location in the header buffer where you can add
+ * headers, and len is the remaining space in the header buffer,
+ * which is typically some hundreds of bytes. So, to add a canned
+ * cookie, your handler code might look similar to:
+ *
+ * char **p = (char **)in, *end = (*p) + len;
+ *
+ * if (lws_add_http_header_by_token(wsi, WSI_TOKEN_HTTP_COOKIE,
+ * (unsigned char)"a=b", 3, p, end))
+ * return -1;
+ *
+ * See LWS_CALLBACK_ADD_HEADERS for adding headers to server
+ * transactions.
+ */
+
+ LWS_CALLBACK_CLIENT_RECEIVE = 8,
+ /**< data has appeared from the server for the client connection, it
+ * can be found at *in and is len bytes long */
+
+ LWS_CALLBACK_CLIENT_RECEIVE_PONG = 9,
+ /**< clients receive PONG packets with this callback reason */
+
+ LWS_CALLBACK_CLIENT_WRITEABLE = 10,
+ /**< If you call lws_callback_on_writable() on a connection, you will
+ * get one of these callbacks coming when the connection socket
+ * is able to accept another write packet without blocking.
+ * If it already was able to take another packet without blocking,
+ * you'll get this callback at the next call to the service loop
+ * function. Notice that CLIENTs get LWS_CALLBACK_CLIENT_WRITEABLE
+ * and servers get LWS_CALLBACK_SERVER_WRITEABLE. */
+
+ LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED = 26,
+ /**< When a ws client
+ * connection is being prepared to start a handshake to a server,
+ * each supported extension is checked with protocols[0] callback
+ * with this reason, giving the user code a chance to suppress the
+ * claim to support that extension by returning non-zero. If
+ * unhandled, by default 0 will be returned and the extension
+ * support included in the header to the server. Notice this
+ * callback comes to protocols[0]. */
+
+ LWS_CALLBACK_WS_EXT_DEFAULTS = 39,
+ /**< Gives client connections an opportunity to adjust negotiated
+ * extension defaults. `user` is the extension name that was
+ * negotiated (eg, "permessage-deflate"). `in` points to a
+ * buffer and `len` is the buffer size. The user callback can
+ * set the buffer to a string describing options the extension
+ * should parse. Or just ignore for defaults. */
+
+
+ LWS_CALLBACK_FILTER_NETWORK_CONNECTION = 17,
+ /**< called when a client connects to
+ * the server at network level; the connection is accepted but then
+ * passed to this callback to decide whether to hang up immediately
+ * or not, based on the client IP. in contains the connection
+ * socket's descriptor. Since the client connection information is
+ * not available yet, wsi still pointing to the main server socket.
+ * Return non-zero to terminate the connection before sending or
+ * receiving anything. Because this happens immediately after the
+ * network connection from the client, there's no websocket protocol
+ * selected yet so this callback is issued only to protocol 0. */
+
+ LWS_CALLBACK_WS_CLIENT_BIND_PROTOCOL = 79,
+ LWS_CALLBACK_WS_CLIENT_DROP_PROTOCOL = 80,
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to external poll loop integration -----
+ */
+
+ LWS_CALLBACK_GET_THREAD_ID = 31,
+ /**< lws can accept callback when writable requests from other
+ * threads, if you implement this callback and return an opaque
+ * current thread ID integer. */
+
+ /* external poll() management support */
+ LWS_CALLBACK_ADD_POLL_FD = 32,
+ /**< lws normally deals with its poll() or other event loop
+ * internally, but in the case you are integrating with another
+ * server you will need to have lws sockets share a
+ * polling array with the other server. This and the other
+ * POLL_FD related callbacks let you put your specialized
+ * poll array interface code in the callback for protocol 0, the
+ * first protocol you support, usually the HTTP protocol in the
+ * serving case.
+ * This callback happens when a socket needs to be
+ * added to the polling loop: in points to a struct
+ * lws_pollargs; the fd member of the struct is the file
+ * descriptor, and events contains the active events
+ *
+ * If you are using the internal lws polling / event loop
+ * you can just ignore these callbacks. */
+
+ LWS_CALLBACK_DEL_POLL_FD = 33,
+ /**< This callback happens when a socket descriptor
+ * needs to be removed from an external polling array. in is
+ * again the struct lws_pollargs containing the fd member
+ * to be removed. If you are using the internal polling
+ * loop, you can just ignore it. */
+
+ LWS_CALLBACK_CHANGE_MODE_POLL_FD = 34,
+ /**< This callback happens when lws wants to modify the events for
+ * a connection.
+ * in is the struct lws_pollargs with the fd to change.
+ * The new event mask is in events member and the old mask is in
+ * the prev_events member.
+ * If you are using the internal polling loop, you can just ignore
+ * it. */
+
+ LWS_CALLBACK_LOCK_POLL = 35,
+ /**< These allow the external poll changes driven
+ * by lws to participate in an external thread locking
+ * scheme around the changes, so the whole thing is threadsafe.
+ * These are called around three activities in the library,
+ * - inserting a new wsi in the wsi / fd table (len=1)
+ * - deleting a wsi from the wsi / fd table (len=1)
+ * - changing a wsi's POLLIN/OUT state (len=0)
+ * Locking and unlocking external synchronization objects when
+ * len == 1 allows external threads to be synchronized against
+ * wsi lifecycle changes if it acquires the same lock for the
+ * duration of wsi dereference from the other thread context. */
+
+ LWS_CALLBACK_UNLOCK_POLL = 36,
+ /**< See LWS_CALLBACK_LOCK_POLL, ignore if using lws internal poll */
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to CGI serving -----
+ */
+
+ LWS_CALLBACK_CGI = 40,
+ /**< CGI: CGI IO events on stdin / out / err are sent here on
+ * protocols[0]. The provided `lws_callback_http_dummy()`
+ * handles this and the callback should be directed there if
+ * you use CGI. */
+
+ LWS_CALLBACK_CGI_TERMINATED = 41,
+ /**< CGI: The related CGI process ended, this is called before
+ * the wsi is closed. Used to, eg, terminate chunking.
+ * The provided `lws_callback_http_dummy()`
+ * handles this and the callback should be directed there if
+ * you use CGI. The child PID that terminated is in len. */
+
+ LWS_CALLBACK_CGI_STDIN_DATA = 42,
+ /**< CGI: Data is, to be sent to the CGI process stdin, eg from
+ * a POST body. The provided `lws_callback_http_dummy()`
+ * handles this and the callback should be directed there if
+ * you use CGI. */
+
+ LWS_CALLBACK_CGI_STDIN_COMPLETED = 43,
+ /**< CGI: no more stdin is coming. The provided
+ * `lws_callback_http_dummy()` handles this and the callback
+ * should be directed there if you use CGI. */
+
+ LWS_CALLBACK_CGI_PROCESS_ATTACH = 70,
+ /**< CGI: Sent when the CGI process is spawned for the wsi. The
+ * len parameter is the PID of the child process */
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to Generic Sessions -----
+ */
+
+ LWS_CALLBACK_SESSION_INFO = 54,
+ /**< This is only generated by user code using generic sessions.
+ * It's used to get a `struct lws_session_info` filled in by
+ * generic sessions with information about the logged-in user.
+ * See the messageboard sample for an example of how to use. */
+
+ LWS_CALLBACK_GS_EVENT = 55,
+ /**< Indicates an event happened to the Generic Sessions session.
+ * `in` contains a `struct lws_gs_event_args` describing the event. */
+
+ LWS_CALLBACK_HTTP_PMO = 56,
+ /**< per-mount options for this connection, called before
+ * the normal LWS_CALLBACK_HTTP when the mount has per-mount
+ * options.
+ */
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to RAW sockets -----
+ */
+
+ LWS_CALLBACK_RAW_RX = 59,
+ /**< RAW mode connection RX */
+
+ LWS_CALLBACK_RAW_CLOSE = 60,
+ /**< RAW mode connection is closing */
+
+ LWS_CALLBACK_RAW_WRITEABLE = 61,
+ /**< RAW mode connection may be written */
+
+ LWS_CALLBACK_RAW_ADOPT = 62,
+ /**< RAW mode connection was adopted (equivalent to 'wsi created') */
+
+ LWS_CALLBACK_RAW_SKT_BIND_PROTOCOL = 81,
+ LWS_CALLBACK_RAW_SKT_DROP_PROTOCOL = 82,
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to RAW file handles -----
+ */
+
+ LWS_CALLBACK_RAW_ADOPT_FILE = 63,
+ /**< RAW mode file was adopted (equivalent to 'wsi created') */
+
+ LWS_CALLBACK_RAW_RX_FILE = 64,
+ /**< This is the indication the RAW mode file has something to read.
+ * This doesn't actually do the read of the file and len is always
+ * 0... your code should do the read having been informed there is
+ * something to read now. */
+
+ LWS_CALLBACK_RAW_WRITEABLE_FILE = 65,
+ /**< RAW mode file is writeable */
+
+ LWS_CALLBACK_RAW_CLOSE_FILE = 66,
+ /**< RAW mode wsi that adopted a file is closing */
+
+ LWS_CALLBACK_RAW_FILE_BIND_PROTOCOL = 83,
+ LWS_CALLBACK_RAW_FILE_DROP_PROTOCOL = 84,
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to generic wsi events -----
+ */
+
+ LWS_CALLBACK_TIMER = 73,
+ /**< When the time elapsed after a call to
+ * lws_set_timer_usecs(wsi, usecs) is up, the wsi will get one of
+ * these callbacks. The deadline can be continuously extended into the
+ * future by later calls to lws_set_timer_usecs() before the deadline
+ * expires, or cancelled by lws_set_timer_usecs(wsi, -1);
+ */
+
+ LWS_CALLBACK_EVENT_WAIT_CANCELLED = 71,
+ /**< This is sent to every protocol of every vhost in response
+ * to lws_cancel_service() or lws_cancel_service_pt(). This
+ * callback is serialized in the lws event loop normally, even
+ * if the lws_cancel_service[_pt]() call was from a different
+ * thread. */
+
+ LWS_CALLBACK_CHILD_CLOSING = 69,
+ /**< Sent to parent to notify them a child is closing / being
+ * destroyed. in is the child wsi.
+ */
+
+ /* ---------------------------------------------------------------------
+ * ----- Callbacks related to TLS certificate management -----
+ */
+
+ LWS_CALLBACK_VHOST_CERT_AGING = 72,
+ /**< When a vhost TLS cert has its expiry checked, this callback
+ * is broadcast to every protocol of every vhost in case the
+ * protocol wants to take some action with this information.
+ * \p in is a pointer to a struct lws_acme_cert_aging_args,
+ * and \p len is the number of days left before it expires, as
+ * a (ssize_t). In the struct lws_acme_cert_aging_args, vh
+ * points to the vhost the cert aging information applies to,
+ * and element_overrides[] is an optional way to update information
+ * from the pvos... NULL in an index means use the information from
+ * from the pvo for the cert renewal, non-NULL in the array index
+ * means use that pointer instead for the index. */
+
+ LWS_CALLBACK_VHOST_CERT_UPDATE = 74,
+ /**< When a vhost TLS cert is being updated, progress is
+ * reported to the vhost in question here, including completion
+ * and failure. in points to optional JSON, and len represents the
+ * connection state using enum lws_cert_update_state */
+
+
+ /****** add new things just above ---^ ******/
+
+ LWS_CALLBACK_USER = 1000,
+ /**< user code can use any including above without fear of clashes */
+};
+
+
+
+/**
+ * typedef lws_callback_function() - User server actions
+ * \param wsi: Opaque websocket instance pointer
+ * \param reason: The reason for the call
+ * \param user: Pointer to per-session user data allocated by library
+ * \param in: Pointer used for some callback reasons
+ * \param len: Length set for some callback reasons
+ *
+ * This callback is the way the user controls what is served. All the
+ * protocol detail is hidden and handled by the library.
+ *
+ * For each connection / session there is user data allocated that is
+ * pointed to by "user". You set the size of this user data area when
+ * the library is initialized with lws_create_server.
+ */
+typedef int
+lws_callback_function(struct lws *wsi, enum lws_callback_reasons reason,
+ void *user, void *in, size_t len);
+
+#define LWS_CB_REASON_AUX_BF__CGI 1
+#define LWS_CB_REASON_AUX_BF__PROXY 2
+#define LWS_CB_REASON_AUX_BF__CGI_CHUNK_END 4
+#define LWS_CB_REASON_AUX_BF__CGI_HEADERS 8
+#define LWS_CB_REASON_AUX_BF__PROXY_TRANS_END 16
+#define LWS_CB_REASON_AUX_BF__PROXY_HEADERS 32
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-cgi.h b/thirdparty/libwebsockets/include/libwebsockets/lws-cgi.h
new file mode 100644
index 0000000000..7a5eca2855
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-cgi.h
@@ -0,0 +1,103 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup cgi cgi handling
+ *
+ * ##CGI handling
+ *
+ * These functions allow low-level control over stdin/out/err of the cgi.
+ *
+ * However for most cases, binding the cgi to http in and out, the default
+ * lws implementation already does the right thing.
+ */
+
+enum lws_enum_stdinouterr {
+ LWS_STDIN = 0,
+ LWS_STDOUT = 1,
+ LWS_STDERR = 2,
+};
+
+enum lws_cgi_hdr_state {
+ LCHS_HEADER,
+ LCHS_CR1,
+ LCHS_LF1,
+ LCHS_CR2,
+ LCHS_LF2,
+ LHCS_RESPONSE,
+ LHCS_DUMP_HEADERS,
+ LHCS_PAYLOAD,
+ LCHS_SINGLE_0A,
+};
+
+struct lws_cgi_args {
+ struct lws **stdwsi; /**< get fd with lws_get_socket_fd() */
+ enum lws_enum_stdinouterr ch; /**< channel index */
+ unsigned char *data; /**< for messages with payload */
+ enum lws_cgi_hdr_state hdr_state; /**< track where we are in cgi headers */
+ int len; /**< length */
+};
+
+#ifdef LWS_WITH_CGI
+/**
+ * lws_cgi: spawn network-connected cgi process
+ *
+ * \param wsi: connection to own the process
+ * \param exec_array: array of "exec-name" "arg1" ... "argn" NULL
+ * \param script_uri_path_len: how many chars on the left of the uri are the
+ * path to the cgi, or -1 to spawn without URL-related env vars
+ * \param timeout_secs: seconds script should be allowed to run
+ * \param mp_cgienv: pvo list with per-vhost cgi options to put in env
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_cgi(struct lws *wsi, const char * const *exec_array,
+ int script_uri_path_len, int timeout_secs,
+ const struct lws_protocol_vhost_options *mp_cgienv);
+
+/**
+ * lws_cgi_write_split_stdout_headers: write cgi output accounting for header part
+ *
+ * \param wsi: connection to own the process
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_cgi_write_split_stdout_headers(struct lws *wsi);
+
+/**
+ * lws_cgi_kill: terminate cgi process associated with wsi
+ *
+ * \param wsi: connection to own the process
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_cgi_kill(struct lws *wsi);
+
+/**
+ * lws_cgi_get_stdwsi: get wsi for stdin, stdout, or stderr
+ *
+ * \param wsi: parent wsi that has cgi
+ * \param ch: which of LWS_STDIN, LWS_STDOUT or LWS_STDERR
+ */
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_cgi_get_stdwsi(struct lws *wsi, enum lws_enum_stdinouterr ch);
+
+#endif
+///@}
+
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-client.h b/thirdparty/libwebsockets/include/libwebsockets/lws-client.h
new file mode 100644
index 0000000000..a1661b0a9f
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-client.h
@@ -0,0 +1,231 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup client Client related functions
+ * ##Client releated functions
+ * \ingroup lwsapi
+ *
+ * */
+///@{
+
+/** enum lws_client_connect_ssl_connection_flags - flags that may be used
+ * with struct lws_client_connect_info ssl_connection member to control if
+ * and how SSL checks apply to the client connection being created
+ */
+
+enum lws_client_connect_ssl_connection_flags {
+ LCCSCF_USE_SSL = (1 << 0),
+ LCCSCF_ALLOW_SELFSIGNED = (1 << 1),
+ LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK = (1 << 2),
+ LCCSCF_ALLOW_EXPIRED = (1 << 3),
+
+ LCCSCF_PIPELINE = (1 << 16),
+ /**< Serialize / pipeline multiple client connections
+ * on a single connection where possible.
+ *
+ * HTTP/1.0: possible if Keep-Alive: yes sent by server
+ * HTTP/1.1: always possible... uses pipelining
+ * HTTP/2: always possible... uses parallel streams
+ * */
+};
+
+/** struct lws_client_connect_info - parameters to connect with when using
+ * lws_client_connect_via_info() */
+
+struct lws_client_connect_info {
+ struct lws_context *context;
+ /**< lws context to create connection in */
+ const char *address;
+ /**< remote address to connect to */
+ int port;
+ /**< remote port to connect to */
+ int ssl_connection;
+ /**< 0, or a combination of LCCSCF_ flags */
+ const char *path;
+ /**< uri path */
+ const char *host;
+ /**< content of host header */
+ const char *origin;
+ /**< content of origin header */
+ const char *protocol;
+ /**< list of ws protocols we could accept */
+ int ietf_version_or_minus_one;
+ /**< deprecated: currently leave at 0 or -1 */
+ void *userdata;
+ /**< if non-NULL, use this as wsi user_data instead of malloc it */
+ const void *client_exts;
+ /**< UNUSED... provide in info.extensions at context creation time */
+ const char *method;
+ /**< if non-NULL, do this http method instead of ws[s] upgrade.
+ * use "GET" to be a simple http client connection. "RAW" gets
+ * you a connected socket that lws itself will leave alone once
+ * connected. */
+ struct lws *parent_wsi;
+ /**< if another wsi is responsible for this connection, give it here.
+ * this is used to make sure if the parent closes so do any
+ * child connections first. */
+ const char *uri_replace_from;
+ /**< if non-NULL, when this string is found in URIs in
+ * text/html content-encoding, it's replaced with uri_replace_to */
+ const char *uri_replace_to;
+ /**< see uri_replace_from */
+ struct lws_vhost *vhost;
+ /**< vhost to bind to (used to determine related SSL_CTX) */
+ struct lws **pwsi;
+ /**< if not NULL, store the new wsi here early in the connection
+ * process. Although we return the new wsi, the call to create the
+ * client connection does progress the connection somewhat and may
+ * meet an error that will result in the connection being scrubbed and
+ * NULL returned. While the wsi exists though, he may process a
+ * callback like CLIENT_CONNECTION_ERROR with his wsi: this gives the
+ * user callback a way to identify which wsi it is that faced the error
+ * even before the new wsi is returned and even if ultimately no wsi
+ * is returned.
+ */
+ const char *iface;
+ /**< NULL to allow routing on any interface, or interface name or IP
+ * to bind the socket to */
+ const char *local_protocol_name;
+ /**< NULL: .protocol is used both to select the local protocol handler
+ * to bind to and as the list of remote ws protocols we could
+ * accept.
+ * non-NULL: this protocol name is used to bind the connection to
+ * the local protocol handler. .protocol is used for the
+ * list of remote ws protocols we could accept */
+ const char *alpn;
+ /**< NULL: allow lws default ALPN list, from vhost if present or from
+ * list of roles built into lws
+ * non-NULL: require one from provided comma-separated list of alpn
+ * tokens
+ */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility
+ *
+ * The below is to ensure later library versions with new
+ * members added above will see 0 (default) even if the app
+ * was not built against the newer headers.
+ */
+
+ void *_unused[4]; /**< dummy */
+};
+
+/**
+ * lws_client_connect_via_info() - Connect to another websocket server
+ * \param ccinfo: pointer to lws_client_connect_info struct
+ *
+ * This function creates a connection to a remote server using the
+ * information provided in ccinfo.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws *
+lws_client_connect_via_info(const struct lws_client_connect_info *ccinfo);
+
+/**
+ * lws_init_vhost_client_ssl() - also enable client SSL on an existing vhost
+ *
+ * \param info: client ssl related info
+ * \param vhost: which vhost to initialize client ssl operations on
+ *
+ * You only need to call this if you plan on using SSL client connections on
+ * the vhost. For non-SSL client connections, it's not necessary to call this.
+ *
+ * The following members of info are used during the call
+ *
+ * - options must have LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT set,
+ * otherwise the call does nothing
+ * - provided_client_ssl_ctx must be NULL to get a generated client
+ * ssl context, otherwise you can pass a prepared one in by setting it
+ * - ssl_cipher_list may be NULL or set to the client valid cipher list
+ * - ssl_ca_filepath may be NULL or client cert filepath
+ * - ssl_cert_filepath may be NULL or client cert filepath
+ * - ssl_private_key_filepath may be NULL or client cert private key
+ *
+ * You must create your vhost explicitly if you want to use this, so you have
+ * a pointer to the vhost. Create the context first with the option flag
+ * LWS_SERVER_OPTION_EXPLICIT_VHOSTS and then call lws_create_vhost() with
+ * the same info struct.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_init_vhost_client_ssl(const struct lws_context_creation_info *info,
+ struct lws_vhost *vhost);
+/**
+ * lws_http_client_read() - consume waiting received http client data
+ *
+ * \param wsi: client connection
+ * \param buf: pointer to buffer pointer - fill with pointer to your buffer
+ * \param len: pointer to chunk length - fill with max length of buffer
+ *
+ * This is called when the user code is notified client http data has arrived.
+ * The user code may choose to delay calling it to consume the data, for example
+ * waiting until an onward connection is writeable.
+ *
+ * For non-chunked connections, up to len bytes of buf are filled with the
+ * received content. len is set to the actual amount filled before return.
+ *
+ * For chunked connections, the linear buffer content contains the chunking
+ * headers and it cannot be passed in one lump. Instead, this function will
+ * call back LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ with in pointing to the
+ * chunk start and len set to the chunk length. There will be as many calls
+ * as there are chunks or partial chunks in the buffer.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_http_client_read(struct lws *wsi, char **buf, int *len);
+
+/**
+ * lws_http_client_http_response() - get last HTTP response code
+ *
+ * \param wsi: client connection
+ *
+ * Returns the last server response code, eg, 200 for client http connections.
+ *
+ * You should capture this during the LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP
+ * callback, because after that the memory reserved for storing the related
+ * headers is freed and this value is lost.
+ */
+LWS_VISIBLE LWS_EXTERN unsigned int
+lws_http_client_http_response(struct lws *wsi);
+
+LWS_VISIBLE LWS_EXTERN void
+lws_client_http_body_pending(struct lws *wsi, int something_left_to_send);
+
+/**
+ * lws_client_http_body_pending() - control if client connection neeeds to send body
+ *
+ * \param wsi: client connection
+ * \param something_left_to_send: nonzero if need to send more body, 0 (default)
+ * if nothing more to send
+ *
+ * If you will send payload data with your HTTP client connection, eg, for POST,
+ * when you set the related http headers in
+ * LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER callback you should also call
+ * this API with something_left_to_send nonzero, and call
+ * lws_callback_on_writable(wsi);
+ *
+ * After sending the headers, lws will call your callback with
+ * LWS_CALLBACK_CLIENT_HTTP_WRITEABLE reason when writable. You can send the
+ * next part of the http body payload, calling lws_callback_on_writable(wsi);
+ * if there is more to come, or lws_client_http_body_pending(wsi, 0); to
+ * let lws know the last part is sent and the connection can move on.
+ */
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-context-vhost.h b/thirdparty/libwebsockets/include/libwebsockets/lws-context-vhost.h
new file mode 100644
index 0000000000..a63d708629
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-context-vhost.h
@@ -0,0 +1,927 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup context-and-vhost context and vhost related functions
+ * ##Context and Vhost releated functions
+ * \ingroup lwsapi
+ *
+ *
+ * LWS requires that there is one context, in which you may define multiple
+ * vhosts. Each vhost is a virtual host, with either its own listen port
+ * or sharing an existing one. Each vhost has its own SSL context that can
+ * be set up individually or left disabled.
+ *
+ * If you don't care about multiple "site" support, you can ignore it and
+ * lws will create a single default vhost at context creation time.
+ */
+///@{
+
+/*
+ * NOTE: These public enums are part of the abi. If you want to add one,
+ * add it at where specified so existing users are unaffected.
+ */
+
+/** enum lws_context_options - context and vhost options */
+enum lws_context_options {
+ LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT = (1 << 1) |
+ (1 << 12),
+ /**< (VH) Don't allow the connection unless the client has a
+ * client cert that we recognize; provides
+ * LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT */
+ LWS_SERVER_OPTION_SKIP_SERVER_CANONICAL_NAME = (1 << 2),
+ /**< (CTX) Don't try to get the server's hostname */
+ LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT = (1 << 3) |
+ (1 << 12),
+ /**< (VH) Allow non-SSL (plaintext) connections on the same
+ * port as SSL is listening... undermines the security of SSL;
+ * provides LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT */
+ LWS_SERVER_OPTION_LIBEV = (1 << 4),
+ /**< (CTX) Use libev event loop */
+ LWS_SERVER_OPTION_DISABLE_IPV6 = (1 << 5),
+ /**< (VH) Disable IPV6 support */
+ LWS_SERVER_OPTION_DISABLE_OS_CA_CERTS = (1 << 6),
+ /**< (VH) Don't load OS CA certs, you will need to load your
+ * own CA cert(s) */
+ LWS_SERVER_OPTION_PEER_CERT_NOT_REQUIRED = (1 << 7),
+ /**< (VH) Accept connections with no valid Cert (eg, selfsigned) */
+ LWS_SERVER_OPTION_VALIDATE_UTF8 = (1 << 8),
+ /**< (VH) Check UT-8 correctness */
+ LWS_SERVER_OPTION_SSL_ECDH = (1 << 9) |
+ (1 << 12),
+ /**< (VH) initialize ECDH ciphers */
+ LWS_SERVER_OPTION_LIBUV = (1 << 10),
+ /**< (CTX) Use libuv event loop */
+ LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS = (1 << 11) |
+ (1 << 12),
+ /**< (VH) Use http redirect to force http to https
+ * (deprecated: use mount redirection) */
+ LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT = (1 << 12),
+ /**< (CTX) Initialize the SSL library at all */
+ LWS_SERVER_OPTION_EXPLICIT_VHOSTS = (1 << 13),
+ /**< (CTX) Only create the context when calling context
+ * create api, implies user code will create its own vhosts */
+ LWS_SERVER_OPTION_UNIX_SOCK = (1 << 14),
+ /**< (VH) Use Unix socket */
+ LWS_SERVER_OPTION_STS = (1 << 15),
+ /**< (VH) Send Strict Transport Security header, making
+ * clients subsequently go to https even if user asked for http */
+ LWS_SERVER_OPTION_IPV6_V6ONLY_MODIFY = (1 << 16),
+ /**< (VH) Enable LWS_SERVER_OPTION_IPV6_V6ONLY_VALUE to take effect */
+ LWS_SERVER_OPTION_IPV6_V6ONLY_VALUE = (1 << 17),
+ /**< (VH) if set, only ipv6 allowed on the vhost */
+ LWS_SERVER_OPTION_UV_NO_SIGSEGV_SIGFPE_SPIN = (1 << 18),
+ /**< (CTX) Libuv only: Do not spin on SIGSEGV / SIGFPE. A segfault
+ * normally makes the lib spin so you can attach a debugger to it
+ * even if it happened without a debugger in place. You can disable
+ * that by giving this option.
+ */
+ LWS_SERVER_OPTION_JUST_USE_RAW_ORIGIN = (1 << 19),
+ /**< For backwards-compatibility reasons, by default
+ * lws prepends "http://" to the origin you give in the client
+ * connection info struct. If you give this flag when you create
+ * the context, only the string you give in the client connect
+ * info for .origin (if any) will be used directly.
+ */
+ LWS_SERVER_OPTION_FALLBACK_TO_RAW = (1 << 20),
+ /**< (VH) if invalid http is coming in the first line, */
+ LWS_SERVER_OPTION_LIBEVENT = (1 << 21),
+ /**< (CTX) Use libevent event loop */
+ LWS_SERVER_OPTION_ONLY_RAW = (1 << 22),
+ /**< (VH) All connections to this vhost / port are RAW as soon as
+ * the connection is accepted, no HTTP is going to be coming.
+ */
+ LWS_SERVER_OPTION_ALLOW_LISTEN_SHARE = (1 << 23),
+ /**< (VH) Set to allow multiple listen sockets on one interface +
+ * address + port. The default is to strictly allow only one
+ * listen socket at a time. This is automatically selected if you
+ * have multiple service threads.
+ */
+ LWS_SERVER_OPTION_CREATE_VHOST_SSL_CTX = (1 << 24),
+ /**< (VH) Force setting up the vhost SSL_CTX, even though the user
+ * code doesn't explicitly provide a cert in the info struct. It
+ * implies the user code is going to provide a cert at the
+ * LWS_CALLBACK_OPENSSL_LOAD_EXTRA_SERVER_VERIFY_CERTS callback, which
+ * provides the vhost SSL_CTX * in the user parameter.
+ */
+ LWS_SERVER_OPTION_SKIP_PROTOCOL_INIT = (1 << 25),
+ /**< (VH) You probably don't want this. It forces this vhost to not
+ * call LWS_CALLBACK_PROTOCOL_INIT on its protocols. It's used in the
+ * special case of a temporary vhost bound to a single protocol.
+ */
+ LWS_SERVER_OPTION_IGNORE_MISSING_CERT = (1 << 26),
+ /**< (VH) Don't fail if the vhost TLS cert or key are missing, just
+ * continue. The vhost won't be able to serve anything, but if for
+ * example the ACME plugin was configured to fetch a cert, this lets
+ * you bootstrap your vhost from having no cert to start with.
+ */
+ LWS_SERVER_OPTION_VHOST_UPG_STRICT_HOST_CHECK = (1 << 27),
+ /**< (VH) On this vhost, if the connection is being upgraded, insist
+ * that there's a Host: header and that the contents match the vhost
+ * name + port (443 / 80 are assumed if no :port given based on if the
+ * connection is using TLS).
+ *
+ * By default, without this flag, on upgrade lws just checks that the
+ * Host: header was given without checking the contents... this is to
+ * allow lax hostname mappings like localhost / 127.0.0.1, and CNAME
+ * mappings like www.mysite.com / mysite.com
+ */
+ LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE = (1 << 28),
+ /**< (VH) Send lws default HTTP headers recommended by Mozilla
+ * Observatory for security. This is a helper option that sends canned
+ * headers on each http response enabling a VERY strict Content Security
+ * Policy. The policy is so strict, for example it won't let the page
+ * run its own inline JS nor show images or take CSS from a different
+ * server. In many cases your JS only comes from your server as do the
+ * image sources and CSS, so that is what you want... attackers hoping
+ * to inject JS into your DOM are completely out of luck since even if
+ * they succeed, it will be rejected for execution by the browser
+ * according to the strict CSP. In other cases you have to deviate from
+ * the complete strictness, in which case don't use this flag: use the
+ * .headers member in the vhost init described in struct
+ * lws_context_creation_info instead to send the adapted headers
+ * yourself.
+ */
+
+ /****** add new things just above ---^ ******/
+};
+
+#define lws_check_opt(c, f) (((c) & (f)) == (f))
+
+struct lws_plat_file_ops;
+
+/** struct lws_context_creation_info - parameters to create context and /or vhost with
+ *
+ * This is also used to create vhosts.... if LWS_SERVER_OPTION_EXPLICIT_VHOSTS
+ * is not given, then for backwards compatibility one vhost is created at
+ * context-creation time using the info from this struct.
+ *
+ * If LWS_SERVER_OPTION_EXPLICIT_VHOSTS is given, then no vhosts are created
+ * at the same time as the context, they are expected to be created afterwards.
+ */
+struct lws_context_creation_info {
+ int port;
+ /**< VHOST: Port to listen on. Use CONTEXT_PORT_NO_LISTEN to suppress
+ * listening for a client. Use CONTEXT_PORT_NO_LISTEN_SERVER if you are
+ * writing a server but you are using \ref sock-adopt instead of the
+ * built-in listener.
+ *
+ * You can also set port to 0, in which case the kernel will pick
+ * a random port that is not already in use. You can find out what
+ * port the vhost is listening on using lws_get_vhost_listen_port() */
+ const char *iface;
+ /**< VHOST: NULL to bind the listen socket to all interfaces, or the
+ * interface name, eg, "eth2"
+ * If options specifies LWS_SERVER_OPTION_UNIX_SOCK, this member is
+ * the pathname of a UNIX domain socket. you can use the UNIX domain
+ * sockets in abstract namespace, by prepending an at symbol to the
+ * socket name. */
+ const struct lws_protocols *protocols;
+ /**< VHOST: Array of structures listing supported protocols and a
+ * protocol-specific callback for each one. The list is ended with an
+ * entry that has a NULL callback pointer. */
+ const struct lws_extension *extensions;
+ /**< VHOST: NULL or array of lws_extension structs listing the
+ * extensions this context supports. */
+ const struct lws_token_limits *token_limits;
+ /**< CONTEXT: NULL or struct lws_token_limits pointer which is
+ * initialized with a token length limit for each possible WSI_TOKEN_ */
+ const char *ssl_private_key_password;
+ /**< VHOST: NULL or the passphrase needed for the private key. (For
+ * backwards compatibility, this can also be used to pass the client
+ * cert passphrase when setting up a vhost client SSL context, but it is
+ * preferred to use .client_ssl_private_key_password for that.) */
+ const char *ssl_cert_filepath;
+ /**< VHOST: If libwebsockets was compiled to use ssl, and you want
+ * to listen using SSL, set to the filepath to fetch the
+ * server cert from, otherwise NULL for unencrypted. (For backwards
+ * compatibility, this can also be used to pass the client certificate
+ * when setting up a vhost client SSL context, but it is preferred to
+ * use .client_ssl_cert_filepath for that.) */
+ const char *ssl_private_key_filepath;
+ /**< VHOST: filepath to private key if wanting SSL mode;
+ * if this is set to NULL but ssl_cert_filepath is set, the
+ * OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY callback is called
+ * to allow setting of the private key directly via openSSL
+ * library calls. (For backwards compatibility, this can also be used
+ * to pass the client cert private key filepath when setting up a
+ * vhost client SSL context, but it is preferred to use
+ * .client_ssl_private_key_filepath for that.) */
+ const char *ssl_ca_filepath;
+ /**< VHOST: CA certificate filepath or NULL. (For backwards
+ * compatibility, this can also be used to pass the client CA
+ * filepath when setting up a vhost client SSL context,
+ * but it is preferred to use .client_ssl_ca_filepath for that.) */
+ const char *ssl_cipher_list;
+ /**< VHOST: List of valid ciphers to use ON TLS1.2 AND LOWER ONLY (eg,
+ * "RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"
+ * or you can leave it as NULL to get "DEFAULT" (For backwards
+ * compatibility, this can also be used to pass the client cipher
+ * list when setting up a vhost client SSL context,
+ * but it is preferred to use .client_ssl_cipher_list for that.)
+ * SEE .tls1_3_plus_cipher_list and .client_tls_1_3_plus_cipher_list
+ * for the equivalent for tls1.3.
+ */
+ const char *http_proxy_address;
+ /**< VHOST: If non-NULL, attempts to proxy via the given address.
+ * If proxy auth is required, use format
+ * "username:password\@server:port" */
+ unsigned int http_proxy_port;
+ /**< VHOST: If http_proxy_address was non-NULL, uses this port */
+ int gid;
+ /**< CONTEXT: group id to change to after setting listen socket,
+ * or -1. */
+ int uid;
+ /**< CONTEXT: user id to change to after setting listen socket,
+ * or -1. */
+ unsigned int options;
+ /**< VHOST + CONTEXT: 0, or LWS_SERVER_OPTION_... bitfields */
+ void *user;
+ /**< VHOST + CONTEXT: optional user pointer that will be associated
+ * with the context when creating the context (and can be retrieved by
+ * lws_context_user(context), or with the vhost when creating the vhost
+ * (and can be retrieved by lws_vhost_user(vhost)). You will need to
+ * use LWS_SERVER_OPTION_EXPLICIT_VHOSTS and create the vhost separately
+ * if you care about giving the context and vhost different user pointer
+ * values.
+ */
+ int ka_time;
+ /**< CONTEXT: 0 for no TCP keepalive, otherwise apply this keepalive
+ * timeout to all libwebsocket sockets, client or server */
+ int ka_probes;
+ /**< CONTEXT: if ka_time was nonzero, after the timeout expires how many
+ * times to try to get a response from the peer before giving up
+ * and killing the connection */
+ int ka_interval;
+ /**< CONTEXT: if ka_time was nonzero, how long to wait before each ka_probes
+ * attempt */
+#if defined(LWS_WITH_TLS) && !defined(LWS_WITH_MBEDTLS)
+ SSL_CTX *provided_client_ssl_ctx;
+ /**< CONTEXT: If non-null, swap out libwebsockets ssl
+ * implementation for the one provided by provided_ssl_ctx.
+ * Libwebsockets no longer is responsible for freeing the context
+ * if this option is selected. */
+#else /* maintain structure layout either way */
+ void *provided_client_ssl_ctx; /**< dummy if ssl disabled */
+#endif
+
+ unsigned short max_http_header_data;
+ /**< CONTEXT: The max amount of header payload that can be handled
+ * in an http request (unrecognized header payload is dropped) */
+ unsigned short max_http_header_pool;
+ /**< CONTEXT: The max number of connections with http headers that
+ * can be processed simultaneously (the corresponding memory is
+ * allocated and deallocated dynamically as needed). If the pool is
+ * fully busy new incoming connections must wait for accept until one
+ * becomes free. 0 = allow as many ah as number of availble fds for
+ * the process */
+
+ unsigned int count_threads;
+ /**< CONTEXT: how many contexts to create in an array, 0 = 1 */
+ unsigned int fd_limit_per_thread;
+ /**< CONTEXT: nonzero means restrict each service thread to this
+ * many fds, 0 means the default which is divide the process fd
+ * limit by the number of threads. */
+ unsigned int timeout_secs;
+ /**< VHOST: various processes involving network roundtrips in the
+ * library are protected from hanging forever by timeouts. If
+ * nonzero, this member lets you set the timeout used in seconds.
+ * Otherwise a default timeout is used. */
+ const char *ecdh_curve;
+ /**< VHOST: if NULL, defaults to initializing server with
+ * "prime256v1" */
+ const char *vhost_name;
+ /**< VHOST: name of vhost, must match external DNS name used to
+ * access the site, like "warmcat.com" as it's used to match
+ * Host: header and / or SNI name for SSL. */
+ const char * const *plugin_dirs;
+ /**< CONTEXT: NULL, or NULL-terminated array of directories to
+ * scan for lws protocol plugins at context creation time */
+ const struct lws_protocol_vhost_options *pvo;
+ /**< VHOST: pointer to optional linked list of per-vhost
+ * options made accessible to protocols */
+ int keepalive_timeout;
+ /**< VHOST: (default = 0 = 5s) seconds to allow remote
+ * client to hold on to an idle HTTP/1.1 connection */
+ const char *log_filepath;
+ /**< VHOST: filepath to append logs to... this is opened before
+ * any dropping of initial privileges */
+ const struct lws_http_mount *mounts;
+ /**< VHOST: optional linked list of mounts for this vhost */
+ const char *server_string;
+ /**< CONTEXT: string used in HTTP headers to identify server
+ * software, if NULL, "libwebsockets". */
+ unsigned int pt_serv_buf_size;
+ /**< CONTEXT: 0 = default of 4096. This buffer is used by
+ * various service related features including file serving, it
+ * defines the max chunk of file that can be sent at once.
+ * At the risk of lws having to buffer failed large sends, it
+ * can be increased to, eg, 128KiB to improve throughput. */
+ unsigned int max_http_header_data2;
+ /**< CONTEXT: if max_http_header_data is 0 and this
+ * is nonzero, this will be used in place of the default. It's
+ * like this for compatibility with the original short version,
+ * this is unsigned int length. */
+ long ssl_options_set;
+ /**< VHOST: Any bits set here will be set as server SSL options */
+ long ssl_options_clear;
+ /**< VHOST: Any bits set here will be cleared as server SSL options */
+ unsigned short ws_ping_pong_interval;
+ /**< CONTEXT: 0 for none, else interval in seconds between sending
+ * PINGs on idle websocket connections. When the PING is sent,
+ * the PONG must come within the normal timeout_secs timeout period
+ * or the connection will be dropped.
+ * Any RX or TX traffic on the connection restarts the interval timer,
+ * so a connection which always sends or receives something at intervals
+ * less than the interval given here will never send PINGs / expect
+ * PONGs. Conversely as soon as the ws connection is established, an
+ * idle connection will do the PING / PONG roundtrip as soon as
+ * ws_ping_pong_interval seconds has passed without traffic
+ */
+ const struct lws_protocol_vhost_options *headers;
+ /**< VHOST: pointer to optional linked list of per-vhost
+ * canned headers that are added to server responses */
+
+ const struct lws_protocol_vhost_options *reject_service_keywords;
+ /**< CONTEXT: Optional list of keywords and rejection codes + text.
+ *
+ * The keywords are checked for existing in the user agent string.
+ *
+ * Eg, "badrobot" "404 Not Found"
+ */
+ void *external_baggage_free_on_destroy;
+ /**< CONTEXT: NULL, or pointer to something externally malloc'd, that
+ * should be freed when the context is destroyed. This allows you to
+ * automatically sync the freeing action to the context destruction
+ * action, so there is no need for an external free() if the context
+ * succeeded to create.
+ */
+
+ const char *client_ssl_private_key_password;
+ /**< VHOST: Client SSL context init: NULL or the passphrase needed
+ * for the private key */
+ const char *client_ssl_cert_filepath;
+ /**< VHOST: Client SSL context init:T he certificate the client
+ * should present to the peer on connection */
+ const char *client_ssl_private_key_filepath;
+ /**< VHOST: Client SSL context init: filepath to client private key
+ * if this is set to NULL but client_ssl_cert_filepath is set, you
+ * can handle the LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS
+ * callback of protocols[0] to allow setting of the private key directly
+ * via openSSL library calls */
+ const char *client_ssl_ca_filepath;
+ /**< VHOST: Client SSL context init: CA certificate filepath or NULL */
+ const void *client_ssl_ca_mem;
+ /**< VHOST: Client SSL context init: CA certificate memory buffer or
+ * NULL... use this to load CA cert from memory instead of file */
+ unsigned int client_ssl_ca_mem_len;
+ /**< VHOST: Client SSL context init: length of client_ssl_ca_mem in
+ * bytes */
+
+ const char *client_ssl_cipher_list;
+ /**< VHOST: Client SSL context init: List of valid ciphers to use (eg,
+ * "RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"
+ * or you can leave it as NULL to get "DEFAULT" */
+
+ const struct lws_plat_file_ops *fops;
+ /**< CONTEXT: NULL, or pointer to an array of fops structs, terminated
+ * by a sentinel with NULL .open.
+ *
+ * If NULL, lws provides just the platform file operations struct for
+ * backwards compatibility.
+ */
+ int simultaneous_ssl_restriction;
+ /**< CONTEXT: 0 (no limit) or limit of simultaneous SSL sessions
+ * possible.*/
+ const char *socks_proxy_address;
+ /**< VHOST: If non-NULL, attempts to proxy via the given address.
+ * If proxy auth is required, use format
+ * "username:password\@server:port" */
+ unsigned int socks_proxy_port;
+ /**< VHOST: If socks_proxy_address was non-NULL, uses this port */
+#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
+ cap_value_t caps[4];
+ /**< CONTEXT: array holding Linux capabilities you want to
+ * continue to be available to the server after it transitions
+ * to a noprivileged user. Usually none are needed but for, eg,
+ * .bind_iface, CAP_NET_RAW is required. This gives you a way
+ * to still have the capability but drop root.
+ */
+ char count_caps;
+ /**< CONTEXT: count of Linux capabilities in .caps[]. 0 means
+ * no capabilities will be inherited from root (the default) */
+#endif
+ int bind_iface;
+ /**< VHOST: nonzero to strictly bind sockets to the interface name in
+ * .iface (eg, "eth2"), using SO_BIND_TO_DEVICE.
+ *
+ * Requires SO_BINDTODEVICE support from your OS and CAP_NET_RAW
+ * capability.
+ *
+ * Notice that common things like access network interface IP from
+ * your local machine use your lo / loopback interface and will be
+ * disallowed by this.
+ */
+ int ssl_info_event_mask;
+ /**< VHOST: mask of ssl events to be reported on LWS_CALLBACK_SSL_INFO
+ * callback for connections on this vhost. The mask values are of
+ * the form SSL_CB_ALERT, defined in openssl/ssl.h. The default of
+ * 0 means no info events will be reported.
+ */
+ unsigned int timeout_secs_ah_idle;
+ /**< VHOST: seconds to allow a client to hold an ah without using it.
+ * 0 defaults to 10s. */
+ unsigned short ip_limit_ah;
+ /**< CONTEXT: max number of ah a single IP may use simultaneously
+ * 0 is no limit. This is a soft limit: if the limit is
+ * reached, connections from that IP will wait in the ah
+ * waiting list and not be able to acquire an ah until
+ * a connection belonging to the IP relinquishes one it
+ * already has.
+ */
+ unsigned short ip_limit_wsi;
+ /**< CONTEXT: max number of wsi a single IP may use simultaneously.
+ * 0 is no limit. This is a hard limit, connections from
+ * the same IP will simply be dropped once it acquires the
+ * amount of simultaneous wsi / accepted connections
+ * given here.
+ */
+ uint32_t http2_settings[7];
+ /**< VHOST: if http2_settings[0] is nonzero, the values given in
+ * http2_settings[1]..[6] are used instead of the lws
+ * platform default values.
+ * Just leave all at 0 if you don't care.
+ */
+ const char *error_document_404;
+ /**< VHOST: If non-NULL, when asked to serve a non-existent file,
+ * lws attempts to server this url path instead. Eg,
+ * "/404.html" */
+ const char *alpn;
+ /**< CONTEXT: If non-NULL, default list of advertised alpn, comma-
+ * separated
+ *
+ * VHOST: If non-NULL, per-vhost list of advertised alpn, comma-
+ * separated
+ */
+ void **foreign_loops;
+ /**< CONTEXT: This is ignored if the context is not being started with
+ * an event loop, ie, .options has a flag like
+ * LWS_SERVER_OPTION_LIBUV.
+ *
+ * NULL indicates lws should start its own even loop for
+ * each service thread, and deal with closing the loops
+ * when the context is destroyed.
+ *
+ * Non-NULL means it points to an array of external
+ * ("foreign") event loops that are to be used in turn for
+ * each service thread. In the default case of 1 service
+ * thread, it can just point to one foreign event loop.
+ */
+ void (*signal_cb)(void *event_lib_handle, int signum);
+ /**< CONTEXT: NULL: default signal handling. Otherwise this receives
+ * the signal handler callback. event_lib_handle is the
+ * native event library signal handle, eg uv_signal_t *
+ * for libuv.
+ */
+ struct lws_context **pcontext;
+ /**< CONTEXT: if non-NULL, at the end of context destroy processing,
+ * the pointer pointed to by pcontext is written with NULL. You can
+ * use this to let foreign event loops know that lws context destruction
+ * is fully completed.
+ */
+ void (*finalize)(struct lws_vhost *vh, void *arg);
+ /**< VHOST: NULL, or pointer to function that will be called back
+ * when the vhost is just about to be freed. The arg parameter
+ * will be set to whatever finalize_arg is below.
+ */
+ void *finalize_arg;
+ /**< VHOST: opaque pointer lws ignores but passes to the finalize
+ * callback. If you don't care, leave it NULL.
+ */
+ unsigned int max_http_header_pool2;
+ /**< CONTEXT: if max_http_header_pool is 0 and this
+ * is nonzero, this will be used in place of the default. It's
+ * like this for compatibility with the original short version:
+ * this is unsigned int length. */
+
+ long ssl_client_options_set;
+ /**< VHOST: Any bits set here will be set as CLIENT SSL options */
+ long ssl_client_options_clear;
+ /**< VHOST: Any bits set here will be cleared as CLIENT SSL options */
+
+ const char *tls1_3_plus_cipher_list;
+ /**< VHOST: List of valid ciphers to use for incoming server connections
+ * ON TLS1.3 AND ABOVE (eg, "TLS_CHACHA20_POLY1305_SHA256" on this vhost
+ * or you can leave it as NULL to get "DEFAULT".
+ * SEE .client_tls_1_3_plus_cipher_list to do the same on the vhost
+ * client SSL_CTX.
+ */
+ const char *client_tls_1_3_plus_cipher_list;
+ /**< VHOST: List of valid ciphers to use for outgoing client connections
+ * ON TLS1.3 AND ABOVE on this vhost (eg,
+ * "TLS_CHACHA20_POLY1305_SHA256") or you can leave it as NULL to get
+ * "DEFAULT".
+ */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility
+ *
+ * The below is to ensure later library versions with new
+ * members added above will see 0 (default) even if the app
+ * was not built against the newer headers.
+ */
+
+ void *_unused[4]; /**< dummy */
+};
+
+/**
+ * lws_create_context() - Create the websocket handler
+ * \param info: pointer to struct with parameters
+ *
+ * This function creates the listening socket (if serving) and takes care
+ * of all initialization in one step.
+ *
+ * If option LWS_SERVER_OPTION_EXPLICIT_VHOSTS is given, no vhost is
+ * created; you're expected to create your own vhosts afterwards using
+ * lws_create_vhost(). Otherwise a vhost named "default" is also created
+ * using the information in the vhost-related members, for compatibility.
+ *
+ * After initialization, it returns a struct lws_context * that
+ * represents this server. After calling, user code needs to take care
+ * of calling lws_service() with the context pointer to get the
+ * server's sockets serviced. This must be done in the same process
+ * context as the initialization call.
+ *
+ * The protocol callback functions are called for a handful of events
+ * including http requests coming in, websocket connections becoming
+ * established, and data arriving; it's also called periodically to allow
+ * async transmission.
+ *
+ * HTTP requests are sent always to the FIRST protocol in protocol, since
+ * at that time websocket protocol has not been negotiated. Other
+ * protocols after the first one never see any HTTP callback activity.
+ *
+ * The server created is a simple http server by default; part of the
+ * websocket standard is upgrading this http connection to a websocket one.
+ *
+ * This allows the same server to provide files like scripts and favicon /
+ * images or whatever over http and dynamic data over websockets all in
+ * one place; they're all handled in the user callback.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_context *
+lws_create_context(const struct lws_context_creation_info *info);
+
+
+/**
+ * lws_context_destroy() - Destroy the websocket context
+ * \param context: Websocket context
+ *
+ * This function closes any active connections and then frees the
+ * context. After calling this, any further use of the context is
+ * undefined.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_context_destroy(struct lws_context *context);
+
+typedef int (*lws_reload_func)(void);
+
+/**
+ * lws_context_deprecate() - Deprecate the websocket context
+ *
+ * \param context: Websocket context
+ * \param cb: Callback notified when old context listen sockets are closed
+ *
+ * This function is used on an existing context before superceding it
+ * with a new context.
+ *
+ * It closes any listen sockets in the context, so new connections are
+ * not possible.
+ *
+ * And it marks the context to be deleted when the number of active
+ * connections into it falls to zero.
+ *
+ * This is aimed at allowing seamless configuration reloads.
+ *
+ * The callback cb will be called after the listen sockets are actually
+ * closed and may be reopened. In the callback the new context should be
+ * configured and created. (With libuv, socket close happens async after
+ * more loop events).
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_context_deprecate(struct lws_context *context, lws_reload_func cb);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_context_is_deprecated(struct lws_context *context);
+
+/**
+ * lws_set_proxy() - Setups proxy to lws_context.
+ * \param vhost: pointer to struct lws_vhost you want set proxy for
+ * \param proxy: pointer to c string containing proxy in format address:port
+ *
+ * Returns 0 if proxy string was parsed and proxy was setup.
+ * Returns -1 if proxy is NULL or has incorrect format.
+ *
+ * This is only required if your OS does not provide the http_proxy
+ * environment variable (eg, OSX)
+ *
+ * IMPORTANT! You should call this function right after creation of the
+ * lws_context and before call to connect. If you call this
+ * function after connect behavior is undefined.
+ * This function will override proxy settings made on lws_context
+ * creation with genenv() call.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_set_proxy(struct lws_vhost *vhost, const char *proxy);
+
+/**
+ * lws_set_socks() - Setup socks to lws_context.
+ * \param vhost: pointer to struct lws_vhost you want set socks for
+ * \param socks: pointer to c string containing socks in format address:port
+ *
+ * Returns 0 if socks string was parsed and socks was setup.
+ * Returns -1 if socks is NULL or has incorrect format.
+ *
+ * This is only required if your OS does not provide the socks_proxy
+ * environment variable (eg, OSX)
+ *
+ * IMPORTANT! You should call this function right after creation of the
+ * lws_context and before call to connect. If you call this
+ * function after connect behavior is undefined.
+ * This function will override proxy settings made on lws_context
+ * creation with genenv() call.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_set_socks(struct lws_vhost *vhost, const char *socks);
+
+struct lws_vhost;
+
+/**
+ * lws_create_vhost() - Create a vhost (virtual server context)
+ * \param context: pointer to result of lws_create_context()
+ * \param info: pointer to struct with parameters
+ *
+ * This function creates a virtual server (vhost) using the vhost-related
+ * members of the info struct. You can create many vhosts inside one context
+ * if you created the context with the option LWS_SERVER_OPTION_EXPLICIT_VHOSTS
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_vhost *
+lws_create_vhost(struct lws_context *context,
+ const struct lws_context_creation_info *info);
+
+/**
+ * lws_vhost_destroy() - Destroy a vhost (virtual server context)
+ *
+ * \param vh: pointer to result of lws_create_vhost()
+ *
+ * This function destroys a vhost. Normally, if you just want to exit,
+ * then lws_destroy_context() will take care of everything. If you want
+ * to destroy an individual vhost and all connections and allocations, you
+ * can do it with this.
+ *
+ * If the vhost has a listen sockets shared by other vhosts, it will be given
+ * to one of the vhosts sharing it rather than closed.
+ *
+ * The vhost close is staged according to the needs of the event loop, and if
+ * there are multiple service threads. At the point the vhost itself if
+ * about to be freed, if you provided a finalize callback and optional arg at
+ * vhost creation time, it will be called just before the vhost is freed.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_vhost_destroy(struct lws_vhost *vh);
+
+/**
+ * lwsws_get_config_globals() - Parse a JSON server config file
+ * \param info: pointer to struct with parameters
+ * \param d: filepath of the config file
+ * \param config_strings: storage for the config strings extracted from JSON,
+ * the pointer is incremented as strings are stored
+ * \param len: pointer to the remaining length left in config_strings
+ * the value is decremented as strings are stored
+ *
+ * This function prepares a n lws_context_creation_info struct with global
+ * settings from a file d.
+ *
+ * Requires CMake option LWS_WITH_LEJP_CONF to have been enabled
+ */
+LWS_VISIBLE LWS_EXTERN int
+lwsws_get_config_globals(struct lws_context_creation_info *info, const char *d,
+ char **config_strings, int *len);
+
+/**
+ * lwsws_get_config_vhosts() - Create vhosts from a JSON server config file
+ * \param context: pointer to result of lws_create_context()
+ * \param info: pointer to struct with parameters
+ * \param d: filepath of the config file
+ * \param config_strings: storage for the config strings extracted from JSON,
+ * the pointer is incremented as strings are stored
+ * \param len: pointer to the remaining length left in config_strings
+ * the value is decremented as strings are stored
+ *
+ * This function creates vhosts into a context according to the settings in
+ *JSON files found in directory d.
+ *
+ * Requires CMake option LWS_WITH_LEJP_CONF to have been enabled
+ */
+LWS_VISIBLE LWS_EXTERN int
+lwsws_get_config_vhosts(struct lws_context *context,
+ struct lws_context_creation_info *info, const char *d,
+ char **config_strings, int *len);
+
+/** lws_vhost_get() - \deprecated deprecated: use lws_get_vhost() */
+LWS_VISIBLE LWS_EXTERN struct lws_vhost *
+lws_vhost_get(struct lws *wsi) LWS_WARN_DEPRECATED;
+
+/**
+ * lws_get_vhost() - return the vhost a wsi belongs to
+ *
+ * \param wsi: which connection
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_vhost *
+lws_get_vhost(struct lws *wsi);
+
+/**
+ * lws_get_vhost_name() - returns the name of a vhost
+ *
+ * \param vhost: which vhost
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_get_vhost_name(struct lws_vhost *vhost);
+
+/**
+ * lws_get_vhost_port() - returns the port a vhost listens on, or -1
+ *
+ * \param vhost: which vhost
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_get_vhost_port(struct lws_vhost *vhost);
+
+/**
+ * lws_get_vhost_user() - returns the user pointer for the vhost
+ *
+ * \param vhost: which vhost
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lws_get_vhost_user(struct lws_vhost *vhost);
+
+/**
+ * lws_get_vhost_iface() - returns the binding for the vhost listen socket
+ *
+ * \param vhost: which vhost
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_get_vhost_iface(struct lws_vhost *vhost);
+
+/**
+ * lws_json_dump_vhost() - describe vhost state and stats in JSON
+ *
+ * \param vh: the vhost
+ * \param buf: buffer to fill with JSON
+ * \param len: max length of buf
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_json_dump_vhost(const struct lws_vhost *vh, char *buf, int len);
+
+/**
+ * lws_json_dump_context() - describe context state and stats in JSON
+ *
+ * \param context: the context
+ * \param buf: buffer to fill with JSON
+ * \param len: max length of buf
+ * \param hide_vhosts: nonzero to not provide per-vhost mount etc information
+ *
+ * Generates a JSON description of vhost state into buf
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_json_dump_context(const struct lws_context *context, char *buf, int len,
+ int hide_vhosts);
+
+/**
+ * lws_vhost_user() - get the user data associated with the vhost
+ * \param vhost: Websocket vhost
+ *
+ * This returns the optional user pointer that can be attached to
+ * a vhost when it was created. Lws never dereferences this pointer, it only
+ * sets it when the vhost is created, and returns it using this api.
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lws_vhost_user(struct lws_vhost *vhost);
+
+/**
+ * lws_context_user() - get the user data associated with the context
+ * \param context: Websocket context
+ *
+ * This returns the optional user allocation that can be attached to
+ * the context the sockets live in at context_create time. It's a way
+ * to let all sockets serviced in the same context share data without
+ * using globals statics in the user code.
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lws_context_user(struct lws_context *context);
+
+/*! \defgroup vhost-mounts Vhost mounts and options
+ * \ingroup context-and-vhost-creation
+ *
+ * ##Vhost mounts and options
+ */
+///@{
+/** struct lws_protocol_vhost_options - linked list of per-vhost protocol
+ * name=value options
+ *
+ * This provides a general way to attach a linked-list of name=value pairs,
+ * which can also have an optional child link-list using the options member.
+ */
+struct lws_protocol_vhost_options {
+ const struct lws_protocol_vhost_options *next; /**< linked list */
+ const struct lws_protocol_vhost_options *options; /**< child linked-list of more options for this node */
+ const char *name; /**< name of name=value pair */
+ const char *value; /**< value of name=value pair */
+};
+
+/** enum lws_mount_protocols
+ * This specifies the mount protocol for a mountpoint, whether it is to be
+ * served from a filesystem, or it is a cgi etc.
+ */
+enum lws_mount_protocols {
+ LWSMPRO_HTTP = 0, /**< http reverse proxy */
+ LWSMPRO_HTTPS = 1, /**< https reverse proxy */
+ LWSMPRO_FILE = 2, /**< serve from filesystem directory */
+ LWSMPRO_CGI = 3, /**< pass to CGI to handle */
+ LWSMPRO_REDIR_HTTP = 4, /**< redirect to http:// url */
+ LWSMPRO_REDIR_HTTPS = 5, /**< redirect to https:// url */
+ LWSMPRO_CALLBACK = 6, /**< hand by named protocol's callback */
+};
+
+/** struct lws_http_mount
+ *
+ * arguments for mounting something in a vhost's url namespace
+ */
+struct lws_http_mount {
+ const struct lws_http_mount *mount_next;
+ /**< pointer to next struct lws_http_mount */
+ const char *mountpoint;
+ /**< mountpoint in http pathspace, eg, "/" */
+ const char *origin;
+ /**< path to be mounted, eg, "/var/www/warmcat.com" */
+ const char *def;
+ /**< default target, eg, "index.html" */
+ const char *protocol;
+ /**<"protocol-name" to handle mount */
+
+ const struct lws_protocol_vhost_options *cgienv;
+ /**< optional linked-list of cgi options. These are created
+ * as environment variables for the cgi process
+ */
+ const struct lws_protocol_vhost_options *extra_mimetypes;
+ /**< optional linked-list of mimetype mappings */
+ const struct lws_protocol_vhost_options *interpret;
+ /**< optional linked-list of files to be interpreted */
+
+ int cgi_timeout;
+ /**< seconds cgi is allowed to live, if cgi://mount type */
+ int cache_max_age;
+ /**< max-age for reuse of client cache of files, seconds */
+ unsigned int auth_mask;
+ /**< bits set here must be set for authorized client session */
+
+ unsigned int cache_reusable:1; /**< set if client cache may reuse this */
+ unsigned int cache_revalidate:1; /**< set if client cache should revalidate on use */
+ unsigned int cache_intermediaries:1; /**< set if intermediaries are allowed to cache */
+
+ unsigned char origin_protocol; /**< one of enum lws_mount_protocols */
+ unsigned char mountpoint_len; /**< length of mountpoint string */
+
+ const char *basic_auth_login_file;
+ /**<NULL, or filepath to use to check basic auth logins against */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility
+ *
+ * The below is to ensure later library versions with new
+ * members added above will see 0 (default) even if the app
+ * was not built against the newer headers.
+ */
+
+ void *_unused[2]; /**< dummy */
+};
+
+///@}
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-dbus.h b/thirdparty/libwebsockets/include/libwebsockets/lws-dbus.h
new file mode 100644
index 0000000000..63cfd15f18
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-dbus.h
@@ -0,0 +1,90 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * must be included manually as
+ *
+ * #include <libwebsockets/lws-dbus.h>
+ *
+ * if dbus apis needed
+ */
+
+#if !defined(__LWS_DBUS_H__)
+#define __LWS_DBUS_H__
+
+#include <dbus/dbus.h>
+
+/* helper type to simplify implementing methods as individual functions */
+typedef DBusHandlerResult (*lws_dbus_message_handler)(DBusConnection *conn,
+ DBusMessage *message, DBusMessage **reply, void *d);
+
+struct lws_dbus_ctx;
+typedef void (*lws_dbus_closing_t)(struct lws_dbus_ctx *ctx);
+
+struct lws_dbus_ctx {
+ struct lws_dll next; /* dbusserver ctx: HEAD of accepted list */
+ struct lws_vhost *vh; /* the vhost we logically bind to in lws */
+ int tsi; /* the lws thread service index (0 if only one service
+ thread as is the default */
+ DBusConnection *conn;
+ DBusServer *dbs;
+ DBusWatch *w[4];
+ DBusPendingCall *pc;
+
+ char hup;
+ char timeouts;
+
+ /* cb_closing callback will be called after the connection and this
+ * related ctx struct have effectively gone out of scope.
+ *
+ * The callback should close and clean up the connection and free the
+ * ctx.
+ */
+ lws_dbus_closing_t cb_closing;
+};
+
+/**
+ * lws_dbus_connection_setup() - bind dbus connection object to lws event loop
+ *
+ * \param ctx: additional information about the connection
+ * \param conn: the DBusConnection object to bind
+ *
+ * This configures a DBusConnection object to use lws for watchers and timeout
+ * operations.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_dbus_connection_setup(struct lws_dbus_ctx *ctx, DBusConnection *conn,
+ lws_dbus_closing_t cb_closing);
+
+/**
+ * lws_dbus_server_listen() - bind dbus connection object to lws event loop
+ *
+ * \param ctx: additional information about the connection
+ * \param ads: the DBUS address to listen on, eg, "unix:abstract=mysocket"
+ * \param err: a DBusError object to take any extra error information
+ * \param new_conn: a callback function to prepare new accepted connections
+ *
+ * This creates a DBusServer and binds it to the lws event loop, and your
+ * callback to accept new connections.
+ */
+LWS_VISIBLE LWS_EXTERN DBusServer *
+lws_dbus_server_listen(struct lws_dbus_ctx *ctx, const char *ads,
+ DBusError *err, DBusNewConnectionFunction new_conn);
+
+#endif
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-diskcache.h b/thirdparty/libwebsockets/include/libwebsockets/lws-diskcache.h
new file mode 100644
index 0000000000..eb63fdd855
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-diskcache.h
@@ -0,0 +1,185 @@
+/*
+ * libwebsockets - disk cache helpers
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup diskcache LWS disk cache
+ * ## Disk cache API
+ *
+ * Lws provides helper apis useful if you need a disk cache containing hashed
+ * files and need to delete files from it on an LRU basis to keep it below some
+ * size limit.
+ *
+ * The API `lws_diskcache_prepare()` deals with creating the cache dir and
+ * 256 subdirs, which are used according to the first two chars of the hex
+ * hash of the cache file.
+ *
+ * `lws_diskcache_create()` and `lws_diskcache_destroy()` allocate and free
+ * an opaque struct that represents the disk cache.
+ *
+ * `lws_diskcache_trim()` should be called at eg, 1s intervals to perform the
+ * cache dir monitoring and LRU autodelete in the background lazily. It can
+ * be done in its own thread or on a timer... it monitors the directories in a
+ * stateful way that stats one or more file in the cache per call, and keeps
+ * a list of the oldest files as it goes. When it completes a scan, if the
+ * aggregate size is over the limit, it will delete oldest files first to try
+ * to keep it under the limit.
+ *
+ * The cache size monitoring is extremely efficient in time and memory even when
+ * the cache directory becomes huge.
+ *
+ * `lws_diskcache_query()` is used to determine if the file already exists in
+ * the cache, or if it must be created. If it must be created, then the file
+ * is opened using a temp name that must be converted to a findable name with
+ * `lws_diskcache_finalize_name()` when the generation of the file contents are
+ * complete. Aborted cached files that did not complete generation will be
+ * flushed by the LRU eventually. If the file already exists, it is 'touched'
+ * to make it new again and the fd returned.
+ *
+ */
+///@{
+
+struct lws_diskcache_scan;
+
+/**
+ * lws_diskcache_create() - creates an opaque struct representing the disk cache
+ *
+ * \param cache_dir_base: The cache dir path, eg `/var/cache/mycache`
+ * \param cache_size_limit: maximum size on disk the cache is allowed to use
+ *
+ * This returns an opaque `struct lws_diskcache_scan *` which represents the
+ * disk cache, the trim scanning state and so on. You should use
+ * `lws_diskcache_destroy()` to free it to destroy it.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_diskcache_scan *
+lws_diskcache_create(const char *cache_dir_base, uint64_t cache_size_limit);
+
+/**
+ * lws_diskcache_destroy() - destroys the pointer returned by ...create()
+ *
+ * \param lds: pointer to the pointer returned by lws_diskcache_create()
+ *
+ * Frees *lds and any allocations it did, and then sets *lds to NULL and
+ * returns.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_diskcache_destroy(struct lws_diskcache_scan **lds);
+
+/**
+ * lws_diskcache_prepare() - ensures the cache dir structure exists on disk
+ *
+ * \param cache_base_dir: The cache dir path, eg `/var/cache/mycache`
+ * \param mode: octal dir mode to enforce, like 0700
+ * \param uid: uid the cache dir should belong to
+ *
+ * This should be called while your app is still privileged. It will create
+ * the cache directory structure on disk as necessary, enforce the given access
+ * mode on it and set the given uid as the owner. It won't make any trouble
+ * if the cache already exists.
+ *
+ * Typically the mode is 0700 and the owner is the user that your application
+ * will transition to use when it drops root privileges.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_diskcache_prepare(const char *cache_base_dir, int mode, int uid);
+
+#define LWS_DISKCACHE_QUERY_NO_CACHE 0
+#define LWS_DISKCACHE_QUERY_EXISTS 1
+#define LWS_DISKCACHE_QUERY_CREATING 2
+#define LWS_DISKCACHE_QUERY_ONGOING 3 /* something else is creating it */
+
+/**
+ * lws_diskcache_query() - ensures the cache dir structure exists on disk
+ *
+ * \param lds: The opaque struct representing the disk cache
+ * \param is_bot: nonzero means the request is from a bot. Don't create new cache contents if so.
+ * \param hash_hex: hex string representation of the cache object hash
+ * \param _fd: pointer to the fd to be set
+ * \param cache: destination string to take the cache filepath
+ * \param cache_len: length of the buffer at `cache`
+ * \param extant_cache_len: pointer to a size_t to take any extant cached file size
+ *
+ * This function is called when you want to find if the hashed name already
+ * exists in the cache. The possibilities for the return value are
+ *
+ * - LWS_DISKCACHE_QUERY_NO_CACHE: It's not in the cache and you can't create
+ * it in the cache for whatever reason.
+ * - LWS_DISKCACHE_QUERY_EXISTS: It exists in the cache. It's open RDONLY and
+ * *_fd has been set to the file descriptor. *extant_cache_len has been set
+ * to the size of the cached file in bytes. cache has been set to the
+ * full filepath of the cached file. Closing _fd is your responsibility.
+ * - LWS_DISKCACHE_QUERY_CREATING: It didn't exist, but a temp file has been
+ * created in the cache and *_fd set to a file descriptor opened on it RDWR.
+ * You should create the contents, and call `lws_diskcache_finalize_name()`
+ * when it is done. Closing _fd is your responsibility.
+ * - LWS_DISKCACHE_QUERY_ONGOING: not returned by this api, but you may find it
+ * desirable to make a wrapper function which can handle another asynchronous
+ * process that is already creating the cached file. This can be used to
+ * indicate that situation externally... how to determine the same thing is
+ * already being generated is out of scope of this api.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_diskcache_query(struct lws_diskcache_scan *lds, int is_bot,
+ const char *hash_hex, int *_fd, char *cache, int cache_len,
+ size_t *extant_cache_len);
+
+/**
+ * lws_diskcache_query() - ensures the cache dir structure exists on disk
+ *
+ * \param cache: The cache file temp name returned with LWS_DISKCACHE_QUERY_CREATING
+ *
+ * This renames the cache file you are creating to its final name. It should
+ * be called on the temp name returned by `lws_diskcache_query()` if it gave a
+ * LWS_DISKCACHE_QUERY_CREATING return, after you have filled the cache file and
+ * closed it.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_diskcache_finalize_name(char *cache);
+
+/**
+ * lws_diskcache_trim() - performs one or more file checks in the cache for size management
+ *
+ * \param lds: The opaque object representing the cache
+ *
+ * This should be called periodically to statefully walk the cache on disk
+ * collecting the oldest files. When it has visited every file, if the cache
+ * is oversize it will delete the oldest files until it's back under size again.
+ *
+ * Each time it's called, it will look at one or more dir in the cache. If
+ * called when the cache is oversize, it increases the amount of work done each
+ * call until it is reduced again. Typically it will take 256 calls before it
+ * deletes anything, so if called once per second, it will delete files once
+ * every 4 minutes. Each call is very inexpensive both in memory and time.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_diskcache_trim(struct lws_diskcache_scan *lds);
+
+
+/**
+ * lws_diskcache_secs_to_idle() - see how long to idle before calling trim
+ *
+ * \param lds: The opaque object representing the cache
+ *
+ * If the cache is undersize, there's no need to monitor it immediately. This
+ * suggests how long to "sleep" before calling `lws_diskcache_trim()` again.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_diskcache_secs_to_idle(struct lws_diskcache_scan *lds);
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-esp32.h b/thirdparty/libwebsockets/include/libwebsockets/lws-esp32.h
new file mode 100644
index 0000000000..2d1c0f42bb
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-esp32.h
@@ -0,0 +1,226 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+typedef int lws_sockfd_type;
+typedef int lws_filefd_type;
+
+struct pollfd {
+ lws_sockfd_type fd; /**< fd related to */
+ short events; /**< which POLL... events to respond to */
+ short revents; /**< which POLL... events occurred */
+};
+#define POLLIN 0x0001
+#define POLLPRI 0x0002
+#define POLLOUT 0x0004
+#define POLLERR 0x0008
+#define POLLHUP 0x0010
+#define POLLNVAL 0x0020
+
+#include <freertos/FreeRTOS.h>
+#include <freertos/event_groups.h>
+#include <string.h>
+#include "esp_wifi.h"
+#include "esp_system.h"
+#include "esp_event.h"
+#include "esp_event_loop.h"
+#include "nvs.h"
+#include "driver/gpio.h"
+#include "esp_spi_flash.h"
+#include "freertos/timers.h"
+
+#if !defined(CONFIG_FREERTOS_HZ)
+#define CONFIG_FREERTOS_HZ 100
+#endif
+
+typedef TimerHandle_t uv_timer_t;
+typedef void uv_cb_t(uv_timer_t *);
+typedef void * uv_handle_t;
+
+struct timer_mapping {
+ uv_cb_t *cb;
+ uv_timer_t *t;
+};
+
+#define UV_VERSION_MAJOR 1
+
+#define lws_uv_getloop(a, b) (NULL)
+
+static LWS_INLINE void uv_timer_init(void *l, uv_timer_t *t)
+{
+ (void)l;
+ *t = NULL;
+}
+
+extern void esp32_uvtimer_cb(TimerHandle_t t);
+
+static LWS_INLINE void uv_timer_start(uv_timer_t *t, uv_cb_t *cb, int first, int rep)
+{
+ struct timer_mapping *tm = (struct timer_mapping *)malloc(sizeof(*tm));
+
+ if (!tm)
+ return;
+
+ tm->t = t;
+ tm->cb = cb;
+
+ *t = xTimerCreate("x", pdMS_TO_TICKS(first), !!rep, tm,
+ (TimerCallbackFunction_t)esp32_uvtimer_cb);
+ xTimerStart(*t, 0);
+}
+
+static LWS_INLINE void uv_timer_stop(uv_timer_t *t)
+{
+ xTimerStop(*t, 0);
+}
+
+static LWS_INLINE void uv_close(uv_handle_t *h, void *v)
+{
+ free(pvTimerGetTimerID((uv_timer_t)h));
+ xTimerDelete(*(uv_timer_t *)h, 0);
+}
+
+/* ESP32 helper declarations */
+
+#include <mdns.h>
+#include <esp_partition.h>
+
+#define LWS_PLUGIN_STATIC
+#define LWS_MAGIC_REBOOT_TYPE_ADS 0x50001ffc
+#define LWS_MAGIC_REBOOT_TYPE_REQ_FACTORY 0xb00bcafe
+#define LWS_MAGIC_REBOOT_TYPE_FORCED_FACTORY 0xfaceb00b
+#define LWS_MAGIC_REBOOT_TYPE_FORCED_FACTORY_BUTTON 0xf0cedfac
+#define LWS_MAGIC_REBOOT_TYPE_REQ_FACTORY_ERASE_OTA 0xfac0eeee
+
+/* user code provides these */
+
+extern void
+lws_esp32_identify_physical_device(void);
+
+/* lws-plat-esp32 provides these */
+
+typedef void (*lws_cb_scan_done)(uint16_t count, wifi_ap_record_t *recs, void *arg);
+
+enum genled_state {
+ LWSESP32_GENLED__INIT,
+ LWSESP32_GENLED__LOST_NETWORK,
+ LWSESP32_GENLED__NO_NETWORK,
+ LWSESP32_GENLED__CONN_AP,
+ LWSESP32_GENLED__GOT_IP,
+ LWSESP32_GENLED__OK,
+};
+
+struct lws_group_member {
+ struct lws_group_member *next;
+ uint64_t last_seen;
+ char model[16];
+ char role[16];
+ char host[32];
+ char mac[20];
+ int width, height;
+ struct ip4_addr addr;
+ struct ip6_addr addrv6;
+ uint8_t flags;
+};
+
+#define LWS_SYSTEM_GROUP_MEMBER_ADD 1
+#define LWS_SYSTEM_GROUP_MEMBER_CHANGE 2
+#define LWS_SYSTEM_GROUP_MEMBER_REMOVE 3
+
+#define LWS_GROUP_FLAG_SELF 1
+
+struct lws_esp32 {
+ char sta_ip[16];
+ char sta_mask[16];
+ char sta_gw[16];
+ char serial[16];
+ char opts[16];
+ char model[16];
+ char group[16];
+ char role[16];
+ char ssid[4][64];
+ char password[4][64];
+ char active_ssid[64];
+ char access_pw[16];
+ char hostname[32];
+ char mac[20];
+ char le_dns[64];
+ char le_email[64];
+ char region;
+ char inet;
+ char conn_ap;
+
+ enum genled_state genled;
+ uint64_t genled_t;
+
+ lws_cb_scan_done scan_consumer;
+ void *scan_consumer_arg;
+ struct lws_group_member *first;
+ int extant_group_members;
+
+ char acme;
+ char upload;
+
+ volatile char button_is_down;
+};
+
+struct lws_esp32_image {
+ uint32_t romfs;
+ uint32_t romfs_len;
+ uint32_t json;
+ uint32_t json_len;
+};
+
+extern struct lws_esp32 lws_esp32;
+struct lws_vhost;
+
+extern esp_err_t
+lws_esp32_event_passthru(void *ctx, system_event_t *event);
+extern void
+lws_esp32_wlan_config(void);
+extern void
+lws_esp32_wlan_start_ap(void);
+extern void
+lws_esp32_wlan_start_station(void);
+struct lws_context_creation_info;
+extern void
+lws_esp32_set_creation_defaults(struct lws_context_creation_info *info);
+extern struct lws_context *
+lws_esp32_init(struct lws_context_creation_info *, struct lws_vhost **pvh);
+extern int
+lws_esp32_wlan_nvs_get(int retry);
+extern esp_err_t
+lws_nvs_set_str(nvs_handle handle, const char* key, const char* value);
+extern void
+lws_esp32_restart_guided(uint32_t type);
+extern const esp_partition_t *
+lws_esp_ota_get_boot_partition(void);
+extern int
+lws_esp32_get_image_info(const esp_partition_t *part, struct lws_esp32_image *i, char *json, int json_len);
+extern int
+lws_esp32_leds_network_indication(void);
+
+extern uint32_t lws_esp32_get_reboot_type(void);
+extern uint16_t lws_esp32_sine_interp(int n);
+
+/* required in external code by esp32 plat (may just return if no leds) */
+extern void lws_esp32_leds_timer_cb(TimerHandle_t th);
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-fts.h b/thirdparty/libwebsockets/include/libwebsockets/lws-fts.h
new file mode 100644
index 0000000000..29405bd6fd
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-fts.h
@@ -0,0 +1,214 @@
+/*
+ * libwebsockets - fulltext search
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup search Search
+ *
+ * ##Full-text search
+ *
+ * Lws provides superfast indexing and fulltext searching from index files on
+ * storage.
+ */
+///@{
+
+struct lws_fts;
+struct lws_fts_file;
+
+/*
+ * Queries produce their results in an lwsac, using these public API types.
+ * The first thing in the lwsac is always a struct lws_fts_result (see below)
+ * containing heads for linked-lists of the other result types.
+ */
+
+/* one filepath's results */
+
+struct lws_fts_result_filepath {
+ struct lws_fts_result_filepath *next;
+ int matches; /* logical number of matches */
+ int matches_length; /* bytes in length table (may be zero) */
+ int lines_in_file;
+ int filepath_length;
+
+ /* - uint32_t line table follows (first for alignment) */
+ /* - filepath (of filepath_length) follows */
+};
+
+/* autocomplete result */
+
+struct lws_fts_result_autocomplete {
+ struct lws_fts_result_autocomplete *next;
+ int instances;
+ int agg_instances;
+ int ac_length;
+ char elided; /* children skipped in interest of antecedent children */
+ char has_children;
+
+ /* - autocomplete suggestion (of length ac_length) follows */
+};
+
+/*
+ * The results lwsac always starts with this. If no results and / or no
+ * autocomplete the members may be NULL. This implies the symbol nor any
+ * suffix on it exists in the trie file.
+ */
+struct lws_fts_result {
+ struct lws_fts_result_filepath *filepath_head;
+ struct lws_fts_result_autocomplete *autocomplete_head;
+ int duration_ms;
+ int effective_flags; /* the search flags that were used */
+};
+
+/*
+ * index creation functions
+ */
+
+/**
+ * lws_fts_create() - Create a new index file
+ *
+ * \param fd: The fd opened for write
+ *
+ * Inits a new index file, returning a struct lws_fts to represent it
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_fts *
+lws_fts_create(int fd);
+
+/**
+ * lws_fts_destroy() - Finalize a new index file / destroy the trie lwsac
+ *
+ * \param trie: The previously opened index being finalized
+ *
+ * Finalizes an index file that was being created, and frees the memory involved
+ * *trie is set to NULL afterwards.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_fts_destroy(struct lws_fts **trie);
+
+/**
+ * lws_fts_file_index() - Create a new entry in the trie file for an input path
+ *
+ * \param t: The previously opened index being written
+ * \param filepath: The filepath (which may be virtual) associated with this file
+ * \param filepath_len: The number of chars in the filepath
+ * \param priority: not used yet
+ *
+ * Returns an ordinal that represents this new filepath in the index file.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_fts_file_index(struct lws_fts *t, const char *filepath, int filepath_len,
+ int priority);
+
+/**
+ * lws_fts_fill() - Process all or a bufferload of input file
+ *
+ * \param t: The previously opened index being written
+ * \param file_index: The ordinal representing this input filepath
+ * \param buf: A bufferload of data from the input file
+ * \param len: The number of bytes in buf
+ *
+ * Indexes a buffer of data from the input file.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_fts_fill(struct lws_fts *t, uint32_t file_index, const char *buf,
+ size_t len);
+
+/**
+ * lws_fts_serialize() - Store the in-memory trie into the index file
+ *
+ * \param t: The previously opened index being written
+ *
+ * The trie is held in memory where it can be added to... after all the input
+ * filepaths and data have been processed, this is called to serialize /
+ * write the trie data into the index file.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_fts_serialize(struct lws_fts *t);
+
+/*
+ * index search functions
+ */
+
+/**
+ * lws_fts_open() - Open an existing index file to search it
+ *
+ * \param filepath: The filepath to the index file to open
+ *
+ * Opening the index file returns an opaque struct lws_fts_file * that is
+ * used to perform other operations on it, or NULL if it can't be opened.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_fts_file *
+lws_fts_open(const char *filepath);
+
+#define LWSFTS_F_QUERY_AUTOCOMPLETE (1 << 0)
+#define LWSFTS_F_QUERY_FILES (1 << 1)
+#define LWSFTS_F_QUERY_FILE_LINES (1 << 2)
+#define LWSFTS_F_QUERY_QUOTE_LINE (1 << 3)
+
+struct lws_fts_search_params {
+ /* the actual search term */
+ const char *needle;
+ /* if non-NULL, FILE results for this filepath only */
+ const char *only_filepath;
+ /* will be set to the results lwsac */
+ struct lwsac *results_head;
+ /* combination of LWSFTS_F_QUERY_* flags */
+ int flags;
+ /* maximum number of autocomplete suggestions to return */
+ int max_autocomplete;
+ /* maximum number of filepaths to return */
+ int max_files;
+ /* maximum number of line number results to return per filepath */
+ int max_lines;
+};
+
+/**
+ * lws_fts_search() - Perform a search operation on an index
+ *
+ * \param jtf: The index file struct returned by lws_fts_open
+ * \param ftsp: The struct lws_fts_search_params filled in by the caller
+ *
+ * The caller should memset the ftsp struct to 0 to ensure members that may be
+ * introduced in later versions contain known values, then set the related
+ * members to describe the kind of search action required.
+ *
+ * ftsp->results_head is the results lwsac, or NULL. It should be freed with
+ * lwsac_free() when the results are finished with.
+ *
+ * Returns a pointer into the results lwsac that is a struct lws_fts_result
+ * containing the head pointers into linked-lists of results for autocomplete
+ * and filepath data, along with some sundry information. This does not need
+ * to be freed since freeing the lwsac will also remove this and everything it
+ * points to.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_fts_result *
+lws_fts_search(struct lws_fts_file *jtf, struct lws_fts_search_params *ftsp);
+
+/**
+ * lws_fts_close() - Close a previously-opened index file
+ *
+ * \param jtf: The pointer returned from the open
+ *
+ * Closes the file handle on the index and frees any allocations
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_fts_close(struct lws_fts_file *jtf);
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-genhash.h b/thirdparty/libwebsockets/include/libwebsockets/lws-genhash.h
new file mode 100644
index 0000000000..a2e4f8ab6a
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-genhash.h
@@ -0,0 +1,171 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup generic hash
+ * ## Generic Hash related functions
+ *
+ * Lws provides generic hash / digest accessors that abstract the ones
+ * provided by whatever OpenSSL library you are linking against.
+ *
+ * It lets you use the same code if you build against mbedtls or OpenSSL
+ * for example.
+ */
+///@{
+
+enum lws_genhash_types {
+ LWS_GENHASH_TYPE_SHA1,
+ LWS_GENHASH_TYPE_SHA256,
+ LWS_GENHASH_TYPE_SHA384,
+ LWS_GENHASH_TYPE_SHA512,
+};
+
+enum lws_genhmac_types {
+ LWS_GENHMAC_TYPE_SHA256,
+ LWS_GENHMAC_TYPE_SHA384,
+ LWS_GENHMAC_TYPE_SHA512,
+};
+
+#define LWS_GENHASH_LARGEST 64
+
+struct lws_genhash_ctx {
+ uint8_t type;
+#if defined(LWS_WITH_MBEDTLS)
+ union {
+ mbedtls_sha1_context sha1;
+ mbedtls_sha256_context sha256;
+ mbedtls_sha512_context sha512; /* 384 also uses this */
+ const mbedtls_md_info_t *hmac;
+ } u;
+#else
+ const EVP_MD *evp_type;
+ EVP_MD_CTX *mdctx;
+#endif
+};
+
+struct lws_genhmac_ctx {
+ uint8_t type;
+#if defined(LWS_WITH_MBEDTLS)
+ const mbedtls_md_info_t *hmac;
+ mbedtls_md_context_t ctx;
+#else
+ const EVP_MD *evp_type;
+ EVP_MD_CTX *ctx;
+#endif
+};
+
+/** lws_genhash_size() - get hash size in bytes
+ *
+ * \param type: one of LWS_GENHASH_TYPE_...
+ *
+ * Returns number of bytes in this type of hash
+ */
+LWS_VISIBLE LWS_EXTERN size_t LWS_WARN_UNUSED_RESULT
+lws_genhash_size(enum lws_genhash_types type);
+
+/** lws_genhmac_size() - get hash size in bytes
+ *
+ * \param type: one of LWS_GENHASH_TYPE_...
+ *
+ * Returns number of bytes in this type of hmac
+ */
+LWS_VISIBLE LWS_EXTERN size_t LWS_WARN_UNUSED_RESULT
+lws_genhmac_size(enum lws_genhmac_types type);
+
+/** lws_genhash_init() - prepare your struct lws_genhash_ctx for use
+ *
+ * \param ctx: your struct lws_genhash_ctx
+ * \param type: one of LWS_GENHASH_TYPE_...
+ *
+ * Initializes the hash context for the type you requested
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_genhash_init(struct lws_genhash_ctx *ctx, enum lws_genhash_types type);
+
+/** lws_genhash_update() - digest len bytes of the buffer starting at in
+ *
+ * \param ctx: your struct lws_genhash_ctx
+ * \param in: start of the bytes to digest
+ * \param len: count of bytes to digest
+ *
+ * Updates the state of your hash context to reflect digesting len bytes from in
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_genhash_update(struct lws_genhash_ctx *ctx, const void *in, size_t len);
+
+/** lws_genhash_destroy() - copy out the result digest and destroy the ctx
+ *
+ * \param ctx: your struct lws_genhash_ctx
+ * \param result: NULL, or where to copy the result hash
+ *
+ * Finalizes the hash and copies out the digest. Destroys any allocations such
+ * that ctx can safely go out of scope after calling this.
+ *
+ * NULL result is supported so that you can destroy the ctx cleanly on error
+ * conditions, where there is no valid result.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genhash_destroy(struct lws_genhash_ctx *ctx, void *result);
+
+/** lws_genhmac_init() - prepare your struct lws_genhmac_ctx for use
+ *
+ * \param ctx: your struct lws_genhmac_ctx
+ * \param type: one of LWS_GENHMAC_TYPE_...
+ * \param key: pointer to the start of the HMAC key
+ * \param key_len: length of the HMAC key
+ *
+ * Initializes the hash context for the type you requested
+ *
+ * If the return is nonzero, it failed and there is nothing needing to be
+ * destroyed.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_genhmac_init(struct lws_genhmac_ctx *ctx, enum lws_genhmac_types type,
+ const uint8_t *key, size_t key_len);
+
+/** lws_genhmac_update() - digest len bytes of the buffer starting at in
+ *
+ * \param ctx: your struct lws_genhmac_ctx
+ * \param in: start of the bytes to digest
+ * \param len: count of bytes to digest
+ *
+ * Updates the state of your hash context to reflect digesting len bytes from in
+ *
+ * If the return is nonzero, it failed and needs destroying.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_genhmac_update(struct lws_genhmac_ctx *ctx, const void *in, size_t len);
+
+/** lws_genhmac_destroy() - copy out the result digest and destroy the ctx
+ *
+ * \param ctx: your struct lws_genhmac_ctx
+ * \param result: NULL, or where to copy the result hash
+ *
+ * Finalizes the hash and copies out the digest. Destroys any allocations such
+ * that ctx can safely go out of scope after calling this.
+ *
+ * NULL result is supported so that you can destroy the ctx cleanly on error
+ * conditions, where there is no valid result.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genhmac_destroy(struct lws_genhmac_ctx *ctx, void *result);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-genrsa.h b/thirdparty/libwebsockets/include/libwebsockets/lws-genrsa.h
new file mode 100644
index 0000000000..3e427e2927
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-genrsa.h
@@ -0,0 +1,190 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup generic RSA
+ * ## Generic RSA related functions
+ *
+ * Lws provides generic RSA functions that abstract the ones
+ * provided by whatever OpenSSL library you are linking against.
+ *
+ * It lets you use the same code if you build against mbedtls or OpenSSL
+ * for example.
+ */
+///@{
+
+enum enum_jwk_tok {
+ JWK_KEY_E,
+ JWK_KEY_N,
+ JWK_KEY_D,
+ JWK_KEY_P,
+ JWK_KEY_Q,
+ JWK_KEY_DP,
+ JWK_KEY_DQ,
+ JWK_KEY_QI,
+ JWK_KTY, /* also serves as count of real elements */
+ JWK_KEY,
+};
+
+#define LWS_COUNT_RSA_ELEMENTS JWK_KTY
+
+struct lws_genrsa_ctx {
+#if defined(LWS_WITH_MBEDTLS)
+ mbedtls_rsa_context *ctx;
+#else
+ BIGNUM *bn[LWS_COUNT_RSA_ELEMENTS];
+ RSA *rsa;
+#endif
+};
+
+struct lws_genrsa_element {
+ uint8_t *buf;
+ uint16_t len;
+};
+
+struct lws_genrsa_elements {
+ struct lws_genrsa_element e[LWS_COUNT_RSA_ELEMENTS];
+};
+
+/** lws_jwk_destroy_genrsa_elements() - Free allocations in genrsa_elements
+ *
+ * \param el: your struct lws_genrsa_elements
+ *
+ * This is a helper for user code making use of struct lws_genrsa_elements
+ * where the elements are allocated on the heap, it frees any non-NULL
+ * buf element and sets the buf to NULL.
+ *
+ * NB: lws_genrsa_public_... apis do not need this as they take care of the key
+ * creation and destruction themselves.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_jwk_destroy_genrsa_elements(struct lws_genrsa_elements *el);
+
+/** lws_genrsa_public_decrypt_create() - Create RSA public decrypt context
+ *
+ * \param ctx: your struct lws_genrsa_ctx
+ * \param el: struct prepared with key element data
+ *
+ * Creates an RSA context with a public key associated with it, formed from
+ * the key elements in \p el.
+ *
+ * Returns 0 for OK or nonzero for error.
+ *
+ * This and related APIs operate identically with OpenSSL or mbedTLS backends.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genrsa_create(struct lws_genrsa_ctx *ctx, struct lws_genrsa_elements *el);
+
+/** lws_genrsa_new_keypair() - Create new RSA keypair
+ *
+ * \param context: your struct lws_context (may be used for RNG)
+ * \param ctx: your struct lws_genrsa_ctx
+ * \param el: struct to get the new key element data allocated into it
+ * \param bits: key size, eg, 4096
+ *
+ * Creates a new RSA context and generates a new keypair into it, with \p bits
+ * bits.
+ *
+ * Returns 0 for OK or nonzero for error.
+ *
+ * This and related APIs operate identically with OpenSSL or mbedTLS backends.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genrsa_new_keypair(struct lws_context *context, struct lws_genrsa_ctx *ctx,
+ struct lws_genrsa_elements *el, int bits);
+
+/** lws_genrsa_public_decrypt() - Perform RSA public decryption
+ *
+ * \param ctx: your struct lws_genrsa_ctx
+ * \param in: encrypted input
+ * \param in_len: length of encrypted input
+ * \param out: decrypted output
+ * \param out_max: size of output buffer
+ *
+ * Performs the decryption.
+ *
+ * Returns <0 for error, or length of decrypted data.
+ *
+ * This and related APIs operate identically with OpenSSL or mbedTLS backends.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genrsa_public_decrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in,
+ size_t in_len, uint8_t *out, size_t out_max);
+
+/** lws_genrsa_public_verify() - Perform RSA public verification
+ *
+ * \param ctx: your struct lws_genrsa_ctx
+ * \param in: unencrypted payload (usually a recomputed hash)
+ * \param hash_type: one of LWS_GENHASH_TYPE_
+ * \param sig: pointer to the signature we received with the payload
+ * \param sig_len: length of the signature we are checking in bytes
+ *
+ * Returns <0 for error, or 0 if signature matches the payload + key.
+ *
+ * This and related APIs operate identically with OpenSSL or mbedTLS backends.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genrsa_public_verify(struct lws_genrsa_ctx *ctx, const uint8_t *in,
+ enum lws_genhash_types hash_type,
+ const uint8_t *sig, size_t sig_len);
+
+/** lws_genrsa_public_sign() - Create RSA signature
+ *
+ * \param ctx: your struct lws_genrsa_ctx
+ * \param in: precomputed hash
+ * \param hash_type: one of LWS_GENHASH_TYPE_
+ * \param sig: pointer to buffer to take signature
+ * \param sig_len: length of the buffer (must be >= length of key N)
+ *
+ * Returns <0 for error, or 0 for success.
+ *
+ * This and related APIs operate identically with OpenSSL or mbedTLS backends.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genrsa_public_sign(struct lws_genrsa_ctx *ctx, const uint8_t *in,
+ enum lws_genhash_types hash_type, uint8_t *sig,
+ size_t sig_len);
+
+/** lws_genrsa_public_decrypt_destroy() - Destroy RSA public decrypt context
+ *
+ * \param ctx: your struct lws_genrsa_ctx
+ *
+ * Destroys any allocations related to \p ctx.
+ *
+ * This and related APIs operate identically with OpenSSL or mbedTLS backends.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_genrsa_destroy(struct lws_genrsa_ctx *ctx);
+
+/** lws_genrsa_render_pkey_asn1() - Exports public or private key to ASN1/DER
+ *
+ * \param ctx: your struct lws_genrsa_ctx
+ * \param _private: 0 = public part only, 1 = all parts of the key
+ * \param pkey_asn1: pointer to buffer to take the ASN1
+ * \param pkey_asn1_len: max size of the pkey_asn1_len
+ *
+ * Returns length of pkey_asn1 written, or -1 for error.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_genrsa_render_pkey_asn1(struct lws_genrsa_ctx *ctx, int _private,
+ uint8_t *pkey_asn1, size_t pkey_asn1_len);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-http.h b/thirdparty/libwebsockets/include/libwebsockets/lws-http.h
new file mode 100644
index 0000000000..eb3d826ebd
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-http.h
@@ -0,0 +1,685 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/* minimal space for typical headers and CSP stuff */
+
+#define LWS_RECOMMENDED_MIN_HEADER_SPACE 2048
+
+/*! \defgroup http HTTP
+
+ Modules related to handling HTTP
+*/
+//@{
+
+/*! \defgroup httpft HTTP File transfer
+ * \ingroup http
+
+ APIs for sending local files in response to HTTP requests
+*/
+//@{
+
+/**
+ * lws_get_mimetype() - Determine mimetype to use from filename
+ *
+ * \param file: filename
+ * \param m: NULL, or mount context
+ *
+ * This uses a canned list of known filetypes first, if no match and m is
+ * non-NULL, then tries a list of per-mount file suffix to mimtype mappings.
+ *
+ * Returns either NULL or a pointer to the mimetype matching the file.
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_get_mimetype(const char *file, const struct lws_http_mount *m);
+
+/**
+ * lws_serve_http_file() - Send a file back to the client using http
+ * \param wsi: Websocket instance (available from user callback)
+ * \param file: The file to issue over http
+ * \param content_type: The http content type, eg, text/html
+ * \param other_headers: NULL or pointer to header string
+ * \param other_headers_len: length of the other headers if non-NULL
+ *
+ * This function is intended to be called from the callback in response
+ * to http requests from the client. It allows the callback to issue
+ * local files down the http link in a single step.
+ *
+ * Returning <0 indicates error and the wsi should be closed. Returning
+ * >0 indicates the file was completely sent and
+ * lws_http_transaction_completed() called on the wsi (and close if != 0)
+ * ==0 indicates the file transfer is started and needs more service later,
+ * the wsi should be left alone.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type,
+ const char *other_headers, int other_headers_len);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_serve_http_file_fragment(struct lws *wsi);
+//@}
+
+
+enum http_status {
+ HTTP_STATUS_CONTINUE = 100,
+
+ HTTP_STATUS_OK = 200,
+ HTTP_STATUS_NO_CONTENT = 204,
+ HTTP_STATUS_PARTIAL_CONTENT = 206,
+
+ HTTP_STATUS_MOVED_PERMANENTLY = 301,
+ HTTP_STATUS_FOUND = 302,
+ HTTP_STATUS_SEE_OTHER = 303,
+ HTTP_STATUS_NOT_MODIFIED = 304,
+
+ HTTP_STATUS_BAD_REQUEST = 400,
+ HTTP_STATUS_UNAUTHORIZED,
+ HTTP_STATUS_PAYMENT_REQUIRED,
+ HTTP_STATUS_FORBIDDEN,
+ HTTP_STATUS_NOT_FOUND,
+ HTTP_STATUS_METHOD_NOT_ALLOWED,
+ HTTP_STATUS_NOT_ACCEPTABLE,
+ HTTP_STATUS_PROXY_AUTH_REQUIRED,
+ HTTP_STATUS_REQUEST_TIMEOUT,
+ HTTP_STATUS_CONFLICT,
+ HTTP_STATUS_GONE,
+ HTTP_STATUS_LENGTH_REQUIRED,
+ HTTP_STATUS_PRECONDITION_FAILED,
+ HTTP_STATUS_REQ_ENTITY_TOO_LARGE,
+ HTTP_STATUS_REQ_URI_TOO_LONG,
+ HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE,
+ HTTP_STATUS_REQ_RANGE_NOT_SATISFIABLE,
+ HTTP_STATUS_EXPECTATION_FAILED,
+
+ HTTP_STATUS_INTERNAL_SERVER_ERROR = 500,
+ HTTP_STATUS_NOT_IMPLEMENTED,
+ HTTP_STATUS_BAD_GATEWAY,
+ HTTP_STATUS_SERVICE_UNAVAILABLE,
+ HTTP_STATUS_GATEWAY_TIMEOUT,
+ HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED,
+};
+/*! \defgroup html-chunked-substitution HTML Chunked Substitution
+ * \ingroup http
+ *
+ * ##HTML chunked Substitution
+ *
+ * APIs for receiving chunks of text, replacing a set of variable names via
+ * a callback, and then prepending and appending HTML chunked encoding
+ * headers.
+ */
+//@{
+
+struct lws_process_html_args {
+ char *p; /**< pointer to the buffer containing the data */
+ int len; /**< length of the original data at p */
+ int max_len; /**< maximum length we can grow the data to */
+ int final; /**< set if this is the last chunk of the file */
+ int chunked; /**< 0 == unchunked, 1 == produce chunk headers
+ (incompatible with HTTP/2) */
+};
+
+typedef const char *(*lws_process_html_state_cb)(void *data, int index);
+
+struct lws_process_html_state {
+ char *start; /**< pointer to start of match */
+ char swallow[16]; /**< matched character buffer */
+ int pos; /**< position in match */
+ void *data; /**< opaque pointer */
+ const char * const *vars; /**< list of variable names */
+ int count_vars; /**< count of variable names */
+
+ lws_process_html_state_cb replace;
+ /**< called on match to perform substitution */
+};
+
+/*! lws_chunked_html_process() - generic chunked substitution
+ * \param args: buffer to process using chunked encoding
+ * \param s: current processing state
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_chunked_html_process(struct lws_process_html_args *args,
+ struct lws_process_html_state *s);
+//@}
+
+/** \defgroup HTTP-headers-read HTTP headers: read
+ * \ingroup http
+ *
+ * ##HTTP header releated functions
+ *
+ * In lws the client http headers are temporarily stored in a pool, only for the
+ * duration of the http part of the handshake. It's because in most cases,
+ * the header content is ignored for the whole rest of the connection lifetime
+ * and would then just be taking up space needlessly.
+ *
+ * During LWS_CALLBACK_HTTP when the URI path is delivered is the last time
+ * the http headers are still allocated, you can use these apis then to
+ * look at and copy out interesting header content (cookies, etc)
+ *
+ * Notice that the header total length reported does not include a terminating
+ * '\0', however you must allocate for it when using the _copy apis. So the
+ * length reported for a header containing "123" is 3, but you must provide
+ * a buffer of length 4 so that "123\0" may be copied into it, or the copy
+ * will fail with a nonzero return code.
+ *
+ * In the special case of URL arguments, like ?x=1&y=2, the arguments are
+ * stored in a token named for the method, eg, WSI_TOKEN_GET_URI if it
+ * was a GET or WSI_TOKEN_POST_URI if POST. You can check the total
+ * length to confirm the method.
+ *
+ * For URL arguments, each argument is stored urldecoded in a "fragment", so
+ * you can use the fragment-aware api lws_hdr_copy_fragment() to access each
+ * argument in turn: the fragments contain urldecoded strings like x=1 or y=2.
+ *
+ * As a convenience, lws has an api that will find the fragment with a
+ * given name= part, lws_get_urlarg_by_name().
+ */
+///@{
+
+/** struct lws_tokens
+ * you need these to look at headers that have been parsed if using the
+ * LWS_CALLBACK_FILTER_CONNECTION callback. If a header from the enum
+ * list below is absent, .token = NULL and len = 0. Otherwise .token
+ * points to .len chars containing that header content.
+ */
+struct lws_tokens {
+ char *token; /**< pointer to start of the token */
+ int len; /**< length of the token's value */
+};
+
+/* enum lws_token_indexes
+ * these have to be kept in sync with lextable.h / minilex.c
+ *
+ * NOTE: These public enums are part of the abi. If you want to add one,
+ * add it at where specified so existing users are unaffected.
+ */
+enum lws_token_indexes {
+ WSI_TOKEN_GET_URI = 0,
+ WSI_TOKEN_POST_URI = 1,
+ WSI_TOKEN_OPTIONS_URI = 2,
+ WSI_TOKEN_HOST = 3,
+ WSI_TOKEN_CONNECTION = 4,
+ WSI_TOKEN_UPGRADE = 5,
+ WSI_TOKEN_ORIGIN = 6,
+ WSI_TOKEN_DRAFT = 7,
+ WSI_TOKEN_CHALLENGE = 8,
+ WSI_TOKEN_EXTENSIONS = 9,
+ WSI_TOKEN_KEY1 = 10,
+ WSI_TOKEN_KEY2 = 11,
+ WSI_TOKEN_PROTOCOL = 12,
+ WSI_TOKEN_ACCEPT = 13,
+ WSI_TOKEN_NONCE = 14,
+ WSI_TOKEN_HTTP = 15,
+ WSI_TOKEN_HTTP2_SETTINGS = 16,
+ WSI_TOKEN_HTTP_ACCEPT = 17,
+ WSI_TOKEN_HTTP_AC_REQUEST_HEADERS = 18,
+ WSI_TOKEN_HTTP_IF_MODIFIED_SINCE = 19,
+ WSI_TOKEN_HTTP_IF_NONE_MATCH = 20,
+ WSI_TOKEN_HTTP_ACCEPT_ENCODING = 21,
+ WSI_TOKEN_HTTP_ACCEPT_LANGUAGE = 22,
+ WSI_TOKEN_HTTP_PRAGMA = 23,
+ WSI_TOKEN_HTTP_CACHE_CONTROL = 24,
+ WSI_TOKEN_HTTP_AUTHORIZATION = 25,
+ WSI_TOKEN_HTTP_COOKIE = 26,
+ WSI_TOKEN_HTTP_CONTENT_LENGTH = 27,
+ WSI_TOKEN_HTTP_CONTENT_TYPE = 28,
+ WSI_TOKEN_HTTP_DATE = 29,
+ WSI_TOKEN_HTTP_RANGE = 30,
+ WSI_TOKEN_HTTP_REFERER = 31,
+ WSI_TOKEN_KEY = 32,
+ WSI_TOKEN_VERSION = 33,
+ WSI_TOKEN_SWORIGIN = 34,
+
+ WSI_TOKEN_HTTP_COLON_AUTHORITY = 35,
+ WSI_TOKEN_HTTP_COLON_METHOD = 36,
+ WSI_TOKEN_HTTP_COLON_PATH = 37,
+ WSI_TOKEN_HTTP_COLON_SCHEME = 38,
+ WSI_TOKEN_HTTP_COLON_STATUS = 39,
+
+ WSI_TOKEN_HTTP_ACCEPT_CHARSET = 40,
+ WSI_TOKEN_HTTP_ACCEPT_RANGES = 41,
+ WSI_TOKEN_HTTP_ACCESS_CONTROL_ALLOW_ORIGIN = 42,
+ WSI_TOKEN_HTTP_AGE = 43,
+ WSI_TOKEN_HTTP_ALLOW = 44,
+ WSI_TOKEN_HTTP_CONTENT_DISPOSITION = 45,
+ WSI_TOKEN_HTTP_CONTENT_ENCODING = 46,
+ WSI_TOKEN_HTTP_CONTENT_LANGUAGE = 47,
+ WSI_TOKEN_HTTP_CONTENT_LOCATION = 48,
+ WSI_TOKEN_HTTP_CONTENT_RANGE = 49,
+ WSI_TOKEN_HTTP_ETAG = 50,
+ WSI_TOKEN_HTTP_EXPECT = 51,
+ WSI_TOKEN_HTTP_EXPIRES = 52,
+ WSI_TOKEN_HTTP_FROM = 53,
+ WSI_TOKEN_HTTP_IF_MATCH = 54,
+ WSI_TOKEN_HTTP_IF_RANGE = 55,
+ WSI_TOKEN_HTTP_IF_UNMODIFIED_SINCE = 56,
+ WSI_TOKEN_HTTP_LAST_MODIFIED = 57,
+ WSI_TOKEN_HTTP_LINK = 58,
+ WSI_TOKEN_HTTP_LOCATION = 59,
+ WSI_TOKEN_HTTP_MAX_FORWARDS = 60,
+ WSI_TOKEN_HTTP_PROXY_AUTHENTICATE = 61,
+ WSI_TOKEN_HTTP_PROXY_AUTHORIZATION = 62,
+ WSI_TOKEN_HTTP_REFRESH = 63,
+ WSI_TOKEN_HTTP_RETRY_AFTER = 64,
+ WSI_TOKEN_HTTP_SERVER = 65,
+ WSI_TOKEN_HTTP_SET_COOKIE = 66,
+ WSI_TOKEN_HTTP_STRICT_TRANSPORT_SECURITY = 67,
+ WSI_TOKEN_HTTP_TRANSFER_ENCODING = 68,
+ WSI_TOKEN_HTTP_USER_AGENT = 69,
+ WSI_TOKEN_HTTP_VARY = 70,
+ WSI_TOKEN_HTTP_VIA = 71,
+ WSI_TOKEN_HTTP_WWW_AUTHENTICATE = 72,
+
+ WSI_TOKEN_PATCH_URI = 73,
+ WSI_TOKEN_PUT_URI = 74,
+ WSI_TOKEN_DELETE_URI = 75,
+
+ WSI_TOKEN_HTTP_URI_ARGS = 76,
+ WSI_TOKEN_PROXY = 77,
+ WSI_TOKEN_HTTP_X_REAL_IP = 78,
+ WSI_TOKEN_HTTP1_0 = 79,
+ WSI_TOKEN_X_FORWARDED_FOR = 80,
+ WSI_TOKEN_CONNECT = 81,
+ WSI_TOKEN_HEAD_URI = 82,
+ WSI_TOKEN_TE = 83,
+ WSI_TOKEN_REPLAY_NONCE = 84,
+ WSI_TOKEN_COLON_PROTOCOL = 85,
+ WSI_TOKEN_X_AUTH_TOKEN = 86,
+
+ /****** add new things just above ---^ ******/
+
+ /* use token storage to stash these internally, not for
+ * user use */
+
+ _WSI_TOKEN_CLIENT_SENT_PROTOCOLS,
+ _WSI_TOKEN_CLIENT_PEER_ADDRESS,
+ _WSI_TOKEN_CLIENT_URI,
+ _WSI_TOKEN_CLIENT_HOST,
+ _WSI_TOKEN_CLIENT_ORIGIN,
+ _WSI_TOKEN_CLIENT_METHOD,
+ _WSI_TOKEN_CLIENT_IFACE,
+ _WSI_TOKEN_CLIENT_ALPN,
+
+ /* always last real token index*/
+ WSI_TOKEN_COUNT,
+
+ /* parser state additions, no storage associated */
+ WSI_TOKEN_NAME_PART,
+ WSI_TOKEN_SKIPPING,
+ WSI_TOKEN_SKIPPING_SAW_CR,
+ WSI_PARSING_COMPLETE,
+ WSI_INIT_TOKEN_MUXURL,
+};
+
+struct lws_token_limits {
+ unsigned short token_limit[WSI_TOKEN_COUNT]; /**< max chars for this token */
+};
+
+/**
+ * lws_token_to_string() - returns a textual representation of a hdr token index
+ *
+ * \param token: token index
+ */
+LWS_VISIBLE LWS_EXTERN const unsigned char *
+lws_token_to_string(enum lws_token_indexes token);
+
+/**
+ * lws_hdr_total_length: report length of all fragments of a header totalled up
+ * The returned length does not include the space for a
+ * terminating '\0'
+ *
+ * \param wsi: websocket connection
+ * \param h: which header index we are interested in
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_hdr_total_length(struct lws *wsi, enum lws_token_indexes h);
+
+/**
+ * lws_hdr_fragment_length: report length of a single fragment of a header
+ * The returned length does not include the space for a
+ * terminating '\0'
+ *
+ * \param wsi: websocket connection
+ * \param h: which header index we are interested in
+ * \param frag_idx: which fragment of h we want to get the length of
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_hdr_fragment_length(struct lws *wsi, enum lws_token_indexes h,
+ int frag_idx);
+
+/**
+ * lws_hdr_copy() - copy all fragments of the given header to a buffer
+ * The buffer length len must include space for an additional
+ * terminating '\0', or it will fail returning -1.
+ *
+ * \param wsi: websocket connection
+ * \param dest: destination buffer
+ * \param len: length of destination buffer
+ * \param h: which header index we are interested in
+ *
+ * copies the whole, aggregated header, even if it was delivered in
+ * several actual headers piece by piece. Returns -1 or length of the whole
+ * header.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_hdr_copy(struct lws *wsi, char *dest, int len, enum lws_token_indexes h);
+
+/**
+ * lws_hdr_copy_fragment() - copy a single fragment of the given header to a buffer
+ * The buffer length len must include space for an additional
+ * terminating '\0', or it will fail returning -1.
+ * If the requested fragment index is not present, it fails
+ * returning -1.
+ *
+ * \param wsi: websocket connection
+ * \param dest: destination buffer
+ * \param len: length of destination buffer
+ * \param h: which header index we are interested in
+ * \param frag_idx: which fragment of h we want to copy
+ *
+ * Normally this is only useful
+ * to parse URI arguments like ?x=1&y=2, token index WSI_TOKEN_HTTP_URI_ARGS
+ * fragment 0 will contain "x=1" and fragment 1 "y=2"
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_hdr_copy_fragment(struct lws *wsi, char *dest, int len,
+ enum lws_token_indexes h, int frag_idx);
+
+/**
+ * lws_get_urlarg_by_name() - return pointer to arg value if present
+ * \param wsi: the connection to check
+ * \param name: the arg name, like "token="
+ * \param buf: the buffer to receive the urlarg (including the name= part)
+ * \param len: the length of the buffer to receive the urlarg
+ *
+ * Returns NULL if not found or a pointer inside buf to just after the
+ * name= part.
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_get_urlarg_by_name(struct lws *wsi, const char *name, char *buf, int len);
+///@}
+
+/*! \defgroup HTTP-headers-create HTTP headers: create
+ *
+ * ## HTTP headers: Create
+ *
+ * These apis allow you to create HTTP response headers in a way compatible with
+ * both HTTP/1.x and HTTP/2.
+ *
+ * They each append to a buffer taking care about the buffer end, which is
+ * passed in as a pointer. When data is written to the buffer, the current
+ * position p is updated accordingly.
+ *
+ * All of these apis are LWS_WARN_UNUSED_RESULT as they can run out of space
+ * and fail with nonzero return.
+ */
+///@{
+
+#define LWSAHH_CODE_MASK ((1 << 16) - 1)
+#define LWSAHH_FLAG_NO_SERVER_NAME (1 << 30)
+
+/**
+ * lws_add_http_header_status() - add the HTTP response status code
+ *
+ * \param wsi: the connection to check
+ * \param code: an HTTP code like 200, 404 etc (see enum http_status)
+ * \param p: pointer to current position in buffer pointer
+ * \param end: pointer to end of buffer
+ *
+ * Adds the initial response code, so should be called first.
+ *
+ * Code may additionally take OR'd flags:
+ *
+ * LWSAHH_FLAG_NO_SERVER_NAME: don't apply server name header this time
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_add_http_header_status(struct lws *wsi,
+ unsigned int code, unsigned char **p,
+ unsigned char *end);
+/**
+ * lws_add_http_header_by_name() - append named header and value
+ *
+ * \param wsi: the connection to check
+ * \param name: the hdr name, like "my-header"
+ * \param value: the value after the = for this header
+ * \param length: the length of the value
+ * \param p: pointer to current position in buffer pointer
+ * \param end: pointer to end of buffer
+ *
+ * Appends name: value to the headers
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_add_http_header_by_name(struct lws *wsi, const unsigned char *name,
+ const unsigned char *value, int length,
+ unsigned char **p, unsigned char *end);
+/**
+ * lws_add_http_header_by_token() - append given header and value
+ *
+ * \param wsi: the connection to check
+ * \param token: the token index for the hdr
+ * \param value: the value after the = for this header
+ * \param length: the length of the value
+ * \param p: pointer to current position in buffer pointer
+ * \param end: pointer to end of buffer
+ *
+ * Appends name=value to the headers, but is able to take advantage of better
+ * HTTP/2 coding mechanisms where possible.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_add_http_header_by_token(struct lws *wsi, enum lws_token_indexes token,
+ const unsigned char *value, int length,
+ unsigned char **p, unsigned char *end);
+/**
+ * lws_add_http_header_content_length() - append content-length helper
+ *
+ * \param wsi: the connection to check
+ * \param content_length: the content length to use
+ * \param p: pointer to current position in buffer pointer
+ * \param end: pointer to end of buffer
+ *
+ * Appends content-length: content_length to the headers
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_add_http_header_content_length(struct lws *wsi,
+ lws_filepos_t content_length,
+ unsigned char **p, unsigned char *end);
+/**
+ * lws_finalize_http_header() - terminate header block
+ *
+ * \param wsi: the connection to check
+ * \param p: pointer to current position in buffer pointer
+ * \param end: pointer to end of buffer
+ *
+ * Indicates no more headers will be added
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_finalize_http_header(struct lws *wsi, unsigned char **p,
+ unsigned char *end);
+
+/**
+ * lws_finalize_write_http_header() - Helper finializing and writing http headers
+ *
+ * \param wsi: the connection to check
+ * \param start: pointer to the start of headers in the buffer, eg &buf[LWS_PRE]
+ * \param p: pointer to current position in buffer pointer
+ * \param end: pointer to end of buffer
+ *
+ * Terminates the headers correctly accoring to the protocol in use (h1 / h2)
+ * and writes the headers. Returns nonzero for error.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_finalize_write_http_header(struct lws *wsi, unsigned char *start,
+ unsigned char **p, unsigned char *end);
+
+#define LWS_ILLEGAL_HTTP_CONTENT_LEN ((lws_filepos_t)-1ll)
+
+/**
+ * lws_add_http_common_headers() - Helper preparing common http headers
+ *
+ * \param wsi: the connection to check
+ * \param code: an HTTP code like 200, 404 etc (see enum http_status)
+ * \param content_type: the content type, like "text/html"
+ * \param content_len: the content length, in bytes
+ * \param p: pointer to current position in buffer pointer
+ * \param end: pointer to end of buffer
+ *
+ * Adds the initial response code, so should be called first.
+ *
+ * Code may additionally take OR'd flags:
+ *
+ * LWSAHH_FLAG_NO_SERVER_NAME: don't apply server name header this time
+ *
+ * This helper just calls public apis to simplify adding headers that are
+ * commonly needed. If it doesn't fit your case, or you want to add additional
+ * headers just call the public apis directly yourself for what you want.
+ *
+ * You can miss out the content length header by providing the constant
+ * LWS_ILLEGAL_HTTP_CONTENT_LEN for the content_len.
+ *
+ * It does not call lws_finalize_http_header(), to allow you to add further
+ * headers after calling this. You will need to call that yourself at the end.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_add_http_common_headers(struct lws *wsi, unsigned int code,
+ const char *content_type, lws_filepos_t content_len,
+ unsigned char **p, unsigned char *end);
+
+///@}
+
+/*! \defgroup urlendec Urlencode and Urldecode
+ * \ingroup http
+ *
+ * ##HTML chunked Substitution
+ *
+ * APIs for receiving chunks of text, replacing a set of variable names via
+ * a callback, and then prepending and appending HTML chunked encoding
+ * headers.
+ */
+//@{
+
+/**
+ * lws_urlencode() - like strncpy but with urlencoding
+ *
+ * \param escaped: output buffer
+ * \param string: input buffer ('/0' terminated)
+ * \param len: output buffer max length
+ *
+ * Because urlencoding expands the output string, it's not
+ * possible to do it in-place, ie, with escaped == string
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_urlencode(char *escaped, const char *string, int len);
+
+/*
+ * URLDECODE 1 / 2
+ *
+ * This simple urldecode only operates until the first '\0' and requires the
+ * data to exist all at once
+ */
+/**
+ * lws_urldecode() - like strncpy but with urldecoding
+ *
+ * \param string: output buffer
+ * \param escaped: input buffer ('\0' terminated)
+ * \param len: output buffer max length
+ *
+ * This is only useful for '\0' terminated strings
+ *
+ * Since urldecoding only shrinks the output string, it is possible to
+ * do it in-place, ie, string == escaped
+ *
+ * Returns 0 if completed OK or nonzero for urldecode violation (non-hex chars
+ * where hex required, etc)
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_urldecode(char *string, const char *escaped, int len);
+///@}
+
+/**
+ * lws_return_http_status() - Return simple http status
+ * \param wsi: Websocket instance (available from user callback)
+ * \param code: Status index, eg, 404
+ * \param html_body: User-readable HTML description < 1KB, or NULL
+ *
+ * Helper to report HTTP errors back to the client cleanly and
+ * consistently
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_return_http_status(struct lws *wsi, unsigned int code,
+ const char *html_body);
+
+/**
+ * lws_http_redirect() - write http redirect out on wsi
+ *
+ * \param wsi: websocket connection
+ * \param code: HTTP response code (eg, 301)
+ * \param loc: where to redirect to
+ * \param len: length of loc
+ * \param p: pointer current position in buffer (updated as we write)
+ * \param end: pointer to end of buffer
+ *
+ * Returns amount written, or < 0 indicating fatal write failure.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_http_redirect(struct lws *wsi, int code, const unsigned char *loc, int len,
+ unsigned char **p, unsigned char *end);
+
+/**
+ * lws_http_transaction_completed() - wait for new http transaction or close
+ * \param wsi: websocket connection
+ *
+ * Returns 1 if the HTTP connection must close now
+ * Returns 0 and resets connection to wait for new HTTP header /
+ * transaction if possible
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_http_transaction_completed(struct lws *wsi);
+
+/**
+ * lws_http_compression_apply() - apply an http compression transform
+ *
+ * \param wsi: the wsi to apply the compression transform to
+ * \param name: NULL, or the name of the compression transform, eg, "deflate"
+ * \param p: pointer to pointer to headers buffer
+ * \param end: pointer to end of headers buffer
+ * \param decomp: 0 = add compressor to wsi, 1 = add decompressor
+ *
+ * This allows transparent compression of dynamically generated HTTP. The
+ * requested compression (eg, "deflate") is only applied if the client headers
+ * indicated it was supported (and it has support in lws), otherwise it's a NOP.
+ *
+ * If the requested compression method is NULL, then the supported compression
+ * formats are tried, and for non-decompression (server) mode the first that's
+ * found on the client's accept-encoding header is chosen.
+ *
+ * NOTE: the compression transform, same as h2 support, relies on the user
+ * code using LWS_WRITE_HTTP and then LWS_WRITE_HTTP_FINAL on the last part
+ * written. The internal lws fileserving code already does this.
+ *
+ * If the library was built without the cmake option
+ * LWS_WITH_HTTP_STREAM_COMPRESSION set, then a NOP is provided for this api,
+ * allowing user code to build either way and use compression if available.
+ */
+LWS_VISIBLE int
+lws_http_compression_apply(struct lws *wsi, const char *name,
+ unsigned char **p, unsigned char *end, char decomp);
+///@}
+
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-jwk.h b/thirdparty/libwebsockets/include/libwebsockets/lws-jwk.h
new file mode 100644
index 0000000000..2e2eabd73e
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-jwk.h
@@ -0,0 +1,110 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+
+/*! \defgroup jwk JSON Web Keys
+ * ## JSON Web Keys API
+ *
+ * Lws provides an API to parse JSON Web Keys into a struct lws_genrsa_elements.
+ *
+ * "oct" and "RSA" type keys are supported. For "oct" keys, they are held in
+ * the "e" member of the struct lws_genrsa_elements.
+ *
+ * Keys elements are allocated on the heap. You must destroy the allocations
+ * in the struct lws_genrsa_elements by calling
+ * lws_jwk_destroy_genrsa_elements() when you are finished with it.
+ */
+///@{
+
+struct lws_jwk {
+ char keytype[5]; /**< "oct" or "RSA" */
+ struct lws_genrsa_elements el; /**< OCTet key is in el.e */
+};
+
+/** lws_jwk_import() - Create a JSON Web key from the textual representation
+ *
+ * \param s: the JWK object to create
+ * \param in: a single JWK JSON stanza in utf-8
+ * \param len: the length of the JWK JSON stanza in bytes
+ *
+ * Creates an lws_jwk struct filled with data from the JSON representation.
+ * "oct" and "rsa" key types are supported.
+ *
+ * For "oct" type keys, it is loaded into el.e.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_jwk_import(struct lws_jwk *s, const char *in, size_t len);
+
+/** lws_jwk_destroy() - Destroy a JSON Web key
+ *
+ * \param s: the JWK object to destroy
+ *
+ * All allocations in the lws_jwk are destroyed
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_jwk_destroy(struct lws_jwk *s);
+
+/** lws_jwk_export() - Export a JSON Web key to a textual representation
+ *
+ * \param s: the JWK object to export
+ * \param _private: 0 = just export public parts, 1 = export everything
+ * \param p: the buffer to write the exported JWK to
+ * \param len: the length of the buffer \p p in bytes
+ *
+ * Returns length of the used part of the buffer if OK, or -1 for error.
+ *
+ * Serializes the content of the JWK into a char buffer.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_jwk_export(struct lws_jwk *s, int _private, char *p, size_t len);
+
+/** lws_jwk_load() - Import a JSON Web key from a file
+ *
+ * \param s: the JWK object to load into
+ * \param filename: filename to load from
+ *
+ * Returns 0 for OK or -1 for failure
+ */
+LWS_VISIBLE int
+lws_jwk_load(struct lws_jwk *s, const char *filename);
+
+/** lws_jwk_save() - Export a JSON Web key to a file
+ *
+ * \param s: the JWK object to save from
+ * \param filename: filename to save to
+ *
+ * Returns 0 for OK or -1 for failure
+ */
+LWS_VISIBLE int
+lws_jwk_save(struct lws_jwk *s, const char *filename);
+
+/** lws_jwk_rfc7638_fingerprint() - jwk to RFC7638 compliant fingerprint
+ *
+ * \param s: the JWK object to fingerprint
+ * \param digest32: buffer to take 32-byte digest
+ *
+ * Returns 0 for OK or -1 for failure
+ */
+LWS_VISIBLE int
+lws_jwk_rfc7638_fingerprint(struct lws_jwk *s, char *digest32);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-jws.h b/thirdparty/libwebsockets/include/libwebsockets/lws-jws.h
new file mode 100644
index 0000000000..7112fc3dba
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-jws.h
@@ -0,0 +1,101 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup jws JSON Web Signature
+ * ## JSON Web Signature API
+ *
+ * Lws provides an API to check and create RFC7515 JSON Web Signatures
+ *
+ * SHA256/384/512 HMAC, and RSA 256/384/512 are supported.
+ *
+ * The API uses your TLS library crypto, but works exactly the same no matter
+ * what you TLS backend is.
+ */
+///@{
+
+LWS_VISIBLE LWS_EXTERN int
+lws_jws_confirm_sig(const char *in, size_t len, struct lws_jwk *jwk);
+
+/**
+ * lws_jws_sign_from_b64() - add b64 sig to b64 hdr + payload
+ *
+ * \param b64_hdr: protected header encoded in b64, may be NULL
+ * \param hdr_len: bytes in b64 coding of protected header
+ * \param b64_pay: payload encoded in b64
+ * \param pay_len: bytes in b64 coding of payload
+ * \param b64_sig: buffer to write the b64 encoded signature into
+ * \param sig_len: max bytes we can write at b64_sig
+ * \param hash_type: one of LWS_GENHASH_TYPE_SHA[256|384|512]
+ * \param jwk: the struct lws_jwk containing the signing key
+ *
+ * This adds a b64-coded JWS signature of the b64-encoded protected header
+ * and b64-encoded payload, at \p b64_sig. The signature will be as large
+ * as the N element of the RSA key when the RSA key is used, eg, 512 bytes for
+ * a 4096-bit key, and then b64-encoding on top.
+ *
+ * In some special cases, there is only payload to sign and no header, in that
+ * case \p b64_hdr may be NULL, and only the payload will be hashed before
+ * signing.
+ *
+ * Returns the length of the encoded signature written to \p b64_sig, or -1.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_jws_sign_from_b64(const char *b64_hdr, size_t hdr_len, const char *b64_pay,
+ size_t pay_len, char *b64_sig, size_t sig_len,
+ enum lws_genhash_types hash_type, struct lws_jwk *jwk);
+
+/**
+ * lws_jws_create_packet() - add b64 sig to b64 hdr + payload
+ *
+ * \param jwk: the struct lws_jwk containing the signing key
+ * \param payload: unencoded payload JSON
+ * \param len: length of unencoded payload JSON
+ * \param nonce: Nonse string to include in protected header
+ * \param out: buffer to take signed packet
+ * \param out_len: size of \p out buffer
+ *
+ * This creates a "flattened" JWS packet from the jwk and the plaintext
+ * payload, and signs it. The packet is written into \p out.
+ *
+ * This does the whole packet assembly and signing, calling through to
+ * lws_jws_sign_from_b64() as part of the process.
+ *
+ * Returns the length written to \p out, or -1.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_jws_create_packet(struct lws_jwk *jwk, const char *payload, size_t len,
+ const char *nonce, char *out, size_t out_len);
+
+/**
+ * lws_jws_base64_enc() - encode input data into b64url data
+ *
+ * \param in: the incoming plaintext
+ * \param in_len: the length of the incoming plaintext in bytes
+ * \param out: the buffer to store the b64url encoded data to
+ * \param out_max: the length of \p out in bytes
+ *
+ * Returns either -1 if problems, or the number of bytes written to \p out.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_jws_base64_enc(const char *in, size_t in_len, char *out, size_t out_max);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-lejp.h b/thirdparty/libwebsockets/include/libwebsockets/lws-lejp.h
new file mode 100644
index 0000000000..f3f7e59a64
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-lejp.h
@@ -0,0 +1,262 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup lejp JSON parser
+ * ##JSON parsing related functions
+ * \ingroup lwsapi
+ *
+ * LEJP is an extremely lightweight JSON stream parser included in lws.
+ */
+//@{
+struct lejp_ctx;
+
+#if !defined(LWS_ARRAY_SIZE)
+#define LWS_ARRAY_SIZE(_x) (sizeof(_x) / sizeof(_x[0]))
+#endif
+#define LEJP_FLAG_WS_KEEP 64
+#define LEJP_FLAG_WS_COMMENTLINE 32
+
+enum lejp_states {
+ LEJP_IDLE = 0,
+ LEJP_MEMBERS = 1,
+ LEJP_M_P = 2,
+ LEJP_MP_STRING = LEJP_FLAG_WS_KEEP | 3,
+ LEJP_MP_STRING_ESC = LEJP_FLAG_WS_KEEP | 4,
+ LEJP_MP_STRING_ESC_U1 = LEJP_FLAG_WS_KEEP | 5,
+ LEJP_MP_STRING_ESC_U2 = LEJP_FLAG_WS_KEEP | 6,
+ LEJP_MP_STRING_ESC_U3 = LEJP_FLAG_WS_KEEP | 7,
+ LEJP_MP_STRING_ESC_U4 = LEJP_FLAG_WS_KEEP | 8,
+ LEJP_MP_DELIM = 9,
+ LEJP_MP_VALUE = 10,
+ LEJP_MP_VALUE_NUM_INT = LEJP_FLAG_WS_KEEP | 11,
+ LEJP_MP_VALUE_NUM_EXP = LEJP_FLAG_WS_KEEP | 12,
+ LEJP_MP_VALUE_TOK = LEJP_FLAG_WS_KEEP | 13,
+ LEJP_MP_COMMA_OR_END = 14,
+ LEJP_MP_ARRAY_END = 15,
+};
+
+enum lejp_reasons {
+ LEJP_CONTINUE = -1,
+ LEJP_REJECT_IDLE_NO_BRACE = -2,
+ LEJP_REJECT_MEMBERS_NO_CLOSE = -3,
+ LEJP_REJECT_MP_NO_OPEN_QUOTE = -4,
+ LEJP_REJECT_MP_STRING_UNDERRUN = -5,
+ LEJP_REJECT_MP_ILLEGAL_CTRL = -6,
+ LEJP_REJECT_MP_STRING_ESC_ILLEGAL_ESC = -7,
+ LEJP_REJECT_ILLEGAL_HEX = -8,
+ LEJP_REJECT_MP_DELIM_MISSING_COLON = -9,
+ LEJP_REJECT_MP_DELIM_BAD_VALUE_START = -10,
+ LEJP_REJECT_MP_VAL_NUM_INT_NO_FRAC = -11,
+ LEJP_REJECT_MP_VAL_NUM_FORMAT = -12,
+ LEJP_REJECT_MP_VAL_NUM_EXP_BAD_EXP = -13,
+ LEJP_REJECT_MP_VAL_TOK_UNKNOWN = -14,
+ LEJP_REJECT_MP_C_OR_E_UNDERF = -15,
+ LEJP_REJECT_MP_C_OR_E_NOTARRAY = -16,
+ LEJP_REJECT_MP_ARRAY_END_MISSING = -17,
+ LEJP_REJECT_STACK_OVERFLOW = -18,
+ LEJP_REJECT_MP_DELIM_ISTACK = -19,
+ LEJP_REJECT_NUM_TOO_LONG = -20,
+ LEJP_REJECT_MP_C_OR_E_NEITHER = -21,
+ LEJP_REJECT_UNKNOWN = -22,
+ LEJP_REJECT_CALLBACK = -23
+};
+
+#define LEJP_FLAG_CB_IS_VALUE 64
+
+enum lejp_callbacks {
+ LEJPCB_CONSTRUCTED = 0,
+ LEJPCB_DESTRUCTED = 1,
+
+ LEJPCB_START = 2,
+ LEJPCB_COMPLETE = 3,
+ LEJPCB_FAILED = 4,
+
+ LEJPCB_PAIR_NAME = 5,
+
+ LEJPCB_VAL_TRUE = LEJP_FLAG_CB_IS_VALUE | 6,
+ LEJPCB_VAL_FALSE = LEJP_FLAG_CB_IS_VALUE | 7,
+ LEJPCB_VAL_NULL = LEJP_FLAG_CB_IS_VALUE | 8,
+ LEJPCB_VAL_NUM_INT = LEJP_FLAG_CB_IS_VALUE | 9,
+ LEJPCB_VAL_NUM_FLOAT = LEJP_FLAG_CB_IS_VALUE | 10,
+ LEJPCB_VAL_STR_START = 11, /* notice handle separately */
+ LEJPCB_VAL_STR_CHUNK = LEJP_FLAG_CB_IS_VALUE | 12,
+ LEJPCB_VAL_STR_END = LEJP_FLAG_CB_IS_VALUE | 13,
+
+ LEJPCB_ARRAY_START = 14,
+ LEJPCB_ARRAY_END = 15,
+
+ LEJPCB_OBJECT_START = 16,
+ LEJPCB_OBJECT_END = 17
+};
+
+/**
+ * _lejp_callback() - User parser actions
+ * \param ctx: LEJP context
+ * \param reason: Callback reason
+ *
+ * Your user callback is associated with the context at construction time,
+ * and receives calls as the parsing progresses.
+ *
+ * All of the callbacks may be ignored and just return 0.
+ *
+ * The reasons it might get called, found in @reason, are:
+ *
+ * LEJPCB_CONSTRUCTED: The context was just constructed... you might want to
+ * perform one-time allocation for the life of the context.
+ *
+ * LEJPCB_DESTRUCTED: The context is being destructed... if you made any
+ * allocations at construction-time, you can free them now
+ *
+ * LEJPCB_START: Parsing is beginning at the first byte of input
+ *
+ * LEJPCB_COMPLETE: Parsing has completed successfully. You'll get a 0 or
+ * positive return code from lejp_parse indicating the
+ * amount of unused bytes left in the input buffer
+ *
+ * LEJPCB_FAILED: Parsing failed. You'll get a negative error code
+ * returned from lejp_parse
+ *
+ * LEJPCB_PAIR_NAME: When a "name":"value" pair has had the name parsed,
+ * this callback occurs. You can find the new name at
+ * the end of ctx->path[]
+ *
+ * LEJPCB_VAL_TRUE: The "true" value appeared
+ *
+ * LEJPCB_VAL_FALSE: The "false" value appeared
+ *
+ * LEJPCB_VAL_NULL: The "null" value appeared
+ *
+ * LEJPCB_VAL_NUM_INT: A string representing an integer is in ctx->buf
+ *
+ * LEJPCB_VAL_NUM_FLOAT: A string representing a float is in ctx->buf
+ *
+ * LEJPCB_VAL_STR_START: We are starting to parse a string, no data yet
+ *
+ * LEJPCB_VAL_STR_CHUNK: We parsed LEJP_STRING_CHUNK -1 bytes of string data in
+ * ctx->buf, which is as much as we can buffer, so we are
+ * spilling it. If all your strings are less than
+ * LEJP_STRING_CHUNK - 1 bytes, you will never see this
+ * callback.
+ *
+ * LEJPCB_VAL_STR_END: String parsing has completed, the last chunk of the
+ * string is in ctx->buf.
+ *
+ * LEJPCB_ARRAY_START: An array started
+ *
+ * LEJPCB_ARRAY_END: An array ended
+ *
+ * LEJPCB_OBJECT_START: An object started
+ *
+ * LEJPCB_OBJECT_END: An object ended
+ */
+LWS_EXTERN signed char _lejp_callback(struct lejp_ctx *ctx, char reason);
+
+typedef signed char (*lejp_callback)(struct lejp_ctx *ctx, char reason);
+
+#ifndef LEJP_MAX_DEPTH
+#define LEJP_MAX_DEPTH 12
+#endif
+#ifndef LEJP_MAX_INDEX_DEPTH
+#define LEJP_MAX_INDEX_DEPTH 5
+#endif
+#ifndef LEJP_MAX_PATH
+#define LEJP_MAX_PATH 128
+#endif
+#ifndef LEJP_STRING_CHUNK
+/* must be >= 30 to assemble floats */
+#define LEJP_STRING_CHUNK 254
+#endif
+
+enum num_flags {
+ LEJP_SEEN_MINUS = (1 << 0),
+ LEJP_SEEN_POINT = (1 << 1),
+ LEJP_SEEN_POST_POINT = (1 << 2),
+ LEJP_SEEN_EXP = (1 << 3)
+};
+
+struct _lejp_stack {
+ char s; /* lejp_state stack*/
+ char p; /* path length */
+ char i; /* index array length */
+ char b; /* user bitfield */
+};
+
+struct lejp_ctx {
+
+ /* sorted by type for most compact alignment
+ *
+ * pointers
+ */
+
+ signed char (*callback)(struct lejp_ctx *ctx, char reason);
+ void *user;
+ const char * const *paths;
+
+ /* arrays */
+
+ struct _lejp_stack st[LEJP_MAX_DEPTH];
+ uint16_t i[LEJP_MAX_INDEX_DEPTH]; /* index array */
+ uint16_t wild[LEJP_MAX_INDEX_DEPTH]; /* index array */
+ char path[LEJP_MAX_PATH];
+ char buf[LEJP_STRING_CHUNK + 1];
+
+ /* int */
+
+ uint32_t line;
+
+ /* short */
+
+ uint16_t uni;
+
+ /* char */
+
+ uint8_t npos;
+ uint8_t dcount;
+ uint8_t f;
+ uint8_t sp; /* stack head */
+ uint8_t ipos; /* index stack depth */
+ uint8_t ppos;
+ uint8_t count_paths;
+ uint8_t path_match;
+ uint8_t path_match_len;
+ uint8_t wildcount;
+};
+
+LWS_VISIBLE LWS_EXTERN void
+lejp_construct(struct lejp_ctx *ctx,
+ signed char (*callback)(struct lejp_ctx *ctx, char reason),
+ void *user, const char * const *paths, unsigned char paths_count);
+
+LWS_VISIBLE LWS_EXTERN void
+lejp_destruct(struct lejp_ctx *ctx);
+
+LWS_VISIBLE LWS_EXTERN int
+lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len);
+
+LWS_VISIBLE LWS_EXTERN void
+lejp_change_callback(struct lejp_ctx *ctx,
+ signed char (*callback)(struct lejp_ctx *ctx, char reason));
+
+LWS_VISIBLE LWS_EXTERN int
+lejp_get_wildcard(struct lejp_ctx *ctx, int wildcard, char *dest, int len);
+//@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-logs.h b/thirdparty/libwebsockets/include/libwebsockets/lws-logs.h
new file mode 100644
index 0000000000..9317dcc70c
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-logs.h
@@ -0,0 +1,224 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup log Logging
+ *
+ * ##Logging
+ *
+ * Lws provides flexible and filterable logging facilities, which can be
+ * used inside lws and in user code.
+ *
+ * Log categories may be individually filtered bitwise, and directed to built-in
+ * sinks for syslog-compatible logging, or a user-defined function.
+ */
+///@{
+
+enum lws_log_levels {
+ LLL_ERR = 1 << 0,
+ LLL_WARN = 1 << 1,
+ LLL_NOTICE = 1 << 2,
+ LLL_INFO = 1 << 3,
+ LLL_DEBUG = 1 << 4,
+ LLL_PARSER = 1 << 5,
+ LLL_HEADER = 1 << 6,
+ LLL_EXT = 1 << 7,
+ LLL_CLIENT = 1 << 8,
+ LLL_LATENCY = 1 << 9,
+ LLL_USER = 1 << 10,
+ LLL_THREAD = 1 << 11,
+
+ LLL_COUNT = 12 /* set to count of valid flags */
+};
+
+LWS_VISIBLE LWS_EXTERN void _lws_log(int filter, const char *format, ...) LWS_FORMAT(2);
+LWS_VISIBLE LWS_EXTERN void _lws_logv(int filter, const char *format, va_list vl);
+/**
+ * lwsl_timestamp: generate logging timestamp string
+ *
+ * \param level: logging level
+ * \param p: char * buffer to take timestamp
+ * \param len: length of p
+ *
+ * returns length written in p
+ */
+LWS_VISIBLE LWS_EXTERN int
+lwsl_timestamp(int level, char *p, int len);
+
+/* these guys are unconditionally included */
+
+#define lwsl_err(...) _lws_log(LLL_ERR, __VA_ARGS__)
+#define lwsl_user(...) _lws_log(LLL_USER, __VA_ARGS__)
+
+#if !defined(LWS_WITH_NO_LOGS)
+/* notice and warn are usually included by being compiled in */
+#define lwsl_warn(...) _lws_log(LLL_WARN, __VA_ARGS__)
+#define lwsl_notice(...) _lws_log(LLL_NOTICE, __VA_ARGS__)
+#endif
+/*
+ * weaker logging can be deselected by telling CMake to build in RELEASE mode
+ * that gets rid of the overhead of checking while keeping _warn and _err
+ * active
+ */
+
+#ifdef _DEBUG
+#if defined(LWS_WITH_NO_LOGS)
+/* notice, warn and log are always compiled in */
+#define lwsl_warn(...) _lws_log(LLL_WARN, __VA_ARGS__)
+#define lwsl_notice(...) _lws_log(LLL_NOTICE, __VA_ARGS__)
+#endif
+#define lwsl_info(...) _lws_log(LLL_INFO, __VA_ARGS__)
+#define lwsl_debug(...) _lws_log(LLL_DEBUG, __VA_ARGS__)
+#define lwsl_parser(...) _lws_log(LLL_PARSER, __VA_ARGS__)
+#define lwsl_header(...) _lws_log(LLL_HEADER, __VA_ARGS__)
+#define lwsl_ext(...) _lws_log(LLL_EXT, __VA_ARGS__)
+#define lwsl_client(...) _lws_log(LLL_CLIENT, __VA_ARGS__)
+#define lwsl_latency(...) _lws_log(LLL_LATENCY, __VA_ARGS__)
+#define lwsl_thread(...) _lws_log(LLL_THREAD, __VA_ARGS__)
+
+#else /* no debug */
+#if defined(LWS_WITH_NO_LOGS)
+#define lwsl_warn(...) do {} while(0)
+#define lwsl_notice(...) do {} while(0)
+#endif
+#define lwsl_info(...) do {} while(0)
+#define lwsl_debug(...) do {} while(0)
+#define lwsl_parser(...) do {} while(0)
+#define lwsl_header(...) do {} while(0)
+#define lwsl_ext(...) do {} while(0)
+#define lwsl_client(...) do {} while(0)
+#define lwsl_latency(...) do {} while(0)
+#define lwsl_thread(...) do {} while(0)
+
+#endif
+
+#define lwsl_hexdump_err(...) lwsl_hexdump_level(LLL_ERR, __VA_ARGS__)
+#define lwsl_hexdump_warn(...) lwsl_hexdump_level(LLL_WARN, __VA_ARGS__)
+#define lwsl_hexdump_notice(...) lwsl_hexdump_level(LLL_NOTICE, __VA_ARGS__)
+#define lwsl_hexdump_info(...) lwsl_hexdump_level(LLL_INFO, __VA_ARGS__)
+#define lwsl_hexdump_debug(...) lwsl_hexdump_level(LLL_DEBUG, __VA_ARGS__)
+
+/**
+ * lwsl_hexdump_level() - helper to hexdump a buffer at a selected debug level
+ *
+ * \param level: one of LLL_ constants
+ * \param vbuf: buffer start to dump
+ * \param len: length of buffer to dump
+ *
+ * If \p level is visible, does a nice hexdump -C style dump of \p vbuf for
+ * \p len bytes. This can be extremely convenient while debugging.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsl_hexdump_level(int level, const void *vbuf, size_t len);
+
+/**
+ * lwsl_hexdump() - helper to hexdump a buffer (DEBUG builds only)
+ *
+ * \param buf: buffer start to dump
+ * \param len: length of buffer to dump
+ *
+ * Calls through to lwsl_hexdump_level(LLL_DEBUG, ... for compatability.
+ * It's better to use lwsl_hexdump_level(level, ... directly so you can control
+ * the visibility.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsl_hexdump(const void *buf, size_t len);
+
+/**
+ * lws_is_be() - returns nonzero if the platform is Big Endian
+ */
+static LWS_INLINE int lws_is_be(void) {
+ const int probe = ~0xff;
+
+ return *(const char *)&probe;
+}
+
+/**
+ * lws_set_log_level() - Set the logging bitfield
+ * \param level: OR together the LLL_ debug contexts you want output from
+ * \param log_emit_function: NULL to leave it as it is, or a user-supplied
+ * function to perform log string emission instead of
+ * the default stderr one.
+ *
+ * log level defaults to "err", "warn" and "notice" contexts enabled and
+ * emission on stderr. If stderr is a tty (according to isatty()) then
+ * the output is coloured according to the log level using ANSI escapes.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_set_log_level(int level,
+ void (*log_emit_function)(int level, const char *line));
+
+/**
+ * lwsl_emit_syslog() - helper log emit function writes to system log
+ *
+ * \param level: one of LLL_ log level indexes
+ * \param line: log string
+ *
+ * You use this by passing the function pointer to lws_set_log_level(), to set
+ * it as the log emit function, it is not called directly.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsl_emit_syslog(int level, const char *line);
+
+/**
+ * lwsl_emit_stderr() - helper log emit function writes to stderr
+ *
+ * \param level: one of LLL_ log level indexes
+ * \param line: log string
+ *
+ * You use this by passing the function pointer to lws_set_log_level(), to set
+ * it as the log emit function, it is not called directly.
+ *
+ * It prepends a system timestamp like [2018/11/13 07:41:57:3989]
+ *
+ * If stderr is a tty, then ansi colour codes are added.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsl_emit_stderr(int level, const char *line);
+
+/**
+ * lwsl_emit_stderr_notimestamp() - helper log emit function writes to stderr
+ *
+ * \param level: one of LLL_ log level indexes
+ * \param line: log string
+ *
+ * You use this by passing the function pointer to lws_set_log_level(), to set
+ * it as the log emit function, it is not called directly.
+ *
+ * If stderr is a tty, then ansi colour codes are added.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsl_emit_stderr_notimestamp(int level, const char *line);
+
+/**
+ * lwsl_visible() - returns true if the log level should be printed
+ *
+ * \param level: one of LLL_ log level indexes
+ *
+ * This is useful if you have to do work to generate the log content, you
+ * can skip the work if the log level used to print it is not actually
+ * enabled at runtime.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lwsl_visible(int level);
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-lwsac.h b/thirdparty/libwebsockets/include/libwebsockets/lws-lwsac.h
new file mode 100644
index 0000000000..1f914b66a6
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-lwsac.h
@@ -0,0 +1,191 @@
+/*
+ * libwebsockets - lws alloc chunk
+ *
+ * Copyright (C) 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup log lwsac
+ *
+ * ##Allocated Chunks
+ *
+ * If you know you will be allocating a large, unknown number of same or
+ * differently sized objects, it's certainly possible to do it with libc
+ * malloc. However the allocation cost in time and memory overhead can
+ * add up, and deallocation means walking the structure of every object and
+ * freeing them in turn.
+ *
+ * lwsac (LWS Allocated Chunks) allocates chunks intended to be larger
+ * than your objects (4000 bytes by default) which you linearly allocate from
+ * using lwsac_use().
+ *
+ * If your next request won't fit in the current chunk, a new chunk is added
+ * to the chain of chunks and the allocaton done from there. If the request
+ * is larger than the chunk size, an oversize chunk is created to satisfy it.
+ *
+ * When you are finished with the allocations, you call lwsac_free() and
+ * free all the *chunks*. So you may have thousands of objects in the chunks,
+ * but they are all destroyed with the chunks without having to deallocate them
+ * one by one pointlessly.
+ */
+///@{
+
+struct lwsac;
+typedef unsigned char * lwsac_cached_file_t;
+
+
+#define lws_list_ptr_container(P,T,M) ((T *)((char *)(P) - offsetof(T, M)))
+
+/*
+ * linked-list helper that's commonly useful to manage lists of things
+ * allocated using lwsac.
+ *
+ * These lists point to their corresponding "next" member in the target, NOT
+ * the original containing struct. To get the containing struct, you must use
+ * lws_list_ptr_container() to convert.
+ *
+ * It's like that because it means we no longer have to have the next pointer
+ * at the start of the struct, and we can have the same struct on multiple
+ * linked-lists with everything held in the struct itself.
+ */
+typedef void * lws_list_ptr;
+
+/*
+ * optional sorting callback called by lws_list_ptr_insert() to sort the right
+ * things inside the opqaue struct being sorted / inserted on the list.
+ */
+typedef int (*lws_list_ptr_sort_func_t)(lws_list_ptr a, lws_list_ptr b);
+
+#define lws_list_ptr_advance(_lp) _lp = *((void **)_lp)
+
+/* sort may be NULL if you don't care about order */
+LWS_VISIBLE LWS_EXTERN void
+lws_list_ptr_insert(lws_list_ptr *phead, lws_list_ptr *add,
+ lws_list_ptr_sort_func_t sort);
+
+
+/**
+ * lwsac_use - allocate / use some memory from a lwsac
+ *
+ * \param head: pointer to the lwsac list object
+ * \param ensure: the number of bytes we want to use
+ * \param chunk_size: 0, or the size of the chunk to (over)allocate if
+ * what we want won't fit in the current tail chunk. If
+ * 0, the default value of 4000 is used. If ensure is
+ * larger, it is used instead.
+ *
+ * This also serves to init the lwsac if *head is NULL. Basically it does
+ * whatever is necessary to return you a pointer to ensure bytes of memory
+ * reserved for the caller.
+ *
+ * Returns NULL if OOM.
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lwsac_use(struct lwsac **head, size_t ensure, size_t chunk_size);
+
+/**
+ * lwsac_free - deallocate all chunks in the lwsac and set head NULL
+ *
+ * \param head: pointer to the lwsac list object
+ *
+ * This deallocates all chunks in the lwsac, then sets *head to NULL. All
+ * lwsac_use() pointers are invalidated in one hit without individual frees.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsac_free(struct lwsac **head);
+
+/*
+ * Optional helpers useful for where consumers may need to defer destruction
+ * until all consumers are finished with the lwsac
+ */
+
+/**
+ * lwsac_detach() - destroy an lwsac unless somebody else is referencing it
+ *
+ * \param head: pointer to the lwsac list object
+ *
+ * The creator of the lwsac can all this instead of lwsac_free() when it itself
+ * has finished with the lwsac, but other code may be consuming it.
+ *
+ * If there are no other references, the lwsac is destroyed, *head is set to
+ * NULL and that's the end; however if something else has called
+ * lwsac_reference() on the lwsac, it simply returns. When lws_unreference()
+ * is called and no references are left, it will be destroyed then.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsac_detach(struct lwsac **head);
+
+/**
+ * lwsac_reference() - increase the lwsac reference count
+ *
+ * \param head: pointer to the lwsac list object
+ *
+ * Increment the reference count on the lwsac to defer destruction.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsac_reference(struct lwsac *head);
+
+/**
+ * lwsac_reference() - increase the lwsac reference count
+ *
+ * \param head: pointer to the lwsac list object
+ *
+ * Decrement the reference count on the lwsac... if it reached 0 on a detached
+ * lwsac then the lwsac is immediately destroyed and *head set to NULL.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lwsac_unreference(struct lwsac **head);
+
+
+/* helpers to keep a file cached in memory */
+
+LWS_VISIBLE LWS_EXTERN void
+lwsac_use_cached_file_start(lwsac_cached_file_t cache);
+
+LWS_VISIBLE LWS_EXTERN void
+lwsac_use_cached_file_end(lwsac_cached_file_t *cache);
+
+LWS_VISIBLE LWS_EXTERN void
+lwsac_use_cached_file_detach(lwsac_cached_file_t *cache);
+
+LWS_VISIBLE LWS_EXTERN int
+lwsac_cached_file(const char *filepath, lwsac_cached_file_t *cache,
+ size_t *len);
+
+/* more advanced helpers */
+
+LWS_VISIBLE LWS_EXTERN size_t
+lwsac_sizeof(void);
+
+LWS_VISIBLE LWS_EXTERN size_t
+lwsac_get_tail_pos(struct lwsac *lac);
+
+LWS_VISIBLE LWS_EXTERN struct lwsac *
+lwsac_get_next(struct lwsac *lac);
+
+LWS_VISIBLE LWS_EXTERN size_t
+lwsac_align(size_t length);
+
+LWS_VISIBLE LWS_EXTERN void
+lwsac_info(struct lwsac *head);
+
+LWS_VISIBLE LWS_EXTERN uint64_t
+lwsac_total_alloc(struct lwsac *head);
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-misc.h b/thirdparty/libwebsockets/include/libwebsockets/lws-misc.h
new file mode 100644
index 0000000000..02fe432d5b
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-misc.h
@@ -0,0 +1,836 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup misc Miscellaneous APIs
+* ##Miscellaneous APIs
+*
+* Various APIs outside of other categories
+*/
+///@{
+
+/**
+ * lws_start_foreach_ll(): linkedlist iterator helper start
+ *
+ * \param type: type of iteration, eg, struct xyz *
+ * \param it: iterator var name to create
+ * \param start: start of list
+ *
+ * This helper creates an iterator and starts a while (it) {
+ * loop. The iterator runs through the linked list starting at start and
+ * ends when it gets a NULL.
+ * The while loop should be terminated using lws_start_foreach_ll().
+ */
+#define lws_start_foreach_ll(type, it, start)\
+{ \
+ type it = start; \
+ while (it) {
+
+/**
+ * lws_end_foreach_ll(): linkedlist iterator helper end
+ *
+ * \param it: same iterator var name given when starting
+ * \param nxt: member name in the iterator pointing to next list element
+ *
+ * This helper is the partner for lws_start_foreach_ll() that ends the
+ * while loop.
+ */
+
+#define lws_end_foreach_ll(it, nxt) \
+ it = it->nxt; \
+ } \
+}
+
+/**
+ * lws_start_foreach_ll_safe(): linkedlist iterator helper start safe against delete
+ *
+ * \param type: type of iteration, eg, struct xyz *
+ * \param it: iterator var name to create
+ * \param start: start of list
+ * \param nxt: member name in the iterator pointing to next list element
+ *
+ * This helper creates an iterator and starts a while (it) {
+ * loop. The iterator runs through the linked list starting at start and
+ * ends when it gets a NULL.
+ * The while loop should be terminated using lws_end_foreach_ll_safe().
+ * Performs storage of next increment for situations where iterator can become invalidated
+ * during iteration.
+ */
+#define lws_start_foreach_ll_safe(type, it, start, nxt)\
+{ \
+ type it = start; \
+ while (it) { \
+ type next_##it = it->nxt;
+
+/**
+ * lws_end_foreach_ll_safe(): linkedlist iterator helper end (pre increment storage)
+ *
+ * \param it: same iterator var name given when starting
+ *
+ * This helper is the partner for lws_start_foreach_ll_safe() that ends the
+ * while loop. It uses the precreated next_ variable already stored during
+ * start.
+ */
+
+#define lws_end_foreach_ll_safe(it) \
+ it = next_##it; \
+ } \
+}
+
+/**
+ * lws_start_foreach_llp(): linkedlist pointer iterator helper start
+ *
+ * \param type: type of iteration, eg, struct xyz **
+ * \param it: iterator var name to create
+ * \param start: start of list
+ *
+ * This helper creates an iterator and starts a while (it) {
+ * loop. The iterator runs through the linked list starting at the
+ * address of start and ends when it gets a NULL.
+ * The while loop should be terminated using lws_start_foreach_llp().
+ *
+ * This helper variant iterates using a pointer to the previous linked-list
+ * element. That allows you to easily delete list members by rewriting the
+ * previous pointer to the element's next pointer.
+ */
+#define lws_start_foreach_llp(type, it, start)\
+{ \
+ type it = &(start); \
+ while (*(it)) {
+
+#define lws_start_foreach_llp_safe(type, it, start, nxt)\
+{ \
+ type it = &(start); \
+ type next; \
+ while (*(it)) { \
+ next = &((*(it))->nxt); \
+
+/**
+ * lws_end_foreach_llp(): linkedlist pointer iterator helper end
+ *
+ * \param it: same iterator var name given when starting
+ * \param nxt: member name in the iterator pointing to next list element
+ *
+ * This helper is the partner for lws_start_foreach_llp() that ends the
+ * while loop.
+ */
+
+#define lws_end_foreach_llp(it, nxt) \
+ it = &(*(it))->nxt; \
+ } \
+}
+
+#define lws_end_foreach_llp_safe(it) \
+ it = next; \
+ } \
+}
+
+#define lws_ll_fwd_insert(\
+ ___new_object, /* pointer to new object */ \
+ ___m_list, /* member for next list object ptr */ \
+ ___list_head /* list head */ \
+ ) {\
+ ___new_object->___m_list = ___list_head; \
+ ___list_head = ___new_object; \
+ }
+
+#define lws_ll_fwd_remove(\
+ ___type, /* type of listed object */ \
+ ___m_list, /* member for next list object ptr */ \
+ ___target, /* object to remove from list */ \
+ ___list_head /* list head */ \
+ ) { \
+ lws_start_foreach_llp(___type **, ___ppss, ___list_head) { \
+ if (*___ppss == ___target) { \
+ *___ppss = ___target->___m_list; \
+ break; \
+ } \
+ } lws_end_foreach_llp(___ppss, ___m_list); \
+ }
+
+/*
+ * doubly linked-list
+ */
+
+struct lws_dll { /* abstract */
+ struct lws_dll *prev;
+ struct lws_dll *next;
+};
+
+/*
+ * these all point to the composed list objects... you have to use the
+ * lws_container_of() helper to recover the start of the containing struct
+ */
+
+LWS_VISIBLE LWS_EXTERN void
+lws_dll_add_front(struct lws_dll *d, struct lws_dll *phead);
+
+LWS_VISIBLE LWS_EXTERN void
+lws_dll_remove(struct lws_dll *d);
+
+struct lws_dll_lws { /* typed as struct lws * */
+ struct lws_dll_lws *prev;
+ struct lws_dll_lws *next;
+};
+
+#define lws_dll_is_null(___dll) (!(___dll)->prev && !(___dll)->next)
+
+static LWS_INLINE void
+lws_dll_lws_add_front(struct lws_dll_lws *_a, struct lws_dll_lws *_head)
+{
+ lws_dll_add_front((struct lws_dll *)_a, (struct lws_dll *)_head);
+}
+
+static LWS_INLINE void
+lws_dll_lws_remove(struct lws_dll_lws *_a)
+{
+ lws_dll_remove((struct lws_dll *)_a);
+}
+
+/*
+ * these are safe against the current container object getting deleted,
+ * since the hold his next in a temp and go to that next. ___tmp is
+ * the temp.
+ */
+
+#define lws_start_foreach_dll_safe(___type, ___it, ___tmp, ___start) \
+{ \
+ ___type ___it = ___start; \
+ while (___it) { \
+ ___type ___tmp = (___it)->next;
+
+#define lws_end_foreach_dll_safe(___it, ___tmp) \
+ ___it = ___tmp; \
+ } \
+}
+
+#define lws_start_foreach_dll(___type, ___it, ___start) \
+{ \
+ ___type ___it = ___start; \
+ while (___it) {
+
+#define lws_end_foreach_dll(___it) \
+ ___it = (___it)->next; \
+ } \
+}
+
+struct lws_buflist;
+
+/**
+ * lws_buflist_append_segment(): add buffer to buflist at head
+ *
+ * \param head: list head
+ * \param buf: buffer to stash
+ * \param len: length of buffer to stash
+ *
+ * Returns -1 on OOM, 1 if this was the first segment on the list, and 0 if
+ * it was a subsequent segment.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_buflist_append_segment(struct lws_buflist **head, const uint8_t *buf,
+ size_t len);
+/**
+ * lws_buflist_next_segment_len(): number of bytes left in current segment
+ *
+ * \param head: list head
+ * \param buf: if non-NULL, *buf is written with the address of the start of
+ * the remaining data in the segment
+ *
+ * Returns the number of bytes left in the current segment. 0 indicates
+ * that the buflist is empty (there are no segments on the buflist).
+ */
+LWS_VISIBLE LWS_EXTERN size_t
+lws_buflist_next_segment_len(struct lws_buflist **head, uint8_t **buf);
+/**
+ * lws_buflist_use_segment(): remove len bytes from the current segment
+ *
+ * \param head: list head
+ * \param len: number of bytes to mark as used
+ *
+ * If len is less than the remaining length of the current segment, the position
+ * in the current segment is simply advanced and it returns.
+ *
+ * If len uses up the remaining length of the current segment, then the segment
+ * is deleted and the list head moves to the next segment if any.
+ *
+ * Returns the number of bytes left in the current segment. 0 indicates
+ * that the buflist is empty (there are no segments on the buflist).
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_buflist_use_segment(struct lws_buflist **head, size_t len);
+/**
+ * lws_buflist_destroy_all_segments(): free all segments on the list
+ *
+ * \param head: list head
+ *
+ * This frees everything on the list unconditionally. *head is always
+ * NULL after this.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_buflist_destroy_all_segments(struct lws_buflist **head);
+
+void
+lws_buflist_describe(struct lws_buflist **head, void *id);
+
+/**
+ * lws_ptr_diff(): helper to report distance between pointers as an int
+ *
+ * \param head: the pointer with the larger address
+ * \param tail: the pointer with the smaller address
+ *
+ * This helper gives you an int representing the number of bytes further
+ * forward the first pointer is compared to the second pointer.
+ */
+#define lws_ptr_diff(head, tail) \
+ ((int)((char *)(head) - (char *)(tail)))
+
+/**
+ * lws_snprintf(): snprintf that truncates the returned length too
+ *
+ * \param str: destination buffer
+ * \param size: bytes left in destination buffer
+ * \param format: format string
+ * \param ...: args for format
+ *
+ * This lets you correctly truncate buffers by concatenating lengths, if you
+ * reach the limit the reported length doesn't exceed the limit.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_snprintf(char *str, size_t size, const char *format, ...) LWS_FORMAT(3);
+
+/**
+ * lws_strncpy(): strncpy that guarantees NUL on truncated copy
+ *
+ * \param dest: destination buffer
+ * \param src: source buffer
+ * \param size: bytes left in destination buffer
+ *
+ * This lets you correctly truncate buffers by concatenating lengths, if you
+ * reach the limit the reported length doesn't exceed the limit.
+ */
+LWS_VISIBLE LWS_EXTERN char *
+lws_strncpy(char *dest, const char *src, size_t size);
+
+/**
+ * lws_get_random(): fill a buffer with platform random data
+ *
+ * \param context: the lws context
+ * \param buf: buffer to fill
+ * \param len: how much to fill
+ *
+ * This is intended to be called from the LWS_CALLBACK_RECEIVE callback if
+ * it's interested to see if the frame it's dealing with was sent in binary
+ * mode.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_get_random(struct lws_context *context, void *buf, int len);
+/**
+ * lws_daemonize(): make current process run in the background
+ *
+ * \param _lock_path: the filepath to write the lock file
+ *
+ * Spawn lws as a background process, taking care of various things
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_daemonize(const char *_lock_path);
+/**
+ * lws_get_library_version(): return string describing the version of lws
+ *
+ * On unix, also includes the git describe
+ */
+LWS_VISIBLE LWS_EXTERN const char * LWS_WARN_UNUSED_RESULT
+lws_get_library_version(void);
+
+/**
+ * lws_wsi_user() - get the user data associated with the connection
+ * \param wsi: lws connection
+ *
+ * Not normally needed since it's passed into the callback
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lws_wsi_user(struct lws *wsi);
+
+/**
+ * lws_wsi_set_user() - set the user data associated with the client connection
+ * \param wsi: lws connection
+ * \param user: user data
+ *
+ * By default lws allocates this and it's not legal to externally set it
+ * yourself. However client connections may have it set externally when the
+ * connection is created... if so, this api can be used to modify it at
+ * runtime additionally.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_set_wsi_user(struct lws *wsi, void *user);
+
+/**
+ * lws_parse_uri: cut up prot:/ads:port/path into pieces
+ * Notice it does so by dropping '\0' into input string
+ * and the leading / on the path is consequently lost
+ *
+ * \param p: incoming uri string.. will get written to
+ * \param prot: result pointer for protocol part (https://)
+ * \param ads: result pointer for address part
+ * \param port: result pointer for port part
+ * \param path: result pointer for path part
+ *
+ * You may also refer to unix socket addresses, using a '+' at the start of
+ * the address. In this case, the address should end with ':', which is
+ * treated as the separator between the address and path (the normal separator
+ * '/' is a valid part of the socket path). Eg,
+ *
+ * http://+/var/run/mysocket:/my/path
+ *
+ * If the first character after the + is '@', it's interpreted by lws client
+ * processing as meaning to use linux abstract namespace sockets, the @ is
+ * replaced with a '\0' before use.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_parse_uri(char *p, const char **prot, const char **ads, int *port,
+ const char **path);
+/**
+ * lws_cmdline_option(): simple commandline parser
+ *
+ * \param argc: count of argument strings
+ * \param argv: argument strings
+ * \param val: string to find
+ *
+ * Returns NULL if the string \p val is not found in the arguments.
+ *
+ * If it is found, then it returns a pointer to the next character after \p val.
+ * So if \p val is "-d", then for the commandlines "myapp -d15" and
+ * "myapp -d 15", in both cases the return will point to the "15".
+ *
+ * In the case there is no argument, like "myapp -d", the return will
+ * either point to the '\\0' at the end of -d, or to the start of the
+ * next argument, ie, will be non-NULL.
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_cmdline_option(int argc, const char **argv, const char *val);
+
+/**
+ * lws_now_secs(): return seconds since 1970-1-1
+ */
+LWS_VISIBLE LWS_EXTERN unsigned long
+lws_now_secs(void);
+
+/**
+ * lws_now_usecs(): return useconds since 1970-1-1
+ */
+LWS_VISIBLE LWS_EXTERN lws_usec_t
+lws_now_usecs(void);
+
+/**
+ * lws_compare_time_t(): return relationship between two time_t
+ *
+ * \param context: struct lws_context
+ * \param t1: time_t 1
+ * \param t2: time_t 2
+ *
+ * returns <0 if t2 > t1; >0 if t1 > t2; or == 0 if t1 == t2.
+ *
+ * This is aware of clock discontiguities that may have affected either t1 or
+ * t2 and adapts the comparison for them.
+ *
+ * For the discontiguity detection to work, you must avoid any arithmetic on
+ * the times being compared. For example to have a timeout that triggers
+ * 15s from when it was set, store the time it was set and compare like
+ * `if (lws_compare_time_t(context, now, set_time) > 15)`
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_compare_time_t(struct lws_context *context, time_t t1, time_t t2);
+
+/**
+ * lws_get_context - Allow getting lws_context from a Websocket connection
+ * instance
+ *
+ * With this function, users can access context in the callback function.
+ * Otherwise users may have to declare context as a global variable.
+ *
+ * \param wsi: Websocket connection instance
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_context * LWS_WARN_UNUSED_RESULT
+lws_get_context(const struct lws *wsi);
+
+/**
+ * lws_get_vhost_listen_port - Find out the port number a vhost is listening on
+ *
+ * In the case you passed 0 for the port number at context creation time, you
+ * can discover the port number that was actually chosen for the vhost using
+ * this api.
+ *
+ * \param vhost: Vhost to get listen port from
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_get_vhost_listen_port(struct lws_vhost *vhost);
+
+/**
+ * lws_get_count_threads(): how many service threads the context uses
+ *
+ * \param context: the lws context
+ *
+ * By default this is always 1, if you asked for more than lws can handle it
+ * will clip the number of threads. So you can use this to find out how many
+ * threads are actually in use.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_get_count_threads(struct lws_context *context);
+
+/**
+ * lws_get_parent() - get parent wsi or NULL
+ * \param wsi: lws connection
+ *
+ * Specialized wsi like cgi stdin/out/err are associated to a parent wsi,
+ * this allows you to get their parent.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws * LWS_WARN_UNUSED_RESULT
+lws_get_parent(const struct lws *wsi);
+
+/**
+ * lws_get_child() - get child wsi or NULL
+ * \param wsi: lws connection
+ *
+ * Allows you to find a related wsi from the parent wsi.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws * LWS_WARN_UNUSED_RESULT
+lws_get_child(const struct lws *wsi);
+
+/**
+ * lws_get_effective_uid_gid() - find out eventual uid and gid while still root
+ *
+ * \param context: lws context
+ * \param uid: pointer to uid result
+ * \param gid: pointer to gid result
+ *
+ * This helper allows you to find out what the uid and gid for the process will
+ * be set to after the privileges are dropped, beforehand. So while still root,
+ * eg in LWS_CALLBACK_PROTOCOL_INIT, you can arrange things like cache dir
+ * and subdir creation / permissions down /var/cache dynamically.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_get_effective_uid_gid(struct lws_context *context, int *uid, int *gid);
+
+/**
+ * lws_get_udp() - get wsi's udp struct
+ *
+ * \param wsi: lws connection
+ *
+ * Returns NULL or pointer to the wsi's UDP-specific information
+ */
+LWS_VISIBLE LWS_EXTERN const struct lws_udp * LWS_WARN_UNUSED_RESULT
+lws_get_udp(const struct lws *wsi);
+
+LWS_VISIBLE LWS_EXTERN void *
+lws_get_opaque_parent_data(const struct lws *wsi);
+
+LWS_VISIBLE LWS_EXTERN void
+lws_set_opaque_parent_data(struct lws *wsi, void *data);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_get_child_pending_on_writable(const struct lws *wsi);
+
+LWS_VISIBLE LWS_EXTERN void
+lws_clear_child_pending_on_writable(struct lws *wsi);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_get_close_length(struct lws *wsi);
+
+LWS_VISIBLE LWS_EXTERN unsigned char *
+lws_get_close_payload(struct lws *wsi);
+
+/**
+ * lws_get_network_wsi() - Returns wsi that has the tcp connection for this wsi
+ *
+ * \param wsi: wsi you have
+ *
+ * Returns wsi that has the tcp connection (which may be the incoming wsi)
+ *
+ * HTTP/1 connections will always return the incoming wsi
+ * HTTP/2 connections may return a different wsi that has the tcp connection
+ */
+LWS_VISIBLE LWS_EXTERN
+struct lws *lws_get_network_wsi(struct lws *wsi);
+
+/**
+ * lws_set_allocator() - custom allocator support
+ *
+ * \param realloc
+ *
+ * Allows you to replace the allocator (and deallocator) used by lws
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_set_allocator(void *(*realloc)(void *ptr, size_t size, const char *reason));
+
+enum {
+ /*
+ * Flags for enable and disable rxflow with reason bitmap and with
+ * backwards-compatible single bool
+ */
+ LWS_RXFLOW_REASON_USER_BOOL = (1 << 0),
+ LWS_RXFLOW_REASON_HTTP_RXBUFFER = (1 << 6),
+ LWS_RXFLOW_REASON_H2_PPS_PENDING = (1 << 7),
+
+ LWS_RXFLOW_REASON_APPLIES = (1 << 14),
+ LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT = (1 << 13),
+ LWS_RXFLOW_REASON_APPLIES_ENABLE = LWS_RXFLOW_REASON_APPLIES |
+ LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT,
+ LWS_RXFLOW_REASON_APPLIES_DISABLE = LWS_RXFLOW_REASON_APPLIES,
+ LWS_RXFLOW_REASON_FLAG_PROCESS_NOW = (1 << 12),
+
+};
+
+/**
+ * lws_rx_flow_control() - Enable and disable socket servicing for
+ * received packets.
+ *
+ * If the output side of a server process becomes choked, this allows flow
+ * control for the input side.
+ *
+ * \param wsi: Websocket connection instance to get callback for
+ * \param enable: 0 = disable read servicing for this connection, 1 = enable
+ *
+ * If you need more than one additive reason for rxflow control, you can give
+ * iLWS_RXFLOW_REASON_APPLIES_ENABLE or _DISABLE together with one or more of
+ * b5..b0 set to idicate which bits to enable or disable. If any bits are
+ * enabled, rx on the connection is suppressed.
+ *
+ * LWS_RXFLOW_REASON_FLAG_PROCESS_NOW flag may also be given to force any change
+ * in rxflowbstatus to benapplied immediately, this should be used when you are
+ * changing a wsi flow control state from outside a callback on that wsi.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_rx_flow_control(struct lws *wsi, int enable);
+
+/**
+ * lws_rx_flow_allow_all_protocol() - Allow all connections with this protocol to receive
+ *
+ * When the user server code realizes it can accept more input, it can
+ * call this to have the RX flow restriction removed from all connections using
+ * the given protocol.
+ * \param context: lws_context
+ * \param protocol: all connections using this protocol will be allowed to receive
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_rx_flow_allow_all_protocol(const struct lws_context *context,
+ const struct lws_protocols *protocol);
+
+/**
+ * lws_remaining_packet_payload() - Bytes to come before "overall"
+ * rx fragment is complete
+ * \param wsi: Websocket instance (available from user callback)
+ *
+ * This tracks how many bytes are left in the current ws fragment, according
+ * to the ws length given in the fragment header.
+ *
+ * If the message was in a single fragment, and there is no compression, this
+ * is the same as "how much data is left to read for this message".
+ *
+ * However, if the message is being sent in multiple fragments, this will
+ * reflect the unread amount of the current **fragment**, not the message. With
+ * ws, it is legal to not know the length of the message before it completes.
+ *
+ * Additionally if the message is sent via the negotiated permessage-deflate
+ * extension, this number only tells the amount of **compressed** data left to
+ * be read, since that is the only information available at the ws layer.
+ */
+LWS_VISIBLE LWS_EXTERN size_t
+lws_remaining_packet_payload(struct lws *wsi);
+
+
+
+/**
+ * lws_is_ssl() - Find out if connection is using SSL
+ * \param wsi: websocket connection to check
+ *
+ * Returns 0 if the connection is not using SSL, 1 if using SSL and
+ * using verified cert, and 2 if using SSL but the cert was not
+ * checked (appears for client wsi told to skip check on connection)
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_is_ssl(struct lws *wsi);
+/**
+ * lws_is_cgi() - find out if this wsi is running a cgi process
+ * \param wsi: lws connection
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_is_cgi(struct lws *wsi);
+
+/**
+ * lws_open() - platform-specific wrapper for open that prepares the fd
+ *
+ * \param file: the filepath to open
+ * \param oflag: option flags
+ * \param mode: optional mode of any created file
+ *
+ * This is a wrapper around platform open() that sets options on the fd
+ * according to lws policy. Currently that is FD_CLOEXEC to stop the opened
+ * fd being available to any child process forked by user code.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_open(const char *__file, int __oflag, ...);
+
+struct lws_wifi_scan { /* generic wlan scan item */
+ struct lws_wifi_scan *next;
+ char ssid[32];
+ int32_t rssi; /* divide by .count to get db */
+ uint8_t bssid[6];
+ uint8_t count;
+ uint8_t channel;
+ uint8_t authmode;
+};
+
+#if defined(LWS_WITH_TLS) && !defined(LWS_WITH_MBEDTLS)
+/**
+ * lws_get_ssl() - Return wsi's SSL context structure
+ * \param wsi: websocket connection
+ *
+ * Returns pointer to the SSL library's context structure
+ */
+LWS_VISIBLE LWS_EXTERN SSL*
+lws_get_ssl(struct lws *wsi);
+#endif
+
+/** \defgroup smtp SMTP related functions
+ * ##SMTP related functions
+ * \ingroup lwsapi
+ *
+ * These apis let you communicate with a local SMTP server to send email from
+ * lws. It handles all the SMTP sequencing and protocol actions.
+ *
+ * Your system should have postfix, sendmail or another MTA listening on port
+ * 25 and able to send email using the "mail" commandline app. Usually distro
+ * MTAs are configured for this by default.
+ *
+ * It runs via its own libuv events if initialized (which requires giving it
+ * a libuv loop to attach to).
+ *
+ * It operates using three callbacks, on_next() queries if there is a new email
+ * to send, on_get_body() asks for the body of the email, and on_sent() is
+ * called after the email is successfully sent.
+ *
+ * To use it
+ *
+ * - create an lws_email struct
+ *
+ * - initialize data, loop, the email_* strings, max_content_size and
+ * the callbacks
+ *
+ * - call lws_email_init()
+ *
+ * When you have at least one email to send, call lws_email_check() to
+ * schedule starting to send it.
+ */
+//@{
+#ifdef LWS_WITH_SMTP
+
+/** enum lwsgs_smtp_states - where we are in SMTP protocol sequence */
+enum lwsgs_smtp_states {
+ LGSSMTP_IDLE, /**< awaiting new email */
+ LGSSMTP_CONNECTING, /**< opening tcp connection to MTA */
+ LGSSMTP_CONNECTED, /**< tcp connection to MTA is connected */
+ LGSSMTP_SENT_HELO, /**< sent the HELO */
+ LGSSMTP_SENT_FROM, /**< sent FROM */
+ LGSSMTP_SENT_TO, /**< sent TO */
+ LGSSMTP_SENT_DATA, /**< sent DATA request */
+ LGSSMTP_SENT_BODY, /**< sent the email body */
+ LGSSMTP_SENT_QUIT, /**< sent the session quit */
+};
+
+/** struct lws_email - abstract context for performing SMTP operations */
+struct lws_email {
+ void *data;
+ /**< opaque pointer set by user code and available to the callbacks */
+ uv_loop_t *loop;
+ /**< the libuv loop we will work on */
+
+ char email_smtp_ip[32]; /**< Fill before init, eg, "127.0.0.1" */
+ char email_helo[32]; /**< Fill before init, eg, "myserver.com" */
+ char email_from[100]; /**< Fill before init or on_next */
+ char email_to[100]; /**< Fill before init or on_next */
+
+ unsigned int max_content_size;
+ /**< largest possible email body size */
+
+ /* Fill all the callbacks before init */
+
+ int (*on_next)(struct lws_email *email);
+ /**< (Fill in before calling lws_email_init)
+ * called when idle, 0 = another email to send, nonzero is idle.
+ * If you return 0, all of the email_* char arrays must be set
+ * to something useful. */
+ int (*on_sent)(struct lws_email *email);
+ /**< (Fill in before calling lws_email_init)
+ * called when transfer of the email to the SMTP server was
+ * successful, your callback would remove the current email
+ * from its queue */
+ int (*on_get_body)(struct lws_email *email, char *buf, int len);
+ /**< (Fill in before calling lws_email_init)
+ * called when the body part of the queued email is about to be
+ * sent to the SMTP server. */
+
+
+ /* private things */
+ uv_timer_t timeout_email; /**< private */
+ enum lwsgs_smtp_states estate; /**< private */
+ uv_connect_t email_connect_req; /**< private */
+ uv_tcp_t email_client; /**< private */
+ time_t email_connect_started; /**< private */
+ char email_buf[256]; /**< private */
+ char *content; /**< private */
+};
+
+/**
+ * lws_email_init() - Initialize a struct lws_email
+ *
+ * \param email: struct lws_email to init
+ * \param loop: libuv loop to use
+ * \param max_content: max email content size
+ *
+ * Prepares a struct lws_email for use ending SMTP
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_email_init(struct lws_email *email, uv_loop_t *loop, int max_content);
+
+/**
+ * lws_email_check() - Request check for new email
+ *
+ * \param email: struct lws_email context to check
+ *
+ * Schedules a check for new emails in 1s... call this when you have queued an
+ * email for send.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_email_check(struct lws_email *email);
+/**
+ * lws_email_destroy() - stop using the struct lws_email
+ *
+ * \param email: the struct lws_email context
+ *
+ * Stop sending email using email and free allocations
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_email_destroy(struct lws_email *email);
+
+#endif
+//@}
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-network-helper.h b/thirdparty/libwebsockets/include/libwebsockets/lws-network-helper.h
new file mode 100644
index 0000000000..94ee8d9a5d
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-network-helper.h
@@ -0,0 +1,105 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup net Network related helper APIs
+ * ##Network related helper APIs
+ *
+ * These wrap miscellaneous useful network-related functions
+ */
+///@{
+
+/**
+ * lws_canonical_hostname() - returns this host's hostname
+ *
+ * This is typically used by client code to fill in the host parameter
+ * when making a client connection. You can only call it after the context
+ * has been created.
+ *
+ * \param context: Websocket context
+ */
+LWS_VISIBLE LWS_EXTERN const char * LWS_WARN_UNUSED_RESULT
+lws_canonical_hostname(struct lws_context *context);
+
+/**
+ * lws_get_peer_addresses() - Get client address information
+ * \param wsi: Local struct lws associated with
+ * \param fd: Connection socket descriptor
+ * \param name: Buffer to take client address name
+ * \param name_len: Length of client address name buffer
+ * \param rip: Buffer to take client address IP dotted quad
+ * \param rip_len: Length of client address IP buffer
+ *
+ * This function fills in name and rip with the name and IP of
+ * the client connected with socket descriptor fd. Names may be
+ * truncated if there is not enough room. If either cannot be
+ * determined, they will be returned as valid zero-length strings.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_get_peer_addresses(struct lws *wsi, lws_sockfd_type fd, char *name,
+ int name_len, char *rip, int rip_len);
+
+/**
+ * lws_get_peer_simple() - Get client address information without RDNS
+ *
+ * \param wsi: Local struct lws associated with
+ * \param name: Buffer to take client address name
+ * \param namelen: Length of client address name buffer
+ *
+ * This provides a 123.123.123.123 type IP address in name from the
+ * peer that has connected to wsi
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_get_peer_simple(struct lws *wsi, char *name, int namelen);
+
+#define LWS_ITOSA_USABLE 0
+#define LWS_ITOSA_NOT_EXIST -1
+#define LWS_ITOSA_NOT_USABLE -2
+#define LWS_ITOSA_BUSY -3 /* only returned by lws_socket_bind() on
+ EADDRINUSE */
+
+#if !defined(LWS_WITH_ESP32)
+/**
+ * lws_interface_to_sa() - Convert interface name or IP to sockaddr struct
+ *
+ * \param ipv6: Allow IPV6 addresses
+ * \param ifname: Interface name or IP
+ * \param addr: struct sockaddr_in * to be written
+ * \param addrlen: Length of addr
+ *
+ * This converts a textual network interface name to a sockaddr usable by
+ * other network functions.
+ *
+ * If the network interface doesn't exist, it will return LWS_ITOSA_NOT_EXIST.
+ *
+ * If the network interface is not usable, eg ethernet cable is removed, it
+ * may logically exist but not have any IP address. As such it will return
+ * LWS_ITOSA_NOT_USABLE.
+ *
+ * If the network interface exists and is usable, it will return
+ * LWS_ITOSA_USABLE.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_interface_to_sa(int ipv6, const char *ifname, struct sockaddr_in *addr,
+ size_t addrlen);
+#endif
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-plugin-generic-sessions.h b/thirdparty/libwebsockets/include/libwebsockets/lws-plugin-generic-sessions.h
new file mode 100644
index 0000000000..7f46f854ec
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-plugin-generic-sessions.h
@@ -0,0 +1,74 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup generic-sessions plugin: generic-sessions
+ * \ingroup Protocols-and-Plugins
+ *
+ * ##Plugin Generic-sessions related
+ *
+ * generic-sessions plugin provides a reusable, generic session and login /
+ * register / forgot password framework including email verification.
+ */
+///@{
+
+#define LWSGS_EMAIL_CONTENT_SIZE 16384
+/**< Maximum size of email we might send */
+
+/* SHA-1 binary and hexified versions */
+/** typedef struct lwsgw_hash_bin */
+typedef struct { unsigned char bin[20]; /**< binary representation of hash */} lwsgw_hash_bin;
+/** typedef struct lwsgw_hash */
+typedef struct { char id[41]; /**< ascii hex representation of hash */ } lwsgw_hash;
+
+/** enum lwsgs_auth_bits */
+enum lwsgs_auth_bits {
+ LWSGS_AUTH_LOGGED_IN = 1, /**< user is logged in as somebody */
+ LWSGS_AUTH_ADMIN = 2, /**< logged in as the admin user */
+ LWSGS_AUTH_VERIFIED = 4, /**< user has verified his email */
+ LWSGS_AUTH_FORGOT_FLOW = 8, /**< just completed "forgot password" */
+};
+
+/** struct lws_session_info - information about user session status */
+struct lws_session_info {
+ char username[32]; /**< username logged in as, or empty string */
+ char email[100]; /**< email address associated with login, or empty string */
+ char ip[72]; /**< ip address session was started from */
+ unsigned int mask; /**< access rights mask associated with session
+ * see enum lwsgs_auth_bits */
+ char session[42]; /**< session id string, usable as opaque uid when not logged in */
+};
+
+/** enum lws_gs_event */
+enum lws_gs_event {
+ LWSGSE_CREATED, /**< a new user was created */
+ LWSGSE_DELETED /**< an existing user was deleted */
+};
+
+/** struct lws_gs_event_args */
+struct lws_gs_event_args {
+ enum lws_gs_event event; /**< which event happened */
+ const char *username; /**< which username the event happened to */
+ const char *email; /**< the email address of that user */
+};
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-protocols-plugins.h b/thirdparty/libwebsockets/include/libwebsockets/lws-protocols-plugins.h
new file mode 100644
index 0000000000..b6cc44e27f
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-protocols-plugins.h
@@ -0,0 +1,229 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup Protocols-and-Plugins Protocols and Plugins
+ * \ingroup lwsapi
+ *
+ * ##Protocol and protocol plugin -related apis
+ *
+ * Protocols bind ws protocol names to a custom callback specific to that
+ * protocol implementaion.
+ *
+ * A list of protocols can be passed in at context creation time, but it is
+ * also legal to leave that NULL and add the protocols and their callback code
+ * using plugins.
+ *
+ * Plugins are much preferable compared to cut and pasting code into an
+ * application each time, since they can be used standalone.
+ */
+///@{
+/** struct lws_protocols - List of protocols and handlers client or server
+ * supports. */
+
+struct lws_protocols {
+ const char *name;
+ /**< Protocol name that must match the one given in the client
+ * Javascript new WebSocket(url, 'protocol') name. */
+ lws_callback_function *callback;
+ /**< The service callback used for this protocol. It allows the
+ * service action for an entire protocol to be encapsulated in
+ * the protocol-specific callback */
+ size_t per_session_data_size;
+ /**< Each new connection using this protocol gets
+ * this much memory allocated on connection establishment and
+ * freed on connection takedown. A pointer to this per-connection
+ * allocation is passed into the callback in the 'user' parameter */
+ size_t rx_buffer_size;
+ /**< lws allocates this much space for rx data and informs callback
+ * when something came. Due to rx flow control, the callback may not
+ * be able to consume it all without having to return to the event
+ * loop. That is supported in lws.
+ *
+ * If .tx_packet_size is 0, this also controls how much may be sent at
+ * once for backwards compatibility.
+ */
+ unsigned int id;
+ /**< ignored by lws, but useful to contain user information bound
+ * to the selected protocol. For example if this protocol was
+ * called "myprotocol-v2", you might set id to 2, and the user
+ * code that acts differently according to the version can do so by
+ * switch (wsi->protocol->id), user code might use some bits as
+ * capability flags based on selected protocol version, etc. */
+ void *user; /**< ignored by lws, but user code can pass a pointer
+ here it can later access from the protocol callback */
+ size_t tx_packet_size;
+ /**< 0 indicates restrict send() size to .rx_buffer_size for backwards-
+ * compatibility.
+ * If greater than zero, a single send() is restricted to this amount
+ * and any remainder is buffered by lws and sent afterwards also in
+ * these size chunks. Since that is expensive, it's preferable
+ * to restrict one fragment you are trying to send to match this
+ * size.
+ */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility */
+};
+
+/**
+ * lws_vhost_name_to_protocol() - get vhost's protocol object from its name
+ *
+ * \param vh: vhost to search
+ * \param name: protocol name
+ *
+ * Returns NULL or a pointer to the vhost's protocol of the requested name
+ */
+LWS_VISIBLE LWS_EXTERN const struct lws_protocols *
+lws_vhost_name_to_protocol(struct lws_vhost *vh, const char *name);
+
+/**
+ * lws_get_protocol() - Returns a protocol pointer from a websocket
+ * connection.
+ * \param wsi: pointer to struct websocket you want to know the protocol of
+ *
+ *
+ * Some apis can act on all live connections of a given protocol,
+ * this is how you can get a pointer to the active protocol if needed.
+ */
+LWS_VISIBLE LWS_EXTERN const struct lws_protocols *
+lws_get_protocol(struct lws *wsi);
+
+/** lws_protocol_get() - deprecated: use lws_get_protocol */
+LWS_VISIBLE LWS_EXTERN const struct lws_protocols *
+lws_protocol_get(struct lws *wsi) LWS_WARN_DEPRECATED;
+
+/**
+ * lws_protocol_vh_priv_zalloc() - Allocate and zero down a protocol's per-vhost
+ * storage
+ * \param vhost: vhost the instance is related to
+ * \param prot: protocol the instance is related to
+ * \param size: bytes to allocate
+ *
+ * Protocols often find it useful to allocate a per-vhost struct, this is a
+ * helper to be called in the per-vhost init LWS_CALLBACK_PROTOCOL_INIT
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lws_protocol_vh_priv_zalloc(struct lws_vhost *vhost,
+ const struct lws_protocols *prot, int size);
+
+/**
+ * lws_protocol_vh_priv_get() - retreive a protocol's per-vhost storage
+ *
+ * \param vhost: vhost the instance is related to
+ * \param prot: protocol the instance is related to
+ *
+ * Recover a pointer to the allocated per-vhost storage for the protocol created
+ * by lws_protocol_vh_priv_zalloc() earlier
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lws_protocol_vh_priv_get(struct lws_vhost *vhost,
+ const struct lws_protocols *prot);
+
+/**
+ * lws_adjust_protocol_psds - change a vhost protocol's per session data size
+ *
+ * \param wsi: a connection with the protocol to change
+ * \param new_size: the new size of the per session data size for the protocol
+ *
+ * Returns user_space for the wsi, after allocating
+ *
+ * This should not be used except to initalize a vhost protocol's per session
+ * data size one time, before any connections are accepted.
+ *
+ * Sometimes the protocol wraps another protocol and needs to discover and set
+ * its per session data size at runtime.
+ */
+LWS_VISIBLE LWS_EXTERN void *
+lws_adjust_protocol_psds(struct lws *wsi, size_t new_size);
+
+/**
+ * lws_finalize_startup() - drop initial process privileges
+ *
+ * \param context: lws context
+ *
+ * This is called after the end of the vhost protocol initializations, but
+ * you may choose to call it earlier
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_finalize_startup(struct lws_context *context);
+
+/**
+ * lws_pvo_search() - helper to find a named pvo in a linked-list
+ *
+ * \param pvo: the first pvo in the linked-list
+ * \param name: the name of the pvo to return if found
+ *
+ * Returns NULL, or a pointer to the name pvo in the linked-list
+ */
+LWS_VISIBLE LWS_EXTERN const struct lws_protocol_vhost_options *
+lws_pvo_search(const struct lws_protocol_vhost_options *pvo, const char *name);
+
+/**
+ * lws_pvo_get_str() - retreive a string pvo value
+ *
+ * \param pvo: the first pvo in the linked-list
+ * \param name: the name of the pvo to return if found
+ * \param result: pointer to a const char * to get the result if any
+ *
+ * Returns 0 if found and *result set, or nonzero if not found
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_pvo_get_str(void *in, const char *name, const char **result);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_protocol_init(struct lws_context *context);
+
+#ifdef LWS_WITH_PLUGINS
+
+/* PLUGINS implies LIBUV */
+
+#define LWS_PLUGIN_API_MAGIC 180
+
+/** struct lws_plugin_capability - how a plugin introduces itself to lws */
+struct lws_plugin_capability {
+ unsigned int api_magic; /**< caller fills this in, plugin fills rest */
+ const struct lws_protocols *protocols; /**< array of supported protocols provided by plugin */
+ int count_protocols; /**< how many protocols */
+ const struct lws_extension *extensions; /**< array of extensions provided by plugin */
+ int count_extensions; /**< how many extensions */
+};
+
+typedef int (*lws_plugin_init_func)(struct lws_context *,
+ struct lws_plugin_capability *);
+typedef int (*lws_plugin_destroy_func)(struct lws_context *);
+
+/** struct lws_plugin */
+struct lws_plugin {
+ struct lws_plugin *list; /**< linked list */
+#if (UV_VERSION_MAJOR > 0)
+ uv_lib_t lib; /**< shared library pointer */
+#else
+ void *l; /**< so we can compile on ancient libuv */
+#endif
+ char name[64]; /**< name of the plugin */
+ struct lws_plugin_capability caps; /**< plugin capabilities */
+};
+
+#endif
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-purify.h b/thirdparty/libwebsockets/include/libwebsockets/lws-purify.h
new file mode 100644
index 0000000000..0ae35ce33c
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-purify.h
@@ -0,0 +1,81 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+
+/*! \defgroup pur Sanitize / purify SQL and JSON helpers
+ *
+ * ##Sanitize / purify SQL and JSON helpers
+ *
+ * APIs for escaping untrusted JSON and SQL safely before use
+ */
+//@{
+
+/**
+ * lws_sql_purify() - like strncpy but with escaping for sql quotes
+ *
+ * \param escaped: output buffer
+ * \param string: input buffer ('/0' terminated)
+ * \param len: output buffer max length
+ *
+ * Because escaping expands the output string, it's not
+ * possible to do it in-place, ie, with escaped == string
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_sql_purify(char *escaped, const char *string, int len);
+
+/**
+ * lws_json_purify() - like strncpy but with escaping for json chars
+ *
+ * \param escaped: output buffer
+ * \param string: input buffer ('/0' terminated)
+ * \param len: output buffer max length
+ *
+ * Because escaping expands the output string, it's not
+ * possible to do it in-place, ie, with escaped == string
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_json_purify(char *escaped, const char *string, int len);
+
+/**
+ * lws_filename_purify_inplace() - replace scary filename chars with underscore
+ *
+ * \param filename: filename to be purified
+ *
+ * Replace scary characters in the filename (it should not be a path)
+ * with underscore, so it's safe to use.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_filename_purify_inplace(char *filename);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_plat_write_cert(struct lws_vhost *vhost, int is_key, int fd, void *buf,
+ int len);
+LWS_VISIBLE LWS_EXTERN int
+lws_plat_write_file(const char *filename, void *buf, int len);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_plat_read_file(const char *filename, void *buf, int len);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_plat_recommended_rsa_bits(void);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-ring.h b/thirdparty/libwebsockets/include/libwebsockets/lws-ring.h
new file mode 100644
index 0000000000..9a5ec2e10b
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-ring.h
@@ -0,0 +1,305 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup lws_ring LWS Ringbuffer APIs
+ * ##lws_ring: generic ringbuffer struct
+ *
+ * Provides an abstract ringbuffer api supporting one head and one or an
+ * unlimited number of tails.
+ *
+ * All of the members are opaque and manipulated by lws_ring_...() apis.
+ *
+ * The lws_ring and its buffer is allocated at runtime on the heap, using
+ *
+ * - lws_ring_create()
+ * - lws_ring_destroy()
+ *
+ * It may contain any type, the size of the "element" stored in the ring
+ * buffer and the number of elements is given at creation time.
+ *
+ * When you create the ringbuffer, you can optionally provide an element
+ * destroy callback that frees any allocations inside the element. This is then
+ * automatically called for elements with no tail behind them, ie, elements
+ * which don't have any pending consumer are auto-freed.
+ *
+ * Whole elements may be inserted into the ringbuffer and removed from it, using
+ *
+ * - lws_ring_insert()
+ * - lws_ring_consume()
+ *
+ * You can find out how many whole elements are free or waiting using
+ *
+ * - lws_ring_get_count_free_elements()
+ * - lws_ring_get_count_waiting_elements()
+ *
+ * In addition there are special purpose optional byte-centric apis
+ *
+ * - lws_ring_next_linear_insert_range()
+ * - lws_ring_bump_head()
+ *
+ * which let you, eg, read() directly into the ringbuffer without needing
+ * an intermediate bounce buffer.
+ *
+ * The accessors understand that the ring wraps, and optimizes insertion and
+ * consumption into one or two memcpy()s depending on if the head or tail
+ * wraps.
+ *
+ * lws_ring only supports a single head, but optionally multiple tails with
+ * an API to inform it when the "oldest" tail has moved on. You can give
+ * NULL where-ever an api asks for a tail pointer, and it will use an internal
+ * single tail pointer for convenience.
+ *
+ * The "oldest tail", which is the only tail if you give it NULL instead of
+ * some other tail, is used to track which elements in the ringbuffer are
+ * still unread by anyone.
+ *
+ * - lws_ring_update_oldest_tail()
+ */
+///@{
+struct lws_ring;
+
+/**
+ * lws_ring_create(): create a new ringbuffer
+ *
+ * \param element_len: the size in bytes of one element in the ringbuffer
+ * \param count: the number of elements the ringbuffer can contain
+ * \param destroy_element: NULL, or callback to be called for each element
+ * that is removed from the ringbuffer due to the
+ * oldest tail moving beyond it
+ *
+ * Creates the ringbuffer and allocates the storage. Returns the new
+ * lws_ring *, or NULL if the allocation failed.
+ *
+ * If non-NULL, destroy_element will get called back for every element that is
+ * retired from the ringbuffer after the oldest tail has gone past it, and for
+ * any element still left in the ringbuffer when it is destroyed. It replaces
+ * all other element destruction code in your user code.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_ring *
+lws_ring_create(size_t element_len, size_t count,
+ void (*destroy_element)(void *element));
+
+/**
+ * lws_ring_destroy(): destroy a previously created ringbuffer
+ *
+ * \param ring: the struct lws_ring to destroy
+ *
+ * Destroys the ringbuffer allocation and the struct lws_ring itself.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_ring_destroy(struct lws_ring *ring);
+
+/**
+ * lws_ring_get_count_free_elements(): return how many elements can fit
+ * in the free space
+ *
+ * \param ring: the struct lws_ring to report on
+ *
+ * Returns how much room is left in the ringbuffer for whole element insertion.
+ */
+LWS_VISIBLE LWS_EXTERN size_t
+lws_ring_get_count_free_elements(struct lws_ring *ring);
+
+/**
+ * lws_ring_get_count_waiting_elements(): return how many elements can be consumed
+ *
+ * \param ring: the struct lws_ring to report on
+ * \param tail: a pointer to the tail struct to use, or NULL for single tail
+ *
+ * Returns how many elements are waiting to be consumed from the perspective
+ * of the tail pointer given.
+ */
+LWS_VISIBLE LWS_EXTERN size_t
+lws_ring_get_count_waiting_elements(struct lws_ring *ring, uint32_t *tail);
+
+/**
+ * lws_ring_insert(): attempt to insert up to max_count elements from src
+ *
+ * \param ring: the struct lws_ring to report on
+ * \param src: the array of elements to be inserted
+ * \param max_count: the number of available elements at src
+ *
+ * Attempts to insert as many of the elements at src as possible, up to the
+ * maximum max_count. Returns the number of elements actually inserted.
+ */
+LWS_VISIBLE LWS_EXTERN size_t
+lws_ring_insert(struct lws_ring *ring, const void *src, size_t max_count);
+
+/**
+ * lws_ring_consume(): attempt to copy out and remove up to max_count elements
+ * to src
+ *
+ * \param ring: the struct lws_ring to report on
+ * \param tail: a pointer to the tail struct to use, or NULL for single tail
+ * \param dest: the array of elements to be inserted. or NULL for no copy
+ * \param max_count: the number of available elements at src
+ *
+ * Attempts to copy out as many waiting elements as possible into dest, from
+ * the perspective of the given tail, up to max_count. If dest is NULL, the
+ * copying out is not done but the elements are logically consumed as usual.
+ * NULL dest is useful in combination with lws_ring_get_element(), where you
+ * can use the element direct from the ringbuffer and then call this with NULL
+ * dest to logically consume it.
+ *
+ * Increments the tail position according to how many elements could be
+ * consumed.
+ *
+ * Returns the number of elements consumed.
+ */
+LWS_VISIBLE LWS_EXTERN size_t
+lws_ring_consume(struct lws_ring *ring, uint32_t *tail, void *dest,
+ size_t max_count);
+
+/**
+ * lws_ring_get_element(): get a pointer to the next waiting element for tail
+ *
+ * \param ring: the struct lws_ring to report on
+ * \param tail: a pointer to the tail struct to use, or NULL for single tail
+ *
+ * Points to the next element that tail would consume, directly in the
+ * ringbuffer. This lets you write() or otherwise use the element without
+ * having to copy it out somewhere first.
+ *
+ * After calling this, you must call lws_ring_consume(ring, &tail, NULL, 1)
+ * which will logically consume the element you used up and increment your
+ * tail (tail may also be NULL there if you use a single tail).
+ *
+ * Returns NULL if no waiting element, or a const void * pointing to it.
+ */
+LWS_VISIBLE LWS_EXTERN const void *
+lws_ring_get_element(struct lws_ring *ring, uint32_t *tail);
+
+/**
+ * lws_ring_update_oldest_tail(): free up elements older than tail for reuse
+ *
+ * \param ring: the struct lws_ring to report on
+ * \param tail: a pointer to the tail struct to use, or NULL for single tail
+ *
+ * If you are using multiple tails, you must use this API to inform the
+ * lws_ring when none of the tails still need elements in the fifo any more,
+ * by updating it when the "oldest" tail has moved on.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_ring_update_oldest_tail(struct lws_ring *ring, uint32_t tail);
+
+/**
+ * lws_ring_get_oldest_tail(): get current oldest available data index
+ *
+ * \param ring: the struct lws_ring to report on
+ *
+ * If you are initializing a new ringbuffer consumer, you can set its tail to
+ * this to start it from the oldest ringbuffer entry still available.
+ */
+LWS_VISIBLE LWS_EXTERN uint32_t
+lws_ring_get_oldest_tail(struct lws_ring *ring);
+
+/**
+ * lws_ring_next_linear_insert_range(): used to write directly into the ring
+ *
+ * \param ring: the struct lws_ring to report on
+ * \param start: pointer to a void * set to the start of the next ringbuffer area
+ * \param bytes: pointer to a size_t set to the max length you may use from *start
+ *
+ * This provides a low-level, bytewise access directly into the ringbuffer
+ * allowing direct insertion of data without having to use a bounce buffer.
+ *
+ * The api reports the position and length of the next linear range that can
+ * be written in the ringbuffer, ie, up to the point it would wrap, and sets
+ * *start and *bytes accordingly. You can then, eg, directly read() into
+ * *start for up to *bytes, and use lws_ring_bump_head() to update the lws_ring
+ * with what you have done.
+ *
+ * Returns nonzero if no insertion is currently possible.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_ring_next_linear_insert_range(struct lws_ring *ring, void **start,
+ size_t *bytes);
+
+/**
+ * lws_ring_bump_head(): used to write directly into the ring
+ *
+ * \param ring: the struct lws_ring to operate on
+ * \param bytes: the number of bytes you inserted at the current head
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_ring_bump_head(struct lws_ring *ring, size_t bytes);
+
+LWS_VISIBLE LWS_EXTERN void
+lws_ring_dump(struct lws_ring *ring, uint32_t *tail);
+
+/*
+ * This is a helper that combines the common pattern of needing to consume
+ * some ringbuffer elements, move the consumer tail on, and check if that
+ * has moved any ringbuffer elements out of scope, because it was the last
+ * consumer that had not already consumed them.
+ *
+ * Elements that go out of scope because the oldest tail is now after them
+ * get garbage-collected by calling the destroy_element callback on them
+ * defined when the ringbuffer was created.
+ */
+
+#define lws_ring_consume_and_update_oldest_tail(\
+ ___ring, /* the lws_ring object */ \
+ ___type, /* type of objects with tails */ \
+ ___ptail, /* ptr to tail of obj with tail doing consuming */ \
+ ___count, /* count of payload objects being consumed */ \
+ ___list_head, /* head of list of objects with tails */ \
+ ___mtail, /* member name of tail in ___type */ \
+ ___mlist /* member name of next list member ptr in ___type */ \
+ ) { \
+ int ___n, ___m; \
+ \
+ ___n = lws_ring_get_oldest_tail(___ring) == *(___ptail); \
+ lws_ring_consume(___ring, ___ptail, NULL, ___count); \
+ if (___n) { \
+ uint32_t ___oldest; \
+ ___n = 0; \
+ ___oldest = *(___ptail); \
+ lws_start_foreach_llp(___type **, ___ppss, ___list_head) { \
+ ___m = lws_ring_get_count_waiting_elements( \
+ ___ring, &(*___ppss)->tail); \
+ if (___m >= ___n) { \
+ ___n = ___m; \
+ ___oldest = (*___ppss)->tail; \
+ } \
+ } lws_end_foreach_llp(___ppss, ___mlist); \
+ \
+ lws_ring_update_oldest_tail(___ring, ___oldest); \
+ } \
+}
+
+/*
+ * This does the same as the lws_ring_consume_and_update_oldest_tail()
+ * helper, but for the simpler case there is only one consumer, so one
+ * tail, and that tail is always the oldest tail.
+ */
+
+#define lws_ring_consume_single_tail(\
+ ___ring, /* the lws_ring object */ \
+ ___ptail, /* ptr to tail of obj with tail doing consuming */ \
+ ___count /* count of payload objects being consumed */ \
+ ) { \
+ lws_ring_consume(___ring, ___ptail, NULL, ___count); \
+ lws_ring_update_oldest_tail(___ring, *(___ptail)); \
+}
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-service.h b/thirdparty/libwebsockets/include/libwebsockets/lws-service.h
new file mode 100644
index 0000000000..f4109f0431
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-service.h
@@ -0,0 +1,215 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup service Built-in service loop entry
+ *
+ * ##Built-in service loop entry
+ *
+ * If you're not using libev / libuv, these apis are needed to enter the poll()
+ * wait in lws and service any connections with pending events.
+ */
+///@{
+
+/**
+ * lws_service() - Service any pending websocket activity
+ * \param context: Websocket context
+ * \param timeout_ms: Timeout for poll; 0 means return immediately if nothing needed
+ * service otherwise block and service immediately, returning
+ * after the timeout if nothing needed service.
+ *
+ * This function deals with any pending websocket traffic, for three
+ * kinds of event. It handles these events on both server and client
+ * types of connection the same.
+ *
+ * 1) Accept new connections to our context's server
+ *
+ * 2) Call the receive callback for incoming frame data received by
+ * server or client connections.
+ *
+ * You need to call this service function periodically to all the above
+ * functions to happen; if your application is single-threaded you can
+ * just call it in your main event loop.
+ *
+ * Alternatively you can fork a new process that asynchronously handles
+ * calling this service in a loop. In that case you are happy if this
+ * call blocks your thread until it needs to take care of something and
+ * would call it with a large nonzero timeout. Your loop then takes no
+ * CPU while there is nothing happening.
+ *
+ * If you are calling it in a single-threaded app, you don't want it to
+ * wait around blocking other things in your loop from happening, so you
+ * would call it with a timeout_ms of 0, so it returns immediately if
+ * nothing is pending, or as soon as it services whatever was pending.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_service(struct lws_context *context, int timeout_ms);
+
+/**
+ * lws_service_tsi() - Service any pending websocket activity
+ *
+ * \param context: Websocket context
+ * \param timeout_ms: Timeout for poll; 0 means return immediately if nothing needed
+ * service otherwise block and service immediately, returning
+ * after the timeout if nothing needed service.
+ * \param tsi: Thread service index, starting at 0
+ *
+ * Same as lws_service(), but for a specific thread service index. Only needed
+ * if you are spawning multiple service threads.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_service_tsi(struct lws_context *context, int timeout_ms, int tsi);
+
+/**
+ * lws_cancel_service_pt() - Cancel servicing of pending socket activity
+ * on one thread
+ * \param wsi: Cancel service on the thread this wsi is serviced by
+ *
+ * Same as lws_cancel_service(), but targets a single service thread, the one
+ * the wsi belongs to. You probably want to use lws_cancel_service() instead.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_cancel_service_pt(struct lws *wsi);
+
+/**
+ * lws_cancel_service() - Cancel wait for new pending socket activity
+ * \param context: Websocket context
+ *
+ * This function creates an immediate "synchronous interrupt" to the lws poll()
+ * wait or event loop. As soon as possible in the serialzed service sequencing,
+ * a LWS_CALLBACK_EVENT_WAIT_CANCELLED callback is sent to every protocol on
+ * every vhost.
+ *
+ * lws_cancel_service() may be called from another thread while the context
+ * exists, and its effect will be immediately serialized.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_cancel_service(struct lws_context *context);
+
+/**
+ * lws_service_fd() - Service polled socket with something waiting
+ * \param context: Websocket context
+ * \param pollfd: The pollfd entry describing the socket fd and which events
+ * happened, or NULL to tell lws to do only timeout servicing.
+ *
+ * This function takes a pollfd that has POLLIN or POLLOUT activity and
+ * services it according to the state of the associated
+ * struct lws.
+ *
+ * The one call deals with all "service" that might happen on a socket
+ * including listen accepts, http files as well as websocket protocol.
+ *
+ * If a pollfd says it has something, you can just pass it to
+ * lws_service_fd() whether it is a socket handled by lws or not.
+ * If it sees it is a lws socket, the traffic will be handled and
+ * pollfd->revents will be zeroed now.
+ *
+ * If the socket is foreign to lws, it leaves revents alone. So you can
+ * see if you should service yourself by checking the pollfd revents
+ * after letting lws try to service it.
+ *
+ * You should also call this with pollfd = NULL to just allow the
+ * once-per-second global timeout checks; if less than a second since the last
+ * check it returns immediately then.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_service_fd(struct lws_context *context, struct lws_pollfd *pollfd);
+
+/**
+ * lws_service_fd_tsi() - Service polled socket in specific service thread
+ * \param context: Websocket context
+ * \param pollfd: The pollfd entry describing the socket fd and which events
+ * happened.
+ * \param tsi: thread service index
+ *
+ * Same as lws_service_fd() but used with multiple service threads
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd,
+ int tsi);
+
+/**
+ * lws_service_adjust_timeout() - Check for any connection needing forced service
+ * \param context: Websocket context
+ * \param timeout_ms: The original poll timeout value. You can just set this
+ * to 1 if you don't really have a poll timeout.
+ * \param tsi: thread service index
+ *
+ * Under some conditions connections may need service even though there is no
+ * pending network action on them, this is "forced service". For default
+ * poll() and libuv / libev, the library takes care of calling this and
+ * dealing with it for you. But for external poll() integration, you need
+ * access to the apis.
+ *
+ * If anybody needs "forced service", returned timeout is zero. In that case,
+ * you can call lws_service_tsi() with a timeout of -1 to only service
+ * guys who need forced service.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_service_adjust_timeout(struct lws_context *context, int timeout_ms, int tsi);
+
+/* Backwards compatibility */
+#define lws_plat_service_tsi lws_service_tsi
+
+LWS_VISIBLE LWS_EXTERN int
+lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd);
+
+///@}
+
+/*! \defgroup uv libuv helpers
+ *
+ * ##libuv helpers
+ *
+ * APIs specific to libuv event loop itegration
+ */
+///@{
+#ifdef LWS_WITH_LIBUV
+/*
+ * Any direct libuv allocations in lws protocol handlers must participate in the
+ * lws reference counting scheme. Two apis are provided:
+ *
+ * - lws_libuv_static_refcount_add(handle, context) to mark the handle with
+ * a pointer to the context and increment the global uv object counter
+ *
+ * - lws_libuv_static_refcount_del() which should be used as the close callback
+ * for your own libuv objects declared in the protocol scope.
+ *
+ * Using the apis allows lws to detach itself from a libuv loop completely
+ * cleanly and at the moment all of its libuv objects have completed close.
+ */
+
+LWS_VISIBLE LWS_EXTERN uv_loop_t *
+lws_uv_getloop(struct lws_context *context, int tsi);
+
+LWS_VISIBLE LWS_EXTERN void
+lws_libuv_static_refcount_add(uv_handle_t *, struct lws_context *context);
+
+LWS_VISIBLE LWS_EXTERN void
+lws_libuv_static_refcount_del(uv_handle_t *);
+
+#endif /* LWS_WITH_LIBUV */
+
+#if defined(LWS_WITH_ESP32)
+#define lws_libuv_static_refcount_add(_a, _b)
+#define lws_libuv_static_refcount_del NULL
+#endif
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-sha1-base64.h b/thirdparty/libwebsockets/include/libwebsockets/lws-sha1-base64.h
new file mode 100644
index 0000000000..5a2bfdbbb0
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-sha1-base64.h
@@ -0,0 +1,93 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup sha SHA and B64 helpers
+ * ##SHA and B64 helpers
+ *
+ * These provide SHA-1 and B64 helper apis
+ */
+///@{
+#ifdef LWS_SHA1_USE_OPENSSL_NAME
+#define lws_SHA1 SHA1
+#else
+/**
+ * lws_SHA1(): make a SHA-1 digest of a buffer
+ *
+ * \param d: incoming buffer
+ * \param n: length of incoming buffer
+ * \param md: buffer for message digest (must be >= 20 bytes)
+ *
+ * Reduces any size buffer into a 20-byte SHA-1 hash.
+ */
+LWS_VISIBLE LWS_EXTERN unsigned char *
+lws_SHA1(const unsigned char *d, size_t n, unsigned char *md);
+#endif
+/**
+ * lws_b64_encode_string(): encode a string into base 64
+ *
+ * \param in: incoming buffer
+ * \param in_len: length of incoming buffer
+ * \param out: result buffer
+ * \param out_size: length of result buffer
+ *
+ * Encodes a string using b64
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_b64_encode_string(const char *in, int in_len, char *out, int out_size);
+/**
+ * lws_b64_encode_string_url(): encode a string into base 64
+ *
+ * \param in: incoming buffer
+ * \param in_len: length of incoming buffer
+ * \param out: result buffer
+ * \param out_size: length of result buffer
+ *
+ * Encodes a string using b64 with the "URL" variant (+ -> -, and / -> _)
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_b64_encode_string_url(const char *in, int in_len, char *out, int out_size);
+/**
+ * lws_b64_decode_string(): decode a string from base 64
+ *
+ * \param in: incoming buffer
+ * \param out: result buffer
+ * \param out_size: length of result buffer
+ *
+ * Decodes a NUL-terminated string using b64
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_b64_decode_string(const char *in, char *out, int out_size);
+/**
+ * lws_b64_decode_string_len(): decode a string from base 64
+ *
+ * \param in: incoming buffer
+ * \param in_len: length of incoming buffer
+ * \param out: result buffer
+ * \param out_size: length of result buffer
+ *
+ * Decodes a range of chars using b64
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_b64_decode_string_len(const char *in, int in_len, char *out, int out_size);
+///@}
+
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-spa.h b/thirdparty/libwebsockets/include/libwebsockets/lws-spa.h
new file mode 100644
index 0000000000..fcaf3889f5
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-spa.h
@@ -0,0 +1,140 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup form-parsing Form Parsing
+ * \ingroup http
+ * ##POSTed form parsing functions
+ *
+ * These lws_spa (stateful post arguments) apis let you parse and urldecode
+ * POSTed form arguments, both using simple urlencoded and multipart transfer
+ * encoding.
+ *
+ * It's capable of handling file uploads as well a named input parsing,
+ * and the apis are the same for both form upload styles.
+ *
+ * You feed it a list of parameter names and it creates pointers to the
+ * urldecoded arguments: file upload parameters pass the file data in chunks to
+ * a user-supplied callback as they come.
+ *
+ * Since it's stateful, it handles the incoming data needing more than one
+ * POST_BODY callback and has no limit on uploaded file size.
+ */
+///@{
+
+/** enum lws_spa_fileupload_states */
+enum lws_spa_fileupload_states {
+ LWS_UFS_CONTENT,
+ /**< a chunk of file content has arrived */
+ LWS_UFS_FINAL_CONTENT,
+ /**< the last chunk (possibly zero length) of file content has arrived */
+ LWS_UFS_OPEN
+ /**< a new file is starting to arrive */
+};
+
+/**
+ * lws_spa_fileupload_cb() - callback to receive file upload data
+ *
+ * \param data: opt_data pointer set in lws_spa_create
+ * \param name: name of the form field being uploaded
+ * \param filename: original filename from client
+ * \param buf: start of data to receive
+ * \param len: length of data to receive
+ * \param state: information about how this call relates to file
+ *
+ * Notice name and filename shouldn't be trusted, as they are passed from
+ * HTTP provided by the client.
+ */
+typedef int (*lws_spa_fileupload_cb)(void *data, const char *name,
+ const char *filename, char *buf, int len,
+ enum lws_spa_fileupload_states state);
+
+/** struct lws_spa - opaque urldecode parser capable of handling multipart
+ * and file uploads */
+struct lws_spa;
+
+/**
+ * lws_spa_create() - create urldecode parser
+ *
+ * \param wsi: lws connection (used to find Content Type)
+ * \param param_names: array of form parameter names, like "username"
+ * \param count_params: count of param_names
+ * \param max_storage: total amount of form parameter values we can store
+ * \param opt_cb: NULL, or callback to receive file upload data.
+ * \param opt_data: NULL, or user pointer provided to opt_cb.
+ *
+ * Creates a urldecode parser and initializes it.
+ *
+ * opt_cb can be NULL if you just want normal name=value parsing, however
+ * if one or more entries in your form are bulk data (file transfer), you
+ * can provide this callback and filter on the name callback parameter to
+ * treat that urldecoded data separately. The callback should return -1
+ * in case of fatal error, and 0 if OK.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_spa *
+lws_spa_create(struct lws *wsi, const char * const *param_names,
+ int count_params, int max_storage, lws_spa_fileupload_cb opt_cb,
+ void *opt_data);
+
+/**
+ * lws_spa_process() - parses a chunk of input data
+ *
+ * \param spa: the parser object previously created
+ * \param in: incoming, urlencoded data
+ * \param len: count of bytes valid at \param in
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_spa_process(struct lws_spa *spa, const char *in, int len);
+
+/**
+ * lws_spa_finalize() - indicate incoming data completed
+ *
+ * \param spa: the parser object previously created
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_spa_finalize(struct lws_spa *spa);
+
+/**
+ * lws_spa_get_length() - return length of parameter value
+ *
+ * \param spa: the parser object previously created
+ * \param n: parameter ordinal to return length of value for
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_spa_get_length(struct lws_spa *spa, int n);
+
+/**
+ * lws_spa_get_string() - return pointer to parameter value
+ * \param spa: the parser object previously created
+ * \param n: parameter ordinal to return pointer to value for
+ */
+LWS_VISIBLE LWS_EXTERN const char *
+lws_spa_get_string(struct lws_spa *spa, int n);
+
+/**
+ * lws_spa_destroy() - destroy parser object
+ *
+ * \param spa: the parser object previously created
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_spa_destroy(struct lws_spa *spa);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-stats.h b/thirdparty/libwebsockets/include/libwebsockets/lws-stats.h
new file mode 100644
index 0000000000..b0031ca3e5
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-stats.h
@@ -0,0 +1,75 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*
+ * Stats are all uint64_t numbers that start at 0.
+ * Index names here have the convention
+ *
+ * _C_ counter
+ * _B_ byte count
+ * _MS_ millisecond count
+ */
+
+enum {
+ LWSSTATS_C_CONNECTIONS, /**< count incoming connections */
+ LWSSTATS_C_API_CLOSE, /**< count calls to close api */
+ LWSSTATS_C_API_READ, /**< count calls to read from socket api */
+ LWSSTATS_C_API_LWS_WRITE, /**< count calls to lws_write API */
+ LWSSTATS_C_API_WRITE, /**< count calls to write API */
+ LWSSTATS_C_WRITE_PARTIALS, /**< count of partial writes */
+ LWSSTATS_C_WRITEABLE_CB_REQ, /**< count of writable callback requests */
+ LWSSTATS_C_WRITEABLE_CB_EFF_REQ, /**< count of effective writable callback requests */
+ LWSSTATS_C_WRITEABLE_CB, /**< count of writable callbacks */
+ LWSSTATS_C_SSL_CONNECTIONS_FAILED, /**< count of failed SSL connections */
+ LWSSTATS_C_SSL_CONNECTIONS_ACCEPTED, /**< count of accepted SSL connections */
+ LWSSTATS_C_SSL_CONNECTIONS_ACCEPT_SPIN, /**< count of SSL_accept() attempts */
+ LWSSTATS_C_SSL_CONNS_HAD_RX, /**< count of accepted SSL conns that have had some RX */
+ LWSSTATS_C_TIMEOUTS, /**< count of timed-out connections */
+ LWSSTATS_C_SERVICE_ENTRY, /**< count of entries to lws service loop */
+ LWSSTATS_B_READ, /**< aggregate bytes read */
+ LWSSTATS_B_WRITE, /**< aggregate bytes written */
+ LWSSTATS_B_PARTIALS_ACCEPTED_PARTS, /**< aggreate of size of accepted write data from new partials */
+ LWSSTATS_MS_SSL_CONNECTIONS_ACCEPTED_DELAY, /**< aggregate delay in accepting connection */
+ LWSSTATS_MS_WRITABLE_DELAY, /**< aggregate delay between asking for writable and getting cb */
+ LWSSTATS_MS_WORST_WRITABLE_DELAY, /**< single worst delay between asking for writable and getting cb */
+ LWSSTATS_MS_SSL_RX_DELAY, /**< aggregate delay between ssl accept complete and first RX */
+ LWSSTATS_C_PEER_LIMIT_AH_DENIED, /**< number of times we would have given an ah but for the peer limit */
+ LWSSTATS_C_PEER_LIMIT_WSI_DENIED, /**< number of times we would have given a wsi but for the peer limit */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility */
+ LWSSTATS_SIZE
+};
+
+#if defined(LWS_WITH_STATS)
+
+LWS_VISIBLE LWS_EXTERN uint64_t
+lws_stats_get(struct lws_context *context, int index);
+LWS_VISIBLE LWS_EXTERN void
+lws_stats_log_dump(struct lws_context *context);
+#else
+static LWS_INLINE uint64_t
+lws_stats_get(struct lws_context *context, int index) { (void)context; (void)index; return 0; }
+static LWS_INLINE void
+lws_stats_log_dump(struct lws_context *context) { (void)context; }
+#endif
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-threadpool.h b/thirdparty/libwebsockets/include/libwebsockets/lws-threadpool.h
new file mode 100644
index 0000000000..eb6c6e1a16
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-threadpool.h
@@ -0,0 +1,231 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup threadpool Threadpool related functions
+ * ##Threadpool
+ * \ingroup lwsapi
+ *
+ * This allows you to create one or more pool of threads which can run tasks
+ * associated with a wsi. If the pool is busy, tasks wait on a queue.
+ *
+ * Tasks don't have to be atomic, if they will take more than a few tens of ms
+ * they should return back to the threadpool worker with a return of 0. This
+ * will allow them to abort cleanly.
+ */
+//@{
+
+struct lws_threadpool;
+struct lws_threadpool_task;
+
+enum lws_threadpool_task_status {
+ LWS_TP_STATUS_QUEUED,
+ LWS_TP_STATUS_RUNNING,
+ LWS_TP_STATUS_SYNCING,
+ LWS_TP_STATUS_STOPPING,
+ LWS_TP_STATUS_FINISHED, /* lws_threadpool_task_status() frees task */
+ LWS_TP_STATUS_STOPPED, /* lws_threadpool_task_status() frees task */
+};
+
+enum lws_threadpool_task_return {
+ /** Still work to do, just confirming not being stopped */
+ LWS_TP_RETURN_CHECKING_IN,
+ /** Still work to do, enter cond_wait until service thread syncs. This
+ * is used if you have filled your buffer(s) of data to the service
+ * thread and are blocked until the service thread completes sending at
+ * least one.
+ */
+ LWS_TP_RETURN_SYNC,
+ /** No more work to do... */
+ LWS_TP_RETURN_FINISHED,
+ /** Responding to request to stop */
+ LWS_TP_RETURN_STOPPED,
+
+ /* OR on to indicate this task wishes to outlive its wsi */
+ LWS_TP_RETURN_FLAG_OUTLIVE = 64
+};
+
+struct lws_threadpool_create_args {
+ int threads;
+ int max_queue_depth;
+};
+
+struct lws_threadpool_task_args {
+ struct lws *wsi; /**< user must set to wsi task is bound to */
+ void *user; /**< user may set (user-private pointer) */
+ const char *name; /**< user may set to describe task */
+ char async_task; /**< set to allow the task to shrug off the loss
+ of the associated wsi and continue to
+ completion */
+ enum lws_threadpool_task_return (*task)(void *user,
+ enum lws_threadpool_task_status s);
+ /**< user must set to actual task function */
+ void (*cleanup)(struct lws *wsi, void *user);
+ /**< socket lifecycle may end while task is not stoppable, so the task
+ * must be able to detach from any wsi and clean itself up when it does
+ * stop. If NULL, no cleanup necessary, otherwise point to a user-
+ * supplied function that destroys the stuff in \p user.
+ *
+ * wsi may be NULL on entry, indicating the task got detached due to the
+ * wsi closing before.
+ */
+};
+
+/**
+ * lws_threadpool_create() - create a pool of worker threads
+ *
+ * \param context: the lws_context the threadpool will exist inside
+ * \param args: argument struct prepared by caller
+ * \param format: printf-type format for the task name
+ * \param ...: printf type args for the task name format
+ *
+ * Creates a pool of worker threads with \p threads and a queue of up to
+ * \p max_queue_depth waiting tasks if all the threads are busy.
+ *
+ * Returns NULL if OOM, or a struct lws_threadpool pointer that must be
+ * destroyed by lws_threadpool_destroy().
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_threadpool *
+lws_threadpool_create(struct lws_context *context,
+ const struct lws_threadpool_create_args *args,
+ const char *format, ...) LWS_FORMAT(3);
+
+/**
+ * lws_threadpool_finish() - Stop all pending and running tasks
+ *
+ * \param tp: the threadpool object
+ *
+ * Marks the threadpool as under destruction. Removes everything from the
+ * pending queue and completes those tasks as LWS_TP_STATUS_STOPPED.
+ *
+ * Running tasks will also get LWS_TP_STATUS_STOPPED as soon as they
+ * "resurface".
+ *
+ * This doesn't reap tasks or free the threadpool, the reaping is done by the
+ * lws_threadpool_task_status() on the done task.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_threadpool_finish(struct lws_threadpool *tp);
+
+/**
+ * lws_threadpool_destroy() - Destroy a threadpool
+ *
+ * \param tp: the threadpool object
+ *
+ * Waits for all worker threads to stop, ends the threads and frees the tp.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_threadpool_destroy(struct lws_threadpool *tp);
+
+/**
+ * lws_threadpool_enqueue() - Queue the task and run it on a worker thread when possible
+ *
+ * \param tp: the threadpool to queue / run on
+ * \param args: information about what to run
+ * \param format: printf-type format for the task name
+ * \param ...: printf type args for the task name format
+ *
+ * This asks for a task to run ASAP on a worker thread in threadpool \p tp.
+ *
+ * The args defines the wsi, a user-private pointer, a timeout in secs and
+ * a pointer to the task function.
+ *
+ * Returns NULL or an opaque pointer to the queued (or running, or completed)
+ * task.
+ *
+ * Once a task is created and enqueued, it can only be destroyed by calling
+ * lws_threadpool_task_status() on it after it has reached the state
+ * LWS_TP_STATUS_FINISHED or LWS_TP_STATUS_STOPPED.
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_threadpool_task *
+lws_threadpool_enqueue(struct lws_threadpool *tp,
+ const struct lws_threadpool_task_args *args,
+ const char *format, ...) LWS_FORMAT(3);
+
+/**
+ * lws_threadpool_dequeue() - Dequeue or try to stop a running task
+ *
+ * \param wsi: the wsi whose current task we want to eliminate
+ *
+ * Returns 0 is the task was dequeued or already compeleted, or 1 if the task
+ * has been asked to stop asynchronously.
+ *
+ * This doesn't free the task. It only shortcuts it to state
+ * LWS_TP_STATUS_STOPPED. lws_threadpool_task_status() must be performed on
+ * the task separately once it is in LWS_TP_STATUS_STOPPED to free the task.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_threadpool_dequeue(struct lws *wsi);
+
+/**
+ * lws_threadpool_task_status() - Dequeue or try to stop a running task
+ *
+ * \param wsi: the wsi to query the current task of
+ * \param task: receives a pointer to the opaque task
+ * \param user: receives a void * pointer to the task user data
+ *
+ * This is the equivalent of posix waitpid()... it returns the status of the
+ * task, and if the task is in state LWS_TP_STATUS_FINISHED or
+ * LWS_TP_STATUS_STOPPED, frees \p task. If in another state, the task
+ * continues to exist.
+ *
+ * This is designed to be called from the service thread.
+ *
+ * Its use is to make sure the service thread has seen the state of the task
+ * before deleting it.
+ */
+LWS_VISIBLE LWS_EXTERN enum lws_threadpool_task_status
+lws_threadpool_task_status_wsi(struct lws *wsi,
+ struct lws_threadpool_task **task, void **user);
+
+/**
+ * lws_threadpool_task_sync() - Indicate to a stalled task it may continue
+ *
+ * \param task: the task to unblock
+ * \param stop: 0 = run after unblock, 1 = when he unblocks, stop him
+ *
+ * Inform the task that the service thread has finished with the shared data
+ * and that the task, if blocked in LWS_TP_RETURN_SYNC, may continue.
+ *
+ * If the lws service context determined that the task must be aborted, it
+ * should still call this but with stop = 1, causing the task to finish.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_threadpool_task_sync(struct lws_threadpool_task *task, int stop);
+
+/**
+ * lws_threadpool_dump() - dump the state of a threadpool to the log
+ *
+ * \param tp: The threadpool to dump
+ *
+ * This locks the threadpool and then dumps the pending queue, the worker
+ * threads and the done queue, together with time information for how long
+ * the tasks have been in their current state, how long they have occupied a
+ * thread, etc.
+ *
+ * This only does anything on lws builds with CMAKE_BUILD_TYPE=DEBUG, otherwise
+ * while it still exists, it's a NOP.
+ */
+
+LWS_VISIBLE LWS_EXTERN void
+lws_threadpool_dump(struct lws_threadpool *tp);
+//@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-timeout-timer.h b/thirdparty/libwebsockets/include/libwebsockets/lws-timeout-timer.h
new file mode 100644
index 0000000000..e715ba15a3
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-timeout-timer.h
@@ -0,0 +1,164 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup timeout Connection timeouts
+
+ APIs related to setting connection timeouts
+*/
+//@{
+
+/*
+ * NOTE: These public enums are part of the abi. If you want to add one,
+ * add it at where specified so existing users are unaffected.
+ */
+enum pending_timeout {
+ NO_PENDING_TIMEOUT = 0,
+ PENDING_TIMEOUT_AWAITING_PROXY_RESPONSE = 1,
+ PENDING_TIMEOUT_AWAITING_CONNECT_RESPONSE = 2,
+ PENDING_TIMEOUT_ESTABLISH_WITH_SERVER = 3,
+ PENDING_TIMEOUT_AWAITING_SERVER_RESPONSE = 4,
+ PENDING_TIMEOUT_AWAITING_PING = 5,
+ PENDING_TIMEOUT_CLOSE_ACK = 6,
+ PENDING_TIMEOUT_UNUSED1 = 7,
+ PENDING_TIMEOUT_SENT_CLIENT_HANDSHAKE = 8,
+ PENDING_TIMEOUT_SSL_ACCEPT = 9,
+ PENDING_TIMEOUT_HTTP_CONTENT = 10,
+ PENDING_TIMEOUT_AWAITING_CLIENT_HS_SEND = 11,
+ PENDING_FLUSH_STORED_SEND_BEFORE_CLOSE = 12,
+ PENDING_TIMEOUT_SHUTDOWN_FLUSH = 13,
+ PENDING_TIMEOUT_CGI = 14,
+ PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE = 15,
+ PENDING_TIMEOUT_WS_PONG_CHECK_SEND_PING = 16,
+ PENDING_TIMEOUT_WS_PONG_CHECK_GET_PONG = 17,
+ PENDING_TIMEOUT_CLIENT_ISSUE_PAYLOAD = 18,
+ PENDING_TIMEOUT_AWAITING_SOCKS_GREETING_REPLY = 19,
+ PENDING_TIMEOUT_AWAITING_SOCKS_CONNECT_REPLY = 20,
+ PENDING_TIMEOUT_AWAITING_SOCKS_AUTH_REPLY = 21,
+ PENDING_TIMEOUT_KILLED_BY_SSL_INFO = 22,
+ PENDING_TIMEOUT_KILLED_BY_PARENT = 23,
+ PENDING_TIMEOUT_CLOSE_SEND = 24,
+ PENDING_TIMEOUT_HOLDING_AH = 25,
+ PENDING_TIMEOUT_UDP_IDLE = 26,
+ PENDING_TIMEOUT_CLIENT_CONN_IDLE = 27,
+ PENDING_TIMEOUT_LAGGING = 28,
+ PENDING_TIMEOUT_THREADPOOL = 29,
+ PENDING_TIMEOUT_THREADPOOL_TASK = 30,
+ PENDING_TIMEOUT_KILLED_BY_PROXY_CLIENT_CLOSE = 31,
+
+ /****** add new things just above ---^ ******/
+
+ PENDING_TIMEOUT_USER_REASON_BASE = 1000
+};
+
+/**
+ * lws_time_in_microseconds() - Returns the unix time in microseconds
+ */
+LWS_VISIBLE LWS_EXTERN uint64_t
+lws_time_in_microseconds(void);
+
+#define LWS_TO_KILL_ASYNC -1
+/**< If LWS_TO_KILL_ASYNC is given as the timeout sec in a lws_set_timeout()
+ * call, then the connection is marked to be killed at the next timeout
+ * check. This is how you should force-close the wsi being serviced if
+ * you are doing it outside the callback (where you should close by nonzero
+ * return).
+ */
+#define LWS_TO_KILL_SYNC -2
+/**< If LWS_TO_KILL_SYNC is given as the timeout sec in a lws_set_timeout()
+ * call, then the connection is closed before returning (which may delete
+ * the wsi). This should only be used where the wsi being closed is not the
+ * wsi currently being serviced.
+ */
+/**
+ * lws_set_timeout() - marks the wsi as subject to a timeout
+ *
+ * You will not need this unless you are doing something special
+ *
+ * \param wsi: Websocket connection instance
+ * \param reason: timeout reason
+ * \param secs: how many seconds. You may set to LWS_TO_KILL_ASYNC to
+ * force the connection to timeout at the next opportunity, or
+ * LWS_TO_KILL_SYNC to close it synchronously if you know the
+ * wsi is not the one currently being serviced.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_set_timeout(struct lws *wsi, enum pending_timeout reason, int secs);
+
+#define LWS_SET_TIMER_USEC_CANCEL ((lws_usec_t)-1ll)
+#define LWS_USEC_PER_SEC (1000000ll)
+
+/**
+ * lws_set_timer_usecs() - schedules a callback on the wsi in the future
+ *
+ * \param wsi: Websocket connection instance
+ * \param usecs: LWS_SET_TIMER_USEC_CANCEL removes any existing scheduled
+ * callback, otherwise number of microseconds in the future
+ * the callback will occur at.
+ *
+ * NOTE: event loop support for this:
+ *
+ * default poll() loop: yes
+ * libuv event loop: yes
+ * libev: not implemented (patch welcome)
+ * libevent: not implemented (patch welcome)
+ *
+ * After the deadline expires, the wsi will get a callback of type
+ * LWS_CALLBACK_TIMER and the timer is exhausted. The deadline may be
+ * continuously deferred by further calls to lws_set_timer_usecs() with a later
+ * deadline, or cancelled by lws_set_timer_usecs(wsi, -1).
+ *
+ * If the timer should repeat, lws_set_timer_usecs() must be called again from
+ * LWS_CALLBACK_TIMER.
+ *
+ * Accuracy depends on the platform and the load on the event loop or system...
+ * all that's guaranteed is the callback will come after the requested wait
+ * period.
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_set_timer_usecs(struct lws *wsi, lws_usec_t usecs);
+
+/*
+ * lws_timed_callback_vh_protocol() - calls back a protocol on a vhost after
+ * the specified delay
+ *
+ * \param vh: the vhost to call back
+ * \param protocol: the protocol to call back
+ * \param reason: callback reason
+ * \param secs: how many seconds in the future to do the callback. Set to
+ * -1 to cancel the timer callback.
+ *
+ * Callback the specified protocol with a fake wsi pointing to the specified
+ * vhost and protocol, with the specified reason, at the specified time in the
+ * future.
+ *
+ * Returns 0 if OK.
+ *
+ * In the multithreaded service case, the callback will occur in the same
+ * service thread context as the call to this api that requested it. If it is
+ * called from a non-service thread, tsi 0 will handle it.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_timed_callback_vh_protocol(struct lws_vhost *vh,
+ const struct lws_protocols *prot,
+ int reason, int secs);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-tokenize.h b/thirdparty/libwebsockets/include/libwebsockets/lws-tokenize.h
new file mode 100644
index 0000000000..26a57dfbaf
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-tokenize.h
@@ -0,0 +1,136 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/* Do not treat - as a terminal character, so "my-token" is one token */
+#define LWS_TOKENIZE_F_MINUS_NONTERM (1 << 0)
+/* Separately report aggregate colon-delimited tokens */
+#define LWS_TOKENIZE_F_AGG_COLON (1 << 1)
+/* Enforce sequencing for a simple token , token , token ... list */
+#define LWS_TOKENIZE_F_COMMA_SEP_LIST (1 << 2)
+/* Allow more characters in the tokens and less delimiters... default is
+ * only alphanumeric + underscore in tokens */
+#define LWS_TOKENIZE_F_RFC7230_DELIMS (1 << 3)
+/* Do not treat . as a terminal character, so "warmcat.com" is one token */
+#define LWS_TOKENIZE_F_DOT_NONTERM (1 << 4)
+/* If something starts looking like a float, like 1.2, force to be string token.
+ * This lets you receive dotted-quads like 192.168.0.1 as string tokens, and
+ * avoids illegal float format detection like 1.myserver.com */
+#define LWS_TOKENIZE_F_NO_FLOATS (1 << 5)
+
+typedef enum {
+
+ LWS_TOKZE_ERRS = 5, /* the number of errors defined */
+
+ LWS_TOKZE_ERR_BROKEN_UTF8 = -5, /* malformed or partial utf8 */
+ LWS_TOKZE_ERR_UNTERM_STRING = -4, /* ended while we were in "" */
+ LWS_TOKZE_ERR_MALFORMED_FLOAT = -3, /* like 0..1 or 0.1.1 */
+ LWS_TOKZE_ERR_NUM_ON_LHS = -2, /* like 123= or 0.1= */
+ LWS_TOKZE_ERR_COMMA_LIST = -1, /* like ",tok", or, "tok,," */
+
+ LWS_TOKZE_ENDED = 0, /* no more content */
+
+ /* Note: results have ordinal 1+, EOT is 0 and errors are < 0 */
+
+ LWS_TOKZE_DELIMITER, /* a delimiter appeared */
+ LWS_TOKZE_TOKEN, /* a token appeared */
+ LWS_TOKZE_INTEGER, /* an integer appeared */
+ LWS_TOKZE_FLOAT, /* a float appeared */
+ LWS_TOKZE_TOKEN_NAME_EQUALS, /* token [whitespace] = */
+ LWS_TOKZE_TOKEN_NAME_COLON, /* token [whitespace] : (only with
+ LWS_TOKENIZE_F_AGG_COLON flag) */
+ LWS_TOKZE_QUOTED_STRING, /* "*", where * may have any char */
+
+} lws_tokenize_elem;
+
+/*
+ * helper enums to allow caller to enforce legal delimiter sequencing, eg
+ * disallow "token,,token", "token,", and ",token"
+ */
+
+enum lws_tokenize_delimiter_tracking {
+ LWSTZ_DT_NEED_FIRST_CONTENT,
+ LWSTZ_DT_NEED_DELIM,
+ LWSTZ_DT_NEED_NEXT_CONTENT,
+};
+
+struct lws_tokenize {
+ const char *start; /**< set to the start of the string to tokenize */
+ const char *token; /**< the start of an identified token or delimiter */
+ int len; /**< set to the length of the string to tokenize */
+ int token_len; /**< the length of the identied token or delimiter */
+
+ int flags; /**< optional LWS_TOKENIZE_F_ flags, or 0 */
+ int delim;
+};
+
+/**
+ * lws_tokenize() - breaks down a string into tokens and delimiters in-place
+ *
+ * \param ts: the lws_tokenize struct to init
+ * \param start: the string to tokenize
+ * \param flags: LWS_TOKENIZE_F_ option flags
+ *
+ * This initializes the tokenize struct to point to the given string, and
+ * sets the length to 2GiB - 1 (so there must be a terminating NUL)... you can
+ * override this requirement by setting ts.len yourself before using it.
+ *
+ * .delim is also initialized to LWSTZ_DT_NEED_FIRST_CONTENT.
+ */
+
+LWS_VISIBLE LWS_EXTERN void
+lws_tokenize_init(struct lws_tokenize *ts, const char *start, int flags);
+
+/**
+ * lws_tokenize() - breaks down a string into tokens and delimiters in-place
+ *
+ * \param ts: the lws_tokenize struct with information and state on what to do
+ *
+ * The \p ts struct should have its start, len and flags members initialized to
+ * reflect the string to be tokenized and any options.
+ *
+ * Then `lws_tokenize()` may be called repeatedly on the struct, returning one
+ * of `lws_tokenize_elem` each time, and with the struct's `token` and
+ * `token_len` members set to describe the content of the delimiter or token
+ * payload each time.
+ *
+ * There are no allocations during the process.
+ *
+ * returns lws_tokenize_elem that was identified (LWS_TOKZE_ENDED means reached
+ * the end of the string).
+ */
+
+LWS_VISIBLE LWS_EXTERN lws_tokenize_elem
+lws_tokenize(struct lws_tokenize *ts);
+
+/**
+ * lws_tokenize_cstr() - copy token string to NUL-terminated buffer
+ *
+ * \param ts: pointer to lws_tokenize struct to operate on
+ * \param str: destination buffer
+ * \pparam max: bytes in destination buffer
+ *
+ * returns 0 if OK or nonzero if the string + NUL won't fit.
+ */
+
+LWS_VISIBLE LWS_EXTERN int
+lws_tokenize_cstr(struct lws_tokenize *ts, char *str, int max);
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-vfs.h b/thirdparty/libwebsockets/include/libwebsockets/lws-vfs.h
new file mode 100644
index 0000000000..00e2fda5d3
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-vfs.h
@@ -0,0 +1,269 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup fops file operation wrapping
+ *
+ * ##File operation wrapping
+ *
+ * Use these helper functions if you want to access a file from the perspective
+ * of a specific wsi, which is usually the case. If you just want contextless
+ * file access, use the fops callbacks directly with NULL wsi instead of these
+ * helpers.
+ *
+ * If so, then it calls the platform handler or user overrides where present
+ * (as defined in info->fops)
+ *
+ * The advantage from all this is user code can be portable for file operations
+ * without having to deal with differences between platforms.
+ */
+//@{
+
+/** struct lws_plat_file_ops - Platform-specific file operations
+ *
+ * These provide platform-agnostic ways to deal with filesystem access in the
+ * library and in the user code.
+ */
+
+#if defined(LWS_WITH_ESP32)
+/* sdk preprocessor defs? compiler issue? gets confused with member names */
+#define LWS_FOP_OPEN _open
+#define LWS_FOP_CLOSE _close
+#define LWS_FOP_SEEK_CUR _seek_cur
+#define LWS_FOP_READ _read
+#define LWS_FOP_WRITE _write
+#else
+#define LWS_FOP_OPEN open
+#define LWS_FOP_CLOSE close
+#define LWS_FOP_SEEK_CUR seek_cur
+#define LWS_FOP_READ read
+#define LWS_FOP_WRITE write
+#endif
+
+#define LWS_FOP_FLAGS_MASK ((1 << 23) - 1)
+#define LWS_FOP_FLAG_COMPR_ACCEPTABLE_GZIP (1 << 24)
+#define LWS_FOP_FLAG_COMPR_IS_GZIP (1 << 25)
+#define LWS_FOP_FLAG_MOD_TIME_VALID (1 << 26)
+#define LWS_FOP_FLAG_VIRTUAL (1 << 27)
+
+struct lws_plat_file_ops;
+
+struct lws_fop_fd {
+ lws_filefd_type fd;
+ /**< real file descriptor related to the file... */
+ const struct lws_plat_file_ops *fops;
+ /**< fops that apply to this fop_fd */
+ void *filesystem_priv;
+ /**< ignored by lws; owned by the fops handlers */
+ lws_filepos_t pos;
+ /**< generic "position in file" */
+ lws_filepos_t len;
+ /**< generic "length of file" */
+ lws_fop_flags_t flags;
+ /**< copy of the returned flags */
+ uint32_t mod_time;
+ /**< optional "modification time of file", only valid if .open()
+ * set the LWS_FOP_FLAG_MOD_TIME_VALID flag */
+};
+typedef struct lws_fop_fd *lws_fop_fd_t;
+
+struct lws_fops_index {
+ const char *sig; /* NULL or vfs signature, eg, ".zip/" */
+ uint8_t len; /* length of above string */
+};
+
+struct lws_plat_file_ops {
+ lws_fop_fd_t (*LWS_FOP_OPEN)(const struct lws_plat_file_ops *fops,
+ const char *filename, const char *vpath,
+ lws_fop_flags_t *flags);
+ /**< Open file (always binary access if plat supports it)
+ * vpath may be NULL, or if the fops understands it, the point at which
+ * the filename's virtual part starts.
+ * *flags & LWS_FOP_FLAGS_MASK should be set to O_RDONLY or O_RDWR.
+ * If the file may be gzip-compressed,
+ * LWS_FOP_FLAG_COMPR_ACCEPTABLE_GZIP is set. If it actually is
+ * gzip-compressed, then the open handler should OR
+ * LWS_FOP_FLAG_COMPR_IS_GZIP on to *flags before returning.
+ */
+ int (*LWS_FOP_CLOSE)(lws_fop_fd_t *fop_fd);
+ /**< close file AND set the pointer to NULL */
+ lws_fileofs_t (*LWS_FOP_SEEK_CUR)(lws_fop_fd_t fop_fd,
+ lws_fileofs_t offset_from_cur_pos);
+ /**< seek from current position */
+ int (*LWS_FOP_READ)(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len);
+ /**< Read from file, on exit *amount is set to amount actually read */
+ int (*LWS_FOP_WRITE)(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len);
+ /**< Write to file, on exit *amount is set to amount actually written */
+
+ struct lws_fops_index fi[3];
+ /**< vfs path signatures implying use of this fops */
+
+ const struct lws_plat_file_ops *next;
+ /**< NULL or next fops in list */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility */
+};
+
+/**
+ * lws_get_fops() - get current file ops
+ *
+ * \param context: context
+ */
+LWS_VISIBLE LWS_EXTERN struct lws_plat_file_ops * LWS_WARN_UNUSED_RESULT
+lws_get_fops(struct lws_context *context);
+LWS_VISIBLE LWS_EXTERN void
+lws_set_fops(struct lws_context *context, const struct lws_plat_file_ops *fops);
+/**
+ * lws_vfs_tell() - get current file position
+ *
+ * \param fop_fd: fop_fd we are asking about
+ */
+LWS_VISIBLE LWS_EXTERN lws_filepos_t LWS_WARN_UNUSED_RESULT
+lws_vfs_tell(lws_fop_fd_t fop_fd);
+/**
+ * lws_vfs_get_length() - get current file total length in bytes
+ *
+ * \param fop_fd: fop_fd we are asking about
+ */
+LWS_VISIBLE LWS_EXTERN lws_filepos_t LWS_WARN_UNUSED_RESULT
+lws_vfs_get_length(lws_fop_fd_t fop_fd);
+/**
+ * lws_vfs_get_mod_time() - get time file last modified
+ *
+ * \param fop_fd: fop_fd we are asking about
+ */
+LWS_VISIBLE LWS_EXTERN uint32_t LWS_WARN_UNUSED_RESULT
+lws_vfs_get_mod_time(lws_fop_fd_t fop_fd);
+/**
+ * lws_vfs_file_seek_set() - seek relative to start of file
+ *
+ * \param fop_fd: fop_fd we are seeking in
+ * \param offset: offset from start of file
+ */
+LWS_VISIBLE LWS_EXTERN lws_fileofs_t
+lws_vfs_file_seek_set(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
+/**
+ * lws_vfs_file_seek_end() - seek relative to end of file
+ *
+ * \param fop_fd: fop_fd we are seeking in
+ * \param offset: offset from start of file
+ */
+LWS_VISIBLE LWS_EXTERN lws_fileofs_t
+lws_vfs_file_seek_end(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
+
+extern struct lws_plat_file_ops fops_zip;
+
+/**
+ * lws_plat_file_open() - open vfs filepath
+ *
+ * \param fops: file ops struct that applies to this descriptor
+ * \param vfs_path: filename to open
+ * \param flags: pointer to open flags
+ *
+ * The vfs_path is scanned for known fops signatures, and the open directed
+ * to any matching fops open.
+ *
+ * User code should use this api to perform vfs opens.
+ *
+ * returns semi-opaque handle
+ */
+LWS_VISIBLE LWS_EXTERN lws_fop_fd_t LWS_WARN_UNUSED_RESULT
+lws_vfs_file_open(const struct lws_plat_file_ops *fops, const char *vfs_path,
+ lws_fop_flags_t *flags);
+
+/**
+ * lws_plat_file_close() - close file
+ *
+ * \param fop_fd: file handle to close
+ */
+static LWS_INLINE int
+lws_vfs_file_close(lws_fop_fd_t *fop_fd)
+{
+ return (*fop_fd)->fops->LWS_FOP_CLOSE(fop_fd);
+}
+
+/**
+ * lws_plat_file_seek_cur() - close file
+ *
+ *
+ * \param fop_fd: file handle
+ * \param offset: position to seek to
+ */
+static LWS_INLINE lws_fileofs_t
+lws_vfs_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
+{
+ return fop_fd->fops->LWS_FOP_SEEK_CUR(fop_fd, offset);
+}
+/**
+ * lws_plat_file_read() - read from file
+ *
+ * \param fop_fd: file handle
+ * \param amount: how much to read (rewritten by call)
+ * \param buf: buffer to write to
+ * \param len: max length
+ */
+static LWS_INLINE int LWS_WARN_UNUSED_RESULT
+lws_vfs_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len)
+{
+ return fop_fd->fops->LWS_FOP_READ(fop_fd, amount, buf, len);
+}
+/**
+ * lws_plat_file_write() - write from file
+ *
+ * \param fop_fd: file handle
+ * \param amount: how much to write (rewritten by call)
+ * \param buf: buffer to read from
+ * \param len: max length
+ */
+static LWS_INLINE int LWS_WARN_UNUSED_RESULT
+lws_vfs_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len)
+{
+ return fop_fd->fops->LWS_FOP_WRITE(fop_fd, amount, buf, len);
+}
+
+/* these are the platform file operations implementations... they can
+ * be called directly and used in fops arrays
+ */
+
+LWS_VISIBLE LWS_EXTERN lws_fop_fd_t
+_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+ const char *vpath, lws_fop_flags_t *flags);
+LWS_VISIBLE LWS_EXTERN int
+_lws_plat_file_close(lws_fop_fd_t *fop_fd);
+LWS_VISIBLE LWS_EXTERN lws_fileofs_t
+_lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
+LWS_VISIBLE LWS_EXTERN int
+_lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len);
+LWS_VISIBLE LWS_EXTERN int
+_lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_alloc_vfs_file(struct lws_context *context, const char *filename,
+ uint8_t **buf, lws_filepos_t *amount);
+//@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-write.h b/thirdparty/libwebsockets/include/libwebsockets/lws-write.h
new file mode 100644
index 0000000000..b73e51c789
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-write.h
@@ -0,0 +1,235 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup sending-data Sending data
+
+ APIs related to writing data on a connection
+*/
+//@{
+#if !defined(LWS_SIZEOFPTR)
+#define LWS_SIZEOFPTR ((int)sizeof (void *))
+#endif
+
+#if defined(__x86_64__)
+#define _LWS_PAD_SIZE 16 /* Intel recommended for best performance */
+#else
+#define _LWS_PAD_SIZE LWS_SIZEOFPTR /* Size of a pointer on the target arch */
+#endif
+#define _LWS_PAD(n) (((n) % _LWS_PAD_SIZE) ? \
+ ((n) + (_LWS_PAD_SIZE - ((n) % _LWS_PAD_SIZE))) : (n))
+/* last 2 is for lws-meta */
+#define LWS_PRE _LWS_PAD(4 + 10 + 2)
+/* used prior to 1.7 and retained for backward compatibility */
+#define LWS_SEND_BUFFER_PRE_PADDING LWS_PRE
+#define LWS_SEND_BUFFER_POST_PADDING 0
+
+#define LWS_WRITE_RAW LWS_WRITE_HTTP
+
+/*
+ * NOTE: These public enums are part of the abi. If you want to add one,
+ * add it at where specified so existing users are unaffected.
+ */
+enum lws_write_protocol {
+ LWS_WRITE_TEXT = 0,
+ /**< Send a ws TEXT message,the pointer must have LWS_PRE valid
+ * memory behind it.
+ *
+ * The receiver expects only valid utf-8 in the payload */
+ LWS_WRITE_BINARY = 1,
+ /**< Send a ws BINARY message, the pointer must have LWS_PRE valid
+ * memory behind it.
+ *
+ * Any sequence of bytes is valid */
+ LWS_WRITE_CONTINUATION = 2,
+ /**< Continue a previous ws message, the pointer must have LWS_PRE valid
+ * memory behind it */
+ LWS_WRITE_HTTP = 3,
+ /**< Send HTTP content */
+
+ /* LWS_WRITE_CLOSE is handled by lws_close_reason() */
+ LWS_WRITE_PING = 5,
+ LWS_WRITE_PONG = 6,
+
+ /* Same as write_http but we know this write ends the transaction */
+ LWS_WRITE_HTTP_FINAL = 7,
+
+ /* HTTP2 */
+
+ LWS_WRITE_HTTP_HEADERS = 8,
+ /**< Send http headers (http2 encodes this payload and LWS_WRITE_HTTP
+ * payload differently, http 1.x links also handle this correctly. so
+ * to be compatible with both in the future,header response part should
+ * be sent using this regardless of http version expected)
+ */
+ LWS_WRITE_HTTP_HEADERS_CONTINUATION = 9,
+ /**< Continuation of http/2 headers
+ */
+
+ /****** add new things just above ---^ ******/
+
+ /* flags */
+
+ LWS_WRITE_BUFLIST = 0x20,
+ /**< Don't actually write it... stick it on the output buflist and
+ * write it as soon as possible. Useful if you learn you have to
+ * write something, have the data to write to hand but the timing is
+ * unrelated as to whether the connection is writable or not, and were
+ * otherwise going to have to allocate a temp buffer and write it
+ * later anyway */
+
+ LWS_WRITE_NO_FIN = 0x40,
+ /**< This part of the message is not the end of the message */
+
+ LWS_WRITE_H2_STREAM_END = 0x80,
+ /**< Flag indicates this packet should go out with STREAM_END if h2
+ * STREAM_END is allowed on DATA or HEADERS.
+ */
+
+ LWS_WRITE_CLIENT_IGNORE_XOR_MASK = 0x80
+ /**< client packet payload goes out on wire unmunged
+ * only useful for security tests since normal servers cannot
+ * decode the content if used */
+};
+
+/* used with LWS_CALLBACK_CHILD_WRITE_VIA_PARENT */
+
+struct lws_write_passthru {
+ struct lws *wsi;
+ unsigned char *buf;
+ size_t len;
+ enum lws_write_protocol wp;
+};
+
+
+/**
+ * lws_write() - Apply protocol then write data to client
+ * \param wsi: Websocket instance (available from user callback)
+ * \param buf: The data to send. For data being sent on a websocket
+ * connection (ie, not default http), this buffer MUST have
+ * LWS_PRE bytes valid BEFORE the pointer.
+ * This is so the protocol header data can be added in-situ.
+ * \param len: Count of the data bytes in the payload starting from buf
+ * \param protocol: Use LWS_WRITE_HTTP to reply to an http connection, and one
+ * of LWS_WRITE_BINARY or LWS_WRITE_TEXT to send appropriate
+ * data on a websockets connection. Remember to allow the extra
+ * bytes before and after buf if LWS_WRITE_BINARY or LWS_WRITE_TEXT
+ * are used.
+ *
+ * This function provides the way to issue data back to the client
+ * for both http and websocket protocols.
+ *
+ * IMPORTANT NOTICE!
+ *
+ * When sending with websocket protocol
+ *
+ * LWS_WRITE_TEXT,
+ * LWS_WRITE_BINARY,
+ * LWS_WRITE_CONTINUATION,
+ * LWS_WRITE_PING,
+ * LWS_WRITE_PONG,
+ *
+ * or sending on http/2,
+ *
+ * the send buffer has to have LWS_PRE bytes valid BEFORE the buffer pointer you
+ * pass to lws_write(). Since you'll probably want to use http/2 before too
+ * long, it's wise to just always do this with lws_write buffers... LWS_PRE is
+ * typically 16 bytes it's not going to hurt usually.
+ *
+ * start of alloc ptr passed to lws_write end of allocation
+ * | | |
+ * v <-- LWS_PRE bytes --> v v
+ * [---------------- allocated memory ---------------]
+ * (for lws use) [====== user buffer ======]
+ *
+ * This allows us to add protocol info before and after the data, and send as
+ * one packet on the network without payload copying, for maximum efficiency.
+ *
+ * So for example you need this kind of code to use lws_write with a
+ * 128-byte payload
+ *
+ * char buf[LWS_PRE + 128];
+ *
+ * // fill your part of the buffer... for example here it's all zeros
+ * memset(&buf[LWS_PRE], 0, 128);
+ *
+ * lws_write(wsi, &buf[LWS_PRE], 128, LWS_WRITE_TEXT);
+ *
+ * LWS_PRE is at least the frame nonce + 2 header + 8 length
+ * LWS_SEND_BUFFER_POST_PADDING is deprecated, it's now 0 and can be left off.
+ * The example apps no longer use it.
+ *
+ * Pad LWS_PRE to the CPU word size, so that word references
+ * to the address immediately after the padding won't cause an unaligned access
+ * error. Sometimes for performance reasons the recommended padding is even
+ * larger than sizeof(void *).
+ *
+ * In the case of sending using websocket protocol, be sure to allocate
+ * valid storage before and after buf as explained above. This scheme
+ * allows maximum efficiency of sending data and protocol in a single
+ * packet while not burdening the user code with any protocol knowledge.
+ *
+ * Return may be -1 for a fatal error needing connection close, or the
+ * number of bytes sent.
+ *
+ * Truncated Writes
+ * ================
+ *
+ * The OS may not accept everything you asked to write on the connection.
+ *
+ * Posix defines POLLOUT indication from poll() to show that the connection
+ * will accept more write data, but it doesn't specifiy how much. It may just
+ * accept one byte of whatever you wanted to send.
+ *
+ * LWS will buffer the remainder automatically, and send it out autonomously.
+ *
+ * During that time, WRITABLE callbacks will be suppressed.
+ *
+ * This is to handle corner cases where unexpectedly the OS refuses what we
+ * usually expect it to accept. You should try to send in chunks that are
+ * almost always accepted in order to avoid the inefficiency of the buffering.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_write(struct lws *wsi, unsigned char *buf, size_t len,
+ enum lws_write_protocol protocol);
+
+/* helper for case where buffer may be const */
+#define lws_write_http(wsi, buf, len) \
+ lws_write(wsi, (unsigned char *)(buf), len, LWS_WRITE_HTTP)
+
+/* helper for multi-frame ws message flags */
+static LWS_INLINE int
+lws_write_ws_flags(int initial, int is_start, int is_end)
+{
+ int r;
+
+ if (is_start)
+ r = initial;
+ else
+ r = LWS_WRITE_CONTINUATION;
+
+ if (!is_end)
+ r |= LWS_WRITE_NO_FIN;
+
+ return r;
+}
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-writeable.h b/thirdparty/libwebsockets/include/libwebsockets/lws-writeable.h
new file mode 100644
index 0000000000..dd5659c3f0
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-writeable.h
@@ -0,0 +1,225 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup callback-when-writeable Callback when writeable
+ *
+ * ##Callback When Writeable
+ *
+ * lws can only write data on a connection when it is able to accept more
+ * data without blocking.
+ *
+ * So a basic requirement is we should only use the lws_write() apis when the
+ * connection we want to write on says that he can accept more data.
+ *
+ * When lws cannot complete your send at the time, it will buffer the data
+ * and send it in the background, suppressing any further WRITEABLE callbacks
+ * on that connection until it completes. So it is important to write new
+ * things in a new writeable callback.
+ *
+ * These apis reflect the various ways we can indicate we would like to be
+ * called back when one or more connections is writeable.
+ */
+///@{
+
+/**
+ * lws_callback_on_writable() - Request a callback when this socket
+ * becomes able to be written to without
+ * blocking
+ *
+ * \param wsi: Websocket connection instance to get callback for
+ *
+ * - Which: only this wsi
+ * - When: when the individual connection becomes writeable
+ * - What: LWS_CALLBACK_*_WRITEABLE
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_on_writable(struct lws *wsi);
+
+/**
+ * lws_callback_on_writable_all_protocol() - Request a callback for all
+ * connections using the given protocol when it
+ * becomes possible to write to each socket without
+ * blocking in turn.
+ *
+ * \param context: lws_context
+ * \param protocol: Protocol whose connections will get callbacks
+ *
+ * - Which: connections using this protocol on ANY VHOST
+ * - When: when the individual connection becomes writeable
+ * - What: LWS_CALLBACK_*_WRITEABLE
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_on_writable_all_protocol(const struct lws_context *context,
+ const struct lws_protocols *protocol);
+
+/**
+ * lws_callback_on_writable_all_protocol_vhost() - Request a callback for
+ * all connections on same vhost using the given protocol
+ * when it becomes possible to write to each socket without
+ * blocking in turn.
+ *
+ * \param vhost: Only consider connections on this lws_vhost
+ * \param protocol: Protocol whose connections will get callbacks
+ *
+ * - Which: connections using this protocol on GIVEN VHOST ONLY
+ * - When: when the individual connection becomes writeable
+ * - What: LWS_CALLBACK_*_WRITEABLE
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_on_writable_all_protocol_vhost(const struct lws_vhost *vhost,
+ const struct lws_protocols *protocol);
+
+/**
+ * lws_callback_all_protocol() - Callback all connections using
+ * the given protocol with the given reason
+ *
+ * \param context: lws_context
+ * \param protocol: Protocol whose connections will get callbacks
+ * \param reason: Callback reason index
+ *
+ * - Which: connections using this protocol on ALL VHOSTS
+ * - When: before returning
+ * - What: reason
+ *
+ * This isn't normally what you want... normally any update of connection-
+ * specific information can wait until a network-related callback like rx,
+ * writable, or close.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_all_protocol(struct lws_context *context,
+ const struct lws_protocols *protocol, int reason);
+
+/**
+ * lws_callback_all_protocol_vhost() - Callback all connections using
+ * the given protocol with the given reason. This is
+ * deprecated since v2.4: use lws_callback_all_protocol_vhost_args
+ *
+ * \param vh: Vhost whose connections will get callbacks
+ * \param protocol: Which protocol to match. NULL means all.
+ * \param reason: Callback reason index
+ *
+ * - Which: connections using this protocol on GIVEN VHOST ONLY
+ * - When: now
+ * - What: reason
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_all_protocol_vhost(struct lws_vhost *vh,
+ const struct lws_protocols *protocol,
+ int reason)
+LWS_WARN_DEPRECATED;
+
+/**
+ * lws_callback_all_protocol_vhost_args() - Callback all connections using
+ * the given protocol with the given reason and args
+ *
+ * \param vh: Vhost whose connections will get callbacks
+ * \param protocol: Which protocol to match. NULL means all.
+ * \param reason: Callback reason index
+ * \param argp: Callback "in" parameter
+ * \param len: Callback "len" parameter
+ *
+ * - Which: connections using this protocol on GIVEN VHOST ONLY
+ * - When: now
+ * - What: reason
+ */
+LWS_VISIBLE int
+lws_callback_all_protocol_vhost_args(struct lws_vhost *vh,
+ const struct lws_protocols *protocol,
+ int reason, void *argp, size_t len);
+
+/**
+ * lws_callback_vhost_protocols() - Callback all protocols enabled on a vhost
+ * with the given reason
+ *
+ * \param wsi: wsi whose vhost will get callbacks
+ * \param reason: Callback reason index
+ * \param in: in argument to callback
+ * \param len: len argument to callback
+ *
+ * - Which: connections using this protocol on same VHOST as wsi ONLY
+ * - When: now
+ * - What: reason
+ *
+ * This is deprecated since v2.5, use lws_callback_vhost_protocols_vhost()
+ * which takes the pointer to the vhost directly without using or needing the
+ * wsi.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_vhost_protocols(struct lws *wsi, int reason, void *in, int len)
+LWS_WARN_DEPRECATED;
+
+/**
+ * lws_callback_vhost_protocols_vhost() - Callback all protocols enabled on a vhost
+ * with the given reason
+ *
+ * \param vh: vhost that will get callbacks
+ * \param reason: Callback reason index
+ * \param in: in argument to callback
+ * \param len: len argument to callback
+ *
+ * - Which: connections using this protocol on same VHOST as wsi ONLY
+ * - When: now
+ * - What: reason
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_vhost_protocols_vhost(struct lws_vhost *vh, int reason, void *in,
+ size_t len);
+
+LWS_VISIBLE LWS_EXTERN int
+lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
+ void *user, void *in, size_t len);
+
+/**
+ * lws_get_socket_fd() - returns the socket file descriptor
+ *
+ * This is needed to use sendto() on UDP raw sockets
+ *
+ * \param wsi: Websocket connection instance
+ */
+LWS_VISIBLE LWS_EXTERN lws_sockfd_type
+lws_get_socket_fd(struct lws *wsi);
+
+/**
+ * lws_get_peer_write_allowance() - get the amount of data writeable to peer
+ * if known
+ *
+ * \param wsi: Websocket connection instance
+ *
+ * if the protocol does not have any guidance, returns -1. Currently only
+ * http2 connections get send window information from this API. But your code
+ * should use it so it can work properly with any protocol.
+ *
+ * If nonzero return is the amount of payload data the peer or intermediary has
+ * reported it has buffer space for. That has NO relationship with the amount
+ * of buffer space your OS can accept on this connection for a write action.
+ *
+ * This number represents the maximum you could send to the peer or intermediary
+ * on this connection right now without the protocol complaining.
+ *
+ * lws manages accounting for send window updates and payload writes
+ * automatically, so this number reflects the situation at the peer or
+ * intermediary dynamically.
+ */
+LWS_VISIBLE LWS_EXTERN lws_fileofs_t
+lws_get_peer_write_allowance(struct lws *wsi);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-ws-close.h b/thirdparty/libwebsockets/include/libwebsockets/lws-ws-close.h
new file mode 100644
index 0000000000..9721e29233
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-ws-close.h
@@ -0,0 +1,124 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup wsclose Websocket Close
+ *
+ * ##Websocket close frame control
+ *
+ * When we close a ws connection, we can send a reason code and a short
+ * UTF-8 description back with the close packet.
+ */
+///@{
+
+/*
+ * NOTE: These public enums are part of the abi. If you want to add one,
+ * add it at where specified so existing users are unaffected.
+ */
+/** enum lws_close_status - RFC6455 close status codes */
+enum lws_close_status {
+ LWS_CLOSE_STATUS_NOSTATUS = 0,
+ LWS_CLOSE_STATUS_NORMAL = 1000,
+ /**< 1000 indicates a normal closure, meaning that the purpose for
+ which the connection was established has been fulfilled. */
+ LWS_CLOSE_STATUS_GOINGAWAY = 1001,
+ /**< 1001 indicates that an endpoint is "going away", such as a server
+ going down or a browser having navigated away from a page. */
+ LWS_CLOSE_STATUS_PROTOCOL_ERR = 1002,
+ /**< 1002 indicates that an endpoint is terminating the connection due
+ to a protocol error. */
+ LWS_CLOSE_STATUS_UNACCEPTABLE_OPCODE = 1003,
+ /**< 1003 indicates that an endpoint is terminating the connection
+ because it has received a type of data it cannot accept (e.g., an
+ endpoint that understands only text data MAY send this if it
+ receives a binary message). */
+ LWS_CLOSE_STATUS_RESERVED = 1004,
+ /**< Reserved. The specific meaning might be defined in the future. */
+ LWS_CLOSE_STATUS_NO_STATUS = 1005,
+ /**< 1005 is a reserved value and MUST NOT be set as a status code in a
+ Close control frame by an endpoint. It is designated for use in
+ applications expecting a status code to indicate that no status
+ code was actually present. */
+ LWS_CLOSE_STATUS_ABNORMAL_CLOSE = 1006,
+ /**< 1006 is a reserved value and MUST NOT be set as a status code in a
+ Close control frame by an endpoint. It is designated for use in
+ applications expecting a status code to indicate that the
+ connection was closed abnormally, e.g., without sending or
+ receiving a Close control frame. */
+ LWS_CLOSE_STATUS_INVALID_PAYLOAD = 1007,
+ /**< 1007 indicates that an endpoint is terminating the connection
+ because it has received data within a message that was not
+ consistent with the type of the message (e.g., non-UTF-8 [RFC3629]
+ data within a text message). */
+ LWS_CLOSE_STATUS_POLICY_VIOLATION = 1008,
+ /**< 1008 indicates that an endpoint is terminating the connection
+ because it has received a message that violates its policy. This
+ is a generic status code that can be returned when there is no
+ other more suitable status code (e.g., 1003 or 1009) or if there
+ is a need to hide specific details about the policy. */
+ LWS_CLOSE_STATUS_MESSAGE_TOO_LARGE = 1009,
+ /**< 1009 indicates that an endpoint is terminating the connection
+ because it has received a message that is too big for it to
+ process. */
+ LWS_CLOSE_STATUS_EXTENSION_REQUIRED = 1010,
+ /**< 1010 indicates that an endpoint (client) is terminating the
+ connection because it has expected the server to negotiate one or
+ more extension, but the server didn't return them in the response
+ message of the WebSocket handshake. The list of extensions that
+ are needed SHOULD appear in the /reason/ part of the Close frame.
+ Note that this status code is not used by the server, because it
+ can fail the WebSocket handshake instead */
+ LWS_CLOSE_STATUS_UNEXPECTED_CONDITION = 1011,
+ /**< 1011 indicates that a server is terminating the connection because
+ it encountered an unexpected condition that prevented it from
+ fulfilling the request. */
+ LWS_CLOSE_STATUS_TLS_FAILURE = 1015,
+ /**< 1015 is a reserved value and MUST NOT be set as a status code in a
+ Close control frame by an endpoint. It is designated for use in
+ applications expecting a status code to indicate that the
+ connection was closed due to a failure to perform a TLS handshake
+ (e.g., the server certificate can't be verified). */
+
+ LWS_CLOSE_STATUS_CLIENT_TRANSACTION_DONE = 2000,
+
+ /****** add new things just above ---^ ******/
+
+ LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY = 9999,
+};
+
+/**
+ * lws_close_reason - Set reason and aux data to send with Close packet
+ * If you are going to return nonzero from the callback
+ * requesting the connection to close, you can optionally
+ * call this to set the reason the peer will be told if
+ * possible.
+ *
+ * \param wsi: The websocket connection to set the close reason on
+ * \param status: A valid close status from websocket standard
+ * \param buf: NULL or buffer containing up to 124 bytes of auxiliary data
+ * \param len: Length of data in \param buf to send
+ */
+LWS_VISIBLE LWS_EXTERN void
+lws_close_reason(struct lws *wsi, enum lws_close_status status,
+ unsigned char *buf, size_t len);
+
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-ws-ext.h b/thirdparty/libwebsockets/include/libwebsockets/lws-ws-ext.h
new file mode 100644
index 0000000000..3face4f344
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-ws-ext.h
@@ -0,0 +1,197 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/*! \defgroup extensions Extension related functions
+ * ##Extension releated functions
+ *
+ * Ws defines optional extensions, lws provides the ability to implement these
+ * in user code if so desired.
+ *
+ * We provide one extensions permessage-deflate.
+ */
+///@{
+
+/*
+ * NOTE: These public enums are part of the abi. If you want to add one,
+ * add it at where specified so existing users are unaffected.
+ */
+enum lws_extension_callback_reasons {
+ LWS_EXT_CB_CONSTRUCT = 4,
+ LWS_EXT_CB_CLIENT_CONSTRUCT = 5,
+ LWS_EXT_CB_DESTROY = 8,
+ LWS_EXT_CB_PACKET_TX_PRESEND = 12,
+ LWS_EXT_CB_PAYLOAD_TX = 21,
+ LWS_EXT_CB_PAYLOAD_RX = 22,
+ LWS_EXT_CB_OPTION_DEFAULT = 23,
+ LWS_EXT_CB_OPTION_SET = 24,
+ LWS_EXT_CB_OPTION_CONFIRM = 25,
+ LWS_EXT_CB_NAMED_OPTION_SET = 26,
+
+ /****** add new things just above ---^ ******/
+};
+
+/** enum lws_ext_options_types */
+enum lws_ext_options_types {
+ EXTARG_NONE, /**< does not take an argument */
+ EXTARG_DEC, /**< requires a decimal argument */
+ EXTARG_OPT_DEC /**< may have an optional decimal argument */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility */
+};
+
+/** struct lws_ext_options - Option arguments to the extension. These are
+ * used in the negotiation at ws upgrade time.
+ * The helper function lws_ext_parse_options()
+ * uses these to generate callbacks */
+struct lws_ext_options {
+ const char *name; /**< Option name, eg, "server_no_context_takeover" */
+ enum lws_ext_options_types type; /**< What kind of args the option can take */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility */
+};
+
+/** struct lws_ext_option_arg */
+struct lws_ext_option_arg {
+ const char *option_name; /**< may be NULL, option_index used then */
+ int option_index; /**< argument ordinal to use if option_name missing */
+ const char *start; /**< value */
+ int len; /**< length of value */
+};
+
+/**
+ * typedef lws_extension_callback_function() - Hooks to allow extensions to operate
+ * \param context: Websockets context
+ * \param ext: This extension
+ * \param wsi: Opaque websocket instance pointer
+ * \param reason: The reason for the call
+ * \param user: Pointer to ptr to per-session user data allocated by library
+ * \param in: Pointer used for some callback reasons
+ * \param len: Length set for some callback reasons
+ *
+ * Each extension that is active on a particular connection receives
+ * callbacks during the connection lifetime to allow the extension to
+ * operate on websocket data and manage itself.
+ *
+ * Libwebsockets takes care of allocating and freeing "user" memory for
+ * each active extension on each connection. That is what is pointed to
+ * by the user parameter.
+ *
+ * LWS_EXT_CB_CONSTRUCT: called when the server has decided to
+ * select this extension from the list provided by the client,
+ * just before the server will send back the handshake accepting
+ * the connection with this extension active. This gives the
+ * extension a chance to initialize its connection context found
+ * in user.
+ *
+ * LWS_EXT_CB_CLIENT_CONSTRUCT: same as LWS_EXT_CB_CONSTRUCT
+ * but called when client is instantiating this extension. Some
+ * extensions will work the same on client and server side and then
+ * you can just merge handlers for both CONSTRUCTS.
+ *
+ * LWS_EXT_CB_DESTROY: called when the connection the extension was
+ * being used on is about to be closed and deallocated. It's the
+ * last chance for the extension to deallocate anything it has
+ * allocated in the user data (pointed to by user) before the
+ * user data is deleted. This same callback is used whether you
+ * are in client or server instantiation context.
+ *
+ * LWS_EXT_CB_PACKET_TX_PRESEND: this works the same way as
+ * LWS_EXT_CB_PACKET_RX_PREPARSE above, except it gives the
+ * extension a chance to change websocket data just before it will
+ * be sent out. Using the same lws_token pointer scheme in in,
+ * the extension can change the buffer and the length to be
+ * transmitted how it likes. Again if it wants to grow the
+ * buffer safely, it should copy the data into its own buffer and
+ * set the lws_tokens token pointer to it.
+ *
+ * LWS_EXT_CB_ARGS_VALIDATE:
+ */
+typedef int
+lws_extension_callback_function(struct lws_context *context,
+ const struct lws_extension *ext, struct lws *wsi,
+ enum lws_extension_callback_reasons reason,
+ void *user, void *in, size_t len);
+
+/** struct lws_extension - An extension we support */
+struct lws_extension {
+ const char *name; /**< Formal extension name, eg, "permessage-deflate" */
+ lws_extension_callback_function *callback; /**< Service callback */
+ const char *client_offer; /**< String containing exts and options client offers */
+
+ /* Add new things just above here ---^
+ * This is part of the ABI, don't needlessly break compatibility */
+};
+
+/**
+ * lws_set_extension_option(): set extension option if possible
+ *
+ * \param wsi: websocket connection
+ * \param ext_name: name of ext, like "permessage-deflate"
+ * \param opt_name: name of option, like "rx_buf_size"
+ * \param opt_val: value to set option to
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_set_extension_option(struct lws *wsi, const char *ext_name,
+ const char *opt_name, const char *opt_val);
+
+/**
+ * lws_ext_parse_options() - deal with parsing negotiated extension options
+ *
+ * \param ext: related extension struct
+ * \param wsi: websocket connection
+ * \param ext_user: per-connection extension private data
+ * \param opts: list of supported options
+ * \param o: option string to parse
+ * \param len: length
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_ext_parse_options(const struct lws_extension *ext, struct lws *wsi,
+ void *ext_user, const struct lws_ext_options *opts,
+ const char *o, int len);
+
+/** lws_extension_callback_pm_deflate() - extension for RFC7692
+ *
+ * \param context: lws context
+ * \param ext: related lws_extension struct
+ * \param wsi: websocket connection
+ * \param reason: incoming callback reason
+ * \param user: per-connection extension private data
+ * \param in: pointer parameter
+ * \param len: length parameter
+ *
+ * Built-in callback implementing RFC7692 permessage-deflate
+ */
+LWS_EXTERN int
+lws_extension_callback_pm_deflate(struct lws_context *context,
+ const struct lws_extension *ext,
+ struct lws *wsi,
+ enum lws_extension_callback_reasons reason,
+ void *user, void *in, size_t len);
+
+/*
+ * The internal exts are part of the public abi
+ * If we add more extensions, publish the callback here ------v
+ */
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-ws-state.h b/thirdparty/libwebsockets/include/libwebsockets/lws-ws-state.h
new file mode 100644
index 0000000000..3f65724a7a
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-ws-state.h
@@ -0,0 +1,92 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+/** \defgroup wsstatus Websocket status APIs
+ * ##Websocket connection status APIs
+ *
+ * These provide information about ws connection or message status
+ */
+///@{
+/**
+ * lws_send_pipe_choked() - tests if socket is writable or not
+ * \param wsi: lws connection
+ *
+ * Allows you to check if you can write more on the socket
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_send_pipe_choked(struct lws *wsi);
+
+/**
+ * lws_is_final_fragment() - tests if last part of ws message
+ *
+ * \param wsi: lws connection
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_is_final_fragment(struct lws *wsi);
+
+/**
+ * lws_is_first_fragment() - tests if first part of ws message
+ *
+ * \param wsi: lws connection
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_is_first_fragment(struct lws *wsi);
+
+/**
+ * lws_get_reserved_bits() - access reserved bits of ws frame
+ * \param wsi: lws connection
+ */
+LWS_VISIBLE LWS_EXTERN unsigned char
+lws_get_reserved_bits(struct lws *wsi);
+
+/**
+ * lws_partial_buffered() - find out if lws buffered the last write
+ * \param wsi: websocket connection to check
+ *
+ * Returns 1 if you cannot use lws_write because the last
+ * write on this connection is still buffered, and can't be cleared without
+ * returning to the service loop and waiting for the connection to be
+ * writeable again.
+ *
+ * If you will try to do >1 lws_write call inside a single
+ * WRITEABLE callback, you must check this after every write and bail if
+ * set, ask for a new writeable callback and continue writing from there.
+ *
+ * This is never set at the start of a writeable callback, but any write
+ * may set it.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_partial_buffered(struct lws *wsi);
+
+/**
+ * lws_frame_is_binary(): true if the current frame was sent in binary mode
+ *
+ * \param wsi: the connection we are inquiring about
+ *
+ * This is intended to be called from the LWS_CALLBACK_RECEIVE callback if
+ * it's interested to see if the frame it's dealing with was sent in binary
+ * mode.
+ */
+LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
+lws_frame_is_binary(struct lws *wsi);
+///@}
diff --git a/thirdparty/libwebsockets/include/libwebsockets/lws-x509.h b/thirdparty/libwebsockets/include/libwebsockets/lws-x509.h
new file mode 100644
index 0000000000..f8e5cb0fad
--- /dev/null
+++ b/thirdparty/libwebsockets/include/libwebsockets/lws-x509.h
@@ -0,0 +1,177 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * included from libwebsockets.h
+ */
+
+enum lws_tls_cert_info {
+ LWS_TLS_CERT_INFO_VALIDITY_FROM,
+ /**< fills .time with the time_t the cert validity started from */
+ LWS_TLS_CERT_INFO_VALIDITY_TO,
+ /**< fills .time with the time_t the cert validity ends at */
+ LWS_TLS_CERT_INFO_COMMON_NAME,
+ /**< fills up to len bytes of .ns.name with the cert common name */
+ LWS_TLS_CERT_INFO_ISSUER_NAME,
+ /**< fills up to len bytes of .ns.name with the cert issuer name */
+ LWS_TLS_CERT_INFO_USAGE,
+ /**< fills verified with a bitfield asserting the valid uses */
+ LWS_TLS_CERT_INFO_VERIFIED,
+ /**< fills .verified with a bool representing peer cert validity,
+ * call returns -1 if no cert */
+ LWS_TLS_CERT_INFO_OPAQUE_PUBLIC_KEY,
+ /**< the certificate's public key, as an opaque bytestream. These
+ * opaque bytestreams can only be compared with each other using the
+ * same tls backend, ie, OpenSSL or mbedTLS. The different backends
+ * produce different, incompatible representations for the same cert.
+ */
+};
+
+union lws_tls_cert_info_results {
+ unsigned int verified;
+ time_t time;
+ unsigned int usage;
+ struct {
+ int len;
+ /* KEEP LAST... notice the [64] is only there because
+ * name[] is not allowed in a union. The actual length of
+ * name[] is arbitrary and is passed into the api using the
+ * len parameter. Eg
+ *
+ * char big[1024];
+ * union lws_tls_cert_info_results *buf =
+ * (union lws_tls_cert_info_results *)big;
+ *
+ * lws_tls_peer_cert_info(wsi, type, buf, sizeof(big) -
+ * sizeof(*buf) + sizeof(buf->ns.name));
+ */
+ char name[64];
+ } ns;
+};
+
+/**
+ * lws_tls_peer_cert_info() - get information from the peer's TLS cert
+ *
+ * \param wsi: the connection to query
+ * \param type: one of LWS_TLS_CERT_INFO_
+ * \param buf: pointer to union to take result
+ * \param len: when result is a string, the true length of buf->ns.name[]
+ *
+ * lws_tls_peer_cert_info() lets you get hold of information from the peer
+ * certificate.
+ *
+ * Return 0 if there is a result in \p buf, or -1 indicating there was no cert
+ * or another problem.
+ *
+ * This function works the same no matter if the TLS backend is OpenSSL or
+ * mbedTLS.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_tls_peer_cert_info(struct lws *wsi, enum lws_tls_cert_info type,
+ union lws_tls_cert_info_results *buf, size_t len);
+
+/**
+ * lws_tls_vhost_cert_info() - get information from the vhost's own TLS cert
+ *
+ * \param vhost: the vhost to query
+ * \param type: one of LWS_TLS_CERT_INFO_
+ * \param buf: pointer to union to take result
+ * \param len: when result is a string, the true length of buf->ns.name[]
+ *
+ * lws_tls_vhost_cert_info() lets you get hold of information from the vhost
+ * certificate.
+ *
+ * Return 0 if there is a result in \p buf, or -1 indicating there was no cert
+ * or another problem.
+ *
+ * This function works the same no matter if the TLS backend is OpenSSL or
+ * mbedTLS.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_tls_vhost_cert_info(struct lws_vhost *vhost, enum lws_tls_cert_info type,
+ union lws_tls_cert_info_results *buf, size_t len);
+
+/**
+ * lws_tls_acme_sni_cert_create() - creates a temp selfsigned cert
+ * and attaches to a vhost
+ *
+ * \param vhost: the vhost to acquire the selfsigned cert
+ * \param san_a: SAN written into the certificate
+ * \param san_b: second SAN written into the certificate
+ *
+ *
+ * Returns 0 if created and attached to the vhost. Returns -1 if problems and
+ * frees all allocations before returning.
+ *
+ * On success, any allocations are destroyed at vhost destruction automatically.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_tls_acme_sni_cert_create(struct lws_vhost *vhost, const char *san_a,
+ const char *san_b);
+
+/**
+ * lws_tls_acme_sni_csr_create() - creates a CSR and related private key PEM
+ *
+ * \param context: lws_context used for random
+ * \param elements: array of LWS_TLS_REQ_ELEMENT_COUNT const char *
+ * \param csr: buffer that will get the b64URL(ASN-1 CSR)
+ * \param csr_len: max length of the csr buffer
+ * \param privkey_pem: pointer to pointer allocated to hold the privkey_pem
+ * \param privkey_len: pointer to size_t set to the length of the privkey_pem
+ *
+ * Creates a CSR according to the information in \p elements, and a private
+ * RSA key used to sign the CSR.
+ *
+ * The outputs are the b64URL(ASN-1 CSR) into csr, and the PEM private key into
+ * privkey_pem.
+ *
+ * Notice that \p elements points to an array of const char *s pointing to the
+ * information listed in the enum above. If an entry is NULL or an empty
+ * string, the element is set to "none" in the CSR.
+ *
+ * Returns 0 on success or nonzero for failure.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_tls_acme_sni_csr_create(struct lws_context *context, const char *elements[],
+ uint8_t *csr, size_t csr_len, char **privkey_pem,
+ size_t *privkey_len);
+
+/**
+ * lws_tls_cert_updated() - update every vhost using the given cert path
+ *
+ * \param context: our lws_context
+ * \param certpath: the filepath to the certificate
+ * \param keypath: the filepath to the private key of the certificate
+ * \param mem_cert: copy of the cert in memory
+ * \param len_mem_cert: length of the copy of the cert in memory
+ * \param mem_privkey: copy of the private key in memory
+ * \param len_mem_privkey: length of the copy of the private key in memory
+ *
+ * Checks every vhost to see if it is the using certificate described by the
+ * the given filepaths. If so, it attempts to update the vhost ssl_ctx to use
+ * the new certificate.
+ *
+ * Returns 0 on success or nonzero for failure.
+ */
+LWS_VISIBLE LWS_EXTERN int
+lws_tls_cert_updated(struct lws_context *context, const char *certpath,
+ const char *keypath,
+ const char *mem_cert, size_t len_mem_cert,
+ const char *mem_privkey, size_t len_mem_privkey);
+
diff --git a/thirdparty/libwebsockets/lws_config.h b/thirdparty/libwebsockets/include/lws_config.h
index 86ce9ac38a..fdf02157cc 100644
--- a/thirdparty/libwebsockets/lws_config.h
+++ b/thirdparty/libwebsockets/include/lws_config.h
@@ -77,7 +77,10 @@
/* #undef LWS_WITH_LIBEVENT */
/* Build with support for ipv6 */
-/* #undef LWS_WITH_IPV6 */
+/* Everywhere, except in OpenBSD which does not support dual stacking */
+#if !defined(__OpenBSD__)
+#define LWS_WITH_IPV6
+#endif
/* Build with support for UNIX domain socket */
/* #undef LWS_WITH_UNIX_SOCK */
diff --git a/thirdparty/libwebsockets/ipv6_fixes.diff b/thirdparty/libwebsockets/ipv6_fixes.diff
new file mode 100644
index 0000000000..5fa1e5c520
--- /dev/null
+++ b/thirdparty/libwebsockets/ipv6_fixes.diff
@@ -0,0 +1,32 @@
+diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c b/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
+index 693efd28e..192dddee6 100644
+--- a/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
++++ b/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
+@@ -73,6 +73,11 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd, int unix_skt)
+ int optval = 1;
+ socklen_t optlen = sizeof(optval);
+
++#ifdef LWS_WITH_IPV6
++ optval = 0;
++ setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void*)&optval, optlen);
++#endif
++
+ #if defined(__APPLE__) || \
+ defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__NetBSD__) || \
+diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c b/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
+index bf0935057..62a0a4984 100644
+--- a/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
++++ b/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
+@@ -56,6 +56,11 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd,
+ struct protoent *tcp_proto;
+ #endif
+
++#ifdef LWS_WITH_IPV6
++ optval = 0;
++ setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void*)&optval, optlen);
++#endif
++
+ if (vhost->ka_time) {
+ /* enable keepalive on this socket */
+ optval = 1;
diff --git a/thirdparty/libwebsockets/lib/core/adopt.c b/thirdparty/libwebsockets/lib/core/adopt.c
new file mode 100644
index 0000000000..49ac5af161
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/core/adopt.c
@@ -0,0 +1,414 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include "core/private.h"
+
+
+static int
+lws_get_idlest_tsi(struct lws_context *context)
+{
+ unsigned int lowest = ~0;
+ int n = 0, hit = -1;
+
+ for (; n < context->count_threads; n++) {
+ if ((unsigned int)context->pt[n].fds_count !=
+ context->fd_limit_per_thread - 1 &&
+ (unsigned int)context->pt[n].fds_count < lowest) {
+ lowest = context->pt[n].fds_count;
+ hit = n;
+ }
+ }
+
+ return hit;
+}
+
+struct lws *
+lws_create_new_server_wsi(struct lws_vhost *vhost, int fixed_tsi)
+{
+ struct lws *new_wsi;
+ int n = fixed_tsi;
+
+ if (n < 0)
+ n = lws_get_idlest_tsi(vhost->context);
+
+ if (n < 0) {
+ lwsl_err("no space for new conn\n");
+ return NULL;
+ }
+
+ new_wsi = lws_zalloc(sizeof(struct lws), "new server wsi");
+ if (new_wsi == NULL) {
+ lwsl_err("Out of memory for new connection\n");
+ return NULL;
+ }
+
+ new_wsi->tsi = n;
+ lwsl_debug("new wsi %p joining vhost %s, tsi %d\n", new_wsi,
+ vhost->name, new_wsi->tsi);
+
+ lws_vhost_bind_wsi(vhost, new_wsi);
+ new_wsi->context = vhost->context;
+ new_wsi->pending_timeout = NO_PENDING_TIMEOUT;
+ new_wsi->rxflow_change_to = LWS_RXFLOW_ALLOW;
+
+ /* initialize the instance struct */
+
+ lwsi_set_state(new_wsi, LRS_UNCONNECTED);
+ new_wsi->hdr_parsing_completed = 0;
+
+#ifdef LWS_WITH_TLS
+ new_wsi->tls.use_ssl = LWS_SSL_ENABLED(vhost);
+#endif
+
+ /*
+ * these can only be set once the protocol is known
+ * we set an un-established connection's protocol pointer
+ * to the start of the supported list, so it can look
+ * for matching ones during the handshake
+ */
+ new_wsi->protocol = vhost->protocols;
+ new_wsi->user_space = NULL;
+ new_wsi->desc.sockfd = LWS_SOCK_INVALID;
+ new_wsi->position_in_fds_table = LWS_NO_FDS_POS;
+
+ vhost->context->count_wsi_allocated++;
+
+ /*
+ * outermost create notification for wsi
+ * no user_space because no protocol selection
+ */
+ vhost->protocols[0].callback(new_wsi, LWS_CALLBACK_WSI_CREATE, NULL,
+ NULL, 0);
+
+ return new_wsi;
+}
+
+
+/* if not a socket, it's a raw, non-ssl file descriptor */
+
+LWS_VISIBLE struct lws *
+lws_adopt_descriptor_vhost(struct lws_vhost *vh, lws_adoption_type type,
+ lws_sock_file_fd_type fd, const char *vh_prot_name,
+ struct lws *parent)
+{
+ struct lws_context *context = vh->context;
+ struct lws *new_wsi;
+ struct lws_context_per_thread *pt;
+ int n;
+
+#if defined(LWS_WITH_PEER_LIMITS)
+ struct lws_peer *peer = NULL;
+
+ if (type & LWS_ADOPT_SOCKET) {
+ peer = lws_get_or_create_peer(vh, fd.sockfd);
+
+ if (peer && context->ip_limit_wsi &&
+ peer->count_wsi >= context->ip_limit_wsi) {
+ lwsl_notice("Peer reached wsi limit %d\n",
+ context->ip_limit_wsi);
+ lws_stats_atomic_bump(context, &context->pt[0],
+ LWSSTATS_C_PEER_LIMIT_WSI_DENIED,
+ 1);
+ return NULL;
+ }
+ }
+#endif
+
+ n = -1;
+ if (parent)
+ n = parent->tsi;
+ new_wsi = lws_create_new_server_wsi(vh, n);
+ if (!new_wsi) {
+ if (type & LWS_ADOPT_SOCKET)
+ compatible_close(fd.sockfd);
+ return NULL;
+ }
+#if defined(LWS_WITH_PEER_LIMITS)
+ if (peer)
+ lws_peer_add_wsi(context, peer, new_wsi);
+#endif
+ pt = &context->pt[(int)new_wsi->tsi];
+ lws_stats_atomic_bump(context, pt, LWSSTATS_C_CONNECTIONS, 1);
+
+ if (parent) {
+ new_wsi->parent = parent;
+ new_wsi->sibling_list = parent->child_list;
+ parent->child_list = new_wsi;
+ }
+
+ new_wsi->desc = fd;
+
+ if (vh_prot_name) {
+ new_wsi->protocol = lws_vhost_name_to_protocol(new_wsi->vhost,
+ vh_prot_name);
+ if (!new_wsi->protocol) {
+ lwsl_err("Protocol %s not enabled on vhost %s\n",
+ vh_prot_name, new_wsi->vhost->name);
+ goto bail;
+ }
+ if (lws_ensure_user_space(new_wsi)) {
+ lwsl_notice("OOM trying to get user_space\n");
+ goto bail;
+ }
+ }
+
+ if (!LWS_SSL_ENABLED(new_wsi->vhost) || !(type & LWS_ADOPT_SOCKET))
+ type &= ~LWS_ADOPT_ALLOW_SSL;
+
+ if (lws_role_call_adoption_bind(new_wsi, type, vh_prot_name)) {
+ lwsl_err("Unable to find a role that can adopt descriptor\n");
+ goto bail;
+ }
+
+ /*
+ * A new connection was accepted. Give the user a chance to
+ * set properties of the newly created wsi. There's no protocol
+ * selected yet so we issue this to the vhosts's default protocol,
+ * itself by default protocols[0]
+ */
+ n = LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED;
+ if (!(type & LWS_ADOPT_HTTP)) {
+ if (!(type & LWS_ADOPT_SOCKET))
+ n = LWS_CALLBACK_RAW_ADOPT_FILE;
+ else
+ n = LWS_CALLBACK_RAW_ADOPT;
+ }
+
+ lwsl_debug("new wsi wsistate 0x%x\n", new_wsi->wsistate);
+
+ if (context->event_loop_ops->accept)
+ if (context->event_loop_ops->accept(new_wsi))
+ goto fail;
+
+ if (!(type & LWS_ADOPT_ALLOW_SSL)) {
+ lws_pt_lock(pt, __func__);
+ if (__insert_wsi_socket_into_fds(context, new_wsi)) {
+ lws_pt_unlock(pt);
+ lwsl_err("%s: fail inserting socket\n", __func__);
+ goto fail;
+ }
+ lws_pt_unlock(pt);
+ } else
+ if (lws_server_socket_service_ssl(new_wsi, fd.sockfd)) {
+ lwsl_info("%s: fail ssl negotiation\n", __func__);
+ goto fail;
+ }
+
+ /*
+ * by deferring callback to this point, after insertion to fds,
+ * lws_callback_on_writable() can work from the callback
+ */
+ if ((new_wsi->protocol->callback)(new_wsi, n, new_wsi->user_space,
+ NULL, 0))
+ goto fail;
+
+ /* role may need to do something after all adoption completed */
+
+ lws_role_call_adoption_bind(new_wsi, type | _LWS_ADOPT_FINISH,
+ vh_prot_name);
+
+ lws_cancel_service_pt(new_wsi);
+
+ return new_wsi;
+
+fail:
+ if (type & LWS_ADOPT_SOCKET)
+ lws_close_free_wsi(new_wsi, LWS_CLOSE_STATUS_NOSTATUS,
+ "adopt skt fail");
+
+ return NULL;
+
+bail:
+ lwsl_notice("%s: exiting on bail\n", __func__);
+ if (parent)
+ parent->child_list = new_wsi->sibling_list;
+ if (new_wsi->user_space)
+ lws_free(new_wsi->user_space);
+
+ vh->context->count_wsi_allocated--;
+
+ lws_vhost_unbind_wsi(new_wsi);
+ lws_free(new_wsi);
+
+ compatible_close(fd.sockfd);
+
+ return NULL;
+}
+
+LWS_VISIBLE struct lws *
+lws_adopt_socket_vhost(struct lws_vhost *vh, lws_sockfd_type accept_fd)
+{
+ lws_sock_file_fd_type fd;
+
+ fd.sockfd = accept_fd;
+ return lws_adopt_descriptor_vhost(vh, LWS_ADOPT_SOCKET |
+ LWS_ADOPT_HTTP | LWS_ADOPT_ALLOW_SSL, fd, NULL, NULL);
+}
+
+LWS_VISIBLE struct lws *
+lws_adopt_socket(struct lws_context *context, lws_sockfd_type accept_fd)
+{
+ return lws_adopt_socket_vhost(context->vhost_list, accept_fd);
+}
+
+/* Common read-buffer adoption for lws_adopt_*_readbuf */
+static struct lws*
+adopt_socket_readbuf(struct lws *wsi, const char *readbuf, size_t len)
+{
+ struct lws_context_per_thread *pt;
+ struct lws_pollfd *pfd;
+ int n;
+
+ if (!wsi)
+ return NULL;
+
+ if (!readbuf || len == 0)
+ return wsi;
+
+ if (wsi->position_in_fds_table == LWS_NO_FDS_POS)
+ return wsi;
+
+ pt = &wsi->context->pt[(int)wsi->tsi];
+
+ n = lws_buflist_append_segment(&wsi->buflist, (const uint8_t *)readbuf,
+ len);
+ if (n < 0)
+ goto bail;
+ if (n)
+ lws_dll_lws_add_front(&wsi->dll_buflist, &pt->dll_head_buflist);
+
+ /*
+ * we can't process the initial read data until we can attach an ah.
+ *
+ * if one is available, get it and place the data in his ah rxbuf...
+ * wsi with ah that have pending rxbuf get auto-POLLIN service.
+ *
+ * no autoservice because we didn't get a chance to attach the
+ * readbuf data to wsi or ah yet, and we will do it next if we get
+ * the ah.
+ */
+ if (wsi->http.ah || !lws_header_table_attach(wsi, 0)) {
+
+ lwsl_notice("%s: calling service on readbuf ah\n", __func__);
+
+ /*
+ * unlike a normal connect, we have the headers already
+ * (or the first part of them anyway).
+ * libuv won't come back and service us without a network
+ * event, so we need to do the header service right here.
+ */
+ pfd = &pt->fds[wsi->position_in_fds_table];
+ pfd->revents |= LWS_POLLIN;
+ lwsl_err("%s: calling service\n", __func__);
+ if (lws_service_fd_tsi(wsi->context, pfd, wsi->tsi))
+ /* service closed us */
+ return NULL;
+
+ return wsi;
+ }
+ lwsl_err("%s: deferring handling ah\n", __func__);
+
+ return wsi;
+
+bail:
+ lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS,
+ "adopt skt readbuf fail");
+
+ return NULL;
+}
+
+LWS_EXTERN struct lws *
+lws_create_adopt_udp(struct lws_vhost *vhost, int port, int flags,
+ const char *protocol_name, struct lws *parent_wsi)
+{
+ lws_sock_file_fd_type sock;
+ struct addrinfo h, *r, *rp;
+ struct lws *wsi = NULL;
+ char buf[16];
+ int n;
+
+ memset(&h, 0, sizeof(h));
+ h.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
+ h.ai_socktype = SOCK_DGRAM;
+ h.ai_protocol = IPPROTO_UDP;
+ h.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
+
+ lws_snprintf(buf, sizeof(buf), "%u", port);
+ n = getaddrinfo(NULL, buf, &h, &r);
+ if (n) {
+ lwsl_info("%s: getaddrinfo error: %s\n", __func__,
+ gai_strerror(n));
+ goto bail;
+ }
+
+ for (rp = r; rp; rp = rp->ai_next) {
+ sock.sockfd = socket(rp->ai_family, rp->ai_socktype,
+ rp->ai_protocol);
+ if (sock.sockfd != LWS_SOCK_INVALID)
+ break;
+ }
+ if (!rp) {
+ lwsl_err("%s: unable to create INET socket\n", __func__);
+ goto bail1;
+ }
+
+ if ((flags & LWS_CAUDP_BIND) && bind(sock.sockfd, rp->ai_addr,
+#if defined(_WIN32)
+ (int)rp->ai_addrlen
+#else
+ rp->ai_addrlen
+#endif
+ ) == -1) {
+ lwsl_err("%s: bind failed\n", __func__);
+ goto bail2;
+ }
+
+ wsi = lws_adopt_descriptor_vhost(vhost, LWS_ADOPT_RAW_SOCKET_UDP, sock,
+ protocol_name, parent_wsi);
+ if (!wsi)
+ lwsl_err("%s: udp adoption failed\n", __func__);
+
+bail2:
+ if (!wsi)
+ compatible_close((int)sock.sockfd);
+bail1:
+ freeaddrinfo(r);
+
+bail:
+ return wsi;
+}
+
+LWS_VISIBLE struct lws *
+lws_adopt_socket_readbuf(struct lws_context *context, lws_sockfd_type accept_fd,
+ const char *readbuf, size_t len)
+{
+ return adopt_socket_readbuf(lws_adopt_socket(context, accept_fd),
+ readbuf, len);
+}
+
+LWS_VISIBLE struct lws *
+lws_adopt_socket_vhost_readbuf(struct lws_vhost *vhost,
+ lws_sockfd_type accept_fd,
+ const char *readbuf, size_t len)
+{
+ return adopt_socket_readbuf(lws_adopt_socket_vhost(vhost, accept_fd),
+ readbuf, len);
+}
diff --git a/thirdparty/libwebsockets/core/alloc.c b/thirdparty/libwebsockets/lib/core/alloc.c
index f169fc3767..f169fc3767 100644
--- a/thirdparty/libwebsockets/core/alloc.c
+++ b/thirdparty/libwebsockets/lib/core/alloc.c
diff --git a/thirdparty/libwebsockets/lib/core/connect.c b/thirdparty/libwebsockets/lib/core/connect.c
new file mode 100644
index 0000000000..daffc193c8
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/core/connect.c
@@ -0,0 +1,287 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include "core/private.h"
+
+void
+lws_client_stash_destroy(struct lws *wsi)
+{
+ if (!wsi || !wsi->stash)
+ return;
+
+ lws_free_set_NULL(wsi->stash->address);
+ lws_free_set_NULL(wsi->stash->path);
+ lws_free_set_NULL(wsi->stash->host);
+ lws_free_set_NULL(wsi->stash->origin);
+ lws_free_set_NULL(wsi->stash->protocol);
+ lws_free_set_NULL(wsi->stash->method);
+ lws_free_set_NULL(wsi->stash->iface);
+ lws_free_set_NULL(wsi->stash->alpn);
+
+ lws_free_set_NULL(wsi->stash);
+}
+
+LWS_VISIBLE struct lws *
+lws_client_connect_via_info(const struct lws_client_connect_info *i)
+{
+ struct lws *wsi, *safe = NULL;
+ const struct lws_protocols *p;
+ const char *local = i->protocol;
+#if LWS_MAX_SMP > 1
+ int n, tid;
+#endif
+
+ if (i->context->requested_kill)
+ return NULL;
+
+ if (!i->context->protocol_init_done)
+ lws_protocol_init(i->context);
+ /*
+ * If we have .local_protocol_name, use it to select the local protocol
+ * handler to bind to. Otherwise use .protocol if http[s].
+ */
+ if (i->local_protocol_name)
+ local = i->local_protocol_name;
+
+ /* PHASE 1: create a bare wsi */
+
+ wsi = lws_zalloc(sizeof(struct lws), "client wsi");
+ if (wsi == NULL)
+ goto bail;
+
+ wsi->context = i->context;
+ wsi->desc.sockfd = LWS_SOCK_INVALID;
+
+ wsi->vhost = NULL;
+ if (!i->vhost)
+ lws_vhost_bind_wsi(i->context->vhost_list, wsi);
+ else
+ lws_vhost_bind_wsi(i->vhost, wsi);
+
+ if (!wsi->vhost) {
+ lwsl_err("%s: No vhost in the context\n", __func__);
+
+ goto bail;
+ }
+
+ /*
+ * PHASE 2: if SMP, bind the client to whatever tsi the current thread
+ * represents
+ */
+
+#if LWS_MAX_SMP > 1
+ tid = wsi->vhost->protocols[0].callback(wsi, LWS_CALLBACK_GET_THREAD_ID,
+ NULL, NULL, 0);
+
+ lws_context_lock(i->context, "client find tsi");
+
+ for (n = 0; n < i->context->count_threads; n++)
+ if (i->context->pt[n].service_tid == tid) {
+ lwsl_info("%s: client binds to caller tsi %d\n",
+ __func__, n);
+ wsi->tsi = n;
+ break;
+ }
+
+ /*
+ * this binding is sort of provisional, since when we try to insert
+ * into the pt fds, there may be no space and it will fail
+ */
+
+ lws_context_unlock(i->context);
+#endif
+
+ /*
+ * PHASE 3: Choose an initial role for the wsi and do role-specific init
+ *
+ * Note the initial role may not reflect the final role, eg,
+ * we may want ws, but first we have to go through h1 to get that
+ */
+
+ lws_role_call_client_bind(wsi, i);
+
+ /*
+ * PHASE 4: fill up the wsi with stuff from the connect_info as far as
+ * it can go. It's uncertain because not only is our connection
+ * going to complete asynchronously, we might have bound to h1 and not
+ * even be able to get ahold of an ah immediately.
+ */
+
+ wsi->user_space = NULL;
+ wsi->pending_timeout = NO_PENDING_TIMEOUT;
+ wsi->position_in_fds_table = LWS_NO_FDS_POS;
+ wsi->c_port = i->port;
+
+ wsi->protocol = &wsi->vhost->protocols[0];
+ wsi->client_pipeline = !!(i->ssl_connection & LCCSCF_PIPELINE);
+
+ /*
+ * PHASE 5: handle external user_space now, generic alloc is done in
+ * role finalization
+ */
+
+ if (!wsi->user_space && i->userdata) {
+ wsi->user_space_externally_allocated = 1;
+ wsi->user_space = i->userdata;
+ }
+
+ if (local) {
+ lwsl_info("%s: protocol binding to %s\n", __func__, local);
+ p = lws_vhost_name_to_protocol(wsi->vhost, local);
+ if (p)
+ lws_bind_protocol(wsi, p, __func__);
+ }
+
+ /*
+ * PHASE 5: handle external user_space now, generic alloc is done in
+ * role finalization
+ */
+
+ if (!wsi->user_space && i->userdata) {
+ wsi->user_space_externally_allocated = 1;
+ wsi->user_space = i->userdata;
+ }
+
+#if defined(LWS_WITH_TLS)
+ wsi->tls.use_ssl = i->ssl_connection;
+#else
+ if (i->ssl_connection & LCCSCF_USE_SSL) {
+ lwsl_err("%s: lws not configured for tls\n", __func__);
+ goto bail;
+ }
+#endif
+
+ /*
+ * PHASE 6: stash the things from connect_info that we can't process
+ * right now, eg, if http binding, without an ah. If h1 and no ah, we
+ * will go on the ah waiting list and process those things later (after
+ * the connect_info and maybe the things pointed to have gone out of
+ * scope)
+ *
+ * However these things are stashed in a generic way at this point,
+ * with no relationship to http or ah
+ */
+
+ wsi->stash = lws_zalloc(sizeof(*wsi->stash), "client stash");
+ if (!wsi->stash) {
+ lwsl_err("%s: OOM\n", __func__);
+ goto bail1;
+ }
+
+ wsi->stash->address = lws_strdup(i->address);
+ wsi->stash->path = lws_strdup(i->path);
+ wsi->stash->host = lws_strdup(i->host);
+
+ if (!wsi->stash->address || !wsi->stash->path || !wsi->stash->host)
+ goto bail1;
+
+ if (i->origin) {
+ wsi->stash->origin = lws_strdup(i->origin);
+ if (!wsi->stash->origin)
+ goto bail1;
+ }
+ if (i->protocol) {
+ wsi->stash->protocol = lws_strdup(i->protocol);
+ if (!wsi->stash->protocol)
+ goto bail1;
+ }
+ if (i->method) {
+ wsi->stash->method = lws_strdup(i->method);
+ if (!wsi->stash->method)
+ goto bail1;
+ }
+ if (i->iface) {
+ wsi->stash->iface = lws_strdup(i->iface);
+ if (!wsi->stash->iface)
+ goto bail1;
+ }
+ if (i->alpn) {
+ wsi->stash->alpn = lws_strdup(i->alpn);
+ if (!wsi->stash->alpn)
+ goto bail1;
+ }
+
+ /*
+ * at this point user callbacks like
+ * LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER will be interested to
+ * know the parent... eg for proxying we can grab extra headers from
+ * the parent's incoming ah and add them to the child client handshake
+ */
+
+ if (i->parent_wsi) {
+ lwsl_info("%s: created child %p of parent %p\n", __func__,
+ wsi, i->parent_wsi);
+ wsi->parent = i->parent_wsi;
+ safe = wsi->sibling_list = i->parent_wsi->child_list;
+ i->parent_wsi->child_list = wsi;
+ }
+
+ /*
+ * PHASE 7: Do any role-specific finalization processing. We can still
+ * see important info things via wsi->stash
+ */
+
+ if (wsi->role_ops->client_bind) {
+ int n = wsi->role_ops->client_bind(wsi, NULL);
+
+ if (n && i->parent_wsi) {
+ /* unpick from parent */
+
+ i->parent_wsi->child_list = safe;
+ }
+
+ if (n < 0)
+ /* we didn't survive, wsi is freed */
+ goto bail2;
+
+ if (n)
+ /* something else failed, wsi needs freeing */
+ goto bail;
+ }
+
+ /* let the caller's optional wsi storage have the wsi we created */
+
+ if (i->pwsi)
+ *i->pwsi = wsi;
+
+
+#if defined(LWS_WITH_HUBBUB)
+ if (i->uri_replace_to)
+ wsi->http.rw = lws_rewrite_create(wsi, html_parser_cb,
+ i->uri_replace_from,
+ i->uri_replace_to);
+#endif
+
+ return wsi;
+
+bail1:
+ lws_client_stash_destroy(wsi);
+
+bail:
+ lws_free(wsi);
+#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
+bail2:
+#endif
+ if (i->pwsi)
+ *i->pwsi = NULL;
+
+ return NULL;
+}
diff --git a/thirdparty/libwebsockets/core/context.c b/thirdparty/libwebsockets/lib/core/context.c
index 7be004df33..94b2d86339 100644
--- a/thirdparty/libwebsockets/core/context.c
+++ b/thirdparty/libwebsockets/lib/core/context.c
@@ -35,6 +35,9 @@ const struct lws_role_ops *available_roles[] = {
#if defined(LWS_ROLE_WS)
&role_ops_ws,
#endif
+#if defined(LWS_ROLE_DBUS)
+ &role_ops_dbus,
+#endif
NULL
};
@@ -86,6 +89,57 @@ lws_role_call_alpn_negotiated(struct lws *wsi, const char *alpn)
return 0;
}
+#if !defined(LWS_WITHOUT_SERVER)
+int
+lws_role_call_adoption_bind(struct lws *wsi, int type, const char *prot)
+{
+ LWS_FOR_EVERY_AVAILABLE_ROLE_START(ar)
+ if (ar->adoption_bind)
+ if (ar->adoption_bind(wsi, type, prot))
+ return 0;
+ LWS_FOR_EVERY_AVAILABLE_ROLE_END;
+
+ /* fall back to raw socket role if, eg, h1 not configured */
+
+ if (role_ops_raw_skt.adoption_bind &&
+ role_ops_raw_skt.adoption_bind(wsi, type, prot))
+ return 0;
+
+ /* fall back to raw file role if, eg, h1 not configured */
+
+ if (role_ops_raw_file.adoption_bind &&
+ role_ops_raw_file.adoption_bind(wsi, type, prot))
+ return 0;
+
+ return 1;
+}
+#endif
+
+#if !defined(LWS_WITHOUT_CLIENT)
+int
+lws_role_call_client_bind(struct lws *wsi,
+ const struct lws_client_connect_info *i)
+{
+ LWS_FOR_EVERY_AVAILABLE_ROLE_START(ar)
+ if (ar->client_bind) {
+ int m = ar->client_bind(wsi, i);
+ if (m < 0)
+ return m;
+ if (m)
+ return 0;
+ }
+ LWS_FOR_EVERY_AVAILABLE_ROLE_END;
+
+ /* fall back to raw socket role if, eg, h1 not configured */
+
+ if (role_ops_raw_skt.client_bind &&
+ role_ops_raw_skt.client_bind(wsi, i))
+ return 0;
+
+ return 1;
+}
+#endif
+
static const char * const mount_protocols[] = {
"http://",
"https://",
@@ -263,8 +317,10 @@ lws_protocol_init(struct lws_context *context)
(void *)pvo, 0)) {
lws_free(vh->protocol_vh_privs[n]);
vh->protocol_vh_privs[n] = NULL;
- lwsl_err("%s: protocol %s failed init\n", __func__,
- vh->protocols[n].name);
+ lwsl_err("%s: protocol %s failed init\n",
+ __func__, vh->protocols[n].name);
+
+ return 1;
}
}
@@ -286,229 +342,6 @@ next:
return 0;
}
-LWS_VISIBLE int
-lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
- void *user, void *in, size_t len)
-{
- struct lws_ssl_info *si;
-#ifdef LWS_WITH_CGI
- struct lws_cgi_args *args;
-#endif
-#if defined(LWS_WITH_CGI) || defined(LWS_WITH_HTTP_PROXY)
- char buf[512];
- int n;
-#endif
-
- switch (reason) {
-#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
- case LWS_CALLBACK_HTTP:
-#ifndef LWS_NO_SERVER
- if (lws_return_http_status(wsi, HTTP_STATUS_NOT_FOUND, NULL))
- return -1;
-
- if (lws_http_transaction_completed(wsi))
-#endif
- return -1;
- break;
-#if !defined(LWS_NO_SERVER)
- case LWS_CALLBACK_HTTP_FILE_COMPLETION:
- if (lws_http_transaction_completed(wsi))
- return -1;
- break;
-#endif
-
- case LWS_CALLBACK_HTTP_WRITEABLE:
-#ifdef LWS_WITH_CGI
- if (wsi->reason_bf & (LWS_CB_REASON_AUX_BF__CGI_HEADERS |
- LWS_CB_REASON_AUX_BF__CGI)) {
- n = lws_cgi_write_split_stdout_headers(wsi);
- if (n < 0) {
- lwsl_debug("AUX_BF__CGI forcing close\n");
- return -1;
- }
- if (!n)
- lws_rx_flow_control(
- wsi->http.cgi->stdwsi[LWS_STDOUT], 1);
-
- if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__CGI_HEADERS)
- wsi->reason_bf &=
- ~LWS_CB_REASON_AUX_BF__CGI_HEADERS;
- else
- wsi->reason_bf &= ~LWS_CB_REASON_AUX_BF__CGI;
- break;
- }
-
- if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__CGI_CHUNK_END) {
- if (!wsi->http2_substream) {
- memcpy(buf + LWS_PRE, "0\x0d\x0a\x0d\x0a", 5);
- lwsl_debug("writing chunk term and exiting\n");
- n = lws_write(wsi, (unsigned char *)buf +
- LWS_PRE, 5, LWS_WRITE_HTTP);
- } else
- n = lws_write(wsi, (unsigned char *)buf +
- LWS_PRE, 0,
- LWS_WRITE_HTTP_FINAL);
-
- /* always close after sending it */
- return -1;
- }
-#endif
-#if defined(LWS_WITH_HTTP_PROXY)
- if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__PROXY) {
- char *px = buf + LWS_PRE;
- int lenx = sizeof(buf) - LWS_PRE;
-
- /*
- * our sink is writeable and our source has something
- * to read. So read a lump of source material of
- * suitable size to send or what's available, whichever
- * is the smaller.
- */
- wsi->reason_bf &= ~LWS_CB_REASON_AUX_BF__PROXY;
- if (!lws_get_child(wsi))
- break;
- if (lws_http_client_read(lws_get_child(wsi), &px,
- &lenx) < 0)
- return -1;
- break;
- }
-#endif
- break;
-
-#if defined(LWS_WITH_HTTP_PROXY)
- case LWS_CALLBACK_RECEIVE_CLIENT_HTTP:
- assert(lws_get_parent(wsi));
- if (!lws_get_parent(wsi))
- break;
- lws_get_parent(wsi)->reason_bf |= LWS_CB_REASON_AUX_BF__PROXY;
- lws_callback_on_writable(lws_get_parent(wsi));
- break;
-
- case LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ:
- assert(lws_get_parent(wsi));
- n = lws_write(lws_get_parent(wsi), (unsigned char *)in,
- len, LWS_WRITE_HTTP);
- if (n < 0)
- return -1;
- break;
-
- case LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP: {
- unsigned char *p, *end;
- char ctype[64], ctlen = 0;
-
- p = (unsigned char *)buf + LWS_PRE;
- end = p + sizeof(buf) - LWS_PRE;
-
- if (lws_add_http_header_status(lws_get_parent(wsi),
- HTTP_STATUS_OK, &p, end))
- return 1;
- if (lws_add_http_header_by_token(lws_get_parent(wsi),
- WSI_TOKEN_HTTP_SERVER,
- (unsigned char *)"libwebsockets",
- 13, &p, end))
- return 1;
-
- ctlen = lws_hdr_copy(wsi, ctype, sizeof(ctype),
- WSI_TOKEN_HTTP_CONTENT_TYPE);
- if (ctlen > 0) {
- if (lws_add_http_header_by_token(lws_get_parent(wsi),
- WSI_TOKEN_HTTP_CONTENT_TYPE,
- (unsigned char *)ctype, ctlen, &p, end))
- return 1;
- }
-
- if (lws_finalize_http_header(lws_get_parent(wsi), &p, end))
- return 1;
-
- *p = '\0';
- n = lws_write(lws_get_parent(wsi),
- (unsigned char *)buf + LWS_PRE,
- p - ((unsigned char *)buf + LWS_PRE),
- LWS_WRITE_HTTP_HEADERS);
- if (n < 0)
- return -1;
-
- break; }
-
-#endif
-
-#ifdef LWS_WITH_CGI
- /* CGI IO events (POLLIN/OUT) appear here, our default policy is:
- *
- * - POST data goes on subprocess stdin
- * - subprocess stdout goes on http via writeable callback
- * - subprocess stderr goes to the logs
- */
- case LWS_CALLBACK_CGI:
- args = (struct lws_cgi_args *)in;
- switch (args->ch) { /* which of stdin/out/err ? */
- case LWS_STDIN:
- /* TBD stdin rx flow control */
- break;
- case LWS_STDOUT:
- /* quench POLLIN on STDOUT until MASTER got writeable */
- lws_rx_flow_control(args->stdwsi[LWS_STDOUT], 0);
- wsi->reason_bf |= LWS_CB_REASON_AUX_BF__CGI;
- /* when writing to MASTER would not block */
- lws_callback_on_writable(wsi);
- break;
- case LWS_STDERR:
- n = lws_get_socket_fd(args->stdwsi[LWS_STDERR]);
- if (n < 0)
- break;
- n = read(n, buf, sizeof(buf) - 2);
- if (n > 0) {
- if (buf[n - 1] != '\n')
- buf[n++] = '\n';
- buf[n] = '\0';
- lwsl_notice("CGI-stderr: %s\n", buf);
- }
- break;
- }
- break;
-
- case LWS_CALLBACK_CGI_TERMINATED:
- lwsl_debug("LWS_CALLBACK_CGI_TERMINATED: %d %" PRIu64 "\n",
- wsi->http.cgi->explicitly_chunked,
- (uint64_t)wsi->http.cgi->content_length);
- if (!wsi->http.cgi->explicitly_chunked &&
- !wsi->http.cgi->content_length) {
- /* send terminating chunk */
- lwsl_debug("LWS_CALLBACK_CGI_TERMINATED: ending\n");
- wsi->reason_bf |= LWS_CB_REASON_AUX_BF__CGI_CHUNK_END;
- lws_callback_on_writable(wsi);
- lws_set_timeout(wsi, PENDING_TIMEOUT_CGI, 3);
- break;
- }
- return -1;
-
- case LWS_CALLBACK_CGI_STDIN_DATA: /* POST body for stdin */
- args = (struct lws_cgi_args *)in;
- args->data[args->len] = '\0';
- n = lws_get_socket_fd(args->stdwsi[LWS_STDIN]);
- if (n < 0)
- return -1;
- n = write(n, args->data, args->len);
- if (n < args->len)
- lwsl_notice("LWS_CALLBACK_CGI_STDIN_DATA: "
- "sent %d only %d went", n, args->len);
- return n;
-#endif
-#endif
- case LWS_CALLBACK_SSL_INFO:
- si = in;
-
- (void)si;
- lwsl_notice("LWS_CALLBACK_SSL_INFO: where: 0x%x, ret: 0x%x\n",
- si->where, si->ret);
- break;
-
- default:
- break;
- }
-
- return 0;
-}
/* list of supported protocols and callbacks */
@@ -534,9 +367,6 @@ static const struct lws_protocols protocols_dummy[] = {
#undef LWS_HAVE_GETENV
#endif
-static void
-lws_vhost_destroy2(struct lws_vhost *vh);
-
LWS_VISIBLE struct lws_vhost *
lws_create_vhost(struct lws_context *context,
const struct lws_context_creation_info *info)
@@ -595,6 +425,8 @@ lws_create_vhost(struct lws_context *context,
vh->pvo = info->pvo;
vh->headers = info->headers;
vh->user = info->user;
+ vh->finalize = info->finalize;
+ vh->finalize_arg = info->finalize_arg;
LWS_FOR_EVERY_AVAILABLE_ROLE_START(ar)
if (ar->init_vhost)
@@ -630,10 +462,12 @@ lws_create_vhost(struct lws_context *context,
n += (int)strlen(info->ssl_private_key_filepath) + 1;
if (n) {
- vh->tls.key_path = vh->tls.alloc_cert_path = lws_malloc(n, "vh paths");
+ vh->tls.key_path = vh->tls.alloc_cert_path =
+ lws_malloc(n, "vh paths");
if (info->ssl_cert_filepath) {
n = (int)strlen(info->ssl_cert_filepath) + 1;
- memcpy(vh->tls.alloc_cert_path, info->ssl_cert_filepath, n);
+ memcpy(vh->tls.alloc_cert_path,
+ info->ssl_cert_filepath, n);
vh->tls.key_path += n;
}
if (info->ssl_private_key_filepath)
@@ -648,7 +482,7 @@ lws_create_vhost(struct lws_context *context,
*/
lwsp = lws_zalloc(sizeof(struct lws_protocols) * (vh->count_protocols +
context->plugin_protocol_count + 1),
- "vhost-specific plugin table");
+ "vhost-specific plugin table");
if (!lwsp) {
lwsl_err("OOM\n");
return NULL;
@@ -699,15 +533,15 @@ lws_create_vhost(struct lws_context *context,
lws_free(lwsp);
}
- vh->same_vh_protocol_list = (struct lws **)
- lws_zalloc(sizeof(struct lws *) * vh->count_protocols,
- "same vh list");
+ vh->same_vh_protocol_heads = (struct lws_dll_lws *)
+ lws_zalloc(sizeof(struct lws_dll_lws) *
+ vh->count_protocols, "same vh list");
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
vh->http.mount_list = info->mounts;
#endif
#ifdef LWS_WITH_UNIX_SOCK
- if (LWS_UNIX_SOCK_ENABLED(context)) {
+ if (LWS_UNIX_SOCK_ENABLED(vh)) {
lwsl_notice("Creating Vhost '%s' path \"%s\", %d protocols\n",
vh->name, vh->iface, vh->count_protocols);
} else
@@ -725,8 +559,8 @@ lws_create_vhost(struct lws_context *context,
break;
}
lwsl_notice("Creating Vhost '%s' %s, %d protocols, IPv6 %s\n",
- vh->name, buf, vh->count_protocols,
- LWS_IPV6_ENABLED(vh) ? "on" : "off");
+ vh->name, buf, vh->count_protocols,
+ LWS_IPV6_ENABLED(vh) ? "on" : "off");
}
mounts = info->mounts;
while (mounts) {
@@ -833,7 +667,7 @@ lws_create_vhost(struct lws_context *context,
lwsl_err("%s: lws_context_init_client_ssl failed\n", __func__);
goto bail1;
}
- lws_context_lock(context);
+ lws_context_lock(context, "create_vhost");
n = _lws_vhost_init_server(info, vh);
lws_context_unlock(context);
if (n < 0) {
@@ -841,7 +675,6 @@ lws_create_vhost(struct lws_context *context,
goto bail1;
}
-
while (1) {
if (!(*vh1)) {
*vh1 = vh;
@@ -862,7 +695,6 @@ lws_create_vhost(struct lws_context *context,
bail1:
lws_vhost_destroy(vh);
- lws_vhost_destroy2(vh);
return NULL;
@@ -927,7 +759,7 @@ lws_create_event_pipes(struct lws_context *context)
wsi = lws_zalloc(sizeof(*wsi), "event pipe wsi");
if (!wsi) {
- lwsl_err("Out of mem\n");
+ lwsl_err("%s: Out of mem\n", __func__);
return 1;
}
wsi->context = context;
@@ -955,7 +787,8 @@ lws_create_event_pipes(struct lws_context *context)
lwsl_debug("event pipe fd %d\n", wsi->desc.sockfd);
if (context->event_loop_ops->accept)
- context->event_loop_ops->accept(wsi);
+ if (context->event_loop_ops->accept(wsi))
+ return 1;
if (__insert_wsi_socket_into_fds(context, wsi))
return 1;
@@ -973,6 +806,7 @@ lws_destroy_event_pipe(struct lws *wsi)
if (wsi->context->event_loop_ops->wsi_logical_close) {
wsi->context->event_loop_ops->wsi_logical_close(wsi);
lws_plat_pipe_close(wsi);
+ wsi->context->count_wsi_allocated--;
return;
}
@@ -996,13 +830,8 @@ lws_create_context(const struct lws_context_creation_info *info)
struct rlimit rt;
#endif
-
-
lwsl_info("Initial logging level %d\n", log_level);
lwsl_info("Libwebsockets version: %s\n", library_version);
-#if defined(GCC_VER)
- lwsl_info("Compiled with %s\n", GCC_VER);
-#endif
#ifdef LWS_WITH_IPV6
if (!lws_check_opt(info->options, LWS_SERVER_OPTION_DISABLE_IPV6))
@@ -1053,7 +882,7 @@ lws_create_context(const struct lws_context_creation_info *info)
#endif
#if LWS_MAX_SMP > 1
- pthread_mutex_init(&context->lock, NULL);
+ lws_mutex_refcount_init(&context->mr);
#endif
#if defined(LWS_WITH_ESP32)
@@ -1213,7 +1042,11 @@ lws_create_context(const struct lws_context_creation_info *info)
if (info->max_http_header_pool)
context->max_http_header_pool = info->max_http_header_pool;
else
- context->max_http_header_pool = context->max_fds;
+ if (info->max_http_header_pool2)
+ context->max_http_header_pool =
+ info->max_http_header_pool2;
+ else
+ context->max_http_header_pool = context->max_fds;
if (info->fd_limit_per_thread)
context->fd_limit_per_thread = info->fd_limit_per_thread;
@@ -1251,16 +1084,17 @@ lws_create_context(const struct lws_context_creation_info *info)
return NULL;
}
-
#if defined(LWS_WITH_PEER_LIMITS)
/* scale the peer hash table according to the max fds for the process,
* so that the max list depth averages 16. Eg, 1024 fd -> 64,
* 102400 fd -> 6400
*/
+
context->pl_hash_elements =
(context->count_threads * context->fd_limit_per_thread) / 16;
context->pl_hash_table = lws_zalloc(sizeof(struct lws_peer *) *
context->pl_hash_elements, "peer limits hash table");
+
context->ip_limit_ah = info->ip_limit_ah;
context->ip_limit_wsi = info->ip_limit_wsi;
#endif
@@ -1404,7 +1238,6 @@ LWS_VISIBLE LWS_EXTERN void
lws_context_deprecate(struct lws_context *context, lws_reload_func cb)
{
struct lws_vhost *vh = context->vhost_list, *vh1;
- struct lws *wsi;
/*
* "deprecation" means disable the context from accepting any new
@@ -1418,7 +1251,8 @@ lws_context_deprecate(struct lws_context *context, lws_reload_func cb)
/* for each vhost, close his listen socket */
while (vh) {
- wsi = vh->lserv_wsi;
+ struct lws *wsi = vh->lserv_wsi;
+
if (wsi) {
wsi->socket_is_permanently_unusable = 1;
lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS, "ctx deprecate");
@@ -1450,24 +1284,29 @@ lws_context_is_deprecated(struct lws_context *context)
void
lws_vhost_destroy1(struct lws_vhost *vh)
{
- const struct lws_protocols *protocol = NULL;
- struct lws_context_per_thread *pt;
- int n, m = vh->context->count_threads;
struct lws_context *context = vh->context;
- struct lws wsi;
lwsl_info("%s\n", __func__);
+ lws_context_lock(context, "vhost destroy 1"); /* ---------- context { */
+
if (vh->being_destroyed)
- return;
+ goto out;
+
+ lws_vhost_lock(vh); /* -------------- vh { */
vh->being_destroyed = 1;
/*
+ * PHASE 1: take down or reassign any listen wsi
+ *
* Are there other vhosts that are piggybacking on our listen socket?
* If so we need to hand the listen socket off to one of the others
- * so it will remain open. If not, leave it attached to the closing
- * vhost and it will get closed.
+ * so it will remain open.
+ *
+ * If not, leave it attached to the closing vhost, the vh being marked
+ * being_destroyed will defeat any service and it will get closed in
+ * later phases.
*/
if (vh->lserv_wsi)
@@ -1488,46 +1327,48 @@ lws_vhost_destroy1(struct lws_vhost *vh)
*/
assert(v->lserv_wsi == NULL);
v->lserv_wsi = vh->lserv_wsi;
- vh->lserv_wsi = NULL;
- if (v->lserv_wsi)
- v->lserv_wsi->vhost = v;
lwsl_notice("%s: listen skt from %s to %s\n",
__func__, vh->name, v->name);
+
+ if (v->lserv_wsi) {
+ lws_vhost_unbind_wsi(vh->lserv_wsi);
+ lws_vhost_bind_wsi(v, v->lserv_wsi);
+ }
+
break;
}
} lws_end_foreach_ll(v, vhost_next);
+ lws_vhost_unlock(vh); /* } vh -------------- */
+
/*
- * Forcibly close every wsi assoicated with this vhost. That will
- * include the listen socket if it is still associated with the closing
- * vhost.
+ * lws_check_deferred_free() will notice there is a vhost that is
+ * marked for destruction during the next 1s, for all tsi.
+ *
+ * It will start closing all wsi on this vhost. When the last wsi
+ * is closed, it will trigger lws_vhost_destroy2()
*/
- while (m--) {
- pt = &context->pt[m];
-
- for (n = 0; (unsigned int)n < context->pt[m].fds_count; n++) {
- struct lws *wsi = wsi_from_fd(context, pt->fds[n].fd);
- if (!wsi)
- continue;
- if (wsi->vhost != vh)
- continue;
+out:
+ lws_context_unlock(context); /* --------------------------- context { */
+}
- lws_close_free_wsi(wsi,
- LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY,
- "vh destroy"
- /* no protocol close */);
- n--;
- }
- }
+void
+__lws_vhost_destroy2(struct lws_vhost *vh)
+{
+ const struct lws_protocols *protocol = NULL;
+ struct lws_context *context = vh->context;
+ struct lws_deferred_free *df;
+ struct lws wsi;
+ int n;
/*
* destroy any pending timed events
*/
while (vh->timed_vh_protocol_list)
- lws_timed_callback_remove(vh, vh->timed_vh_protocol_list);
+ __lws_timed_callback_remove(vh, vh->timed_vh_protocol_list);
/*
* let the protocols destroy the per-vhost protocol objects
@@ -1535,7 +1376,7 @@ lws_vhost_destroy1(struct lws_vhost *vh)
memset(&wsi, 0, sizeof(wsi));
wsi.context = vh->context;
- wsi.vhost = vh;
+ wsi.vhost = vh; /* not a real bound wsi */
protocol = vh->protocols;
if (protocol && vh->created_vhost_protocols) {
n = 0;
@@ -1563,15 +1404,6 @@ lws_vhost_destroy1(struct lws_vhost *vh)
vh->vhost_next = vh->context->vhost_pending_destruction_list;
vh->context->vhost_pending_destruction_list = vh;
-}
-
-static void
-lws_vhost_destroy2(struct lws_vhost *vh)
-{
- const struct lws_protocols *protocol = NULL;
- struct lws_context *context = vh->context;
- struct lws_deferred_free *df;
- int n;
lwsl_info("%s: %p\n", __func__, vh);
@@ -1617,7 +1449,7 @@ lws_vhost_destroy2(struct lws_vhost *vh)
if (vh->protocol_vh_privs)
lws_free(vh->protocol_vh_privs);
lws_ssl_SSL_CTX_destroy(vh);
- lws_free(vh->same_vh_protocol_list);
+ lws_free(vh->same_vh_protocol_heads);
if (context->plugin_list ||
(context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS))
@@ -1642,7 +1474,7 @@ lws_vhost_destroy2(struct lws_vhost *vh)
#endif
#if defined(LWS_WITH_UNIX_SOCK)
- if (LWS_UNIX_SOCK_ENABLED(context)) {
+ if (LWS_UNIX_SOCK_ENABLED(vh)) {
n = unlink(vh->iface);
if (n)
lwsl_info("Closing unix socket %s: errno %d\n",
@@ -1655,31 +1487,74 @@ lws_vhost_destroy2(struct lws_vhost *vh)
* they do not refer to the vhost. So it's safe to free.
*/
+ if (vh->finalize)
+ vh->finalize(vh, vh->finalize_arg);
+
lwsl_info(" %s: Freeing vhost %p\n", __func__, vh);
memset(vh, 0, sizeof(*vh));
lws_free(vh);
}
+/*
+ * each service thread calls this once a second or so
+ */
+
int
-lws_check_deferred_free(struct lws_context *context, int force)
+lws_check_deferred_free(struct lws_context *context, int tsi, int force)
{
- struct lws_deferred_free *df;
- time_t now = lws_now_secs();
+ struct lws_context_per_thread *pt;
+ int n;
- lws_start_foreach_llp(struct lws_deferred_free **, pdf,
- context->deferred_free_list) {
- if (force ||
- lws_compare_time_t(context, now, (*pdf)->deadline) > 5) {
- df = *pdf;
- *pdf = df->next;
- /* finalize vh destruction */
- lwsl_notice("deferred vh %p destroy\n", df->payload);
- lws_vhost_destroy2(df->payload);
- lws_free(df);
- continue; /* after deletion we already point to next */
+ /*
+ * If we see a vhost is being destroyed, forcibly close every wsi on
+ * this tsi associated with this vhost. That will include the listen
+ * socket if it is still associated with the closing vhost.
+ *
+ * For SMP, we do this once per tsi per destroyed vhost. The reference
+ * counting on the vhost as the bound wsi close will notice that there
+ * are no bound wsi left, that vhost destruction can complete,
+ * and perform it. It doesn't matter which service thread does that
+ * because there is nothing left using the vhost to conflict.
+ */
+
+ lws_context_lock(context, "check deferred free"); /* ------ context { */
+
+ lws_start_foreach_ll_safe(struct lws_vhost *, v, context->vhost_list, vhost_next) {
+ if (v->being_destroyed
+#if LWS_MAX_SMP > 1
+ && !v->close_flow_vs_tsi[tsi]
+#endif
+ ) {
+
+ pt = &context->pt[tsi];
+
+ lws_pt_lock(pt, "vhost removal"); /* -------------- pt { */
+
+#if LWS_MAX_SMP > 1
+ v->close_flow_vs_tsi[tsi] = 1;
+#endif
+
+ for (n = 0; (unsigned int)n < pt->fds_count; n++) {
+ struct lws *wsi = wsi_from_fd(context, pt->fds[n].fd);
+ if (!wsi)
+ continue;
+ if (wsi->vhost != v)
+ continue;
+
+ __lws_close_free_wsi(wsi,
+ LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY,
+ "vh destroy"
+ /* no protocol close */);
+ n--;
+ }
+
+ lws_pt_unlock(pt); /* } pt -------------- */
}
- } lws_end_foreach_llp(pdf, next);
+ } lws_end_foreach_ll_safe(v);
+
+
+ lws_context_unlock(context); /* } context ------------------- */
return 0;
}
@@ -1688,18 +1563,38 @@ LWS_VISIBLE void
lws_vhost_destroy(struct lws_vhost *vh)
{
struct lws_deferred_free *df = lws_malloc(sizeof(*df), "deferred free");
+ struct lws_context *context = vh->context;
if (!df)
return;
+ lws_context_lock(context, __func__); /* ------ context { */
+
lws_vhost_destroy1(vh);
+ if (!vh->count_bound_wsi) {
+ /*
+ * After listen handoff, there are already no wsi bound to this
+ * vhost by any pt: nothing can be servicing any wsi belonging
+ * to it any more.
+ *
+ * Finalize the vh destruction immediately
+ */
+ __lws_vhost_destroy2(vh);
+ lws_free(df);
+
+ goto out;
+ }
+
/* part 2 is deferred to allow all the handle closes to complete */
df->next = vh->context->deferred_free_list;
df->deadline = lws_now_secs();
df->payload = vh;
vh->context->deferred_free_list = df;
+
+out:
+ lws_context_unlock(context); /* } context ------------------- */
}
/*
@@ -1733,11 +1628,12 @@ static void
lws_context_destroy3(struct lws_context *context)
{
struct lws_context **pcontext_finalize = context->pcontext_finalize;
- struct lws_context_per_thread *pt;
int n;
for (n = 0; n < context->count_threads; n++) {
- pt = &context->pt[n];
+#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
+ struct lws_context_per_thread *pt = &context->pt[n];
+#endif
if (context->event_loop_ops->destroy_pt)
context->event_loop_ops->destroy_pt(context, n);
@@ -1750,6 +1646,9 @@ lws_context_destroy3(struct lws_context *context)
#endif
}
+ if (context->pt[0].fds)
+ lws_free_set_NULL(context->pt[0].fds);
+
lws_free(context);
lwsl_info("%s: ctx %p freed\n", __func__, context);
@@ -1768,14 +1667,12 @@ lws_context_destroy2(struct lws_context *context)
#if defined(LWS_WITH_PEER_LIMITS)
uint32_t nu;
#endif
- int n;
lwsl_info("%s: ctx %p\n", __func__, context);
- context->being_destroyed2 = 1;
+ lws_context_lock(context, "context destroy 2"); /* ------ context { */
- if (context->pt[0].fds)
- lws_free_set_NULL(context->pt[0].fds);
+ context->being_destroyed2 = 1;
/*
* free all the per-vhost allocations
@@ -1784,7 +1681,7 @@ lws_context_destroy2(struct lws_context *context)
vh = context->vhost_list;
while (vh) {
vh1 = vh->vhost_next;
- lws_vhost_destroy2(vh);
+ __lws_vhost_destroy2(vh);
vh = vh1;
}
@@ -1792,7 +1689,7 @@ lws_context_destroy2(struct lws_context *context)
while (context->vhost_pending_destruction_list)
/* removes itself from list */
- lws_vhost_destroy2(context->vhost_pending_destruction_list);
+ __lws_vhost_destroy2(context->vhost_pending_destruction_list);
lws_stats_log_dump(context);
@@ -1816,22 +1713,29 @@ lws_context_destroy2(struct lws_context *context)
if (context->external_baggage_free_on_destroy)
free(context->external_baggage_free_on_destroy);
- lws_check_deferred_free(context, 1);
+ lws_check_deferred_free(context, 0, 1);
#if LWS_MAX_SMP > 1
- pthread_mutex_destroy(&context->lock);
+ lws_mutex_refcount_destroy(&context->mr);
#endif
if (context->event_loop_ops->destroy_context2)
if (context->event_loop_ops->destroy_context2(context)) {
+ lws_context_unlock(context); /* } context ----------- */
context->finalize_destroy_after_internal_loops_stopped = 1;
return;
}
- if (!context->pt[0].event_loop_foreign)
+ if (!context->pt[0].event_loop_foreign) {
+ int n;
for (n = 0; n < context->count_threads; n++)
- if (context->pt[n].inside_service)
+ if (context->pt[n].inside_service) {
+ lws_context_unlock(context); /* } context --- */
return;
+ }
+ }
+
+ lws_context_unlock(context); /* } context ------------------- */
lws_context_destroy3(context);
}
@@ -1845,7 +1749,6 @@ lws_context_destroy(struct lws_context *context)
{
volatile struct lws_foreign_thread_pollfd *ftp, *next;
volatile struct lws_context_per_thread *vpt;
- struct lws_context_per_thread *pt;
struct lws_vhost *vh = NULL;
struct lws wsi;
int n, m;
@@ -1891,7 +1794,7 @@ lws_context_destroy(struct lws_context *context)
#endif
while (m--) {
- pt = &context->pt[m];
+ struct lws_context_per_thread *pt = &context->pt[m];
vpt = (volatile struct lws_context_per_thread *)pt;
ftp = vpt->foreign_pfd_list;
diff --git a/thirdparty/libwebsockets/lib/core/dummy-callback.c b/thirdparty/libwebsockets/lib/core/dummy-callback.c
new file mode 100644
index 0000000000..8fd18be9c5
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/core/dummy-callback.c
@@ -0,0 +1,611 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include "core/private.h"
+
+#if defined(LWS_WITH_HTTP_PROXY)
+static int
+proxy_header(struct lws *wsi, struct lws *par, unsigned char *temp,
+ int temp_len, int index, unsigned char **p, unsigned char *end)
+{
+ int n = lws_hdr_total_length(par, index);
+
+ if (n < 1) {
+ lwsl_debug("%s: no index %d:\n", __func__, index);
+ return 0;
+ }
+
+ if (lws_hdr_copy(par, (char *)temp, temp_len, index) < 0)
+ return -1;
+
+ lwsl_debug("%s: index %d: %s\n", __func__, index, (char *)temp);
+
+ if (lws_add_http_header_by_token(wsi, index, temp, n, p, end))
+ return -1;
+
+ return 0;
+}
+
+static int
+stream_close(struct lws *wsi)
+{
+ char buf[LWS_PRE + 6], *out = buf + LWS_PRE;
+
+ if (wsi->http.did_stream_close)
+ return 0;
+
+ wsi->http.did_stream_close = 1;
+
+ if (wsi->http2_substream) {
+ if (lws_write(wsi, (unsigned char *)buf + LWS_PRE, 0,
+ LWS_WRITE_HTTP_FINAL) < 0) {
+ lwsl_info("%s: COMPL_CLIENT_HTTP: h2 fin wr failed\n",
+ __func__);
+
+ return -1;
+ }
+ } else {
+ *out++ = '0';
+ *out++ = '\x0d';
+ *out++ = '\x0a';
+ *out++ = '\x0d';
+ *out++ = '\x0a';
+
+ if (lws_write(wsi, (unsigned char *)buf + LWS_PRE, 5,
+ LWS_WRITE_HTTP_FINAL) < 0) {
+ lwsl_err("%s: COMPL_CLIENT_HTTP: "
+ "h2 final write failed\n", __func__);
+
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+#endif
+
+LWS_VISIBLE int
+lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
+ void *user, void *in, size_t len)
+{
+ struct lws_ssl_info *si;
+#ifdef LWS_WITH_CGI
+ struct lws_cgi_args *args;
+#endif
+#if defined(LWS_WITH_CGI) || defined(LWS_WITH_HTTP_PROXY)
+ char buf[8192];
+ int n;
+#endif
+#if defined(LWS_WITH_HTTP_PROXY)
+ unsigned char **p, *end;
+ struct lws *parent;
+#endif
+
+ switch (reason) {
+#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
+ case LWS_CALLBACK_HTTP:
+#ifndef LWS_NO_SERVER
+ if (lws_return_http_status(wsi, HTTP_STATUS_NOT_FOUND, NULL))
+ return -1;
+
+ if (lws_http_transaction_completed(wsi))
+#endif
+ return -1;
+ break;
+#if !defined(LWS_NO_SERVER)
+ case LWS_CALLBACK_HTTP_BODY_COMPLETION:
+ case LWS_CALLBACK_HTTP_FILE_COMPLETION:
+ if (lws_http_transaction_completed(wsi))
+ return -1;
+ break;
+#endif
+
+ case LWS_CALLBACK_HTTP_WRITEABLE:
+#ifdef LWS_WITH_CGI
+ if (wsi->reason_bf & (LWS_CB_REASON_AUX_BF__CGI_HEADERS |
+ LWS_CB_REASON_AUX_BF__CGI)) {
+ n = lws_cgi_write_split_stdout_headers(wsi);
+ if (n < 0) {
+ lwsl_debug("AUX_BF__CGI forcing close\n");
+ return -1;
+ }
+ if (!n)
+ lws_rx_flow_control(
+ wsi->http.cgi->stdwsi[LWS_STDOUT], 1);
+
+ if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__CGI_HEADERS)
+ wsi->reason_bf &=
+ ~LWS_CB_REASON_AUX_BF__CGI_HEADERS;
+ else
+ wsi->reason_bf &= ~LWS_CB_REASON_AUX_BF__CGI;
+
+ if (wsi->http.cgi && wsi->http.cgi->cgi_transaction_over)
+ return -1;
+ break;
+ }
+
+ if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__CGI_CHUNK_END) {
+ if (!wsi->http2_substream) {
+ memcpy(buf + LWS_PRE, "0\x0d\x0a\x0d\x0a", 5);
+ lwsl_debug("writing chunk term and exiting\n");
+ n = lws_write(wsi, (unsigned char *)buf +
+ LWS_PRE, 5, LWS_WRITE_HTTP);
+ } else
+ n = lws_write(wsi, (unsigned char *)buf +
+ LWS_PRE, 0,
+ LWS_WRITE_HTTP_FINAL);
+
+ /* always close after sending it */
+ return -1;
+ }
+#endif
+#if defined(LWS_WITH_HTTP_PROXY)
+
+ if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__PROXY_HEADERS) {
+
+ wsi->reason_bf &= ~LWS_CB_REASON_AUX_BF__PROXY_HEADERS;
+
+ lwsl_debug("%s: %p: issuing proxy headers\n",
+ __func__, wsi);
+ n = lws_write(wsi, wsi->http.pending_return_headers +
+ LWS_PRE,
+ wsi->http.pending_return_headers_len,
+ LWS_WRITE_HTTP_HEADERS);
+
+ lws_free_set_NULL(wsi->http.pending_return_headers);
+
+ if (n < 0) {
+ lwsl_err("%s: EST_CLIENT_HTTP: write failed\n",
+ __func__);
+ return -1;
+ }
+ lws_callback_on_writable(wsi);
+ break;
+ }
+
+ if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__PROXY) {
+ char *px = buf + LWS_PRE;
+ int lenx = sizeof(buf) - LWS_PRE - 32;
+
+ /*
+ * our sink is writeable and our source has something
+ * to read. So read a lump of source material of
+ * suitable size to send or what's available, whichever
+ * is the smaller.
+ */
+ wsi->reason_bf &= ~LWS_CB_REASON_AUX_BF__PROXY;
+ if (!lws_get_child(wsi))
+ break;
+
+ /* this causes LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ */
+ if (lws_http_client_read(lws_get_child(wsi), &px,
+ &lenx) < 0) {
+ lwsl_info("%s: LWS_CB_REASON_AUX_BF__PROXY: "
+ "client closed\n", __func__);
+
+ stream_close(wsi);
+
+ return -1;
+ }
+ break;
+ }
+
+ if (wsi->reason_bf & LWS_CB_REASON_AUX_BF__PROXY_TRANS_END) {
+ lwsl_info("%s: LWS_CB_REASON_AUX_BF__PROXY_TRANS_END\n",
+ __func__);
+
+ wsi->reason_bf &= ~LWS_CB_REASON_AUX_BF__PROXY_TRANS_END;
+
+ if (stream_close(wsi))
+ return -1;
+
+ if (lws_http_transaction_completed(wsi))
+ return -1;
+ }
+#endif
+ break;
+
+#if defined(LWS_WITH_HTTP_PROXY)
+ case LWS_CALLBACK_RECEIVE_CLIENT_HTTP:
+ assert(lws_get_parent(wsi));
+ if (!lws_get_parent(wsi))
+ break;
+ lws_get_parent(wsi)->reason_bf |= LWS_CB_REASON_AUX_BF__PROXY;
+ lws_callback_on_writable(lws_get_parent(wsi));
+ break;
+
+ case LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ: {
+ char *out = buf + LWS_PRE;
+
+ assert(lws_get_parent(wsi));
+
+ if (wsi->http.proxy_parent_chunked) {
+
+ if (len > sizeof(buf) - LWS_PRE - 16) {
+ lwsl_err("oversize buf %d %d\n", (int)len,
+ (int)sizeof(buf) - LWS_PRE - 16);
+ return -1;
+ }
+
+ /*
+ * this only needs dealing with on http/1.1 to allow
+ * pipelining
+ */
+ n = lws_snprintf(out, 14, "%X\x0d\x0a", (int)len);
+ out += n;
+ memcpy(out, in, len);
+ out += len;
+ *out++ = '\x0d';
+ *out++ = '\x0a';
+
+ n = lws_write(lws_get_parent(wsi),
+ (unsigned char *)buf + LWS_PRE,
+ len + n + 2, LWS_WRITE_HTTP);
+ } else
+ n = lws_write(lws_get_parent(wsi), (unsigned char *)in,
+ len, LWS_WRITE_HTTP);
+ if (n < 0)
+ return -1;
+ break; }
+
+
+ /* this handles the proxy case... */
+ case LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP: {
+ unsigned char *start, *p, *end;
+
+ /*
+ * We want to proxy these headers, but we are being called
+ * at the point the onward client was established, which is
+ * unrelated to the state or writability of our proxy
+ * connection.
+ *
+ * Therefore produce the headers using the onward client ah
+ * while we have it, and stick them on the output buflist to be
+ * written on the proxy connection as soon as convenient.
+ */
+
+ parent = lws_get_parent(wsi);
+
+ if (!parent)
+ return 0;
+
+ start = p = (unsigned char *)buf + LWS_PRE;
+ end = p + sizeof(buf) - LWS_PRE - 256;
+
+ if (lws_add_http_header_status(lws_get_parent(wsi),
+ lws_http_client_http_response(wsi), &p, end))
+ return 1;
+
+ /*
+ * copy these headers from the client connection to the parent
+ */
+
+ proxy_header(parent, wsi, end, 256,
+ WSI_TOKEN_HTTP_CONTENT_LENGTH, &p, end);
+ proxy_header(parent, wsi, end, 256,
+ WSI_TOKEN_HTTP_CONTENT_TYPE, &p, end);
+ proxy_header(parent, wsi, end, 256,
+ WSI_TOKEN_HTTP_ETAG, &p, end);
+ proxy_header(parent, wsi, end, 256,
+ WSI_TOKEN_HTTP_ACCEPT_LANGUAGE, &p, end);
+ proxy_header(parent, wsi, end, 256,
+ WSI_TOKEN_HTTP_CONTENT_ENCODING, &p, end);
+ proxy_header(parent, wsi, end, 256,
+ WSI_TOKEN_HTTP_CACHE_CONTROL, &p, end);
+
+ if (!parent->http2_substream)
+ if (lws_add_http_header_by_token(parent,
+ WSI_TOKEN_CONNECTION, (unsigned char *)"close",
+ 5, &p, end))
+ return -1;
+
+ /*
+ * We proxy using h1 only atm, and strip any chunking so it
+ * can go back out on h2 just fine.
+ *
+ * However if we are actually going out on h1, we need to add
+ * our own chunking since we still don't know the size.
+ */
+
+ if (!parent->http2_substream &&
+ !lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH)) {
+ lwsl_debug("downstream parent chunked\n");
+ if (lws_add_http_header_by_token(parent,
+ WSI_TOKEN_HTTP_TRANSFER_ENCODING,
+ (unsigned char *)"chunked", 7, &p, end))
+ return -1;
+
+ wsi->http.proxy_parent_chunked = 1;
+ }
+
+ if (lws_finalize_http_header(parent, &p, end))
+ return 1;
+
+ parent->http.pending_return_headers_len =
+ lws_ptr_diff(p, start);
+ parent->http.pending_return_headers =
+ lws_malloc(parent->http.pending_return_headers_len +
+ LWS_PRE, "return proxy headers");
+ if (!parent->http.pending_return_headers)
+ return -1;
+
+ memcpy(parent->http.pending_return_headers + LWS_PRE, start,
+ parent->http.pending_return_headers_len);
+
+ parent->reason_bf |= LWS_CB_REASON_AUX_BF__PROXY_HEADERS;
+
+ lwsl_debug("%s: LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP: "
+ "prepared headers\n", __func__);
+ lws_callback_on_writable(parent);
+
+ break; }
+
+ case LWS_CALLBACK_COMPLETED_CLIENT_HTTP:
+ lwsl_info("%s: COMPLETED_CLIENT_HTTP: %p (parent %p)\n",
+ __func__, wsi, lws_get_parent(wsi));
+ if (!lws_get_parent(wsi))
+ break;
+ lws_get_parent(wsi)->reason_bf |=
+ LWS_CB_REASON_AUX_BF__PROXY_TRANS_END;
+ lws_callback_on_writable(lws_get_parent(wsi));
+ break;
+
+ case LWS_CALLBACK_CLOSED_CLIENT_HTTP:
+ if (!lws_get_parent(wsi))
+ break;
+ lwsl_err("%s: LWS_CALLBACK_CLOSED_CLIENT_HTTP\n", __func__);
+ lws_set_timeout(lws_get_parent(wsi), LWS_TO_KILL_ASYNC,
+ PENDING_TIMEOUT_KILLED_BY_PROXY_CLIENT_CLOSE);
+ break;
+
+ case LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER:
+ parent = lws_get_parent(wsi);
+
+ if (!parent)
+ break;
+
+ p = (unsigned char **)in;
+ end = (*p) + len;
+
+ /*
+ * copy these headers from the parent request to the client
+ * connection's request
+ */
+
+ proxy_header(wsi, parent, (unsigned char *)buf, sizeof(buf),
+ WSI_TOKEN_HOST, p, end);
+ proxy_header(wsi, parent, (unsigned char *)buf, sizeof(buf),
+ WSI_TOKEN_HTTP_ETAG, p, end);
+ proxy_header(wsi, parent, (unsigned char *)buf, sizeof(buf),
+ WSI_TOKEN_HTTP_IF_MODIFIED_SINCE, p, end);
+ proxy_header(wsi, parent, (unsigned char *)buf, sizeof(buf),
+ WSI_TOKEN_HTTP_ACCEPT_LANGUAGE, p, end);
+ proxy_header(wsi, parent, (unsigned char *)buf, sizeof(buf),
+ WSI_TOKEN_HTTP_ACCEPT_ENCODING, p, end);
+ proxy_header(wsi, parent, (unsigned char *)buf, sizeof(buf),
+ WSI_TOKEN_HTTP_CACHE_CONTROL, p, end);
+
+ buf[0] = '\0';
+ lws_get_peer_simple(parent, buf, sizeof(buf));
+ if (lws_add_http_header_by_token(wsi, WSI_TOKEN_X_FORWARDED_FOR,
+ (unsigned char *)buf, (int)strlen(buf), p, end))
+ return -1;
+
+ break;
+
+#endif
+
+#ifdef LWS_WITH_CGI
+ /* CGI IO events (POLLIN/OUT) appear here, our default policy is:
+ *
+ * - POST data goes on subprocess stdin
+ * - subprocess stdout goes on http via writeable callback
+ * - subprocess stderr goes to the logs
+ */
+ case LWS_CALLBACK_CGI:
+ args = (struct lws_cgi_args *)in;
+ switch (args->ch) { /* which of stdin/out/err ? */
+ case LWS_STDIN:
+ /* TBD stdin rx flow control */
+ break;
+ case LWS_STDOUT:
+ /* quench POLLIN on STDOUT until MASTER got writeable */
+ lws_rx_flow_control(args->stdwsi[LWS_STDOUT], 0);
+ wsi->reason_bf |= LWS_CB_REASON_AUX_BF__CGI;
+ /* when writing to MASTER would not block */
+ lws_callback_on_writable(wsi);
+ break;
+ case LWS_STDERR:
+ n = lws_get_socket_fd(args->stdwsi[LWS_STDERR]);
+ if (n < 0)
+ break;
+ n = read(n, buf, sizeof(buf) - 2);
+ if (n > 0) {
+ if (buf[n - 1] != '\n')
+ buf[n++] = '\n';
+ buf[n] = '\0';
+ lwsl_notice("CGI-stderr: %s\n", buf);
+ }
+ break;
+ }
+ break;
+
+ case LWS_CALLBACK_CGI_TERMINATED:
+ lwsl_debug("LWS_CALLBACK_CGI_TERMINATED: %d %" PRIu64 "\n",
+ wsi->http.cgi->explicitly_chunked,
+ (uint64_t)wsi->http.cgi->content_length);
+ if (!wsi->http.cgi->explicitly_chunked &&
+ !wsi->http.cgi->content_length) {
+ /* send terminating chunk */
+ lwsl_debug("LWS_CALLBACK_CGI_TERMINATED: ending\n");
+ wsi->reason_bf |= LWS_CB_REASON_AUX_BF__CGI_CHUNK_END;
+ lws_callback_on_writable(wsi);
+ lws_set_timeout(wsi, PENDING_TIMEOUT_CGI, 3);
+ break;
+ }
+ return -1;
+
+ case LWS_CALLBACK_CGI_STDIN_DATA: /* POST body for stdin */
+ args = (struct lws_cgi_args *)in;
+ args->data[args->len] = '\0';
+ if (!args->stdwsi[LWS_STDIN])
+ return -1;
+ n = lws_get_socket_fd(args->stdwsi[LWS_STDIN]);
+ if (n < 0)
+ return -1;
+
+#if defined(LWS_WITH_ZLIB)
+ if (wsi->http.cgi->gzip_inflate) {
+ /* gzip handling */
+
+ if (!wsi->http.cgi->gzip_init) {
+ lwsl_info("inflating gzip\n");
+
+ memset(&wsi->http.cgi->inflate, 0,
+ sizeof(wsi->http.cgi->inflate));
+
+ if (inflateInit2(&wsi->http.cgi->inflate,
+ 16 + 15) != Z_OK) {
+ lwsl_err("%s: iniflateInit failed\n",
+ __func__);
+ return -1;
+ }
+
+ wsi->http.cgi->gzip_init = 1;
+ }
+
+ wsi->http.cgi->inflate.next_in = args->data;
+ wsi->http.cgi->inflate.avail_in = args->len;
+
+ do {
+
+ wsi->http.cgi->inflate.next_out =
+ wsi->http.cgi->inflate_buf;
+ wsi->http.cgi->inflate.avail_out =
+ sizeof(wsi->http.cgi->inflate_buf);
+
+ n = inflate(&wsi->http.cgi->inflate,
+ Z_SYNC_FLUSH);
+
+ switch (n) {
+ case Z_NEED_DICT:
+ case Z_STREAM_ERROR:
+ case Z_DATA_ERROR:
+ case Z_MEM_ERROR:
+ inflateEnd(&wsi->http.cgi->inflate);
+ wsi->http.cgi->gzip_init = 0;
+ lwsl_err("zlib error inflate %d\n", n);
+ return -1;
+ }
+
+ if (wsi->http.cgi->inflate.avail_out !=
+ sizeof(wsi->http.cgi->inflate_buf)) {
+ int written;
+
+ written = write(args->stdwsi[LWS_STDIN]->desc.filefd,
+ wsi->http.cgi->inflate_buf,
+ sizeof(wsi->http.cgi->inflate_buf) -
+ wsi->http.cgi->inflate.avail_out);
+
+ if (written != (int)(
+ sizeof(wsi->http.cgi->inflate_buf) -
+ wsi->http.cgi->inflate.avail_out)) {
+ lwsl_notice("LWS_CALLBACK_CGI_STDIN_DATA: "
+ "sent %d only %d went", n, args->len);
+ }
+
+ if (n == Z_STREAM_END) {
+ lwsl_err("gzip inflate end\n");
+ inflateEnd(&wsi->http.cgi->inflate);
+ wsi->http.cgi->gzip_init = 0;
+ break;
+ }
+
+ } else
+ break;
+
+ if (wsi->http.cgi->inflate.avail_out)
+ break;
+
+ } while (1);
+
+ return args->len;
+ }
+#endif /* WITH_ZLIB */
+
+ n = write(n, args->data, args->len);
+// lwsl_hexdump_notice(args->data, args->len);
+ if (n < args->len)
+ lwsl_notice("LWS_CALLBACK_CGI_STDIN_DATA: "
+ "sent %d only %d went", n, args->len);
+
+ if (wsi->http.cgi->post_in_expected && args->stdwsi[LWS_STDIN] &&
+ args->stdwsi[LWS_STDIN]->desc.filefd > 0) {
+ wsi->http.cgi->post_in_expected -= n;
+ if (!wsi->http.cgi->post_in_expected) {
+ struct lws *siwsi = args->stdwsi[LWS_STDIN];
+
+ lwsl_debug("%s: expected POST in end: "
+ "closing stdin wsi %p, fd %d\n",
+ __func__, siwsi, siwsi->desc.sockfd);
+
+ __remove_wsi_socket_from_fds(siwsi);
+ lwsi_set_state(siwsi, LRS_DEAD_SOCKET);
+ siwsi->socket_is_permanently_unusable = 1;
+ lws_remove_child_from_any_parent(siwsi);
+ if (wsi->context->event_loop_ops->
+ close_handle_manually) {
+ wsi->context->event_loop_ops->
+ close_handle_manually(siwsi);
+ siwsi->told_event_loop_closed = 1;
+ } else {
+ compatible_close(siwsi->desc.sockfd);
+ __lws_free_wsi(siwsi);
+ }
+ wsi->http.cgi->pipe_fds[LWS_STDIN][1] = -1;
+
+ args->stdwsi[LWS_STDIN] = NULL;
+ }
+ }
+
+ return n;
+#endif /* WITH_CGI */
+#endif /* ROLE_ H1 / H2 */
+ case LWS_CALLBACK_SSL_INFO:
+ si = in;
+
+ (void)si;
+ lwsl_notice("LWS_CALLBACK_SSL_INFO: where: 0x%x, ret: 0x%x\n",
+ si->where, si->ret);
+ break;
+
+#if LWS_MAX_SMP > 1
+ case LWS_CALLBACK_GET_THREAD_ID:
+ return (int)(unsigned long long)pthread_self();
+#endif
+
+ default:
+ break;
+ }
+
+ return 0;
+}
diff --git a/thirdparty/libwebsockets/core/libwebsockets.c b/thirdparty/libwebsockets/lib/core/libwebsockets.c
index 58f00226f6..972422114a 100644
--- a/thirdparty/libwebsockets/core/libwebsockets.c
+++ b/thirdparty/libwebsockets/lib/core/libwebsockets.c
@@ -53,11 +53,42 @@ static const char * const log_level_names[] = {
"CLIENT",
"LATENCY",
"USER",
+ "THREAD",
"?",
"?"
};
#endif
+#if defined (_DEBUG)
+void lwsi_set_role(struct lws *wsi, lws_wsi_state_t role)
+{
+ wsi->wsistate = (wsi->wsistate & (~LWSI_ROLE_MASK)) | role;
+
+ lwsl_debug("lwsi_set_role(%p, 0x%x)\n", wsi, wsi->wsistate);
+}
+
+void lwsi_set_state(struct lws *wsi, lws_wsi_state_t lrs)
+{
+ wsi->wsistate = (wsi->wsistate & (~LRS_MASK)) | lrs;
+
+ lwsl_debug("lwsi_set_state(%p, 0x%x)\n", wsi, wsi->wsistate);
+}
+#endif
+
+signed char char_to_hex(const char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+
+ if (c >= 'a' && c <= 'f')
+ return c - 'a' + 10;
+
+ if (c >= 'A' && c <= 'F')
+ return c - 'A' + 10;
+
+ return -1;
+}
+
int lws_open(const char *__file, int __oflag, ...)
{
va_list ap;
@@ -75,39 +106,56 @@ int lws_open(const char *__file, int __oflag, ...)
n = open(__file, __oflag);
va_end(ap);
- lws_plat_apply_FD_CLOEXEC(n);
+ if (n != -1 && lws_plat_apply_FD_CLOEXEC(n)) {
+ close(n);
+
+ return -1;
+ }
return n;
}
-#if defined (_DEBUG)
-void lwsi_set_role(struct lws *wsi, lws_wsi_state_t role)
+void
+lws_vhost_bind_wsi(struct lws_vhost *vh, struct lws *wsi)
{
- wsi->wsistate = (wsi->wsistate & (~LWSI_ROLE_MASK)) | role;
-
- lwsl_debug("lwsi_set_role(%p, 0x%x)\n", wsi, wsi->wsistate);
+ if (wsi->vhost == vh)
+ return;
+ lws_context_lock(vh->context, __func__); /* ---------- context { */
+ wsi->vhost = vh;
+ vh->count_bound_wsi++;
+ lws_context_unlock(vh->context); /* } context ---------- */
+ lwsl_info("%s: vh %s: count_bound_wsi %d\n",
+ __func__, vh->name, vh->count_bound_wsi);
+ assert(wsi->vhost->count_bound_wsi > 0);
}
-void lwsi_set_state(struct lws *wsi, lws_wsi_state_t lrs)
+void
+lws_vhost_unbind_wsi(struct lws *wsi)
{
- wsi->wsistate = (wsi->wsistate & (~LRS_MASK)) | lrs;
-
- lwsl_debug("lwsi_set_state(%p, 0x%x)\n", wsi, wsi->wsistate);
-}
-#endif
+ if (!wsi->vhost)
+ return;
-signed char char_to_hex(const char c)
-{
- if (c >= '0' && c <= '9')
- return c - '0';
+ lws_context_lock(wsi->context, __func__); /* ---------- context { */
- if (c >= 'a' && c <= 'f')
- return c - 'a' + 10;
+ assert(wsi->vhost->count_bound_wsi > 0);
+ wsi->vhost->count_bound_wsi--;
+ lwsl_info("%s: vh %s: count_bound_wsi %d\n", __func__,
+ wsi->vhost->name, wsi->vhost->count_bound_wsi);
- if (c >= 'A' && c <= 'F')
- return c - 'A' + 10;
+ if (!wsi->vhost->count_bound_wsi &&
+ wsi->vhost->being_destroyed) {
+ /*
+ * We have closed all wsi that were bound to this vhost
+ * by any pt: nothing can be servicing any wsi belonging
+ * to it any more.
+ *
+ * Finalize the vh destruction
+ */
+ __lws_vhost_destroy2(wsi->vhost);
+ }
+ wsi->vhost = NULL;
- return -1;
+ lws_context_unlock(wsi->context); /* } context ---------- */
}
void
@@ -125,13 +173,24 @@ __lws_free_wsi(struct lws *wsi)
lws_free(wsi->user_space);
lws_buflist_destroy_all_segments(&wsi->buflist);
- lws_free_set_NULL(wsi->trunc_alloc);
+ lws_buflist_destroy_all_segments(&wsi->buflist_out);
lws_free_set_NULL(wsi->udp);
if (wsi->vhost && wsi->vhost->lserv_wsi == wsi)
wsi->vhost->lserv_wsi = NULL;
+#if !defined(LWS_NO_CLIENT)
+ lws_dll_lws_remove(&wsi->dll_active_client_conns);
+#endif
+ wsi->context->count_wsi_allocated--;
- // lws_peer_dump_from_wsi(wsi);
+#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
+ __lws_header_table_detach(wsi, 0);
+#endif
+ __lws_same_vh_protocol_remove(wsi);
+#if !defined(LWS_NO_CLIENT)
+ lws_client_stash_destroy(wsi);
+ lws_free_set_NULL(wsi->client_hostname_copy);
+#endif
if (wsi->role_ops->destroy_role)
wsi->role_ops->destroy_role(wsi);
@@ -151,7 +210,8 @@ __lws_free_wsi(struct lws *wsi)
if (wsi->context->event_loop_ops->destroy_wsi)
wsi->context->event_loop_ops->destroy_wsi(wsi);
- wsi->context->count_wsi_allocated--;
+ lws_vhost_unbind_wsi(wsi);
+
lwsl_debug("%s: %p, remaining wsi %d\n", __func__, wsi,
wsi->context->count_wsi_allocated);
@@ -327,6 +387,15 @@ __lws_set_timer_usecs(struct lws *wsi, lws_usec_t usecs)
// lws_dll_dump(&pt->dll_head_hrtimer, "after set_timer_usec");
}
+LWS_VISIBLE lws_usec_t
+lws_now_usecs(void)
+{
+ struct timeval now;
+
+ gettimeofday(&now, NULL);
+ return (now.tv_sec * 1000000ll) + now.tv_usec;
+}
+
LWS_VISIBLE void
lws_set_timer_usecs(struct lws *wsi, lws_usec_t usecs)
{
@@ -370,7 +439,8 @@ __lws_hrtimer_service(struct lws_context_per_thread *pt)
if (!pt->dll_head_hrtimer.next)
return LWS_HRTIMER_NOWAIT;
- wsi = lws_container_of(pt->dll_head_hrtimer.next, struct lws, dll_hrtimer);
+ wsi = lws_container_of(pt->dll_head_hrtimer.next, struct lws,
+ dll_hrtimer);
gettimeofday(&now, NULL);
t = (now.tv_sec * 1000000ll) + now.tv_usec;
@@ -389,7 +459,7 @@ __lws_set_timeout(struct lws *wsi, enum pending_timeout reason, int secs)
time(&now);
- lwsl_debug("%s: %p: %d secs\n", __func__, wsi, secs);
+ lwsl_debug("%s: %p: %d secs (reason %d)\n", __func__, wsi, secs, reason);
wsi->pending_timeout_limit = secs;
wsi->pending_timeout_set = now;
wsi->pending_timeout = reason;
@@ -408,7 +478,8 @@ lws_set_timeout(struct lws *wsi, enum pending_timeout reason, int secs)
if (secs == LWS_TO_KILL_SYNC) {
lws_remove_from_timeout_list(wsi);
lwsl_debug("synchronously killing %p\n", wsi);
- lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS, "to sync kill");
+ lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS,
+ "to sync kill");
return;
}
@@ -420,8 +491,10 @@ lws_set_timeout(struct lws *wsi, enum pending_timeout reason, int secs)
lws_pt_unlock(pt);
}
+/* requires context + vh lock */
+
int
-lws_timed_callback_remove(struct lws_vhost *vh, struct lws_timed_vh_protocol *p)
+__lws_timed_callback_remove(struct lws_vhost *vh, struct lws_timed_vh_protocol *p)
{
lws_start_foreach_llp(struct lws_timed_vh_protocol **, pt,
vh->timed_vh_protocol_list) {
@@ -436,9 +509,30 @@ lws_timed_callback_remove(struct lws_vhost *vh, struct lws_timed_vh_protocol *p)
return 1;
}
+int
+lws_pthread_self_to_tsi(struct lws_context *context)
+{
+#if LWS_MAX_SMP > 1
+ pthread_t ps = pthread_self();
+ struct lws_context_per_thread *pt = &context->pt[0];
+ int n;
+
+ for (n = 0; n < context->count_threads; n++) {
+ if (pthread_equal(ps, pt->self))
+ return n;
+ pt++;
+ }
+
+ return -1;
+#else
+ return 0;
+#endif
+}
+
LWS_VISIBLE LWS_EXTERN int
-lws_timed_callback_vh_protocol(struct lws_vhost *vh, const struct lws_protocols *prot,
- int reason, int secs)
+lws_timed_callback_vh_protocol(struct lws_vhost *vh,
+ const struct lws_protocols *prot, int reason,
+ int secs)
{
struct lws_timed_vh_protocol *p = (struct lws_timed_vh_protocol *)
lws_malloc(sizeof(*p), "timed_vh");
@@ -446,17 +540,27 @@ lws_timed_callback_vh_protocol(struct lws_vhost *vh, const struct lws_protocols
if (!p)
return 1;
+ p->tsi_req = lws_pthread_self_to_tsi(vh->context);
+ if (p->tsi_req < 0) /* not called from a service thread --> tsi 0 */
+ p->tsi_req = 0;
+
+ lws_context_lock(vh->context, __func__); /* context ----------------- */
+
p->protocol = prot;
p->reason = reason;
p->time = lws_now_secs() + secs;
- p->next = vh->timed_vh_protocol_list;
+ lws_vhost_lock(vh); /* vhost ---------------------------------------- */
+ p->next = vh->timed_vh_protocol_list;
vh->timed_vh_protocol_list = p;
+ lws_vhost_unlock(vh); /* -------------------------------------- vhost */
+
+ lws_context_unlock(vh->context); /* ------------------------- context */
return 0;
}
-static void
+void
lws_remove_child_from_any_parent(struct lws *wsi)
{
struct lws **pwsi;
@@ -490,15 +594,17 @@ lws_remove_child_from_any_parent(struct lws *wsi)
}
int
-lws_bind_protocol(struct lws *wsi, const struct lws_protocols *p)
+lws_bind_protocol(struct lws *wsi, const struct lws_protocols *p,
+ const char *reason)
{
// if (wsi->protocol == p)
// return 0;
const struct lws_protocols *vp = wsi->vhost->protocols, *vpo;
if (wsi->protocol && wsi->protocol_bind_balance) {
- wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP_DROP_PROTOCOL,
- wsi->user_space, NULL, 0);
+ wsi->protocol->callback(wsi,
+ wsi->role_ops->protocol_unbind_cb[!!lwsi_role_server(wsi)],
+ wsi->user_space, (void *)reason, 0);
wsi->protocol_bind_balance = 0;
}
if (!wsi->user_space_externally_allocated)
@@ -534,7 +640,8 @@ lws_bind_protocol(struct lws *wsi, const struct lws_protocols *p)
__func__, p, wsi->vhost->name);
}
- if (wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP_BIND_PROTOCOL,
+ if (wsi->protocol->callback(wsi, wsi->role_ops->protocol_bind_cb[
+ !!lwsi_role_server(wsi)],
wsi->user_space, NULL, 0))
return 1;
@@ -544,7 +651,8 @@ lws_bind_protocol(struct lws *wsi, const struct lws_protocols *p)
}
void
-__lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *caller)
+__lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason,
+ const char *caller)
{
struct lws_context_per_thread *pt;
struct lws *wsi1, *wsi2;
@@ -576,20 +684,21 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *
if ((int)reason != -1)
lws_vhost_lock(wsi->vhost);
lws_start_foreach_dll_safe(struct lws_dll_lws *, d, d1,
- wsi->dll_client_transaction_queue_head.next) {
+ wsi->dll_client_transaction_queue_head.next) {
struct lws *w = lws_container_of(d, struct lws,
- dll_client_transaction_queue);
+ dll_client_transaction_queue);
__lws_close_free_wsi(w, -1, "trans q leader closing");
} lws_end_foreach_dll_safe(d, d1);
/*
- * !!! If we are closing, but we have pending pipelined transaction
- * results we already sent headers for, that's going to destroy sync
- * for HTTP/1 and leave H2 stream with no live swsi.
+ * !!! If we are closing, but we have pending pipelined
+ * transaction results we already sent headers for, that's going
+ * to destroy sync for HTTP/1 and leave H2 stream with no live
+ * swsi.
*
- * However this is normal if we are being closed because the transaction
- * queue leader is closing.
+ * However this is normal if we are being closed because the
+ * transaction queue leader is closing.
*/
lws_dll_lws_remove(&wsi->dll_client_transaction_queue);
if ((int)reason !=-1)
@@ -605,7 +714,8 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *
wsi2->parent = NULL;
/* stop it doing shutdown processing */
wsi2->socket_is_permanently_unusable = 1;
- __lws_close_free_wsi(wsi2, reason, "general child recurse");
+ __lws_close_free_wsi(wsi2, reason,
+ "general child recurse");
wsi2 = wsi1;
}
wsi->child_list = NULL;
@@ -630,7 +740,8 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *
lws_cgi_remove_and_kill(wsi->parent);
/* end the binding between us and master */
- wsi->parent->http.cgi->stdwsi[(int)wsi->cgi_channel] = NULL;
+ wsi->parent->http.cgi->stdwsi[(int)wsi->cgi_channel] =
+ NULL;
}
wsi->socket_is_permanently_unusable = 1;
@@ -674,14 +785,24 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *
goto just_kill_connection;
case LRS_FLUSHING_BEFORE_CLOSE:
- if (wsi->trunc_len) {
+ if (lws_has_buffered_out(wsi)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ || wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more
+#endif
+ ) {
lws_callback_on_writable(wsi);
return;
}
lwsl_info("%p: end LRS_FLUSHING_BEFORE_CLOSE\n", wsi);
goto just_kill_connection;
default:
- if (wsi->trunc_len) {
+ if (lws_has_buffered_out(wsi)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ || wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more
+#endif
+ ) {
lwsl_info("%p: LRS_FLUSHING_BEFORE_CLOSE\n", wsi);
lwsi_set_state(wsi, LRS_FLUSHING_BEFORE_CLOSE);
__lws_set_timeout(wsi,
@@ -695,15 +816,13 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *
lwsi_state(wsi) == LRS_H1C_ISSUE_HANDSHAKE)
goto just_kill_connection;
- if (!wsi->told_user_closed && lwsi_role_http(wsi) &&
- lwsi_role_server(wsi)) {
- if (wsi->user_space && wsi->protocol &&
- wsi->protocol_bind_balance) {
- wsi->protocol->callback(wsi,
- LWS_CALLBACK_HTTP_DROP_PROTOCOL,
- wsi->user_space, NULL, 0);
- wsi->protocol_bind_balance = 0;
- }
+ if (!wsi->told_user_closed && wsi->user_space && wsi->protocol &&
+ wsi->protocol_bind_balance) {
+ wsi->protocol->callback(wsi,
+ wsi->role_ops->protocol_unbind_cb[
+ !!lwsi_role_server(wsi)],
+ wsi->user_space, (void *)__func__, 0);
+ wsi->protocol_bind_balance = 0;
}
/*
@@ -734,8 +853,10 @@ just_kill_connection:
wsi->protocol_bind_balance) {
lwsl_debug("%s: %p: DROP_PROTOCOL %s\n", __func__, wsi,
wsi->protocol->name);
- wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP_DROP_PROTOCOL,
- wsi->user_space, NULL, 0);
+ wsi->protocol->callback(wsi,
+ wsi->role_ops->protocol_unbind_cb[
+ !!lwsi_role_server(wsi)],
+ wsi->user_space, (void *)__func__, 0);
wsi->protocol_bind_balance = 0;
}
@@ -772,7 +893,7 @@ just_kill_connection:
} else
#endif
{
- lwsl_info("%s: shutdown conn: %p (sock %d, state 0x%x)\n",
+ lwsl_info("%s: shutdown conn: %p (sk %d, state 0x%x)\n",
__func__, wsi, (int)(long)wsi->desc.sockfd,
lwsi_state(wsi));
if (!wsi->socket_is_permanently_unusable &&
@@ -808,12 +929,16 @@ just_kill_connection:
lwsl_debug("%s: real just_kill_connection: %p (sockfd %d)\n", __func__,
wsi, wsi->desc.sockfd);
-#ifdef LWS_WITH_HTTP_PROXY
+#ifdef LWS_WITH_HUBBUB
if (wsi->http.rw) {
lws_rewrite_destroy(wsi->http.rw);
wsi->http.rw = NULL;
}
#endif
+
+ if (wsi->http.pending_return_headers)
+ lws_free_set_NULL(wsi->http.pending_return_headers);
+
/*
* we won't be servicing or receiving anything further from this guy
* delete socket from the internal poll list if still present
@@ -830,7 +955,7 @@ just_kill_connection:
if (wsi->desc.sockfd != LWS_SOCK_INVALID)
__remove_wsi_socket_from_fds(wsi);
else
- lws_same_vh_protocol_remove(wsi);
+ __lws_same_vh_protocol_remove(wsi);
lwsi_set_state(wsi, LRS_DEAD_SOCKET);
lws_buflist_destroy_all_segments(&wsi->buflist);
@@ -841,7 +966,9 @@ just_kill_connection:
/* tell the user it's all over for this guy */
- if (lwsi_state_est_PRE_CLOSE(wsi) && !wsi->told_user_closed &&
+ if ((lwsi_state_est_PRE_CLOSE(wsi) ||
+ lwsi_state_PRE_CLOSE(wsi) == LRS_WAITING_SERVER_REPLY) &&
+ !wsi->told_user_closed &&
wsi->role_ops->close_cb[lwsi_role_server(wsi)]) {
const struct lws_protocols *pro = wsi->protocol;
@@ -877,7 +1004,9 @@ __lws_close_free_wsi_final(struct lws *wsi)
{
int n;
- if (lws_socket_is_valid(wsi->desc.sockfd) && !lws_ssl_close(wsi)) {
+ if (!wsi->shadow &&
+ lws_socket_is_valid(wsi->desc.sockfd) && !lws_ssl_close(wsi)) {
+ lwsl_debug("%s: wsi %p: fd %d\n", __func__, wsi, wsi->desc.sockfd);
n = compatible_close(wsi->desc.sockfd);
if (n)
lwsl_debug("closing: close ret %d\n", LWS_ERRNO);
@@ -944,8 +1073,7 @@ lws_buflist_append_segment(struct lws_buflist **head, const uint8_t *buf,
lwsl_info("%s: len %u first %d %p\n", __func__, (uint32_t)len, first, p);
- nbuf = (struct lws_buflist *)
- lws_malloc(sizeof(**head) + len, __func__);
+ nbuf = (struct lws_buflist *)lws_malloc(sizeof(**head) + len, __func__);
if (!nbuf) {
lwsl_err("%s: OOM\n", __func__);
return -1;
@@ -1179,9 +1307,6 @@ lws_get_peer_simple(struct lws *wsi, char *name, int namelen)
wsi = lws_get_network_wsi(wsi);
- if (wsi->parent_carries_io)
- wsi = wsi->parent;
-
#ifdef LWS_WITH_IPV6
if (LWS_IPV6_ENABLED(wsi->vhost)) {
len = sizeof(sin6);
@@ -1298,7 +1423,11 @@ lws_get_network_wsi(struct lws *wsi)
return NULL;
#if defined(LWS_WITH_HTTP2)
- if (!wsi->http2_substream && !wsi->client_h2_substream)
+ if (!wsi->http2_substream
+#if !defined(LWS_NO_CLIENT)
+ && !wsi->client_h2_substream
+#endif
+ )
return wsi;
while (wsi->h2.parent_wsi)
@@ -1396,7 +1525,7 @@ lws_callback_vhost_protocols_vhost(struct lws_vhost *vh, int reason, void *in,
struct lws *wsi = lws_zalloc(sizeof(*wsi), "fake wsi");
wsi->context = vh->context;
- wsi->vhost = vh;
+ lws_vhost_bind_wsi(vh, wsi);
for (n = 0; n < wsi->vhost->count_protocols; n++) {
wsi->protocol = &vh->protocols[n];
@@ -1486,8 +1615,8 @@ lws_vfs_select_fops(const struct lws_plat_file_ops *fops, const char *vfs_path,
while (n < (int)LWS_ARRAY_SIZE(pf->fi) && pf->fi[n].sig) {
if (p >= vfs_path + pf->fi[n].len)
if (!strncmp(p - (pf->fi[n].len - 1),
- pf->fi[n].sig,
- pf->fi[n].len - 1)) {
+ pf->fi[n].sig,
+ pf->fi[n].len - 1)) {
*vpath = p + 1;
return pf;
}
@@ -1557,7 +1686,7 @@ lws_latency(struct lws_context *context, struct lws *wsi, const char *action,
unsigned long long u;
char buf[256];
- u = time_in_microseconds();
+ u = lws_time_in_microseconds();
if (!action) {
wsi->latency_start = u;
@@ -1625,7 +1754,8 @@ lws_rx_flow_control(struct lws *wsi, int _enable)
wsi->rxflow_change_to)
goto skip;
- wsi->rxflow_change_to = LWS_RXFLOW_PENDING_CHANGE | !wsi->rxflow_bitmap;
+ wsi->rxflow_change_to = LWS_RXFLOW_PENDING_CHANGE |
+ (!wsi->rxflow_bitmap);
lwsl_info("%s: %p: bitmap 0x%x: en 0x%x, ch 0x%x\n", __func__, wsi,
wsi->rxflow_bitmap, en, wsi->rxflow_change_to);
@@ -1676,7 +1806,7 @@ lws_broadcast(struct lws_context *context, int reason, void *in, size_t len)
while (v) {
const struct lws_protocols *p = v->protocols;
- wsi.vhost = v;
+ wsi.vhost = v; /* not a real bound wsi */
for (n = 0; n < v->count_protocols; n++) {
wsi.protocol = p;
@@ -1766,7 +1896,9 @@ lws_set_proxy(struct lws_vhost *vhost, const char *proxy)
lwsl_info(" Proxy auth in use\n");
+#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
proxy = p + 1;
+#endif
} else
vhost->proxy_basic_auth_token[0] = '\0';
@@ -1913,7 +2045,9 @@ LWS_VISIBLE int
lwsl_timestamp(int level, char *p, int len)
{
#ifndef LWS_PLAT_OPTEE
+#ifndef _WIN32_WCE
time_t o_now = time(NULL);
+#endif
unsigned long long now;
struct tm *ptm = NULL;
#ifndef WIN32
@@ -1933,7 +2067,7 @@ lwsl_timestamp(int level, char *p, int len)
for (n = 0; n < LLL_COUNT; n++) {
if (level != (1 << n))
continue;
- now = time_in_microseconds() / 100;
+ now = lws_time_in_microseconds() / 100;
if (ptm)
n = lws_snprintf(p, len,
"[%04d/%02d/%02d %02d:%02d:%02d:%04d] %s: ",
@@ -1970,12 +2104,15 @@ static const char * const colours[] = {
"[33m", /* LLL_CLIENT */
"[33;1m", /* LLL_LATENCY */
"[30;1m", /* LLL_USER */
+ "[31m", /* LLL_THREAD */
};
-LWS_VISIBLE void lwsl_emit_stderr(int level, const char *line)
+static char tty;
+
+LWS_VISIBLE void
+lwsl_emit_stderr(int level, const char *line)
{
char buf[50];
- static char tty = 3;
int n, m = LWS_ARRAY_SIZE(colours) - 1;
if (!tty)
@@ -1994,6 +2131,28 @@ LWS_VISIBLE void lwsl_emit_stderr(int level, const char *line)
} else
fprintf(stderr, "%s%s", buf, line);
}
+
+LWS_VISIBLE void
+lwsl_emit_stderr_notimestamp(int level, const char *line)
+{
+ int n, m = LWS_ARRAY_SIZE(colours) - 1;
+
+ if (!tty)
+ tty = isatty(2) | 2;
+
+ if (tty == 3) {
+ n = 1 << (LWS_ARRAY_SIZE(colours) - 1);
+ while (n) {
+ if (level & n)
+ break;
+ m--;
+ n >>= 1;
+ }
+ fprintf(stderr, "%c%s%s%c[0m", 27, colours[m], line, 27);
+ } else
+ fprintf(stderr, "%s", line);
+}
+
#endif
LWS_VISIBLE void _lws_logv(int filter, const char *format, va_list vl)
@@ -2007,8 +2166,14 @@ LWS_VISIBLE void _lws_logv(int filter, const char *format, va_list vl)
n = vsnprintf(buf, sizeof(buf) - 1, format, vl);
(void)n;
/* vnsprintf returns what it would have written, even if truncated */
- if (n > (int)sizeof(buf) - 1)
- n = sizeof(buf) - 1;
+ if (n > (int)sizeof(buf) - 1) {
+ n = sizeof(buf) - 5;
+ buf[n++] = '.';
+ buf[n++] = '.';
+ buf[n++] = '.';
+ buf[n++] = '\n';
+ buf[n] = '\0';
+ }
if (n > 0)
buf[n] = '\0';
@@ -2041,9 +2206,7 @@ LWS_VISIBLE void
lwsl_hexdump_level(int hexdump_level, const void *vbuf, size_t len)
{
unsigned char *buf = (unsigned char *)vbuf;
- unsigned int n, m, start;
- char line[80];
- char *p;
+ unsigned int n;
if (!lwsl_visible(hexdump_level))
return;
@@ -2057,8 +2220,8 @@ lwsl_hexdump_level(int hexdump_level, const void *vbuf, size_t len)
_lws_log(hexdump_level, "\n");
for (n = 0; n < len;) {
- start = n;
- p = line;
+ unsigned int start = n, m;
+ char line[80], *p = line;
p += sprintf(p, "%04X: ", start);
@@ -2117,7 +2280,7 @@ lws_get_ssl(struct lws *wsi)
LWS_VISIBLE int
lws_partial_buffered(struct lws *wsi)
{
- return !!wsi->trunc_len;
+ return lws_has_buffered_out(wsi);
}
LWS_VISIBLE lws_fileofs_t
@@ -2130,7 +2293,7 @@ lws_get_peer_write_allowance(struct lws *wsi)
LWS_VISIBLE void
lws_role_transition(struct lws *wsi, enum lwsi_role role, enum lwsi_state state,
- struct lws_role_ops *ops)
+ struct lws_role_ops *ops)
{
#if defined(_DEBUG)
const char *name = "(unset)";
@@ -2192,12 +2355,6 @@ lws_get_child(const struct lws *wsi)
return wsi->child_list;
}
-LWS_VISIBLE LWS_EXTERN void
-lws_set_parent_carries_io(struct lws *wsi)
-{
- wsi->parent_carries_io = 1;
-}
-
LWS_VISIBLE LWS_EXTERN void *
lws_get_opaque_parent_data(const struct lws *wsi)
{
@@ -2257,7 +2414,7 @@ __lws_rx_flow_control(struct lws *wsi)
wsi->rxflow_change_to &= ~LWS_RXFLOW_PENDING_CHANGE;
lwsl_info("rxflow: wsi %p change_to %d\n", wsi,
- wsi->rxflow_change_to & LWS_RXFLOW_ALLOW);
+ wsi->rxflow_change_to & LWS_RXFLOW_ALLOW);
/* adjust the pollfd for this wsi */
@@ -2273,36 +2430,60 @@ __lws_rx_flow_control(struct lws *wsi)
return 0;
}
+static const unsigned char e0f4[] = {
+ 0xa0 | ((2 - 1) << 2) | 1, /* e0 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e1 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e2 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e3 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e4 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e5 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e6 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e7 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e8 */
+ 0x80 | ((4 - 1) << 2) | 1, /* e9 */
+ 0x80 | ((4 - 1) << 2) | 1, /* ea */
+ 0x80 | ((4 - 1) << 2) | 1, /* eb */
+ 0x80 | ((4 - 1) << 2) | 1, /* ec */
+ 0x80 | ((2 - 1) << 2) | 1, /* ed */
+ 0x80 | ((4 - 1) << 2) | 1, /* ee */
+ 0x80 | ((4 - 1) << 2) | 1, /* ef */
+ 0x90 | ((3 - 1) << 2) | 2, /* f0 */
+ 0x80 | ((4 - 1) << 2) | 2, /* f1 */
+ 0x80 | ((4 - 1) << 2) | 2, /* f2 */
+ 0x80 | ((4 - 1) << 2) | 2, /* f3 */
+ 0x80 | ((1 - 1) << 2) | 2, /* f4 */
+
+ 0, /* s0 */
+ 0x80 | ((4 - 1) << 2) | 0, /* s2 */
+ 0x80 | ((4 - 1) << 2) | 1, /* s3 */
+};
+
+LWS_EXTERN int
+lws_check_byte_utf8(unsigned char state, unsigned char c)
+{
+ unsigned char s = state;
+
+ if (!s) {
+ if (c >= 0x80) {
+ if (c < 0xc2 || c > 0xf4)
+ return -1;
+ if (c < 0xe0)
+ return 0x80 | ((4 - 1) << 2);
+ else
+ return e0f4[c - 0xe0];
+ }
+
+ return s;
+ }
+ if (c < (s & 0xf0) || c >= (s & 0xf0) + 0x10 + ((s << 2) & 0x30))
+ return -1;
+
+ return e0f4[21 + (s & 3)];
+}
+
LWS_EXTERN int
lws_check_utf8(unsigned char *state, unsigned char *buf, size_t len)
{
- static const unsigned char e0f4[] = {
- 0xa0 | ((2 - 1) << 2) | 1, /* e0 */
- 0x80 | ((4 - 1) << 2) | 1, /* e1 */
- 0x80 | ((4 - 1) << 2) | 1, /* e2 */
- 0x80 | ((4 - 1) << 2) | 1, /* e3 */
- 0x80 | ((4 - 1) << 2) | 1, /* e4 */
- 0x80 | ((4 - 1) << 2) | 1, /* e5 */
- 0x80 | ((4 - 1) << 2) | 1, /* e6 */
- 0x80 | ((4 - 1) << 2) | 1, /* e7 */
- 0x80 | ((4 - 1) << 2) | 1, /* e8 */
- 0x80 | ((4 - 1) << 2) | 1, /* e9 */
- 0x80 | ((4 - 1) << 2) | 1, /* ea */
- 0x80 | ((4 - 1) << 2) | 1, /* eb */
- 0x80 | ((4 - 1) << 2) | 1, /* ec */
- 0x80 | ((2 - 1) << 2) | 1, /* ed */
- 0x80 | ((4 - 1) << 2) | 1, /* ee */
- 0x80 | ((4 - 1) << 2) | 1, /* ef */
- 0x90 | ((3 - 1) << 2) | 2, /* f0 */
- 0x80 | ((4 - 1) << 2) | 2, /* f1 */
- 0x80 | ((4 - 1) << 2) | 2, /* f2 */
- 0x80 | ((4 - 1) << 2) | 2, /* f3 */
- 0x80 | ((1 - 1) << 2) | 2, /* f4 */
-
- 0, /* s0 */
- 0x80 | ((4 - 1) << 2) | 0, /* s2 */
- 0x80 | ((4 - 1) << 2) | 1, /* s3 */
- };
unsigned char s = *state;
while (len--) {
@@ -2335,7 +2516,7 @@ lws_parse_uri(char *p, const char **prot, const char **ads, int *port,
const char **path)
{
const char *end;
- static const char *slash = "/";
+ char unix_skt = 0;
/* cut up the location into address, port and path */
*prot = p;
@@ -2349,32 +2530,32 @@ lws_parse_uri(char *p, const char **prot, const char **ads, int *port,
*p = '\0';
p += 3;
}
+ if (*p == '+') /* unix skt */
+ unix_skt = 1;
+
*ads = p;
if (!strcmp(*prot, "http") || !strcmp(*prot, "ws"))
*port = 80;
else if (!strcmp(*prot, "https") || !strcmp(*prot, "wss"))
*port = 443;
- if (*p == '[')
- {
- ++(*ads);
- while (*p && *p != ']')
- p++;
- if (*p)
- *p++ = '\0';
- }
- else
- {
- while (*p && *p != ':' && *p != '/')
- p++;
- }
+ if (*p == '[') {
+ ++(*ads);
+ while (*p && *p != ']')
+ p++;
+ if (*p)
+ *p++ = '\0';
+ } else
+ while (*p && *p != ':' && (unix_skt || *p != '/'))
+ p++;
+
if (*p == ':') {
*p++ = '\0';
*port = atoi(p);
while (*p && *p != '/')
p++;
}
- *path = slash;
+ *path = "/";
if (*p) {
*p++ = '\0';
if (*p)
@@ -2384,6 +2565,17 @@ lws_parse_uri(char *p, const char **prot, const char **ads, int *port,
return 0;
}
+char *
+lws_strdup(const char *s)
+{
+ char *d = lws_malloc(strlen(s) + 1, "strdup");
+
+ if (d)
+ strcpy(d, s);
+
+ return d;
+}
+
#if defined(LWS_WITHOUT_EXTENSIONS)
/* we need to provide dummy callbacks for internal exts
@@ -2417,6 +2609,14 @@ lws_set_extension_option(struct lws *wsi, const char *ext_name,
}
#endif
+/* note: this returns a random port, or one of these <= 0 return codes:
+ *
+ * LWS_ITOSA_USABLE: the interface is usable, returned if so and sockfd invalid
+ * LWS_ITOSA_NOT_EXIST: the requested iface does not even exist
+ * LWS_ITOSA_NOT_USABLE: the requested iface exists but is not usable (eg, no IP)
+ * LWS_ITOSA_BUSY: the port at the requested iface + port is already in use
+ */
+
LWS_EXTERN int
lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
const char *iface)
@@ -2438,22 +2638,26 @@ lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
struct sockaddr_storage sin;
struct sockaddr *v;
-#ifdef LWS_WITH_UNIX_SOCK
+ memset(&sin, 0, sizeof(sin));
+
+#if defined(LWS_WITH_UNIX_SOCK)
if (LWS_UNIX_SOCK_ENABLED(vhost)) {
v = (struct sockaddr *)&serv_unix;
n = sizeof(struct sockaddr_un);
bzero((char *) &serv_unix, sizeof(serv_unix));
serv_unix.sun_family = AF_UNIX;
if (!iface)
- return -1;
+ return LWS_ITOSA_NOT_EXIST;
if (sizeof(serv_unix.sun_path) <= strlen(iface)) {
lwsl_err("\"%s\" too long for UNIX domain socket\n",
iface);
- return -1;
+ return LWS_ITOSA_NOT_EXIST;
}
strcpy(serv_unix.sun_path, iface);
if (serv_unix.sun_path[0] == '@')
serv_unix.sun_path[0] = '\0';
+ else
+ unlink(serv_unix.sun_path);
} else
#endif
@@ -2488,8 +2692,8 @@ lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
bzero((char *) &serv_addr4, sizeof(serv_addr4));
serv_addr4.sin_addr.s_addr = INADDR_ANY;
serv_addr4.sin_family = AF_INET;
-#if !defined(LWS_WITH_ESP32)
+#if !defined(LWS_WITH_ESP32)
if (iface) {
m = interface_to_sa(vhost, iface,
(struct sockaddr_in *)v, n);
@@ -2510,22 +2714,38 @@ lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
/* just checking for the interface extant */
if (sockfd == LWS_SOCK_INVALID)
- return 0;
+ return LWS_ITOSA_USABLE;
n = bind(sockfd, v, n);
#ifdef LWS_WITH_UNIX_SOCK
if (n < 0 && LWS_UNIX_SOCK_ENABLED(vhost)) {
lwsl_err("ERROR on binding fd %d to \"%s\" (%d %d)\n",
- sockfd, iface, n, LWS_ERRNO);
- return -1;
+ sockfd, iface, n, LWS_ERRNO);
+ return LWS_ITOSA_NOT_EXIST;
} else
#endif
if (n < 0) {
lwsl_err("ERROR on binding fd %d to port %d (%d %d)\n",
- sockfd, port, n, LWS_ERRNO);
- return -1;
+ sockfd, port, n, LWS_ERRNO);
+
+ /* if something already listening, tell caller to fail permanently */
+
+ if (LWS_ERRNO == LWS_EADDRINUSE)
+ return LWS_ITOSA_BUSY;
+
+ /* otherwise ask caller to retry later */
+
+ return LWS_ITOSA_NOT_EXIST;
}
+#if defined(LWS_WITH_UNIX_SOCK)
+ if (LWS_UNIX_SOCK_ENABLED(vhost) && vhost->context->uid)
+ if (chown(serv_unix.sun_path, vhost->context->uid,
+ vhost->context->gid))
+ lwsl_notice("%s: chown for unix skt %s failed\n",
+ __func__, serv_unix.sun_path);
+#endif
+
#ifndef LWS_PLAT_OPTEE
if (getsockname(sockfd, (struct sockaddr *)&sin, &len) == -1)
lwsl_warn("getsockname: %s\n", strerror(LWS_ERRNO));
@@ -2600,7 +2820,7 @@ lws_get_addr_scope(const char *ipaddr)
for (i = 0; i < 5; i++)
{
ret = GetAdaptersAddresses(AF_INET6, GAA_FLAG_INCLUDE_PREFIX,
- NULL, addrs, &size);
+ NULL, addrs, &size);
if ((ret == NO_ERROR) || (ret == ERROR_NO_DATA)) {
break;
} else if (ret == ERROR_BUFFER_OVERFLOW)
@@ -2653,73 +2873,6 @@ lws_get_addr_scope(const char *ipaddr)
}
#endif
-#if !defined(LWS_NO_SERVER)
-
-LWS_EXTERN struct lws *
-lws_create_adopt_udp(struct lws_vhost *vhost, int port, int flags,
- const char *protocol_name, struct lws *parent_wsi)
-{
- lws_sock_file_fd_type sock;
- struct addrinfo h, *r, *rp;
- struct lws *wsi = NULL;
- char buf[16];
- int n;
-
- memset(&h, 0, sizeof(h));
- h.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
- h.ai_socktype = SOCK_DGRAM;
- h.ai_protocol = IPPROTO_UDP;
- h.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
-
- lws_snprintf(buf, sizeof(buf), "%u", port);
- n = getaddrinfo(NULL, buf, &h, &r);
- if (n) {
- lwsl_info("%s: getaddrinfo error: %s\n", __func__,
- gai_strerror(n));
- goto bail;
- }
-
- for (rp = r; rp; rp = rp->ai_next) {
- sock.sockfd = socket(rp->ai_family, rp->ai_socktype,
- rp->ai_protocol);
- if (sock.sockfd >= 0)
- break;
- }
- if (!rp) {
- lwsl_err("%s: unable to create INET socket\n", __func__);
- goto bail1;
- }
-
- if ((flags & LWS_CAUDP_BIND) && bind(sock.sockfd, rp->ai_addr,
-#if defined(_WIN32)
- (int)rp->ai_addrlen
-#else
- rp->ai_addrlen
-#endif
- ) == -1) {
- lwsl_err("%s: bind failed\n", __func__);
- goto bail2;
- }
-
- wsi = lws_adopt_descriptor_vhost(vhost, LWS_ADOPT_RAW_SOCKET_UDP, sock,
- protocol_name, parent_wsi);
- if (!wsi)
- lwsl_err("%s: udp adoption failed\n", __func__);
-
-bail2:
- if (!wsi)
- close((int)sock.sockfd);
-bail1:
- freeaddrinfo(r);
-
-bail:
- return wsi;
-}
-
-#endif
-
-
-
static const char *hex = "0123456789ABCDEF";
LWS_VISIBLE LWS_EXTERN const char *
@@ -2754,6 +2907,27 @@ lws_json_purify(char *escaped, const char *string, int len)
}
while (*p && len-- > 6) {
+ if (*p == '\t') {
+ p++;
+ *q++ = '\\';
+ *q++ = 't';
+ continue;
+ }
+
+ if (*p == '\n') {
+ p++;
+ *q++ = '\\';
+ *q++ = 'n';
+ continue;
+ }
+
+ if (*p == '\r') {
+ p++;
+ *q++ = '\\';
+ *q++ = 'r';
+ continue;
+ }
+
if (*p == '\"' || *p == '\\' || *p < 0x20) {
*q++ = '\\';
*q++ = 'u';
@@ -2890,6 +3064,13 @@ lws_finalize_startup(struct lws_context *context)
return 0;
}
+LWS_VISIBLE LWS_EXTERN void
+lws_get_effective_uid_gid(struct lws_context *context, int *uid, int *gid)
+{
+ *uid = context->uid;
+ *gid = context->gid;
+}
+
int
lws_snprintf(char *str, size_t size, const char *format, ...)
{
@@ -2919,6 +3100,316 @@ lws_strncpy(char *dest, const char *src, size_t size)
}
+typedef enum {
+ LWS_TOKZS_LEADING_WHITESPACE,
+ LWS_TOKZS_QUOTED_STRING,
+ LWS_TOKZS_TOKEN,
+ LWS_TOKZS_TOKEN_POST_TERMINAL
+} lws_tokenize_state;
+
+int
+lws_tokenize(struct lws_tokenize *ts)
+{
+ const char *rfc7230_delims = "(),/:;<=>?@[\\]{}";
+ lws_tokenize_state state = LWS_TOKZS_LEADING_WHITESPACE;
+ char c, flo = 0, d_minus = '-', d_dot = '.', s_minus = '\0',
+ s_dot = '\0';
+ signed char num = -1;
+ int utf8 = 0;
+
+ /* for speed, compute the effect of the flags outside the loop */
+
+ if (ts->flags & LWS_TOKENIZE_F_MINUS_NONTERM) {
+ d_minus = '\0';
+ s_minus = '-';
+ }
+ if (ts->flags & LWS_TOKENIZE_F_DOT_NONTERM) {
+ d_dot = '\0';
+ s_dot = '.';
+ }
+
+ ts->token = NULL;
+ ts->token_len = 0;
+
+ while (ts->len) {
+ c = *ts->start++;
+ ts->len--;
+
+ utf8 = lws_check_byte_utf8((unsigned char)utf8, c);
+ if (utf8 < 0)
+ return LWS_TOKZE_ERR_BROKEN_UTF8;
+
+ if (!c)
+ break;
+
+ /* whitespace */
+
+ if (c == ' ' || c == '\t' || c == '\n' || c == '\r' ||
+ c == '\f') {
+ switch (state) {
+ case LWS_TOKZS_LEADING_WHITESPACE:
+ case LWS_TOKZS_TOKEN_POST_TERMINAL:
+ continue;
+ case LWS_TOKZS_QUOTED_STRING:
+ ts->token_len++;
+ continue;
+ case LWS_TOKZS_TOKEN:
+ /* we want to scan forward to look for = */
+
+ state = LWS_TOKZS_TOKEN_POST_TERMINAL;
+ continue;
+ }
+ }
+
+ /* quoted string */
+
+ if (c == '\"') {
+ if (state == LWS_TOKZS_QUOTED_STRING)
+ return LWS_TOKZE_QUOTED_STRING;
+
+ /* starting a quoted string */
+
+ if (ts->flags & LWS_TOKENIZE_F_COMMA_SEP_LIST) {
+ if (ts->delim == LWSTZ_DT_NEED_DELIM)
+ return LWS_TOKZE_ERR_COMMA_LIST;
+ ts->delim = LWSTZ_DT_NEED_DELIM;
+ }
+
+ state = LWS_TOKZS_QUOTED_STRING;
+ ts->token = ts->start;
+ ts->token_len = 0;
+
+ continue;
+ }
+
+ /* token= aggregation */
+
+ if (c == '=' && (state == LWS_TOKZS_TOKEN_POST_TERMINAL ||
+ state == LWS_TOKZS_TOKEN)) {
+ if (num == 1)
+ return LWS_TOKZE_ERR_NUM_ON_LHS;
+ /* swallow the = */
+ return LWS_TOKZE_TOKEN_NAME_EQUALS;
+ }
+
+ /* optional token: aggregation */
+
+ if ((ts->flags & LWS_TOKENIZE_F_AGG_COLON) && c == ':' &&
+ (state == LWS_TOKZS_TOKEN_POST_TERMINAL ||
+ state == LWS_TOKZS_TOKEN))
+ /* swallow the : */
+ return LWS_TOKZE_TOKEN_NAME_COLON;
+
+ /* aggregate . in a number as a float */
+
+ if (c == '.' && !(ts->flags & LWS_TOKENIZE_F_NO_FLOATS) &&
+ state == LWS_TOKZS_TOKEN && num == 1) {
+ if (flo)
+ return LWS_TOKZE_ERR_MALFORMED_FLOAT;
+ flo = 1;
+ ts->token_len++;
+ continue;
+ }
+
+ /*
+ * Delimiter... by default anything that:
+ *
+ * - isn't matched earlier, or
+ * - is [A-Z, a-z, 0-9, _], and
+ * - is not a partial utf8 char
+ *
+ * is a "delimiter", it marks the end of a token and is itself
+ * reported as a single LWS_TOKZE_DELIMITER each time.
+ *
+ * However with LWS_TOKENIZE_F_RFC7230_DELIMS flag, tokens may
+ * contain any noncontrol character that isn't defined in
+ * rfc7230_delims, and only characters listed there are treated
+ * as delimiters.
+ */
+
+ if (!utf8 &&
+ ((ts->flags & LWS_TOKENIZE_F_RFC7230_DELIMS &&
+ strchr(rfc7230_delims, c) && c > 32) ||
+ ((!(ts->flags & LWS_TOKENIZE_F_RFC7230_DELIMS) &&
+ (c < '0' || c > '9') && (c < 'A' || c > 'Z') &&
+ (c < 'a' || c > 'z') && c != '_') &&
+ c != s_minus && c != s_dot) ||
+ c == d_minus || c == d_dot
+ )) {
+ switch (state) {
+ case LWS_TOKZS_LEADING_WHITESPACE:
+ if (ts->flags & LWS_TOKENIZE_F_COMMA_SEP_LIST) {
+ if (c != ',' ||
+ ts->delim != LWSTZ_DT_NEED_DELIM)
+ return LWS_TOKZE_ERR_COMMA_LIST;
+ ts->delim = LWSTZ_DT_NEED_NEXT_CONTENT;
+ }
+
+ ts->token = ts->start - 1;
+ ts->token_len = 1;
+ return LWS_TOKZE_DELIMITER;
+
+ case LWS_TOKZS_QUOTED_STRING:
+ ts->token_len++;
+ continue;
+
+ case LWS_TOKZS_TOKEN_POST_TERMINAL:
+ case LWS_TOKZS_TOKEN:
+ /* report the delimiter next time */
+ ts->start--;
+ ts->len++;
+ goto token_or_numeric;
+ }
+ }
+
+ /* anything that's not whitespace or delimiter is payload */
+
+ switch (state) {
+ case LWS_TOKZS_LEADING_WHITESPACE:
+
+ if (ts->flags & LWS_TOKENIZE_F_COMMA_SEP_LIST) {
+ if (ts->delim == LWSTZ_DT_NEED_DELIM)
+ return LWS_TOKZE_ERR_COMMA_LIST;
+ ts->delim = LWSTZ_DT_NEED_DELIM;
+ }
+
+ state = LWS_TOKZS_TOKEN;
+ ts->token = ts->start - 1;
+ ts->token_len = 1;
+ if (c < '0' || c > '9')
+ num = 0;
+ else
+ if (num < 0)
+ num = 1;
+ continue;
+ case LWS_TOKZS_QUOTED_STRING:
+ case LWS_TOKZS_TOKEN:
+ if (c < '0' || c > '9')
+ num = 0;
+ else
+ if (num < 0)
+ num = 1;
+ ts->token_len++;
+ continue;
+ case LWS_TOKZS_TOKEN_POST_TERMINAL:
+ /* report the new token next time */
+ ts->start--;
+ ts->len++;
+ goto token_or_numeric;
+ }
+ }
+
+ /* we ran out of content */
+
+ if (utf8) /* ended partway through a multibyte char */
+ return LWS_TOKZE_ERR_BROKEN_UTF8;
+
+ if (state == LWS_TOKZS_QUOTED_STRING)
+ return LWS_TOKZE_ERR_UNTERM_STRING;
+
+ if (state != LWS_TOKZS_TOKEN_POST_TERMINAL &&
+ state != LWS_TOKZS_TOKEN) {
+ if ((ts->flags & LWS_TOKENIZE_F_COMMA_SEP_LIST) &&
+ ts->delim == LWSTZ_DT_NEED_NEXT_CONTENT)
+ return LWS_TOKZE_ERR_COMMA_LIST;
+
+ return LWS_TOKZE_ENDED;
+ }
+
+ /* report the pending token */
+
+token_or_numeric:
+
+ if (num != 1)
+ return LWS_TOKZE_TOKEN;
+ if (flo)
+ return LWS_TOKZE_FLOAT;
+
+ return LWS_TOKZE_INTEGER;
+}
+
+
+LWS_VISIBLE LWS_EXTERN int
+lws_tokenize_cstr(struct lws_tokenize *ts, char *str, int max)
+{
+ if (ts->token_len + 1 >= max)
+ return 1;
+
+ memcpy(str, ts->token, ts->token_len);
+ str[ts->token_len] = '\0';
+
+ return 0;
+}
+
+LWS_VISIBLE LWS_EXTERN void
+lws_tokenize_init(struct lws_tokenize *ts, const char *start, int flags)
+{
+ ts->start = start;
+ ts->len = 0x7fffffff;
+ ts->flags = flags;
+ ts->delim = LWSTZ_DT_NEED_FIRST_CONTENT;
+}
+
+#if LWS_MAX_SMP > 1
+
+void
+lws_mutex_refcount_init(struct lws_mutex_refcount *mr)
+{
+ pthread_mutex_init(&mr->lock, NULL);
+ mr->last_lock_reason = NULL;
+ mr->lock_depth = 0;
+ mr->metadata = 0;
+ mr->lock_owner = 0;
+}
+
+void
+lws_mutex_refcount_destroy(struct lws_mutex_refcount *mr)
+{
+ pthread_mutex_destroy(&mr->lock);
+}
+
+void
+lws_mutex_refcount_lock(struct lws_mutex_refcount *mr, const char *reason)
+{
+ /* if true, this sequence is atomic because our thread has the lock
+ *
+ * - if true, only guy who can race to make it untrue is our thread,
+ * and we are here.
+ *
+ * - if false, only guy who could race to make it true is our thread,
+ * and we are here
+ *
+ * - it can be false and change to a different tid that is also false
+ */
+ if (mr->lock_owner == pthread_self()) {
+ /* atomic because we only change it if we own the lock */
+ mr->lock_depth++;
+ return;
+ }
+
+ pthread_mutex_lock(&mr->lock);
+ /* atomic because only we can have the lock */
+ mr->last_lock_reason = reason;
+ mr->lock_owner = pthread_self();
+ mr->lock_depth = 1;
+ //lwsl_notice("tid %d: lock %s\n", mr->tid, reason);
+}
+
+void
+lws_mutex_refcount_unlock(struct lws_mutex_refcount *mr)
+{
+ if (--mr->lock_depth)
+ /* atomic because only thread that has the lock can unlock */
+ return;
+
+ mr->last_lock_reason = "free";
+ mr->lock_owner = 0;
+ //lwsl_notice("tid %d: unlock %s\n", mr->tid, mr->last_lock_reason);
+ pthread_mutex_unlock(&mr->lock);
+}
+
+#endif /* SMP */
+
LWS_VISIBLE LWS_EXTERN int
lws_is_cgi(struct lws *wsi) {
#ifdef LWS_WITH_CGI
@@ -2941,6 +3432,21 @@ lws_pvo_search(const struct lws_protocol_vhost_options *pvo, const char *name)
return pvo;
}
+int
+lws_pvo_get_str(void *in, const char *name, const char **result)
+{
+ const struct lws_protocol_vhost_options *pv =
+ lws_pvo_search((const struct lws_protocol_vhost_options *)in,
+ name);
+
+ if (!pv)
+ return 1;
+
+ *result = (const char *)pv->value;
+
+ return 0;
+}
+
void
lws_sum_stats(const struct lws_context *ctx, struct lws_conn_stats *cs)
{
@@ -3255,9 +3761,10 @@ LWS_VISIBLE LWS_EXTERN void
lws_stats_log_dump(struct lws_context *context)
{
struct lws_vhost *v = context->vhost_list;
- int n, m;
-
- (void)m;
+ int n;
+#if defined(LWS_WITH_PEER_LIMITS)
+ int m;
+#endif
if (!context->updated)
return;
diff --git a/thirdparty/libwebsockets/core/output.c b/thirdparty/libwebsockets/lib/core/output.c
index 11965a06b9..49d289db40 100644
--- a/thirdparty/libwebsockets/core/output.c
+++ b/thirdparty/libwebsockets/lib/core/output.c
@@ -1,7 +1,7 @@
/*
* libwebsockets - small server side websockets and web server implementation
*
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,49 +29,65 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len)
struct lws_context *context = lws_get_context(wsi);
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
size_t real_len = len;
- unsigned int n;
+ unsigned int n, m;
- // lwsl_hexdump_err(buf, len);
+ // lwsl_notice("%s: len %d\n", __func__, (int)len);
+ // lwsl_hexdump_level(LLL_NOTICE, buf, len);
/*
* Detect if we got called twice without going through the
- * event loop to handle pending. This would be caused by either
- * back-to-back writes in one WRITABLE (illegal) or calling lws_write()
- * from outside the WRITABLE callback (illegal).
+ * event loop to handle pending. Since that guarantees extending any
+ * existing buflist_out it's inefficient.
*/
- if (wsi->could_have_pending) {
- lwsl_hexdump_level(LLL_ERR, buf, len);
- lwsl_err("** %p: vh: %s, prot: %s, role %s: "
- "Illegal back-to-back write of %lu detected...\n",
+ if (0 && buf && wsi->could_have_pending) {
+ lwsl_hexdump_level(LLL_INFO, buf, len);
+ lwsl_info("** %p: vh: %s, prot: %s, role %s: "
+ "Inefficient back-to-back write of %lu detected...\n",
wsi, wsi->vhost->name, wsi->protocol->name,
wsi->role_ops->name,
(unsigned long)len);
- // assert(0);
-
- return -1;
}
lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_API_WRITE, 1);
- if (!len)
- return 0;
/* just ignore sends after we cleared the truncation buffer */
- if (lwsi_state(wsi) == LRS_FLUSHING_BEFORE_CLOSE && !wsi->trunc_len)
+ if (lwsi_state(wsi) == LRS_FLUSHING_BEFORE_CLOSE &&
+ !lws_has_buffered_out(wsi)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ && !wsi->http.comp_ctx.may_have_more
+#endif
+ )
return (int)len;
- if (wsi->trunc_len && (buf < wsi->trunc_alloc ||
- buf > (wsi->trunc_alloc + wsi->trunc_len + wsi->trunc_offset))) {
- lwsl_hexdump_level(LLL_ERR, buf, len);
- lwsl_err("** %p: vh: %s, prot: %s, Sending new %lu, pending truncated ...\n"
- " It's illegal to do an lws_write outside of\n"
- " the writable callback: fix your code\n",
+ if (buf && lws_has_buffered_out(wsi)) {
+ lwsl_info("** %p: vh: %s, prot: %s, incr buflist_out by %lu\n",
wsi, wsi->vhost->name, wsi->protocol->name,
(unsigned long)len);
- assert(0);
- return -1;
+ /*
+ * already buflist ahead of this, add it on the tail of the
+ * buflist, then ignore it for now and act like we're flushing
+ * the buflist...
+ */
+
+ lws_buflist_append_segment(&wsi->buflist_out, buf, len);
+
+ buf = NULL;
+ len = 0;
}
+ if (wsi->buflist_out) {
+ /* we have to drain the earliest buflist_out stuff first */
+
+ len = lws_buflist_next_segment_len(&wsi->buflist_out, &buf);
+ real_len = len;
+
+ lwsl_debug("%s: draining %d\n", __func__, (int)len);
+ }
+
+ if (!len || !buf)
+ return 0;
+
if (!wsi->http2_substream && !lws_socket_is_valid(wsi->desc.sockfd))
lwsl_warn("** error invalid sock but expected to send\n");
@@ -89,13 +105,15 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len)
/* nope, send it on the socket directly */
lws_latency_pre(context, wsi);
- n = lws_ssl_capable_write(wsi, buf, n);
- lws_latency(context, wsi, "send lws_issue_raw", n, n == len);
+ m = lws_ssl_capable_write(wsi, buf, n);
+ lws_latency(context, wsi, "send lws_issue_raw", n, n == m);
+
+ lwsl_info("%s: ssl_capable_write (%d) says %d\n", __func__, n, m);
/* something got written, it can have been truncated now */
wsi->could_have_pending = 1;
- switch (n) {
+ switch (m) {
case LWS_SSL_CAPABLE_ERROR:
/* we're going to close, let close know sends aren't possible */
wsi->socket_is_permanently_unusable = 1;
@@ -106,24 +124,29 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len)
* ie, implying treat it was a truncated send so it gets
* retried
*/
- n = 0;
+ m = 0;
break;
}
/*
- * we were already handling a truncated send?
+ * we were sending this from buflist_out? Then not sending everything
+ * is a small matter of advancing ourselves only by the amount we did
+ * send in the buflist.
*/
- if (wsi->trunc_len) {
- lwsl_info("%p partial adv %d (vs %ld)\n", wsi, n, (long)real_len);
- wsi->trunc_offset += n;
- wsi->trunc_len -= n;
-
- if (!wsi->trunc_len) {
- lwsl_info("** %p partial send completed\n", wsi);
- /* done with it, but don't free it */
- n = (int)real_len;
+ if (lws_has_buffered_out(wsi)) {
+ if (m) {
+ lwsl_info("%p partial adv %d (vs %ld)\n", wsi, m,
+ (long)real_len);
+ lws_buflist_use_segment(&wsi->buflist_out, m);
+ }
+
+ if (!lws_has_buffered_out(wsi)) {
+ lwsl_info("%s: wsi %p: buflist_out flushed\n",
+ __func__, wsi);
+
+ m = (int)real_len;
if (lwsi_state(wsi) == LRS_FLUSHING_BEFORE_CLOSE) {
- lwsl_info("** %p signalling to close now\n", wsi);
+ lwsl_info("*%p signalling to close now\n", wsi);
return -1; /* retry closing now */
}
@@ -134,7 +157,8 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len)
"deferred transaction completed\n",
__func__);
wsi->http.deferred_transaction_completed = 0;
- return lws_http_transaction_completed(wsi);
+ return lws_http_transaction_completed(wsi) ?
+ -1 : (int)real_len;
}
#endif
#endif
@@ -142,43 +166,32 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len)
/* always callback on writeable */
lws_callback_on_writable(wsi);
- return n;
+ return m;
}
- if ((unsigned int)n == real_len)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (wsi->http.comp_ctx.may_have_more)
+ lws_callback_on_writable(wsi);
+#endif
+
+ if (m == real_len)
/* what we just sent went out cleanly */
- return n;
+ return m;
/*
- * Newly truncated send. Buffer the remainder (it will get
- * first priority next time the socket is writable).
+ * We were not able to send everything... and we were not sending from
+ * an existing buflist_out. So we are starting a fresh buflist_out, by
+ * buffering the unsent remainder on it.
+ * (it will get first priority next time the socket is writable).
*/
- lwsl_debug("%p new partial sent %d from %lu total\n", wsi, n,
+ lwsl_debug("%p new partial sent %d from %lu total\n", wsi, m,
(unsigned long)real_len);
- lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_WRITE_PARTIALS, 1);
- lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_B_PARTIALS_ACCEPTED_PARTS, n);
+ lws_buflist_append_segment(&wsi->buflist_out, buf + m, real_len - m);
- /*
- * - if we still have a suitable malloc lying around, use it
- * - or, if too small, reallocate it
- * - or, if no buffer, create it
- */
- if (!wsi->trunc_alloc || real_len - n > wsi->trunc_alloc_len) {
- lws_free(wsi->trunc_alloc);
-
- wsi->trunc_alloc_len = (unsigned int)(real_len - n);
- wsi->trunc_alloc = lws_malloc(real_len - n,
- "truncated send alloc");
- if (!wsi->trunc_alloc) {
- lwsl_err("truncated send: unable to malloc %lu\n",
- (unsigned long)(real_len - n));
- return -1;
- }
- }
- wsi->trunc_offset = 0;
- wsi->trunc_len = (unsigned int)(real_len - n);
- memcpy(wsi->trunc_alloc, buf + n, real_len - n);
+ lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_WRITE_PARTIALS, 1);
+ lws_stats_atomic_bump(wsi->context, pt,
+ LWSSTATS_B_PARTIALS_ACCEPTED_PARTS, m);
#if !defined(LWS_WITH_ESP32)
if (lws_wsi_is_udp(wsi)) {
@@ -199,23 +212,6 @@ LWS_VISIBLE int lws_write(struct lws *wsi, unsigned char *buf, size_t len,
{
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
- if (wsi->parent_carries_io) {
- struct lws_write_passthru pas;
-
- pas.buf = buf;
- pas.len = len;
- pas.wp = wp;
- pas.wsi = wsi;
-
- if (wsi->parent->protocol->callback(wsi->parent,
- LWS_CALLBACK_CHILD_WRITE_VIA_PARENT,
- wsi->parent->user_space,
- (void *)&pas, 0))
- return 1;
-
- return (int)len;
- }
-
lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_API_LWS_WRITE, 1);
if ((int)len < 0) {
@@ -258,6 +254,10 @@ lws_ssl_capable_read_no_ssl(struct lws *wsi, unsigned char *buf, int len)
n = recv(wsi->desc.sockfd, (char *)buf, len, 0);
if (n >= 0) {
+
+ if (!n && wsi->unix_skt)
+ return LWS_SSL_CAPABLE_ERROR;
+
if (wsi->vhost)
wsi->vhost->conn_stats.rx += n;
lws_stats_atomic_bump(context, pt, LWSSTATS_B_READ, n);
@@ -270,7 +270,7 @@ lws_ssl_capable_read_no_ssl(struct lws *wsi, unsigned char *buf, int len)
LWS_ERRNO == LWS_EINTR)
return LWS_SSL_CAPABLE_MORE_SERVICE;
- lwsl_notice("error on reading from skt : %d\n", LWS_ERRNO);
+ lwsl_info("error on reading from skt : %d\n", LWS_ERRNO);
return LWS_SSL_CAPABLE_ERROR;
}
@@ -281,10 +281,13 @@ lws_ssl_capable_write_no_ssl(struct lws *wsi, unsigned char *buf, int len)
if (lws_wsi_is_udp(wsi)) {
#if !defined(LWS_WITH_ESP32)
- if (wsi->trunc_len)
- n = sendto(wsi->desc.sockfd, buf, len, 0, &wsi->udp->sa_pending, wsi->udp->salen_pending);
+ if (lws_has_buffered_out(wsi))
+ n = sendto(wsi->desc.sockfd, (const char *)buf,
+ len, 0, &wsi->udp->sa_pending,
+ wsi->udp->salen_pending);
else
- n = sendto(wsi->desc.sockfd, buf, len, 0, &wsi->udp->sa, wsi->udp->salen);
+ n = sendto(wsi->desc.sockfd, (const char *)buf,
+ len, 0, &wsi->udp->sa, wsi->udp->salen);
#endif
} else
n = send(wsi->desc.sockfd, (char *)buf, len, MSG_NOSIGNAL);
@@ -303,7 +306,7 @@ lws_ssl_capable_write_no_ssl(struct lws *wsi, unsigned char *buf, int len)
}
lwsl_debug("ERROR writing len %d to skt fd %d err %d / errno %d\n",
- len, wsi->desc.sockfd, n, LWS_ERRNO);
+ len, wsi->desc.sockfd, n, LWS_ERRNO);
return LWS_SSL_CAPABLE_ERROR;
}
diff --git a/thirdparty/libwebsockets/core/pollfd.c b/thirdparty/libwebsockets/lib/core/pollfd.c
index 2a632ce8ec..834298577a 100644
--- a/thirdparty/libwebsockets/core/pollfd.c
+++ b/thirdparty/libwebsockets/lib/core/pollfd.c
@@ -134,7 +134,8 @@ _lws_change_pollfd(struct lws *wsi, int _and, int _or, struct lws_pollargs *pa)
pfd = &pt->fds[wsi->position_in_fds_table];
pa->fd = wsi->desc.sockfd;
- lwsl_debug("%s: wsi %p: fd %d events %d -> %d\n", __func__, wsi, pa->fd, pfd->events, (pfd->events & ~_and) | _or);
+ lwsl_debug("%s: wsi %p: fd %d events %d -> %d\n", __func__, wsi,
+ pa->fd, pfd->events, (pfd->events & ~_and) | _or);
pa->prev_events = pfd->events;
pa->events = pfd->events = (pfd->events & ~_and) | _or;
@@ -182,7 +183,7 @@ _lws_change_pollfd(struct lws *wsi, int _and, int _or, struct lws_pollargs *pa)
ret = -1;
goto bail;
}
- sampled_tid = context->service_tid;
+ sampled_tid = pt->service_tid;
if (sampled_tid && wsi->vhost) {
tid = wsi->vhost->protocols[0].callback(wsi,
LWS_CALLBACK_GET_THREAD_ID, NULL, NULL, 0);
@@ -245,7 +246,8 @@ __insert_wsi_socket_into_fds(struct lws_context *context, struct lws *wsi)
#if !defined(_WIN32)
if (wsi->desc.sockfd - lws_plat_socket_offset() >= context->max_fds) {
lwsl_err("Socket fd %d is too high (%d) offset %d\n",
- wsi->desc.sockfd, context->max_fds, lws_plat_socket_offset());
+ wsi->desc.sockfd, context->max_fds,
+ lws_plat_socket_offset());
return 1;
}
#endif
@@ -298,11 +300,6 @@ __remove_wsi_socket_from_fds(struct lws *wsi)
int v;
int m, ret = 0;
- if (wsi->parent_carries_io) {
- lws_same_vh_protocol_remove(wsi);
- return 0;
- }
-
#if !defined(_WIN32)
if (wsi->desc.sockfd - lws_plat_socket_offset() > context->max_fds) {
lwsl_err("fd %d too high (%d)\n", wsi->desc.sockfd,
@@ -330,7 +327,7 @@ __remove_wsi_socket_from_fds(struct lws *wsi)
LWS_EV_STOP | LWS_EV_READ | LWS_EV_WRITE |
LWS_EV_PREPARE_DELETION);
- lwsl_debug("%s: wsi=%p, sock=%d, fds pos=%d, end guy pos=%d, endfd=%d\n",
+ lwsl_debug("%s: wsi=%p, skt=%d, fds pos=%d, end guy pos=%d, endfd=%d\n",
__func__, wsi, wsi->desc.sockfd, wsi->position_in_fds_table,
pt->fds_count, pt->fds[pt->fds_count].fd);
@@ -340,11 +337,13 @@ __remove_wsi_socket_from_fds(struct lws *wsi)
pt->fds[m] = pt->fds[pt->fds_count - 1];
/* this decrements pt->fds_count */
lws_plat_delete_socket_from_fds(context, wsi, m);
+ pt->count_conns--;
v = (int) pt->fds[m].fd;
- /* end guy's "position in fds table" is now the deletion guy's old one */
+ /* end guy's "position in fds table" is now the deletion
+ * guy's old one */
end_wsi = wsi_from_fd(context, v);
if (!end_wsi) {
- lwsl_err("no wsi for fd %d at pos %d, pt->fds_count=%d\n",
+ lwsl_err("no wsi for fd %d pos %d, pt->fds_count=%d\n",
(int)pt->fds[m].fd, m, pt->fds_count);
assert(0);
} else
@@ -426,7 +425,6 @@ LWS_VISIBLE int
lws_callback_on_writable(struct lws *wsi)
{
struct lws_context_per_thread *pt;
- int n;
if (lwsi_state(wsi) == LRS_SHUTDOWN)
return 0;
@@ -436,26 +434,10 @@ lws_callback_on_writable(struct lws *wsi)
pt = &wsi->context->pt[(int)wsi->tsi];
- if (wsi->parent_carries_io) {
-#if defined(LWS_WITH_STATS)
- if (!wsi->active_writable_req_us) {
- wsi->active_writable_req_us = time_in_microseconds();
- lws_stats_atomic_bump(wsi->context, pt,
- LWSSTATS_C_WRITEABLE_CB_EFF_REQ, 1);
- }
-#endif
- n = lws_callback_on_writable(wsi->parent);
- if (n < 0)
- return n;
-
- wsi->parent_pending_cb_on_writable = 1;
- return 1;
- }
-
lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_WRITEABLE_CB_REQ, 1);
#if defined(LWS_WITH_STATS)
if (!wsi->active_writable_req_us) {
- wsi->active_writable_req_us = time_in_microseconds();
+ wsi->active_writable_req_us = lws_time_in_microseconds();
lws_stats_atomic_bump(wsi->context, pt,
LWSSTATS_C_WRITEABLE_CB_EFF_REQ, 1);
}
@@ -493,64 +475,33 @@ lws_callback_on_writable(struct lws *wsi)
void
lws_same_vh_protocol_insert(struct lws *wsi, int n)
{
- if (wsi->same_vh_protocol_prev || wsi->same_vh_protocol_next) {
- lws_same_vh_protocol_remove(wsi);
- lwsl_notice("Attempted to attach wsi twice to same vh prot\n");
- }
-
lws_vhost_lock(wsi->vhost);
- wsi->same_vh_protocol_prev = &wsi->vhost->same_vh_protocol_list[n];
- /* old first guy is our next */
- wsi->same_vh_protocol_next = wsi->vhost->same_vh_protocol_list[n];
- /* we become the new first guy */
- wsi->vhost->same_vh_protocol_list[n] = wsi;
+ if (!lws_dll_is_null(&wsi->same_vh_protocol))
+ lws_dll_lws_remove(&wsi->same_vh_protocol);
- if (wsi->same_vh_protocol_next)
- /* old first guy points back to us now */
- wsi->same_vh_protocol_next->same_vh_protocol_prev =
- &wsi->same_vh_protocol_next;
-
- wsi->on_same_vh_list = 1;
+ lws_dll_lws_add_front(&wsi->same_vh_protocol,
+ &wsi->vhost->same_vh_protocol_heads[n]);
lws_vhost_unlock(wsi->vhost);
}
void
-lws_same_vh_protocol_remove(struct lws *wsi)
+__lws_same_vh_protocol_remove(struct lws *wsi)
{
- /*
- * detach ourselves from vh protocol list if we're on one
- * A -> B -> C
- * A -> C , or, B -> C, or A -> B
- *
- * OK to call on already-detached wsi
- */
- lwsl_info("%s: removing same prot wsi %p\n", __func__, wsi);
+ if (!lws_dll_is_null(&wsi->same_vh_protocol))
+ lws_dll_lws_remove(&wsi->same_vh_protocol);
+}
- if (!wsi->vhost || !wsi->on_same_vh_list)
+void
+lws_same_vh_protocol_remove(struct lws *wsi)
+{
+ if (!wsi->vhost)
return;
lws_vhost_lock(wsi->vhost);
- if (wsi->same_vh_protocol_prev) {
- assert (*(wsi->same_vh_protocol_prev) == wsi);
- lwsl_info("have prev %p, setting him to our next %p\n",
- wsi->same_vh_protocol_prev,
- wsi->same_vh_protocol_next);
-
- /* guy who pointed to us should point to our next */
- *(wsi->same_vh_protocol_prev) = wsi->same_vh_protocol_next;
- }
-
- /* our next should point back to our prev */
- if (wsi->same_vh_protocol_next)
- wsi->same_vh_protocol_next->same_vh_protocol_prev =
- wsi->same_vh_protocol_prev;
-
- wsi->same_vh_protocol_prev = NULL;
- wsi->same_vh_protocol_next = NULL;
- wsi->on_same_vh_list = 0;
+ __lws_same_vh_protocol_remove(wsi);
lws_vhost_unlock(wsi->vhost);
}
@@ -558,9 +509,10 @@ lws_same_vh_protocol_remove(struct lws *wsi)
LWS_VISIBLE int
lws_callback_on_writable_all_protocol_vhost(const struct lws_vhost *vhost,
- const struct lws_protocols *protocol)
+ const struct lws_protocols *protocol)
{
struct lws *wsi;
+ int n;
if (protocol < vhost->protocols ||
protocol >= (vhost->protocols + vhost->count_protocols)) {
@@ -571,18 +523,16 @@ lws_callback_on_writable_all_protocol_vhost(const struct lws_vhost *vhost,
return -1;
}
- wsi = vhost->same_vh_protocol_list[protocol - vhost->protocols];
- while (wsi) {
- assert(wsi->protocol == protocol);
- assert(*wsi->same_vh_protocol_prev == wsi);
- if (wsi->same_vh_protocol_next)
- assert(wsi->same_vh_protocol_next->
- same_vh_protocol_prev ==
- &wsi->same_vh_protocol_next);
+ n = (int)(protocol - vhost->protocols);
+ lws_start_foreach_dll_safe(struct lws_dll_lws *, d, d1,
+ vhost->same_vh_protocol_heads[n].next) {
+ wsi = lws_container_of(d, struct lws, same_vh_protocol);
+
+ assert(wsi->protocol == protocol);
lws_callback_on_writable(wsi);
- wsi = wsi->same_vh_protocol_next;
- }
+
+ } lws_end_foreach_dll_safe(d, d1);
return 0;
}
@@ -602,7 +552,7 @@ lws_callback_on_writable_all_protocol(const struct lws_context *context,
while (vhost) {
for (n = 0; n < vhost->count_protocols; n++)
if (protocol->callback ==
- vhost->protocols[n].callback &&
+ vhost->protocols[n].callback &&
!strcmp(protocol->name, vhost->protocols[n].name))
break;
if (n != vhost->count_protocols)
diff --git a/thirdparty/libwebsockets/core/private.h b/thirdparty/libwebsockets/lib/core/private.h
index 73748b0498..c1a0a661b1 100644
--- a/thirdparty/libwebsockets/core/private.h
+++ b/thirdparty/libwebsockets/lib/core/private.h
@@ -36,10 +36,6 @@
typedef float _Float128x;
#endif
-#ifdef LWS_HAVE_SYS_TYPES_H
- #include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -48,271 +44,17 @@
#include <limits.h>
#include <stdarg.h>
#include <inttypes.h>
-
-#if defined(LWS_WITH_ESP32)
- #define MSG_NOSIGNAL 0
- #define SOMAXCONN 3
-#endif
-
-#define STORE_IN_ROM
#include <assert.h>
-#if LWS_MAX_SMP > 1
- #include <pthread.h>
-#endif
-
-#ifdef LWS_HAVE_SYS_STAT_H
- #include <sys/stat.h>
-#endif
-
-#if defined(WIN32) || defined(_WIN32)
-
- #ifndef WIN32_LEAN_AND_MEAN
- #define WIN32_LEAN_AND_MEAN
- #endif
-
- #if (WINVER < 0x0501)
- #undef WINVER
- #undef _WIN32_WINNT
- #define WINVER 0x0501
- #define _WIN32_WINNT WINVER
- #endif
-
- #define LWS_NO_DAEMONIZE
- #define LWS_ERRNO WSAGetLastError()
- #define LWS_EAGAIN WSAEWOULDBLOCK
- #define LWS_EALREADY WSAEALREADY
- #define LWS_EINPROGRESS WSAEINPROGRESS
- #define LWS_EINTR WSAEINTR
- #define LWS_EISCONN WSAEISCONN
- #define LWS_EWOULDBLOCK WSAEWOULDBLOCK
- #define MSG_NOSIGNAL 0
- #define SHUT_RDWR SD_BOTH
- #define SOL_TCP IPPROTO_TCP
- #define SHUT_WR SD_SEND
-
- #define compatible_close(fd) closesocket(fd)
- #define lws_set_blocking_send(wsi) wsi->sock_send_blocking = 1
- #define LWS_SOCK_INVALID (INVALID_SOCKET)
-
- #include <winsock2.h>
- #include <ws2tcpip.h>
- #include <windows.h>
- #include <tchar.h>
- #ifdef LWS_HAVE_IN6ADDR_H
- #include <in6addr.h>
- #endif
- #include <mstcpip.h>
- #include <io.h>
-
- #if !defined(LWS_HAVE_ATOLL)
- #if defined(LWS_HAVE__ATOI64)
- #define atoll _atoi64
- #else
- #warning No atoll or _atoi64 available, using atoi
- #define atoll atoi
- #endif
- #endif
-
- #ifndef __func__
- #define __func__ __FUNCTION__
- #endif
-
- #ifdef LWS_HAVE__VSNPRINTF
- #define vsnprintf _vsnprintf
- #endif
- /* we don't have an implementation for this on windows... */
- int kill(int pid, int sig);
- int fork(void);
- #ifndef SIGINT
- #define SIGINT 2
- #endif
-
-#else /* not windows --> */
-
- #include <fcntl.h>
- #include <strings.h>
- #include <unistd.h>
+#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
-
- #ifndef __cplusplus
- #include <errno.h>
- #endif
- #include <netdb.h>
- #include <signal.h>
- #include <sys/socket.h>
-
- #if defined(LWS_BUILTIN_GETIFADDRS)
- #include "./misc/getifaddrs.h"
- #else
- #if !defined(LWS_WITH_ESP32)
- #if defined(__HAIKU__)
- #define _BSD_SOURCE
- #endif
- #include <ifaddrs.h>
- #endif
- #endif
- #if defined (__ANDROID__)
- #include <syslog.h>
- #include <sys/resource.h>
- #elif defined (__sun) || defined(__HAIKU__) || defined(__QNX__)
- #include <syslog.h>
- #else
- #if !defined(LWS_WITH_ESP32)
- #include <sys/syslog.h>
- #endif
- #endif
- #include <netdb.h>
- #if !defined(LWS_WITH_ESP32)
- #include <sys/mman.h>
- #include <sys/un.h>
- #include <netinet/in.h>
- #include <netinet/tcp.h>
- #include <arpa/inet.h>
- #include <poll.h>
- #endif
- #ifndef LWS_NO_FORK
- #ifdef LWS_HAVE_SYS_PRCTL_H
- #include <sys/prctl.h>
- #endif
- #endif
-
- #include <sys/time.h>
-
- #define LWS_ERRNO errno
- #define LWS_EAGAIN EAGAIN
- #define LWS_EALREADY EALREADY
- #define LWS_EINPROGRESS EINPROGRESS
- #define LWS_EINTR EINTR
- #define LWS_EISCONN EISCONN
- #define LWS_EWOULDBLOCK EWOULDBLOCK
-
- #define lws_set_blocking_send(wsi)
-
- #define LWS_SOCK_INVALID (-1)
-#endif /* not windows */
-
-#ifndef LWS_HAVE_BZERO
- #ifndef bzero
- #define bzero(b, len) (memset((b), '\0', (len)), (void) 0)
- #endif
#endif
-
-#ifndef LWS_HAVE_STRERROR
- #define strerror(x) ""
-#endif
-
-
-#define lws_socket_is_valid(x) (x != LWS_SOCK_INVALID)
-
-#include "libwebsockets.h"
-
-#include "tls/private.h"
-
-#if defined(WIN32) || defined(_WIN32)
- #include <gettimeofday.h>
-
- #ifndef BIG_ENDIAN
- #define BIG_ENDIAN 4321 /* to show byte order (taken from gcc) */
- #endif
- #ifndef LITTLE_ENDIAN
- #define LITTLE_ENDIAN 1234
- #endif
- #ifndef BYTE_ORDER
- #define BYTE_ORDER LITTLE_ENDIAN
- #endif
-
- #undef __P
- #ifndef __P
- #if __STDC__
- #define __P(protos) protos
- #else
- #define __P(protos) ()
- #endif
- #endif
-
-#else /* not windows */
- static LWS_INLINE int compatible_close(int fd) { return close(fd); }
-
+#ifdef LWS_HAVE_SYS_STAT_H
#include <sys/stat.h>
- #include <sys/time.h>
-
- #if defined(__APPLE__)
- #include <machine/endian.h>
- #elif defined(__FreeBSD__)
- #include <sys/endian.h>
- #elif defined(__linux__)
- #include <endian.h>
- #endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__QNX__)
- #include <gulliver.h>
- #if defined(__LITTLEENDIAN__)
- #define BYTE_ORDER __LITTLEENDIAN__
- #define LITTLE_ENDIAN __LITTLEENDIAN__
- #define BIG_ENDIAN 4321 /* to show byte order (taken from gcc); for suppres warning that BIG_ENDIAN is not defined. */
- #endif
- #if defined(__BIGENDIAN__)
- #define BYTE_ORDER __BIGENDIAN__
- #define LITTLE_ENDIAN 1234 /* to show byte order (taken from gcc); for suppres warning that LITTLE_ENDIAN is not defined. */
- #define BIG_ENDIAN __BIGENDIAN__
- #endif
-#endif
-
-#if defined(__sun) && defined(__GNUC__)
-
- #include <arpa/nameser_compat.h>
-
- #if !defined (BYTE_ORDER)
- #define BYTE_ORDER __BYTE_ORDER__
- #endif
-
- #if !defined(LITTLE_ENDIAN)
- #define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
- #endif
-
- #if !defined(BIG_ENDIAN)
- #define BIG_ENDIAN __ORDER_BIG_ENDIAN__
- #endif
-
-#endif /* sun + GNUC */
-
-#if !defined(BYTE_ORDER)
- #define BYTE_ORDER __BYTE_ORDER
-#endif
-#if !defined(LITTLE_ENDIAN)
- #define LITTLE_ENDIAN __LITTLE_ENDIAN
-#endif
-#if !defined(BIG_ENDIAN)
- #define BIG_ENDIAN __BIG_ENDIAN
-#endif
-
-
-/*
- * Mac OSX as well as iOS do not define the MSG_NOSIGNAL flag,
- * but happily have something equivalent in the SO_NOSIGPIPE flag.
- */
-#ifdef __APPLE__
-#define MSG_NOSIGNAL SO_NOSIGPIPE
-#endif
-
-/*
- * Solaris 11.X only supports POSIX 2001, MSG_NOSIGNAL appears in
- * POSIX 2008.
- */
-#ifdef __sun
- #define MSG_NOSIGNAL 0
#endif
-#ifdef _WIN32
- #ifndef FD_HASHTABLE_MODULUS
- #define FD_HASHTABLE_MODULUS 32
- #endif
+#if LWS_MAX_SMP > 1
+ #include <pthread.h>
#endif
#ifndef LWS_DEF_HEADER_LEN
@@ -351,6 +93,49 @@ extern "C" {
#define LWS_H2_RX_SCRATCH_SIZE 512
+#define lws_socket_is_valid(x) (x != LWS_SOCK_INVALID)
+
+#ifndef LWS_HAVE_STRERROR
+ #define strerror(x) ""
+#endif
+
+ /*
+ *
+ * ------ private platform defines ------
+ *
+ */
+
+#if defined(LWS_WITH_ESP32)
+ #include "plat/esp32/private.h"
+#else
+ #if defined(WIN32) || defined(_WIN32)
+ #include "plat/windows/private.h"
+ #else
+ #if defined(LWS_PLAT_OPTEE)
+ #include "plat/optee/private.h"
+ #else
+ #include "plat/unix/private.h"
+ #endif
+ #endif
+#endif
+
+#ifndef LWS_HAVE_BZERO
+ #ifndef bzero
+ #define bzero(b, len) (memset((b), '\0', (len)), (void) 0)
+ #endif
+#endif
+
+ /*
+ *
+ * ------ public api ------
+ *
+ */
+
+#include "libwebsockets.h"
+
+
+#include "tls/private.h"
+
#if defined(WIN32) || defined(_WIN32)
// Visual studio older than 2015 and WIN_CE has only _stricmp
#if (defined(_MSC_VER) && _MSC_VER < 1900) || defined(_WIN32_WCE)
@@ -361,6 +146,14 @@ extern "C" {
#define getdtablesize() 30000
#endif
+#ifndef LWS_ARRAY_SIZE
+#define LWS_ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* All lws_tls...() functions must return this type, converting the
* native backend result and doing the extra work to determine which one
@@ -371,11 +164,11 @@ extern "C" {
* Non-SSL mode also uses these types.
*/
enum lws_ssl_capable_status {
- LWS_SSL_CAPABLE_ERROR = -1, /* it failed */
- LWS_SSL_CAPABLE_DONE = 0, /* it succeeded */
- LWS_SSL_CAPABLE_MORE_SERVICE_READ = -2, /* retry WANT_READ */
- LWS_SSL_CAPABLE_MORE_SERVICE_WRITE = -3, /* retry WANT_WRITE */
- LWS_SSL_CAPABLE_MORE_SERVICE = -4, /* general retry */
+ LWS_SSL_CAPABLE_ERROR = -1, /* it failed */
+ LWS_SSL_CAPABLE_DONE = 0, /* it succeeded */
+ LWS_SSL_CAPABLE_MORE_SERVICE_READ = -2, /* retry WANT_READ */
+ LWS_SSL_CAPABLE_MORE_SERVICE_WRITE = -3, /* retry WANT_WRITE */
+ LWS_SSL_CAPABLE_MORE_SERVICE = -4, /* general retry */
};
#if defined(__clang__)
@@ -517,14 +310,6 @@ struct lws_signal_watcher {
struct lws_context *context;
};
-#ifdef _WIN32
-#define LWS_FD_HASH(fd) ((fd ^ (fd >> 8) ^ (fd >> 16)) % FD_HASHTABLE_MODULUS)
-struct lws_fd_hashtable {
- struct lws **wsi;
- int length;
-};
-#endif
-
struct lws_foreign_thread_pollfd {
struct lws_foreign_thread_pollfd *next;
int fd_index;
@@ -532,6 +317,28 @@ struct lws_foreign_thread_pollfd {
int _or;
};
+#if LWS_MAX_SMP > 1
+
+struct lws_mutex_refcount {
+ pthread_mutex_t lock;
+ pthread_t lock_owner;
+ const char *last_lock_reason;
+ char lock_depth;
+ char metadata;
+};
+
+void
+lws_mutex_refcount_init(struct lws_mutex_refcount *mr);
+
+void
+lws_mutex_refcount_destroy(struct lws_mutex_refcount *mr);
+
+void
+lws_mutex_refcount_lock(struct lws_mutex_refcount *mr, const char *reason);
+
+void
+lws_mutex_refcount_unlock(struct lws_mutex_refcount *mr);
+#endif
#define LWS_HRTIMER_NOWAIT (0x7fffffffffffffffll)
@@ -542,10 +349,9 @@ struct lws_foreign_thread_pollfd {
struct lws_context_per_thread {
#if LWS_MAX_SMP > 1
- pthread_mutex_t lock;
pthread_mutex_t lock_stats;
- pthread_t lock_owner;
- const char *last_lock_reason;
+ struct lws_mutex_refcount mr;
+ pthread_t self;
#endif
struct lws_context *context;
@@ -568,7 +374,7 @@ struct lws_context_per_thread {
struct lws_pollfd *fds;
volatile struct lws_foreign_thread_pollfd * volatile foreign_pfd_list;
#ifdef _WIN32
- WSAEVENT *events;
+ WSAEVENT events;
#endif
lws_sockfd_type dummy_pipe_fds[2];
struct lws *pipe_wsi;
@@ -581,6 +387,9 @@ struct lws_context_per_thread {
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
struct lws_pt_role_http http;
#endif
+#if defined(LWS_ROLE_DBUS)
+ struct lws_pt_role_dbus dbus;
+#endif
/* --- event library based members --- */
@@ -594,7 +403,8 @@ struct lws_context_per_thread {
struct lws_pt_eventlibs_libevent event;
#endif
-#if defined(LWS_WITH_LIBEV) || defined(LWS_WITH_LIBUV) || defined(LWS_WITH_LIBEVENT)
+#if defined(LWS_WITH_LIBEV) || defined(LWS_WITH_LIBUV) || \
+ defined(LWS_WITH_LIBEVENT)
struct lws_signal_watcher w_sigint;
#endif
@@ -603,12 +413,20 @@ struct lws_context_per_thread {
unsigned long count_conns;
unsigned int fds_count;
+ /*
+ * set to the Thread ID that's doing the service loop just before entry
+ * to poll indicates service thread likely idling in poll()
+ * volatile because other threads may check it as part of processing
+ * for pollfd event change.
+ */
+ volatile int service_tid;
+ int service_tid_detected;
+
volatile unsigned char inside_poll;
volatile unsigned char foreign_spinlock;
unsigned char tid;
- unsigned char lock_depth;
unsigned char inside_service:1;
unsigned char event_loop_foreign:1;
unsigned char event_loop_destroy_processing_done:1;
@@ -626,8 +444,10 @@ lws_sum_stats(const struct lws_context *ctx, struct lws_conn_stats *cs);
struct lws_timed_vh_protocol {
struct lws_timed_vh_protocol *next;
const struct lws_protocols *protocol;
+ struct lws_vhost *vhost; /* only used for pending processing */
time_t time;
int reason;
+ int tsi_req;
};
/*
@@ -655,6 +475,7 @@ struct lws_vhost {
#endif
#if LWS_MAX_SMP > 1
pthread_mutex_t lock;
+ char close_flow_vs_tsi[LWS_MAX_SMP];
#endif
#if defined(LWS_ROLE_H2)
@@ -683,6 +504,9 @@ struct lws_vhost {
const char *name;
const char *iface;
+ void (*finalize)(struct lws_vhost *vh, void *arg);
+ void *finalize_arg;
+
#if !defined(LWS_WITH_ESP32) && !defined(OPTEE_TA) && !defined(WIN32)
int bind_iface;
#endif
@@ -690,7 +514,7 @@ struct lws_vhost {
void **protocol_vh_privs;
const struct lws_protocol_vhost_options *pvo;
const struct lws_protocol_vhost_options *headers;
- struct lws **same_vh_protocol_list;
+ struct lws_dll_lws *same_vh_protocol_heads;
struct lws_vhost *no_listener_vhost_list;
#if !defined(LWS_NO_CLIENT)
struct lws_dll_lws dll_active_client_conns;
@@ -716,6 +540,8 @@ struct lws_vhost {
int keepalive_timeout;
int timeout_secs_ah_idle;
+ int count_bound_wsi;
+
#ifdef LWS_WITH_ACCESS_LOG
int log_fd;
#endif
@@ -727,6 +553,13 @@ struct lws_vhost {
unsigned char raw_protocol_index;
};
+void
+lws_vhost_bind_wsi(struct lws_vhost *vh, struct lws *wsi);
+void
+lws_vhost_unbind_wsi(struct lws *wsi);
+void
+__lws_vhost_destroy2(struct lws_vhost *vh);
+
struct lws_deferred_free
{
struct lws_deferred_free *next;
@@ -791,8 +624,7 @@ struct lws_context {
struct lws_context_per_thread pt[LWS_MAX_SMP];
struct lws_conn_stats conn_stats;
#if LWS_MAX_SMP > 1
- pthread_mutex_t lock;
- int lock_depth;
+ struct lws_mutex_refcount mr;
#endif
#ifdef _WIN32
/* different implementation between unix and windows */
@@ -805,6 +637,11 @@ struct lws_context {
struct lws_vhost *vhost_pending_destruction_list;
struct lws_plugin *plugin_list;
struct lws_deferred_free *deferred_free_list;
+
+#if defined(LWS_WITH_THREADPOOL)
+ struct lws_threadpool *tp_list_head;
+#endif
+
#if defined(LWS_WITH_PEER_LIMITS)
struct lws_peer **pl_hash_table;
struct lws_peer *peer_wait_list;
@@ -889,14 +726,6 @@ struct lws_context {
unsigned int doing_protocol_init:1;
unsigned int done_protocol_destroy_cb:1;
unsigned int finalize_destroy_after_internal_loops_stopped:1;
- /*
- * set to the Thread ID that's doing the service loop just before entry
- * to poll indicates service thread likely idling in poll()
- * volatile because other threads may check it as part of processing
- * for pollfd event change.
- */
- volatile int service_tid;
- int service_tid_detected;
short count_threads;
short plugin_protocol_count;
@@ -909,7 +738,7 @@ struct lws_context {
};
int
-lws_check_deferred_free(struct lws_context *context, int force);
+lws_check_deferred_free(struct lws_context *context, int tsi, int force);
#define lws_get_context_protocol(ctx, x) ctx->vhost_list->protocols[x]
#define lws_get_vh_protocol(vh, x) vh->protocols[x]
@@ -945,13 +774,13 @@ enum {
LWS_EV_START = (1 << 2),
LWS_EV_STOP = (1 << 3),
- LWS_EV_PREPARE_DELETION = (1 << 31),
+ LWS_EV_PREPARE_DELETION = (1u << 31),
};
#if defined(LWS_WITH_ESP32)
LWS_EXTERN int
-lws_find_string_in_file(const char *filename, const char *string, int stringlen);
+lws_find_string_in_file(const char *filename, const char *str, int stringlen);
#endif
#ifdef LWS_WITH_IPV6
@@ -1026,6 +855,9 @@ struct lws {
#if defined(LWS_ROLE_WS)
struct _lws_websocket_related *ws; /* allocated if we upgrade to ws */
#endif
+#if defined(LWS_ROLE_DBUS)
+ struct _lws_dbus_mode_related dbus;
+#endif
const struct lws_role_ops *role_ops;
lws_wsi_state_t wsistate;
@@ -1033,7 +865,8 @@ struct lws {
/* lifetime members */
-#if defined(LWS_WITH_LIBEV) || defined(LWS_WITH_LIBUV) || defined(LWS_WITH_LIBEVENT)
+#if defined(LWS_WITH_LIBEV) || defined(LWS_WITH_LIBUV) || \
+ defined(LWS_WITH_LIBEVENT)
struct lws_io_watcher w_read;
#endif
#if defined(LWS_WITH_LIBEV) || defined(LWS_WITH_LIBEVENT)
@@ -1049,12 +882,16 @@ struct lws {
struct lws *sibling_list; /* subsequent children at same level */
const struct lws_protocols *protocol;
- struct lws **same_vh_protocol_prev, *same_vh_protocol_next;
+ struct lws_dll_lws same_vh_protocol;
struct lws_dll_lws dll_timeout;
struct lws_dll_lws dll_hrtimer;
struct lws_dll_lws dll_buflist; /* guys with pending rxflow */
+#if defined(LWS_WITH_THREADPOOL)
+ struct lws_threadpool_task *tp_task;
+#endif
+
#if defined(LWS_WITH_PEER_LIMITS)
struct lws_peer *peer;
#endif
@@ -1070,10 +907,8 @@ struct lws {
void *user_space;
void *opaque_parent_data;
- struct lws_buflist *buflist;
-
- /* truncated send handling */
- unsigned char *trunc_alloc; /* non-NULL means buffering in progress */
+ struct lws_buflist *buflist; /* input-side buflist */
+ struct lws_buflist *buflist_out; /* output-side buflist */
#if defined(LWS_WITH_TLS)
struct lws_lws_tls tls;
@@ -1098,9 +933,7 @@ struct lws {
/* ints */
#define LWS_NO_FDS_POS (-1)
int position_in_fds_table;
- unsigned int trunc_alloc_len; /* size of malloc */
- unsigned int trunc_offset; /* where we are in terms of spilling */
- unsigned int trunc_len; /* how much is buffered */
+
#ifndef LWS_NO_CLIENT
int chunk_remaining;
#endif
@@ -1128,18 +961,18 @@ struct lws {
unsigned int waiting_to_send_close_frame:1;
unsigned int close_needs_ack:1;
unsigned int ipv6:1;
- unsigned int parent_carries_io:1;
unsigned int parent_pending_cb_on_writable:1;
unsigned int cgi_stdout_zero_length:1;
unsigned int seen_zero_length_recv:1;
unsigned int rxflow_will_be_applied:1;
unsigned int event_pipe:1;
- unsigned int on_same_vh_list:1;
unsigned int handling_404:1;
unsigned int protocol_bind_balance:1;
+ unsigned int unix_skt:1;
unsigned int could_have_pending:1; /* detect back-to-back writes */
unsigned int outer_will_close:1;
+ unsigned int shadow:1; /* we do not control fd lifecycle at all */
#ifdef LWS_WITH_ACCESS_LOG
unsigned int access_log_pending:1;
@@ -1194,6 +1027,9 @@ struct lws {
volatile char leave_pollout_active;
};
+LWS_EXTERN char *
+lws_strdup(const char *s);
+
#define lws_is_flowcontrolled(w) (!!(wsi->rxflow_bitmap))
void
@@ -1243,6 +1079,9 @@ lws_latency(struct lws_context *context, struct lws *wsi, const char *action,
int ret, int completion);
#endif
+static LWS_INLINE int
+lws_has_buffered_out(struct lws *wsi) { return !!wsi->buflist_out; }
+
LWS_EXTERN int LWS_WARN_UNUSED_RESULT
lws_ws_client_rx_sm(struct lws *wsi, unsigned char c);
@@ -1262,22 +1101,7 @@ LWS_EXTERN int
lws_service_flag_pending(struct lws_context *context, int tsi);
LWS_EXTERN int
-lws_timed_callback_remove(struct lws_vhost *vh, struct lws_timed_vh_protocol *p);
-
-#if defined(_WIN32)
-LWS_EXTERN struct lws *
-wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd);
-
-LWS_EXTERN int
-insert_wsi(struct lws_context *context, struct lws *wsi);
-
-LWS_EXTERN int
-delete_from_fd(struct lws_context *context, lws_sockfd_type fd);
-#else
-#define wsi_from_fd(A,B) A->lws_lookup[B - lws_plat_socket_offset()]
-#define insert_wsi(A,B) assert(A->lws_lookup[B->desc.sockfd - lws_plat_socket_offset()] == 0); A->lws_lookup[B->desc.sockfd - lws_plat_socket_offset()]=B
-#define delete_from_fd(A,B) A->lws_lookup[B - lws_plat_socket_offset()]=0
-#endif
+__lws_timed_callback_remove(struct lws_vhost *vh, struct lws_timed_vh_protocol *p);
LWS_EXTERN int LWS_WARN_UNUSED_RESULT
__insert_wsi_socket_into_fds(struct lws_context *context, struct lws *wsi);
@@ -1305,7 +1129,7 @@ LWS_EXTERN int
lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd);
LWS_EXTERN struct lws *
-lws_client_connect_via_info2(struct lws *wsi);
+lws_http_client_connect_via_info2(struct lws *wsi);
@@ -1343,10 +1167,8 @@ user_callback_handle_rxflow(lws_callback_function, struct lws *wsi,
void *in, size_t len);
LWS_EXTERN int
-lws_plat_socket_offset(void);
-
-LWS_EXTERN int
-lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd);
+lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd,
+ int unix_skt);
LWS_EXTERN int
lws_plat_check_connection_error(struct lws *wsi);
@@ -1429,7 +1251,7 @@ LWS_EXTERN void lwsl_emit_stderr(int level, const char *line);
static LWS_INLINE void
lws_pt_mutex_init(struct lws_context_per_thread *pt)
{
- pthread_mutex_init(&pt->lock, NULL);
+ lws_mutex_refcount_init(&pt->mr);
pthread_mutex_init(&pt->lock_stats, NULL);
}
@@ -1437,34 +1259,11 @@ static LWS_INLINE void
lws_pt_mutex_destroy(struct lws_context_per_thread *pt)
{
pthread_mutex_destroy(&pt->lock_stats);
- pthread_mutex_destroy(&pt->lock);
+ lws_mutex_refcount_destroy(&pt->mr);
}
-static LWS_INLINE void
-lws_pt_lock(struct lws_context_per_thread *pt, const char *reason)
-{
- if (pt->lock_owner == pthread_self()) {
- pt->lock_depth++;
- return;
- }
- pthread_mutex_lock(&pt->lock);
- pt->last_lock_reason = reason;
- pt->lock_owner = pthread_self();
- //lwsl_notice("tid %d: lock %s\n", pt->tid, reason);
-}
-
-static LWS_INLINE void
-lws_pt_unlock(struct lws_context_per_thread *pt)
-{
- if (pt->lock_depth) {
- pt->lock_depth--;
- return;
- }
- pt->last_lock_reason = "free";
- pt->lock_owner = 0;
- //lwsl_notice("tid %d: unlock %s\n", pt->tid, pt->last_lock_reason);
- pthread_mutex_unlock(&pt->lock);
-}
+#define lws_pt_lock(pt, reason) lws_mutex_refcount_lock(&pt->mr, reason)
+#define lws_pt_unlock(pt) lws_mutex_refcount_unlock(&pt->mr)
static LWS_INLINE void
lws_pt_stats_lock(struct lws_context_per_thread *pt)
@@ -1478,17 +1277,8 @@ lws_pt_stats_unlock(struct lws_context_per_thread *pt)
pthread_mutex_unlock(&pt->lock_stats);
}
-static LWS_INLINE void
-lws_context_lock(struct lws_context *context)
-{
- pthread_mutex_lock(&context->lock);
-}
-
-static LWS_INLINE void
-lws_context_unlock(struct lws_context *context)
-{
- pthread_mutex_unlock(&context->lock);
-}
+#define lws_context_lock(c, reason) lws_mutex_refcount_lock(&c->mr, reason)
+#define lws_context_unlock(c) lws_mutex_refcount_unlock(&c->mr)
static LWS_INLINE void
lws_vhost_lock(struct lws_vhost *vhost)
@@ -1508,7 +1298,7 @@ lws_vhost_unlock(struct lws_vhost *vhost)
#define lws_pt_mutex_destroy(_a) (void)(_a)
#define lws_pt_lock(_a, b) (void)(_a)
#define lws_pt_unlock(_a) (void)(_a)
-#define lws_context_lock(_a) (void)(_a)
+#define lws_context_lock(_a, _b) (void)(_a)
#define lws_context_unlock(_a) (void)(_a)
#define lws_vhost_lock(_a) (void)(_a)
#define lws_vhost_unlock(_a) (void)(_a)
@@ -1566,7 +1356,7 @@ lws_handshake_server(struct lws *wsi, unsigned char **buf, size_t len);
LWS_EXTERN int
lws_access_log(struct lws *wsi);
LWS_EXTERN void
-lws_prepare_access_log_info(struct lws *wsi, char *uri_ptr, int meth);
+lws_prepare_access_log_info(struct lws *wsi, char *uri_ptr, int len, int meth);
#else
#define lws_access_log(_a)
#endif
@@ -1581,7 +1371,8 @@ int
lws_protocol_init(struct lws_context *context);
int
-lws_bind_protocol(struct lws *wsi, const struct lws_protocols *p);
+lws_bind_protocol(struct lws *wsi, const struct lws_protocols *p,
+ const char *reason);
const struct lws_http_mount *
lws_find_mount(struct lws *wsi, const char *uri_ptr, int uri_len);
@@ -1605,9 +1396,6 @@ void lws_free(void *p);
#define lws_free_set_NULL(P) do { lws_realloc(P, 0, "free"); (P) = NULL; } while(0)
#endif
-char *
-lws_strdup(const char *s);
-
int
lws_plat_pipe_create(struct lws *wsi);
int
@@ -1617,8 +1405,8 @@ lws_plat_pipe_close(struct lws *wsi);
int
lws_create_event_pipes(struct lws_context *context);
-int lws_open(const char *__file, int __oflag, ...);
-void lws_plat_apply_FD_CLOEXEC(int n);
+int
+lws_plat_apply_FD_CLOEXEC(int n);
const struct lws_plat_file_ops *
lws_vfs_select_fops(const struct lws_plat_file_ops *fops, const char *vfs_path,
@@ -1653,27 +1441,33 @@ LWS_EXTERN int
lws_plat_service(struct lws_context *context, int timeout_ms);
LWS_EXTERN LWS_VISIBLE int
_lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi);
+
+LWS_EXTERN int
+lws_pthread_self_to_tsi(struct lws_context *context);
+
LWS_EXTERN int
lws_plat_init(struct lws_context *context,
const struct lws_context_creation_info *info);
LWS_EXTERN void
lws_plat_drop_app_privileges(const struct lws_context_creation_info *info);
-LWS_EXTERN unsigned long long
-time_in_microseconds(void);
LWS_EXTERN const char * LWS_WARN_UNUSED_RESULT
lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt);
LWS_EXTERN int LWS_WARN_UNUSED_RESULT
lws_plat_inet_pton(int af, const char *src, void *dst);
+LWS_EXTERN int
+lws_check_byte_utf8(unsigned char state, unsigned char c);
LWS_EXTERN int LWS_WARN_UNUSED_RESULT
lws_check_utf8(unsigned char *state, unsigned char *buf, size_t len);
-LWS_EXTERN int alloc_file(struct lws_context *context, const char *filename, uint8_t **buf,
- lws_filepos_t *amount);
+LWS_EXTERN int alloc_file(struct lws_context *context, const char *filename,
+ uint8_t **buf, lws_filepos_t *amount);
LWS_EXTERN void
lws_same_vh_protocol_remove(struct lws *wsi);
LWS_EXTERN void
+__lws_same_vh_protocol_remove(struct lws *wsi);
+LWS_EXTERN void
lws_same_vh_protocol_insert(struct lws *wsi, int n);
LWS_EXTERN int
@@ -1703,7 +1497,8 @@ void socks_generate_msg(struct lws *wsi, enum socks_msg_type type,
void
lws_peer_track_wsi_close(struct lws_context *context, struct lws_peer *peer);
int
-lws_peer_confirm_ah_attach_ok(struct lws_context *context, struct lws_peer *peer);
+lws_peer_confirm_ah_attach_ok(struct lws_context *context,
+ struct lws_peer *peer);
void
lws_peer_track_ah_detach(struct lws_context *context, struct lws_peer *peer);
void
@@ -1717,11 +1512,13 @@ void
lws_peer_dump_from_wsi(struct lws *wsi);
#endif
-#ifdef LWS_WITH_HTTP_PROXY
+#ifdef LWS_WITH_HUBBUB
hubbub_error
html_parser_cb(const hubbub_token *token, void *pw);
#endif
+int
+lws_threadpool_tsi_context(struct lws_context *context, int tsi);
void
__lws_remove_from_timeout_list(struct lws *wsi);
@@ -1746,11 +1543,12 @@ lws_buflist_aware_consume(struct lws *wsi, struct lws_tokens *ebuf, int used,
char *
-lws_generate_client_ws_handshake(struct lws *wsi, char *p);
+lws_generate_client_ws_handshake(struct lws *wsi, char *p, const char *conn1);
int
lws_client_ws_upgrade(struct lws *wsi, const char **cce);
int
-lws_create_client_ws_object(struct lws_client_connect_info *i, struct lws *wsi);
+lws_create_client_ws_object(const struct lws_client_connect_info *i,
+ struct lws *wsi);
int
lws_alpn_comma_to_openssl(const char *comma, uint8_t *os, int len);
int
@@ -1764,6 +1562,11 @@ void
lws_destroy_event_pipe(struct lws *wsi);
void
lws_context_destroy2(struct lws_context *context);
+int
+lws_role_call_client_bind(struct lws *wsi,
+ const struct lws_client_connect_info *i);
+void
+lws_remove_child_from_any_parent(struct lws *wsi);
#ifdef __cplusplus
};
diff --git a/thirdparty/libwebsockets/core/service.c b/thirdparty/libwebsockets/lib/core/service.c
index 6523058814..ef251409cb 100644
--- a/thirdparty/libwebsockets/core/service.c
+++ b/thirdparty/libwebsockets/lib/core/service.c
@@ -30,7 +30,7 @@ lws_callback_as_writeable(struct lws *wsi)
lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_WRITEABLE_CB, 1);
#if defined(LWS_WITH_STATS)
if (wsi->active_writable_req_us) {
- uint64_t ul = time_in_microseconds() -
+ uint64_t ul = lws_time_in_microseconds() -
wsi->active_writable_req_us;
lws_stats_atomic_bump(wsi->context, pt,
@@ -74,12 +74,13 @@ lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd)
* Priority 1: pending truncated sends are incomplete ws fragments
* If anything else sent first the protocol would be
* corrupted.
+ *
+ * These are post- any compression transform
*/
- if (wsi->trunc_len) {
+ if (lws_has_buffered_out(wsi)) {
//lwsl_notice("%s: completing partial\n", __func__);
- if (lws_issue_raw(wsi, wsi->trunc_alloc + wsi->trunc_offset,
- wsi->trunc_len) < 0) {
+ if (lws_issue_raw(wsi, NULL, 0) < 0) {
lwsl_info("%s signalling to close\n", __func__);
goto bail_die;
}
@@ -91,6 +92,28 @@ lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd)
goto bail_die; /* retry closing now */
}
+ /* Priority 2: pre- compression transform */
+
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more) {
+ enum lws_write_protocol wp = LWS_WRITE_HTTP;
+
+ lwsl_info("%s: completing comp partial (buflist_comp %p, may %d)\n",
+ __func__, wsi->http.comp_ctx.buflist_comp,
+ wsi->http.comp_ctx.may_have_more
+ );
+
+ if (wsi->role_ops->write_role_protocol(wsi, NULL, 0, &wp) < 0) {
+ lwsl_info("%s signalling to close\n", __func__);
+ goto bail_die;
+ }
+ lws_callback_on_writable(wsi);
+
+ goto bail_ok;
+ }
+#endif
+
#ifdef LWS_WITH_CGI
/*
* A cgi master's wire protocol remains h1 or h2. He is just getting
@@ -126,13 +149,6 @@ lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd)
/* one shot */
- if (wsi->parent_carries_io) {
- vwsi->handling_pollout = 0;
- vwsi->leave_pollout_active = 0;
-
- return lws_callback_as_writeable(wsi);
- }
-
if (pollfd) {
int eff = vwsi->leave_pollout_active;
@@ -216,7 +232,9 @@ static int
__lws_service_timeout_check(struct lws *wsi, time_t sec)
{
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
+#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
int n = 0;
+#endif
(void)n;
@@ -228,9 +246,11 @@ __lws_service_timeout_check(struct lws *wsi, time_t sec)
lws_compare_time_t(wsi->context, sec, wsi->pending_timeout_set) >
wsi->pending_timeout_limit) {
+#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
if (wsi->desc.sockfd != LWS_SOCK_INVALID &&
wsi->position_in_fds_table >= 0)
n = pt->fds[wsi->position_in_fds_table].events;
+#endif
lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_TIMEOUTS, 1);
@@ -318,9 +338,10 @@ lws_service_adjust_timeout(struct lws_context *context, int timeout_ms, int tsi)
{
struct lws_context_per_thread *pt = &context->pt[tsi];
- /* Figure out if we really want to wait in poll()
- * We only need to wait if really nothing already to do and we have
- * to wait for something from network
+ /*
+ * Figure out if we really want to wait in poll()... we only need to
+ * wait if really nothing already to do and we have to wait for
+ * something from network
*/
#if defined(LWS_ROLE_WS) && !defined(LWS_WITHOUT_EXTENSIONS)
/* 1) if we know we are draining rx ext, do not wait in poll */
@@ -328,23 +349,31 @@ lws_service_adjust_timeout(struct lws_context *context, int timeout_ms, int tsi)
return 0;
#endif
- /* 2) if we know we have non-network pending data, do not wait in poll */
+ /* 2) if we know we have non-network pending data,
+ * do not wait in poll */
if (pt->context->tls_ops &&
- pt->context->tls_ops->fake_POLLIN_for_buffered)
- if (pt->context->tls_ops->fake_POLLIN_for_buffered(pt))
+ pt->context->tls_ops->fake_POLLIN_for_buffered &&
+ pt->context->tls_ops->fake_POLLIN_for_buffered(pt))
return 0;
- /* 3) If there is any wsi with rxflow buffered and in a state to process
+ /*
+ * 3) If there is any wsi with rxflow buffered and in a state to process
* it, we should not wait in poll
*/
- lws_start_foreach_dll(struct lws_dll_lws *, d, pt->dll_head_buflist.next) {
+ lws_start_foreach_dll(struct lws_dll_lws *, d,
+ pt->dll_head_buflist.next) {
struct lws *wsi = lws_container_of(d, struct lws, dll_buflist);
if (lwsi_state(wsi) != LRS_DEFERRING_ACTION)
return 0;
+ /*
+ * 4) If any guys with http compression to spill, we shouldn't wait in
+ * poll but hurry along and service them
+ */
+
} lws_end_foreach_dll(d);
return timeout_ms;
@@ -431,8 +460,10 @@ lws_buflist_aware_consume(struct lws *wsi, struct lws_tokens *ebuf, int used,
if (m < 0)
return 1; /* OOM */
if (m) {
- lwsl_debug("%s: added %p to rxflow list\n", __func__, wsi);
- lws_dll_lws_add_front(&wsi->dll_buflist, &pt->dll_head_buflist);
+ lwsl_debug("%s: added %p to rxflow list\n",
+ __func__, wsi);
+ lws_dll_lws_add_front(&wsi->dll_buflist,
+ &pt->dll_head_buflist);
}
}
@@ -487,10 +518,6 @@ int
lws_service_flag_pending(struct lws_context *context, int tsi)
{
struct lws_context_per_thread *pt = &context->pt[tsi];
-
-#if defined(LWS_WITH_TLS)
- struct lws *wsi, *wsi_next;
-#endif
int forced = 0;
lws_pt_lock(pt, __func__);
@@ -520,9 +547,11 @@ lws_service_flag_pending(struct lws_context *context, int tsi)
* service to use up the buffered incoming data, even though their
* network socket may have nothing
*/
- wsi = pt->tls.pending_read_list;
- while (wsi) {
- wsi_next = wsi->tls.pending_read_list_next;
+ lws_start_foreach_dll_safe(struct lws_dll_lws *, p, p1,
+ pt->tls.pending_tls_head.next) {
+ struct lws *wsi = lws_container_of(p, struct lws,
+ tls.pending_tls_list);
+
pt->fds[wsi->position_in_fds_table].revents |=
pt->fds[wsi->position_in_fds_table].events & LWS_POLLIN;
if (pt->fds[wsi->position_in_fds_table].revents & LWS_POLLIN) {
@@ -536,8 +565,7 @@ lws_service_flag_pending(struct lws_context *context, int tsi)
__lws_ssl_remove_wsi_from_buffered_list(wsi);
}
- wsi = wsi_next;
- }
+ } lws_end_foreach_dll_safe(p, p1);
#endif
lws_pt_unlock(pt);
@@ -550,18 +578,21 @@ lws_service_periodic_checks(struct lws_context *context,
struct lws_pollfd *pollfd, int tsi)
{
struct lws_context_per_thread *pt = &context->pt[tsi];
+ struct lws_timed_vh_protocol *tmr;
lws_sockfd_type our_fd = 0, tmp_fd;
struct lws *wsi;
int timed_out = 0;
time_t now;
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
struct allocated_headers *ah;
- int m;
+ int n, m;
#endif
if (!context->protocol_init_done)
- if (lws_protocol_init(context))
+ if (lws_protocol_init(context)) {
+ lwsl_err("%s: lws_protocol_init failed\n", __func__);
return -1;
+ }
time(&now);
@@ -609,7 +640,7 @@ lws_service_periodic_checks(struct lws_context *context,
#endif
lws_plat_service_periodic(context);
- lws_check_deferred_free(context, 0);
+ lws_check_deferred_free(context, tsi, 0);
#if defined(LWS_WITH_PEER_LIMITS)
lws_peer_cull_peer_wait_list(context);
@@ -631,7 +662,7 @@ lws_service_periodic_checks(struct lws_context *context,
our_fd = pollfd->fd;
/*
- * Phase 1: check every wsi on the timeout check list
+ * Phase 1: check every wsi on our pt's timeout check list
*/
lws_pt_lock(pt, __func__);
@@ -701,8 +732,7 @@ lws_service_periodic_checks(struct lws_context *context,
continue;
}
- if (lws_hdr_copy(wsi, buf,
- sizeof buf, m) > 0) {
+ if (lws_hdr_copy(wsi, buf, sizeof buf, m) > 0) {
buf[sizeof(buf) - 1] = '\0';
lwsl_notice(" %s = %s\n",
@@ -749,37 +779,126 @@ lws_service_periodic_checks(struct lws_context *context,
* Phase 3: vhost / protocol timer callbacks
*/
- wsi = NULL;
+ /* 3a: lock, collect, and remove vh timers that are pending */
+
+ lws_context_lock(context, "expired vh timers"); /* context ---------- */
+
+ n = 0;
+
+ /*
+ * first, under the context lock, get a count of the number of
+ * expired timers so we can allocate for them (or not, cleanly)
+ */
+
lws_start_foreach_ll(struct lws_vhost *, v, context->vhost_list) {
- struct lws_timed_vh_protocol *nx;
+
if (v->timed_vh_protocol_list) {
- lws_start_foreach_ll(struct lws_timed_vh_protocol *,
- q, v->timed_vh_protocol_list) {
- if (now >= q->time) {
- if (!wsi)
- wsi = lws_zalloc(sizeof(*wsi), "cbwsi");
- wsi->context = context;
- wsi->vhost = v;
- wsi->protocol = q->protocol;
- lwsl_debug("timed cb: vh %s, protocol %s, reason %d\n", v->name, q->protocol->name, q->reason);
- q->protocol->callback(wsi, q->reason, NULL, NULL, 0);
- nx = q->next;
- lws_timed_callback_remove(v, q);
- q = nx;
- continue; /* we pointed ourselves to the next from the now-deleted guy */
- }
- } lws_end_foreach_ll(q, next);
+
+ lws_start_foreach_ll_safe(struct lws_timed_vh_protocol *,
+ q, v->timed_vh_protocol_list, next) {
+ if (now >= q->time && q->tsi_req == tsi)
+ n++;
+ } lws_end_foreach_ll_safe(q);
}
+
} lws_end_foreach_ll(v, vhost_next);
- if (wsi)
+
+ /* if nothing to do, unlock and move on to the next vhost */
+
+ if (!n) {
+ lws_context_unlock(context); /* ----------- context */
+ goto vh_timers_done;
+ }
+
+ /*
+ * attempt to do the wsi and timer info allocation
+ * first en bloc. If it fails, we can just skip the rest and
+ * the timers will still be pending next time.
+ */
+
+ wsi = lws_zalloc(sizeof(*wsi), "cbwsi");
+ if (!wsi) {
+ /*
+ * at this point, we haven't cleared any vhost
+ * timers. We can fail out and retry cleanly
+ * next periodic check
+ */
+ lws_context_unlock(context); /* ----------- context */
+ goto vh_timers_done;
+ }
+ wsi->context = context;
+
+ tmr = lws_zalloc(sizeof(*tmr) * n, "cbtmr");
+ if (!tmr) {
+ /* again OOM here can be handled cleanly */
lws_free(wsi);
+ lws_context_unlock(context); /* ----------- context */
+ goto vh_timers_done;
+ }
+
+ /* so we have the allocation for n pending timers... */
+
+ m = 0;
+ lws_start_foreach_ll(struct lws_vhost *, v, context->vhost_list) {
+
+ if (v->timed_vh_protocol_list) {
+
+ lws_vhost_lock(v); /* vhost ------------------------- */
+
+ lws_start_foreach_ll_safe(struct lws_timed_vh_protocol *,
+ q, v->timed_vh_protocol_list, next) {
+
+ /* only do n */
+ if (m == n)
+ break;
+
+ if (now >= q->time && q->tsi_req == tsi) {
+
+ /*
+ * tmr is an allocated array.
+ * Ignore the linked-list.
+ */
+ tmr[m].vhost = v;
+ tmr[m].protocol = q->protocol;
+ tmr[m++].reason = q->reason;
+
+ /* take the timer out now we took
+ * responsibility */
+ __lws_timed_callback_remove(v, q);
+ }
+
+ } lws_end_foreach_ll_safe(q);
+
+ lws_vhost_unlock(v); /* ----------------------- vhost */
+ }
+
+ } lws_end_foreach_ll(v, vhost_next);
+ lws_context_unlock(context); /* ---------------------------- context */
+
+ /* 3b: call the vh timer callbacks outside any lock */
+
+ for (m = 0; m < n; m++) {
+
+ wsi->vhost = tmr[m].vhost; /* not a real bound wsi */
+ wsi->protocol = tmr[m].protocol;
+
+ lwsl_debug("%s: timed cb: vh %s, protocol %s, reason %d\n",
+ __func__, tmr[m].vhost->name, tmr[m].protocol->name,
+ tmr[m].reason);
+ tmr[m].protocol->callback(wsi, tmr[m].reason, NULL, NULL, 0);
+ }
+
+ lws_free(tmr);
+ lws_free(wsi);
+
+vh_timers_done:
/*
* Phase 4: check for unconfigured vhosts due to required
* interface missing before
*/
- lws_context_lock(context);
+ lws_context_lock(context, "periodic checks");
lws_start_foreach_llp(struct lws_vhost **, pv,
context->no_listener_vhost_list) {
struct lws_vhost *v = *pv;
@@ -812,7 +931,7 @@ lws_service_periodic_checks(struct lws_context *context,
context->tls_ops->periodic_housekeeping)
context->tls_ops->periodic_housekeeping(context, now);
- return timed_out;
+ return 0;
}
LWS_VISIBLE int
@@ -825,9 +944,11 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd,
if (!context || context->being_destroyed1)
return -1;
- /* the socket we came to service timed out, nothing to do */
- if (lws_service_periodic_checks(context, pollfd, tsi) || !pollfd)
- return 0;
+ /* the case there's no pollfd to service, we just want to do periodic */
+ if (!pollfd) {
+ lws_service_periodic_checks(context, pollfd, tsi);
+ return -2;
+ }
/* no, here to service a socket descriptor */
wsi = wsi_from_fd(context, pollfd->fd);
@@ -923,6 +1044,9 @@ handled:
#endif
pollfd->revents = 0;
+ /* check the timeout situation if we didn't in the last second */
+ lws_service_periodic_checks(context, pollfd, tsi);
+
lws_pt_lock(pt, __func__);
__lws_hrtimer_service(pt);
lws_pt_unlock(pt);
@@ -969,6 +1093,9 @@ lws_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
int n;
pt->inside_service = 1;
+#if LWS_MAX_SMP > 1
+ pt->self = pthread_self();
+#endif
if (context->event_loop_ops->run_pt) {
/* we are configured for an event loop */
diff --git a/thirdparty/libwebsockets/event-libs/poll/poll.c b/thirdparty/libwebsockets/lib/event-libs/poll/poll.c
index 09af5b15d8..09af5b15d8 100644
--- a/thirdparty/libwebsockets/event-libs/poll/poll.c
+++ b/thirdparty/libwebsockets/lib/event-libs/poll/poll.c
diff --git a/thirdparty/libwebsockets/event-libs/poll/private.h b/thirdparty/libwebsockets/lib/event-libs/poll/private.h
index ca313ebfb0..ca313ebfb0 100644
--- a/thirdparty/libwebsockets/event-libs/poll/private.h
+++ b/thirdparty/libwebsockets/lib/event-libs/poll/private.h
diff --git a/thirdparty/libwebsockets/event-libs/private.h b/thirdparty/libwebsockets/lib/event-libs/private.h
index c36d39c8c2..58bca946b5 100644
--- a/thirdparty/libwebsockets/event-libs/private.h
+++ b/thirdparty/libwebsockets/lib/event-libs/private.h
@@ -41,7 +41,7 @@ struct lws_event_loop_ops {
/* close handle manually */
void (*close_handle_manually)(struct lws *wsi);
/* event loop accept processing */
- void (*accept)(struct lws *wsi);
+ int (*accept)(struct lws *wsi);
/* control wsi active events */
void (*io)(struct lws *wsi, int flags);
/* run the event loop for a pt */
diff --git a/thirdparty/libwebsockets/lws_config_private.h b/thirdparty/libwebsockets/lib/lws_config_private.h
index e531777624..e531777624 100644
--- a/thirdparty/libwebsockets/lws_config_private.h
+++ b/thirdparty/libwebsockets/lib/lws_config_private.h
diff --git a/thirdparty/libwebsockets/misc/base64-decode.c b/thirdparty/libwebsockets/lib/misc/base64-decode.c
index 64b84d78fa..de2efc8fd1 100644
--- a/thirdparty/libwebsockets/misc/base64-decode.c
+++ b/thirdparty/libwebsockets/lib/misc/base64-decode.c
@@ -55,12 +55,11 @@ _lws_b64_encode_string(const char *encode, const char *in, int in_len,
{
unsigned char triple[3];
int i;
- int len;
int line = 0;
int done = 0;
while (in_len) {
- len = 0;
+ int len = 0;
for (i = 0; i < 3; i++) {
if (in_len) {
triple[i] = *in++;
diff --git a/thirdparty/libwebsockets/misc/getifaddrs.c b/thirdparty/libwebsockets/lib/misc/getifaddrs.c
index 735b899f48..735b899f48 100644
--- a/thirdparty/libwebsockets/misc/getifaddrs.c
+++ b/thirdparty/libwebsockets/lib/misc/getifaddrs.c
diff --git a/thirdparty/libwebsockets/misc/getifaddrs.h b/thirdparty/libwebsockets/lib/misc/getifaddrs.h
index d26670c082..d26670c082 100644
--- a/thirdparty/libwebsockets/misc/getifaddrs.h
+++ b/thirdparty/libwebsockets/lib/misc/getifaddrs.h
diff --git a/thirdparty/libwebsockets/misc/lejp.c b/thirdparty/libwebsockets/lib/misc/lejp.c
index 99142b9553..599a6d37ba 100644
--- a/thirdparty/libwebsockets/misc/lejp.c
+++ b/thirdparty/libwebsockets/lib/misc/lejp.c
@@ -126,7 +126,7 @@ lejp_check_path_match(struct lejp_ctx *ctx)
q++;
continue;
}
- ctx->wild[ctx->wildcount++] = p - ctx->path;
+ ctx->wild[ctx->wildcount++] = lws_ptr_diff(p, ctx->path);
q++;
/*
* if * has something after it, match to .
diff --git a/thirdparty/libwebsockets/misc/sha-1.c b/thirdparty/libwebsockets/lib/misc/sha-1.c
index 2e4db52693..898f3f45b1 100644
--- a/thirdparty/libwebsockets/misc/sha-1.c
+++ b/thirdparty/libwebsockets/lib/misc/sha-1.c
@@ -236,18 +236,14 @@ sha1_pad(struct sha1_ctxt *ctxt)
void
sha1_loop(struct sha1_ctxt *ctxt, const unsigned char *input, size_t len)
{
- size_t gaplen;
- size_t gapstart;
size_t off;
- size_t copysiz;
off = 0;
while (off < len) {
- gapstart = COUNT % 64;
- gaplen = 64 - gapstart;
+ size_t gapstart = COUNT % 64, gaplen = 64 - gapstart,
+ copysiz = (gaplen < len - off) ? gaplen : len - off;
- copysiz = (gaplen < len - off) ? gaplen : len - off;
memcpy(&ctxt->m.b8[gapstart], &input[off], copysiz);
COUNT += (unsigned char)copysiz;
COUNT %= 64;
diff --git a/thirdparty/libwebsockets/lib/plat/unix/private.h b/thirdparty/libwebsockets/lib/plat/unix/private.h
new file mode 100644
index 0000000000..8583ee7bc8
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/private.h
@@ -0,0 +1,169 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * Included from lib/core/private.h if no explicit platform
+ */
+
+#include <fcntl.h>
+#include <strings.h>
+#include <unistd.h>
+
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <poll.h>
+#include <netdb.h>
+
+#ifndef __cplusplus
+#include <errno.h>
+#endif
+#include <netdb.h>
+#include <signal.h>
+
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/un.h>
+
+#if defined(__APPLE__)
+#include <machine/endian.h>
+#endif
+#if defined(__FreeBSD__)
+#include <sys/endian.h>
+#endif
+#if defined(__linux__)
+#include <endian.h>
+#endif
+#if defined(__QNX__)
+ #include <gulliver.h>
+ #if defined(__LITTLEENDIAN__)
+ #define BYTE_ORDER __LITTLEENDIAN__
+ #define LITTLE_ENDIAN __LITTLEENDIAN__
+ #define BIG_ENDIAN 4321 /* to show byte order (taken from gcc); for suppres warning that BIG_ENDIAN is not defined. */
+ #endif
+ #if defined(__BIGENDIAN__)
+ #define BYTE_ORDER __BIGENDIAN__
+ #define LITTLE_ENDIAN 1234 /* to show byte order (taken from gcc); for suppres warning that LITTLE_ENDIAN is not defined. */
+ #define BIG_ENDIAN __BIGENDIAN__
+ #endif
+#endif
+
+#if defined(__sun) && defined(__GNUC__)
+
+#include <arpa/nameser_compat.h>
+
+#if !defined (BYTE_ORDER)
+#define BYTE_ORDER __BYTE_ORDER__
+#endif
+
+#if !defined(LITTLE_ENDIAN)
+#define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
+#endif
+
+#if !defined(BIG_ENDIAN)
+#define BIG_ENDIAN __ORDER_BIG_ENDIAN__
+#endif
+
+#endif /* sun + GNUC */
+
+#if !defined(BYTE_ORDER)
+#define BYTE_ORDER __BYTE_ORDER
+#endif
+#if !defined(LITTLE_ENDIAN)
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+#endif
+#if !defined(BIG_ENDIAN)
+#define BIG_ENDIAN __BIG_ENDIAN
+#endif
+
+#if defined(LWS_BUILTIN_GETIFADDRS)
+#include "./misc/getifaddrs.h"
+#else
+
+#if defined(__HAIKU__)
+#define _BSD_SOURCE
+#endif
+#include <ifaddrs.h>
+
+#endif
+
+#if defined (__sun) || defined(__HAIKU__) || defined(__QNX__)
+#include <syslog.h>
+#else
+#include <sys/syslog.h>
+#endif
+
+#ifdef __QNX__
+# include "netinet/tcp_var.h"
+# define TCP_KEEPINTVL TCPCTL_KEEPINTVL
+# define TCP_KEEPIDLE TCPCTL_KEEPIDLE
+# define TCP_KEEPCNT TCPCTL_KEEPCNT
+#endif
+
+#define LWS_ERRNO errno
+#define LWS_EAGAIN EAGAIN
+#define LWS_EALREADY EALREADY
+#define LWS_EINPROGRESS EINPROGRESS
+#define LWS_EINTR EINTR
+#define LWS_EISCONN EISCONN
+#define LWS_ENOTCONN ENOTCONN
+#define LWS_EWOULDBLOCK EWOULDBLOCK
+#define LWS_EADDRINUSE EADDRINUSE
+#define lws_set_blocking_send(wsi)
+#define LWS_SOCK_INVALID (-1)
+
+#define wsi_from_fd(A,B) A->lws_lookup[B - lws_plat_socket_offset()]
+#define insert_wsi(A,B) assert(A->lws_lookup[B->desc.sockfd - \
+ lws_plat_socket_offset()] == 0); \
+ A->lws_lookup[B->desc.sockfd - \
+ lws_plat_socket_offset()] = B
+#define delete_from_fd(A,B) A->lws_lookup[B - lws_plat_socket_offset()] = 0
+
+#ifndef LWS_NO_FORK
+#ifdef LWS_HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+#endif
+
+#if defined (__ANDROID__)
+ #include <syslog.h>
+ #include <sys/resource.h>
+#endif
+
+#define compatible_close(x) close(x)
+#define lws_plat_socket_offset() (0)
+
+/*
+ * Mac OSX as well as iOS do not define the MSG_NOSIGNAL flag,
+ * but happily have something equivalent in the SO_NOSIGPIPE flag.
+ */
+#ifdef __APPLE__
+#define MSG_NOSIGNAL SO_NOSIGPIPE
+#endif
+
+/*
+ * Solaris 11.X only supports POSIX 2001, MSG_NOSIGNAL appears in
+ * POSIX 2008.
+ */
+#ifdef __sun
+ #define MSG_NOSIGNAL 0
+#endif
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-caps.c b/thirdparty/libwebsockets/lib/plat/unix/unix-caps.c
new file mode 100644
index 0000000000..64aea61816
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-caps.c
@@ -0,0 +1,85 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+#include <pwd.h>
+#include <grp.h>
+
+#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
+static void
+_lws_plat_apply_caps(int mode, const cap_value_t *cv, int count)
+{
+ cap_t caps;
+
+ if (!count)
+ return;
+
+ caps = cap_get_proc();
+
+ cap_set_flag(caps, mode, count, cv, CAP_SET);
+ cap_set_proc(caps);
+ prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
+ cap_free(caps);
+}
+#endif
+
+void
+lws_plat_drop_app_privileges(const struct lws_context_creation_info *info)
+{
+ if (info->gid && info->gid != -1)
+ if (setgid(info->gid))
+ lwsl_warn("setgid: %s\n", strerror(LWS_ERRNO));
+
+ if (info->uid && info->uid != -1) {
+ struct passwd *p = getpwuid(info->uid);
+
+ if (p) {
+
+#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
+ _lws_plat_apply_caps(CAP_PERMITTED, info->caps,
+ info->count_caps);
+#endif
+
+ initgroups(p->pw_name, info->gid);
+ if (setuid(info->uid))
+ lwsl_warn("setuid: %s\n", strerror(LWS_ERRNO));
+ else
+ lwsl_notice("Set privs to user '%s'\n",
+ p->pw_name);
+
+#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
+ _lws_plat_apply_caps(CAP_EFFECTIVE, info->caps,
+ info->count_caps);
+
+ if (info->count_caps) {
+ int n;
+ for (n = 0; n < info->count_caps; n++)
+ lwsl_notice(" RETAINING CAP %d\n",
+ (int)info->caps[n]);
+ }
+#endif
+
+ } else
+ lwsl_warn("getpwuid: unable to find uid %d", info->uid);
+ }
+}
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-fds.c b/thirdparty/libwebsockets/lib/plat/unix/unix-fds.c
new file mode 100644
index 0000000000..8a00bcff3f
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-fds.c
@@ -0,0 +1,54 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+void
+lws_plat_insert_socket_into_fds(struct lws_context *context, struct lws *wsi)
+{
+ struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
+
+ if (context->event_loop_ops->io)
+ context->event_loop_ops->io(wsi, LWS_EV_START | LWS_EV_READ);
+
+ pt->fds[pt->fds_count++].revents = 0;
+}
+
+void
+lws_plat_delete_socket_from_fds(struct lws_context *context,
+ struct lws *wsi, int m)
+{
+ struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
+
+ if (context->event_loop_ops->io)
+ context->event_loop_ops->io(wsi,
+ LWS_EV_STOP | LWS_EV_READ | LWS_EV_WRITE);
+
+ pt->fds_count--;
+}
+
+int
+lws_plat_change_pollfd(struct lws_context *context,
+ struct lws *wsi, struct lws_pollfd *pfd)
+{
+ return 0;
+}
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-file.c b/thirdparty/libwebsockets/lib/plat/unix/unix-file.c
new file mode 100644
index 0000000000..bcdc213a89
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-file.c
@@ -0,0 +1,172 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+#include <pwd.h>
+#include <grp.h>
+
+#ifdef LWS_WITH_PLUGINS
+#include <dlfcn.h>
+#endif
+#include <dirent.h>
+
+int lws_plat_apply_FD_CLOEXEC(int n)
+{
+ if (n == -1)
+ return 0;
+
+ return fcntl(n, F_SETFD, FD_CLOEXEC);
+}
+
+int
+lws_plat_write_file(const char *filename, void *buf, int len)
+{
+ int m, fd;
+
+ fd = lws_open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+
+ if (fd == -1)
+ return 1;
+
+ m = write(fd, buf, len);
+ close(fd);
+
+ return m != len;
+}
+
+int
+lws_plat_read_file(const char *filename, void *buf, int len)
+{
+ int n, fd = lws_open(filename, O_RDONLY);
+ if (fd == -1)
+ return -1;
+
+ n = read(fd, buf, len);
+ close(fd);
+
+ return n;
+}
+
+lws_fop_fd_t
+_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+ const char *vpath, lws_fop_flags_t *flags)
+{
+ struct stat stat_buf;
+ int ret = lws_open(filename, (*flags) & LWS_FOP_FLAGS_MASK, 0664);
+ lws_fop_fd_t fop_fd;
+
+ if (ret < 0)
+ return NULL;
+
+ if (fstat(ret, &stat_buf) < 0)
+ goto bail;
+
+ fop_fd = malloc(sizeof(*fop_fd));
+ if (!fop_fd)
+ goto bail;
+
+ fop_fd->fops = fops;
+ fop_fd->flags = *flags;
+ fop_fd->fd = ret;
+ fop_fd->filesystem_priv = NULL; /* we don't use it */
+ fop_fd->len = stat_buf.st_size;
+ fop_fd->pos = 0;
+
+ return fop_fd;
+
+bail:
+ close(ret);
+ return NULL;
+}
+
+int
+_lws_plat_file_close(lws_fop_fd_t *fop_fd)
+{
+ int fd = (*fop_fd)->fd;
+
+ free(*fop_fd);
+ *fop_fd = NULL;
+
+ return close(fd);
+}
+
+lws_fileofs_t
+_lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
+{
+ lws_fileofs_t r;
+
+ if (offset > 0 &&
+ offset > (lws_fileofs_t)fop_fd->len - (lws_fileofs_t)fop_fd->pos)
+ offset = fop_fd->len - fop_fd->pos;
+
+ if ((lws_fileofs_t)fop_fd->pos + offset < 0)
+ offset = -fop_fd->pos;
+
+ r = lseek(fop_fd->fd, offset, SEEK_CUR);
+
+ if (r >= 0)
+ fop_fd->pos = r;
+ else
+ lwsl_err("error seeking from cur %ld, offset %ld\n",
+ (long)fop_fd->pos, (long)offset);
+
+ return r;
+}
+
+int
+_lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len)
+{
+ long n;
+
+ n = read((int)fop_fd->fd, buf, len);
+ if (n == -1) {
+ *amount = 0;
+ return -1;
+ }
+ fop_fd->pos += n;
+ lwsl_debug("%s: read %ld of req %ld, pos %ld, len %ld\n", __func__, n,
+ (long)len, (long)fop_fd->pos, (long)fop_fd->len);
+ *amount = n;
+
+ return 0;
+}
+
+int
+_lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len)
+{
+ long n;
+
+ n = write((int)fop_fd->fd, buf, len);
+ if (n == -1) {
+ *amount = 0;
+ return -1;
+ }
+
+ fop_fd->pos += n;
+ *amount = n;
+
+ return 0;
+}
+
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-init.c b/thirdparty/libwebsockets/lib/plat/unix/unix-init.c
new file mode 100644
index 0000000000..fa9a30e8d2
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-init.c
@@ -0,0 +1,97 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+#include <pwd.h>
+#include <grp.h>
+
+#ifdef LWS_WITH_PLUGINS
+#include <dlfcn.h>
+#endif
+#include <dirent.h>
+
+int
+lws_plat_init(struct lws_context *context,
+ const struct lws_context_creation_info *info)
+{
+ int fd;
+
+ /* master context has the global fd lookup array */
+ context->lws_lookup = lws_zalloc(sizeof(struct lws *) *
+ context->max_fds, "lws_lookup");
+ if (context->lws_lookup == NULL) {
+ lwsl_err("OOM on lws_lookup array for %d connections\n",
+ context->max_fds);
+ return 1;
+ }
+
+ lwsl_info(" mem: platform fd map: %5lu bytes\n",
+ (unsigned long)(sizeof(struct lws *) * context->max_fds));
+ fd = lws_open(SYSTEM_RANDOM_FILEPATH, O_RDONLY);
+
+ context->fd_random = fd;
+ if (context->fd_random < 0) {
+ lwsl_err("Unable to open random device %s %d\n",
+ SYSTEM_RANDOM_FILEPATH, context->fd_random);
+ return 1;
+ }
+
+#ifdef LWS_WITH_PLUGINS
+ if (info->plugin_dirs && (context->options & LWS_SERVER_OPTION_LIBUV))
+ lws_plat_plugins_init(context, info->plugin_dirs);
+#endif
+
+ return 0;
+}
+
+int
+lws_plat_context_early_init(void)
+{
+#if !defined(LWS_AVOID_SIGPIPE_IGN)
+ signal(SIGPIPE, SIG_IGN);
+#endif
+
+ return 0;
+}
+
+void
+lws_plat_context_early_destroy(struct lws_context *context)
+{
+}
+
+void
+lws_plat_context_late_destroy(struct lws_context *context)
+{
+#ifdef LWS_WITH_PLUGINS
+ if (context->plugin_list)
+ lws_plat_plugins_destroy(context);
+#endif
+
+ if (context->lws_lookup)
+ lws_free(context->lws_lookup);
+
+ if (!context->fd_random)
+ lwsl_err("ZERO RANDOM FD\n");
+ if (context->fd_random != LWS_INVALID_FILE)
+ close(context->fd_random);
+}
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-misc.c b/thirdparty/libwebsockets/lib/plat/unix/unix-misc.c
new file mode 100644
index 0000000000..d4b0f76658
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-misc.c
@@ -0,0 +1,83 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+
+uint64_t
+lws_time_in_microseconds(void)
+{
+ struct timeval tv;
+
+ gettimeofday(&tv, NULL);
+ return ((unsigned long long)tv.tv_sec * 1000000LL) + tv.tv_usec;
+}
+
+LWS_VISIBLE int
+lws_get_random(struct lws_context *context, void *buf, int len)
+{
+ return read(context->fd_random, (char *)buf, len);
+}
+
+LWS_VISIBLE void lwsl_emit_syslog(int level, const char *line)
+{
+ int syslog_level = LOG_DEBUG;
+
+ switch (level) {
+ case LLL_ERR:
+ syslog_level = LOG_ERR;
+ break;
+ case LLL_WARN:
+ syslog_level = LOG_WARNING;
+ break;
+ case LLL_NOTICE:
+ syslog_level = LOG_NOTICE;
+ break;
+ case LLL_INFO:
+ syslog_level = LOG_INFO;
+ break;
+ }
+ syslog(syslog_level, "%s", line);
+}
+
+
+int
+lws_plat_write_cert(struct lws_vhost *vhost, int is_key, int fd, void *buf,
+ int len)
+{
+ int n;
+
+ n = write(fd, buf, len);
+
+ fsync(fd);
+ if (lseek(fd, 0, SEEK_SET) < 0)
+ return 1;
+
+ return n != len;
+}
+
+
+int
+lws_plat_recommended_rsa_bits(void)
+{
+ return 4096;
+}
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-pipe.c b/thirdparty/libwebsockets/lib/plat/unix/unix-pipe.c
new file mode 100644
index 0000000000..64ce253be6
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-pipe.c
@@ -0,0 +1,62 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+
+int
+lws_plat_pipe_create(struct lws *wsi)
+{
+ struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
+
+#if defined(LWS_HAVE_PIPE2)
+ return pipe2(pt->dummy_pipe_fds, O_NONBLOCK);
+#else
+ return pipe(pt->dummy_pipe_fds);
+#endif
+}
+
+int
+lws_plat_pipe_signal(struct lws *wsi)
+{
+ struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
+ char buf = 0;
+ int n;
+
+ n = write(pt->dummy_pipe_fds[1], &buf, 1);
+
+ return n != 1;
+}
+
+void
+lws_plat_pipe_close(struct lws *wsi)
+{
+ struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
+
+ if (pt->dummy_pipe_fds[0] && pt->dummy_pipe_fds[0] != -1)
+ close(pt->dummy_pipe_fds[0]);
+ if (pt->dummy_pipe_fds[1] && pt->dummy_pipe_fds[1] != -1)
+ close(pt->dummy_pipe_fds[1]);
+
+ pt->dummy_pipe_fds[0] = pt->dummy_pipe_fds[1] = -1;
+}
+
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-service.c b/thirdparty/libwebsockets/lib/plat/unix/unix-service.c
new file mode 100644
index 0000000000..e61ef59959
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-service.c
@@ -0,0 +1,204 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+int
+lws_poll_listen_fd(struct lws_pollfd *fd)
+{
+ return poll(fd, 1, 0);
+}
+
+LWS_EXTERN int
+_lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
+{
+ volatile struct lws_foreign_thread_pollfd *ftp, *next;
+ volatile struct lws_context_per_thread *vpt;
+ struct lws_context_per_thread *pt;
+ int n = -1, m, c;
+
+ /* stay dead once we are dead */
+
+ if (!context || !context->vhost_list)
+ return 1;
+
+ pt = &context->pt[tsi];
+ vpt = (volatile struct lws_context_per_thread *)pt;
+
+ lws_stats_atomic_bump(context, pt, LWSSTATS_C_SERVICE_ENTRY, 1);
+
+ if (timeout_ms < 0)
+ goto faked_service;
+
+ if (context->event_loop_ops->run_pt)
+ context->event_loop_ops->run_pt(context, tsi);
+
+ if (!pt->service_tid_detected) {
+ struct lws _lws;
+
+ memset(&_lws, 0, sizeof(_lws));
+ _lws.context = context;
+
+ pt->service_tid =
+ context->vhost_list->protocols[0].callback(
+ &_lws, LWS_CALLBACK_GET_THREAD_ID, NULL, NULL, 0);
+ pt->service_tid_detected = 1;
+ }
+
+ /*
+ * is there anybody with pending stuff that needs service forcing?
+ */
+ if (!lws_service_adjust_timeout(context, 1, tsi)) {
+ /* -1 timeout means just do forced service */
+ _lws_plat_service_tsi(context, -1, pt->tid);
+ /* still somebody left who wants forced service? */
+ if (!lws_service_adjust_timeout(context, 1, pt->tid))
+ /* yes... come back again quickly */
+ timeout_ms = 0;
+ }
+
+ if (timeout_ms) {
+ lws_pt_lock(pt, __func__);
+ /* don't stay in poll wait longer than next hr timeout */
+ lws_usec_t t = __lws_hrtimer_service(pt);
+ if ((lws_usec_t)timeout_ms * 1000 > t)
+ timeout_ms = t / 1000;
+ lws_pt_unlock(pt);
+ }
+
+ vpt->inside_poll = 1;
+ lws_memory_barrier();
+ n = poll(pt->fds, pt->fds_count, timeout_ms);
+ vpt->inside_poll = 0;
+ lws_memory_barrier();
+
+ /* Collision will be rare and brief. Just spin until it completes */
+ while (vpt->foreign_spinlock)
+ ;
+
+ /*
+ * At this point we are not inside a foreign thread pollfd change,
+ * and we have marked ourselves as outside the poll() wait. So we
+ * are the only guys that can modify the lws_foreign_thread_pollfd
+ * list on the pt. Drain the list and apply the changes to the
+ * affected pollfds in the correct order.
+ */
+
+ lws_pt_lock(pt, __func__);
+
+ ftp = vpt->foreign_pfd_list;
+ //lwsl_notice("cleared list %p\n", ftp);
+ while (ftp) {
+ struct lws *wsi;
+ struct lws_pollfd *pfd;
+
+ next = ftp->next;
+ pfd = &vpt->fds[ftp->fd_index];
+ if (lws_socket_is_valid(pfd->fd)) {
+ wsi = wsi_from_fd(context, pfd->fd);
+ if (wsi)
+ __lws_change_pollfd(wsi, ftp->_and, ftp->_or);
+ }
+ lws_free((void *)ftp);
+ ftp = next;
+ }
+ vpt->foreign_pfd_list = NULL;
+ lws_memory_barrier();
+
+ /* we have come out of a poll wait... check the hrtimer list */
+
+ __lws_hrtimer_service(pt);
+
+ lws_pt_unlock(pt);
+
+ m = 0;
+#if defined(LWS_ROLE_WS) && !defined(LWS_WITHOUT_EXTENSIONS)
+ m |= !!pt->ws.rx_draining_ext_list;
+#endif
+
+ if (pt->context->tls_ops &&
+ pt->context->tls_ops->fake_POLLIN_for_buffered)
+ m |= pt->context->tls_ops->fake_POLLIN_for_buffered(pt);
+
+ if (!m && !n) { /* nothing to do */
+ lws_service_fd_tsi(context, NULL, tsi);
+ lws_service_do_ripe_rxflow(pt);
+
+ return 0;
+ }
+
+faked_service:
+ m = lws_service_flag_pending(context, tsi);
+ if (m)
+ c = -1; /* unknown limit */
+ else
+ if (n < 0) {
+ if (LWS_ERRNO != LWS_EINTR)
+ return -1;
+ return 0;
+ } else
+ c = n;
+
+ /* any socket with events to service? */
+ for (n = 0; n < (int)pt->fds_count && c; n++) {
+ if (!pt->fds[n].revents)
+ continue;
+
+ c--;
+
+ m = lws_service_fd_tsi(context, &pt->fds[n], tsi);
+ if (m < 0) {
+ lwsl_err("%s: lws_service_fd_tsi returned %d\n",
+ __func__, m);
+ return -1;
+ }
+ /* if something closed, retry this slot */
+ if (m)
+ n--;
+ }
+
+ lws_service_do_ripe_rxflow(pt);
+
+ return 0;
+}
+
+int
+lws_plat_check_connection_error(struct lws *wsi)
+{
+ return 0;
+}
+
+int
+lws_plat_service(struct lws_context *context, int timeout_ms)
+{
+ return _lws_plat_service_tsi(context, timeout_ms, 0);
+}
+
+
+void
+lws_plat_service_periodic(struct lws_context *context)
+{
+ /* if our parent went down, don't linger around */
+ if (context->started_with_parent &&
+ kill(context->started_with_parent, 0) < 0)
+ kill(getpid(), SIGTERM);
+}
diff --git a/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c b/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
new file mode 100644
index 0000000000..192dddee63
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/unix/unix-sockets.c
@@ -0,0 +1,263 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#define _GNU_SOURCE
+#include "core/private.h"
+
+#include <pwd.h>
+#include <grp.h>
+
+
+
+int
+lws_send_pipe_choked(struct lws *wsi)
+{
+ struct lws_pollfd fds;
+ struct lws *wsi_eff;
+
+#if defined(LWS_WITH_HTTP2)
+ wsi_eff = lws_get_network_wsi(wsi);
+#else
+ wsi_eff = wsi;
+#endif
+
+ /* the fact we checked implies we avoided back-to-back writes */
+ wsi_eff->could_have_pending = 0;
+
+ /* treat the fact we got a truncated send pending as if we're choked */
+ if (lws_has_buffered_out(wsi_eff)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ ||wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more
+#endif
+ )
+ return 1;
+
+ fds.fd = wsi_eff->desc.sockfd;
+ fds.events = POLLOUT;
+ fds.revents = 0;
+
+ if (poll(&fds, 1, 0) != 1)
+ return 1;
+
+ if ((fds.revents & POLLOUT) == 0)
+ return 1;
+
+ /* okay to send another packet without blocking */
+
+ return 0;
+}
+
+
+int
+lws_plat_set_socket_options(struct lws_vhost *vhost, int fd, int unix_skt)
+{
+ int optval = 1;
+ socklen_t optlen = sizeof(optval);
+
+#ifdef LWS_WITH_IPV6
+ optval = 0;
+ setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void*)&optval, optlen);
+#endif
+
+#if defined(__APPLE__) || \
+ defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__NetBSD__) || \
+ defined(__OpenBSD__) || \
+ defined(__HAIKU__)
+ struct protoent *tcp_proto;
+#endif
+
+ (void)fcntl(fd, F_SETFD, FD_CLOEXEC);
+
+ if (!unix_skt && vhost->ka_time) {
+ /* enable keepalive on this socket */
+ optval = 1;
+ if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
+ (const void *)&optval, optlen) < 0)
+ return 1;
+
+#if defined(__APPLE__) || \
+ defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__NetBSD__) || \
+ defined(__CYGWIN__) || defined(__OpenBSD__) || defined (__sun) || \
+ defined(__HAIKU__)
+
+ /*
+ * didn't find a way to set these per-socket, need to
+ * tune kernel systemwide values
+ */
+#else
+ /* set the keepalive conditions we want on it too */
+
+#if defined(LWS_HAVE_TCP_USER_TIMEOUT)
+ optval = 1000 * (vhost->ka_time +
+ (vhost->ka_interval * vhost->ka_probes));
+ if (setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT,
+ (const void *)&optval, optlen) < 0)
+ return 1;
+#endif
+ optval = vhost->ka_time;
+ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE,
+ (const void *)&optval, optlen) < 0)
+ return 1;
+
+ optval = vhost->ka_interval;
+ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL,
+ (const void *)&optval, optlen) < 0)
+ return 1;
+
+ optval = vhost->ka_probes;
+ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT,
+ (const void *)&optval, optlen) < 0)
+ return 1;
+#endif
+ }
+
+#if defined(SO_BINDTODEVICE)
+ if (!unix_skt && vhost->bind_iface && vhost->iface) {
+ lwsl_info("binding listen skt to %s using SO_BINDTODEVICE\n", vhost->iface);
+ if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, vhost->iface,
+ strlen(vhost->iface)) < 0) {
+ lwsl_warn("Failed to bind to device %s\n", vhost->iface);
+ return 1;
+ }
+ }
+#endif
+
+ /* Disable Nagle */
+ optval = 1;
+#if defined (__sun) || defined(__QNX__)
+ if (!unix_skt && setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0)
+ return 1;
+#elif !defined(__APPLE__) && \
+ !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && \
+ !defined(__NetBSD__) && \
+ !defined(__OpenBSD__) && \
+ !defined(__HAIKU__)
+ if (!unix_skt && setsockopt(fd, SOL_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0)
+ return 1;
+#else
+ tcp_proto = getprotobyname("TCP");
+ if (!unix_skt && setsockopt(fd, tcp_proto->p_proto, TCP_NODELAY, &optval, optlen) < 0)
+ return 1;
+#endif
+
+ /* We are nonblocking... */
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
+ return 1;
+
+ return 0;
+}
+
+
+/* cast a struct sockaddr_in6 * into addr for ipv6 */
+
+int
+lws_interface_to_sa(int ipv6, const char *ifname, struct sockaddr_in *addr,
+ size_t addrlen)
+{
+ int rc = LWS_ITOSA_NOT_EXIST;
+
+ struct ifaddrs *ifr;
+ struct ifaddrs *ifc;
+#ifdef LWS_WITH_IPV6
+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)addr;
+#endif
+
+ getifaddrs(&ifr);
+ for (ifc = ifr; ifc != NULL && rc; ifc = ifc->ifa_next) {
+ if (!ifc->ifa_addr)
+ continue;
+
+ lwsl_debug(" interface %s vs %s (fam %d) ipv6 %d\n",
+ ifc->ifa_name, ifname,
+ ifc->ifa_addr->sa_family, ipv6);
+
+ if (strcmp(ifc->ifa_name, ifname))
+ continue;
+
+ switch (ifc->ifa_addr->sa_family) {
+#if defined(AF_PACKET)
+ case AF_PACKET:
+ /* interface exists but is not usable */
+ rc = LWS_ITOSA_NOT_USABLE;
+ continue;
+#endif
+
+ case AF_INET:
+#ifdef LWS_WITH_IPV6
+ if (ipv6) {
+ /* map IPv4 to IPv6 */
+ bzero((char *)&addr6->sin6_addr,
+ sizeof(struct in6_addr));
+ addr6->sin6_addr.s6_addr[10] = 0xff;
+ addr6->sin6_addr.s6_addr[11] = 0xff;
+ memcpy(&addr6->sin6_addr.s6_addr[12],
+ &((struct sockaddr_in *)ifc->ifa_addr)->sin_addr,
+ sizeof(struct in_addr));
+ } else
+#endif
+ memcpy(addr,
+ (struct sockaddr_in *)ifc->ifa_addr,
+ sizeof(struct sockaddr_in));
+ break;
+#ifdef LWS_WITH_IPV6
+ case AF_INET6:
+ memcpy(&addr6->sin6_addr,
+ &((struct sockaddr_in6 *)ifc->ifa_addr)->sin6_addr,
+ sizeof(struct in6_addr));
+ break;
+#endif
+ default:
+ continue;
+ }
+ rc = LWS_ITOSA_USABLE;
+ }
+
+ freeifaddrs(ifr);
+
+ if (rc) {
+ /* check if bind to IP address */
+#ifdef LWS_WITH_IPV6
+ if (inet_pton(AF_INET6, ifname, &addr6->sin6_addr) == 1)
+ rc = LWS_ITOSA_USABLE;
+ else
+#endif
+ if (inet_pton(AF_INET, ifname, &addr->sin_addr) == 1)
+ rc = LWS_ITOSA_USABLE;
+ }
+
+ return rc;
+}
+
+
+const char *
+lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt)
+{
+ return inet_ntop(af, src, dst, cnt);
+}
+
+int
+lws_plat_inet_pton(int af, const char *src, void *dst)
+{
+ return inet_pton(af, src, dst);
+}
diff --git a/thirdparty/libwebsockets/lib/plat/windows/private.h b/thirdparty/libwebsockets/lib/plat/windows/private.h
new file mode 100644
index 0000000000..980028ce42
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/private.h
@@ -0,0 +1,148 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * Included from lib/core/private.h if defined(WIN32) || defined(_WIN32)
+ */
+
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+
+ #if (WINVER < 0x0501)
+ #undef WINVER
+ #undef _WIN32_WINNT
+ #define WINVER 0x0501
+ #define _WIN32_WINNT WINVER
+ #endif
+
+ #define LWS_NO_DAEMONIZE
+ #define LWS_ERRNO WSAGetLastError()
+ #define LWS_EAGAIN WSAEWOULDBLOCK
+ #define LWS_EALREADY WSAEALREADY
+ #define LWS_EINPROGRESS WSAEINPROGRESS
+ #define LWS_EINTR WSAEINTR
+ #define LWS_EISCONN WSAEISCONN
+ #define LWS_ENOTCONN WSAENOTCONN
+ #define LWS_EWOULDBLOCK WSAEWOULDBLOCK
+ #define LWS_EADDRINUSE WSAEADDRINUSE
+ #define MSG_NOSIGNAL 0
+ #define SHUT_RDWR SD_BOTH
+ #define SOL_TCP IPPROTO_TCP
+ #define SHUT_WR SD_SEND
+
+ #define compatible_close(fd) closesocket(fd)
+ #define lws_set_blocking_send(wsi) wsi->sock_send_blocking = 1
+ #define LWS_SOCK_INVALID (INVALID_SOCKET)
+
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #include <windows.h>
+ #include <tchar.h>
+ #ifdef LWS_HAVE_IN6ADDR_H
+ #include <in6addr.h>
+ #endif
+ #include <mstcpip.h>
+ #include <io.h>
+
+ #if !defined(LWS_HAVE_ATOLL)
+ #if defined(LWS_HAVE__ATOI64)
+ #define atoll _atoi64
+ #else
+ #warning No atoll or _atoi64 available, using atoi
+ #define atoll atoi
+ #endif
+ #endif
+
+ #ifndef __func__
+ #define __func__ __FUNCTION__
+ #endif
+
+ #ifdef LWS_HAVE__VSNPRINTF
+ #define vsnprintf _vsnprintf
+ #endif
+
+/* we don't have an implementation for this on windows... */
+int kill(int pid, int sig);
+int fork(void);
+#ifndef SIGINT
+#define SIGINT 2
+#endif
+
+#include <gettimeofday.h>
+
+#ifndef BIG_ENDIAN
+ #define BIG_ENDIAN 4321 /* to show byte order (taken from gcc) */
+#endif
+#ifndef LITTLE_ENDIAN
+ #define LITTLE_ENDIAN 1234
+#endif
+#ifndef BYTE_ORDER
+ #define BYTE_ORDER LITTLE_ENDIAN
+#endif
+
+#undef __P
+#ifndef __P
+ #if __STDC__
+ #define __P(protos) protos
+ #else
+ #define __P(protos) ()
+ #endif
+#endif
+
+#ifdef _WIN32
+ #ifndef FD_HASHTABLE_MODULUS
+ #define FD_HASHTABLE_MODULUS 32
+ #endif
+#endif
+
+#define lws_plat_socket_offset() (0)
+
+struct lws;
+struct lws_context;
+
+#define LWS_FD_HASH(fd) ((fd ^ (fd >> 8) ^ (fd >> 16)) % FD_HASHTABLE_MODULUS)
+struct lws_fd_hashtable {
+ struct lws **wsi;
+ int length;
+};
+
+
+#ifdef LWS_DLL
+#ifdef LWS_INTERNAL
+#define LWS_EXTERN extern __declspec(dllexport)
+#else
+#define LWS_EXTERN extern __declspec(dllimport)
+#endif
+#else
+#define LWS_EXTERN
+#endif
+
+typedef SOCKET lws_sockfd_type;
+typedef HANDLE lws_filefd_type;
+#define LWS_WIN32_HANDLE_TYPES
+
+LWS_EXTERN struct lws *
+wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd);
+
+LWS_EXTERN int
+insert_wsi(struct lws_context *context, struct lws *wsi);
+
+LWS_EXTERN int
+delete_from_fd(struct lws_context *context, lws_sockfd_type fd);
diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-fds.c b/thirdparty/libwebsockets/lib/plat/windows/windows-fds.c
new file mode 100644
index 0000000000..0d324e8f3a
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/windows-fds.c
@@ -0,0 +1,76 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+#include "core/private.h"
+
+struct lws *
+wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd)
+{
+ int h = LWS_FD_HASH(fd);
+ int n = 0;
+
+ for (n = 0; n < context->fd_hashtable[h].length; n++)
+ if (context->fd_hashtable[h].wsi[n]->desc.sockfd == fd)
+ return context->fd_hashtable[h].wsi[n];
+
+ return NULL;
+}
+
+int
+insert_wsi(struct lws_context *context, struct lws *wsi)
+{
+ int h = LWS_FD_HASH(wsi->desc.sockfd);
+
+ if (context->fd_hashtable[h].length == (getdtablesize() - 1)) {
+ lwsl_err("hash table overflow\n");
+ return 1;
+ }
+
+ context->fd_hashtable[h].wsi[context->fd_hashtable[h].length++] = wsi;
+
+ return 0;
+}
+
+int
+delete_from_fd(struct lws_context *context, lws_sockfd_type fd)
+{
+ int h = LWS_FD_HASH(fd);
+ int n = 0;
+
+ for (n = 0; n < context->fd_hashtable[h].length; n++)
+ if (context->fd_hashtable[h].wsi[n]->desc.sockfd == fd) {
+ while (n < context->fd_hashtable[h].length) {
+ context->fd_hashtable[h].wsi[n] =
+ context->fd_hashtable[h].wsi[n + 1];
+ n++;
+ }
+ context->fd_hashtable[h].length--;
+
+ return 0;
+ }
+
+ lwsl_err("Failed to find fd %d requested for "
+ "delete in hashtable\n", fd);
+ return 1;
+}
diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-file.c b/thirdparty/libwebsockets/lib/plat/windows/windows-file.c
new file mode 100644
index 0000000000..eb73aab7f6
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/windows-file.c
@@ -0,0 +1,185 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+#include "core/private.h"
+
+int lws_plat_apply_FD_CLOEXEC(int n)
+{
+ return 0;
+}
+
+lws_fop_fd_t
+_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+ const char *vpath, lws_fop_flags_t *flags)
+{
+ HANDLE ret;
+ WCHAR buf[MAX_PATH];
+ lws_fop_fd_t fop_fd;
+ FILE_STANDARD_INFO fInfo = {0};
+
+ MultiByteToWideChar(CP_UTF8, 0, filename, -1, buf, LWS_ARRAY_SIZE(buf));
+
+#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0602 // Windows 8 (minimum when UWP_ENABLED, but can be used in Windows builds)
+ CREATEFILE2_EXTENDED_PARAMETERS extParams = {0};
+ extParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
+
+ if (((*flags) & 7) == _O_RDONLY) {
+ ret = CreateFile2(buf, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extParams);
+ } else {
+ ret = CreateFile2(buf, GENERIC_WRITE, 0, CREATE_ALWAYS, &extParams);
+ }
+#else
+ if (((*flags) & 7) == _O_RDONLY) {
+ ret = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ } else {
+ ret = CreateFileW(buf, GENERIC_WRITE, 0, NULL,
+ CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+ }
+#endif
+
+ if (ret == LWS_INVALID_FILE)
+ goto bail;
+
+ fop_fd = malloc(sizeof(*fop_fd));
+ if (!fop_fd)
+ goto bail;
+
+ fop_fd->fops = fops;
+ fop_fd->fd = ret;
+ fop_fd->filesystem_priv = NULL; /* we don't use it */
+ fop_fd->flags = *flags;
+ fop_fd->len = 0;
+ if(GetFileInformationByHandleEx(ret, FileStandardInfo, &fInfo, sizeof(fInfo)))
+ fop_fd->len = fInfo.EndOfFile.QuadPart;
+
+ fop_fd->pos = 0;
+
+ return fop_fd;
+
+bail:
+ return NULL;
+}
+
+int
+_lws_plat_file_close(lws_fop_fd_t *fop_fd)
+{
+ HANDLE fd = (*fop_fd)->fd;
+
+ free(*fop_fd);
+ *fop_fd = NULL;
+
+ CloseHandle((HANDLE)fd);
+
+ return 0;
+}
+
+lws_fileofs_t
+_lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
+{
+ LARGE_INTEGER l;
+
+ l.QuadPart = offset;
+ return SetFilePointerEx((HANDLE)fop_fd->fd, l, NULL, FILE_CURRENT);
+}
+
+int
+_lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len)
+{
+ DWORD _amount;
+
+ if (!ReadFile((HANDLE)fop_fd->fd, buf, (DWORD)len, &_amount, NULL)) {
+ *amount = 0;
+
+ return 1;
+ }
+
+ fop_fd->pos += _amount;
+ *amount = (unsigned long)_amount;
+
+ return 0;
+}
+
+int
+_lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t* buf, lws_filepos_t len)
+{
+ DWORD _amount;
+
+ if (!WriteFile((HANDLE)fop_fd->fd, buf, (DWORD)len, &_amount, NULL)) {
+ *amount = 0;
+
+ return 1;
+ }
+
+ fop_fd->pos += _amount;
+ *amount = (unsigned long)_amount;
+
+ return 0;
+}
+
+
+int
+lws_plat_write_cert(struct lws_vhost *vhost, int is_key, int fd, void *buf,
+ int len)
+{
+ int n;
+
+ n = write(fd, buf, len);
+
+ lseek(fd, 0, SEEK_SET);
+
+ return n != len;
+}
+
+int
+lws_plat_write_file(const char *filename, void *buf, int len)
+{
+ int m, fd;
+
+ fd = lws_open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+
+ if (fd == -1)
+ return -1;
+
+ m = write(fd, buf, len);
+ close(fd);
+
+ return m != len;
+}
+
+int
+lws_plat_read_file(const char *filename, void *buf, int len)
+{
+ int n, fd = lws_open(filename, O_RDONLY);
+ if (fd == -1)
+ return -1;
+
+ n = read(fd, buf, len);
+ close(fd);
+
+ return n;
+}
+
diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-init.c b/thirdparty/libwebsockets/lib/plat/windows/windows-init.c
new file mode 100644
index 0000000000..8c4d9373f6
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/windows-init.c
@@ -0,0 +1,110 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+#include "core/private.h"
+
+void
+lws_plat_drop_app_privileges(const struct lws_context_creation_info *info)
+{
+}
+
+int
+lws_plat_context_early_init(void)
+{
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int err;
+
+ /* Use the MAKEWORD(lowbyte, highbyte) macro from Windef.h */
+ wVersionRequested = MAKEWORD(2, 2);
+
+ err = WSAStartup(wVersionRequested, &wsaData);
+ if (!err)
+ return 0;
+ /*
+ * Tell the user that we could not find a usable
+ * Winsock DLL
+ */
+ lwsl_err("WSAStartup failed with error: %d\n", err);
+
+ return 1;
+}
+
+int
+lws_plat_init(struct lws_context *context,
+ const struct lws_context_creation_info *info)
+{
+ struct lws_context_per_thread *pt = &context->pt[0];
+ int i, n = context->count_threads;
+
+ for (i = 0; i < FD_HASHTABLE_MODULUS; i++) {
+ context->fd_hashtable[i].wsi =
+ lws_zalloc(sizeof(struct lws*) * context->max_fds,
+ "win hashtable");
+
+ if (!context->fd_hashtable[i].wsi)
+ return -1;
+ }
+
+ while (n--) {
+ pt->fds_count = 0;
+ pt->events = WSACreateEvent(); /* the cancel event */
+
+ pt++;
+ }
+
+ context->fd_random = 0;
+
+#ifdef LWS_WITH_PLUGINS
+ if (info->plugin_dirs)
+ lws_plat_plugins_init(context, info->plugin_dirs);
+#endif
+
+ return 0;
+}
+
+void
+lws_plat_context_early_destroy(struct lws_context *context)
+{
+ struct lws_context_per_thread *pt = &context->pt[0];
+ int n = context->count_threads;
+
+ while (n--) {
+ WSACloseEvent(pt->events);
+ pt++;
+ }
+}
+
+void
+lws_plat_context_late_destroy(struct lws_context *context)
+{
+ int n;
+
+ for (n = 0; n < FD_HASHTABLE_MODULUS; n++) {
+ if (context->fd_hashtable[n].wsi)
+ lws_free(context->fd_hashtable[n].wsi);
+ }
+
+ WSACleanup();
+}
diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-misc.c b/thirdparty/libwebsockets/lib/plat/windows/windows-misc.c
new file mode 100644
index 0000000000..53cc19b6b9
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/windows-misc.c
@@ -0,0 +1,108 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+#include "core/private.h"
+
+
+uint64_t
+lws_time_in_microseconds()
+{
+#ifndef DELTA_EPOCH_IN_MICROSECS
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
+#endif
+ FILETIME filetime;
+ ULARGE_INTEGER datetime;
+
+#ifdef _WIN32_WCE
+ GetCurrentFT(&filetime);
+#else
+ GetSystemTimeAsFileTime(&filetime);
+#endif
+
+ /*
+ * As per Windows documentation for FILETIME, copy the resulting
+ * FILETIME structure to a ULARGE_INTEGER structure using memcpy
+ * (using memcpy instead of direct assignment can prevent alignment
+ * faults on 64-bit Windows).
+ */
+ memcpy(&datetime, &filetime, sizeof(datetime));
+
+ /* Windows file times are in 100s of nanoseconds. */
+ return (datetime.QuadPart / 10) - DELTA_EPOCH_IN_MICROSECS;
+}
+
+
+#ifdef _WIN32_WCE
+time_t time(time_t *t)
+{
+ time_t ret = lws_time_in_microseconds() / 1000000;
+
+ if(t != NULL)
+ *t = ret;
+
+ return ret;
+}
+#endif
+
+LWS_VISIBLE int
+lws_get_random(struct lws_context *context, void *buf, int len)
+{
+ int n;
+ char *p = (char *)buf;
+
+ for (n = 0; n < len; n++)
+ p[n] = (unsigned char)rand();
+
+ return n;
+}
+
+
+LWS_VISIBLE void
+lwsl_emit_syslog(int level, const char *line)
+{
+ lwsl_emit_stderr(level, line);
+}
+
+
+int kill(int pid, int sig)
+{
+ lwsl_err("Sorry Windows doesn't support kill().");
+ exit(0);
+}
+
+int fork(void)
+{
+ lwsl_err("Sorry Windows doesn't support fork().");
+ exit(0);
+}
+
+
+int
+lws_plat_recommended_rsa_bits(void)
+{
+ return 4096;
+}
+
+
+
diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-pipe.c b/thirdparty/libwebsockets/lib/plat/windows/windows-pipe.c
new file mode 100644
index 0000000000..af2af1fa83
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/windows-pipe.c
@@ -0,0 +1,46 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+#include "core/private.h"
+
+int
+lws_plat_pipe_create(struct lws *wsi)
+{
+ return 1;
+}
+
+int
+lws_plat_pipe_signal(struct lws *wsi)
+{
+ struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
+
+ WSASetEvent(pt->events); /* trigger the cancel event */
+
+ return 0;
+}
+
+void
+lws_plat_pipe_close(struct lws *wsi)
+{
+}
diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-service.c b/thirdparty/libwebsockets/lib/plat/windows/windows-service.c
new file mode 100644
index 0000000000..a6adefbd3b
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/windows-service.c
@@ -0,0 +1,194 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010 - 2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+#include "core/private.h"
+
+
+LWS_EXTERN int
+_lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
+{
+ struct lws_context_per_thread *pt;
+ WSANETWORKEVENTS networkevents;
+ struct lws_pollfd *pfd;
+ struct lws *wsi;
+ unsigned int i;
+ DWORD ev;
+ int n;
+
+ /* stay dead once we are dead */
+ if (context == NULL || !context->vhost_list)
+ return 1;
+
+ pt = &context->pt[tsi];
+
+ if (!pt->service_tid_detected) {
+ struct lws _lws;
+
+ memset(&_lws, 0, sizeof(_lws));
+ _lws.context = context;
+
+ pt->service_tid = context->vhost_list->
+ protocols[0].callback(&_lws, LWS_CALLBACK_GET_THREAD_ID,
+ NULL, NULL, 0);
+ pt->service_tid_detected = 1;
+ }
+
+ if (timeout_ms < 0) {
+ if (lws_service_flag_pending(context, tsi)) {
+ /* any socket with events to service? */
+ for (n = 0; n < (int)pt->fds_count; n++) {
+ int m;
+ if (!pt->fds[n].revents)
+ continue;
+
+ m = lws_service_fd_tsi(context, &pt->fds[n], tsi);
+ if (m < 0)
+ return -1;
+ /* if something closed, retry this slot */
+ if (m)
+ n--;
+ }
+ }
+ return 0;
+ }
+
+ if (context->event_loop_ops->run_pt)
+ context->event_loop_ops->run_pt(context, tsi);
+
+ for (i = 0; i < pt->fds_count; ++i) {
+ pfd = &pt->fds[i];
+
+ if (!(pfd->events & LWS_POLLOUT))
+ continue;
+
+ wsi = wsi_from_fd(context, pfd->fd);
+ if (!wsi || wsi->listener)
+ continue;
+ if (wsi->sock_send_blocking)
+ continue;
+ pfd->revents = LWS_POLLOUT;
+ n = lws_service_fd(context, pfd);
+ if (n < 0)
+ return -1;
+
+ /* Force WSAWaitForMultipleEvents() to check events and then return immediately. */
+ timeout_ms = 0;
+
+ /* if something closed, retry this slot */
+ if (n)
+ i--;
+ }
+
+ /*
+ * is there anybody with pending stuff that needs service forcing?
+ */
+ if (!lws_service_adjust_timeout(context, 1, tsi)) {
+ /* -1 timeout means just do forced service */
+ _lws_plat_service_tsi(context, -1, pt->tid);
+ /* still somebody left who wants forced service? */
+ if (!lws_service_adjust_timeout(context, 1, pt->tid))
+ /* yes... come back again quickly */
+ timeout_ms = 0;
+ }
+
+ if (timeout_ms) {
+ lws_usec_t t;
+
+ lws_pt_lock(pt, __func__);
+ /* don't stay in poll wait longer than next hr timeout */
+ t = __lws_hrtimer_service(pt);
+
+ if ((lws_usec_t)timeout_ms * 1000 > t)
+ timeout_ms = (int)(t / 1000);
+ lws_pt_unlock(pt);
+ }
+
+ ev = WSAWaitForMultipleEvents(1, &pt->events, FALSE, timeout_ms, FALSE);
+ if (ev == WSA_WAIT_EVENT_0) {
+ unsigned int eIdx;
+
+ WSAResetEvent(pt->events);
+
+ if (pt->context->tls_ops &&
+ pt->context->tls_ops->fake_POLLIN_for_buffered)
+ pt->context->tls_ops->fake_POLLIN_for_buffered(pt);
+
+ for (eIdx = 0; eIdx < pt->fds_count; ++eIdx) {
+ unsigned int err;
+
+ if (WSAEnumNetworkEvents(pt->fds[eIdx].fd, 0,
+ &networkevents) == SOCKET_ERROR) {
+ lwsl_err("WSAEnumNetworkEvents() failed "
+ "with error %d\n", LWS_ERRNO);
+ return -1;
+ }
+
+ pfd = &pt->fds[eIdx];
+ pfd->revents = (short)networkevents.lNetworkEvents;
+
+ err = networkevents.iErrorCode[FD_CONNECT_BIT];
+
+ if ((networkevents.lNetworkEvents & FD_CONNECT) &&
+ err && err != LWS_EALREADY &&
+ err != LWS_EINPROGRESS && err != LWS_EWOULDBLOCK &&
+ err != WSAEINVAL) {
+ lwsl_debug("Unable to connect errno=%d\n", err);
+ pfd->revents |= LWS_POLLHUP;
+ }
+
+ if (pfd->revents & LWS_POLLOUT) {
+ wsi = wsi_from_fd(context, pfd->fd);
+ if (wsi)
+ wsi->sock_send_blocking = 0;
+ }
+ /* if something closed, retry this slot */
+ if (pfd->revents & LWS_POLLHUP)
+ --eIdx;
+
+ if (pfd->revents) {
+ recv(pfd->fd, NULL, 0, 0);
+ lws_service_fd_tsi(context, pfd, tsi);
+ }
+ }
+ }
+
+ if (ev == WSA_WAIT_TIMEOUT)
+ lws_service_fd(context, NULL);
+
+ return 0;
+}
+
+int
+lws_plat_service(struct lws_context *context, int timeout_ms)
+{
+ return _lws_plat_service_tsi(context, timeout_ms, 0);
+}
+
+
+
+void
+lws_plat_service_periodic(struct lws_context *context)
+{
+}
+
diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c b/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
new file mode 100644
index 0000000000..62a0a49846
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/plat/windows/windows-sockets.c
@@ -0,0 +1,288 @@
+#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
+#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#endif
+#include "core/private.h"
+
+
+LWS_VISIBLE int
+lws_send_pipe_choked(struct lws *wsi)
+{ struct lws *wsi_eff;
+
+#if defined(LWS_WITH_HTTP2)
+ wsi_eff = lws_get_network_wsi(wsi);
+#else
+ wsi_eff = wsi;
+#endif
+ /* the fact we checked implies we avoided back-to-back writes */
+ wsi_eff->could_have_pending = 0;
+
+ /* treat the fact we got a truncated send pending as if we're choked */
+ if (lws_has_buffered_out(wsi_eff)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ ||wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more
+#endif
+ )
+ return 1;
+
+ return (int)wsi_eff->sock_send_blocking;
+}
+
+int
+lws_poll_listen_fd(struct lws_pollfd *fd)
+{
+ fd_set readfds;
+ struct timeval tv = { 0, 0 };
+
+ assert((fd->events & LWS_POLLIN) == LWS_POLLIN);
+
+ FD_ZERO(&readfds);
+ FD_SET(fd->fd, &readfds);
+
+ return select(((int)fd->fd) + 1, &readfds, NULL, NULL, &tv);
+}
+
+int
+lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd,
+ int unix_skt)
+{
+ int optval = 1;
+ int optlen = sizeof(optval);
+ u_long optl = 1;
+ DWORD dwBytesRet;
+ struct tcp_keepalive alive;
+ int protonbr;
+#ifndef _WIN32_WCE
+ struct protoent *tcp_proto;
+#endif
+
+#ifdef LWS_WITH_IPV6
+ optval = 0;
+ setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void*)&optval, optlen);
+#endif
+
+ if (vhost->ka_time) {
+ /* enable keepalive on this socket */
+ optval = 1;
+ if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
+ (const char *)&optval, optlen) < 0)
+ return 1;
+
+ alive.onoff = TRUE;
+ alive.keepalivetime = vhost->ka_time;
+ alive.keepaliveinterval = vhost->ka_interval;
+
+ if (WSAIoctl(fd, SIO_KEEPALIVE_VALS, &alive, sizeof(alive),
+ NULL, 0, &dwBytesRet, NULL, NULL))
+ return 1;
+ }
+
+ /* Disable Nagle */
+ optval = 1;
+#ifndef _WIN32_WCE
+ tcp_proto = getprotobyname("TCP");
+ if (!tcp_proto) {
+ lwsl_err("getprotobyname() failed with error %d\n", LWS_ERRNO);
+ return 1;
+ }
+ protonbr = tcp_proto->p_proto;
+#else
+ protonbr = 6;
+#endif
+
+ setsockopt(fd, protonbr, TCP_NODELAY, (const char *)&optval, optlen);
+
+ /* We are nonblocking... */
+ ioctlsocket(fd, FIONBIO, &optl);
+
+ return 0;
+}
+
+
+LWS_EXTERN int
+lws_interface_to_sa(int ipv6,
+ const char *ifname, struct sockaddr_in *addr, size_t addrlen)
+{
+#ifdef LWS_WITH_IPV6
+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)addr;
+
+ if (ipv6) {
+ if (lws_plat_inet_pton(AF_INET6, ifname, &addr6->sin6_addr) == 1) {
+ return LWS_ITOSA_USABLE;
+ }
+ }
+#endif
+
+ long long address = inet_addr(ifname);
+
+ if (address == INADDR_NONE) {
+ struct hostent *entry = gethostbyname(ifname);
+ if (entry)
+ address = ((struct in_addr *)entry->h_addr_list[0])->s_addr;
+ }
+
+ if (address == INADDR_NONE)
+ return LWS_ITOSA_NOT_EXIST;
+
+ addr->sin_addr.s_addr = (unsigned long)(lws_intptr_t)address;
+
+ return LWS_ITOSA_USABLE;
+}
+
+void
+lws_plat_insert_socket_into_fds(struct lws_context *context, struct lws *wsi)
+{
+ struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
+
+ pt->fds[pt->fds_count++].revents = 0;
+ WSAEventSelect(wsi->desc.sockfd, pt->events,
+ LWS_POLLIN | LWS_POLLHUP | FD_CONNECT);
+}
+
+void
+lws_plat_delete_socket_from_fds(struct lws_context *context,
+ struct lws *wsi, int m)
+{
+ struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
+
+ pt->fds_count--;
+}
+
+
+int
+lws_plat_check_connection_error(struct lws *wsi)
+{
+ int optVal;
+ int optLen = sizeof(int);
+
+ if (getsockopt(wsi->desc.sockfd, SOL_SOCKET, SO_ERROR,
+ (char*)&optVal, &optLen) != SOCKET_ERROR && optVal &&
+ optVal != LWS_EALREADY && optVal != LWS_EINPROGRESS &&
+ optVal != LWS_EWOULDBLOCK && optVal != WSAEINVAL) {
+ lwsl_debug("Connect failed SO_ERROR=%d\n", optVal);
+ return 1;
+ }
+
+ return 0;
+}
+
+int
+lws_plat_change_pollfd(struct lws_context *context,
+ struct lws *wsi, struct lws_pollfd *pfd)
+{
+ struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
+ long networkevents = LWS_POLLHUP | FD_CONNECT;
+
+ if ((pfd->events & LWS_POLLIN))
+ networkevents |= LWS_POLLIN;
+
+ if ((pfd->events & LWS_POLLOUT))
+ networkevents |= LWS_POLLOUT;
+
+ if (WSAEventSelect(wsi->desc.sockfd, pt->events,
+ networkevents) != SOCKET_ERROR)
+ return 0;
+
+ lwsl_err("WSAEventSelect() failed with error %d\n", LWS_ERRNO);
+
+ return 1;
+}
+
+const char *
+lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt)
+{
+ WCHAR *buffer;
+ DWORD bufferlen = cnt;
+ BOOL ok = FALSE;
+
+ buffer = lws_malloc(bufferlen * 2, "inet_ntop");
+ if (!buffer) {
+ lwsl_err("Out of memory\n");
+ return NULL;
+ }
+
+ if (af == AF_INET) {
+ struct sockaddr_in srcaddr;
+ bzero(&srcaddr, sizeof(srcaddr));
+ srcaddr.sin_family = AF_INET;
+ memcpy(&(srcaddr.sin_addr), src, sizeof(srcaddr.sin_addr));
+
+ if (!WSAAddressToStringW((struct sockaddr*)&srcaddr, sizeof(srcaddr), 0, buffer, &bufferlen))
+ ok = TRUE;
+#ifdef LWS_WITH_IPV6
+ } else if (af == AF_INET6) {
+ struct sockaddr_in6 srcaddr;
+ bzero(&srcaddr, sizeof(srcaddr));
+ srcaddr.sin6_family = AF_INET6;
+ memcpy(&(srcaddr.sin6_addr), src, sizeof(srcaddr.sin6_addr));
+
+ if (!WSAAddressToStringW((struct sockaddr*)&srcaddr, sizeof(srcaddr), 0, buffer, &bufferlen))
+ ok = TRUE;
+#endif
+ } else
+ lwsl_err("Unsupported type\n");
+
+ if (!ok) {
+ int rv = WSAGetLastError();
+ lwsl_err("WSAAddressToString() : %d\n", rv);
+ } else {
+ if (WideCharToMultiByte(CP_ACP, 0, buffer, bufferlen, dst, cnt, 0, NULL) <= 0)
+ ok = FALSE;
+ }
+
+ lws_free(buffer);
+ return ok ? dst : NULL;
+}
+
+int
+lws_plat_inet_pton(int af, const char *src, void *dst)
+{
+ WCHAR *buffer;
+ DWORD bufferlen = (int)strlen(src) + 1;
+ BOOL ok = FALSE;
+
+ buffer = lws_malloc(bufferlen * 2, "inet_pton");
+ if (!buffer) {
+ lwsl_err("Out of memory\n");
+ return -1;
+ }
+
+ if (MultiByteToWideChar(CP_ACP, 0, src, bufferlen, buffer, bufferlen) <= 0) {
+ lwsl_err("Failed to convert multi byte to wide char\n");
+ lws_free(buffer);
+ return -1;
+ }
+
+ if (af == AF_INET) {
+ struct sockaddr_in dstaddr;
+ int dstaddrlen = sizeof(dstaddr);
+ bzero(&dstaddr, sizeof(dstaddr));
+ dstaddr.sin_family = AF_INET;
+
+ if (!WSAStringToAddressW(buffer, af, 0, (struct sockaddr *) &dstaddr, &dstaddrlen)) {
+ ok = TRUE;
+ memcpy(dst, &dstaddr.sin_addr, sizeof(dstaddr.sin_addr));
+ }
+#ifdef LWS_WITH_IPV6
+ } else if (af == AF_INET6) {
+ struct sockaddr_in6 dstaddr;
+ int dstaddrlen = sizeof(dstaddr);
+ bzero(&dstaddr, sizeof(dstaddr));
+ dstaddr.sin6_family = AF_INET6;
+
+ if (!WSAStringToAddressW(buffer, af, 0, (struct sockaddr *) &dstaddr, &dstaddrlen)) {
+ ok = TRUE;
+ memcpy(dst, &dstaddr.sin6_addr, sizeof(dstaddr.sin6_addr));
+ }
+#endif
+ } else
+ lwsl_err("Unsupported type\n");
+
+ if (!ok) {
+ int rv = WSAGetLastError();
+ lwsl_err("WSAAddressToString() : %d\n", rv);
+ }
+
+ lws_free(buffer);
+ return ok ? 1 : -1;
+}
diff --git a/thirdparty/libwebsockets/roles/h1/ops-h1.c b/thirdparty/libwebsockets/lib/roles/h1/ops-h1.c
index 9001c864ea..2fa0fe16e4 100644
--- a/thirdparty/libwebsockets/roles/h1/ops-h1.c
+++ b/thirdparty/libwebsockets/lib/roles/h1/ops-h1.c
@@ -42,7 +42,7 @@ lws_read_h1(struct lws *wsi, unsigned char *buf, lws_filepos_t len)
lws_filepos_t body_chunk_len;
size_t n;
- // lwsl_notice("%s: h1 path: wsi state 0x%x\n", __func__, lwsi_state(wsi));
+ lwsl_debug("%s: h1 path: wsi state 0x%x\n", __func__, lwsi_state(wsi));
switch (lwsi_state(wsi)) {
@@ -90,7 +90,6 @@ lws_read_h1(struct lws *wsi, unsigned char *buf, lws_filepos_t len)
* appropriately:
*/
len -= (buf - last_char);
-// lwsl_debug("%s: thinks we have used %ld\n", __func__, (long)len);
if (!wsi->hdr_parsing_completed)
/* More header content on the way */
@@ -119,6 +118,10 @@ lws_read_h1(struct lws *wsi, unsigned char *buf, lws_filepos_t len)
http_postbody:
lwsl_debug("%s: http post body: remain %d\n", __func__,
(int)wsi->http.rx_content_remain);
+
+ if (!wsi->http.rx_content_remain)
+ goto postbody_completion;
+
while (len && wsi->http.rx_content_remain) {
/* Copy as much as possible, up to the limit of:
* what we have in the read buffer (len)
@@ -158,7 +161,8 @@ http_postbody:
buf += n;
if (wsi->http.rx_content_remain) {
- lws_set_timeout(wsi, PENDING_TIMEOUT_HTTP_CONTENT,
+ lws_set_timeout(wsi,
+ PENDING_TIMEOUT_HTTP_CONTENT,
wsi->context->timeout_secs);
break;
}
@@ -221,7 +225,7 @@ ws_mode:
break;
case LRS_DEFERRING_ACTION:
- lwsl_debug("%s: LRS_DEFERRING_ACTION\n", __func__);
+ lwsl_notice("%s: LRS_DEFERRING_ACTION\n", __func__);
break;
case LRS_SSL_ACK_PENDING:
@@ -311,7 +315,8 @@ lws_h1_server_socket_service(struct lws *wsi, struct lws_pollfd *pollfd)
lwsi_state(wsi) == LRS_BODY)) {
if (!wsi->http.ah && lws_header_table_attach(wsi, 0)) {
- lwsl_info("%s: wsi %p: ah not available\n", __func__, wsi);
+ lwsl_info("%s: wsi %p: ah not available\n", __func__,
+ wsi);
goto try_pollout;
}
@@ -337,7 +342,8 @@ lws_h1_server_socket_service(struct lws *wsi, struct lws_pollfd *pollfd)
* and draining the extensions
*/
if (wsi->ws &&
- (wsi->ws->rx_draining_ext || wsi->ws->tx_draining_ext))
+ (wsi->ws->rx_draining_ext ||
+ wsi->ws->tx_draining_ext))
goto try_pollout;
#endif
/*
@@ -445,10 +451,9 @@ try_pollout:
if (lwsi_state(wsi) != LRS_ISSUING_FILE) {
- if (wsi->trunc_len) {
+ if (lws_has_buffered_out(wsi)) {
//lwsl_notice("%s: completing partial\n", __func__);
- if (lws_issue_raw(wsi, wsi->trunc_alloc + wsi->trunc_offset,
- wsi->trunc_len) < 0) {
+ if (lws_issue_raw(wsi, NULL, 0) < 0) {
lwsl_info("%s signalling to close\n", __func__);
goto fail;
}
@@ -459,7 +464,7 @@ try_pollout:
LWSSTATS_C_WRITEABLE_CB, 1);
#if defined(LWS_WITH_STATS)
if (wsi->active_writable_req_us) {
- uint64_t ul = time_in_microseconds() -
+ uint64_t ul = lws_time_in_microseconds() -
wsi->active_writable_req_us;
lws_stats_atomic_bump(wsi->context, pt,
@@ -519,6 +524,58 @@ rops_handle_POLLIN_h1(struct lws_context_per_thread *pt, struct lws *wsi,
}
#endif
+#if 0
+
+ /*
+ * !!! lws_serve_http_file_fragment() seems to duplicate most of
+ * lws_handle_POLLOUT_event() in its own loop...
+ */
+ lwsl_debug("%s: %d %d\n", __func__, (pollfd->revents & LWS_POLLOUT),
+ lwsi_state_can_handle_POLLOUT(wsi));
+
+ if ((pollfd->revents & LWS_POLLOUT) &&
+ lwsi_state_can_handle_POLLOUT(wsi) &&
+ lws_handle_POLLOUT_event(wsi, pollfd)) {
+ if (lwsi_state(wsi) == LRS_RETURNED_CLOSE)
+ lwsi_set_state(wsi, LRS_FLUSHING_BEFORE_CLOSE);
+ /* the write failed... it's had it */
+ wsi->socket_is_permanently_unusable = 1;
+
+ return LWS_HPI_RET_PLEASE_CLOSE_ME;
+ }
+#endif
+
+
+ /* Priority 2: pre- compression transform */
+
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more) {
+ enum lws_write_protocol wp = LWS_WRITE_HTTP;
+
+ lwsl_info("%s: completing comp partial (buflist_comp %p, may %d)\n",
+ __func__, wsi->http.comp_ctx.buflist_comp,
+ wsi->http.comp_ctx.may_have_more
+ );
+
+ if (wsi->role_ops->write_role_protocol(wsi, NULL, 0, &wp) < 0) {
+ lwsl_info("%s signalling to close\n", __func__);
+ return LWS_HPI_RET_PLEASE_CLOSE_ME;
+ }
+ lws_callback_on_writable(wsi);
+
+ if (!wsi->http.comp_ctx.buflist_comp &&
+ !wsi->http.comp_ctx.may_have_more &&
+ wsi->http.deferred_transaction_completed) {
+ wsi->http.deferred_transaction_completed = 0;
+ if (lws_http_transaction_completed(wsi))
+ return LWS_HPI_RET_PLEASE_CLOSE_ME;
+ }
+
+ return LWS_HPI_RET_HANDLED;
+ }
+#endif
+
if (lws_is_flowcontrolled(wsi))
/* We cannot deal with any kind of new RX because we are
* RX-flowcontrolled.
@@ -529,12 +586,14 @@ rops_handle_POLLIN_h1(struct lws_context_per_thread *pt, struct lws *wsi,
if (!lwsi_role_client(wsi)) {
int n;
- lwsl_debug("%s: %p: wsistate 0x%x\n", __func__, wsi, wsi->wsistate);
+ lwsl_debug("%s: %p: wsistate 0x%x\n", __func__, wsi,
+ wsi->wsistate);
n = lws_h1_server_socket_service(wsi, pollfd);
if (n != LWS_HPI_RET_HANDLED)
return n;
if (lwsi_state(wsi) != LRS_SSL_INIT)
- if (lws_server_socket_service_ssl(wsi, LWS_SOCK_INVALID))
+ if (lws_server_socket_service_ssl(wsi,
+ LWS_SOCK_INVALID))
return LWS_HPI_RET_PLEASE_CLOSE_ME;
return LWS_HPI_RET_HANDLED;
@@ -564,10 +623,9 @@ rops_handle_POLLIN_h1(struct lws_context_per_thread *pt, struct lws *wsi,
/* let user code know, he'll usually ask for writeable
* callback and drain / re-enable it there
*/
- if (user_callback_handle_rxflow(
- wsi->protocol->callback,
- wsi, LWS_CALLBACK_RECEIVE_CLIENT_HTTP,
- wsi->user_space, NULL, 0)) {
+ if (user_callback_handle_rxflow(wsi->protocol->callback, wsi,
+ LWS_CALLBACK_RECEIVE_CLIENT_HTTP,
+ wsi->user_space, NULL, 0)) {
lwsl_info("RECEIVE_CLIENT_HTTP closed it\n");
return LWS_HPI_RET_PLEASE_CLOSE_ME;
}
@@ -608,19 +666,68 @@ static int
rops_write_role_protocol_h1(struct lws *wsi, unsigned char *buf, size_t len,
enum lws_write_protocol *wp)
{
-#if 0
- /* if not in a state to send stuff, then just send nothing */
+ size_t olen = len;
+ int n;
+
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (wsi->http.lcs && (((*wp) & 0x1f) == LWS_WRITE_HTTP_FINAL ||
+ ((*wp) & 0x1f) == LWS_WRITE_HTTP)) {
+ unsigned char mtubuf[1400 + LWS_PRE +
+ LWS_HTTP_CHUNK_HDR_MAX_SIZE +
+ LWS_HTTP_CHUNK_TRL_MAX_SIZE],
+ *out = mtubuf + LWS_PRE +
+ LWS_HTTP_CHUNK_HDR_MAX_SIZE;
+ size_t o = sizeof(mtubuf) - LWS_PRE -
+ LWS_HTTP_CHUNK_HDR_MAX_SIZE -
+ LWS_HTTP_CHUNK_TRL_MAX_SIZE;
+
+ n = lws_http_compression_transform(wsi, buf, len, wp, &out, &o);
+ if (n)
+ return n;
- if ((lwsi_state(wsi) != LRS_RETURNED_CLOSE &&
- lwsi_state(wsi) != LRS_WAITING_TO_SEND_CLOSE &&
- lwsi_state(wsi) != LRS_AWAITING_CLOSE_ACK)) {
- //assert(0);
- lwsl_debug("binning %d %d\n", lwsi_state(wsi), *wp);
- return 0;
+ lwsl_info("%s: %p: transformed %d bytes to %d "
+ "(wp 0x%x, more %d)\n", __func__, wsi, (int)len,
+ (int)o, (int)*wp, wsi->http.comp_ctx.may_have_more);
+
+ if (!o)
+ return olen;
+
+ if (wsi->http.comp_ctx.chunking) {
+ char c[LWS_HTTP_CHUNK_HDR_MAX_SIZE + 2];
+ /*
+ * this only needs dealing with on http/1.1 to allow
+ * pipelining
+ */
+ n = lws_snprintf(c, sizeof(c), "%X\x0d\x0a", (int)o);
+ lwsl_info("%s: chunk (%d) %s", __func__, (int)o, c);
+ out -= n;
+ o += n;
+ memcpy(out, c, n);
+ out[o++] = '\x0d';
+ out[o++] = '\x0a';
+
+ if (((*wp) & 0x1f) == LWS_WRITE_HTTP_FINAL) {
+ lwsl_info("%s: final chunk\n", __func__);
+ out[o++] = '0';
+ out[o++] = '\x0d';
+ out[o++] = '\x0a';
+ out[o++] = '\x0d';
+ out[o++] = '\x0a';
+ }
+ }
+
+ buf = out;
+ len = o;
}
#endif
- return lws_issue_raw(wsi, (unsigned char *)buf, len);
+ n = lws_issue_raw(wsi, (unsigned char *)buf, len);
+ if (n < 0)
+ return n;
+
+ /* hide there may have been compression */
+
+ return (int)olen;
}
static int
@@ -666,12 +773,230 @@ rops_destroy_role_h1(struct lws *wsi)
ah = ah->next;
}
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ lws_http_compression_destroy(wsi);
+#endif
+
#ifdef LWS_ROLE_WS
lws_free_set_NULL(wsi->ws);
#endif
return 0;
}
+#if !defined(LWS_NO_SERVER)
+
+static int
+rops_adoption_bind_h1(struct lws *wsi, int type, const char *vh_prot_name)
+{
+ if (!(type & LWS_ADOPT_HTTP))
+ return 0; /* no match */
+
+
+ if (type & _LWS_ADOPT_FINISH) {
+ if (!lws_header_table_attach(wsi, 0))
+ lwsl_debug("Attached ah immediately\n");
+ else
+ lwsl_info("%s: waiting for ah\n", __func__);
+
+ return 1;
+ }
+
+ lws_role_transition(wsi, LWSIFR_SERVER, (type & LWS_ADOPT_ALLOW_SSL) ?
+ LRS_SSL_INIT : LRS_HEADERS, &role_ops_h1);
+
+ if (!vh_prot_name)
+ wsi->protocol = &wsi->vhost->protocols[
+ wsi->vhost->default_protocol_index];
+
+ /* the transport is accepted... give him time to negotiate */
+ lws_set_timeout(wsi, PENDING_TIMEOUT_ESTABLISH_WITH_SERVER,
+ wsi->context->timeout_secs);
+
+ return 1; /* bound */
+}
+
+#endif
+
+#if !defined(LWS_NO_CLIENT)
+
+static const char * const http_methods[] = {
+ "GET", "POST", "OPTIONS", "PUT", "PATCH", "DELETE", "CONNECT"
+};
+
+static int
+rops_client_bind_h1(struct lws *wsi, const struct lws_client_connect_info *i)
+{
+ int n;
+
+ if (!i) {
+ /* we are finalizing an already-selected role */
+
+ /*
+ * If we stay in http, assuming there wasn't already-set
+ * external user_space, since we know our initial protocol
+ * we can assign the user space now, otherwise do it after the
+ * ws subprotocol negotiated
+ */
+ if (!wsi->user_space && wsi->stash->method)
+ if (lws_ensure_user_space(wsi))
+ return 1;
+
+ /*
+ * For ws, default to http/1.1 only. If i->alpn had been set
+ * though, defer to whatever he has set in there (eg, "h2").
+ *
+ * The problem is he has to commit to h2 before he can find
+ * out if the server has the SETTINGS for ws-over-h2 enabled;
+ * if not then ws is not possible on that connection. So we
+ * only try h2 if he assertively said to use h2 alpn, otherwise
+ * ws implies alpn restriction to h1.
+ */
+ if (!wsi->stash->method && !wsi->stash->alpn) {
+ wsi->stash->alpn = lws_strdup("http/1.1");
+ if (!wsi->stash->alpn)
+ return 1;
+ }
+
+ /* if we went on the ah waiting list, it's ok, we can wait.
+ *
+ * When we do get the ah, now or later, he will end up at
+ * lws_http_client_connect_via_info2().
+ */
+ if (lws_header_table_attach(wsi, 0) < 0)
+ /*
+ * if we failed here, the connection is already closed
+ * and freed.
+ */
+ return -1;
+
+ return 0;
+ }
+
+ /*
+ * Clients that want to be h1, h2, or ws all start out as h1
+ * (we don't yet know if the server supports h2 or ws)
+ */
+
+ if (!i->method) { /* websockets */
+#if defined(LWS_ROLE_WS)
+ if (lws_create_client_ws_object(i, wsi))
+ goto fail_wsi;
+#else
+ lwsl_err("%s: ws role not configured\n", __func__);
+
+ goto fail_wsi;
+#endif
+ goto bind_h1;
+ }
+
+ /* if a recognized http method, bind to it */
+
+ for (n = 0; n < (int)LWS_ARRAY_SIZE(http_methods); n++)
+ if (!strcmp(i->method, http_methods[n]))
+ goto bind_h1;
+
+ /* other roles may bind to it */
+
+ return 0; /* no match */
+
+bind_h1:
+ /* assert the mode and union status (hdr) clearly */
+ lws_role_transition(wsi, LWSIFR_CLIENT, LRS_UNCONNECTED, &role_ops_h1);
+
+ return 1; /* matched */
+
+fail_wsi:
+ return -1;
+}
+#endif
+
+#if 0
+static int
+rops_perform_user_POLLOUT_h1(struct lws *wsi)
+{
+ volatile struct lws *vwsi = (volatile struct lws *)wsi;
+ int n;
+
+ /* priority 1: post compression-transform buffered output */
+
+ if (lws_has_buffered_out(wsi)) {
+ lwsl_debug("%s: completing partial\n", __func__);
+ if (lws_issue_raw(wsi, NULL, 0) < 0) {
+ lwsl_info("%s signalling to close\n", __func__);
+ return -1;
+ }
+ n = 0;
+ vwsi->leave_pollout_active = 1;
+ goto cleanup;
+ }
+
+ /* priority 2: pre compression-transform buffered output */
+
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more) {
+ enum lws_write_protocol wp = LWS_WRITE_HTTP;
+
+ lwsl_info("%s: completing comp partial"
+ "(buflist_comp %p, may %d)\n",
+ __func__, wsi->http.comp_ctx.buflist_comp,
+ wsi->http.comp_ctx.may_have_more);
+
+ if (rops_write_role_protocol_h1(wsi, NULL, 0, &wp) < 0) {
+ lwsl_info("%s signalling to close\n", __func__);
+ lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS,
+ "comp write fail");
+ }
+ n = 0;
+ vwsi->leave_pollout_active = 1;
+ goto cleanup;
+ }
+#endif
+
+ /* priority 3: if no buffered out and waiting for that... */
+
+ if (lwsi_state(wsi) == LRS_FLUSHING_BEFORE_CLOSE) {
+ wsi->socket_is_permanently_unusable = 1;
+ return -1;
+ }
+
+ /* priority 4: user writeable callback */
+
+ vwsi = (volatile struct lws *)wsi;
+ vwsi->leave_pollout_active = 0;
+
+ n = lws_callback_as_writeable(wsi);
+
+cleanup:
+ vwsi->handling_pollout = 0;
+
+ if (vwsi->leave_pollout_active)
+ lws_change_pollfd(wsi, 0, LWS_POLLOUT);
+
+ return n;
+}
+#endif
+
+static int
+rops_close_kill_connection_h1(struct lws *wsi, enum lws_close_status reason)
+{
+#if defined(LWS_WITH_HTTP_PROXY)
+ struct lws *wsi_eff = lws_client_wsi_effective(wsi);
+
+ if (!wsi_eff->http.proxy_clientside)
+ return 0;
+
+ wsi_eff->http.proxy_clientside = 0;
+
+ if (user_callback_handle_rxflow(wsi_eff->protocol->callback, wsi_eff,
+ LWS_CALLBACK_COMPLETED_CLIENT_HTTP,
+ wsi_eff->user_space, NULL, 0))
+ return 0;
+#endif
+ return 0;
+}
+
+
struct lws_role_ops role_ops_h1 = {
/* role name */ "h1",
/* alpn id */ "http/1.1",
@@ -691,11 +1016,25 @@ struct lws_role_ops role_ops_h1 = {
/* alpn_negotiated */ rops_alpn_negotiated_h1,
/* close_via_role_protocol */ NULL,
/* close_role */ NULL,
- /* close_kill_connection */ NULL,
+ /* close_kill_connection */ rops_close_kill_connection_h1,
/* destroy_role */ rops_destroy_role_h1,
+#if !defined(LWS_NO_SERVER)
+ /* adoption_bind */ rops_adoption_bind_h1,
+#else
+ NULL,
+#endif
+#if !defined(LWS_NO_CLIENT)
+ /* client_bind */ rops_client_bind_h1,
+#else
+ NULL,
+#endif
/* writeable cb clnt, srv */ { LWS_CALLBACK_CLIENT_HTTP_WRITEABLE,
LWS_CALLBACK_HTTP_WRITEABLE },
/* close cb clnt, srv */ { LWS_CALLBACK_CLOSED_CLIENT_HTTP,
LWS_CALLBACK_CLOSED_HTTP },
+ /* protocol_bind cb c, srv */ { LWS_CALLBACK_CLIENT_HTTP_BIND_PROTOCOL,
+ LWS_CALLBACK_HTTP_BIND_PROTOCOL },
+ /* protocol_unbind cb c, srv */ { LWS_CALLBACK_CLIENT_HTTP_DROP_PROTOCOL,
+ LWS_CALLBACK_HTTP_DROP_PROTOCOL },
/* file_handle */ 0,
};
diff --git a/thirdparty/libwebsockets/roles/h1/private.h b/thirdparty/libwebsockets/lib/roles/h1/private.h
index 3f53954d33..3f53954d33 100644
--- a/thirdparty/libwebsockets/roles/h1/private.h
+++ b/thirdparty/libwebsockets/lib/roles/h1/private.h
diff --git a/thirdparty/libwebsockets/roles/http/client/client-handshake.c b/thirdparty/libwebsockets/lib/roles/http/client/client-handshake.c
index 0095c79a69..6b4e98f346 100644
--- a/thirdparty/libwebsockets/roles/http/client/client-handshake.c
+++ b/thirdparty/libwebsockets/lib/roles/http/client/client-handshake.c
@@ -37,9 +37,14 @@ lws_client_connect_2(struct lws *wsi)
ssize_t plen = 0;
#endif
struct addrinfo *result;
+#if defined(LWS_WITH_UNIX_SOCK)
+ struct sockaddr_un sau;
+ char unix_skt = 0;
+#endif
const char *ads;
sockaddr46 sa46;
- int n, port;
+ const struct sockaddr *psa;
+ int n, port = 0;
const char *cce = "", *iface;
const char *meth = NULL;
#ifdef LWS_WITH_IPV6
@@ -126,7 +131,7 @@ lws_client_connect_2(struct lws *wsi)
}
#endif
- lwsl_info("applying %p to txn queue on %p (wsistate 0x%x)\n",
+ lwsl_info("applying %p to txn queue on %p state 0x%x\n",
wsi, w, w->wsistate);
/*
* ...let's add ourselves to his transaction queue...
@@ -177,12 +182,36 @@ create_new_conn:
lws_dll_is_null(&wsi->dll_client_transaction_queue) &&
lws_dll_is_null(&wsi->dll_active_client_conns)) {
lws_vhost_lock(wsi->vhost);
+ /* caution... we will have to unpick this on oom4 path */
lws_dll_lws_add_front(&wsi->dll_active_client_conns,
&wsi->vhost->dll_active_client_conns);
lws_vhost_unlock(wsi->vhost);
}
/*
+ * unix socket destination?
+ */
+
+ ads = lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_PEER_ADDRESS);
+#if defined(LWS_WITH_UNIX_SOCK)
+ if (*ads == '+') {
+ ads++;
+ memset(&sau, 0, sizeof(sau));
+ sau.sun_family = AF_UNIX;
+ strncpy(sau.sun_path, ads, sizeof(sau.sun_path));
+ sau.sun_path[sizeof(sau.sun_path) - 1] = '\0';
+
+ lwsl_info("%s: Unix skt: %s\n", __func__, ads);
+
+ if (sau.sun_path[0] == '@')
+ sau.sun_path[0] = '\0';
+
+ unix_skt = 1;
+ goto ads_known;
+ }
+#endif
+
+ /*
* start off allowing ipv6 on connection if vhost allows it
*/
wsi->ipv6 = LWS_IPV6_ENABLED(wsi->vhost);
@@ -241,10 +270,9 @@ create_new_conn:
#ifdef LWS_WITH_IPV6
if (wsi->ipv6) {
- struct sockaddr_in6 *sa6 =
- ((struct sockaddr_in6 *)result->ai_addr);
+ struct sockaddr_in6 *sa6;
- if (n) {
+ if (n || !result) {
/* lws_getaddrinfo46 failed, there is no usable result */
lwsl_notice("%s: lws_getaddrinfo46 failed %d\n",
__func__, n);
@@ -252,6 +280,8 @@ create_new_conn:
goto oom4;
}
+ sa6 = ((struct sockaddr_in6 *)result->ai_addr);
+
memset(&sa46, 0, sizeof(sa46));
sa46.sa6.sin6_family = AF_INET6;
@@ -307,7 +337,7 @@ create_new_conn:
} else if (n == EAI_SYSTEM) {
struct hostent *host;
- lwsl_info("getaddrinfo (ipv4) failed, trying gethostbyname\n");
+ lwsl_info("ipv4 getaddrinfo err, try gethostbyname\n");
host = gethostbyname(ads);
if (host) {
p = host->h_addr;
@@ -318,7 +348,7 @@ create_new_conn:
}
#endif
} else {
- lwsl_err("getaddrinfo failed\n");
+ lwsl_err("getaddrinfo failed: %d\n", n);
cce = "getaddrinfo failed";
goto oom4;
}
@@ -339,6 +369,10 @@ create_new_conn:
if (result)
freeaddrinfo(result);
+#if defined(LWS_WITH_UNIX_SOCK)
+ads_known:
+#endif
+
/* now we decided on ipv4 or ipv6, set the port */
if (!lws_socket_is_valid(wsi->desc.sockfd)) {
@@ -349,12 +383,21 @@ create_new_conn:
goto oom4;
}
+#if defined(LWS_WITH_UNIX_SOCK)
+ if (unix_skt) {
+ wsi->unix_skt = 1;
+ wsi->desc.sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
+ } else
+#endif
+ {
+
#ifdef LWS_WITH_IPV6
if (wsi->ipv6)
wsi->desc.sockfd = socket(AF_INET6, SOCK_STREAM, 0);
else
#endif
wsi->desc.sockfd = socket(AF_INET, SOCK_STREAM, 0);
+ }
if (!lws_socket_is_valid(wsi->desc.sockfd)) {
lwsl_warn("Unable to open socket\n");
@@ -362,7 +405,12 @@ create_new_conn:
goto oom4;
}
- if (lws_plat_set_socket_options(wsi->vhost, wsi->desc.sockfd)) {
+ if (lws_plat_set_socket_options(wsi->vhost, wsi->desc.sockfd,
+#if defined(LWS_WITH_UNIX_SOCK)
+ unix_skt)) {
+#else
+ 0)) {
+#endif
lwsl_err("Failed to set wsi socket options\n");
compatible_close(wsi->desc.sockfd);
cce = "set socket opts failed";
@@ -372,7 +420,11 @@ create_new_conn:
lwsi_set_state(wsi, LRS_WAITING_CONNECT);
if (wsi->context->event_loop_ops->accept)
- wsi->context->event_loop_ops->accept(wsi);
+ if (wsi->context->event_loop_ops->accept(wsi)) {
+ compatible_close(wsi->desc.sockfd);
+ cce = "event loop accept failed";
+ goto oom4;
+ }
if (__insert_wsi_socket_into_fds(wsi->context, wsi)) {
compatible_close(wsi->desc.sockfd);
@@ -399,7 +451,8 @@ create_new_conn:
iface = lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_IFACE);
if (iface) {
- n = lws_socket_bind(wsi->vhost, wsi->desc.sockfd, 0, iface);
+ n = lws_socket_bind(wsi->vhost, wsi->desc.sockfd, 0,
+ iface);
if (n < 0) {
cce = "unable to bind socket";
goto failed;
@@ -407,18 +460,29 @@ create_new_conn:
}
}
-#ifdef LWS_WITH_IPV6
- if (wsi->ipv6) {
- sa46.sa6.sin6_port = htons(port);
- n = sizeof(struct sockaddr_in6);
+#if defined(LWS_WITH_UNIX_SOCK)
+ if (unix_skt) {
+ psa = (const struct sockaddr *)&sau;
+ n = sizeof(sau);
} else
#endif
+
{
- sa46.sa4.sin_port = htons(port);
- n = sizeof(struct sockaddr);
+#ifdef LWS_WITH_IPV6
+ if (wsi->ipv6) {
+ sa46.sa6.sin6_port = htons(port);
+ n = sizeof(struct sockaddr_in6);
+ psa = (const struct sockaddr *)&sa46;
+ } else
+#endif
+ {
+ sa46.sa4.sin_port = htons(port);
+ n = sizeof(struct sockaddr);
+ psa = (const struct sockaddr *)&sa46;
+ }
}
- if (connect(wsi->desc.sockfd, (const struct sockaddr *)&sa46, n) == -1 ||
+ if (connect(wsi->desc.sockfd, (const struct sockaddr *)psa, n) == -1 ||
LWS_ERRNO == LWS_EISCONN) {
if (LWS_ERRNO == LWS_EALREADY ||
LWS_ERRNO == LWS_EINPROGRESS ||
@@ -500,7 +564,8 @@ create_new_conn:
goto failed;
}
- lws_set_timeout(wsi, PENDING_TIMEOUT_AWAITING_SOCKS_GREETING_REPLY,
+ lws_set_timeout(wsi,
+ PENDING_TIMEOUT_AWAITING_SOCKS_GREETING_REPLY,
AWAITING_TIMEOUT);
lwsi_set_state(wsi, LRS_WAITING_SOCKS_GREETING_REPLY);
@@ -531,7 +596,7 @@ send_hs:
* wait in the queue until it's possible to send them.
*/
lws_callback_on_writable(wsi_piggyback);
- lwsl_info("%s: wsi %p: waiting to send headers (parent state %x)\n",
+ lwsl_info("%s: wsi %p: waiting to send hdrs (par state 0x%x)\n",
__func__, wsi, lwsi_state(wsi_piggyback));
} else {
lwsl_info("%s: wsi %p: client creating own connection\n",
@@ -570,7 +635,7 @@ send_hs:
return wsi;
oom4:
- if (lwsi_role_client(wsi) && lwsi_state_est(wsi)) {
+ if (lwsi_role_client(wsi) /* && lwsi_state_est(wsi) */) {
wsi->protocol->callback(wsi,
LWS_CALLBACK_CLIENT_CONNECTION_ERROR,
wsi->user_space, (void *)cce, strlen(cce));
@@ -579,13 +644,21 @@ oom4:
/* take care that we might be inserted in fds already */
if (wsi->position_in_fds_table != LWS_NO_FDS_POS)
goto failed1;
- lws_remove_from_timeout_list(wsi);
-#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
- lws_header_table_detach(wsi, 0);
-#endif
- lws_client_stash_destroy(wsi);
- lws_free_set_NULL(wsi->client_hostname_copy);
- lws_free(wsi);
+
+ /*
+ * We can't be an active client connection any more, if we thought
+ * that was what we were going to be doing. It should be if we are
+ * failing by oom4 path, we are still called by
+ * lws_client_connect_via_info() and will be returning NULL to that,
+ * so nobody else should have had a chance to queue on us.
+ */
+ {
+ struct lws_vhost *vhost = wsi->vhost;
+
+ lws_vhost_lock(vhost);
+ __lws_free_wsi(wsi);
+ lws_vhost_unlock(vhost);
+ }
return NULL;
@@ -603,7 +676,8 @@ failed1:
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
/**
- * lws_client_reset() - retarget a connected wsi to start over with a new connection (ie, redirect)
+ * lws_client_reset() - retarget a connected wsi to start over with a new
+ * connection (ie, redirect)
* this only works if still in HTTP, ie, not upgraded yet
* wsi: connection to reset
* address: network address of the new server
@@ -716,7 +790,7 @@ lws_client_reset(struct lws **pwsi, int ssl, const char *address, int port,
return *pwsi;
}
-#ifdef LWS_WITH_HTTP_PROXY
+#if defined(LWS_WITH_HTTP_PROXY) && defined(LWS_WITH_HUBBUB)
hubbub_error
html_parser_cb(const hubbub_token *token, void *pw)
{
@@ -846,252 +920,8 @@ html_parser_cb(const hubbub_token *token, void *pw)
#endif
-char *
-lws_strdup(const char *s)
-{
- char *d = lws_malloc(strlen(s) + 1, "strdup");
-
- if (d)
- strcpy(d, s);
-
- return d;
-}
-
-void
-lws_client_stash_destroy(struct lws *wsi)
-{
- if (!wsi || !wsi->stash)
- return;
-
- lws_free_set_NULL(wsi->stash->address);
- lws_free_set_NULL(wsi->stash->path);
- lws_free_set_NULL(wsi->stash->host);
- lws_free_set_NULL(wsi->stash->origin);
- lws_free_set_NULL(wsi->stash->protocol);
- lws_free_set_NULL(wsi->stash->method);
- lws_free_set_NULL(wsi->stash->iface);
- lws_free_set_NULL(wsi->stash->alpn);
-
- lws_free_set_NULL(wsi->stash);
-}
-
-LWS_VISIBLE struct lws *
-lws_client_connect_via_info(struct lws_client_connect_info *i)
-{
- struct lws *wsi;
- const struct lws_protocols *p;
- const char *local = i->protocol;
-
- if (i->context->requested_kill)
- return NULL;
-
- if (!i->context->protocol_init_done)
- lws_protocol_init(i->context);
- /*
- * If we have .local_protocol_name, use it to select the
- * local protocol handler to bind to. Otherwise use .protocol if
- * http[s].
- */
- if (i->local_protocol_name)
- local = i->local_protocol_name;
-
- wsi = lws_zalloc(sizeof(struct lws), "client wsi");
- if (wsi == NULL)
- goto bail;
-
- wsi->context = i->context;
-#if defined(LWS_ROLE_H1)
- /* assert the mode and union status (hdr) clearly */
- lws_role_transition(wsi, LWSIFR_CLIENT, LRS_UNCONNECTED, &role_ops_h1);
-#else
- lws_role_transition(wsi, LWSIFR_CLIENT, LRS_UNCONNECTED, &role_ops_raw_skt);
-#endif
- wsi->desc.sockfd = LWS_SOCK_INVALID;
-
- /* 1) fill up the wsi with stuff from the connect_info as far as it
- * can go. It's because not only is our connection async, we might
- * not even be able to get ahold of an ah at this point.
- */
-
- if (!i->method) /* ie, ws */
-#if defined(LWS_ROLE_WS)
- if (lws_create_client_ws_object(i, wsi))
- return NULL;
-#else
- return NULL;
-#endif
-
- wsi->user_space = NULL;
- wsi->pending_timeout = NO_PENDING_TIMEOUT;
- wsi->position_in_fds_table = LWS_NO_FDS_POS;
- wsi->c_port = i->port;
- wsi->vhost = i->vhost;
- if (!wsi->vhost)
- wsi->vhost = i->context->vhost_list;
-
- if (!wsi->vhost) {
- lwsl_err("At least one vhost in the context is required\n");
-
- goto bail;
- }
-
- wsi->protocol = &wsi->vhost->protocols[0];
- wsi->client_pipeline = !!(i->ssl_connection & LCCSCF_PIPELINE);
-
- /* reasonable place to start */
- lws_role_transition(wsi, LWSIFR_CLIENT, LRS_UNCONNECTED,
-#if defined(LWS_ROLE_H1)
- &role_ops_h1);
-#else
- &role_ops_raw_skt);
-#endif
-
- /*
- * 1) for http[s] connection, allow protocol selection by name
- * 2) for ws[s], if local_protocol_name given also use it for
- * local protocol binding... this defeats the server
- * protocol negotiation if so
- *
- * Otherwise leave at protocols[0]... the server will tell us
- * which protocol we are associated with since we can give it a
- * list.
- */
- if (/*(i->method || i->local_protocol_name) && */local) {
- lwsl_info("binding to %s\n", local);
- p = lws_vhost_name_to_protocol(wsi->vhost, local);
- if (p)
- wsi->protocol = p;
- }
-
- if (wsi && !wsi->user_space && i->userdata) {
- wsi->user_space_externally_allocated = 1;
- wsi->user_space = i->userdata;
- } else
- /* if we stay in http, we can assign the user space now,
- * otherwise do it after the protocol negotiated
- */
- if (i->method)
- if (lws_ensure_user_space(wsi))
- goto bail;
-
-#if defined(LWS_WITH_TLS)
- wsi->tls.use_ssl = i->ssl_connection;
-#else
- if (i->ssl_connection & LCCSCF_USE_SSL) {
- lwsl_err("libwebsockets not configured for ssl\n");
- goto bail;
- }
-#endif
-
- /* 2) stash the things from connect_info that we can't process without
- * an ah. Because if no ah, we will go on the ah waiting list and
- * process those things later (after the connect_info and maybe the
- * things pointed to have gone out of scope.
- */
-
- wsi->stash = lws_zalloc(sizeof(*wsi->stash), "client stash");
- if (!wsi->stash) {
- lwsl_err("%s: OOM\n", __func__);
- goto bail1;
- }
-
- wsi->stash->address = lws_strdup(i->address);
- wsi->stash->path = lws_strdup(i->path);
- wsi->stash->host = lws_strdup(i->host);
-
- if (!wsi->stash->address || !wsi->stash->path || !wsi->stash->host)
- goto bail1;
-
- if (i->origin) {
- wsi->stash->origin = lws_strdup(i->origin);
- if (!wsi->stash->origin)
- goto bail1;
- }
- if (i->protocol) {
- wsi->stash->protocol = lws_strdup(i->protocol);
- if (!wsi->stash->protocol)
- goto bail1;
- }
- if (i->method) {
- wsi->stash->method = lws_strdup(i->method);
- if (!wsi->stash->method)
- goto bail1;
- }
- if (i->iface) {
- wsi->stash->iface = lws_strdup(i->iface);
- if (!wsi->stash->iface)
- goto bail1;
- }
- /*
- * For ws, default to http/1.1 only. If i->alpn is set, defer to
- * whatever he has set in there (eg, "h2").
- *
- * The problem is he has to commit to h2 before he can find out if the
- * server has the SETTINGS for ws-over-h2 enabled; if not then ws is
- * not possible on that connection. So we only try it if he
- * assertively said to use h2 alpn.
- */
- if (!i->method && !i->alpn) {
- wsi->stash->alpn = lws_strdup("http/1.1");
- if (!wsi->stash->alpn)
- goto bail1;
- } else
- if (i->alpn) {
- wsi->stash->alpn = lws_strdup(i->alpn);
- if (!wsi->stash->alpn)
- goto bail1;
- }
-
- if (i->pwsi)
- *i->pwsi = wsi;
-
-#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
- /* if we went on the waiting list, no probs just return the wsi
- * when we get the ah, now or later, he will call
- * lws_client_connect_via_info2() below.
- */
- if (lws_header_table_attach(wsi, 0) < 0) {
- /*
- * if we failed here, the connection is already closed
- * and freed.
- */
- goto bail2;
- }
-
-#endif
-
- if (i->parent_wsi) {
- lwsl_info("%s: created child %p of parent %p\n", __func__,
- wsi, i->parent_wsi);
- wsi->parent = i->parent_wsi;
- wsi->sibling_list = i->parent_wsi->child_list;
- i->parent_wsi->child_list = wsi;
- }
-#ifdef LWS_WITH_HTTP_PROXY
- if (i->uri_replace_to)
- wsi->http.rw = lws_rewrite_create(wsi, html_parser_cb,
- i->uri_replace_from,
- i->uri_replace_to);
-#endif
-
- return wsi;
-
-bail1:
- lws_client_stash_destroy(wsi);
-
-bail:
- lws_free(wsi);
-#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
-bail2:
-#endif
- if (i->pwsi)
- *i->pwsi = NULL;
-
- return NULL;
-}
-
struct lws *
-lws_client_connect_via_info2(struct lws *wsi)
+lws_http_client_connect_via_info2(struct lws *wsi)
{
struct client_info_stash *stash = wsi->stash;
@@ -1156,55 +986,6 @@ bail1:
return NULL;
}
-LWS_VISIBLE struct lws *
-lws_client_connect_extended(struct lws_context *context, const char *address,
- int port, int ssl_connection, const char *path,
- const char *host, const char *origin,
- const char *protocol, int ietf_version_or_minus_one,
- void *userdata)
-{
- struct lws_client_connect_info i;
-
- memset(&i, 0, sizeof(i));
-
- i.context = context;
- i.address = address;
- i.port = port;
- i.ssl_connection = ssl_connection;
- i.path = path;
- i.host = host;
- i.origin = origin;
- i.protocol = protocol;
- i.ietf_version_or_minus_one = ietf_version_or_minus_one;
- i.userdata = userdata;
-
- return lws_client_connect_via_info(&i);
-}
-
-LWS_VISIBLE struct lws *
-lws_client_connect(struct lws_context *context, const char *address,
- int port, int ssl_connection, const char *path,
- const char *host, const char *origin,
- const char *protocol, int ietf_version_or_minus_one)
-{
- struct lws_client_connect_info i;
-
- memset(&i, 0, sizeof(i));
-
- i.context = context;
- i.address = address;
- i.port = port;
- i.ssl_connection = ssl_connection;
- i.path = path;
- i.host = host;
- i.origin = origin;
- i.protocol = protocol;
- i.ietf_version_or_minus_one = ietf_version_or_minus_one;
- i.userdata = NULL;
-
- return lws_client_connect_via_info(&i);
-}
-
#if defined(LWS_WITH_SOCKS5)
void socks_generate_msg(struct lws *wsi, enum socks_msg_type type,
ssize_t *msg_len)
@@ -1242,8 +1023,9 @@ void socks_generate_msg(struct lws *wsi, enum socks_msg_type type,
/* length of the password */
pt->serv_buf[len++] = passwd_len;
/* password */
- lws_strncpy((char *)&pt->serv_buf[len], wsi->vhost->socks_password,
- context->pt_serv_buf_size - len + 1);
+ lws_strncpy((char *)&pt->serv_buf[len],
+ wsi->vhost->socks_password,
+ context->pt_serv_buf_size - len + 1);
len += passwd_len;
break;
diff --git a/thirdparty/libwebsockets/roles/http/client/client.c b/thirdparty/libwebsockets/lib/roles/http/client/client.c
index 5645fa2b7a..1d6f13dcf8 100644
--- a/thirdparty/libwebsockets/roles/http/client/client.c
+++ b/thirdparty/libwebsockets/lib/roles/http/client/client.c
@@ -1,7 +1,7 @@
/*
* libwebsockets - lib/client/client.c
*
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -48,7 +48,7 @@ lws_client_wsi_effective(struct lws *wsi)
} lws_end_foreach_dll_safe(d, d1);
return lws_container_of(tail, struct lws,
- dll_client_transaction_queue);
+ dll_client_transaction_queue);
}
/*
@@ -66,7 +66,7 @@ _lws_client_wsi_master(struct lws *wsi)
d = wsi->dll_client_transaction_queue.prev;
while (d) {
wsi_eff = lws_container_of(d, struct lws,
- dll_client_transaction_queue_head);
+ dll_client_transaction_queue_head);
d = d->prev;
}
@@ -111,11 +111,12 @@ lws_client_socket_service(struct lws *wsi, struct lws_pollfd *pollfd,
*/
lws_vhost_lock(wsi->vhost);
lws_start_foreach_dll_safe(struct lws_dll_lws *, d, d1,
- wsi->dll_client_transaction_queue_head.next) {
+ wsi->dll_client_transaction_queue_head.next) {
struct lws *w = lws_container_of(d, struct lws,
dll_client_transaction_queue);
- lwsl_debug("%s: %p states 0x%x\n", __func__, w, w->wsistate);
+ lwsl_debug("%s: %p states 0x%x\n", __func__, w,
+ w->wsistate);
if (lwsi_state(w) == LRS_H1C_ISSUE_HANDSHAKE2)
wfound = w;
} lws_end_foreach_dll_safe(d, d1);
@@ -208,7 +209,8 @@ lws_client_socket_service(struct lws *wsi, struct lws_pollfd *pollfd,
case LRS_WAITING_SOCKS_AUTH_REPLY:
if (pt->serv_buf[0] != SOCKS_SUBNEGOTIATION_VERSION_1 ||
- pt->serv_buf[1] != SOCKS_SUBNEGOTIATION_STATUS_SUCCESS)
+ pt->serv_buf[1] !=
+ SOCKS_SUBNEGOTIATION_STATUS_SUCCESS)
goto socks_reply_fail;
lwsl_client("SOCKS password OK, sending connect\n");
@@ -243,8 +245,8 @@ socks_reply_fail:
/* free stash since we are done with it */
lws_client_stash_destroy(wsi);
if (lws_hdr_simple_create(wsi,
- _WSI_TOKEN_CLIENT_PEER_ADDRESS,
- wsi->vhost->socks_proxy_address))
+ _WSI_TOKEN_CLIENT_PEER_ADDRESS,
+ wsi->vhost->socks_proxy_address))
goto bail3;
wsi->c_port = wsi->vhost->socks_proxy_port;
@@ -352,7 +354,9 @@ start_ws_handshake:
* So this is it, we are an h2 master client connection
* now, not an h1 client connection.
*/
+#if defined (LWS_WITH_TLS)
lws_tls_server_conn_alpn(wsi);
+#endif
/* send the H2 preface to legitimize the connection */
if (lws_h2_issue_preface(wsi)) {
@@ -377,7 +381,8 @@ start_ws_handshake:
return 0;
lwsl_err("Failed to generate handshake for client\n");
- lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS, "chs");
+ lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS,
+ "chs");
return 0;
}
@@ -385,8 +390,9 @@ start_ws_handshake:
lws_latency_pre(context, wsi);
w = _lws_client_wsi_master(wsi);
- lwsl_info("%s: HANDSHAKE2: %p: sending headers on %p (wsistate 0x%x 0x%x)\n",
- __func__, wsi, w, wsi->wsistate, w->wsistate);
+ lwsl_info("%s: HANDSHAKE2: %p: sending headers on %p "
+ "(wsistate 0x%x 0x%x)\n", __func__, wsi, w,
+ wsi->wsistate, w->wsistate);
n = lws_ssl_capable_write(w, (unsigned char *)sb, (int)(p - sb));
lws_latency(context, wsi, "send lws_issue_raw", n,
@@ -394,7 +400,8 @@ start_ws_handshake:
switch (n) {
case LWS_SSL_CAPABLE_ERROR:
lwsl_debug("ERROR writing to client socket\n");
- lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS, "cws");
+ lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS,
+ "cws");
return 0;
case LWS_SSL_CAPABLE_MORE_SERVICE:
lws_callback_on_writable(wsi);
@@ -419,7 +426,7 @@ start_ws_handshake:
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
w->http.ah->parser_state = WSI_TOKEN_NAME_PART;
w->http.ah->lextable_pos = 0;
- /* If we're (re)starting on headers, need other implied init */
+ /* If we're (re)starting on hdr, need other implied init */
wsi->http.ah->ues = URIES_IDLE;
#endif
}
@@ -549,11 +556,12 @@ lws_http_transaction_completed_client(struct lws *wsi)
{
struct lws *wsi_eff = lws_client_wsi_effective(wsi);
- lwsl_info("%s: wsi: %p, wsi_eff: %p\n", __func__, wsi, wsi_eff);
+ lwsl_info("%s: wsi: %p, wsi_eff: %p (%s)\n", __func__, wsi, wsi_eff,
+ wsi_eff->protocol->name);
- if (user_callback_handle_rxflow(wsi_eff->protocol->callback,
- wsi_eff, LWS_CALLBACK_COMPLETED_CLIENT_HTTP,
- wsi_eff->user_space, NULL, 0)) {
+ if (user_callback_handle_rxflow(wsi_eff->protocol->callback, wsi_eff,
+ LWS_CALLBACK_COMPLETED_CLIENT_HTTP,
+ wsi_eff->user_space, NULL, 0)) {
lwsl_debug("%s: Completed call returned nonzero (role 0x%x)\n",
__func__, lwsi_role(wsi_eff));
return -1;
@@ -626,7 +634,8 @@ lws_http_transaction_completed_client(struct lws *wsi)
/* If we're (re)starting on headers, need other implied init */
wsi->http.ah->ues = URIES_IDLE;
- lwsl_info("%s: %p: new queued transaction as %p\n", __func__, wsi, wsi_eff);
+ lwsl_info("%s: %p: new queued transaction as %p\n", __func__, wsi,
+ wsi_eff);
lws_callback_on_writable(wsi);
return 0;
@@ -672,7 +681,7 @@ lws_client_interpret_server_handshake(struct lws *wsi)
int n, port = 0, ssl = 0;
int close_reason = LWS_CLOSE_STATUS_PROTOCOL_ERR;
const char *prot, *ads = NULL, *path, *cce = NULL;
- struct allocated_headers *ah = NULL;
+ struct allocated_headers *ah;
struct lws *w = lws_client_wsi_effective(wsi);
char *p, *q;
char new_path[300];
@@ -685,7 +694,8 @@ lws_client_interpret_server_handshake(struct lws *wsi)
*/
#if defined(LWS_ROLE_H2)
if (wsi->client_h2_alpn || wsi->client_h2_substream) {
- lwsl_debug("%s: %p: transitioning to h2 client\n", __func__, wsi);
+ lwsl_debug("%s: %p: transitioning to h2 client\n",
+ __func__, wsi);
lws_role_transition(wsi, LWSIFR_CLIENT,
LRS_ESTABLISHED, &role_ops_h2);
} else
@@ -693,7 +703,8 @@ lws_client_interpret_server_handshake(struct lws *wsi)
{
#if defined(LWS_ROLE_H1)
{
- lwsl_debug("%s: %p: transitioning to h1 client\n", __func__, wsi);
+ lwsl_debug("%s: %p: transitioning to h1 client\n",
+ __func__, wsi);
lws_role_transition(wsi, LWSIFR_CLIENT,
LRS_ESTABLISHED, &role_ops_h1);
}
@@ -719,7 +730,7 @@ lws_client_interpret_server_handshake(struct lws *wsi)
* set-cookie:.test=LWS_1456736240_336776_COOKIE;Max-Age=360000
*/
- wsi->http.connection_type = HTTP_CONNECTION_KEEP_ALIVE;
+ wsi->http.conn_type = HTTP_CONNECTION_KEEP_ALIVE;
if (!wsi->client_h2_substream) {
p = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HTTP);
if (wsi->do_ws && !p) {
@@ -729,7 +740,7 @@ lws_client_interpret_server_handshake(struct lws *wsi)
}
if (!p) {
p = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HTTP1_0);
- wsi->http.connection_type = HTTP_CONNECTION_CLOSE;
+ wsi->http.conn_type = HTTP_CONNECTION_CLOSE;
}
if (!p) {
cce = "HS: URI missing";
@@ -826,8 +837,9 @@ lws_client_interpret_server_handshake(struct lws *wsi)
/* if h1 KA is allowed, enable the queued pipeline guys */
- if (!wsi->client_h2_alpn && !wsi->client_h2_substream && w == wsi) { /* ie, coming to this for the first time */
- if (wsi->http.connection_type == HTTP_CONNECTION_KEEP_ALIVE)
+ if (!wsi->client_h2_alpn && !wsi->client_h2_substream &&
+ w == wsi) { /* ie, coming to this for the first time */
+ if (wsi->http.conn_type == HTTP_CONNECTION_KEEP_ALIVE)
wsi->keepalive_active = 1;
else {
/*
@@ -847,13 +859,16 @@ lws_client_interpret_server_handshake(struct lws *wsi)
wsi->keepalive_rejected = 1;
lws_vhost_lock(wsi->vhost);
- lws_start_foreach_dll_safe(struct lws_dll_lws *, d, d1,
- wsi->dll_client_transaction_queue_head.next) {
- struct lws *ww = lws_container_of(d, struct lws,
- dll_client_transaction_queue);
+ lws_start_foreach_dll_safe(struct lws_dll_lws *,
+ d, d1,
+ wsi->dll_client_transaction_queue_head.next) {
+ struct lws *ww = lws_container_of(d,
+ struct lws,
+ dll_client_transaction_queue);
/* remove him from our queue */
- lws_dll_lws_remove(&ww->dll_client_transaction_queue);
+ lws_dll_lws_remove(
+ &ww->dll_client_transaction_queue);
/* give up on pipelining */
ww->client_pipeline = 0;
@@ -881,7 +896,7 @@ lws_client_interpret_server_handshake(struct lws *wsi)
if (!strncmp(lws_hdr_simple_ptr(wsi,
WSI_TOKEN_HTTP_CONTENT_TYPE),
"text/html", 9))
- wsi->http.perform_rewrite = 1;
+ wsi->http.perform_rewrite = 0;
}
#endif
@@ -915,8 +930,7 @@ lws_client_interpret_server_handshake(struct lws *wsi)
wsi->http.rx_content_length;
} else /* can't do 1.1 without a content length or chunked */
if (!wsi->chunked)
- wsi->http.connection_type =
- HTTP_CONNECTION_CLOSE;
+ wsi->http.conn_type = HTTP_CONNECTION_CLOSE;
/*
* we seem to be good to go, give client last chance to check
@@ -954,6 +968,15 @@ lws_client_interpret_server_handshake(struct lws *wsi)
lwsl_info("%s: client connection up\n", __func__);
+ /*
+ * Did we get a response from the server with an explicit
+ * content-length of zero? If so, this transaction is already
+ * completed at the end of the header processing...
+ */
+ if (lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH) &&
+ !wsi->http.rx_content_length)
+ return !!lws_http_transaction_completed_client(wsi);
+
return 0;
}
@@ -983,7 +1006,9 @@ bail2:
}
wsi->already_did_cce = 1;
- lwsl_info("closing connection due to bail2 connection error\n");
+ lwsl_info("closing connection (prot %s) "
+ "due to bail2 connection error: %s\n", wsi->protocol ?
+ wsi->protocol->name : "unknown", cce);
/* closing will free up his parsing allocations */
lws_close_free_wsi(wsi, close_reason, "c hs interp");
@@ -1023,7 +1048,7 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
return NULL;
}
- lws_bind_protocol(wsi, pr);
+ lws_bind_protocol(wsi, pr, __func__);
}
if ((wsi->protocol->callback)(wsi, LWS_CALLBACK_RAW_ADOPT,
@@ -1070,16 +1095,22 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
_WSI_TOKEN_CLIENT_ORIGIN));
}
#if defined(LWS_ROLE_WS)
- if (wsi->do_ws)
- p = lws_generate_client_ws_handshake(wsi, p);
+ if (wsi->do_ws) {
+ const char *conn1 = "";
+ if (!wsi->client_pipeline)
+ conn1 = "close, ";
+ p = lws_generate_client_ws_handshake(wsi, p, conn1);
+ } else
#endif
+ if (!wsi->client_pipeline)
+ p += sprintf(p, "connection: close\x0d\x0a");
/* give userland a chance to append, eg, cookies */
if (wsi->protocol->callback(wsi,
- LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER,
- wsi->user_space, &p,
- (pkt + wsi->context->pt_serv_buf_size) - p - 12))
+ LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER,
+ wsi->user_space, &p,
+ (pkt + wsi->context->pt_serv_buf_size) - p - 12))
return NULL;
p += sprintf(p, "\x0d\x0a");
@@ -1103,14 +1134,11 @@ lws_http_client_read(struct lws *wsi, char **buf, int *len)
lws_change_pollfd(wsi, 0, LWS_POLLIN);
if (rlen == LWS_SSL_CAPABLE_ERROR) {
- lwsl_notice("%s: SSL capable error\n", __func__);
+ lwsl_debug("%s: SSL capable error\n", __func__);
return -1;
}
- if (rlen == 0)
- return -1;
-
- if (rlen < 0)
+ if (rlen <= 0)
return 0;
*len = rlen;
@@ -1130,7 +1158,7 @@ spin_chunks:
}
n = char_to_hex((*buf)[0]);
if (n < 0) {
- lwsl_debug("chunking failure\n");
+ lwsl_info("%s: chunking failure\n", __func__);
return -1;
}
wsi->chunk_remaining <<= 4;
@@ -1138,7 +1166,7 @@ spin_chunks:
break;
case ELCP_CR:
if ((*buf)[0] != '\x0a') {
- lwsl_debug("chunking failure\n");
+ lwsl_info("%s: chunking failure\n", __func__);
return -1;
}
wsi->chunk_parser = ELCP_CONTENT;
@@ -1153,7 +1181,7 @@ spin_chunks:
case ELCP_POST_CR:
if ((*buf)[0] != '\x0d') {
- lwsl_debug("chunking failure\n");
+ lwsl_info("%s: chunking failure\n", __func__);
return -1;
}
@@ -1162,8 +1190,11 @@ spin_chunks:
break;
case ELCP_POST_LF:
- if ((*buf)[0] != '\x0a')
+ if ((*buf)[0] != '\x0a') {
+ lwsl_info("%s: chunking failure\n", __func__);
+
return -1;
+ }
wsi->chunk_parser = ELCP_HEX;
wsi->chunk_remaining = 0;
@@ -1186,7 +1217,7 @@ spin_chunks:
wsi->chunk_remaining < n)
n = wsi->chunk_remaining;
-#ifdef LWS_WITH_HTTP_PROXY
+#if defined(LWS_WITH_HTTP_PROXY) && defined(LWS_WITH_HUBBUB)
/* hubbub */
if (wsi->http.perform_rewrite)
lws_rewrite_parse(wsi->http.rw, (unsigned char *)*buf, n);
@@ -1198,7 +1229,7 @@ spin_chunks:
if (user_callback_handle_rxflow(wsi_eff->protocol->callback,
wsi_eff, LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ,
wsi_eff->user_space, *buf, n)) {
- lwsl_debug("%s: RECEIVE_CLIENT_HTTP_READ returned -1\n",
+ lwsl_info("%s: RECEIVE_CLIENT_HTTP_READ returned -1\n",
__func__);
return -1;
diff --git a/thirdparty/libwebsockets/roles/http/header.c b/thirdparty/libwebsockets/lib/roles/http/header.c
index dbcf27cbd1..448c5a8b5c 100644
--- a/thirdparty/libwebsockets/roles/http/header.c
+++ b/thirdparty/libwebsockets/lib/roles/http/header.c
@@ -1,7 +1,7 @@
/*
* libwebsockets - small server side websockets and web server implementation
*
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -116,9 +116,10 @@ lws_add_http_header_by_token(struct lws *wsi, enum lws_token_indexes token,
return lws_add_http_header_by_name(wsi, name, value, length, p, end);
}
-int lws_add_http_header_content_length(struct lws *wsi,
- lws_filepos_t content_length,
- unsigned char **p, unsigned char *end)
+int
+lws_add_http_header_content_length(struct lws *wsi,
+ lws_filepos_t content_length,
+ unsigned char **p, unsigned char *end)
{
char b[24];
int n;
@@ -141,6 +142,10 @@ lws_add_http_common_headers(struct lws *wsi, unsigned int code,
const char *content_type, lws_filepos_t content_len,
unsigned char **p, unsigned char *end)
{
+ const char *ka[] = { "close", "keep-alive" };
+ int types[] = { HTTP_CONNECTION_CLOSE, HTTP_CONNECTION_KEEP_ALIVE },
+ t = 0;
+
if (lws_add_http_header_status(wsi, code, p, end))
return 1;
@@ -149,22 +154,67 @@ lws_add_http_common_headers(struct lws *wsi, unsigned int code,
(int)strlen(content_type), p, end))
return 1;
- if (content_len != LWS_ILLEGAL_HTTP_CONTENT_LEN) {
- if (lws_add_http_header_content_length(wsi, content_len, p, end))
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (!wsi->http.lcs &&
+ (!strncmp(content_type, "text/", 5) ||
+ !strcmp(content_type, "application/javascript") ||
+ !strcmp(content_type, "image/svg+xml")))
+ lws_http_compression_apply(wsi, NULL, p, end, 0);
+#endif
+
+ /*
+ * if we decided to compress it, we don't know the content length...
+ * the compressed data will go out chunked on h1
+ */
+ if (
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ !wsi->http.lcs &&
+#endif
+ content_len != LWS_ILLEGAL_HTTP_CONTENT_LEN) {
+ if (lws_add_http_header_content_length(wsi, content_len,
+ p, end))
return 1;
} else {
- if (lws_add_http_header_by_token(wsi, WSI_TOKEN_CONNECTION,
- (unsigned char *)"close", 5,
- p, end))
- return 1;
-
- wsi->http.connection_type = HTTP_CONNECTION_CLOSE;
+ /* there was no length... it normally means CONNECTION_CLOSE */
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+
+ if (!wsi->http2_substream && wsi->http.lcs) {
+ /* so...
+ * - h1 connection
+ * - http compression transform active
+ * - did not send content length
+ *
+ * then mark as chunked...
+ */
+ wsi->http.comp_ctx.chunking = 1;
+ if (lws_add_http_header_by_token(wsi,
+ WSI_TOKEN_HTTP_TRANSFER_ENCODING,
+ (unsigned char *)"chunked", 7, p, end))
+ return -1;
+
+ /* ... but h1 compression is chunked, if active we can
+ * still pipeline
+ */
+ if (wsi->http.lcs &&
+ wsi->http.conn_type == HTTP_CONNECTION_KEEP_ALIVE)
+ t = 1;
+ }
+#endif
+ if (!wsi->http2_substream) {
+ if (lws_add_http_header_by_token(wsi,
+ WSI_TOKEN_CONNECTION,
+ (unsigned char *)ka[t],
+ (int)strlen(ka[t]), p, end))
+ return 1;
+
+ wsi->http.conn_type = types[t];
+ }
}
return 0;
}
-STORE_IN_ROM static const char * const err400[] = {
+static const char * const err400[] = {
"Bad Request",
"Unauthorized",
"Payment Required",
@@ -185,7 +235,7 @@ STORE_IN_ROM static const char * const err400[] = {
"Expectation Failed"
};
-STORE_IN_ROM static const char * const err500[] = {
+static const char * const err500[] = {
"Internal Server Error",
"Not Implemented",
"Bad Gateway",
@@ -194,11 +244,31 @@ STORE_IN_ROM static const char * const err500[] = {
"HTTP Version Not Supported"
};
+/* security best practices from Mozilla Observatory */
+
+static const
+struct lws_protocol_vhost_options pvo_hsbph[] = {{
+ NULL, NULL, "referrer-policy:", "no-referrer"
+}, {
+ &pvo_hsbph[0], NULL, "x-frame-options:", "deny"
+}, {
+ &pvo_hsbph[1], NULL, "x-xss-protection:", "1; mode=block"
+}, {
+ &pvo_hsbph[2], NULL, "x-content-type-options:", "nosniff"
+}, {
+ &pvo_hsbph[3], NULL, "content-security-policy:",
+ "default-src 'none'; img-src 'self' data: ; "
+ "script-src 'self'; font-src 'self'; "
+ "style-src 'self'; connect-src 'self'; "
+ "frame-ancestors 'none'; base-uri 'none';"
+ "form-action 'self';"
+}};
+
int
lws_add_http_header_status(struct lws *wsi, unsigned int _code,
unsigned char **p, unsigned char *end)
{
- STORE_IN_ROM static const char * const hver[] = {
+ static const char * const hver[] = {
"HTTP/1.0", "HTTP/1.1", "HTTP/2"
};
const struct lws_protocol_vhost_options *headers;
@@ -246,6 +316,7 @@ lws_add_http_header_status(struct lws *wsi, unsigned int _code,
end))
return 1;
}
+
headers = wsi->vhost->headers;
while (headers) {
if (lws_add_http_header_by_name(wsi,
@@ -257,6 +328,20 @@ lws_add_http_header_status(struct lws *wsi, unsigned int _code,
headers = headers->next;
}
+ if (wsi->vhost->options &
+ LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE) {
+ headers = &pvo_hsbph[LWS_ARRAY_SIZE(pvo_hsbph) - 1];
+ while (headers) {
+ if (lws_add_http_header_by_name(wsi,
+ (const unsigned char *)headers->name,
+ (unsigned char *)headers->value,
+ (int)strlen(headers->value), p, end))
+ return 1;
+
+ headers = headers->next;
+ }
+ }
+
if (wsi->context->server_string &&
!(_code & LWSAHH_FLAG_NO_SERVER_NAME))
if (lws_add_http_header_by_token(wsi, WSI_TOKEN_HTTP_SERVER,
@@ -271,6 +356,12 @@ lws_add_http_header_status(struct lws *wsi, unsigned int _code,
"includeSubDomains", 36, p, end))
return 1;
+ if (*p >= (end - 2)) {
+ lwsl_err("%s: reached end of buffer\n", __func__);
+
+ return 1;
+ }
+
return 0;
}
@@ -283,6 +374,7 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
unsigned char *p = pt->serv_buf + LWS_PRE;
unsigned char *start = p;
unsigned char *end = p + context->pt_serv_buf_size - LWS_PRE;
+ char *body = (char *)start + context->pt_serv_buf_size - 512;
int n = 0, m = 0, len;
char slen[20];
@@ -297,9 +389,9 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
code == HTTP_STATUS_NOT_FOUND)
/* we should do a redirect, and do the 404 there */
if (lws_http_redirect(wsi, HTTP_STATUS_FOUND,
- (uint8_t *)wsi->vhost->http.error_document_404,
- (int)strlen(wsi->vhost->http.error_document_404),
- &p, end) > 0)
+ (uint8_t *)wsi->vhost->http.error_document_404,
+ (int)strlen(wsi->vhost->http.error_document_404),
+ &p, end) > 0)
return 0;
#endif
@@ -317,9 +409,15 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
&p, end))
return 1;
- len = 35 + (int)strlen(html_body) + sprintf(slen, "%d", code);
- n = sprintf(slen, "%d", len);
+ len = lws_snprintf(body, 510, "<html><head>"
+ "<meta charset=utf-8 http-equiv=\"Content-Language\" "
+ "content=\"en\"/>"
+ "<link rel=\"stylesheet\" type=\"text/css\" "
+ "href=\"/error.css\"/>"
+ "</head><body><h1>%u</h1>%s</body></html>", code, html_body);
+
+ n = sprintf(slen, "%d", len);
if (lws_add_http_header_by_token(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH,
(unsigned char *)slen, n, &p, end))
return 1;
@@ -329,7 +427,6 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
#if defined(LWS_WITH_HTTP2)
if (wsi->http2_substream) {
- unsigned char *body = p + 512;
/*
* for HTTP/2, the headers must be sent separately, since they
@@ -343,7 +440,8 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
*
* Solve it by writing the headers now...
*/
- m = lws_write(wsi, start, p - start, LWS_WRITE_HTTP_HEADERS);
+ m = lws_write(wsi, start, lws_ptr_diff(p, start),
+ LWS_WRITE_HTTP_HEADERS);
if (m != lws_ptr_diff(p, start))
return 1;
@@ -351,10 +449,6 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
* ... but stash the body and send it as a priority next
* handle_POLLOUT
*/
-
- len = sprintf((char *)body,
- "<html><body><h1>%u</h1>%s</body></html>",
- code, html_body);
wsi->http.tx_content_length = len;
wsi->http.tx_content_remain = len;
@@ -363,8 +457,7 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
if (!wsi->h2.pending_status_body)
return -1;
- strcpy(wsi->h2.pending_status_body + LWS_PRE,
- (const char *)body);
+ strcpy(wsi->h2.pending_status_body + LWS_PRE, body);
lws_callback_on_writable(wsi);
return 0;
@@ -375,11 +468,9 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
* for http/1, we can just append the body after the finalized
* headers and send it all in one go.
*/
- p += lws_snprintf((char *)p, end - p - 1,
- "<html><body><h1>%u</h1>%s</body></html>",
- code, html_body);
- n = lws_ptr_diff(p, start);
+ n = lws_ptr_diff(p, start) + len;
+ memcpy(p, body, len);
m = lws_write(wsi, start, n, LWS_WRITE_HTTP);
if (m != n)
return 1;
@@ -419,3 +510,20 @@ lws_http_redirect(struct lws *wsi, int code, const unsigned char *loc, int len,
return lws_write(wsi, start, *p - start, LWS_WRITE_HTTP_HEADERS |
LWS_WRITE_H2_STREAM_END);
}
+
+#if !defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+LWS_VISIBLE int
+lws_http_compression_apply(struct lws *wsi, const char *name,
+ unsigned char **p, unsigned char *end, char decomp)
+{
+ (void)wsi;
+ (void)name;
+ (void)p;
+ (void)end;
+ (void)decomp;
+
+ return 0;
+}
+#endif
+
+
diff --git a/thirdparty/libwebsockets/roles/http/lextable-strings.h b/thirdparty/libwebsockets/lib/roles/http/lextable-strings.h
index 631f5cb600..1e4fee855f 100644
--- a/thirdparty/libwebsockets/roles/http/lextable-strings.h
+++ b/thirdparty/libwebsockets/lib/roles/http/lextable-strings.h
@@ -1,10 +1,6 @@
/* set of parsable strings -- ALL LOWER CASE */
-#if !defined(STORE_IN_ROM)
-#define STORE_IN_ROM
-#endif
-
-STORE_IN_ROM static const char * const set[] = {
+static const char * const set[] = {
"get ",
"post ",
"options ",
diff --git a/thirdparty/libwebsockets/roles/http/lextable.h b/thirdparty/libwebsockets/lib/roles/http/lextable.h
index 9a8063b157..9a8063b157 100644
--- a/thirdparty/libwebsockets/roles/http/lextable.h
+++ b/thirdparty/libwebsockets/lib/roles/http/lextable.h
diff --git a/thirdparty/libwebsockets/roles/http/private.h b/thirdparty/libwebsockets/lib/roles/http/private.h
index 5699914742..ff8b0581cc 100644
--- a/thirdparty/libwebsockets/roles/http/private.h
+++ b/thirdparty/libwebsockets/lib/roles/http/private.h
@@ -22,11 +22,15 @@
* enabled
*/
-#if defined(LWS_WITH_HTTP_PROXY)
+#if defined(LWS_WITH_HUBBUB)
#include <hubbub/hubbub.h>
#include <hubbub/parser.h>
#endif
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+#include "roles/http/compression/private.h"
+#endif
+
#define lwsi_role_http(wsi) (lwsi_role_h1(wsi) || lwsi_role_h2(wsi))
enum http_version {
@@ -35,7 +39,7 @@ enum http_version {
HTTP_VERSION_2
};
-enum http_connection_type {
+enum http_conn_type {
HTTP_CONNECTION_CLOSE,
HTTP_CONNECTION_KEEP_ALIVE
};
@@ -133,7 +137,7 @@ struct allocated_headers {
-#if defined(LWS_WITH_HTTP_PROXY)
+#if defined(LWS_WITH_HUBBUB)
struct lws_rewrite {
hubbub_parser *parser;
hubbub_parser_optparams params;
@@ -192,9 +196,15 @@ struct lws_access_log {
};
#endif
+#define LWS_HTTP_CHUNK_HDR_MAX_SIZE (6 + 2) /* 6 hex digits and then CRLF */
+#define LWS_HTTP_CHUNK_TRL_MAX_SIZE (2 + 5) /* CRLF, then maybe 0 CRLF CRLF */
+
struct _lws_http_mode_related {
struct lws *new_wsi_list;
+ unsigned char *pending_return_headers;
+ size_t pending_return_headers_len;
+
#if defined(LWS_WITH_HTTP_PROXY)
struct lws_rewrite *rw;
#endif
@@ -216,9 +226,14 @@ struct _lws_http_mode_related {
#ifdef LWS_WITH_CGI
struct lws_cgi *cgi; /* wsi being cgi master have one of these */
#endif
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ struct lws_compression_support *lcs;
+ lws_comp_ctx_t comp_ctx;
+ unsigned char comp_accept_mask;
+#endif
enum http_version request_version;
- enum http_connection_type connection_type;
+ enum http_conn_type conn_type;
lws_filepos_t tx_content_length;
lws_filepos_t tx_content_remain;
lws_filepos_t rx_content_length;
@@ -226,8 +241,12 @@ struct _lws_http_mode_related {
#if defined(LWS_WITH_HTTP_PROXY)
unsigned int perform_rewrite:1;
+ unsigned int proxy_clientside:1;
+ unsigned int proxy_parent_chunked:1;
#endif
unsigned int deferred_transaction_completed:1;
+ unsigned int content_length_explicitly_zero:1;
+ unsigned int did_stream_close:1;
};
diff --git a/thirdparty/libwebsockets/roles/http/server/fops-zip.c b/thirdparty/libwebsockets/lib/roles/http/server/fops-zip.c
index 4db83ce621..4db83ce621 100644
--- a/thirdparty/libwebsockets/roles/http/server/fops-zip.c
+++ b/thirdparty/libwebsockets/lib/roles/http/server/fops-zip.c
diff --git a/thirdparty/libwebsockets/roles/http/server/lejp-conf.c b/thirdparty/libwebsockets/lib/roles/http/server/lejp-conf.c
index fbf10c288e..0dd701d835 100644
--- a/thirdparty/libwebsockets/roles/http/server/lejp-conf.c
+++ b/thirdparty/libwebsockets/lib/roles/http/server/lejp-conf.c
@@ -1,7 +1,7 @@
/*
* libwebsockets web server application
*
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -105,6 +105,11 @@ static const char * const paths_vhosts[] = {
"vhosts[].ignore-missing-cert",
"vhosts[].error-document-404",
"vhosts[].alpn",
+ "vhosts[].ssl-client-option-set",
+ "vhosts[].ssl-client-option-clear",
+ "vhosts[].tls13-ciphers",
+ "vhosts[].client-tls13-ciphers",
+ "vhosts[].strict-host-check",
};
enum lejp_vhost_paths {
@@ -156,6 +161,11 @@ enum lejp_vhost_paths {
LEJPVP_IGNORE_MISSING_CERT,
LEJPVP_ERROR_DOCUMENT_404,
LEJPVP_ALPN,
+ LEJPVP_SSL_CLIENT_OPTION_SET,
+ LEJPVP_SSL_CLIENT_OPTION_CLEAR,
+ LEJPVP_TLS13_CIPHERS,
+ LEJPVP_CLIENT_TLS13_CIPHERS,
+ LEJPVP_FLAG_STRICT_HOST_CHECK,
};
static const char * const parser_errs[] = {
@@ -252,7 +262,7 @@ lejp_globals_cb(struct lejp_ctx *ctx, char reason)
rej = lwsws_align(a);
a->p += sizeof(*rej);
- n = lejp_get_wildcard(ctx, 0, a->p, a->end - a->p);
+ n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
rej->next = a->info->reject_service_keywords;
a->info->reject_service_keywords = rej;
rej->name = a->p;
@@ -403,7 +413,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
a->pvo = lwsws_align(a);
a->p += sizeof(*a->pvo);
- n = lejp_get_wildcard(ctx, 0, a->p, a->end - a->p);
+ n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
/* ie, enable this protocol, no options yet */
a->pvo->next = a->info->pvo;
a->info->pvo = a->pvo;
@@ -418,6 +428,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
/* this catches, eg, vhosts[].headers[].xxx */
if ((reason == LEJPCB_VAL_STR_END || reason == LEJPCB_VAL_STR_CHUNK) &&
ctx->path_match == LEJPVP_HEADERS_NAME + 1) {
+
if (!a->chunk) {
headers = lwsws_align(a);
a->p += sizeof(*headers);
@@ -450,8 +461,9 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
struct lws_vhost *vhost;
//lwsl_notice("%s\n", ctx->path);
- if (!a->info->port) {
- lwsl_err("Port required (eg, 443)");
+ if (!a->info->port &&
+ !(a->info->options & LWS_SERVER_OPTION_UNIX_SOCK)) {
+ lwsl_err("Port required (eg, 443)\n");
return 1;
}
a->valid = 0;
@@ -467,13 +479,19 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
#if defined(LWS_WITH_TLS)
if (a->enable_client_ssl) {
- const char *cert_filepath = a->info->client_ssl_cert_filepath;
- const char *private_key_filepath = a->info->client_ssl_private_key_filepath;
- const char *ca_filepath = a->info->client_ssl_ca_filepath;
- const char *cipher_list = a->info->client_ssl_cipher_list;
+ const char *cert_filepath =
+ a->info->client_ssl_cert_filepath;
+ const char *private_key_filepath =
+ a->info->client_ssl_private_key_filepath;
+ const char *ca_filepath =
+ a->info->client_ssl_ca_filepath;
+ const char *cipher_list =
+ a->info->client_ssl_cipher_list;
+
memset(a->info, 0, sizeof(*a->info));
a->info->client_ssl_cert_filepath = cert_filepath;
- a->info->client_ssl_private_key_filepath = private_key_filepath;
+ a->info->client_ssl_private_key_filepath =
+ private_key_filepath;
a->info->client_ssl_ca_filepath = ca_filepath;
a->info->client_ssl_cipher_list = cipher_list;
a->info->options = LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
@@ -617,6 +635,13 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
case LEJPVP_CIPHERS:
a->info->ssl_cipher_list = a->p;
break;
+ case LEJPVP_TLS13_CIPHERS:
+ a->info->tls1_3_plus_cipher_list = a->p;
+ break;
+ case LEJPVP_CLIENT_TLS13_CIPHERS:
+ a->info->client_tls_1_3_plus_cipher_list = a->p;
+ break;
+
case LEJPVP_ECDH_CURVE:
a->info->ecdh_curve = a->p;
break;
@@ -628,13 +653,13 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
mp_cgienv->next = a->m.cgienv;
a->m.cgienv = mp_cgienv;
- n = lejp_get_wildcard(ctx, 0, a->p, a->end - a->p);
+ n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
mp_cgienv->name = a->p;
a->p += n;
mp_cgienv->value = a->p;
mp_cgienv->options = NULL;
- //lwsl_notice(" adding pmo / cgi-env '%s' = '%s'\n", mp_cgienv->name,
- // mp_cgienv->value);
+ //lwsl_notice(" adding pmo / cgi-env '%s' = '%s'\n",
+ // mp_cgienv->name, mp_cgienv->value);
goto dostring;
case LEJPVP_PROTOCOL_NAME_OPT:
@@ -645,7 +670,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
pvo = lwsws_align(a);
a->p += sizeof(*a->pvo);
- n = lejp_get_wildcard(ctx, 1, a->p, a->end - a->p);
+ n = lejp_get_wildcard(ctx, 1, a->p, lws_ptr_diff(a->end, a->p));
/* ie, enable this protocol, no options yet */
pvo->next = a->pvo->options;
a->pvo->options = pvo;
@@ -659,12 +684,12 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
a->pvo_em = lwsws_align(a);
a->p += sizeof(*a->pvo_em);
- n = lejp_get_wildcard(ctx, 0, a->p, a->end - a->p);
+ n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
/* ie, enable this protocol, no options yet */
a->pvo_em->next = a->m.extra_mimetypes;
a->m.extra_mimetypes = a->pvo_em;
a->pvo_em->name = a->p;
- lwsl_notice(" adding extra-mimetypes %s -> %s\n", a->p, ctx->buf);
+ lwsl_notice(" + extra-mimetypes %s -> %s\n", a->p, ctx->buf);
a->p += n;
a->pvo_em->value = a->p;
a->pvo_em->options = NULL;
@@ -674,7 +699,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
a->pvo_int = lwsws_align(a);
a->p += sizeof(*a->pvo_int);
- n = lejp_get_wildcard(ctx, 0, a->p, a->end - a->p);
+ n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
/* ie, enable this protocol, no options yet */
a->pvo_int->next = a->m.interpret;
a->m.interpret = a->pvo_int;
@@ -737,6 +762,15 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
return 0;
+ case LEJPVP_FLAG_STRICT_HOST_CHECK:
+ if (arg_to_bool(ctx->buf))
+ a->info->options |=
+ LWS_SERVER_OPTION_VHOST_UPG_STRICT_HOST_CHECK;
+ else
+ a->info->options &=
+ ~(LWS_SERVER_OPTION_VHOST_UPG_STRICT_HOST_CHECK);
+ return 0;
+
case LEJPVP_ERROR_DOCUMENT_404:
a->info->error_document_404 = a->p;
break;
@@ -748,6 +782,13 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
a->info->ssl_options_clear |= atol(ctx->buf);
return 0;
+ case LEJPVP_SSL_CLIENT_OPTION_SET:
+ a->info->ssl_client_options_set |= atol(ctx->buf);
+ return 0;
+ case LEJPVP_SSL_CLIENT_OPTION_CLEAR:
+ a->info->ssl_client_options_clear |= atol(ctx->buf);
+ return 0;
+
case LEJPVP_ALPN:
a->info->alpn = a->p;
break;
@@ -761,12 +802,13 @@ dostring:
p[LEJP_STRING_CHUNK] = '\0';
p1 = strstr(p, ESC_INSTALL_DATADIR);
if (p1) {
- n = p1 - p;
+ n = lws_ptr_diff(p1, p);
if (n > a->end - a->p)
- n = a->end - a->p;
+ n = lws_ptr_diff(a->end, a->p);
lws_strncpy(a->p, p, n + 1);
a->p += n;
- a->p += lws_snprintf(a->p, a->end - a->p, "%s", LWS_INSTALL_DATADIR);
+ a->p += lws_snprintf(a->p, a->end - a->p, "%s",
+ LWS_INSTALL_DATADIR);
p += n + strlen(ESC_INSTALL_DATADIR);
}
@@ -871,7 +913,7 @@ static int
lwsws_get_config_d(void *user, const char *d, const char * const *paths,
int count_paths, lejp_callback cb)
{
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(LWS_WITH_ESP32)
struct dirent **namelist;
char path[256];
int n, i, ret = 0;
@@ -941,13 +983,14 @@ lwsws_get_config_globals(struct lws_context_creation_info *info, const char *d,
return 1;
lws_snprintf(dd, sizeof(dd) - 1, "%s/conf.d", d);
if (lwsws_get_config_d(&a, dd, paths_global,
- LWS_ARRAY_SIZE(paths_global), lejp_globals_cb) > 1)
+ LWS_ARRAY_SIZE(paths_global),
+ lejp_globals_cb) > 1)
return 1;
a.plugin_dirs[a.count_plugin_dirs] = NULL;
*cs = a.p;
- *len = a.end - a.p;
+ *len = lws_ptr_diff(a.end, a.p);
return 0;
}
@@ -980,7 +1023,7 @@ lwsws_get_config_vhosts(struct lws_context *context,
return 1;
*cs = a.p;
- *len = a.end - a.p;
+ *len = lws_ptr_diff(a.end, a.p);
if (!a.any_vhosts) {
lwsl_err("Need at least one vhost\n");
diff --git a/thirdparty/libwebsockets/roles/http/server/parsers.c b/thirdparty/libwebsockets/lib/roles/http/server/parsers.c
index 482bdc676a..641e9b8dac 100644
--- a/thirdparty/libwebsockets/roles/http/server/parsers.c
+++ b/thirdparty/libwebsockets/lib/roles/http/server/parsers.c
@@ -240,8 +240,9 @@ lws_header_table_attach(struct lws *wsi, int autoservice)
wsi->http.ah->wsi = wsi; /* mark our owner */
pt->http.ah_count_in_use++;
-#if defined(LWS_WITH_PEER_LIMITS) && (defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2))
- lws_context_lock(context); /* <====================================== */
+#if defined(LWS_WITH_PEER_LIMITS) && (defined(LWS_ROLE_H1) || \
+ defined(LWS_ROLE_H2))
+ lws_context_lock(context, "ah attach"); /* <========================= */
if (wsi->peer)
wsi->peer->http.count_ah++;
lws_context_unlock(context); /* ====================================> */
@@ -259,7 +260,7 @@ reset:
#ifndef LWS_NO_CLIENT
if (lwsi_role_client(wsi) && lwsi_state(wsi) == LRS_UNCONNECTED)
- if (!lws_client_connect_via_info2(wsi))
+ if (!lws_http_client_connect_via_info2(wsi))
/* our client connect has failed, the wsi
* has been closed
*/
@@ -353,14 +354,16 @@ int __lws_header_table_detach(struct lws *wsi, int autoservice)
if (!wsi) /* everybody waiting already has too many ah... */
goto nobody_usable_waiting;
- lwsl_info("%s: transferring ah to last eligible wsi in wait list %p (wsistate 0x%x)\n", __func__, wsi, wsi->wsistate);
+ lwsl_info("%s: transferring ah to last eligible wsi in wait list "
+ "%p (wsistate 0x%x)\n", __func__, wsi, wsi->wsistate);
wsi->http.ah = ah;
ah->wsi = wsi; /* new owner */
__lws_header_table_reset(wsi, autoservice);
-#if defined(LWS_WITH_PEER_LIMITS) && (defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2))
- lws_context_lock(context); /* <====================================== */
+#if defined(LWS_WITH_PEER_LIMITS) && (defined(LWS_ROLE_H1) || \
+ defined(LWS_ROLE_H2))
+ lws_context_lock(context, "ah detach"); /* <========================= */
if (wsi->peer)
wsi->peer->http.count_ah++;
lws_context_unlock(context); /* ====================================> */
@@ -386,7 +389,7 @@ int __lws_header_table_detach(struct lws *wsi, int autoservice)
if (lwsi_role_client(wsi) && lwsi_state(wsi) == LRS_UNCONNECTED) {
lws_pt_unlock(pt);
- if (!lws_client_connect_via_info2(wsi)) {
+ if (!lws_http_client_connect_via_info2(wsi)) {
/* our client connect has failed, the wsi
* has been closed
*/
@@ -397,7 +400,8 @@ int __lws_header_table_detach(struct lws *wsi, int autoservice)
}
#endif
- assert(!!pt->http.ah_wait_list_length == !!(lws_intptr_t)pt->http.ah_wait_list);
+ assert(!!pt->http.ah_wait_list_length ==
+ !!(lws_intptr_t)pt->http.ah_wait_list);
bail:
lwsl_info("%s: wsi %p: ah %p (tsi=%d, count = %d)\n", __func__,
(void *)wsi, (void *)ah, pt->tid, pt->http.ah_count_in_use);
@@ -459,6 +463,10 @@ LWS_VISIBLE int lws_hdr_total_length(struct lws *wsi, enum lws_token_indexes h)
do {
len += wsi->http.ah->frags[n].len;
n = wsi->http.ah->frags[n].nfrag;
+
+ if (n && h != WSI_TOKEN_HTTP_COOKIE)
+ ++len;
+
} while (n);
return len;
@@ -500,6 +508,11 @@ LWS_VISIBLE int lws_hdr_copy(struct lws *wsi, char *dst, int len,
{
int toklen = lws_hdr_total_length(wsi, h);
int n;
+ int comma;
+
+ *dst = '\0';
+ if (!toklen)
+ return 0;
if (toklen >= len)
return -1;
@@ -512,13 +525,20 @@ LWS_VISIBLE int lws_hdr_copy(struct lws *wsi, char *dst, int len,
return 0;
do {
- if (wsi->http.ah->frags[n].len >= len)
+ comma = (wsi->http.ah->frags[n].nfrag &&
+ h != WSI_TOKEN_HTTP_COOKIE) ? 1 : 0;
+
+ if (wsi->http.ah->frags[n].len + comma >= len)
return -1;
strncpy(dst, &wsi->http.ah->data[wsi->http.ah->frags[n].offset],
wsi->http.ah->frags[n].len);
dst += wsi->http.ah->frags[n].len;
len -= wsi->http.ah->frags[n].len;
n = wsi->http.ah->frags[n].nfrag;
+
+ if (comma)
+ *dst++ = ',';
+
} while (n);
*dst = '\0';
@@ -529,6 +549,9 @@ char *lws_hdr_simple_ptr(struct lws *wsi, enum lws_token_indexes h)
{
int n;
+ if (!wsi->http.ah)
+ return NULL;
+
n = wsi->http.ah->frag_index[h];
if (!n)
return NULL;
@@ -539,6 +562,9 @@ char *lws_hdr_simple_ptr(struct lws *wsi, enum lws_token_indexes h)
static int LWS_WARN_UNUSED_RESULT
lws_pos_in_bounds(struct lws *wsi)
{
+ if (!wsi->http.ah)
+ return -1;
+
if (wsi->http.ah->pos <
(unsigned int)wsi->context->max_http_header_data)
return 0;
@@ -599,7 +625,8 @@ issue_char(struct lws *wsi, unsigned char c)
* If we haven't hit the token limit, just copy the character into
* the header
*/
- if (frag_len < wsi->http.ah->current_token_limit) {
+ if (!wsi->http.ah->current_token_limit ||
+ frag_len < wsi->http.ah->current_token_limit) {
wsi->http.ah->data[wsi->http.ah->pos++] = c;
if (c)
wsi->http.ah->frags[wsi->http.ah->nfrag].len++;
@@ -868,8 +895,9 @@ lws_parse(struct lws *wsi, unsigned char *buf, int *len)
if (ah->ups == URIPS_SEEN_SLASH_DOT_DOT) {
/*
* back up one dir level if possible
- * safe against header fragmentation because
- * the method URI can only be in 1 fragment
+ * safe against header fragmentation
+ * because the method URI can only be
+ * in 1 fragment
*/
if (ah->frags[ah->nfrag].len > 2) {
ah->pos--;
@@ -939,7 +967,8 @@ swallow:
pos = ah->lextable_pos;
while (1) {
- if (lextable[pos] & (1 << 7)) { /* 1-byte, fail on mismatch */
+ if (lextable[pos] & (1 << 7)) {
+ /* 1-byte, fail on mismatch */
if ((lextable[pos] & 0x7f) != c) {
nope:
ah->lextable_pos = -1;
@@ -958,14 +987,15 @@ nope:
goto nope;
/* b7 = 0, end or 3-byte */
- if (lextable[pos] < FAIL_CHAR) { /* terminal marker */
+ if (lextable[pos] < FAIL_CHAR) { /* term mark */
ah->lextable_pos = pos;
break;
}
if (lextable[pos] == c) { /* goto */
- ah->lextable_pos = pos + (lextable[pos + 1]) +
- (lextable[pos + 2] << 8);
+ ah->lextable_pos = pos +
+ (lextable[pos + 1]) +
+ (lextable[pos + 2] << 8);
break;
}
@@ -1038,13 +1068,13 @@ nope:
n = WSI_TOKEN_ORIGIN;
ah->parser_state = (enum lws_token_indexes)
- (WSI_TOKEN_GET_URI + n);
+ (WSI_TOKEN_GET_URI + n);
ah->ups = URIPS_IDLE;
if (context->token_limits)
ah->current_token_limit = context->
- token_limits->token_limit[
- ah->parser_state];
+ token_limits->token_limit[
+ ah->parser_state];
else
ah->current_token_limit =
wsi->context->max_http_header_data;
@@ -1116,6 +1146,7 @@ excessive:
set_parsing_complete:
if (ah->ues != URIES_IDLE)
goto forbid;
+
if (lws_hdr_total_length(wsi, WSI_TOKEN_UPGRADE)) {
if (lws_hdr_total_length(wsi, WSI_TOKEN_VERSION))
wsi->rx_frame_type = /* temp for ws version index */
diff --git a/thirdparty/libwebsockets/roles/http/server/server.c b/thirdparty/libwebsockets/lib/roles/http/server/server.c
index abd86dc9b5..729315602c 100644
--- a/thirdparty/libwebsockets/roles/http/server/server.c
+++ b/thirdparty/libwebsockets/lib/roles/http/server/server.c
@@ -28,6 +28,8 @@ const char * const method_names[] = {
#endif
};
+static const char * const intermediates[] = { "private", "public" };
+
/*
* return 0: all done
* 1: nonfatal error
@@ -38,7 +40,7 @@ const char * const method_names[] = {
int
_lws_vhost_init_server(const struct lws_context_creation_info *info,
- struct lws_vhost *vhost)
+ struct lws_vhost *vhost)
{
int n, opt = 1, limit = 1;
lws_sockfd_type sockfd;
@@ -81,15 +83,22 @@ _lws_vhost_init_server(const struct lws_context_creation_info *info,
* let's check before we do anything else about the disposition
* of the interface he wants to bind to...
*/
- is = lws_socket_bind(vhost, LWS_SOCK_INVALID, vhost->listen_port, vhost->iface);
+ is = lws_socket_bind(vhost, LWS_SOCK_INVALID, vhost->listen_port,
+ vhost->iface);
lwsl_debug("initial if check says %d\n", is);
+
+ if (is == LWS_ITOSA_BUSY)
+ /* treat as fatal */
+ return -1;
+
deal:
lws_start_foreach_llp(struct lws_vhost **, pv,
vhost->context->no_listener_vhost_list) {
if (is >= LWS_ITOSA_USABLE && *pv == vhost) {
/* on the list and shouldn't be: remove it */
- lwsl_debug("deferred iface: removing vh %s\n", (*pv)->name);
+ lwsl_debug("deferred iface: removing vh %s\n",
+ (*pv)->name);
*pv = vhost->no_listener_vhost_list;
vhost->no_listener_vhost_list = NULL;
goto done_list;
@@ -105,7 +114,8 @@ deal:
/* ... but needs to be: so add it */
lwsl_debug("deferred iface: adding vh %s\n", vhost->name);
- vhost->no_listener_vhost_list = vhost->context->no_listener_vhost_list;
+ vhost->no_listener_vhost_list =
+ vhost->context->no_listener_vhost_list;
vhost->context->no_listener_vhost_list = vhost;
}
@@ -221,9 +231,16 @@ done_list:
}
#endif
#endif
- lws_plat_set_socket_options(vhost, sockfd);
+ lws_plat_set_socket_options(vhost, sockfd, 0);
is = lws_socket_bind(vhost, sockfd, vhost->listen_port, vhost->iface);
+ if (is == LWS_ITOSA_BUSY) {
+ /* treat as fatal */
+ compatible_close(sockfd);
+
+ return -1;
+ }
+
/*
* There is a race where the network device may come up and then
* go away and fail here. So correctly handle unexpected failure
@@ -234,21 +251,29 @@ done_list:
compatible_close(sockfd);
goto deal;
}
- vhost->listen_port = is;
-
- lwsl_debug("%s: lws_socket_bind says %d\n", __func__, is);
wsi = lws_zalloc(sizeof(struct lws), "listen wsi");
if (wsi == NULL) {
lwsl_err("Out of mem\n");
goto bail;
}
+
+#ifdef LWS_WITH_UNIX_SOCK
+ if (!LWS_UNIX_SOCK_ENABLED(vhost))
+#endif
+ {
+ wsi->unix_skt = 1;
+ vhost->listen_port = is;
+
+ lwsl_debug("%s: lws_socket_bind says %d\n", __func__, is);
+ }
+
wsi->context = vhost->context;
wsi->desc.sockfd = sockfd;
lws_role_transition(wsi, 0, LRS_UNCONNECTED, &role_ops_listen);
wsi->protocol = vhost->protocols;
wsi->tsi = m;
- wsi->vhost = vhost;
+ lws_vhost_bind_wsi(vhost, wsi);
wsi->listener = 1;
if (wsi->context->event_loop_ops->init_vhost_listen_wsi)
@@ -296,7 +321,7 @@ lws_select_vhost(struct lws_context *context, int port, const char *servername)
{
struct lws_vhost *vhost = context->vhost_list;
const char *p;
- int n, m, colon;
+ int n, colon;
n = (int)strlen(servername);
colon = n;
@@ -324,8 +349,8 @@ lws_select_vhost(struct lws_context *context, int port, const char *servername)
*/
vhost = context->vhost_list;
while (vhost) {
- m = (int)strlen(vhost->name);
- if (port == vhost->listen_port &&
+ int m = (int)strlen(vhost->name);
+ if (port && port == vhost->listen_port &&
m <= (colon - 2) &&
servername[colon - m - 1] == '.' &&
!strncmp(vhost->name, servername + colon - m, m)) {
@@ -340,7 +365,7 @@ lws_select_vhost(struct lws_context *context, int port, const char *servername)
vhost = context->vhost_list;
while (vhost) {
- if (port == vhost->listen_port) {
+ if (port && port == vhost->listen_port) {
lwsl_info("%s: vhost match to %s based on port %d\n",
__func__, vhost->name, port);
return vhost;
@@ -356,8 +381,8 @@ lws_select_vhost(struct lws_context *context, int port, const char *servername)
LWS_VISIBLE LWS_EXTERN const char *
lws_get_mimetype(const char *file, const struct lws_http_mount *m)
{
- int n = (int)strlen(file);
const struct lws_protocol_vhost_options *pvo = NULL;
+ int n = (int)strlen(file);
if (m)
pvo = m->extra_mimetypes;
@@ -457,7 +482,7 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
#endif
int spin = 0;
#endif
- char path[256], sym[512];
+ char path[256], sym[2048];
unsigned char *p = (unsigned char *)sym + 32 + LWS_PRE, *start = p;
unsigned char *end = p + sizeof(sym) - 32 - LWS_PRE;
#if !defined(WIN32) && !defined(LWS_WITH_ESP32)
@@ -494,7 +519,7 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
lwsl_info("%s: Unable to open '%s': errno %d\n",
__func__, path, errno);
- return -1;
+ return 1;
}
/* if it can't be statted, don't try */
@@ -506,18 +531,18 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
#if !defined(WIN32)
if (fstat(wsi->http.fop_fd->fd, &st)) {
lwsl_info("unable to stat %s\n", path);
- goto bail;
+ goto notfound;
}
#else
#if defined(LWS_HAVE__STAT32I64)
if (_stat32i64(path, &st)) {
lwsl_info("unable to stat %s\n", path);
- goto bail;
+ goto notfound;
}
#else
if (stat(path, &st)) {
lwsl_info("unable to stat %s\n", path);
- goto bail;
+ goto notfound;
}
#endif
#endif
@@ -530,7 +555,7 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
len = readlink(path, sym, sizeof(sym) - 1);
if (len) {
lwsl_err("Failed to read link %s\n", path);
- goto bail;
+ goto notfound;
}
sym[len] = '\0';
lwsl_debug("symlink %s -> %s\n", path, sym);
@@ -567,19 +592,48 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
if (!strcmp(sym, lws_hdr_simple_ptr(wsi,
WSI_TOKEN_HTTP_IF_NONE_MATCH))) {
+ char cache_control[50], *cc = "no-store";
+ int cclen = 8;
+
lwsl_debug("%s: ETAG match %s %s\n", __func__,
uri, origin);
/* we don't need to send the payload */
if (lws_add_http_header_status(wsi,
- HTTP_STATUS_NOT_MODIFIED, &p, end))
+ HTTP_STATUS_NOT_MODIFIED, &p, end)) {
+ lwsl_err("%s: failed adding not modified\n",
+ __func__);
return -1;
+ }
if (lws_add_http_header_by_token(wsi,
WSI_TOKEN_HTTP_ETAG,
(unsigned char *)sym, n, &p, end))
return -1;
+ /* but we still need to send cache control... */
+
+ if (m->cache_max_age && m->cache_reusable) {
+ if (!m->cache_revalidate) {
+ cc = cache_control;
+ cclen = sprintf(cache_control,
+ "%s, max-age=%u",
+ intermediates[wsi->cache_intermediaries],
+ m->cache_max_age);
+ } else {
+ cc = cache_control;
+ cclen = sprintf(cache_control,
+ "must-revalidate, %s, max-age=%u",
+ intermediates[wsi->cache_intermediaries],
+ m->cache_max_age);
+ }
+ }
+
+ if (lws_add_http_header_by_token(wsi,
+ WSI_TOKEN_HTTP_CACHE_CONTROL,
+ (unsigned char *)cc, cclen, &p, end))
+ return -1;
+
if (lws_finalize_http_header(wsi, &p, end))
return -1;
@@ -594,7 +648,10 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
lws_vfs_file_close(&wsi->http.fop_fd);
- return lws_http_transaction_completed(wsi);
+ if (lws_http_transaction_completed(wsi))
+ return -1;
+
+ return 0;
}
}
@@ -605,8 +662,13 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
mimetype = lws_get_mimetype(path, m);
if (!mimetype) {
- lwsl_err("unknown mimetype for %s\n", path);
- goto bail;
+ lwsl_info("unknown mimetype for %s\n", path);
+ if (lws_return_http_status(wsi,
+ HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, NULL) ||
+ lws_http_transaction_completed(wsi))
+ return -1;
+
+ return 0;
}
if (!mimetype[0])
lwsl_debug("sending no mimetype for %s\n", path);
@@ -642,8 +704,8 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
const struct lws_protocols *pp = lws_vhost_name_to_protocol(
wsi->vhost, m->protocol);
- if (lws_bind_protocol(wsi, pp))
- return 1;
+ if (lws_bind_protocol(wsi, pp, __func__))
+ return -1;
args.p = (char *)p;
args.max_len = lws_ptr_diff(end, p);
if (pp->callback(wsi, LWS_CALLBACK_ADD_HEADERS,
@@ -652,6 +714,7 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
p = (unsigned char *)args.p;
}
+ *p = '\0';
n = lws_serve_http_file(wsi, path, mimetype, (char *)start,
lws_ptr_diff(p, start));
@@ -659,9 +722,10 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
return -1; /* error or can't reuse connection: close the socket */
return 0;
-bail:
- return -1;
+notfound:
+
+ return 1;
}
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
@@ -749,7 +813,7 @@ lws_unauthorised_basic_auth(struct lws *wsi)
{
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
unsigned char *start = pt->serv_buf + LWS_PRE,
- *p = start, *end = p + 512;
+ *p = start, *end = p + 2048;
char buf[64];
int n;
@@ -848,24 +912,25 @@ lws_http_get_uri_and_method(struct lws *wsi, char **puri_ptr, int *puri_len)
return -1;
}
+static const char * const oprot[] = {
+ "http://", "https://"
+};
+
int
lws_http_action(struct lws *wsi)
{
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
- enum http_connection_type connection_type;
+ const struct lws_http_mount *hit = NULL;
enum http_version request_version;
- char content_length_str[32];
struct lws_process_html_args args;
- const struct lws_http_mount *hit = NULL;
- unsigned int n;
- char http_version_str[10];
- char http_conn_str[20];
- int http_version_len;
+ enum http_conn_type conn_type;
+ char content_length_str[32];
+ char http_version_str[12];
char *uri_ptr = NULL, *s;
- int uri_len = 0, meth;
- static const char * const oprot[] = {
- "http://", "https://"
- };
+ int uri_len = 0, meth, m;
+ char http_conn_str[25];
+ int http_version_len;
+ unsigned int n;
meth = lws_http_get_uri_and_method(wsi, &uri_ptr, &uri_len);
if (meth < 0 || meth >= (int)LWS_ARRAY_SIZE(method_names))
@@ -898,16 +963,21 @@ lws_http_action(struct lws *wsi)
/* HTTP header had a content length? */
wsi->http.rx_content_length = 0;
+ wsi->http.content_length_explicitly_zero = 0;
if (lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI) ||
- lws_hdr_total_length(wsi, WSI_TOKEN_PATCH_URI) ||
- lws_hdr_total_length(wsi, WSI_TOKEN_PUT_URI))
+ lws_hdr_total_length(wsi, WSI_TOKEN_PATCH_URI) ||
+ lws_hdr_total_length(wsi, WSI_TOKEN_PUT_URI))
wsi->http.rx_content_length = 100 * 1024 * 1024;
- if (lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH)) {
- lws_hdr_copy(wsi, content_length_str,
- sizeof(content_length_str) - 1,
- WSI_TOKEN_HTTP_CONTENT_LENGTH);
+ if (lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH) &&
+ lws_hdr_copy(wsi, content_length_str,
+ sizeof(content_length_str) - 1,
+ WSI_TOKEN_HTTP_CONTENT_LENGTH) > 0) {
wsi->http.rx_content_length = atoll(content_length_str);
+ if (!wsi->http.rx_content_length) {
+ wsi->http.content_length_explicitly_zero = 1;
+ lwsl_debug("%s: explicit 0 content-length\n", __func__);
+ }
}
if (wsi->http2_substream) {
@@ -918,35 +988,33 @@ lws_http_action(struct lws *wsi)
/* Works for single digit HTTP versions. : */
http_version_len = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP);
- if (http_version_len > 7) {
- lws_hdr_copy(wsi, http_version_str,
- sizeof(http_version_str) - 1,
- WSI_TOKEN_HTTP);
- if (http_version_str[5] == '1' &&
- http_version_str[7] == '1')
- request_version = HTTP_VERSION_1_1;
- }
+ if (http_version_len > 7 &&
+ lws_hdr_copy(wsi, http_version_str,
+ sizeof(http_version_str) - 1,
+ WSI_TOKEN_HTTP) > 0 &&
+ http_version_str[5] == '1' && http_version_str[7] == '1')
+ request_version = HTTP_VERSION_1_1;
+
wsi->http.request_version = request_version;
/* HTTP/1.1 defaults to "keep-alive", 1.0 to "close" */
if (request_version == HTTP_VERSION_1_1)
- connection_type = HTTP_CONNECTION_KEEP_ALIVE;
+ conn_type = HTTP_CONNECTION_KEEP_ALIVE;
else
- connection_type = HTTP_CONNECTION_CLOSE;
+ conn_type = HTTP_CONNECTION_CLOSE;
/* Override default if http "Connection:" header: */
- if (lws_hdr_total_length(wsi, WSI_TOKEN_CONNECTION)) {
- lws_hdr_copy(wsi, http_conn_str,
- sizeof(http_conn_str) - 1,
- WSI_TOKEN_CONNECTION);
+ if (lws_hdr_total_length(wsi, WSI_TOKEN_CONNECTION) &&
+ lws_hdr_copy(wsi, http_conn_str, sizeof(http_conn_str) - 1,
+ WSI_TOKEN_CONNECTION) > 0) {
http_conn_str[sizeof(http_conn_str) - 1] = '\0';
if (!strcasecmp(http_conn_str, "keep-alive"))
- connection_type = HTTP_CONNECTION_KEEP_ALIVE;
+ conn_type = HTTP_CONNECTION_KEEP_ALIVE;
else
if (!strcasecmp(http_conn_str, "close"))
- connection_type = HTTP_CONNECTION_CLOSE;
+ conn_type = HTTP_CONNECTION_CLOSE;
}
- wsi->http.connection_type = connection_type;
+ wsi->http.conn_type = conn_type;
}
n = wsi->protocol->callback(wsi, LWS_CALLBACK_FILTER_HTTP_CONNECTION,
@@ -970,7 +1038,7 @@ lws_http_action(struct lws *wsi)
* URI from the host: header and ignore the path part
*/
unsigned char *start = pt->serv_buf + LWS_PRE, *p = start,
- *end = p + 512;
+ *end = p + wsi->context->pt_serv_buf_size - LWS_PRE;
if (!lws_hdr_total_length(wsi, WSI_TOKEN_HOST))
goto bail_nuke_ah;
@@ -988,7 +1056,7 @@ lws_http_action(struct lws *wsi)
#endif
#ifdef LWS_WITH_ACCESS_LOG
- lws_prepare_access_log_info(wsi, uri_ptr, meth);
+ lws_prepare_access_log_info(wsi, uri_ptr, uri_len, meth);
#endif
/* can we serve it from the mount list? */
@@ -999,12 +1067,13 @@ lws_http_action(struct lws *wsi)
lwsl_info("no hit\n");
- if (lws_bind_protocol(wsi, &wsi->vhost->protocols[0]))
+ if (lws_bind_protocol(wsi, &wsi->vhost->protocols[0],
+ "no mount hit"))
return 1;
lwsi_set_state(wsi, LRS_DOING_TRANSACTION);
- n = wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP,
+ m = wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP,
wsi->user_space, uri_ptr, uri_len);
goto after;
@@ -1035,10 +1104,11 @@ lws_http_action(struct lws *wsi)
hit->origin_protocol == LWSMPRO_REDIR_HTTPS)) &&
(hit->origin_protocol != LWSMPRO_CGI &&
hit->origin_protocol != LWSMPRO_CALLBACK)) {
- unsigned char *start = pt->serv_buf + LWS_PRE,
- *p = start, *end = p + 512;
+ unsigned char *start = pt->serv_buf + LWS_PRE, *p = start,
+ *end = p + wsi->context->pt_serv_buf_size -
+ LWS_PRE - 512;
- lwsl_debug("Doing 301 '%s' org %s\n", s, hit->origin);
+ lwsl_info("Doing 301 '%s' org %s\n", s, hit->origin);
/* > at start indicates deal with by redirect */
if (hit->origin_protocol == LWSMPRO_REDIR_HTTP ||
@@ -1075,12 +1145,21 @@ lws_http_action(struct lws *wsi)
/* basic auth? */
if (hit->basic_auth_login_file) {
- char b64[160], plain[(sizeof(b64) * 3) / 4];
- int m;
+ char b64[160], plain[(sizeof(b64) * 3) / 4], *pcolon;
+ int m, ml, fi;
/* Did he send auth? */
- if (!lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_AUTHORIZATION))
+ ml = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_AUTHORIZATION);
+ if (!ml)
+ return lws_unauthorised_basic_auth(wsi);
+
+ /* Disallow fragmentation monkey business */
+
+ fi = wsi->http.ah->frag_index[WSI_TOKEN_HTTP_AUTHORIZATION];
+ if (wsi->http.ah->frags[fi].nfrag) {
+ lwsl_err("fragmented basic auth header not allowed\n");
return lws_unauthorised_basic_auth(wsi);
+ }
n = HTTP_STATUS_FORBIDDEN;
@@ -1099,21 +1178,36 @@ lws_http_action(struct lws *wsi)
/* It'll be like Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l */
- m = lws_b64_decode_string(b64 + 6, plain, sizeof(plain));
+ m = lws_b64_decode_string(b64 + 6, plain, sizeof(plain) - 1);
if (m < 0) {
lwsl_err("plain auth too long\n");
goto transaction_result_n;
}
+ plain[m] = '\0';
+ pcolon = strchr(plain, ':');
+ if (!pcolon) {
+ lwsl_err("basic auth format broken\n");
+ return lws_unauthorised_basic_auth(wsi);
+ }
if (!lws_find_string_in_file(hit->basic_auth_login_file,
plain, m)) {
lwsl_err("basic auth lookup failed\n");
return lws_unauthorised_basic_auth(wsi);
}
- lwsl_info("basic auth accepted\n");
+ /*
+ * Rewrite WSI_TOKEN_HTTP_AUTHORIZATION so it is just the
+ * authorized username
+ */
- /* accept the auth */
+ *pcolon = '\0';
+ wsi->http.ah->frags[fi].len = lws_ptr_diff(pcolon, plain);
+ pcolon = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HTTP_AUTHORIZATION);
+ strncpy(pcolon, plain, ml - 1);
+ pcolon[ml - 1] = '\0';
+ lwsl_info("%s: basic auth accepted for %s\n", __func__,
+ lws_hdr_simple_ptr(wsi, WSI_TOKEN_HTTP_AUTHORIZATION));
}
#if defined(LWS_WITH_HTTP_PROXY)
@@ -1121,15 +1215,21 @@ lws_http_action(struct lws *wsi)
* The mount is a reverse proxy?
*/
+ // lwsl_notice("%s: origin_protocol: %d\n", __func__, hit->origin_protocol);
+
if (hit->origin_protocol == LWSMPRO_HTTPS ||
hit->origin_protocol == LWSMPRO_HTTP) {
+ char ads[96], rpath[256], *pcolon, *pslash, unix_skt = 0;
struct lws_client_connect_info i;
- char ads[96], rpath[256], *pcolon, *pslash, *p;
+ struct lws *cwsi;
int n, na;
memset(&i, 0, sizeof(i));
i.context = lws_get_context(wsi);
+ if (hit->origin[0] == '+')
+ unix_skt = 1;
+
pcolon = strchr(hit->origin, ':');
pslash = strchr(hit->origin, '/');
if (!pslash) {
@@ -1137,16 +1237,28 @@ lws_http_action(struct lws *wsi)
hit->origin);
return -1;
}
- if (pcolon > pslash)
- pcolon = NULL;
- if (pcolon)
- n = pcolon - hit->origin;
- else
- n = pslash - hit->origin;
+ if (unix_skt) {
+ if (!pcolon) {
+ lwsl_err("Proxy mount origin for unix skt must "
+ "have address delimited by :\n");
+
+ return -1;
+ }
+ n = lws_ptr_diff(pcolon, hit->origin);
+ pslash = pcolon;
+ } else {
+ if (pcolon > pslash)
+ pcolon = NULL;
+
+ if (pcolon)
+ n = (int)(pcolon - hit->origin);
+ else
+ n = (int)(pslash - hit->origin);
- if (n >= (int)sizeof(ads) - 2)
- n = sizeof(ads) - 2;
+ if (n >= (int)sizeof(ads) - 2)
+ n = sizeof(ads) - 2;
+ }
memcpy(ads, hit->origin, n);
ads[n] = '\0';
@@ -1160,41 +1272,75 @@ lws_http_action(struct lws *wsi)
if (pcolon)
i.port = atoi(pcolon + 1);
- lws_snprintf(rpath, sizeof(rpath) - 1, "/%s/%s", pslash + 1,
- uri_ptr + hit->mountpoint_len);
+ n = lws_snprintf(rpath, sizeof(rpath) - 1, "/%s/%s",
+ pslash + 1, uri_ptr + hit->mountpoint_len) - 2;
lws_clean_url(rpath);
na = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_URI_ARGS);
if (na) {
- p = rpath + strlen(rpath);
- *p++ = '?';
- lws_hdr_copy(wsi, p, &rpath[sizeof(rpath) - 1] - p,
- WSI_TOKEN_HTTP_URI_ARGS);
- while (--na) {
- if (*p == '\0')
- *p = '&';
- p++;
+ char *p = rpath + n;
+
+ if (na >= (int)sizeof(rpath) - n - 2) {
+ lwsl_info("%s: query string %d longer "
+ "than we can handle\n", __func__,
+ na);
+
+ return -1;
}
- }
+ *p++ = '?';
+ if (lws_hdr_copy(wsi, p,
+ (int)(&rpath[sizeof(rpath) - 1] - p),
+ WSI_TOKEN_HTTP_URI_ARGS) > 0)
+ while (na--) {
+ if (*p == '\0')
+ *p = '&';
+ p++;
+ }
+ *p = '\0';
+ }
i.path = rpath;
- i.host = i.address;
+ if (i.address[0] != '+' ||
+ !lws_hdr_simple_ptr(wsi, WSI_TOKEN_HOST))
+ i.host = i.address;
+ else
+ i.host = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HOST);
i.origin = NULL;
i.method = "GET";
+ i.alpn = "http/1.1";
i.parent_wsi = wsi;
- i.uri_replace_from = hit->origin;
- i.uri_replace_to = hit->mountpoint;
+ i.pwsi = &cwsi;
+
+ // i.uri_replace_from = hit->origin;
+ // i.uri_replace_to = hit->mountpoint;
- lwsl_notice("proxying to %s port %d url %s, ssl %d, "
+ lwsl_info("proxying to %s port %d url %s, ssl %d, "
"from %s, to %s\n",
i.address, i.port, i.path, i.ssl_connection,
i.uri_replace_from, i.uri_replace_to);
if (!lws_client_connect_via_info(&i)) {
lwsl_err("proxy connect fail\n");
+
+ /*
+ * ... we can't do the proxy action, but we can
+ * cleanly return him a 503 and a description
+ */
+
+ lws_return_http_status(wsi,
+ HTTP_STATUS_SERVICE_UNAVAILABLE,
+ "<h1>Service Temporarily Unavailable</h1>"
+ "The server is temporarily unable to service "
+ "your request due to maintenance downtime or "
+ "capacity problems. Please try again later.");
+
return 1;
}
+ lwsl_info("%s: setting proxy clientside on %p (parent %p)\n",
+ __func__, cwsi, lws_get_parent(cwsi));
+ cwsi->http.proxy_clientside = 1;
+
return 0;
}
#endif
@@ -1219,7 +1365,7 @@ lws_http_action(struct lws *wsi)
return 1;
}
- if (lws_bind_protocol(wsi, pp))
+ if (lws_bind_protocol(wsi, pp, "http action CALLBACK bind"))
return 1;
args.p = uri_ptr;
@@ -1245,7 +1391,7 @@ lws_http_action(struct lws *wsi)
return 1;
if (lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI)) {
- n = wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP,
+ m = wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP,
wsi->user_space,
uri_ptr + hit->mountpoint_len,
uri_len - hit->mountpoint_len);
@@ -1279,7 +1425,7 @@ lws_http_action(struct lws *wsi)
}
#endif
- n = (int)strlen(s);
+ n = uri_len - lws_ptr_diff(s, uri_ptr); // (int)strlen(s);
if (s[0] == '\0' || (n == 1 && s[n - 1] == '/'))
s = (char *)hit->def;
if (!s)
@@ -1290,10 +1436,11 @@ lws_http_action(struct lws *wsi)
wsi->cache_revalidate = hit->cache_revalidate;
wsi->cache_intermediaries = hit->cache_intermediaries;
- n = 1;
+ m = 1;
if (hit->origin_protocol == LWSMPRO_FILE)
- n = lws_http_serve(wsi, s, hit->origin, hit);
- if (n) {
+ m = lws_http_serve(wsi, s, hit->origin, hit);
+
+ if (m > 0) {
/*
* lws_return_http_status(wsi, HTTP_STATUS_NOT_FOUND, NULL);
*/
@@ -1302,20 +1449,22 @@ lws_http_action(struct lws *wsi)
lws_vhost_name_to_protocol(
wsi->vhost, hit->protocol);
- if (lws_bind_protocol(wsi, pp))
+ lwsi_set_state(wsi, LRS_DOING_TRANSACTION);
+
+ if (lws_bind_protocol(wsi, pp, "http_action HTTP"))
return 1;
- n = pp->callback(wsi, LWS_CALLBACK_HTTP,
+ m = pp->callback(wsi, LWS_CALLBACK_HTTP,
wsi->user_space,
uri_ptr + hit->mountpoint_len,
uri_len - hit->mountpoint_len);
} else
- n = wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP,
+ m = wsi->protocol->callback(wsi, LWS_CALLBACK_HTTP,
wsi->user_space, uri_ptr, uri_len);
}
after:
- if (n) {
+ if (m) {
lwsl_info("LWS_CALLBACK_HTTP closing\n");
return 1;
@@ -1337,9 +1486,35 @@ deal_body:
lwsl_debug("wsi->http.rx_content_length %lld %d %d\n",
(long long)wsi->http.rx_content_length,
wsi->upgraded_to_http2, wsi->http2_substream);
+
+ if (wsi->http.content_length_explicitly_zero &&
+ lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI)) {
+
+ /*
+ * POST with an explicit content-length of zero
+ *
+ * If we don't give the user code the empty HTTP_BODY
+ * callback, he may become confused to hear the
+ * HTTP_BODY_COMPLETION (due to, eg, instantiation of
+ * lws_spa never happened).
+ *
+ * HTTP_BODY_COMPLETION is responsible for sending the
+ * result status code and result body if any, and
+ * do the transaction complete processing.
+ */
+ if (wsi->protocol->callback(wsi,
+ LWS_CALLBACK_HTTP_BODY,
+ wsi->user_space, NULL, 0))
+ return 1;
+ if (wsi->protocol->callback(wsi,
+ LWS_CALLBACK_HTTP_BODY_COMPLETION,
+ wsi->user_space, NULL, 0))
+ return 1;
+
+ return 0;
+ }
+
if (wsi->http.rx_content_length > 0) {
- struct lws_tokens ebuf;
- int m;
lwsi_set_state(wsi, LRS_BODY);
lwsl_info("%s: %p: LRS_BODY state set (0x%x)\n",
@@ -1355,12 +1530,18 @@ deal_body:
*/
while (1) {
+ struct lws_tokens ebuf;
+ int m;
+
ebuf.len = (int)lws_buflist_next_segment_len(
- &wsi->buflist, (uint8_t **)&ebuf.token);
+ &wsi->buflist,
+ (uint8_t **)&ebuf.token);
if (!ebuf.len)
break;
- lwsl_notice("%s: consuming %d\n", __func__, (int)ebuf.len);
- m = lws_read_h1(wsi, (uint8_t *)ebuf.token, ebuf.len);
+ lwsl_notice("%s: consuming %d\n", __func__,
+ (int)ebuf.len);
+ m = lws_read_h1(wsi, (uint8_t *)ebuf.token,
+ ebuf.len);
if (m < 0)
return -1;
@@ -1384,6 +1565,75 @@ transaction_result_n:
}
int
+lws_confirm_host_header(struct lws *wsi)
+{
+ struct lws_tokenize ts;
+ lws_tokenize_elem e;
+ char buf[128];
+ int port = 80;
+
+ /*
+ * this vhost wants us to validate what the
+ * client sent against our vhost name
+ */
+
+ if (!lws_hdr_total_length(wsi, WSI_TOKEN_HOST)) {
+ lwsl_info("%s: missing host on upgrade\n", __func__);
+
+ return 1;
+ }
+
+#if defined(LWS_WITH_TLS)
+ if (wsi->tls.ssl)
+ port = 443;
+#endif
+
+ lws_tokenize_init(&ts, buf, LWS_TOKENIZE_F_DOT_NONTERM /* server.com */|
+ LWS_TOKENIZE_F_NO_FLOATS /* 1.server.com */|
+ LWS_TOKENIZE_F_MINUS_NONTERM /* a-b.com */);
+ ts.len = lws_hdr_copy(wsi, buf, sizeof(buf) - 1, WSI_TOKEN_HOST);
+ if (ts.len <= 0) {
+ lwsl_info("%s: missing or oversize host header\n", __func__);
+ return 1;
+ }
+
+ if (lws_tokenize(&ts) != LWS_TOKZE_TOKEN)
+ goto bad_format;
+
+ if (strncmp(ts.token, wsi->vhost->name, ts.token_len)) {
+ buf[(ts.token - buf) + ts.token_len] = '\0';
+ lwsl_info("%s: '%s' in host hdr but vhost name %s\n",
+ __func__, ts.token, wsi->vhost->name);
+ return 1;
+ }
+
+ e = lws_tokenize(&ts);
+ if (e == LWS_TOKZE_DELIMITER && ts.token[0] == ':') {
+ if (lws_tokenize(&ts) != LWS_TOKZE_INTEGER)
+ goto bad_format;
+ else
+ port = atoi(ts.token);
+ } else
+ if (e != LWS_TOKZE_ENDED)
+ goto bad_format;
+
+ if (wsi->vhost->listen_port != port) {
+ lwsl_info("%s: host port %d mismatches vhost port %d\n",
+ __func__, port, wsi->vhost->listen_port);
+ return 1;
+ }
+
+ lwsl_debug("%s: host header OK\n", __func__);
+
+ return 0;
+
+bad_format:
+ lwsl_info("%s: bad host header format\n", __func__);
+
+ return 1;
+}
+
+int
lws_handshake_server(struct lws *wsi, unsigned char **buf, size_t len)
{
struct lws_context *context = lws_get_context(wsi);
@@ -1427,7 +1677,8 @@ raw_transition:
lws_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
lws_bind_protocol(wsi, &wsi->vhost->protocols[
wsi->vhost->
- raw_protocol_index]);
+ raw_protocol_index],
+ __func__);
lwsl_info("transition to raw vh %s prot %d\n",
wsi->vhost->name,
wsi->vhost->raw_protocol_index);
@@ -1440,7 +1691,7 @@ raw_transition:
&role_ops_raw_skt);
lws_header_table_detach(wsi, 1);
- if (m == 2 && (wsi->protocol->callback)(wsi,
+ if (wsi->protocol->callback(wsi,
LWS_CALLBACK_RAW_RX,
wsi->user_space, obuf, olen))
return 1;
@@ -1458,13 +1709,14 @@ raw_transition:
/* select vhost */
- if (lws_hdr_total_length(wsi, WSI_TOKEN_HOST)) {
+ if (wsi->vhost->listen_port &&
+ lws_hdr_total_length(wsi, WSI_TOKEN_HOST)) {
struct lws_vhost *vhost = lws_select_vhost(
context, wsi->vhost->listen_port,
lws_hdr_simple_ptr(wsi, WSI_TOKEN_HOST));
if (vhost)
- wsi->vhost = vhost;
+ lws_vhost_bind_wsi(vhost, wsi);
} else
lwsl_info("no host\n");
@@ -1506,7 +1758,7 @@ raw_transition:
&uri_ptr, &uri_len);
if (meth >= 0)
lws_prepare_access_log_info(wsi,
- uri_ptr, meth);
+ uri_ptr, uri_len, meth);
/* wsi close will do the log */
#endif
@@ -1532,12 +1784,49 @@ raw_transition:
lwsi_set_state(wsi, LRS_PRE_WS_SERVING_ACCEPT);
lws_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
- /* is this websocket protocol or normal http 1.0? */
-
if (lws_hdr_total_length(wsi, WSI_TOKEN_UPGRADE)) {
- if (!strcasecmp(lws_hdr_simple_ptr(wsi,
- WSI_TOKEN_UPGRADE),
- "websocket")) {
+
+ const char *up = lws_hdr_simple_ptr(wsi,
+ WSI_TOKEN_UPGRADE);
+
+ if (strcasecmp(up, "websocket") &&
+ strcasecmp(up, "h2c")) {
+ lwsl_info("Unknown upgrade '%s'\n", up);
+
+ if (lws_return_http_status(wsi,
+ HTTP_STATUS_FORBIDDEN, NULL) ||
+ lws_http_transaction_completed(wsi))
+ goto bail_nuke_ah;
+ }
+
+ n = user_callback_handle_rxflow(wsi->protocol->callback,
+ wsi, LWS_CALLBACK_HTTP_CONFIRM_UPGRADE,
+ wsi->user_space, (char *)up, 0);
+
+ /* just hang up? */
+
+ if (n < 0)
+ goto bail_nuke_ah;
+
+ /* callback returned headers already, do t_c? */
+
+ if (n > 0) {
+ if (lws_http_transaction_completed(wsi))
+ goto bail_nuke_ah;
+
+ /* continue on */
+
+ return 0;
+ }
+
+ /* callback said 0, it was allowed */
+
+ if (wsi->vhost->options &
+ LWS_SERVER_OPTION_VHOST_UPG_STRICT_HOST_CHECK &&
+ lws_confirm_host_header(wsi))
+ goto bail_nuke_ah;
+
+ if (!strcasecmp(up, "websocket")) {
#if defined(LWS_ROLE_WS)
wsi->vhost->conn_stats.ws_upg++;
lwsl_info("Upgrade to ws\n");
@@ -1545,17 +1834,12 @@ raw_transition:
#endif
}
#if defined(LWS_WITH_HTTP2)
- if (!strcasecmp(lws_hdr_simple_ptr(wsi,
- WSI_TOKEN_UPGRADE),
- "h2c")) {
+ if (!strcasecmp(up, "h2c")) {
wsi->vhost->conn_stats.h2_upg++;
lwsl_info("Upgrade to h2c\n");
goto upgrade_h2c;
}
#endif
- lwsl_info("Unknown upgrade\n");
- /* dunno what he wanted to upgrade to */
- goto bail_nuke_ah;
}
/* no upgrade ack... he remained as HTTP */
@@ -1565,6 +1849,10 @@ raw_transition:
lwsi_set_state(wsi, LRS_ESTABLISHED);
wsi->http.fop_fd = NULL;
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ lws_http_compression_validate(wsi);
+#endif
+
lwsl_debug("%s: wsi %p: ah %p\n", __func__, (void *)wsi,
(void *)wsi->http.ah);
@@ -1641,91 +1929,17 @@ bail_nuke_ah:
}
-static int
-lws_get_idlest_tsi(struct lws_context *context)
-{
- unsigned int lowest = ~0;
- int n = 0, hit = -1;
-
- for (; n < context->count_threads; n++) {
- if ((unsigned int)context->pt[n].fds_count !=
- context->fd_limit_per_thread - 1 &&
- (unsigned int)context->pt[n].fds_count < lowest) {
- lowest = context->pt[n].fds_count;
- hit = n;
- }
- }
-
- return hit;
-}
-
-struct lws *
-lws_create_new_server_wsi(struct lws_vhost *vhost, int fixed_tsi)
-{
- struct lws *new_wsi;
- int n = fixed_tsi;
-
- if (n < 0)
- n = lws_get_idlest_tsi(vhost->context);
-
- if (n < 0) {
- lwsl_err("no space for new conn\n");
- return NULL;
- }
-
- new_wsi = lws_zalloc(sizeof(struct lws), "new server wsi");
- if (new_wsi == NULL) {
- lwsl_err("Out of memory for new connection\n");
- return NULL;
- }
-
- new_wsi->tsi = n;
- lwsl_debug("new wsi %p joining vhost %s, tsi %d\n", new_wsi,
- vhost->name, new_wsi->tsi);
-
- new_wsi->vhost = vhost;
- new_wsi->context = vhost->context;
- new_wsi->pending_timeout = NO_PENDING_TIMEOUT;
- new_wsi->rxflow_change_to = LWS_RXFLOW_ALLOW;
-
- /* initialize the instance struct */
-
- lwsi_set_state(new_wsi, LRS_UNCONNECTED);
- new_wsi->hdr_parsing_completed = 0;
-
-#ifdef LWS_WITH_TLS
- new_wsi->tls.use_ssl = LWS_SSL_ENABLED(vhost);
-#endif
-
- /*
- * these can only be set once the protocol is known
- * we set an un-established connection's protocol pointer
- * to the start of the supported list, so it can look
- * for matching ones during the handshake
- */
- new_wsi->protocol = vhost->protocols;
- new_wsi->user_space = NULL;
- new_wsi->desc.sockfd = LWS_SOCK_INVALID;
- new_wsi->position_in_fds_table = LWS_NO_FDS_POS;
-
- vhost->context->count_wsi_allocated++;
-
- /*
- * outermost create notification for wsi
- * no user_space because no protocol selection
- */
- vhost->protocols[0].callback(new_wsi, LWS_CALLBACK_WSI_CREATE,
- NULL, NULL, 0);
-
- return new_wsi;
-}
-
LWS_VISIBLE int LWS_WARN_UNUSED_RESULT
lws_http_transaction_completed(struct lws *wsi)
{
int n = NO_PENDING_TIMEOUT;
- if (wsi->trunc_len) {
+ if (lws_has_buffered_out(wsi)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ || wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more
+#endif
+ ) {
/*
* ...so he tried to send something large as the http reply,
* it went as a partial, but he immediately said the
@@ -1734,14 +1948,18 @@ lws_http_transaction_completed(struct lws *wsi)
* Defer the transaction completed until the last part of the
* partial is sent.
*/
- lwsl_notice("%s: deferring due to partial\n", __func__);
+ lwsl_debug("%s: %p: deferring due to partial\n", __func__, wsi);
wsi->http.deferred_transaction_completed = 1;
+ lws_callback_on_writable(wsi);
return 0;
}
lwsl_info("%s: wsi %p\n", __func__, wsi);
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ lws_http_compression_destroy(wsi);
+#endif
lws_access_log(wsi);
if (!wsi->hdr_parsing_completed) {
@@ -1755,17 +1973,17 @@ lws_http_transaction_completed(struct lws *wsi)
/* if we can't go back to accept new headers, drop the connection */
if (wsi->http2_substream)
- return 0;
+ return 1;
if (wsi->seen_zero_length_recv)
return 1;
- if (wsi->http.connection_type != HTTP_CONNECTION_KEEP_ALIVE) {
- lwsl_notice("%s: %p: close connection\n", __func__, wsi);
+ if (wsi->http.conn_type != HTTP_CONNECTION_KEEP_ALIVE) {
+ lwsl_info("%s: %p: close connection\n", __func__, wsi);
return 1;
}
- if (lws_bind_protocol(wsi, &wsi->vhost->protocols[0]))
+ if (lws_bind_protocol(wsi, &wsi->vhost->protocols[0], __func__))
return 1;
/*
@@ -1780,6 +1998,7 @@ lws_http_transaction_completed(struct lws *wsi)
wsi->http.tx_content_length = 0;
wsi->http.tx_content_remain = 0;
wsi->hdr_parsing_completed = 0;
+ wsi->sending_chunked = 0;
#ifdef LWS_WITH_ACCESS_LOG
wsi->http.access_log.sent = 0;
#endif
@@ -1803,7 +2022,7 @@ lws_http_transaction_completed(struct lws *wsi)
if (wsi->http.ah) {
// lws_buflist_describe(&wsi->buflist, wsi);
if (!lws_buflist_next_segment_len(&wsi->buflist, NULL)) {
- lwsl_info("%s: %p: nothing in buflist so detaching ah\n",
+ lwsl_debug("%s: %p: nothing in buflist, detaching ah\n",
__func__, wsi);
lws_header_table_detach(wsi, 1);
#ifdef LWS_WITH_TLS
@@ -1823,7 +2042,7 @@ lws_http_transaction_completed(struct lws *wsi)
}
#endif
} else {
- lwsl_info("%s: %p: resetting and keeping ah as pipeline\n",
+ lwsl_info("%s: %p: resetting/keeping ah as pipeline\n",
__func__, wsi);
lws_header_table_reset(wsi, 0);
/*
@@ -1839,360 +2058,41 @@ lws_http_transaction_completed(struct lws *wsi)
if (wsi->http.ah)
wsi->http.ah->ues = URIES_IDLE;
- //lwsi_set_state(wsi, LRS_ESTABLISHED);
+ //lwsi_set_state(wsi, LRS_ESTABLISHED); // !!!
} else
if (lws_buflist_next_segment_len(&wsi->buflist, NULL))
if (lws_header_table_attach(wsi, 0))
lwsl_debug("acquired ah\n");
- lwsl_info("%s: %p: keep-alive await new transaction\n", __func__, wsi);
+ lwsl_debug("%s: %p: keep-alive await new transaction (state 0x%x)\n",
+ __func__, wsi, wsi->wsistate);
lws_callback_on_writable(wsi);
return 0;
}
-/* if not a socket, it's a raw, non-ssl file descriptor */
-
-LWS_VISIBLE struct lws *
-lws_adopt_descriptor_vhost(struct lws_vhost *vh, lws_adoption_type type,
- lws_sock_file_fd_type fd, const char *vh_prot_name,
- struct lws *parent)
-{
- struct lws_context *context = vh->context;
- struct lws *new_wsi;
- struct lws_context_per_thread *pt;
- int n, ssl = 0;
-
-#if defined(LWS_WITH_PEER_LIMITS)
- struct lws_peer *peer = NULL;
-
- if (type & LWS_ADOPT_SOCKET && !(type & LWS_ADOPT_WS_PARENTIO)) {
- peer = lws_get_or_create_peer(vh, fd.sockfd);
-
- if (peer && context->ip_limit_wsi &&
- peer->count_wsi >= context->ip_limit_wsi) {
- lwsl_notice("Peer reached wsi limit %d\n",
- context->ip_limit_wsi);
- lws_stats_atomic_bump(context, &context->pt[0],
- LWSSTATS_C_PEER_LIMIT_WSI_DENIED, 1);
- return NULL;
- }
- }
-#endif
-
- n = -1;
- if (parent)
- n = parent->tsi;
- new_wsi = lws_create_new_server_wsi(vh, n);
- if (!new_wsi) {
- if (type & LWS_ADOPT_SOCKET && !(type & LWS_ADOPT_WS_PARENTIO))
- compatible_close(fd.sockfd);
- return NULL;
- }
-#if defined(LWS_WITH_PEER_LIMITS)
- if (peer)
- lws_peer_add_wsi(context, peer, new_wsi);
-#endif
- pt = &context->pt[(int)new_wsi->tsi];
- lws_stats_atomic_bump(context, pt, LWSSTATS_C_CONNECTIONS, 1);
-
- if (parent) {
- new_wsi->parent = parent;
- new_wsi->sibling_list = parent->child_list;
- parent->child_list = new_wsi;
-
- if (type & LWS_ADOPT_WS_PARENTIO)
- new_wsi->parent_carries_io = 1;
- }
-
- new_wsi->desc = fd;
-
- if (vh_prot_name) {
- new_wsi->protocol = lws_vhost_name_to_protocol(new_wsi->vhost,
- vh_prot_name);
- if (!new_wsi->protocol) {
- lwsl_err("Protocol %s not enabled on vhost %s\n",
- vh_prot_name, new_wsi->vhost->name);
- goto bail;
- }
- if (lws_ensure_user_space(new_wsi)) {
- lwsl_notice("OOM trying to get user_space\n");
- goto bail;
- }
-#if defined(LWS_ROLE_WS)
- if (type & LWS_ADOPT_WS_PARENTIO) {
- new_wsi->desc.sockfd = LWS_SOCK_INVALID;
- lwsl_debug("binding to %s\n", new_wsi->protocol->name);
- lws_bind_protocol(new_wsi, new_wsi->protocol);
- lws_role_transition(new_wsi, LWSIFR_SERVER,
- LRS_ESTABLISHED, &role_ops_ws);
- /* allocate the ws struct for the wsi */
- new_wsi->ws = lws_zalloc(sizeof(*new_wsi->ws), "ws struct");
- if (!new_wsi->ws) {
- lwsl_notice("OOM\n");
- goto bail;
- }
- lws_server_init_wsi_for_ws(new_wsi);
-
- return new_wsi;
- }
-#endif
- } else
-#if defined(LWS_ROLE_H1)
- if (type & LWS_ADOPT_HTTP) {/* he will transition later */
- new_wsi->protocol =
- &vh->protocols[vh->default_protocol_index];
- new_wsi->role_ops = &role_ops_h1;
- }
- else
-#endif
- { /* this is the only time he will transition */
- lws_bind_protocol(new_wsi,
- &vh->protocols[vh->raw_protocol_index]);
- lws_role_transition(new_wsi, 0, LRS_ESTABLISHED,
- &role_ops_raw_skt);
- }
-
- if (type & LWS_ADOPT_SOCKET) { /* socket desc */
- lwsl_debug("%s: new wsi %p, sockfd %d\n", __func__, new_wsi,
- (int)(lws_intptr_t)fd.sockfd);
-#if !defined(LWS_WITH_ESP32)
- if (type & LWS_ADOPT_FLAG_UDP)
- /*
- * these can be >128 bytes, so just alloc for UDP
- */
- new_wsi->udp = lws_malloc(sizeof(*new_wsi->udp),
- "udp struct");
-#endif
-
- if (type & LWS_ADOPT_HTTP)
- /* the transport is accepted...
- * give him time to negotiate */
- lws_set_timeout(new_wsi,
- PENDING_TIMEOUT_ESTABLISH_WITH_SERVER,
- context->timeout_secs);
-
- } else /* file desc */
- lwsl_debug("%s: new wsi %p, filefd %d\n", __func__, new_wsi,
- (int)(lws_intptr_t)fd.filefd);
-
- /*
- * A new connection was accepted. Give the user a chance to
- * set properties of the newly created wsi. There's no protocol
- * selected yet so we issue this to the vhosts's default protocol,
- * itself by default protocols[0]
- */
- n = LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED;
- if (!(type & LWS_ADOPT_HTTP)) {
- if (!(type & LWS_ADOPT_SOCKET))
- n = LWS_CALLBACK_RAW_ADOPT_FILE;
- else
- n = LWS_CALLBACK_RAW_ADOPT;
- }
-
- if (!LWS_SSL_ENABLED(new_wsi->vhost) || !(type & LWS_ADOPT_ALLOW_SSL) ||
- !(type & LWS_ADOPT_SOCKET)) {
- /* non-SSL */
- if (!(type & LWS_ADOPT_HTTP)) {
- if (!(type & LWS_ADOPT_SOCKET))
- lws_role_transition(new_wsi, 0, LRS_ESTABLISHED,
- &role_ops_raw_file);
- else
- lws_role_transition(new_wsi, 0, LRS_ESTABLISHED,
- &role_ops_raw_skt);
- }
-#if defined(LWS_ROLE_H1)
- else
- lws_role_transition(new_wsi, LWSIFR_SERVER,
- LRS_HEADERS, &role_ops_h1);
-#endif
- } else {
- /* SSL */
- if (!(type & LWS_ADOPT_HTTP))
- lws_role_transition(new_wsi, 0, LRS_SSL_INIT,
- &role_ops_raw_skt);
-#if defined(LWS_ROLE_H1)
- else
- lws_role_transition(new_wsi, LWSIFR_SERVER,
- LRS_SSL_INIT, &role_ops_h1);
-#endif
- ssl = 1;
- }
-
- lwsl_debug("new wsi wsistate 0x%x\n", new_wsi->wsistate);
-
- if (context->event_loop_ops->accept)
- context->event_loop_ops->accept(new_wsi);
-
- if (!ssl) {
- lws_pt_lock(pt, __func__);
- if (__insert_wsi_socket_into_fds(context, new_wsi)) {
- lws_pt_unlock(pt);
- lwsl_err("%s: fail inserting socket\n", __func__);
- goto fail;
- }
- lws_pt_unlock(pt);
- } else
- if (lws_server_socket_service_ssl(new_wsi, fd.sockfd)) {
- lwsl_info("%s: fail ssl negotiation\n", __func__);
- goto fail;
- }
-
- /*
- * by deferring callback to this point, after insertion to fds,
- * lws_callback_on_writable() can work from the callback
- */
- if ((new_wsi->protocol->callback)(
- new_wsi, n, new_wsi->user_space, NULL, 0))
- goto fail;
-
- if (type & LWS_ADOPT_HTTP) {
- if (!lws_header_table_attach(new_wsi, 0))
- lwsl_debug("Attached ah immediately\n");
- else
- lwsl_info("%s: waiting for ah\n", __func__);
- }
-
- lws_cancel_service_pt(new_wsi);
-
- return new_wsi;
-
-fail:
- if (type & LWS_ADOPT_SOCKET)
- lws_close_free_wsi(new_wsi, LWS_CLOSE_STATUS_NOSTATUS, "adopt skt fail");
-
- return NULL;
-
-bail:
- lwsl_notice("%s: exiting on bail\n", __func__);
- if (parent)
- parent->child_list = new_wsi->sibling_list;
- if (new_wsi->user_space)
- lws_free(new_wsi->user_space);
- lws_free(new_wsi);
- compatible_close(fd.sockfd);
-
- return NULL;
-}
-
-LWS_VISIBLE struct lws *
-lws_adopt_socket_vhost(struct lws_vhost *vh, lws_sockfd_type accept_fd)
-{
- lws_sock_file_fd_type fd;
-
- fd.sockfd = accept_fd;
- return lws_adopt_descriptor_vhost(vh, LWS_ADOPT_SOCKET |
- LWS_ADOPT_HTTP | LWS_ADOPT_ALLOW_SSL, fd, NULL, NULL);
-}
-
-LWS_VISIBLE struct lws *
-lws_adopt_socket(struct lws_context *context, lws_sockfd_type accept_fd)
-{
- return lws_adopt_socket_vhost(context->vhost_list, accept_fd);
-}
-
-/* Common read-buffer adoption for lws_adopt_*_readbuf */
-static struct lws*
-adopt_socket_readbuf(struct lws *wsi, const char *readbuf, size_t len)
-{
- struct lws_context_per_thread *pt;
- struct lws_pollfd *pfd;
- int n;
-
- if (!wsi)
- return NULL;
-
- if (!readbuf || len == 0)
- return wsi;
-
- if (wsi->position_in_fds_table == LWS_NO_FDS_POS)
- return wsi;
-
- pt = &wsi->context->pt[(int)wsi->tsi];
-
- n = lws_buflist_append_segment(&wsi->buflist, (const uint8_t *)readbuf, len);
- if (n < 0)
- goto bail;
- if (n)
- lws_dll_lws_add_front(&wsi->dll_buflist, &pt->dll_head_buflist);
-
- /*
- * we can't process the initial read data until we can attach an ah.
- *
- * if one is available, get it and place the data in his ah rxbuf...
- * wsi with ah that have pending rxbuf get auto-POLLIN service.
- *
- * no autoservice because we didn't get a chance to attach the
- * readbuf data to wsi or ah yet, and we will do it next if we get
- * the ah.
- */
- if (wsi->http.ah || !lws_header_table_attach(wsi, 0)) {
-
- lwsl_notice("%s: calling service on readbuf ah\n", __func__);
-
- /* unlike a normal connect, we have the headers already
- * (or the first part of them anyway).
- * libuv won't come back and service us without a network
- * event, so we need to do the header service right here.
- */
- pfd = &pt->fds[wsi->position_in_fds_table];
- pfd->revents |= LWS_POLLIN;
- lwsl_err("%s: calling service\n", __func__);
- if (lws_service_fd_tsi(wsi->context, pfd, wsi->tsi))
- /* service closed us */
- return NULL;
-
- return wsi;
- }
- lwsl_err("%s: deferring handling ah\n", __func__);
-
- return wsi;
-
-bail:
- lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS, "adopt skt readbuf fail");
-
- return NULL;
-}
-
-LWS_VISIBLE struct lws *
-lws_adopt_socket_readbuf(struct lws_context *context, lws_sockfd_type accept_fd,
- const char *readbuf, size_t len)
-{
- return adopt_socket_readbuf(lws_adopt_socket(context, accept_fd),
- readbuf, len);
-}
-
-LWS_VISIBLE struct lws *
-lws_adopt_socket_vhost_readbuf(struct lws_vhost *vhost,
- lws_sockfd_type accept_fd,
- const char *readbuf, size_t len)
-{
- return adopt_socket_readbuf(lws_adopt_socket_vhost(vhost, accept_fd),
- readbuf, len);
-}
LWS_VISIBLE int
lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type,
const char *other_headers, int other_headers_len)
{
- static const char * const intermediates[] = { "private", "public" };
struct lws_context *context = lws_get_context(wsi);
struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
+ unsigned char *response = pt->serv_buf + LWS_PRE;
#if defined(LWS_WITH_RANGES)
struct lws_range_parsing *rp = &wsi->http.range;
#endif
+ int ret = 0, cclen = 8, n = HTTP_STATUS_OK;
char cache_control[50], *cc = "no-store";
- unsigned char *response = pt->serv_buf + LWS_PRE;
+ lws_fop_flags_t fflags = LWS_O_RDONLY;
+ const struct lws_plat_file_ops *fops;
+ lws_filepos_t total_content_length;
unsigned char *p = response;
unsigned char *end = p + context->pt_serv_buf_size - LWS_PRE;
- lws_filepos_t total_content_length;
- int ret = 0, cclen = 8, n = HTTP_STATUS_OK;
- lws_fop_flags_t fflags = LWS_O_RDONLY;
+ const char *vpath;
#if defined(LWS_WITH_RANGES)
int ranges;
#endif
- const struct lws_plat_file_ops *fops;
- const char *vpath;
if (wsi->handling_404)
n = HTTP_STATUS_NOT_FOUND;
@@ -2212,7 +2112,8 @@ lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type,
if (!wsi->http.fop_fd) {
lwsl_info("%s: Unable to open: '%s': errno %d\n",
__func__, file, errno);
- if (lws_return_http_status(wsi, HTTP_STATUS_NOT_FOUND, NULL))
+ if (lws_return_http_status(wsi, HTTP_STATUS_NOT_FOUND,
+ NULL))
return -1;
return !wsi->http2_substream;
}
@@ -2233,14 +2134,14 @@ lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type,
*/
if (ranges < 0) {
/* it means he expressed a range in Range:, but it was illegal */
- lws_return_http_status(wsi, HTTP_STATUS_REQ_RANGE_NOT_SATISFIABLE,
- NULL);
+ lws_return_http_status(wsi,
+ HTTP_STATUS_REQ_RANGE_NOT_SATISFIABLE, NULL);
if (lws_http_transaction_completed(wsi))
return -1; /* <0 means just hang up */
lws_vfs_file_close(&wsi->http.fop_fd);
- return 0; /* == 0 means we dealt with the transaction complete */
+ return 0; /* == 0 means we did the transaction complete */
}
if (ranges)
n = HTTP_STATUS_PARTIAL_CONTENT;
@@ -2258,6 +2159,20 @@ lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type,
return -1;
lwsl_info("file is being provided in gzip\n");
}
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ else {
+ /*
+ * if we know its very compressible, and we can use
+ * compression, then use the most preferred compression
+ * method that the client said he will accept
+ */
+
+ if (!strncmp(content_type, "text/", 5) ||
+ !strcmp(content_type, "application/javascript") ||
+ !strcmp(content_type, "image/svg+xml"))
+ lws_http_compression_apply(wsi, NULL, &p, end, 0);
+ }
+#endif
if (
#if defined(LWS_WITH_RANGES)
@@ -2339,40 +2254,78 @@ lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type,
#endif
if (!wsi->http2_substream) {
- if (!wsi->sending_chunked) {
+ /* for http/1.1 ... */
+ if (!wsi->sending_chunked
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ && !wsi->http.lcs
+#endif
+ ) {
+ /* ... if not already using chunked and not using an
+ * http compression translation, then send the naive
+ * content length
+ */
if (lws_add_http_header_content_length(wsi,
- total_content_length,
- &p, end))
+ total_content_length, &p, end))
return -1;
} else {
- if (lws_add_http_header_by_token(wsi,
- WSI_TOKEN_HTTP_TRANSFER_ENCODING,
- (unsigned char *)"chunked",
- 7, &p, end))
- return -1;
+
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (wsi->http.lcs) {
+
+ /* ...otherwise, for http 1 it must go chunked.
+ * For the compression case, the reason is we
+ * compress on the fly and do not know the
+ * compressed content-length until it has all
+ * been sent. Http/1.1 pipelining must be able
+ * to know where the transaction boundaries are
+ * ... so chunking...
+ */
+ if (lws_add_http_header_by_token(wsi,
+ WSI_TOKEN_HTTP_TRANSFER_ENCODING,
+ (unsigned char *)"chunked", 7,
+ &p, end))
+ return -1;
+
+ /*
+ * ...this is fun, isn't it :-) For h1 that is
+ * using an http compression translation, the
+ * compressor must chunk its output privately.
+ *
+ * h2 doesn't need (or support) any of this
+ * crap.
+ */
+ lwsl_debug("setting chunking\n");
+ wsi->http.comp_ctx.chunking = 1;
+ }
+#endif
}
}
if (wsi->cache_secs && wsi->cache_reuse) {
- if (wsi->cache_revalidate) {
+ if (!wsi->cache_revalidate) {
cc = cache_control;
- cclen = sprintf(cache_control, "%s max-age: %u",
+ cclen = sprintf(cache_control, "%s, max-age=%u",
intermediates[wsi->cache_intermediaries],
wsi->cache_secs);
} else {
- cc = "no-cache";
- cclen = 8;
+ cc = cache_control;
+ cclen = sprintf(cache_control,
+ "must-revalidate, %s, max-age=%u",
+ intermediates[wsi->cache_intermediaries],
+ wsi->cache_secs);
+
}
}
- if (lws_add_http_header_by_token(wsi, WSI_TOKEN_HTTP_CACHE_CONTROL,
- (unsigned char *)cc, cclen, &p, end))
- return -1;
-
- if (wsi->http.connection_type == HTTP_CONNECTION_KEEP_ALIVE)
- if (lws_add_http_header_by_token(wsi, WSI_TOKEN_CONNECTION,
- (unsigned char *)"keep-alive", 10, &p, end))
+ /* Only add cache control if its not specified by any other_headers. */
+ if (!other_headers ||
+ (!strstr(other_headers, "cache-control") &&
+ !strstr(other_headers, "Cache-Control"))) {
+ if (lws_add_http_header_by_token(wsi,
+ WSI_TOKEN_HTTP_CACHE_CONTROL,
+ (unsigned char *)cc, cclen, &p, end))
return -1;
+ }
if (other_headers) {
if ((end - p) < other_headers_len)
@@ -2415,16 +2368,37 @@ LWS_VISIBLE int lws_serve_http_file_fragment(struct lws *wsi)
do {
- if (wsi->trunc_len) {
- if (lws_issue_raw(wsi, wsi->trunc_alloc +
- wsi->trunc_offset,
- wsi->trunc_len) < 0) {
+ /* priority 1: buffered output */
+
+ if (lws_has_buffered_out(wsi)) {
+ if (lws_issue_raw(wsi, NULL, 0) < 0) {
lwsl_info("%s: closing\n", __func__);
goto file_had_it;
}
break;
}
+ /* priority 2: buffered pre-compression-transform */
+
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ if (wsi->http.comp_ctx.buflist_comp ||
+ wsi->http.comp_ctx.may_have_more) {
+ enum lws_write_protocol wp = LWS_WRITE_HTTP;
+
+ lwsl_info("%s: completing comp partial (buflist %p, may %d)\n",
+ __func__, wsi->http.comp_ctx.buflist_comp,
+ wsi->http.comp_ctx.may_have_more);
+
+ if (wsi->role_ops->write_role_protocol(wsi, NULL, 0, &wp) < 0) {
+ lwsl_info("%s signalling to close\n", __func__);
+ goto file_had_it;
+ }
+ lws_callback_on_writable(wsi);
+
+ break;
+ }
+#endif
+
if (wsi->http.filepos == wsi->http.filelen)
goto all_sent;
@@ -2453,7 +2427,8 @@ LWS_VISIBLE int lws_serve_http_file_fragment(struct lws *wsi)
LWS_H2_FRAME_HEADER_LENGTH,
"_lws\x0d\x0a"
"Content-Type: %s\x0d\x0a"
- "Content-Range: bytes %llu-%llu/%llu\x0d\x0a"
+ "Content-Range: bytes "
+ "%llu-%llu/%llu\x0d\x0a"
"\x0d\x0a",
wsi->http.multipart_content_type,
wsi->http.range.start,
@@ -2468,7 +2443,8 @@ LWS_VISIBLE int lws_serve_http_file_fragment(struct lws *wsi)
}
#endif
- poss = context->pt_serv_buf_size - n - LWS_H2_FRAME_HEADER_LENGTH;
+ poss = context->pt_serv_buf_size - n -
+ LWS_H2_FRAME_HEADER_LENGTH;
if (wsi->http.tx_content_length)
if (poss > wsi->http.tx_content_remain)
@@ -2556,11 +2532,9 @@ LWS_VISIBLE int lws_serve_http_file_fragment(struct lws *wsi)
lwsl_debug("added trailing boundary\n");
}
#endif
- m = lws_write(wsi, p, n,
- wsi->http.filepos + amount == wsi->http.filelen ?
- LWS_WRITE_HTTP_FINAL :
- LWS_WRITE_HTTP
- );
+ m = lws_write(wsi, p, n, wsi->http.filepos + amount ==
+ wsi->http.filelen ?
+ LWS_WRITE_HTTP_FINAL : LWS_WRITE_HTTP);
if (m < 0)
goto file_had_it;
@@ -2592,12 +2566,18 @@ LWS_VISIBLE int lws_serve_http_file_fragment(struct lws *wsi)
}
all_sent:
- if ((!wsi->trunc_len && wsi->http.filepos >= wsi->http.filelen)
+ if ((!lws_has_buffered_out(wsi)
+#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
+ && !wsi->http.comp_ctx.buflist_comp &&
+ !wsi->http.comp_ctx.may_have_more
+#endif
+ ) && (wsi->http.filepos >= wsi->http.filelen
#if defined(LWS_WITH_RANGES)
|| finished)
#else
)
#endif
+ )
{
lwsi_set_state(wsi, LRS_ESTABLISHED);
/* we might be in keepalive, so close it off here */
@@ -2607,9 +2587,8 @@ all_sent:
if (wsi->protocol->callback &&
user_callback_handle_rxflow(wsi->protocol->callback,
- wsi, LWS_CALLBACK_HTTP_FILE_COMPLETION,
- wsi->user_space, NULL,
- 0) < 0) {
+ wsi, LWS_CALLBACK_HTTP_FILE_COMPLETION,
+ wsi->user_space, NULL, 0) < 0) {
/*
* For http/1.x, the choices from
* transaction_completed are either
@@ -2632,7 +2611,7 @@ all_sent:
return 1; /* >0 indicates completed */
}
- } while (0); // while (!lws_send_pipe_choked(wsi))
+ } while (1); //(!lws_send_pipe_choked(wsi));
lws_callback_on_writable(wsi);
@@ -2713,8 +2692,7 @@ skip:
n = (int)strlen(pc);
s->swallow[s->pos] = '\0';
if (n != s->pos) {
- memmove(s->start + n,
- s->start + s->pos,
+ memmove(s->start + n, s->start + s->pos,
old_len - (sp - args->p));
old_len += (n - s->pos) + 1;
}
diff --git a/thirdparty/libwebsockets/roles/listen/ops-listen.c b/thirdparty/libwebsockets/lib/roles/listen/ops-listen.c
index dbeb9753a2..977c4b0377 100644
--- a/thirdparty/libwebsockets/roles/listen/ops-listen.c
+++ b/thirdparty/libwebsockets/lib/roles/listen/ops-listen.c
@@ -32,6 +32,11 @@ rops_handle_POLLIN_listen(struct lws_context_per_thread *pt, struct lws *wsi,
struct sockaddr_storage cli_addr;
socklen_t clilen;
+ /* if our vhost is going down, ignore it */
+
+ if (wsi->vhost->being_destroyed)
+ return LWS_HPI_RET_HANDLED;
+
/* pollin means a client has connected to us then
*
* pollout is a hack on esp32 for background accepts signalling
@@ -74,8 +79,8 @@ rops_handle_POLLIN_listen(struct lws_context_per_thread *pt, struct lws *wsi,
* block the connect queue for other legit peers.
*/
- accept_fd = accept((int)pollfd->fd,
- (struct sockaddr *)&cli_addr, &clilen);
+ accept_fd = accept((int)pollfd->fd,
+ (struct sockaddr *)&cli_addr, &clilen);
lws_latency(context, wsi, "listener accept",
(int)accept_fd, accept_fd != LWS_SOCK_INVALID);
if (accept_fd == LWS_SOCK_INVALID) {
@@ -83,12 +88,11 @@ rops_handle_POLLIN_listen(struct lws_context_per_thread *pt, struct lws *wsi,
LWS_ERRNO == LWS_EWOULDBLOCK) {
break;
}
- lwsl_err("ERROR on accept: %s\n",
- strerror(LWS_ERRNO));
- break;
+ lwsl_err("accept: %s\n", strerror(LWS_ERRNO));
+ return LWS_HPI_RET_HANDLED;
}
- lws_plat_set_socket_options(wsi->vhost, accept_fd);
+ lws_plat_set_socket_options(wsi->vhost, accept_fd, 0);
#if defined(LWS_WITH_IPV6)
lwsl_debug("accepted new conn port %u on fd=%d\n",
@@ -125,9 +129,12 @@ rops_handle_POLLIN_listen(struct lws_context_per_thread *pt, struct lws *wsi,
fd.sockfd = accept_fd;
cwsi = lws_adopt_descriptor_vhost(wsi->vhost, opts, fd,
NULL, NULL);
- if (!cwsi)
+ if (!cwsi) {
+ lwsl_err("%s: lws_adopt_descriptor_vhost failed\n",
+ __func__);
/* already closed cleanly as necessary */
return LWS_HPI_RET_WSI_ALREADY_DIED;
+ }
if (lws_server_socket_service_ssl(cwsi, accept_fd)) {
lws_close_free_wsi(cwsi, LWS_CLOSE_STATUS_NOSTATUS,
@@ -171,7 +178,11 @@ struct lws_role_ops role_ops_listen = {
/* close_role */ NULL,
/* close_kill_connection */ NULL,
/* destroy_role */ NULL,
+ /* adoption_bind */ NULL,
+ /* client_bind */ NULL,
/* writeable cb clnt, srv */ { 0, 0 },
/* close cb clnt, srv */ { 0, 0 },
+ /* protocol_bind_cb c,s */ { 0, 0 },
+ /* protocol_unbind_cb c,s */ { 0, 0 },
/* file_handle */ 0,
};
diff --git a/thirdparty/libwebsockets/roles/pipe/ops-pipe.c b/thirdparty/libwebsockets/lib/roles/pipe/ops-pipe.c
index b9348d58d7..659c9bd935 100644
--- a/thirdparty/libwebsockets/roles/pipe/ops-pipe.c
+++ b/thirdparty/libwebsockets/lib/roles/pipe/ops-pipe.c
@@ -39,6 +39,18 @@ rops_handle_POLLIN_pipe(struct lws_context_per_thread *pt, struct lws *wsi,
if (n < 0)
return LWS_HPI_RET_PLEASE_CLOSE_ME;
#endif
+
+#if defined(LWS_WITH_THREADPOOL)
+ /*
+ * threadpools that need to call for on_writable callbacks do it by
+ * marking the task as needing one for its wsi, then cancelling service.
+ *
+ * Each tsi will call this to perform the actual callback_on_writable
+ * from the correct service thread context
+ */
+ lws_threadpool_tsi_context(pt->context, pt->tid);
+#endif
+
/*
* the poll() wait, or the event loop for libuv etc is a
* process-wide resource that we interrupted. So let every
@@ -75,7 +87,11 @@ struct lws_role_ops role_ops_pipe = {
/* close_role */ NULL,
/* close_kill_connection */ NULL,
/* destroy_role */ NULL,
+ /* adoption_bind */ NULL,
+ /* client_bind */ NULL,
/* writeable cb clnt, srv */ { 0, 0 },
/* close cb clnt, srv */ { 0, 0 },
+ /* protocol_bind_cb c,s */ { 0, 0 },
+ /* protocol_unbind_cb c,s */ { 0, 0 },
/* file_handle */ 1,
};
diff --git a/thirdparty/libwebsockets/roles/private.h b/thirdparty/libwebsockets/lib/roles/private.h
index ae4278b5d3..5f93b86e8f 100644
--- a/thirdparty/libwebsockets/roles/private.h
+++ b/thirdparty/libwebsockets/lib/roles/private.h
@@ -148,9 +148,11 @@ enum lwsi_state {
};
#define lwsi_state(wsi) ((enum lwsi_state)(wsi->wsistate & LRS_MASK))
-#define lwsi_state_PRE_CLOSE(wsi) ((enum lwsi_state)(wsi->wsistate_pre_close & LRS_MASK))
+#define lwsi_state_PRE_CLOSE(wsi) \
+ ((enum lwsi_state)(wsi->wsistate_pre_close & LRS_MASK))
#define lwsi_state_est(wsi) (!(wsi->wsistate & LWSIFS_NOT_EST))
-#define lwsi_state_est_PRE_CLOSE(wsi) (!(wsi->wsistate_pre_close & LWSIFS_NOT_EST))
+#define lwsi_state_est_PRE_CLOSE(wsi) \
+ (!(wsi->wsistate_pre_close & LWSIFS_NOT_EST))
#define lwsi_state_can_handle_POLLOUT(wsi) (wsi->wsistate & LWSIFS_POCB)
#if !defined (_DEBUG)
#define lwsi_set_state(wsi, lrs) wsi->wsistate = \
@@ -159,6 +161,8 @@ enum lwsi_state {
void lwsi_set_state(struct lws *wsi, lws_wsi_state_t lrs);
#endif
+#define _LWS_ADOPT_FINISH (1 << 24)
+
/*
* internal role-specific ops
*/
@@ -217,6 +221,16 @@ struct lws_role_ops {
/* role-specific destructor */
int (*destroy_role)(struct lws *wsi);
+ /* role-specific socket-adopt */
+ int (*adoption_bind)(struct lws *wsi, int type, const char *prot);
+ /* role-specific client-bind:
+ * ret 1 = bound, 0 = not bound, -1 = fail out
+ * i may be NULL, indicating client_bind is being called after
+ * a successful bind earlier, to finalize the binding. In that
+ * case ret 0 = OK, 1 = fail, wsi needs freeing, -1 = fail, wsi freed */
+ int (*client_bind)(struct lws *wsi,
+ const struct lws_client_connect_info *i);
+
/*
* the callback reasons for WRITEABLE for client, server
* (just client applies if no concept of client or server)
@@ -227,6 +241,16 @@ struct lws_role_ops {
* (just client applies if no concept of client or server)
*/
uint16_t close_cb[2];
+ /*
+ * the callback reasons for protocol bind for client, server
+ * (just client applies if no concept of client or server)
+ */
+ uint16_t protocol_bind_cb[2];
+ /*
+ * the callback reasons for protocol unbind for client, server
+ * (just client applies if no concept of client or server)
+ */
+ uint16_t protocol_unbind_cb[2];
unsigned int file_handle:1; /* role operates on files not sockets */
};
@@ -267,6 +291,12 @@ extern struct lws_role_ops role_ops_raw_skt, role_ops_raw_file, role_ops_listen,
#define lwsi_role_cgi(wsi) (0)
#endif
+#if defined(LWS_ROLE_DBUS)
+ #include "roles/dbus/private.h"
+#else
+ #define lwsi_role_dbus(wsi) (0)
+#endif
+
enum {
LWS_HP_RET_BAIL_OK,
LWS_HP_RET_BAIL_DIE,
@@ -280,3 +310,6 @@ enum {
LWS_UPG_RET_CONTINUE,
LWS_UPG_RET_BAIL
};
+
+int
+lws_role_call_adoption_bind(struct lws *wsi, int type, const char *prot);
diff --git a/thirdparty/libwebsockets/lib/roles/raw-file/ops-raw-file.c b/thirdparty/libwebsockets/lib/roles/raw-file/ops-raw-file.c
new file mode 100644
index 0000000000..075a2ee8b1
--- /dev/null
+++ b/thirdparty/libwebsockets/lib/roles/raw-file/ops-raw-file.c
@@ -0,0 +1,108 @@
+/*
+ * libwebsockets - small server side websockets and web server implementation
+ *
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation:
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <core/private.h>
+
+static int
+rops_handle_POLLIN_raw_file(struct lws_context_per_thread *pt, struct lws *wsi,
+ struct lws_pollfd *pollfd)
+{
+ int n;
+
+ if (pollfd->revents & LWS_POLLOUT) {
+ n = lws_callback_as_writeable(wsi);
+ if (lws_change_pollfd(wsi, LWS_POLLOUT, 0)) {
+ lwsl_info("failed at set pollfd\n");
+ return LWS_HPI_RET_WSI_ALREADY_DIED;
+ }
+ if (n)
+ return LWS_HPI_RET_PLEASE_CLOSE_ME;
+ }
+
+ if (pollfd->revents & LWS_POLLIN) {
+ if (user_callback_handle_rxflow(wsi->protocol->callback,
+ wsi, LWS_CALLBACK_RAW_RX_FILE,
+ wsi->user_space, NULL, 0)) {
+ lwsl_debug("raw rx callback closed it\n");
+ return LWS_HPI_RET_PLEASE_CLOSE_ME;
+ }
+ }
+
+ if (pollfd->revents & LWS_POLLHUP)
+ return LWS_HPI_RET_PLEASE_CLOSE_ME;
+
+ return LWS_HPI_RET_HANDLED;
+}
+
+#if !defined(LWS_NO_SERVER)
+static int
+rops_adoption_bind_raw_file(struct lws *wsi, int type, const char *vh_prot_name)
+{
+ /* no socket or http: it can only be a raw file */
+ if ((type & LWS_ADOPT_HTTP) || (type & LWS_ADOPT_SOCKET) ||
+ (type & _LWS_ADOPT_FINISH))
+ return 0; /* no match */
+
+ lws_role_transition(wsi, 0, LRS_ESTABLISHED, &role_ops_raw_file);
+
+ if (!vh_prot_name)
+ wsi->protocol = &wsi->vhost->protocols[
+ wsi->vhost->default_protocol_index];
+
+ return 1; /* bound */
+}
+#endif
+
+struct lws_role_ops role_ops_raw_file = {
+ /* role name */ "raw-file",
+ /* alpn id */ NULL,
+ /* check_upgrades */ NULL,
+ /* init_context */ NULL,
+ /* init_vhost */ NULL,
+ /* destroy_vhost */ NULL,
+ /* periodic_checks */ NULL,
+ /* service_flag_pending */ NULL,
+ /* handle_POLLIN */ rops_handle_POLLIN_raw_file,
+ /* handle_POLLOUT */ NULL,
+ /* perform_user_POLLOUT */ NULL,
+ /* callback_on_writable */ NULL,
+ /* tx_credit */ NULL,
+ /* write_role_protocol */ NULL,
+ /* encapsulation_parent */ NULL,
+ /* alpn_negotiated */ NULL,
+ /* close_via_role_protocol */ NULL,
+ /* close_role */ NULL,
+ /* close_kill_connection */ NULL,
+ /* destroy_role */ NULL,
+#if !defined(LWS_NO_SERVER)
+ /* adoption_bind */ rops_adoption_bind_raw_file,
+#else
+ NULL,
+#endif
+ /* client_bind */ NULL,
+ /* writeable cb clnt, srv */ { LWS_CALLBACK_RAW_WRITEABLE_FILE, 0 },
+ /* close cb clnt, srv */ { LWS_CALLBACK_RAW_CLOSE_FILE, 0 },
+ /* protocol_bind cb c, srv */ { LWS_CALLBACK_RAW_FILE_BIND_PROTOCOL,
+ LWS_CALLBACK_RAW_FILE_BIND_PROTOCOL },
+ /* protocol_unbind cb c, srv */ { LWS_CALLBACK_RAW_FILE_DROP_PROTOCOL,
+ LWS_CALLBACK_RAW_FILE_DROP_PROTOCOL },
+ /* file_handle */ 1,
+};
diff --git a/thirdparty/libwebsockets/roles/raw/ops-raw.c b/thirdparty/libwebsockets/lib/roles/raw-skt/ops-raw-skt.c
index 68b52bded6..8b94de4bed 100644
--- a/thirdparty/libwebsockets/roles/raw/ops-raw.c
+++ b/thirdparty/libwebsockets/lib/roles/raw-skt/ops-raw-skt.c
@@ -30,12 +30,12 @@ rops_handle_POLLIN_raw_skt(struct lws_context_per_thread *pt, struct lws *wsi,
/* pending truncated sends have uber priority */
- if (wsi->trunc_len) {
+ if (lws_has_buffered_out(wsi)) {
if (!(pollfd->revents & LWS_POLLOUT))
return LWS_HPI_RET_HANDLED;
- if (lws_issue_raw(wsi, wsi->trunc_alloc + wsi->trunc_offset,
- wsi->trunc_len) < 0)
+ /* drain the output buflist */
+ if (lws_issue_raw(wsi, NULL, 0) < 0)
goto fail;
/*
* we can't afford to allow input processing to send
@@ -109,7 +109,7 @@ try_pollout:
LWSSTATS_C_WRITEABLE_CB, 1);
#if defined(LWS_WITH_STATS)
if (wsi->active_writable_req_us) {
- uint64_t ul = time_in_microseconds() -
+ uint64_t ul = lws_time_in_microseconds() -
wsi->active_writable_req_us;
lws_stats_atomic_bump(wsi->context, pt,
@@ -135,38 +135,62 @@ fail:
return LWS_HPI_RET_WSI_ALREADY_DIED;
}
+#if !defined(LWS_NO_SERVER)
+static int
+rops_adoption_bind_raw_skt(struct lws *wsi, int type, const char *vh_prot_name)
+{
+ /* no http but socket... must be raw skt */
+ if ((type & LWS_ADOPT_HTTP) || !(type & LWS_ADOPT_SOCKET) ||
+ (type & _LWS_ADOPT_FINISH))
+ return 0; /* no match */
+
+#if !defined(LWS_WITH_ESP32)
+ if (type & LWS_ADOPT_FLAG_UDP)
+ /*
+ * these can be >128 bytes, so just alloc for UDP
+ */
+ wsi->udp = lws_malloc(sizeof(*wsi->udp), "udp struct");
+#endif
+ lws_role_transition(wsi, 0, (type & LWS_ADOPT_ALLOW_SSL) ? LRS_SSL_INIT :
+ LRS_ESTABLISHED, &role_ops_raw_skt);
+
+ if (vh_prot_name)
+ lws_bind_protocol(wsi, wsi->protocol, __func__);
+ else
+ /* this is the only time he will transition */
+ lws_bind_protocol(wsi,
+ &wsi->vhost->protocols[wsi->vhost->raw_protocol_index],
+ __func__);
+
+ return 1; /* bound */
+}
+#endif
+
+#if !defined(LWS_NO_CLIENT)
static int
-rops_handle_POLLIN_raw_file(struct lws_context_per_thread *pt, struct lws *wsi,
- struct lws_pollfd *pollfd)
+rops_client_bind_raw_skt(struct lws *wsi,
+ const struct lws_client_connect_info *i)
{
- int n;
+ if (!i) {
- if (pollfd->revents & LWS_POLLOUT) {
- n = lws_callback_as_writeable(wsi);
- if (lws_change_pollfd(wsi, LWS_POLLOUT, 0)) {
- lwsl_info("failed at set pollfd\n");
- return LWS_HPI_RET_WSI_ALREADY_DIED;
- }
- if (n)
- return LWS_HPI_RET_PLEASE_CLOSE_ME;
- }
+ /* finalize */
- if (pollfd->revents & LWS_POLLIN) {
- if (user_callback_handle_rxflow(wsi->protocol->callback,
- wsi, LWS_CALLBACK_RAW_RX_FILE,
- wsi->user_space, NULL, 0)) {
- lwsl_debug("raw rx callback closed it\n");
- return LWS_HPI_RET_PLEASE_CLOSE_ME;
- }
+ if (!wsi->user_space && wsi->stash->method)
+ if (lws_ensure_user_space(wsi))
+ return 1;
+
+ return 0;
}
- if (pollfd->revents & LWS_POLLHUP)
- return LWS_HPI_RET_PLEASE_CLOSE_ME;
+ /* we are a fallback if nothing else matched */
- return LWS_HPI_RET_HANDLED;
-}
+ lws_role_transition(wsi, LWSIFR_CLIENT, LRS_UNCONNECTED,
+ &role_ops_raw_skt);
+ return 1; /* matched */
+}
+#endif
struct lws_role_ops role_ops_raw_skt = {
/* role name */ "raw-skt",
@@ -189,35 +213,21 @@ struct lws_role_ops role_ops_raw_skt = {
/* close_role */ NULL,
/* close_kill_connection */ NULL,
/* destroy_role */ NULL,
+#if !defined(LWS_NO_SERVER)
+ /* adoption_bind */ rops_adoption_bind_raw_skt,
+#else
+ NULL,
+#endif
+#if !defined(LWS_NO_CLIENT)
+ /* client_bind */ rops_client_bind_raw_skt,
+#else
+ NULL,
+#endif
/* writeable cb clnt, srv */ { LWS_CALLBACK_RAW_WRITEABLE, 0 },
/* close cb clnt, srv */ { LWS_CALLBACK_RAW_CLOSE, 0 },
+ /* protocol_bind cb c, srv */ { LWS_CALLBACK_RAW_SKT_BIND_PROTOCOL,
+ LWS_CALLBACK_RAW_SKT_BIND_PROTOCOL },
+ /* protocol_unbind cb c, srv */ { LWS_CALLBACK_RAW_SKT_DROP_PROTOCOL,
+ LWS_CALLBACK_RAW_SKT_DROP_PROTOCOL },
/* file_handle */ 0,
};
-
-
-
-struct lws_role_ops role_ops_raw_file = {
- /* role name */ "raw-file",
- /* alpn id */ NULL,
- /* check_upgrades */ NULL,
- /* init_context */ NULL,
- /* init_vhost */ NULL,
- /* destroy_vhost */ NULL,
- /* periodic_checks */ NULL,
- /* service_flag_pending */ NULL,
- /* handle_POLLIN */ rops_handle_POLLIN_raw_file,
- /* handle_POLLOUT */ NULL,
- /* perform_user_POLLOUT */ NULL,
- /* callback_on_writable */ NULL,
- /* tx_credit */ NULL,
- /* write_role_protocol */ NULL,
- /* encapsulation_parent */ NULL,
- /* alpn_negotiated */ NULL,
- /* close_via_role_protocol */ NULL,
- /* close_role */ NULL,
- /* close_kill_connection */ NULL,
- /* destroy_role */ NULL,
- /* writeable cb clnt, srv */ { LWS_CALLBACK_RAW_WRITEABLE_FILE, 0 },
- /* close cb clnt, srv */ { LWS_CALLBACK_RAW_CLOSE_FILE, 0 },
- /* file_handle */ 1,
-};
diff --git a/thirdparty/libwebsockets/roles/ws/client-parser-ws.c b/thirdparty/libwebsockets/lib/roles/ws/client-parser-ws.c
index 7287fb1590..f5aaa6dbb5 100644
--- a/thirdparty/libwebsockets/roles/ws/client-parser-ws.c
+++ b/thirdparty/libwebsockets/lib/roles/ws/client-parser-ws.c
@@ -1,7 +1,7 @@
/*
* libwebsockets - small server side websockets and web server implementation
*
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -399,9 +399,11 @@ spill:
memcpy(wsi->ws->ping_payload_buf + LWS_PRE, pp,
wsi->ws->rx_ubuf_head);
- wsi->ws->close_in_ping_buffer_len = wsi->ws->rx_ubuf_head;
+ wsi->ws->close_in_ping_buffer_len =
+ wsi->ws->rx_ubuf_head;
- lwsl_info("%s: scheduling return close as ack\n", __func__);
+ lwsl_info("%s: scheduling return close as ack\n",
+ __func__);
__lws_change_pollfd(wsi, LWS_POLLIN, 0);
lws_set_timeout(wsi, PENDING_TIMEOUT_CLOSE_SEND, 3);
wsi->waiting_to_send_close_frame = 1;
@@ -437,7 +439,7 @@ spill:
/* stash the pong payload */
memcpy(wsi->ws->ping_payload_buf + LWS_PRE,
&wsi->ws->rx_ubuf[LWS_PRE],
- wsi->ws->rx_ubuf_head);
+ wsi->ws->rx_ubuf_head);
wsi->ws->ping_payload_len = wsi->ws->rx_ubuf_head;
wsi->ws->ping_pending_flag = 1;
diff --git a/thirdparty/libwebsockets/roles/ws/client-ws.c b/thirdparty/libwebsockets/lib/roles/ws/client-ws.c
index fd6cf42551..d88833f381 100644
--- a/thirdparty/libwebsockets/roles/ws/client-ws.c
+++ b/thirdparty/libwebsockets/lib/roles/ws/client-ws.c
@@ -40,7 +40,8 @@ strtolower(char *s)
}
int
-lws_create_client_ws_object(struct lws_client_connect_info *i, struct lws *wsi)
+lws_create_client_ws_object(const struct lws_client_connect_info *i,
+ struct lws *wsi)
{
int v = SPEC_LATEST_SUPPORTED;
@@ -113,7 +114,7 @@ lws_ws_handshake_client(struct lws *wsi, unsigned char **buf, size_t len)
#endif
char *
-lws_generate_client_ws_handshake(struct lws *wsi, char *p)
+lws_generate_client_ws_handshake(struct lws *wsi, char *p, const char *conn1)
{
char buf[128], hash[20], key_b64[40];
int n;
@@ -135,8 +136,8 @@ lws_generate_client_ws_handshake(struct lws *wsi, char *p)
lws_b64_encode_string(hash, 16, key_b64, sizeof(key_b64));
p += sprintf(p, "Upgrade: websocket\x0d\x0a"
- "Connection: Upgrade\x0d\x0a"
- "Sec-WebSocket-Key: ");
+ "Connection: %sUpgrade\x0d\x0a"
+ "Sec-WebSocket-Key: ", conn1);
strcpy(p, key_b64);
p += strlen(key_b64);
p += sprintf(p, "\x0d\x0a");
@@ -203,10 +204,12 @@ lws_generate_client_ws_handshake(struct lws *wsi, char *p)
int
lws_client_ws_upgrade(struct lws *wsi, const char **cce)
{
- int n, len, okay = 0;
struct lws_context *context = wsi->context;
+ struct lws_tokenize ts;
+ int n, len, okay = 0;
+ lws_tokenize_elem e;
+ char *p, buf[64];
const char *pc;
- char *p;
#if !defined(LWS_WITHOUT_EXTENSIONS)
struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
char *sb = (char *)&pt->serv_buf[0];
@@ -214,8 +217,8 @@ lws_client_ws_upgrade(struct lws *wsi, const char **cce)
const struct lws_extension *ext;
char ext_name[128];
const char *c, *a;
- char ignore;
int more = 1;
+ char ignore;
#endif
if (wsi->client_h2_substream) {/* !!! client ws-over-h2 not there yet */
@@ -261,18 +264,31 @@ lws_client_ws_upgrade(struct lws *wsi, const char **cce)
goto bail3;
}
- p = lws_hdr_simple_ptr(wsi, WSI_TOKEN_CONNECTION);
- if (!p) {
- lwsl_info("no Connection hdr\n");
- *cce = "HS: CONNECTION missing";
- goto bail3;
- }
- strtolower(p);
- if (strcmp(p, "upgrade")) {
- lwsl_warn("lws_client_int_s_hs: bad header %s\n", p);
- *cce = "HS: UPGRADE malformed";
- goto bail3;
- }
+ /* connection: must have "upgrade" */
+
+ lws_tokenize_init(&ts, buf, LWS_TOKENIZE_F_COMMA_SEP_LIST |
+ LWS_TOKENIZE_F_MINUS_NONTERM);
+ ts.len = lws_hdr_copy(wsi, buf, sizeof(buf) - 1, WSI_TOKEN_CONNECTION);
+ if (ts.len <= 0) /* won't fit, or absent */
+ goto bad_conn_format;
+
+ do {
+ e = lws_tokenize(&ts);
+ switch (e) {
+ case LWS_TOKZE_TOKEN:
+ if (!strcasecmp(ts.token, "upgrade"))
+ e = LWS_TOKZE_ENDED;
+ break;
+
+ case LWS_TOKZE_DELIMITER:
+ break;
+
+ default: /* includes ENDED */
+bad_conn_format:
+ *cce = "HS: UPGRADE malformed";
+ goto bail3;
+ }
+ } while (e > 0);
pc = lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_SENT_PROTOCOLS);
if (!pc) {
@@ -308,7 +324,7 @@ lws_client_ws_upgrade(struct lws *wsi, const char **cce)
}
while (*pc && *pc++ != ',')
;
- while (*pc && *pc == ' ')
+ while (*pc == ' ')
pc++;
}
@@ -376,22 +392,7 @@ check_extensions:
* X <-> pAn <-> pB
*/
- lws_vhost_lock(wsi->vhost);
-
- wsi->same_vh_protocol_prev = /* guy who points to us */
- &wsi->vhost->same_vh_protocol_list[n];
- wsi->same_vh_protocol_next = /* old first guy is our next */
- wsi->vhost->same_vh_protocol_list[n];
- /* we become the new first guy */
- wsi->vhost->same_vh_protocol_list[n] = wsi;
-
- if (wsi->same_vh_protocol_next)
- /* old first guy points back to us now */
- wsi->same_vh_protocol_next->same_vh_protocol_prev =
- &wsi->same_vh_protocol_next;
- wsi->on_same_vh_list = 1;
-
- lws_vhost_unlock(wsi->vhost);
+ lws_same_vh_protocol_insert(wsi, n);
#if !defined(LWS_WITHOUT_EXTENSIONS)
/* instantiate the accepted extensions */
@@ -468,7 +469,8 @@ check_extensions:
if (ext->callback(lws_get_context(wsi), ext, wsi,
LWS_EXT_CB_CLIENT_CONSTRUCT,
- (void *)&wsi->ws->act_ext_user[wsi->ws->count_act_ext],
+ (void *)&wsi->ws->act_ext_user[
+ wsi->ws->count_act_ext],
(void *)&opts, 0)) {
lwsl_info(" ext %s failed construction\n",
ext_name);
@@ -490,8 +492,10 @@ check_extensions:
}
if (ext_name[0] &&
- lws_ext_parse_options(ext, wsi, wsi->ws->act_ext_user[
- wsi->ws->count_act_ext], opts, ext_name,
+ lws_ext_parse_options(ext, wsi,
+ wsi->ws->act_ext_user[
+ wsi->ws->count_act_ext],
+ opts, ext_name,
(int)strlen(ext_name))) {
lwsl_err("%s: unable to parse user defaults '%s'",
__func__, ext_name);
@@ -503,7 +507,8 @@ check_extensions:
* give the extension the server options
*/
if (a && lws_ext_parse_options(ext, wsi,
- wsi->ws->act_ext_user[wsi->ws->count_act_ext],
+ wsi->ws->act_ext_user[
+ wsi->ws->count_act_ext],
opts, a, lws_ptr_diff(c, a))) {
lwsl_err("%s: unable to parse remote def '%s'",
__func__, a);
diff --git a/thirdparty/libwebsockets/roles/ws/ops-ws.c b/thirdparty/libwebsockets/lib/roles/ws/ops-ws.c
index 665b2c9b74..1cbc6ac6a6 100644
--- a/thirdparty/libwebsockets/roles/ws/ops-ws.c
+++ b/thirdparty/libwebsockets/lib/roles/ws/ops-ws.c
@@ -155,7 +155,9 @@ handle_first:
if (wsi->ws->opcode == LWSWSOPC_BINARY_FRAME)
wsi->ws->check_utf8 = 0;
if (wsi->ws->continuation_possible) {
- lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, (uint8_t *)"bad cont", 8);
+ lws_close_reason(wsi,
+ LWS_CLOSE_STATUS_PROTOCOL_ERR,
+ (uint8_t *)"bad cont", 8);
return -1;
}
wsi->ws->rsv_first_msg = (c & 0x70);
@@ -166,7 +168,9 @@ handle_first:
break;
case LWSWSOPC_CONTINUATION:
if (!wsi->ws->continuation_possible) {
- lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, (uint8_t *)"bad cont", 8);
+ lws_close_reason(wsi,
+ LWS_CLOSE_STATUS_PROTOCOL_ERR,
+ (uint8_t *)"bad cont", 8);
return -1;
}
break;
@@ -184,7 +188,8 @@ handle_first:
case 0xd:
case 0xe:
case 0xf:
- lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, (uint8_t *)"bad opc", 7);
+ lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR,
+ (uint8_t *)"bad opc", 7);
lwsl_info("illegal opcode\n");
return -1;
}
@@ -193,7 +198,8 @@ handle_first:
(wsi->ws->opcode == LWSWSOPC_TEXT_FRAME ||
wsi->ws->opcode == LWSWSOPC_BINARY_FRAME)) {
lwsl_info("hey you owed us a FIN\n");
- lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, (uint8_t *)"bad fin", 7);
+ lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR,
+ (uint8_t *)"bad fin", 7);
return -1;
}
if ((!(wsi->ws->opcode & 8)) && wsi->ws->final) {
@@ -373,17 +379,19 @@ handle_first:
}
if (!(already_processed & ALREADY_PROCESSED_IGNORE_CHAR)) {
if (wsi->ws->all_zero_nonce)
- wsi->ws->rx_ubuf[LWS_PRE + (wsi->ws->rx_ubuf_head++)] =
- c;
+ wsi->ws->rx_ubuf[LWS_PRE +
+ (wsi->ws->rx_ubuf_head++)] = c;
else
- wsi->ws->rx_ubuf[LWS_PRE + (wsi->ws->rx_ubuf_head++)] =
+ wsi->ws->rx_ubuf[LWS_PRE +
+ (wsi->ws->rx_ubuf_head++)] =
c ^ wsi->ws->mask[(wsi->ws->mask_idx++) & 3];
--wsi->ws->rx_packet_length;
}
if (!wsi->ws->rx_packet_length) {
- lwsl_debug("%s: ws fragment length exhausted\n", __func__);
+ lwsl_debug("%s: ws fragment length exhausted\n",
+ __func__);
/* spill because we have the whole frame */
wsi->lws_rx_parse_state = LWS_RXPS_NEW;
goto spill;
@@ -451,7 +459,8 @@ spill:
* have to just close our end.
*/
wsi->socket_is_permanently_unusable = 1;
- lwsl_parser("Closing on peer close due to Pending tx\n");
+ lwsl_parser("Closing on peer close "
+ "due to pending tx\n");
return -1;
}
@@ -570,7 +579,8 @@ drain_extension:
//if (lin)
// lwsl_hexdump_notice(ebuf.token, ebuf.len);
n = lws_ext_cb_active(wsi, LWS_EXT_CB_PAYLOAD_RX, &ebuf, 0);
- lwsl_debug("%s: ext says %d / ebuf.len %d\n", __func__, n, ebuf.len);
+ lwsl_debug("%s: ext says %d / ebuf.len %d\n", __func__,
+ n, ebuf.len);
if (wsi->ws->rx_draining_ext)
already_processed &= ~ALREADY_PROCESSED_NO_CB;
#endif
@@ -781,8 +791,7 @@ lws_server_init_wsi_for_ws(struct lws *wsi)
lwsl_debug("Allocating RX buffer %d\n", n);
#if !defined(LWS_WITH_ESP32)
- if (!wsi->parent_carries_io &&
- !wsi->h2_stream_carries_ws)
+ if (!wsi->h2_stream_carries_ws)
if (setsockopt(wsi->desc.sockfd, SOL_SOCKET, SO_SNDBUF,
(const char *)&n, sizeof n)) {
lwsl_warn("Failed to set SNDBUF to %d", n);
@@ -814,9 +823,9 @@ LWS_VISIBLE int
lws_is_final_fragment(struct lws *wsi)
{
#if !defined(LWS_WITHOUT_EXTENSIONS)
- lwsl_debug("%s: final %d, rx pk length %ld, draining %ld\n", __func__,
- wsi->ws->final, (long)wsi->ws->rx_packet_length,
- (long)wsi->ws->rx_draining_ext);
+ lwsl_debug("%s: final %d, rx pk length %ld, draining %ld\n", __func__,
+ wsi->ws->final, (long)wsi->ws->rx_packet_length,
+ (long)wsi->ws->rx_draining_ext);
return wsi->ws->final && !wsi->ws->rx_packet_length &&
!wsi->ws->rx_draining_ext;
#else
@@ -883,8 +892,8 @@ static int
rops_handle_POLLIN_ws(struct lws_context_per_thread *pt, struct lws *wsi,
struct lws_pollfd *pollfd)
{
- struct lws_tokens ebuf;
unsigned int pending = 0;
+ struct lws_tokens ebuf;
char buffered = 0;
int n = 0, m;
#if defined(LWS_WITH_HTTP2)
@@ -928,7 +937,9 @@ rops_handle_POLLIN_ws(struct lws_context_per_thread *pt, struct lws *wsi,
return LWS_HPI_RET_HANDLED;
}
- //lwsl_notice("%s: wsi->ws->tx_draining_ext %d revents 0x%x 0x%x %d\n", __func__, wsi->ws->tx_draining_ext, pollfd->revents, wsi->wsistate, lwsi_state_can_handle_POLLOUT(wsi));
+ //lwsl_notice("%s: wsi->ws->tx_draining_ext %d revents 0x%x 0x%x %d\n",
+ //__func__, wsi->ws->tx_draining_ext, pollfd->revents, wsi->wsistate,
+ //lwsi_state_can_handle_POLLOUT(wsi));
/* 1: something requested a callback when it was OK to write */
@@ -977,7 +988,7 @@ rops_handle_POLLIN_ws(struct lws_context_per_thread *pt, struct lws *wsi,
#if defined(LWS_WITH_HTTP2)
if (wsi->http2_substream || wsi->upgraded_to_http2) {
wsi1 = lws_get_network_wsi(wsi);
- if (wsi1 && wsi1->trunc_len)
+ if (wsi1 && lws_has_buffered_out(wsi1))
/* We cannot deal with any kind of new RX
* because we are dealing with a partial send
* (new RX may trigger new http_action() that
@@ -1200,8 +1211,9 @@ int rops_handle_POLLOUT_ws(struct lws *wsi)
if (n >= 0) {
if (wsi->close_needs_ack) {
lwsi_set_state(wsi, LRS_AWAITING_CLOSE_ACK);
- lws_set_timeout(wsi, PENDING_TIMEOUT_CLOSE_ACK, 5);
- lwsl_debug("sent close indication, awaiting ack\n");
+ lws_set_timeout(wsi, PENDING_TIMEOUT_CLOSE_ACK,
+ 5);
+ lwsl_debug("sent close, await ack\n");
return LWS_HP_RET_BAIL_OK;
}
@@ -1226,7 +1238,8 @@ int rops_handle_POLLOUT_ws(struct lws *wsi)
wsi->ws->ping_pending_flag = 0;
return LWS_HP_RET_BAIL_OK;
}
- lwsl_info("issuing pong %d on wsi %p\n", wsi->ws->ping_payload_len, wsi);
+ lwsl_info("issuing pong %d on wsi %p\n",
+ wsi->ws->ping_payload_len, wsi);
}
n = lws_write(wsi, &wsi->ws->ping_payload_buf[LWS_PRE],
@@ -1402,9 +1415,12 @@ rops_periodic_checks_ws(struct lws_context *context, int tsi, time_t now)
lws_vhost_lock(vh);
for (n = 0; n < vh->count_protocols; n++) {
- struct lws *wsi = vh->same_vh_protocol_list[n];
- while (wsi) {
+ lws_start_foreach_dll_safe(struct lws_dll_lws *, d, d1,
+ vh->same_vh_protocol_heads[n].next) {
+ struct lws *wsi = lws_container_of(d,
+ struct lws, same_vh_protocol);
+
if (lwsi_role_ws(wsi) &&
!wsi->socket_is_permanently_unusable &&
!wsi->ws->send_check_ping &&
@@ -1421,8 +1437,8 @@ rops_periodic_checks_ws(struct lws_context *context, int tsi, time_t now)
lws_callback_on_writable(wsi);
wsi->ws->time_next_ping_check = now;
}
- wsi = wsi->same_vh_protocol_next;
- }
+
+ } lws_end_foreach_dll_safe(d, d1);
}
lws_vhost_unlock(vh);
@@ -1496,7 +1512,11 @@ rops_close_via_role_protocol_ws(struct lws *wsi, enum lws_close_status reason)
static int
rops_close_role_ws(struct lws_context_per_thread *pt, struct lws *wsi)
{
+ if (!wsi->ws)
+ return 0;
+
#if !defined(LWS_WITHOUT_EXTENSIONS)
+
if (wsi->ws->rx_draining_ext) {
struct lws **w = &pt->ws.rx_draining_ext_list;
@@ -1529,10 +1549,6 @@ rops_close_role_ws(struct lws_context_per_thread *pt, struct lws *wsi)
#endif
lws_free_set_NULL(wsi->ws->rx_ubuf);
- if (wsi->trunc_alloc)
- /* not going to be completed... nuke it */
- lws_free_set_NULL(wsi->trunc_alloc);
-
wsi->ws->ping_payload_len = 0;
wsi->ws->ping_pending_flag = 0;
@@ -1590,8 +1606,9 @@ rops_write_role_protocol_ws(struct lws *wsi, unsigned char *buf, size_t len,
if (!(wpt & LWS_WRITE_NO_FIN) && len)
*wp &= ~LWS_WRITE_NO_FIN;
- lwsl_ext("FORCED draining wp to 0x%02X (stashed 0x%02X, incoming 0x%02X)\n", *wp,
- wsi->ws->tx_draining_stashed_wp, wpt);
+ lwsl_ext("FORCED draining wp to 0x%02X "
+ "(stashed 0x%02X, incoming 0x%02X)\n", *wp,
+ wsi->ws->tx_draining_stashed_wp, wpt);
// assert(0);
}
#endif
@@ -1643,13 +1660,16 @@ rops_write_role_protocol_ws(struct lws *wsi, unsigned char *buf, size_t len,
n = lws_ext_cb_active(wsi, LWS_EXT_CB_PAYLOAD_TX, &ebuf, *wp);
if (n < 0)
return -1;
- // lwsl_notice("ext processed %d plaintext into %d compressed (wp 0x%x)\n", m, (int)ebuf.len, *wp);
+ // lwsl_notice("ext processed %d plaintext into %d compressed"
+ // " (wp 0x%x)\n", m, (int)ebuf.len, *wp);
if (n && ebuf.len) {
- lwsl_ext("write drain len %d (wp 0x%x) SETTING tx_draining_ext\n", (int)ebuf.len, *wp);
+ lwsl_ext("write drain len %d (wp 0x%x) SETTING "
+ "tx_draining_ext\n", (int)ebuf.len, *wp);
/* extension requires further draining */
wsi->ws->tx_draining_ext = 1;
- wsi->ws->tx_draining_ext_list = pt->ws.tx_draining_ext_list;
+ wsi->ws->tx_draining_ext_list =
+ pt->ws.tx_draining_ext_list;
pt->ws.tx_draining_ext_list = wsi;
/* we must come back to do more */
lws_callback_on_writable(wsi);
@@ -1686,7 +1706,8 @@ rops_write_role_protocol_ws(struct lws *wsi, unsigned char *buf, size_t len,
*/
if (len && !ebuf.len) {
if (!wsi->ws->stashed_write_pending)
- wsi->ws->stashed_write_type = (char)(*wp) & 0x3f;
+ wsi->ws->stashed_write_type =
+ (char)(*wp) & 0x3f;
wsi->ws->stashed_write_pending = 1;
return (int)len;
}
@@ -1808,7 +1829,7 @@ do_more_inside_frame:
assert(encap != wsi);
return encap->role_ops->write_role_protocol(wsi, buf - pre,
- len + pre, wp);
+ len + pre, wp);
}
switch ((*wp) & 0x1f) {
@@ -1986,9 +2007,15 @@ struct lws_role_ops role_ops_ws = {
/* close_role */ rops_close_role_ws,
/* close_kill_connection */ rops_close_kill_connection_ws,
/* destroy_role */ rops_destroy_role_ws,
+ /* adoption_bind */ NULL,
+ /* client_bind */ NULL,
/* writeable cb clnt, srv */ { LWS_CALLBACK_CLIENT_WRITEABLE,
LWS_CALLBACK_SERVER_WRITEABLE },
/* close cb clnt, srv */ { LWS_CALLBACK_CLIENT_CLOSED,
LWS_CALLBACK_CLOSED },
+ /* protocol_bind cb c, srv */ { LWS_CALLBACK_WS_CLIENT_BIND_PROTOCOL,
+ LWS_CALLBACK_WS_SERVER_BIND_PROTOCOL },
+ /* protocol_unbind cb c, srv */ { LWS_CALLBACK_WS_CLIENT_DROP_PROTOCOL,
+ LWS_CALLBACK_WS_SERVER_DROP_PROTOCOL },
/* file handles */ 0
};
diff --git a/thirdparty/libwebsockets/roles/ws/private.h b/thirdparty/libwebsockets/lib/roles/ws/private.h
index 71ffcaea96..71ffcaea96 100644
--- a/thirdparty/libwebsockets/roles/ws/private.h
+++ b/thirdparty/libwebsockets/lib/roles/ws/private.h
diff --git a/thirdparty/libwebsockets/roles/ws/server-ws.c b/thirdparty/libwebsockets/lib/roles/ws/server-ws.c
index 62bcd8524f..bdc45367d4 100644
--- a/thirdparty/libwebsockets/roles/ws/server-ws.c
+++ b/thirdparty/libwebsockets/lib/roles/ws/server-ws.c
@@ -104,7 +104,7 @@ lws_extension_server_handshake(struct lws *wsi, char **p, int budget)
continue;
}
- while (args && *args && *args == ' ')
+ while (args && *args == ' ')
args++;
/* check a client's extension against our support */
@@ -124,7 +124,7 @@ lws_extension_server_handshake(struct lws *wsi, char **p, int budget)
*/
for (m = 0; m < wsi->ws->count_act_ext; m++)
if (wsi->ws->active_extensions[m] == ext) {
- lwsl_info("extension mentioned twice\n");
+ lwsl_info("ext mentioned twice\n");
return 1; /* shenanigans */
}
@@ -209,16 +209,17 @@ lws_extension_server_handshake(struct lws *wsi, char **p, int budget)
oa.len = 0;
lwsl_info("setting '%s'\n", po->name);
if (!ext->callback(lws_get_context(wsi),
- ext, wsi,
- LWS_EXT_CB_OPTION_SET,
- wsi->ws->act_ext_user[
- wsi->ws->count_act_ext],
+ ext, wsi,
+ LWS_EXT_CB_OPTION_SET,
+ wsi->ws->act_ext_user[
+ wsi->ws->count_act_ext],
&oa, (end - *p))) {
- *p += lws_snprintf(*p, (end - *p),
- "; %s", po->name);
+ *p += lws_snprintf(*p,
+ (end - *p),
+ "; %s", po->name);
lwsl_debug("adding option %s\n",
- po->name);
+ po->name);
}
po++;
}
@@ -230,7 +231,8 @@ lws_extension_server_handshake(struct lws *wsi, char **p, int budget)
}
wsi->ws->count_act_ext++;
- lwsl_parser("cnt_act_ext <- %d\n", wsi->ws->count_act_ext);
+ lwsl_parser("cnt_act_ext <- %d\n",
+ wsi->ws->count_act_ext);
if (args && *args == ',')
more = 0;
@@ -246,96 +248,149 @@ lws_extension_server_handshake(struct lws *wsi, char **p, int budget)
}
#endif
-
-
int
lws_process_ws_upgrade(struct lws *wsi)
{
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
- char protocol_list[128], protocol_name[64], *p;
- int protocol_len, hit, n = 0, non_space_char_found = 0;
+ const struct lws_protocols *pcol = NULL;
+ char buf[128], name[64];
+ struct lws_tokenize ts;
+ lws_tokenize_elem e;
if (!wsi->protocol)
lwsl_err("NULL protocol at lws_read\n");
/*
+ * We are upgrading to ws, so http/1.1 + h2 and keepalive + pipelined
+ * header considerations about keeping the ah around no longer apply.
+ *
+ * However it's common for the first ws protocol data to have been
+ * coalesced with the browser upgrade request and to already be in the
+ * ah rx buffer.
+ */
+
+ lws_pt_lock(pt, __func__);
+
+ if (!wsi->h2_stream_carries_ws)
+ lws_role_transition(wsi, LWSIFR_SERVER, LRS_ESTABLISHED,
+ &role_ops_ws);
+
+ lws_pt_unlock(pt);
+
+ /*
* It's either websocket or h2->websocket
*
+ * If we are on h1, confirm we got the required "connection: upgrade"
+ * header. h2 / ws-over-h2 does not have this.
+ */
+
+#if defined(LWS_WITH_HTTP2)
+ if (wsi->http2_substream)
+ goto check_protocol;
+#endif
+
+ lws_tokenize_init(&ts, buf, LWS_TOKENIZE_F_COMMA_SEP_LIST |
+ LWS_TOKENIZE_F_MINUS_NONTERM);
+ ts.len = lws_hdr_copy(wsi, buf, sizeof(buf) - 1, WSI_TOKEN_CONNECTION);
+ if (ts.len <= 0)
+ goto bad_conn_format;
+
+ do {
+ e = lws_tokenize(&ts);
+ switch (e) {
+ case LWS_TOKZE_TOKEN:
+ if (!strcasecmp(ts.token, "upgrade"))
+ e = LWS_TOKZE_ENDED;
+ break;
+
+ case LWS_TOKZE_DELIMITER:
+ break;
+
+ default: /* includes ENDED */
+bad_conn_format:
+ lwsl_err("%s: malformed or absent connection hdr\n",
+ __func__);
+
+ return 1;
+ }
+ } while (e > 0);
+
+#if defined(LWS_WITH_HTTP2)
+check_protocol:
+#endif
+
+ /*
* Select the first protocol we support from the list
* the client sent us.
- *
- * Copy it to remove header fragmentation
*/
- if (lws_hdr_copy(wsi, protocol_list, sizeof(protocol_list) - 1,
- WSI_TOKEN_PROTOCOL) < 0) {
- lwsl_err("protocol list too long");
+ lws_tokenize_init(&ts, buf, LWS_TOKENIZE_F_COMMA_SEP_LIST |
+ LWS_TOKENIZE_F_MINUS_NONTERM |
+ LWS_TOKENIZE_F_RFC7230_DELIMS);
+ ts.len = lws_hdr_copy(wsi, buf, sizeof(buf) - 1, WSI_TOKEN_PROTOCOL);
+ if (ts.len < 0) {
+ lwsl_err("%s: protocol list too long\n", __func__);
return 1;
}
+ if (!ts.len) {
+ int n = wsi->vhost->default_protocol_index;
+ /*
+ * some clients only have one protocol and do not send the
+ * protocol list header... allow it and match to the vhost's
+ * default protocol (which itself defaults to zero)
+ */
+ lwsl_info("%s: defaulting to prot handler %d\n", __func__, n);
- protocol_len = lws_hdr_total_length(wsi, WSI_TOKEN_PROTOCOL);
- protocol_list[protocol_len] = '\0';
- p = protocol_list;
- hit = 0;
+ lws_bind_protocol(wsi, &wsi->vhost->protocols[n],
+ "ws upgrade default pcol");
- while (*p && !hit) {
- n = 0;
- non_space_char_found = 0;
- while (n < (int)sizeof(protocol_name) - 1 &&
- *p && *p != ',') {
- /* ignore leading spaces */
- if (!non_space_char_found && *p == ' ') {
- n++;
- continue;
- }
- non_space_char_found = 1;
- protocol_name[n++] = *p++;
- }
- protocol_name[n] = '\0';
- if (*p)
- p++;
+ goto alloc_ws;
+ }
- lwsl_debug("checking %s\n", protocol_name);
+ /* otherwise go through the user-provided protocol list */
- n = 0;
- while (wsi->vhost->protocols[n].callback) {
- lwsl_debug("try %s\n",
- wsi->vhost->protocols[n].name);
-
- if (wsi->vhost->protocols[n].name &&
- !strcmp(wsi->vhost->protocols[n].name,
- protocol_name)) {
- wsi->protocol = &wsi->vhost->protocols[n];
- hit = 1;
- break;
+ do {
+ e = lws_tokenize(&ts);
+ switch (e) {
+ case LWS_TOKZE_TOKEN:
+
+ if (lws_tokenize_cstr(&ts, name, sizeof(name))) {
+ lwsl_err("%s: pcol name too long\n", __func__);
+
+ return 1;
+ }
+ lwsl_debug("checking %s\n", name);
+ pcol = lws_vhost_name_to_protocol(wsi->vhost, name);
+ if (pcol) {
+ /* if we know it, bind to it and stop looking */
+ lws_bind_protocol(wsi, pcol, "ws upg pcol");
+ e = LWS_TOKZE_ENDED;
}
+ break;
- n++;
- }
- }
+ case LWS_TOKZE_DELIMITER:
+ case LWS_TOKZE_ENDED:
+ break;
- /* we didn't find a protocol he wanted? */
+ default:
+ lwsl_err("%s: malformatted protocol list", __func__);
- if (!hit) {
- if (lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL)) {
- lwsl_notice("No protocol from \"%s\" supported\n",
- protocol_list);
return 1;
}
- /*
- * some clients only have one protocol and
- * do not send the protocol list header...
- * allow it and match to the vhost's default
- * protocol (which itself defaults to zero)
- */
- lwsl_info("defaulting to prot handler %d\n",
- wsi->vhost->default_protocol_index);
- n = wsi->vhost->default_protocol_index;
- wsi->protocol = &wsi->vhost->protocols[
- (int)wsi->vhost->default_protocol_index];
+ } while (e > 0);
+
+ /* we didn't find a protocol he wanted? */
+
+ if (!pcol) {
+ lwsl_notice("No supported protocol \"%s\"\n", buf);
+
+ return 1;
}
+alloc_ws:
+
/* allocate the ws struct for the wsi */
+
wsi->ws = lws_zalloc(sizeof(*wsi->ws), "ws struct");
if (!wsi->ws) {
lwsl_notice("OOM\n");
@@ -383,6 +438,9 @@ lws_process_ws_upgrade(struct lws *wsi)
lwsl_notice("h2 ws handshake failed\n");
return 1;
}
+ lws_role_transition(wsi,
+ LWSIFR_SERVER | LWSIFR_P_ENCAP_H2,
+ LRS_ESTABLISHED, &role_ops_ws);
} else
#endif
{
@@ -395,28 +453,6 @@ lws_process_ws_upgrade(struct lws *wsi)
break;
}
- lws_same_vh_protocol_insert(wsi, n);
-
- /*
- * We are upgrading to ws, so http/1.1 + h2 and keepalive + pipelined
- * header considerations about keeping the ah around no longer apply.
- *
- * However it's common for the first ws protocol data to have been
- * coalesced with the browser upgrade request and to already be in the
- * ah rx buffer.
- */
-
- lws_pt_lock(pt, __func__);
-
- if (wsi->h2_stream_carries_ws)
- lws_role_transition(wsi, LWSIFR_SERVER | LWSIFR_P_ENCAP_H2,
- LRS_ESTABLISHED, &role_ops_ws);
- else
- lws_role_transition(wsi, LWSIFR_SERVER, LRS_ESTABLISHED,
- &role_ops_ws);
-
- lws_pt_unlock(pt);
-
lws_server_init_wsi_for_ws(wsi);
lwsl_parser("accepted v%02d connection\n", wsi->ws->ietf_spec_revision);
@@ -443,7 +479,8 @@ handshake_0405(struct lws_context *context, struct lws *wsi)
goto bail;
}
- if (lws_hdr_total_length(wsi, WSI_TOKEN_KEY) >= MAX_WEBSOCKET_04_KEY_LEN) {
+ if (lws_hdr_total_length(wsi, WSI_TOKEN_KEY) >=
+ MAX_WEBSOCKET_04_KEY_LEN) {
lwsl_warn("Client key too long %d\n", MAX_WEBSOCKET_04_KEY_LEN);
goto bail;
}
@@ -473,7 +510,8 @@ handshake_0405(struct lws_context *context, struct lws *wsi)
/* make a buffer big enough for everything */
- response = (char *)pt->serv_buf + MAX_WEBSOCKET_04_KEY_LEN + 256 + LWS_PRE;
+ response = (char *)pt->serv_buf + MAX_WEBSOCKET_04_KEY_LEN +
+ 256 + LWS_PRE;
p = response;
LWS_CPYAPP(p, "HTTP/1.1 101 Switching Protocols\x0d\x0a"
"Upgrade: WebSocket\x0d\x0a"
@@ -566,9 +604,9 @@ bail:
static int
lws_ws_frame_rest_is_payload(struct lws *wsi, uint8_t **buf, size_t len)
{
+ unsigned int avail = (unsigned int)len;
uint8_t *buffer = *buf, mask[4];
struct lws_tokens ebuf;
- unsigned int avail = (unsigned int)len;
#if !defined(LWS_WITHOUT_EXTENSIONS)
unsigned int old_packet_length = (int)wsi->ws->rx_packet_length;
#endif
@@ -600,7 +638,7 @@ lws_ws_frame_rest_is_payload(struct lws *wsi, uint8_t **buf, size_t len)
if (avail > len)
avail = (unsigned int)len;
- if (avail <= 0)
+ if (!avail)
return 0;
ebuf.token = (char *)buffer;
diff --git a/thirdparty/libwebsockets/tls/mbedtls/lws-genhash.c b/thirdparty/libwebsockets/lib/tls/mbedtls/lws-genhash.c
index ce4ee6e382..ce4ee6e382 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/lws-genhash.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/lws-genhash.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/lws-genrsa.c b/thirdparty/libwebsockets/lib/tls/mbedtls/lws-genrsa.c
index 70a9fcf42c..99b2e75653 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/lws-genrsa.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/lws-genrsa.c
@@ -36,8 +36,6 @@ lws_jwk_destroy_genrsa_elements(struct lws_genrsa_elements *el)
LWS_VISIBLE int
lws_genrsa_create(struct lws_genrsa_ctx *ctx, struct lws_genrsa_elements *el)
{
- int n;
-
memset(ctx, 0, sizeof(*ctx));
ctx->ctx = lws_zalloc(sizeof(*ctx->ctx), "genrsa");
if (!ctx->ctx)
@@ -46,6 +44,8 @@ lws_genrsa_create(struct lws_genrsa_ctx *ctx, struct lws_genrsa_elements *el)
mbedtls_rsa_init(ctx->ctx, MBEDTLS_RSA_PKCS_V15, 0);
{
+ int n;
+
mbedtls_mpi *mpi[LWS_COUNT_RSA_ELEMENTS] = {
&ctx->ctx->E, &ctx->ctx->N, &ctx->ctx->D, &ctx->ctx->P,
&ctx->ctx->Q, &ctx->ctx->DP, &ctx->ctx->DQ,
@@ -129,7 +129,7 @@ cleanup_1:
LWS_VISIBLE int
lws_genrsa_public_decrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in,
- size_t in_len, uint8_t *out, size_t out_max)
+ size_t in_len, uint8_t *out, size_t out_max)
{
size_t olen = 0;
int n;
@@ -149,7 +149,7 @@ lws_genrsa_public_decrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in,
LWS_VISIBLE int
lws_genrsa_public_encrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in,
- size_t in_len, uint8_t *out)
+ size_t in_len, uint8_t *out)
{
int n;
@@ -213,8 +213,8 @@ lws_genrsa_public_verify(struct lws_genrsa_ctx *ctx, const uint8_t *in,
LWS_VISIBLE int
lws_genrsa_public_sign(struct lws_genrsa_ctx *ctx, const uint8_t *in,
- enum lws_genhash_types hash_type, uint8_t *sig,
- size_t sig_len)
+ enum lws_genhash_types hash_type, uint8_t *sig,
+ size_t sig_len)
{
int n, h = lws_genrsa_genrsa_hash_to_mbed_hash(hash_type);
diff --git a/thirdparty/libwebsockets/tls/mbedtls/mbedtls-client.c b/thirdparty/libwebsockets/lib/tls/mbedtls/mbedtls-client.c
index a7864ab790..84270c15bc 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/mbedtls-client.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/mbedtls-client.c
@@ -30,7 +30,6 @@ OpenSSL_client_verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
int
lws_ssl_client_bio_create(struct lws *wsi)
{
- X509_VERIFY_PARAM *param;
char hostname[128], *p;
const char *alpn_comma = wsi->context->tls.alpn_default;
struct alpn_ctx protos;
@@ -63,7 +62,7 @@ lws_ssl_client_bio_create(struct lws *wsi)
SSL_set_info_callback(wsi->tls.ssl, lws_ssl_info_callback);
if (!(wsi->tls.use_ssl & LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK)) {
- param = SSL_get0_param(wsi->tls.ssl);
+ X509_VERIFY_PARAM *param = SSL_get0_param(wsi->tls.ssl);
/* Enable automatic hostname checks */
// X509_VERIFY_PARAM_set_hostflags(param,
// X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
@@ -188,6 +187,8 @@ lws_tls_client_create_vhost_context(struct lws_vhost *vh,
const struct lws_context_creation_info *info,
const char *cipher_list,
const char *ca_filepath,
+ const void *ca_mem,
+ unsigned int ca_mem_len,
const char *cert_filepath,
const char *private_key_filepath)
{
@@ -214,16 +215,20 @@ lws_tls_client_create_vhost_context(struct lws_vhost *vh,
return 1;
}
- if (!ca_filepath)
+ if (!ca_filepath && (!ca_mem || !ca_mem_len))
return 0;
- if (alloc_file(vh->context, ca_filepath, &buf, &len)) {
- lwsl_err("Load CA cert file %s failed\n", ca_filepath);
- return 1;
+ if (ca_filepath) {
+ if (alloc_file(vh->context, ca_filepath, &buf, &len)) {
+ lwsl_err("Load CA cert file %s failed\n", ca_filepath);
+ return 1;
+ }
+ vh->tls.x509_client_CA = d2i_X509(NULL, buf, len);
+ free(buf);
+ } else {
+ vh->tls.x509_client_CA = d2i_X509(NULL, (uint8_t*)ca_mem, ca_mem_len);
}
- vh->tls.x509_client_CA = d2i_X509(NULL, buf, len);
- free(buf);
if (!vh->tls.x509_client_CA) {
lwsl_err("client CA: x509 parse failed\n");
return 1;
diff --git a/thirdparty/libwebsockets/tls/mbedtls/mbedtls-server.c b/thirdparty/libwebsockets/lib/tls/mbedtls/mbedtls-server.c
index f17c7e5494..df6ddf2c61 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/mbedtls-server.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/mbedtls-server.c
@@ -294,18 +294,20 @@ lws_tls_server_accept(struct lws *wsi)
if (n == 1) {
if (strstr(wsi->vhost->name, ".invalid")) {
- lwsl_notice("%s: vhost has .invalid, rejecting accept\n", __func__);
+ lwsl_notice("%s: vhost has .invalid, "
+ "rejecting accept\n", __func__);
return LWS_SSL_CAPABLE_ERROR;
}
- n = lws_tls_peer_cert_info(wsi, LWS_TLS_CERT_INFO_COMMON_NAME, &ir,
- sizeof(ir.ns.name));
+ n = lws_tls_peer_cert_info(wsi, LWS_TLS_CERT_INFO_COMMON_NAME,
+ &ir, sizeof(ir.ns.name));
if (!n)
lwsl_notice("%s: client cert CN '%s'\n",
__func__, ir.ns.name);
else
- lwsl_info("%s: couldn't get client cert CN\n", __func__);
+ lwsl_info("%s: couldn't get client cert CN\n",
+ __func__);
return LWS_SSL_CAPABLE_DONE;
}
@@ -322,7 +324,8 @@ lws_tls_server_accept(struct lws *wsi)
if (m == SSL_ERROR_WANT_READ || SSL_want_read(wsi->tls.ssl)) {
if (lws_change_pollfd(wsi, 0, LWS_POLLIN)) {
- lwsl_info("%s: WANT_READ change_pollfd failed\n", __func__);
+ lwsl_info("%s: WANT_READ change_pollfd failed\n",
+ __func__);
return LWS_SSL_CAPABLE_ERROR;
}
@@ -333,7 +336,8 @@ lws_tls_server_accept(struct lws *wsi)
lwsl_debug("%s: WANT_WRITE\n", __func__);
if (lws_change_pollfd(wsi, 0, LWS_POLLOUT)) {
- lwsl_info("%s: WANT_WRITE change_pollfd failed\n", __func__);
+ lwsl_info("%s: WANT_WRITE change_pollfd failed\n",
+ __func__);
return LWS_SSL_CAPABLE_ERROR;
}
return LWS_SSL_CAPABLE_MORE_SERVICE_WRITE;
@@ -554,7 +558,8 @@ lws_tls_acme_sni_cert_create(struct lws_vhost *vhost, const char *san_a,
//lwsl_hexdump_level(LLL_DEBUG, pkey_asn1, n);
/* and to use our generated private key */
- n = SSL_CTX_use_PrivateKey_ASN1(0, vhost->tls.ssl_ctx, pkey_asn1, m);
+ n = SSL_CTX_use_PrivateKey_ASN1(0, vhost->tls.ssl_ctx,
+ pkey_asn1, m);
lws_free(pkey_asn1);
if (n != 1) {
lwsl_err("%s: SSL_CTX_use_PrivateKey_ASN1 failed\n",
diff --git a/thirdparty/libwebsockets/tls/mbedtls/ssl.c b/thirdparty/libwebsockets/lib/tls/mbedtls/ssl.c
index f311ef50e3..b81f88862b 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/ssl.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/ssl.c
@@ -33,7 +33,8 @@ lws_context_init_ssl_library(const struct lws_context_creation_info *info)
lwsl_info(" Compiled with MbedTLS support\n");
if (!lws_check_opt(info->options, LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT))
- lwsl_info(" SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT\n");
+ lwsl_info(" SSL disabled: no "
+ "LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT\n");
return 0;
}
@@ -69,16 +70,17 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)
errno = 0;
n = SSL_read(wsi->tls.ssl, buf, len);
#if defined(LWS_WITH_ESP32)
- if (!n && errno == ENOTCONN) {
+ if (!n && errno == LWS_ENOTCONN) {
lwsl_debug("%p: SSL_read ENOTCONN\n", wsi);
return LWS_SSL_CAPABLE_ERROR;
}
#endif
#if defined(LWS_WITH_STATS)
- if (!wsi->seen_rx) {
+ if (!wsi->seen_rx && wsi->accept_start_us) {
lws_stats_atomic_bump(wsi->context, pt,
LWSSTATS_MS_SSL_RX_DELAY,
- time_in_microseconds() - wsi->accept_start_us);
+ lws_time_in_microseconds() -
+ wsi->accept_start_us);
lws_stats_atomic_bump(wsi->context, pt,
LWSSTATS_C_SSL_CONNS_HAD_RX, 1);
wsi->seen_rx = 1;
@@ -133,23 +135,12 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)
if (!wsi->tls.ssl)
goto bail;
- if (!SSL_pending(wsi->tls.ssl))
- goto bail;
+ if (SSL_pending(wsi->tls.ssl) &&
+ lws_dll_is_null(&wsi->tls.pending_tls_list)) {
- if (wsi->tls.pending_read_list_next)
- return n;
- if (wsi->tls.pending_read_list_prev)
- return n;
- if (pt->tls.pending_read_list == wsi)
- return n;
-
- /* add us to the linked list of guys with pending ssl */
- if (pt->tls.pending_read_list)
- pt->tls.pending_read_list->tls.pending_read_list_prev = wsi;
-
- wsi->tls.pending_read_list_next = pt->tls.pending_read_list;
- wsi->tls.pending_read_list_prev = NULL;
- pt->tls.pending_read_list = wsi;
+ lws_dll_lws_add_front(&wsi->tls.pending_tls_list,
+ &pt->tls.pending_tls_head);
+ }
return n;
bail:
@@ -189,7 +180,7 @@ lws_ssl_capable_write(struct lws *wsi, unsigned char *buf, int len)
if (m == SSL_ERROR_WANT_WRITE || SSL_want_write(wsi->tls.ssl)) {
lws_set_blocking_send(wsi);
- lwsl_notice("%s: want write\n", __func__);
+ lwsl_debug("%s: want write\n", __func__);
return LWS_SSL_CAPABLE_MORE_SERVICE;
}
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl3.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl3.h
index 007b392f3e..007b392f3e 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl3.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl3.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_cert.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_cert.h
index 86cf31ad51..86cf31ad51 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_cert.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_cert.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_code.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_code.h
index 80fdbb20f3..80fdbb20f3 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_code.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_code.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_dbg.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_dbg.h
index ad32cb92ff..ad32cb92ff 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_dbg.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_dbg.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_lib.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_lib.h
index 42b2de7501..42b2de7501 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_lib.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_lib.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_methods.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_methods.h
index cd2f8c0533..cd2f8c0533 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_methods.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_methods.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_pkey.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_pkey.h
index e790fcc995..e790fcc995 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_pkey.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_pkey.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_stack.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_stack.h
index 7a7051a026..7a7051a026 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_stack.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_stack.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_types.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_types.h
index 68ac748a28..68ac748a28 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_types.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_types.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_x509.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_x509.h
index 7594d064b4..7594d064b4 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/ssl_x509.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/ssl_x509.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/tls1.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/tls1.h
index 7af1b0157d..7af1b0157d 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/tls1.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/tls1.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/x509_vfy.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h
index 26bf6c88a8..26bf6c88a8 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/internal/x509_vfy.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/openssl/ssl.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/openssl/ssl.h
index e2b74fc6af..e2b74fc6af 100755
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/openssl/ssl.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/openssl/ssl.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/platform/ssl_pm.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/platform/ssl_pm.h
index cbbe3aa3a2..cbbe3aa3a2 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/platform/ssl_pm.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/platform/ssl_pm.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/platform/ssl_port.h b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/platform/ssl_port.h
index 74c7634355..74c7634355 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/include/platform/ssl_port.h
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/include/platform/ssl_port.h
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_cert.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_cert.c
index 5c608125ac..5c608125ac 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_cert.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_cert.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_lib.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_lib.c
index 2f688ca9ef..2f688ca9ef 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_lib.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_lib.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_methods.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_methods.c
index 0002360846..0002360846 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_methods.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_methods.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_pkey.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_pkey.c
index 567a33e2c2..567a33e2c2 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_pkey.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_pkey.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_stack.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_stack.c
index da836daf9c..da836daf9c 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_stack.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_stack.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_x509.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_x509.c
index ed79150831..ed79150831 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/library/ssl_x509.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/library/ssl_x509.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/platform/ssl_pm.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/platform/ssl_pm.c
index 4716c1ff56..4716c1ff56 100755
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/platform/ssl_pm.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/platform/ssl_pm.c
diff --git a/thirdparty/libwebsockets/tls/mbedtls/wrapper/platform/ssl_port.c b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/platform/ssl_port.c
index 8c7a31338b..8c7a31338b 100644
--- a/thirdparty/libwebsockets/tls/mbedtls/wrapper/platform/ssl_port.c
+++ b/thirdparty/libwebsockets/lib/tls/mbedtls/wrapper/platform/ssl_port.c
diff --git a/thirdparty/libwebsockets/tls/private.h b/thirdparty/libwebsockets/lib/tls/private.h
index 606e2574dc..ad01bfd4fb 100644
--- a/thirdparty/libwebsockets/tls/private.h
+++ b/thirdparty/libwebsockets/lib/tls/private.h
@@ -64,6 +64,8 @@
#include <openssl/err.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
+ #include <openssl/rsa.h>
+ #include <openssl/bn.h>
#ifdef LWS_HAVE_OPENSSL_ECDH_H
#include <openssl/ecdh.h>
#endif
@@ -71,8 +73,9 @@
#endif /* not mbedtls */
#if defined(OPENSSL_VERSION_NUMBER)
#if (OPENSSL_VERSION_NUMBER < 0x0009080afL)
-/* later openssl defines this to negate the presence of tlsext... but it was only
- * introduced at 0.9.8j. Earlier versions don't know it exists so don't
+/*
+ * later openssl defines this to negate the presence of tlsext... but it was
+ * only introduced at 0.9.8j. Earlier versions don't know it exists so don't
* define it... making it look like the feature exists...
*/
#define OPENSSL_NO_TLSEXT
@@ -115,7 +118,7 @@ struct lws_context_tls {
};
struct lws_pt_tls {
- struct lws *pending_read_list; /* linked list */
+ struct lws_dll_lws pending_tls_head;
};
struct lws_tls_ss_pieces;
@@ -149,7 +152,7 @@ struct lws_vhost_tls {
struct lws_lws_tls {
lws_tls_conn *ssl;
lws_tls_bio *client_bio;
- struct lws *pending_read_list_prev, *pending_read_list_next;
+ struct lws_dll_lws pending_tls_list;
unsigned int use_ssl;
unsigned int redirect_to_https:1;
};
@@ -211,8 +214,8 @@ lws_tls_generic_cert_checks(struct lws_vhost *vhost, const char *cert,
const char *private_key);
LWS_EXTERN int
lws_tls_alloc_pem_to_der_file(struct lws_context *context, const char *filename,
- const char *inbuf, lws_filepos_t inlen,
- uint8_t **buf, lws_filepos_t *amount);
+ const char *inbuf, lws_filepos_t inlen,
+ uint8_t **buf, lws_filepos_t *amount);
#if !defined(LWS_NO_SERVER)
LWS_EXTERN int
@@ -260,6 +263,8 @@ lws_tls_client_create_vhost_context(struct lws_vhost *vh,
const struct lws_context_creation_info *info,
const char *cipher_list,
const char *ca_filepath,
+ const void *ca_mem,
+ unsigned int ca_mem_len,
const char *cert_filepath,
const char *private_key_filepath);
@@ -278,4 +283,4 @@ lws_ssl_info_callback(const lws_tls_conn *ssl, int where, int ret);
int
lws_tls_fake_POLLIN_for_buffered(struct lws_context_per_thread *pt);
-#endif \ No newline at end of file
+#endif
diff --git a/thirdparty/libwebsockets/tls/tls-client.c b/thirdparty/libwebsockets/lib/tls/tls-client.c
index 70eb6f6078..f69c685fa7 100644
--- a/thirdparty/libwebsockets/tls/tls-client.c
+++ b/thirdparty/libwebsockets/lib/tls/tls-client.c
@@ -1,7 +1,7 @@
/*
* libwebsockets - client-related ssl code independent of backend
*
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
+ * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -89,10 +89,10 @@ lws_ssl_client_connect2(struct lws *wsi, char *errbuf, int len)
int lws_context_init_client_ssl(const struct lws_context_creation_info *info,
struct lws_vhost *vhost)
{
- const char *ca_filepath = info->ssl_ca_filepath;
- const char *cipher_list = info->ssl_cipher_list;
const char *private_key_filepath = info->ssl_private_key_filepath;
const char *cert_filepath = info->ssl_cert_filepath;
+ const char *ca_filepath = info->ssl_ca_filepath;
+ const char *cipher_list = info->ssl_cipher_list;
struct lws wsi;
if (vhost->options & LWS_SERVER_OPTION_ONLY_RAW)
@@ -128,7 +128,10 @@ int lws_context_init_client_ssl(const struct lws_context_creation_info *info,
}
if (lws_tls_client_create_vhost_context(vhost, info, cipher_list,
- ca_filepath, cert_filepath,
+ ca_filepath,
+ info->client_ssl_ca_mem,
+ info->client_ssl_ca_mem_len,
+ cert_filepath,
private_key_filepath))
return 1;
@@ -139,12 +142,12 @@ int lws_context_init_client_ssl(const struct lws_context_creation_info *info,
* lws_get_context() in the callback
*/
memset(&wsi, 0, sizeof(wsi));
- wsi.vhost = vhost;
+ wsi.vhost = vhost; /* not a real bound wsi */
wsi.context = vhost->context;
vhost->protocols[0].callback(&wsi,
LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS,
- vhost->tls.ssl_client_ctx, NULL, 0);
+ vhost->tls.ssl_client_ctx, NULL, 0);
return 0;
}
diff --git a/thirdparty/libwebsockets/tls/tls-server.c b/thirdparty/libwebsockets/lib/tls/tls-server.c
index 440e790660..9d3f70dbea 100644
--- a/thirdparty/libwebsockets/tls/tls-server.c
+++ b/thirdparty/libwebsockets/lib/tls/tls-server.c
@@ -56,7 +56,8 @@ lws_context_init_alpn(struct lws_vhost *vhost)
vhost->tls.alpn_ctx.data,
sizeof(vhost->tls.alpn_ctx.data) - 1);
- SSL_CTX_set_alpn_select_cb(vhost->tls.ssl_ctx, alpn_cb, &vhost->tls.alpn_ctx);
+ SSL_CTX_set_alpn_select_cb(vhost->tls.ssl_ctx, alpn_cb,
+ &vhost->tls.alpn_ctx);
#else
lwsl_err(
" HTTP2 / ALPN configured but not supported by OpenSSL 0x%lx\n",
@@ -139,7 +140,7 @@ lws_context_init_server_ssl(const struct lws_context_creation_info *info,
* lws_get_context() in the callback
*/
memset(&wsi, 0, sizeof(wsi));
- wsi.vhost = vhost;
+ wsi.vhost = vhost; /* not a real bound wsi */
wsi.context = context;
/*
@@ -177,10 +178,10 @@ LWS_VISIBLE int
lws_server_socket_service_ssl(struct lws *wsi, lws_sockfd_type accept_fd)
{
struct lws_context *context = wsi->context;
- struct lws_vhost *vh;
struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
- int n;
+ struct lws_vhost *vh;
char buf[256];
+ int n;
(void)buf;
@@ -312,12 +313,14 @@ lws_server_socket_service_ssl(struct lws *wsi, lws_sockfd_type accept_fd)
/* normal SSL connection processing path */
#if defined(LWS_WITH_STATS)
+ /* only set this the first time around */
if (!wsi->accept_start_us)
- wsi->accept_start_us = time_in_microseconds();
+ wsi->accept_start_us = lws_time_in_microseconds();
#endif
errno = 0;
lws_stats_atomic_bump(wsi->context, pt,
- LWSSTATS_C_SSL_CONNECTIONS_ACCEPT_SPIN, 1);
+ LWSSTATS_C_SSL_CONNECTIONS_ACCEPT_SPIN,
+ 1);
n = lws_tls_server_accept(wsi);
lws_latency(context, wsi,
"SSL_accept LRS_SSL_ACK_PENDING\n", n, n == 1);
@@ -327,7 +330,8 @@ lws_server_socket_service_ssl(struct lws *wsi, lws_sockfd_type accept_fd)
break;
case LWS_SSL_CAPABLE_ERROR:
lws_stats_atomic_bump(wsi->context, pt,
- LWSSTATS_C_SSL_CONNECTIONS_FAILED, 1);
+ LWSSTATS_C_SSL_CONNECTIONS_FAILED,
+ 1);
lwsl_info("SSL_accept failed socket %u: %d\n",
wsi->desc.sockfd, n);
wsi->socket_is_permanently_unusable = 1;
@@ -340,10 +344,12 @@ lws_server_socket_service_ssl(struct lws *wsi, lws_sockfd_type accept_fd)
lws_stats_atomic_bump(wsi->context, pt,
LWSSTATS_C_SSL_CONNECTIONS_ACCEPTED, 1);
#if defined(LWS_WITH_STATS)
- lws_stats_atomic_bump(wsi->context, pt,
+ if (wsi->accept_start_us)
+ lws_stats_atomic_bump(wsi->context, pt,
LWSSTATS_MS_SSL_CONNECTIONS_ACCEPTED_DELAY,
- time_in_microseconds() - wsi->accept_start_us);
- wsi->accept_start_us = time_in_microseconds();
+ lws_time_in_microseconds() -
+ wsi->accept_start_us);
+ wsi->accept_start_us = lws_time_in_microseconds();
#endif
accepted:
@@ -354,7 +360,7 @@ accepted:
if (!vh->being_destroyed && wsi->tls.ssl &&
vh->tls.ssl_ctx == lws_tls_ctx_from_wsi(wsi)) {
lwsl_info("setting wsi to vh %s\n", vh->name);
- wsi->vhost = vh;
+ lws_vhost_bind_wsi(vh, wsi);
break;
}
vh = vh->vhost_next;
diff --git a/thirdparty/libwebsockets/tls/tls.c b/thirdparty/libwebsockets/lib/tls/tls.c
index 92b7c5593c..a32951689f 100644
--- a/thirdparty/libwebsockets/tls/tls.c
+++ b/thirdparty/libwebsockets/lib/tls/tls.c
@@ -30,18 +30,18 @@
int
lws_tls_fake_POLLIN_for_buffered(struct lws_context_per_thread *pt)
{
- struct lws *wsi, *wsi_next;
int ret = 0;
- wsi = pt->tls.pending_read_list;
- while (wsi && wsi->position_in_fds_table != LWS_NO_FDS_POS) {
- wsi_next = wsi->tls.pending_read_list_next;
+ lws_start_foreach_dll_safe(struct lws_dll_lws *, p, p1,
+ pt->tls.pending_tls_head.next) {
+ struct lws *wsi = lws_container_of(p, struct lws,
+ tls.pending_tls_list);
+
pt->fds[wsi->position_in_fds_table].revents |=
pt->fds[wsi->position_in_fds_table].events & LWS_POLLIN;
ret |= pt->fds[wsi->position_in_fds_table].revents & LWS_POLLIN;
- wsi = wsi_next;
- }
+ } lws_end_foreach_dll_safe(p, p1);
return !!ret;
}
@@ -49,29 +49,10 @@ lws_tls_fake_POLLIN_for_buffered(struct lws_context_per_thread *pt)
void
__lws_ssl_remove_wsi_from_buffered_list(struct lws *wsi)
{
- struct lws_context *context = wsi->context;
- struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
-
- if (!wsi->tls.pending_read_list_prev &&
- !wsi->tls.pending_read_list_next &&
- pt->tls.pending_read_list != wsi)
- /* we are not on the list */
+ if (lws_dll_is_null(&wsi->tls.pending_tls_list))
return;
- /* point previous guy's next to our next */
- if (!wsi->tls.pending_read_list_prev)
- pt->tls.pending_read_list = wsi->tls.pending_read_list_next;
- else
- wsi->tls.pending_read_list_prev->tls.pending_read_list_next =
- wsi->tls.pending_read_list_next;
-
- /* point next guy's previous to our previous */
- if (wsi->tls.pending_read_list_next)
- wsi->tls.pending_read_list_next->tls.pending_read_list_prev =
- wsi->tls.pending_read_list_prev;
-
- wsi->tls.pending_read_list_prev = NULL;
- wsi->tls.pending_read_list_next = NULL;
+ lws_dll_lws_remove(&wsi->tls.pending_tls_list);
}
void
@@ -173,12 +154,12 @@ bail:
int
lws_tls_alloc_pem_to_der_file(struct lws_context *context, const char *filename,
- const char *inbuf, lws_filepos_t inlen,
- uint8_t **buf, lws_filepos_t *amount)
+ const char *inbuf, lws_filepos_t inlen,
+ uint8_t **buf, lws_filepos_t *amount)
{
const uint8_t *pem, *p, *end;
- uint8_t *q;
lws_filepos_t len;
+ uint8_t *q;
int n;
if (filename) {
@@ -238,23 +219,25 @@ bail:
int
lws_tls_check_cert_lifetime(struct lws_vhost *v)
{
- union lws_tls_cert_info_results ir;
time_t now = (time_t)lws_now_secs(), life = 0;
struct lws_acme_cert_aging_args caa;
+ union lws_tls_cert_info_results ir;
int n;
if (v->tls.ssl_ctx && !v->tls.skipped_certs) {
- if (now < 1464083026) /* May 2016 */
+ if (now < 1542933698) /* Nov 23 2018 00:42 UTC */
/* our clock is wrong and we can't judge the certs */
return -1;
- n = lws_tls_vhost_cert_info(v, LWS_TLS_CERT_INFO_VALIDITY_TO, &ir, 0);
+ n = lws_tls_vhost_cert_info(v, LWS_TLS_CERT_INFO_VALIDITY_TO,
+ &ir, 0);
if (n)
return 1;
life = (ir.time - now) / (24 * 3600);
- lwsl_notice(" vhost %s: cert expiry: %dd\n", v->name, (int)life);
+ lwsl_notice(" vhost %s: cert expiry: %dd\n", v->name,
+ (int)life);
} else
lwsl_notice(" vhost %s: no cert\n", v->name);
@@ -446,7 +429,7 @@ lws_tls_cert_updated(struct lws_context *context, const char *certpath,
wsi.context = context;
lws_start_foreach_ll(struct lws_vhost *, v, context->vhost_list) {
- wsi.vhost = v;
+ wsi.vhost = v; /* not a real bound wsi */
if (v->tls.alloc_cert_path && v->tls.key_path &&
!strcmp(v->tls.alloc_cert_path, certpath) &&
!strcmp(v->tls.key_path, keypath)) {
diff --git a/thirdparty/libwebsockets/libwebsockets.h b/thirdparty/libwebsockets/libwebsockets.h
deleted file mode 100644
index 2c01696404..0000000000
--- a/thirdparty/libwebsockets/libwebsockets.h
+++ /dev/null
@@ -1,7346 +0,0 @@
-/*
- * libwebsockets - small server side websockets and web server implementation
- *
- * Copyright (C) 2010-2018 Andy Green <andy@warmcat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation:
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-/** @file */
-
-#ifndef LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
-#define LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
-
-#ifdef __cplusplus
-#include <cstddef>
-#include <cstdarg>
-
-extern "C" {
-#else
-#include <stdarg.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "lws_config.h"
-
-/*
- * CARE: everything using cmake defines needs to be below here
- */
-
-#if defined(LWS_HAS_INTPTR_T)
-#include <stdint.h>
-#define lws_intptr_t intptr_t
-#else
-typedef unsigned long long lws_intptr_t;
-#endif
-
-#if defined(WIN32) || defined(_WIN32)
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <stddef.h>
-#include <basetsd.h>
-#include <io.h>
-#ifndef _WIN32_WCE
-#include <fcntl.h>
-#else
-#define _O_RDONLY 0x0000
-#define O_RDONLY _O_RDONLY
-#endif
-
-#define LWS_INLINE __inline
-#define LWS_VISIBLE
-#define LWS_WARN_UNUSED_RESULT
-#define LWS_WARN_DEPRECATED
-#define LWS_FORMAT(string_index)
-
-#ifdef LWS_DLL
-#ifdef LWS_INTERNAL
-#define LWS_EXTERN extern __declspec(dllexport)
-#else
-#define LWS_EXTERN extern __declspec(dllimport)
-#endif
-#else
-#define LWS_EXTERN
-#endif
-
-#define LWS_INVALID_FILE INVALID_HANDLE_VALUE
-#define LWS_O_RDONLY _O_RDONLY
-#define LWS_O_WRONLY _O_WRONLY
-#define LWS_O_CREAT _O_CREAT
-#define LWS_O_TRUNC _O_TRUNC
-
-#ifndef __func__
-#define __func__ __FUNCTION__
-#endif
-
-#else /* NOT WIN32 */
-#include <unistd.h>
-#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
-#include <sys/capability.h>
-#endif
-
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__QNX__) || defined(__OpenBSD__)
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif
-
-#define LWS_INLINE inline
-#define LWS_O_RDONLY O_RDONLY
-#define LWS_O_WRONLY O_WRONLY
-#define LWS_O_CREAT O_CREAT
-#define LWS_O_TRUNC O_TRUNC
-
-#if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_TA) && !defined(LWS_WITH_ESP32)
-#include <poll.h>
-#include <netdb.h>
-#define LWS_INVALID_FILE -1
-#else
-#define getdtablesize() (30)
-#if defined(LWS_WITH_ESP32)
-#define LWS_INVALID_FILE NULL
-#else
-#define LWS_INVALID_FILE NULL
-#endif
-#endif
-
-#if defined(__GNUC__)
-
-/* warn_unused_result attribute only supported by GCC 3.4 or later */
-#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#define LWS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
-#else
-#define LWS_WARN_UNUSED_RESULT
-#endif
-
-#define LWS_VISIBLE __attribute__((visibility("default")))
-#define LWS_WARN_DEPRECATED __attribute__ ((deprecated))
-#define LWS_FORMAT(string_index) __attribute__ ((format(printf, string_index, string_index+1)))
-#else
-#define LWS_VISIBLE
-#define LWS_WARN_UNUSED_RESULT
-#define LWS_WARN_DEPRECATED
-#define LWS_FORMAT(string_index)
-#endif
-
-#if defined(__ANDROID__)
-#include <netinet/in.h>
-#include <unistd.h>
-#define getdtablesize() sysconf(_SC_OPEN_MAX)
-#endif
-
-#endif
-
-#if defined(LWS_WITH_LIBEV)
-#include <ev.h>
-#endif /* LWS_WITH_LIBEV */
-#ifdef LWS_WITH_LIBUV
-#include <uv.h>
-#ifdef LWS_HAVE_UV_VERSION_H
-#include <uv-version.h>
-#endif
-#ifdef LWS_HAVE_NEW_UV_VERSION_H
-#include <uv/version.h>
-#endif
-#endif /* LWS_WITH_LIBUV */
-#if defined(LWS_WITH_LIBEVENT)
-#include <event2/event.h>
-#endif /* LWS_WITH_LIBEVENT */
-
-#ifndef LWS_EXTERN
-#define LWS_EXTERN extern
-#endif
-
-#ifdef _WIN32
-#define random rand
-#else
-#if !defined(OPTEE_TA)
-#include <sys/time.h>
-#include <unistd.h>
-#endif
-#endif
-
-#if defined(LWS_WITH_TLS)
-
-#ifdef USE_WOLFSSL
-#ifdef USE_OLD_CYASSL
-#ifdef _WIN32
-/*
- * Include user-controlled settings for windows from
- * <wolfssl-root>/IDE/WIN/user_settings.h
- */
-#include <IDE/WIN/user_settings.h>
-#include <cyassl/ctaocrypt/settings.h>
-#else
-#include <cyassl/options.h>
-#endif
-#include <cyassl/openssl/ssl.h>
-#include <cyassl/error-ssl.h>
-
-#else
-#ifdef _WIN32
-/*
- * Include user-controlled settings for windows from
- * <wolfssl-root>/IDE/WIN/user_settings.h
- */
-#include <IDE/WIN/user_settings.h>
-#include <wolfssl/wolfcrypt/settings.h>
-#else
-#include <wolfssl/options.h>
-#endif
-#include <wolfssl/openssl/ssl.h>
-#include <wolfssl/error-ssl.h>
-#endif /* not USE_OLD_CYASSL */
-#else
-#if defined(LWS_WITH_MBEDTLS)
-#if defined(LWS_WITH_ESP32)
-/* this filepath is passed to us but without quotes or <> */
-#undef MBEDTLS_CONFIG_FILE
-#define MBEDTLS_CONFIG_FILE <mbedtls/esp_config.h>
-#endif
-#include <mbedtls/ssl.h>
-#else
-#include <openssl/ssl.h>
-#if !defined(LWS_WITH_MBEDTLS)
-#include <openssl/err.h>
-#endif
-#endif
-#endif /* not USE_WOLFSSL */
-#endif
-
-/*
- * Helpers for pthread mutex in user code... if lws is built for
- * multiple service threads, these resolve to pthread mutex
- * operations. In the case LWS_MAX_SMP is 1 (the default), they
- * are all NOPs and no pthread type or api is referenced.
- */
-
-#if LWS_MAX_SMP > 1
-
-#include <pthread.h>
-
-#define lws_pthread_mutex(name) pthread_mutex_t name;
-
-static LWS_INLINE void
-lws_pthread_mutex_init(pthread_mutex_t *lock)
-{
- pthread_mutex_init(lock, NULL);
-}
-
-static LWS_INLINE void
-lws_pthread_mutex_destroy(pthread_mutex_t *lock)
-{
- pthread_mutex_destroy(lock);
-}
-
-static LWS_INLINE void
-lws_pthread_mutex_lock(pthread_mutex_t *lock)
-{
- pthread_mutex_lock(lock);
-}
-
-static LWS_INLINE void
-lws_pthread_mutex_unlock(pthread_mutex_t *lock)
-{
- pthread_mutex_unlock(lock);
-}
-
-#else
-#define lws_pthread_mutex(name)
-#define lws_pthread_mutex_init(_a)
-#define lws_pthread_mutex_destroy(_a)
-#define lws_pthread_mutex_lock(_a)
-#define lws_pthread_mutex_unlock(_a)
-#endif
-
-
-#define CONTEXT_PORT_NO_LISTEN -1
-#define CONTEXT_PORT_NO_LISTEN_SERVER -2
-
-/** \defgroup log Logging
- *
- * ##Logging
- *
- * Lws provides flexible and filterable logging facilities, which can be
- * used inside lws and in user code.
- *
- * Log categories may be individually filtered bitwise, and directed to built-in
- * sinks for syslog-compatible logging, or a user-defined function.
- */
-///@{
-
-enum lws_log_levels {
- LLL_ERR = 1 << 0,
- LLL_WARN = 1 << 1,
- LLL_NOTICE = 1 << 2,
- LLL_INFO = 1 << 3,
- LLL_DEBUG = 1 << 4,
- LLL_PARSER = 1 << 5,
- LLL_HEADER = 1 << 6,
- LLL_EXT = 1 << 7,
- LLL_CLIENT = 1 << 8,
- LLL_LATENCY = 1 << 9,
- LLL_USER = 1 << 10,
-
- LLL_COUNT = 11 /* set to count of valid flags */
-};
-
-LWS_VISIBLE LWS_EXTERN void _lws_log(int filter, const char *format, ...) LWS_FORMAT(2);
-LWS_VISIBLE LWS_EXTERN void _lws_logv(int filter, const char *format, va_list vl);
-/**
- * lwsl_timestamp: generate logging timestamp string
- *
- * \param level: logging level
- * \param p: char * buffer to take timestamp
- * \param len: length of p
- *
- * returns length written in p
- */
-LWS_VISIBLE LWS_EXTERN int
-lwsl_timestamp(int level, char *p, int len);
-
-/* these guys are unconditionally included */
-
-#define lwsl_err(...) _lws_log(LLL_ERR, __VA_ARGS__)
-#define lwsl_user(...) _lws_log(LLL_USER, __VA_ARGS__)
-
-#if !defined(LWS_WITH_NO_LOGS)
-/* notice and warn are usually included by being compiled in */
-#define lwsl_warn(...) _lws_log(LLL_WARN, __VA_ARGS__)
-#define lwsl_notice(...) _lws_log(LLL_NOTICE, __VA_ARGS__)
-#endif
-/*
- * weaker logging can be deselected by telling CMake to build in RELEASE mode
- * that gets rid of the overhead of checking while keeping _warn and _err
- * active
- */
-
-#ifdef _DEBUG
-#if defined(LWS_WITH_NO_LOGS)
-/* notice, warn and log are always compiled in */
-#define lwsl_warn(...) _lws_log(LLL_WARN, __VA_ARGS__)
-#define lwsl_notice(...) _lws_log(LLL_NOTICE, __VA_ARGS__)
-#endif
-#define lwsl_info(...) _lws_log(LLL_INFO, __VA_ARGS__)
-#define lwsl_debug(...) _lws_log(LLL_DEBUG, __VA_ARGS__)
-#define lwsl_parser(...) _lws_log(LLL_PARSER, __VA_ARGS__)
-#define lwsl_header(...) _lws_log(LLL_HEADER, __VA_ARGS__)
-#define lwsl_ext(...) _lws_log(LLL_EXT, __VA_ARGS__)
-#define lwsl_client(...) _lws_log(LLL_CLIENT, __VA_ARGS__)
-#define lwsl_latency(...) _lws_log(LLL_LATENCY, __VA_ARGS__)
-
-#else /* no debug */
-#if defined(LWS_WITH_NO_LOGS)
-#define lwsl_warn(...) do {} while(0)
-#define lwsl_notice(...) do {} while(0)
-#endif
-#define lwsl_info(...) do {} while(0)
-#define lwsl_debug(...) do {} while(0)
-#define lwsl_parser(...) do {} while(0)
-#define lwsl_header(...) do {} while(0)
-#define lwsl_ext(...) do {} while(0)
-#define lwsl_client(...) do {} while(0)
-#define lwsl_latency(...) do {} while(0)
-
-#endif
-
-#define lwsl_hexdump_err(...) lwsl_hexdump_level(LLL_ERR, __VA_ARGS__)
-#define lwsl_hexdump_warn(...) lwsl_hexdump_level(LLL_WARN, __VA_ARGS__)
-#define lwsl_hexdump_notice(...) lwsl_hexdump_level(LLL_NOTICE, __VA_ARGS__)
-#define lwsl_hexdump_info(...) lwsl_hexdump_level(LLL_INFO, __VA_ARGS__)
-#define lwsl_hexdump_debug(...) lwsl_hexdump_level(LLL_DEBUG, __VA_ARGS__)
-
-/**
- * lwsl_hexdump_level() - helper to hexdump a buffer at a selected debug level
- *
- * \param level: one of LLL_ constants
- * \param vbuf: buffer start to dump
- * \param len: length of buffer to dump
- *
- * If \p level is visible, does a nice hexdump -C style dump of \p vbuf for
- * \p len bytes. This can be extremely convenient while debugging.
- */
-LWS_VISIBLE LWS_EXTERN void
-lwsl_hexdump_level(int level, const void *vbuf, size_t len);
-
-/**
- * lwsl_hexdump() - helper to hexdump a buffer (DEBUG builds only)
- *
- * \param buf: buffer start to dump
- * \param len: length of buffer to dump
- *
- * Calls through to lwsl_hexdump_level(LLL_DEBUG, ... for compatability.
- * It's better to use lwsl_hexdump_level(level, ... directly so you can control
- * the visibility.
- */
-LWS_VISIBLE LWS_EXTERN void
-lwsl_hexdump(const void *buf, size_t len);
-
-/**
- * lws_is_be() - returns nonzero if the platform is Big Endian
- */
-static LWS_INLINE int lws_is_be(void) {
- const int probe = ~0xff;
-
- return *(const char *)&probe;
-}
-
-/**
- * lws_set_log_level() - Set the logging bitfield
- * \param level: OR together the LLL_ debug contexts you want output from
- * \param log_emit_function: NULL to leave it as it is, or a user-supplied
- * function to perform log string emission instead of
- * the default stderr one.
- *
- * log level defaults to "err", "warn" and "notice" contexts enabled and
- * emission on stderr. If stderr is a tty (according to isatty()) then
- * the output is coloured according to the log level using ANSI escapes.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_set_log_level(int level,
- void (*log_emit_function)(int level, const char *line));
-
-/**
- * lwsl_emit_syslog() - helper log emit function writes to system log
- *
- * \param level: one of LLL_ log level indexes
- * \param line: log string
- *
- * You use this by passing the function pointer to lws_set_log_level(), to set
- * it as the log emit function, it is not called directly.
- */
-LWS_VISIBLE LWS_EXTERN void
-lwsl_emit_syslog(int level, const char *line);
-
-/**
- * lwsl_visible() - returns true if the log level should be printed
- *
- * \param level: one of LLL_ log level indexes
- *
- * This is useful if you have to do work to generate the log content, you
- * can skip the work if the log level used to print it is not actually
- * enabled at runtime.
- */
-LWS_VISIBLE LWS_EXTERN int
-lwsl_visible(int level);
-
-///@}
-
-
-#include <stddef.h>
-
-#ifndef lws_container_of
-#define lws_container_of(P,T,M) ((T *)((char *)(P) - offsetof(T, M)))
-#endif
-
-struct lws;
-
-typedef int64_t lws_usec_t;
-
-/* api change list for user code to test against */
-
-#define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_ARG
-
-/* the struct lws_protocols has the id field present */
-#define LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
-
-/* you can call lws_get_peer_write_allowance */
-#define LWS_FEATURE_PROTOCOLS_HAS_PEER_WRITE_ALLOWANCE
-
-/* extra parameter introduced in 917f43ab821 */
-#define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_LEN
-
-/* File operations stuff exists */
-#define LWS_FEATURE_FOPS
-
-
-#if defined(_WIN32)
-typedef SOCKET lws_sockfd_type;
-typedef HANDLE lws_filefd_type;
-
-struct lws_pollfd {
- lws_sockfd_type fd; /**< file descriptor */
- SHORT events; /**< which events to respond to */
- SHORT revents; /**< which events happened */
-};
-#define LWS_POLLHUP (FD_CLOSE)
-#define LWS_POLLIN (FD_READ | FD_ACCEPT)
-#define LWS_POLLOUT (FD_WRITE)
-#else
-
-
-#if defined(LWS_WITH_ESP32)
-
-typedef int lws_sockfd_type;
-typedef int lws_filefd_type;
-
-struct pollfd {
- lws_sockfd_type fd; /**< fd related to */
- short events; /**< which POLL... events to respond to */
- short revents; /**< which POLL... events occurred */
-};
-#define POLLIN 0x0001
-#define POLLPRI 0x0002
-#define POLLOUT 0x0004
-#define POLLERR 0x0008
-#define POLLHUP 0x0010
-#define POLLNVAL 0x0020
-
-#include <freertos/FreeRTOS.h>
-#include <freertos/event_groups.h>
-#include <string.h>
-#include "esp_wifi.h"
-#include "esp_system.h"
-#include "esp_event.h"
-#include "esp_event_loop.h"
-#include "nvs.h"
-#include "driver/gpio.h"
-#include "esp_spi_flash.h"
-#include "freertos/timers.h"
-
-#if !defined(CONFIG_FREERTOS_HZ)
-#define CONFIG_FREERTOS_HZ 100
-#endif
-
-typedef TimerHandle_t uv_timer_t;
-typedef void uv_cb_t(uv_timer_t *);
-typedef void * uv_handle_t;
-
-struct timer_mapping {
- uv_cb_t *cb;
- uv_timer_t *t;
-};
-
-#define UV_VERSION_MAJOR 1
-
-#define lws_uv_getloop(a, b) (NULL)
-
-static LWS_INLINE void uv_timer_init(void *l, uv_timer_t *t)
-{
- (void)l;
- *t = NULL;
-}
-
-extern void esp32_uvtimer_cb(TimerHandle_t t);
-
-static LWS_INLINE void uv_timer_start(uv_timer_t *t, uv_cb_t *cb, int first, int rep)
-{
- struct timer_mapping *tm = (struct timer_mapping *)malloc(sizeof(*tm));
-
- if (!tm)
- return;
-
- tm->t = t;
- tm->cb = cb;
-
- *t = xTimerCreate("x", pdMS_TO_TICKS(first), !!rep, tm,
- (TimerCallbackFunction_t)esp32_uvtimer_cb);
- xTimerStart(*t, 0);
-}
-
-static LWS_INLINE void uv_timer_stop(uv_timer_t *t)
-{
- xTimerStop(*t, 0);
-}
-
-static LWS_INLINE void uv_close(uv_handle_t *h, void *v)
-{
- free(pvTimerGetTimerID((uv_timer_t)h));
- xTimerDelete(*(uv_timer_t *)h, 0);
-}
-
-/* ESP32 helper declarations */
-
-#include <mdns.h>
-#include <esp_partition.h>
-
-#define LWS_PLUGIN_STATIC
-#define LWS_MAGIC_REBOOT_TYPE_ADS 0x50001ffc
-#define LWS_MAGIC_REBOOT_TYPE_REQ_FACTORY 0xb00bcafe
-#define LWS_MAGIC_REBOOT_TYPE_FORCED_FACTORY 0xfaceb00b
-#define LWS_MAGIC_REBOOT_TYPE_FORCED_FACTORY_BUTTON 0xf0cedfac
-
-
-/* user code provides these */
-
-extern void
-lws_esp32_identify_physical_device(void);
-
-/* lws-plat-esp32 provides these */
-
-typedef void (*lws_cb_scan_done)(uint16_t count, wifi_ap_record_t *recs, void *arg);
-
-enum genled_state {
- LWSESP32_GENLED__INIT,
- LWSESP32_GENLED__LOST_NETWORK,
- LWSESP32_GENLED__NO_NETWORK,
- LWSESP32_GENLED__CONN_AP,
- LWSESP32_GENLED__GOT_IP,
- LWSESP32_GENLED__OK,
-};
-
-struct lws_group_member {
- struct lws_group_member *next;
- uint64_t last_seen;
- char model[16];
- char role[16];
- char host[32];
- char mac[20];
- int width, height;
- struct ip4_addr addr;
- struct ip6_addr addrv6;
- uint8_t flags;
-};
-
-#define LWS_SYSTEM_GROUP_MEMBER_ADD 1
-#define LWS_SYSTEM_GROUP_MEMBER_CHANGE 2
-#define LWS_SYSTEM_GROUP_MEMBER_REMOVE 3
-
-#define LWS_GROUP_FLAG_SELF 1
-
-struct lws_esp32 {
- char sta_ip[16];
- char sta_mask[16];
- char sta_gw[16];
- char serial[16];
- char opts[16];
- char model[16];
- char group[16];
- char role[16];
- char ssid[4][64];
- char password[4][64];
- char active_ssid[64];
- char access_pw[16];
- char hostname[32];
- char mac[20];
- char le_dns[64];
- char le_email[64];
- char region;
- char inet;
- char conn_ap;
-
- enum genled_state genled;
- uint64_t genled_t;
-
- lws_cb_scan_done scan_consumer;
- void *scan_consumer_arg;
- struct lws_group_member *first;
- int extant_group_members;
-
- char acme;
- char upload;
-
- volatile char button_is_down;
-};
-
-struct lws_esp32_image {
- uint32_t romfs;
- uint32_t romfs_len;
- uint32_t json;
- uint32_t json_len;
-};
-
-extern struct lws_esp32 lws_esp32;
-struct lws_vhost;
-
-extern esp_err_t
-lws_esp32_event_passthru(void *ctx, system_event_t *event);
-extern void
-lws_esp32_wlan_config(void);
-extern void
-lws_esp32_wlan_start_ap(void);
-extern void
-lws_esp32_wlan_start_station(void);
-struct lws_context_creation_info;
-extern void
-lws_esp32_set_creation_defaults(struct lws_context_creation_info *info);
-extern struct lws_context *
-lws_esp32_init(struct lws_context_creation_info *, struct lws_vhost **pvh);
-extern int
-lws_esp32_wlan_nvs_get(int retry);
-extern esp_err_t
-lws_nvs_set_str(nvs_handle handle, const char* key, const char* value);
-extern void
-lws_esp32_restart_guided(uint32_t type);
-extern const esp_partition_t *
-lws_esp_ota_get_boot_partition(void);
-extern int
-lws_esp32_get_image_info(const esp_partition_t *part, struct lws_esp32_image *i, char *json, int json_len);
-extern int
-lws_esp32_leds_network_indication(void);
-
-extern uint32_t lws_esp32_get_reboot_type(void);
-extern uint16_t lws_esp32_sine_interp(int n);
-
-/* required in external code by esp32 plat (may just return if no leds) */
-extern void lws_esp32_leds_timer_cb(TimerHandle_t th);
-#else
-typedef int lws_sockfd_type;
-typedef int lws_filefd_type;
-#endif
-
-#define lws_pollfd pollfd
-#define LWS_POLLHUP (POLLHUP|POLLERR)
-#define LWS_POLLIN (POLLIN)
-#define LWS_POLLOUT (POLLOUT)
-#endif
-
-
-#if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
-/* ... */
-#define ssize_t SSIZE_T
-#endif
-
-#if defined(WIN32) && defined(LWS_HAVE__STAT32I64)
-#include <sys/types.h>
-#include <sys/stat.h>
-#endif
-
-#if defined(LWS_HAVE_STDINT_H)
-#include <stdint.h>
-#else
-#if defined(WIN32) || defined(_WIN32)
-/* !!! >:-[ */
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int8 uint8_t;
-#else
-typedef unsigned int uint32_t;
-typedef unsigned short uint16_t;
-typedef unsigned char uint8_t;
-#endif
-#endif
-
-typedef unsigned long long lws_filepos_t;
-typedef long long lws_fileofs_t;
-typedef uint32_t lws_fop_flags_t;
-
-/** struct lws_pollargs - argument structure for all external poll related calls
- * passed in via 'in' */
-struct lws_pollargs {
- lws_sockfd_type fd; /**< applicable socket descriptor */
- int events; /**< the new event mask */
- int prev_events; /**< the previous event mask */
-};
-
-struct lws_tokens;
-struct lws_token_limits;
-
-/*! \defgroup wsclose Websocket Close
- *
- * ##Websocket close frame control
- *
- * When we close a ws connection, we can send a reason code and a short
- * UTF-8 description back with the close packet.
- */
-///@{
-
-/*
- * NOTE: These public enums are part of the abi. If you want to add one,
- * add it at where specified so existing users are unaffected.
- */
-/** enum lws_close_status - RFC6455 close status codes */
-enum lws_close_status {
- LWS_CLOSE_STATUS_NOSTATUS = 0,
- LWS_CLOSE_STATUS_NORMAL = 1000,
- /**< 1000 indicates a normal closure, meaning that the purpose for
- which the connection was established has been fulfilled. */
- LWS_CLOSE_STATUS_GOINGAWAY = 1001,
- /**< 1001 indicates that an endpoint is "going away", such as a server
- going down or a browser having navigated away from a page. */
- LWS_CLOSE_STATUS_PROTOCOL_ERR = 1002,
- /**< 1002 indicates that an endpoint is terminating the connection due
- to a protocol error. */
- LWS_CLOSE_STATUS_UNACCEPTABLE_OPCODE = 1003,
- /**< 1003 indicates that an endpoint is terminating the connection
- because it has received a type of data it cannot accept (e.g., an
- endpoint that understands only text data MAY send this if it
- receives a binary message). */
- LWS_CLOSE_STATUS_RESERVED = 1004,
- /**< Reserved. The specific meaning might be defined in the future. */
- LWS_CLOSE_STATUS_NO_STATUS = 1005,
- /**< 1005 is a reserved value and MUST NOT be set as a status code in a
- Close control frame by an endpoint. It is designated for use in
- applications expecting a status code to indicate that no status
- code was actually present. */
- LWS_CLOSE_STATUS_ABNORMAL_CLOSE = 1006,
- /**< 1006 is a reserved value and MUST NOT be set as a status code in a
- Close control frame by an endpoint. It is designated for use in
- applications expecting a status code to indicate that the
- connection was closed abnormally, e.g., without sending or
- receiving a Close control frame. */
- LWS_CLOSE_STATUS_INVALID_PAYLOAD = 1007,
- /**< 1007 indicates that an endpoint is terminating the connection
- because it has received data within a message that was not
- consistent with the type of the message (e.g., non-UTF-8 [RFC3629]
- data within a text message). */
- LWS_CLOSE_STATUS_POLICY_VIOLATION = 1008,
- /**< 1008 indicates that an endpoint is terminating the connection
- because it has received a message that violates its policy. This
- is a generic status code that can be returned when there is no
- other more suitable status code (e.g., 1003 or 1009) or if there
- is a need to hide specific details about the policy. */
- LWS_CLOSE_STATUS_MESSAGE_TOO_LARGE = 1009,
- /**< 1009 indicates that an endpoint is terminating the connection
- because it has received a message that is too big for it to
- process. */
- LWS_CLOSE_STATUS_EXTENSION_REQUIRED = 1010,
- /**< 1010 indicates that an endpoint (client) is terminating the
- connection because it has expected the server to negotiate one or
- more extension, but the server didn't return them in the response
- message of the WebSocket handshake. The list of extensions that
- are needed SHOULD appear in the /reason/ part of the Close frame.
- Note that this status code is not used by the server, because it
- can fail the WebSocket handshake instead */
- LWS_CLOSE_STATUS_UNEXPECTED_CONDITION = 1011,
- /**< 1011 indicates that a server is terminating the connection because
- it encountered an unexpected condition that prevented it from
- fulfilling the request. */
- LWS_CLOSE_STATUS_TLS_FAILURE = 1015,
- /**< 1015 is a reserved value and MUST NOT be set as a status code in a
- Close control frame by an endpoint. It is designated for use in
- applications expecting a status code to indicate that the
- connection was closed due to a failure to perform a TLS handshake
- (e.g., the server certificate can't be verified). */
-
- LWS_CLOSE_STATUS_CLIENT_TRANSACTION_DONE = 2000,
-
- /****** add new things just above ---^ ******/
-
- LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY = 9999,
-};
-
-/**
- * lws_close_reason - Set reason and aux data to send with Close packet
- * If you are going to return nonzero from the callback
- * requesting the connection to close, you can optionally
- * call this to set the reason the peer will be told if
- * possible.
- *
- * \param wsi: The websocket connection to set the close reason on
- * \param status: A valid close status from websocket standard
- * \param buf: NULL or buffer containing up to 124 bytes of auxiliary data
- * \param len: Length of data in \param buf to send
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_close_reason(struct lws *wsi, enum lws_close_status status,
- unsigned char *buf, size_t len);
-
-///@}
-
-struct lws;
-struct lws_context;
-/* needed even with extensions disabled for create context */
-struct lws_extension;
-
-
-/*! \defgroup usercb User Callback
- *
- * ##User protocol callback
- *
- * The protocol callback is the primary way lws interacts with
- * user code. For one of a list of a few dozen reasons the callback gets
- * called at some event to be handled.
- *
- * All of the events can be ignored, returning 0 is taken as "OK" and returning
- * nonzero in most cases indicates that the connection should be closed.
- */
-///@{
-
-struct lws_ssl_info {
- int where;
- int ret;
-};
-
-enum lws_cert_update_state {
- LWS_CUS_IDLE,
- LWS_CUS_STARTING,
- LWS_CUS_SUCCESS,
- LWS_CUS_FAILED,
-
- LWS_CUS_CREATE_KEYS,
- LWS_CUS_REG,
- LWS_CUS_AUTH,
- LWS_CUS_CHALLENGE,
- LWS_CUS_CREATE_REQ,
- LWS_CUS_REQ,
- LWS_CUS_CONFIRM,
- LWS_CUS_ISSUE,
-};
-
-enum {
- LWS_TLS_REQ_ELEMENT_COUNTRY,
- LWS_TLS_REQ_ELEMENT_STATE,
- LWS_TLS_REQ_ELEMENT_LOCALITY,
- LWS_TLS_REQ_ELEMENT_ORGANIZATION,
- LWS_TLS_REQ_ELEMENT_COMMON_NAME,
- LWS_TLS_REQ_ELEMENT_EMAIL,
-
- LWS_TLS_REQ_ELEMENT_COUNT,
-
- LWS_TLS_SET_DIR_URL = LWS_TLS_REQ_ELEMENT_COUNT,
- LWS_TLS_SET_AUTH_PATH,
- LWS_TLS_SET_CERT_PATH,
- LWS_TLS_SET_KEY_PATH,
-
- LWS_TLS_TOTAL_COUNT
-};
-
-struct lws_acme_cert_aging_args {
- struct lws_vhost *vh;
- const char *element_overrides[LWS_TLS_TOTAL_COUNT]; /* NULL = use pvo */
-};
-
-/*
- * NOTE: These public enums are part of the abi. If you want to add one,
- * add it at where specified so existing users are unaffected.
- */
-/** enum lws_callback_reasons - reason you're getting a protocol callback */
-enum lws_callback_reasons {
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to wsi and protocol binding lifecycle -----
- */
-
- LWS_CALLBACK_PROTOCOL_INIT = 27,
- /**< One-time call per protocol, per-vhost using it, so it can
- * do initial setup / allocations etc */
-
- LWS_CALLBACK_PROTOCOL_DESTROY = 28,
- /**< One-time call per protocol, per-vhost using it, indicating
- * this protocol won't get used at all after this callback, the
- * vhost is getting destroyed. Take the opportunity to
- * deallocate everything that was allocated by the protocol. */
-
- LWS_CALLBACK_WSI_CREATE = 29,
- /**< outermost (earliest) wsi create notification to protocols[0] */
-
- LWS_CALLBACK_WSI_DESTROY = 30,
- /**< outermost (latest) wsi destroy notification to protocols[0] */
-
- LWS_CALLBACK_HTTP_BIND_PROTOCOL = 49,
- /**< By default, all HTTP handling is done in protocols[0].
- * However you can bind different protocols (by name) to
- * different parts of the URL space using callback mounts. This
- * callback occurs in the new protocol when a wsi is bound
- * to that protocol. Any protocol allocation related to the
- * http transaction processing should be created then.
- * These specific callbacks are necessary because with HTTP/1.1,
- * a single connection may perform at series of different
- * transactions at different URLs, thus the lifetime of the
- * protocol bind is just for one transaction, not connection. */
-
- LWS_CALLBACK_HTTP_DROP_PROTOCOL = 50,
- /**< This is called when a transaction is unbound from a protocol.
- * It indicates the connection completed its transaction and may
- * do something different now. Any protocol allocation related
- * to the http transaction processing should be destroyed. */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to Server TLS -----
- */
-
- LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS = 21,
- /**< if configured for
- * including OpenSSL support, this callback allows your user code
- * to perform extra SSL_CTX_load_verify_locations() or similar
- * calls to direct OpenSSL where to find certificates the client
- * can use to confirm the remote server identity. user is the
- * OpenSSL SSL_CTX* */
-
- LWS_CALLBACK_OPENSSL_LOAD_EXTRA_SERVER_VERIFY_CERTS = 22,
- /**< if configured for
- * including OpenSSL support, this callback allows your user code
- * to load extra certificates into the server which allow it to
- * verify the validity of certificates returned by clients. user
- * is the server's OpenSSL SSL_CTX* and in is the lws_vhost */
-
- LWS_CALLBACK_OPENSSL_PERFORM_CLIENT_CERT_VERIFICATION = 23,
- /**< if the libwebsockets vhost was created with the option
- * LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT, then this
- * callback is generated during OpenSSL verification of the cert
- * sent from the client. It is sent to protocol[0] callback as
- * no protocol has been negotiated on the connection yet.
- * Notice that the libwebsockets context and wsi are both NULL
- * during this callback. See
- * http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html
- * to understand more detail about the OpenSSL callback that
- * generates this libwebsockets callback and the meanings of the
- * arguments passed. In this callback, user is the x509_ctx,
- * in is the ssl pointer and len is preverify_ok
- * Notice that this callback maintains libwebsocket return
- * conventions, return 0 to mean the cert is OK or 1 to fail it.
- * This also means that if you don't handle this callback then
- * the default callback action of returning 0 allows the client
- * certificates. */
-
- LWS_CALLBACK_OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY = 37,
- /**< if configured for including OpenSSL support but no private key
- * file has been specified (ssl_private_key_filepath is NULL), this is
- * called to allow the user to set the private key directly via
- * libopenssl and perform further operations if required; this might be
- * useful in situations where the private key is not directly accessible
- * by the OS, for example if it is stored on a smartcard.
- * user is the server's OpenSSL SSL_CTX* */
-
- LWS_CALLBACK_SSL_INFO = 67,
- /**< SSL connections only. An event you registered an
- * interest in at the vhost has occurred on a connection
- * using the vhost. in is a pointer to a
- * struct lws_ssl_info containing information about the
- * event*/
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to Client TLS -----
- */
-
- LWS_CALLBACK_OPENSSL_PERFORM_SERVER_CERT_VERIFICATION = 58,
- /**< Similar to LWS_CALLBACK_OPENSSL_PERFORM_CLIENT_CERT_VERIFICATION
- * this callback is called during OpenSSL verification of the cert
- * sent from the server to the client. It is sent to protocol[0]
- * callback as no protocol has been negotiated on the connection yet.
- * Notice that the wsi is set because lws_client_connect_via_info was
- * successful.
- *
- * See http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html
- * to understand more detail about the OpenSSL callback that
- * generates this libwebsockets callback and the meanings of the
- * arguments passed. In this callback, user is the x509_ctx,
- * in is the ssl pointer and len is preverify_ok.
- *
- * THIS IS NOT RECOMMENDED BUT if a cert validation error shall be
- * overruled and cert shall be accepted as ok,
- * X509_STORE_CTX_set_error((X509_STORE_CTX*)user, X509_V_OK); must be
- * called and return value must be 0 to mean the cert is OK;
- * returning 1 will fail the cert in any case.
- *
- * This also means that if you don't handle this callback then
- * the default callback action of returning 0 will not accept the
- * certificate in case of a validation error decided by the SSL lib.
- *
- * This is expected and secure behaviour when validating certificates.
- *
- * Note: LCCSCF_ALLOW_SELFSIGNED and
- * LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK still work without this
- * callback being implemented.
- */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to HTTP Server -----
- */
-
- LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED = 19,
- /**< A new client has been accepted by the ws server. This
- * callback allows setting any relevant property to it. Because this
- * happens immediately after the instantiation of a new client,
- * there's no websocket protocol selected yet so this callback is
- * issued only to protocol 0. Only wsi is defined, pointing to the
- * new client, and the return value is ignored. */
-
- LWS_CALLBACK_HTTP = 12,
- /**< an http request has come from a client that is not
- * asking to upgrade the connection to a websocket
- * one. This is a chance to serve http content,
- * for example, to send a script to the client
- * which will then open the websockets connection.
- * in points to the URI path requested and
- * lws_serve_http_file() makes it very
- * simple to send back a file to the client.
- * Normally after sending the file you are done
- * with the http connection, since the rest of the
- * activity will come by websockets from the script
- * that was delivered by http, so you will want to
- * return 1; to close and free up the connection. */
-
- LWS_CALLBACK_HTTP_BODY = 13,
- /**< the next len bytes data from the http
- * request body HTTP connection is now available in in. */
-
- LWS_CALLBACK_HTTP_BODY_COMPLETION = 14,
- /**< the expected amount of http request body has been delivered */
-
- LWS_CALLBACK_HTTP_FILE_COMPLETION = 15,
- /**< a file requested to be sent down http link has completed. */
-
- LWS_CALLBACK_HTTP_WRITEABLE = 16,
- /**< you can write more down the http protocol link now. */
-
- LWS_CALLBACK_CLOSED_HTTP = 5,
- /**< when a HTTP (non-websocket) session ends */
-
- LWS_CALLBACK_FILTER_HTTP_CONNECTION = 18,
- /**< called when the request has
- * been received and parsed from the client, but the response is
- * not sent yet. Return non-zero to disallow the connection.
- * user is a pointer to the connection user space allocation,
- * in is the URI, eg, "/"
- * In your handler you can use the public APIs
- * lws_hdr_total_length() / lws_hdr_copy() to access all of the
- * headers using the header enums lws_token_indexes from
- * libwebsockets.h to check for and read the supported header
- * presence and content before deciding to allow the http
- * connection to proceed or to kill the connection. */
-
- LWS_CALLBACK_ADD_HEADERS = 53,
- /**< This gives your user code a chance to add headers to a server
- * transaction bound to your protocol. `in` points to a
- * `struct lws_process_html_args` describing a buffer and length
- * you can add headers into using the normal lws apis.
- *
- * (see LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER to add headers to
- * a client transaction)
- *
- * Only `args->p` and `args->len` are valid, and `args->p` should
- * be moved on by the amount of bytes written, if any. Eg
- *
- * case LWS_CALLBACK_ADD_HEADERS:
- *
- * struct lws_process_html_args *args =
- * (struct lws_process_html_args *)in;
- *
- * if (lws_add_http_header_by_name(wsi,
- * (unsigned char *)"set-cookie:",
- * (unsigned char *)cookie, cookie_len,
- * (unsigned char **)&args->p,
- * (unsigned char *)args->p + args->max_len))
- * return 1;
- *
- * break;
- */
-
- LWS_CALLBACK_CHECK_ACCESS_RIGHTS = 51,
- /**< This gives the user code a chance to forbid an http access.
- * `in` points to a `struct lws_process_html_args`, which
- * describes the URL, and a bit mask describing the type of
- * authentication required. If the callback returns nonzero,
- * the transaction ends with HTTP_STATUS_UNAUTHORIZED. */
-
- LWS_CALLBACK_PROCESS_HTML = 52,
- /**< This gives your user code a chance to mangle outgoing
- * HTML. `in` points to a `struct lws_process_html_args`
- * which describes the buffer containing outgoing HTML.
- * The buffer may grow up to `.max_len` (currently +128
- * bytes per buffer).
- */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to HTTP Client -----
- */
-
- LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP = 44,
- /**< The HTTP client connection has succeeded, and is now
- * connected to the server */
-
- LWS_CALLBACK_CLOSED_CLIENT_HTTP = 45,
- /**< The HTTP client connection is closing */
-
- LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ = 48,
- /**< This is generated by lws_http_client_read() used to drain
- * incoming data. In the case the incoming data was chunked, it will
- * be split into multiple smaller callbacks for each chunk block,
- * removing the chunk headers. If not chunked, it will appear all in
- * one callback. */
-
- LWS_CALLBACK_RECEIVE_CLIENT_HTTP = 46,
- /**< This simply indicates data was received on the HTTP client
- * connection. It does NOT drain or provide the data.
- * This exists to neatly allow a proxying type situation,
- * where this incoming data will go out on another connection.
- * If the outgoing connection stalls, we should stall processing
- * the incoming data. So a handler for this in that case should
- * simply set a flag to indicate there is incoming data ready
- * and ask for a writeable callback on the outgoing connection.
- * In the writable callback he can check the flag and then get
- * and drain the waiting incoming data using lws_http_client_read().
- * This will use callbacks to LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ
- * to get and drain the incoming data, where it should be sent
- * back out on the outgoing connection. */
- LWS_CALLBACK_COMPLETED_CLIENT_HTTP = 47,
- /**< The client transaction completed... at the moment this
- * is the same as closing since transaction pipelining on
- * client side is not yet supported. */
-
- LWS_CALLBACK_CLIENT_HTTP_WRITEABLE = 57,
- /**< when doing an HTTP type client connection, you can call
- * lws_client_http_body_pending(wsi, 1) from
- * LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER to get these callbacks
- * sending the HTTP headers.
- *
- * From this callback, when you have sent everything, you should let
- * lws know by calling lws_client_http_body_pending(wsi, 0)
- */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to Websocket Server -----
- */
-
- LWS_CALLBACK_ESTABLISHED = 0,
- /**< (VH) after the server completes a handshake with an incoming
- * client. If you built the library with ssl support, in is a
- * pointer to the ssl struct associated with the connection or NULL.
- *
- * b0 of len is set if the connection was made using ws-over-h2
- */
-
- LWS_CALLBACK_CLOSED = 4,
- /**< when the websocket session ends */
-
- LWS_CALLBACK_SERVER_WRITEABLE = 11,
- /**< See LWS_CALLBACK_CLIENT_WRITEABLE */
-
- LWS_CALLBACK_RECEIVE = 6,
- /**< data has appeared for this server endpoint from a
- * remote client, it can be found at *in and is
- * len bytes long */
-
- LWS_CALLBACK_RECEIVE_PONG = 7,
- /**< servers receive PONG packets with this callback reason */
-
- LWS_CALLBACK_WS_PEER_INITIATED_CLOSE = 38,
- /**< The peer has sent an unsolicited Close WS packet. in and
- * len are the optional close code (first 2 bytes, network
- * order) and the optional additional information which is not
- * defined in the standard, and may be a string or non human-readable
- * data.
- * If you return 0 lws will echo the close and then close the
- * connection. If you return nonzero lws will just close the
- * connection. */
-
- LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION = 20,
- /**< called when the handshake has
- * been received and parsed from the client, but the response is
- * not sent yet. Return non-zero to disallow the connection.
- * user is a pointer to the connection user space allocation,
- * in is the requested protocol name
- * In your handler you can use the public APIs
- * lws_hdr_total_length() / lws_hdr_copy() to access all of the
- * headers using the header enums lws_token_indexes from
- * libwebsockets.h to check for and read the supported header
- * presence and content before deciding to allow the handshake
- * to proceed or to kill the connection. */
-
- LWS_CALLBACK_CONFIRM_EXTENSION_OKAY = 25,
- /**< When the server handshake code
- * sees that it does support a requested extension, before
- * accepting the extension by additing to the list sent back to
- * the client it gives this callback just to check that it's okay
- * to use that extension. It calls back to the requested protocol
- * and with in being the extension name, len is 0 and user is
- * valid. Note though at this time the ESTABLISHED callback hasn't
- * happened yet so if you initialize user content there, user
- * content during this callback might not be useful for anything. */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to Websocket Client -----
- */
-
- LWS_CALLBACK_CLIENT_CONNECTION_ERROR = 1,
- /**< the request client connection has been unable to complete a
- * handshake with the remote server. If in is non-NULL, you can
- * find an error string of length len where it points to
- *
- * Diagnostic strings that may be returned include
- *
- * "getaddrinfo (ipv6) failed"
- * "unknown address family"
- * "getaddrinfo (ipv4) failed"
- * "set socket opts failed"
- * "insert wsi failed"
- * "lws_ssl_client_connect1 failed"
- * "lws_ssl_client_connect2 failed"
- * "Peer hung up"
- * "read failed"
- * "HS: URI missing"
- * "HS: Redirect code but no Location"
- * "HS: URI did not parse"
- * "HS: Redirect failed"
- * "HS: Server did not return 200"
- * "HS: OOM"
- * "HS: disallowed by client filter"
- * "HS: disallowed at ESTABLISHED"
- * "HS: ACCEPT missing"
- * "HS: ws upgrade response not 101"
- * "HS: UPGRADE missing"
- * "HS: Upgrade to something other than websocket"
- * "HS: CONNECTION missing"
- * "HS: UPGRADE malformed"
- * "HS: PROTOCOL malformed"
- * "HS: Cannot match protocol"
- * "HS: EXT: list too big"
- * "HS: EXT: failed setting defaults"
- * "HS: EXT: failed parsing defaults"
- * "HS: EXT: failed parsing options"
- * "HS: EXT: Rejects server options"
- * "HS: EXT: unknown ext"
- * "HS: Accept hash wrong"
- * "HS: Rejected by filter cb"
- * "HS: OOM"
- * "HS: SO_SNDBUF failed"
- * "HS: Rejected at CLIENT_ESTABLISHED"
- */
-
- LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH = 2,
- /**< this is the last chance for the client user code to examine the
- * http headers and decide to reject the connection. If the
- * content in the headers is interesting to the
- * client (url, etc) it needs to copy it out at
- * this point since it will be destroyed before
- * the CLIENT_ESTABLISHED call */
-
- LWS_CALLBACK_CLIENT_ESTABLISHED = 3,
- /**< after your client connection completed the websocket upgrade
- * handshake with the remote server */
-
- LWS_CALLBACK_CLIENT_CLOSED = 75,
- /**< when a client websocket session ends */
-
- LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER = 24,
- /**< this callback happens
- * when a client handshake is being compiled. user is NULL,
- * in is a char **, it's pointing to a char * which holds the
- * next location in the header buffer where you can add
- * headers, and len is the remaining space in the header buffer,
- * which is typically some hundreds of bytes. So, to add a canned
- * cookie, your handler code might look similar to:
- *
- * char **p = (char **)in;
- *
- * if (len < 100)
- * return 1;
- *
- * *p += sprintf(*p, "Cookie: a=b\x0d\x0a");
- *
- * return 0;
- *
- * Notice if you add anything, you just have to take care about
- * the CRLF on the line you added. Obviously this callback is
- * optional, if you don't handle it everything is fine.
- *
- * Notice the callback is coming to protocols[0] all the time,
- * because there is no specific protocol negotiated yet.
- *
- * See LWS_CALLBACK_ADD_HEADERS for adding headers to server
- * transactions.
- */
-
- LWS_CALLBACK_CLIENT_RECEIVE = 8,
- /**< data has appeared from the server for the client connection, it
- * can be found at *in and is len bytes long */
-
- LWS_CALLBACK_CLIENT_RECEIVE_PONG = 9,
- /**< clients receive PONG packets with this callback reason */
-
- LWS_CALLBACK_CLIENT_WRITEABLE = 10,
- /**< If you call lws_callback_on_writable() on a connection, you will
- * get one of these callbacks coming when the connection socket
- * is able to accept another write packet without blocking.
- * If it already was able to take another packet without blocking,
- * you'll get this callback at the next call to the service loop
- * function. Notice that CLIENTs get LWS_CALLBACK_CLIENT_WRITEABLE
- * and servers get LWS_CALLBACK_SERVER_WRITEABLE. */
-
- LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED = 26,
- /**< When a ws client
- * connection is being prepared to start a handshake to a server,
- * each supported extension is checked with protocols[0] callback
- * with this reason, giving the user code a chance to suppress the
- * claim to support that extension by returning non-zero. If
- * unhandled, by default 0 will be returned and the extension
- * support included in the header to the server. Notice this
- * callback comes to protocols[0]. */
-
- LWS_CALLBACK_WS_EXT_DEFAULTS = 39,
- /**< Gives client connections an opportunity to adjust negotiated
- * extension defaults. `user` is the extension name that was
- * negotiated (eg, "permessage-deflate"). `in` points to a
- * buffer and `len` is the buffer size. The user callback can
- * set the buffer to a string describing options the extension
- * should parse. Or just ignore for defaults. */
-
-
- LWS_CALLBACK_FILTER_NETWORK_CONNECTION = 17,
- /**< called when a client connects to
- * the server at network level; the connection is accepted but then
- * passed to this callback to decide whether to hang up immediately
- * or not, based on the client IP. in contains the connection
- * socket's descriptor. Since the client connection information is
- * not available yet, wsi still pointing to the main server socket.
- * Return non-zero to terminate the connection before sending or
- * receiving anything. Because this happens immediately after the
- * network connection from the client, there's no websocket protocol
- * selected yet so this callback is issued only to protocol 0. */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to external poll loop integration -----
- */
-
- LWS_CALLBACK_GET_THREAD_ID = 31,
- /**< lws can accept callback when writable requests from other
- * threads, if you implement this callback and return an opaque
- * current thread ID integer. */
-
- /* external poll() management support */
- LWS_CALLBACK_ADD_POLL_FD = 32,
- /**< lws normally deals with its poll() or other event loop
- * internally, but in the case you are integrating with another
- * server you will need to have lws sockets share a
- * polling array with the other server. This and the other
- * POLL_FD related callbacks let you put your specialized
- * poll array interface code in the callback for protocol 0, the
- * first protocol you support, usually the HTTP protocol in the
- * serving case.
- * This callback happens when a socket needs to be
- * added to the polling loop: in points to a struct
- * lws_pollargs; the fd member of the struct is the file
- * descriptor, and events contains the active events
- *
- * If you are using the internal lws polling / event loop
- * you can just ignore these callbacks. */
-
- LWS_CALLBACK_DEL_POLL_FD = 33,
- /**< This callback happens when a socket descriptor
- * needs to be removed from an external polling array. in is
- * again the struct lws_pollargs containing the fd member
- * to be removed. If you are using the internal polling
- * loop, you can just ignore it. */
-
- LWS_CALLBACK_CHANGE_MODE_POLL_FD = 34,
- /**< This callback happens when lws wants to modify the events for
- * a connection.
- * in is the struct lws_pollargs with the fd to change.
- * The new event mask is in events member and the old mask is in
- * the prev_events member.
- * If you are using the internal polling loop, you can just ignore
- * it. */
-
- LWS_CALLBACK_LOCK_POLL = 35,
- /**< These allow the external poll changes driven
- * by lws to participate in an external thread locking
- * scheme around the changes, so the whole thing is threadsafe.
- * These are called around three activities in the library,
- * - inserting a new wsi in the wsi / fd table (len=1)
- * - deleting a wsi from the wsi / fd table (len=1)
- * - changing a wsi's POLLIN/OUT state (len=0)
- * Locking and unlocking external synchronization objects when
- * len == 1 allows external threads to be synchronized against
- * wsi lifecycle changes if it acquires the same lock for the
- * duration of wsi dereference from the other thread context. */
-
- LWS_CALLBACK_UNLOCK_POLL = 36,
- /**< See LWS_CALLBACK_LOCK_POLL, ignore if using lws internal poll */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to CGI serving -----
- */
-
- LWS_CALLBACK_CGI = 40,
- /**< CGI: CGI IO events on stdin / out / err are sent here on
- * protocols[0]. The provided `lws_callback_http_dummy()`
- * handles this and the callback should be directed there if
- * you use CGI. */
-
- LWS_CALLBACK_CGI_TERMINATED = 41,
- /**< CGI: The related CGI process ended, this is called before
- * the wsi is closed. Used to, eg, terminate chunking.
- * The provided `lws_callback_http_dummy()`
- * handles this and the callback should be directed there if
- * you use CGI. The child PID that terminated is in len. */
-
- LWS_CALLBACK_CGI_STDIN_DATA = 42,
- /**< CGI: Data is, to be sent to the CGI process stdin, eg from
- * a POST body. The provided `lws_callback_http_dummy()`
- * handles this and the callback should be directed there if
- * you use CGI. */
-
- LWS_CALLBACK_CGI_STDIN_COMPLETED = 43,
- /**< CGI: no more stdin is coming. The provided
- * `lws_callback_http_dummy()` handles this and the callback
- * should be directed there if you use CGI. */
-
- LWS_CALLBACK_CGI_PROCESS_ATTACH = 70,
- /**< CGI: Sent when the CGI process is spawned for the wsi. The
- * len parameter is the PID of the child process */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to Generic Sessions -----
- */
-
- LWS_CALLBACK_SESSION_INFO = 54,
- /**< This is only generated by user code using generic sessions.
- * It's used to get a `struct lws_session_info` filled in by
- * generic sessions with information about the logged-in user.
- * See the messageboard sample for an example of how to use. */
-
- LWS_CALLBACK_GS_EVENT = 55,
- /**< Indicates an event happened to the Generic Sessions session.
- * `in` contains a `struct lws_gs_event_args` describing the event. */
-
- LWS_CALLBACK_HTTP_PMO = 56,
- /**< per-mount options for this connection, called before
- * the normal LWS_CALLBACK_HTTP when the mount has per-mount
- * options.
- */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to RAW sockets -----
- */
-
- LWS_CALLBACK_RAW_RX = 59,
- /**< RAW mode connection RX */
-
- LWS_CALLBACK_RAW_CLOSE = 60,
- /**< RAW mode connection is closing */
-
- LWS_CALLBACK_RAW_WRITEABLE = 61,
- /**< RAW mode connection may be written */
-
- LWS_CALLBACK_RAW_ADOPT = 62,
- /**< RAW mode connection was adopted (equivalent to 'wsi created') */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to RAW file handles -----
- */
-
- LWS_CALLBACK_RAW_ADOPT_FILE = 63,
- /**< RAW mode file was adopted (equivalent to 'wsi created') */
-
- LWS_CALLBACK_RAW_RX_FILE = 64,
- /**< This is the indication the RAW mode file has something to read.
- * This doesn't actually do the read of the file and len is always
- * 0... your code should do the read having been informed there is
- * something to read now. */
-
- LWS_CALLBACK_RAW_WRITEABLE_FILE = 65,
- /**< RAW mode file is writeable */
-
- LWS_CALLBACK_RAW_CLOSE_FILE = 66,
- /**< RAW mode wsi that adopted a file is closing */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to generic wsi events -----
- */
-
- LWS_CALLBACK_TIMER = 73,
- /**< When the time elapsed after a call to
- * lws_set_timer_usecs(wsi, usecs) is up, the wsi will get one of
- * these callbacks. The deadline can be continuously extended into the
- * future by later calls to lws_set_timer_usecs() before the deadline
- * expires, or cancelled by lws_set_timer_usecs(wsi, -1);
- * See the note on lws_set_timer_usecs() about which event loops are
- * supported. */
-
- LWS_CALLBACK_EVENT_WAIT_CANCELLED = 71,
- /**< This is sent to every protocol of every vhost in response
- * to lws_cancel_service() or lws_cancel_service_pt(). This
- * callback is serialized in the lws event loop normally, even
- * if the lws_cancel_service[_pt]() call was from a different
- * thread. */
-
- LWS_CALLBACK_CHILD_CLOSING = 69,
- /**< Sent to parent to notify them a child is closing / being
- * destroyed. in is the child wsi.
- */
-
- LWS_CALLBACK_CHILD_WRITE_VIA_PARENT = 68,
- /**< Child has been marked with parent_carries_io attribute, so
- * lws_write directs the to this callback at the parent,
- * in is a struct lws_write_passthru containing the args
- * the lws_write() was called with.
- */
-
- /* ---------------------------------------------------------------------
- * ----- Callbacks related to TLS certificate management -----
- */
-
- LWS_CALLBACK_VHOST_CERT_AGING = 72,
- /**< When a vhost TLS cert has its expiry checked, this callback
- * is broadcast to every protocol of every vhost in case the
- * protocol wants to take some action with this information.
- * \p in is a pointer to a struct lws_acme_cert_aging_args,
- * and \p len is the number of days left before it expires, as
- * a (ssize_t). In the struct lws_acme_cert_aging_args, vh
- * points to the vhost the cert aging information applies to,
- * and element_overrides[] is an optional way to update information
- * from the pvos... NULL in an index means use the information from
- * from the pvo for the cert renewal, non-NULL in the array index
- * means use that pointer instead for the index. */
-
- LWS_CALLBACK_VHOST_CERT_UPDATE = 74,
- /**< When a vhost TLS cert is being updated, progress is
- * reported to the vhost in question here, including completion
- * and failure. in points to optional JSON, and len represents the
- * connection state using enum lws_cert_update_state */
-
-
- /****** add new things just above ---^ ******/
-
- LWS_CALLBACK_USER = 1000,
- /**< user code can use any including above without fear of clashes */
-};
-
-
-
-/**
- * typedef lws_callback_function() - User server actions
- * \param wsi: Opaque websocket instance pointer
- * \param reason: The reason for the call
- * \param user: Pointer to per-session user data allocated by library
- * \param in: Pointer used for some callback reasons
- * \param len: Length set for some callback reasons
- *
- * This callback is the way the user controls what is served. All the
- * protocol detail is hidden and handled by the library.
- *
- * For each connection / session there is user data allocated that is
- * pointed to by "user". You set the size of this user data area when
- * the library is initialized with lws_create_server.
- */
-typedef int
-lws_callback_function(struct lws *wsi, enum lws_callback_reasons reason,
- void *user, void *in, size_t len);
-
-#define LWS_CB_REASON_AUX_BF__CGI 1
-#define LWS_CB_REASON_AUX_BF__PROXY 2
-#define LWS_CB_REASON_AUX_BF__CGI_CHUNK_END 4
-#define LWS_CB_REASON_AUX_BF__CGI_HEADERS 8
-///@}
-
-struct lws_vhost;
-
-/*! \defgroup generic hash
- * ## Generic Hash related functions
- *
- * Lws provides generic hash / digest accessors that abstract the ones
- * provided by whatever OpenSSL library you are linking against.
- *
- * It lets you use the same code if you build against mbedtls or OpenSSL
- * for example.
- */
-///@{
-
-#if defined(LWS_WITH_TLS)
-
-#if defined(LWS_WITH_MBEDTLS)
-#include <mbedtls/sha1.h>
-#include <mbedtls/sha256.h>
-#include <mbedtls/sha512.h>
-#endif
-
-enum lws_genhash_types {
- LWS_GENHASH_TYPE_SHA1,
- LWS_GENHASH_TYPE_SHA256,
- LWS_GENHASH_TYPE_SHA384,
- LWS_GENHASH_TYPE_SHA512,
-};
-
-enum lws_genhmac_types {
- LWS_GENHMAC_TYPE_SHA256,
- LWS_GENHMAC_TYPE_SHA384,
- LWS_GENHMAC_TYPE_SHA512,
-};
-
-#define LWS_GENHASH_LARGEST 64
-
-struct lws_genhash_ctx {
- uint8_t type;
-#if defined(LWS_WITH_MBEDTLS)
- union {
- mbedtls_sha1_context sha1;
- mbedtls_sha256_context sha256;
- mbedtls_sha512_context sha512; /* 384 also uses this */
- const mbedtls_md_info_t *hmac;
- } u;
-#else
- const EVP_MD *evp_type;
- EVP_MD_CTX *mdctx;
-#endif
-};
-
-struct lws_genhmac_ctx {
- uint8_t type;
-#if defined(LWS_WITH_MBEDTLS)
- const mbedtls_md_info_t *hmac;
- mbedtls_md_context_t ctx;
-#else
- const EVP_MD *evp_type;
- EVP_MD_CTX *ctx;
-#endif
-};
-
-/** lws_genhash_size() - get hash size in bytes
- *
- * \param type: one of LWS_GENHASH_TYPE_...
- *
- * Returns number of bytes in this type of hash
- */
-LWS_VISIBLE LWS_EXTERN size_t LWS_WARN_UNUSED_RESULT
-lws_genhash_size(enum lws_genhash_types type);
-
-/** lws_genhmac_size() - get hash size in bytes
- *
- * \param type: one of LWS_GENHASH_TYPE_...
- *
- * Returns number of bytes in this type of hmac
- */
-LWS_VISIBLE LWS_EXTERN size_t LWS_WARN_UNUSED_RESULT
-lws_genhmac_size(enum lws_genhmac_types type);
-
-/** lws_genhash_init() - prepare your struct lws_genhash_ctx for use
- *
- * \param ctx: your struct lws_genhash_ctx
- * \param type: one of LWS_GENHASH_TYPE_...
- *
- * Initializes the hash context for the type you requested
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_genhash_init(struct lws_genhash_ctx *ctx, enum lws_genhash_types type);
-
-/** lws_genhash_update() - digest len bytes of the buffer starting at in
- *
- * \param ctx: your struct lws_genhash_ctx
- * \param in: start of the bytes to digest
- * \param len: count of bytes to digest
- *
- * Updates the state of your hash context to reflect digesting len bytes from in
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_genhash_update(struct lws_genhash_ctx *ctx, const void *in, size_t len);
-
-/** lws_genhash_destroy() - copy out the result digest and destroy the ctx
- *
- * \param ctx: your struct lws_genhash_ctx
- * \param result: NULL, or where to copy the result hash
- *
- * Finalizes the hash and copies out the digest. Destroys any allocations such
- * that ctx can safely go out of scope after calling this.
- *
- * NULL result is supported so that you can destroy the ctx cleanly on error
- * conditions, where there is no valid result.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genhash_destroy(struct lws_genhash_ctx *ctx, void *result);
-
-/** lws_genhmac_init() - prepare your struct lws_genhmac_ctx for use
- *
- * \param ctx: your struct lws_genhmac_ctx
- * \param type: one of LWS_GENHMAC_TYPE_...
- * \param key: pointer to the start of the HMAC key
- * \param key_len: length of the HMAC key
- *
- * Initializes the hash context for the type you requested
- *
- * If the return is nonzero, it failed and there is nothing needing to be
- * destroyed.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_genhmac_init(struct lws_genhmac_ctx *ctx, enum lws_genhmac_types type,
- const uint8_t *key, size_t key_len);
-
-/** lws_genhmac_update() - digest len bytes of the buffer starting at in
- *
- * \param ctx: your struct lws_genhmac_ctx
- * \param in: start of the bytes to digest
- * \param len: count of bytes to digest
- *
- * Updates the state of your hash context to reflect digesting len bytes from in
- *
- * If the return is nonzero, it failed and needs destroying.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_genhmac_update(struct lws_genhmac_ctx *ctx, const void *in, size_t len);
-
-/** lws_genhmac_destroy() - copy out the result digest and destroy the ctx
- *
- * \param ctx: your struct lws_genhmac_ctx
- * \param result: NULL, or where to copy the result hash
- *
- * Finalizes the hash and copies out the digest. Destroys any allocations such
- * that ctx can safely go out of scope after calling this.
- *
- * NULL result is supported so that you can destroy the ctx cleanly on error
- * conditions, where there is no valid result.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genhmac_destroy(struct lws_genhmac_ctx *ctx, void *result);
-///@}
-
-/*! \defgroup generic RSA
- * ## Generic RSA related functions
- *
- * Lws provides generic RSA functions that abstract the ones
- * provided by whatever OpenSSL library you are linking against.
- *
- * It lets you use the same code if you build against mbedtls or OpenSSL
- * for example.
- */
-///@{
-
-enum enum_jwk_tok {
- JWK_KEY_E,
- JWK_KEY_N,
- JWK_KEY_D,
- JWK_KEY_P,
- JWK_KEY_Q,
- JWK_KEY_DP,
- JWK_KEY_DQ,
- JWK_KEY_QI,
- JWK_KTY, /* also serves as count of real elements */
- JWK_KEY,
-};
-
-#define LWS_COUNT_RSA_ELEMENTS JWK_KTY
-
-struct lws_genrsa_ctx {
-#if defined(LWS_WITH_MBEDTLS)
- mbedtls_rsa_context *ctx;
-#else
- BIGNUM *bn[LWS_COUNT_RSA_ELEMENTS];
- RSA *rsa;
-#endif
-};
-
-struct lws_genrsa_element {
- uint8_t *buf;
- uint16_t len;
-};
-
-struct lws_genrsa_elements {
- struct lws_genrsa_element e[LWS_COUNT_RSA_ELEMENTS];
-};
-
-/** lws_jwk_destroy_genrsa_elements() - Free allocations in genrsa_elements
- *
- * \param el: your struct lws_genrsa_elements
- *
- * This is a helper for user code making use of struct lws_genrsa_elements
- * where the elements are allocated on the heap, it frees any non-NULL
- * buf element and sets the buf to NULL.
- *
- * NB: lws_genrsa_public_... apis do not need this as they take care of the key
- * creation and destruction themselves.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_jwk_destroy_genrsa_elements(struct lws_genrsa_elements *el);
-
-/** lws_genrsa_public_decrypt_create() - Create RSA public decrypt context
- *
- * \param ctx: your struct lws_genrsa_ctx
- * \param el: struct prepared with key element data
- *
- * Creates an RSA context with a public key associated with it, formed from
- * the key elements in \p el.
- *
- * Returns 0 for OK or nonzero for error.
- *
- * This and related APIs operate identically with OpenSSL or mbedTLS backends.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genrsa_create(struct lws_genrsa_ctx *ctx, struct lws_genrsa_elements *el);
-
-/** lws_genrsa_new_keypair() - Create new RSA keypair
- *
- * \param context: your struct lws_context (may be used for RNG)
- * \param ctx: your struct lws_genrsa_ctx
- * \param el: struct to get the new key element data allocated into it
- * \param bits: key size, eg, 4096
- *
- * Creates a new RSA context and generates a new keypair into it, with \p bits
- * bits.
- *
- * Returns 0 for OK or nonzero for error.
- *
- * This and related APIs operate identically with OpenSSL or mbedTLS backends.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genrsa_new_keypair(struct lws_context *context, struct lws_genrsa_ctx *ctx,
- struct lws_genrsa_elements *el, int bits);
-
-/** lws_genrsa_public_decrypt() - Perform RSA public decryption
- *
- * \param ctx: your struct lws_genrsa_ctx
- * \param in: encrypted input
- * \param in_len: length of encrypted input
- * \param out: decrypted output
- * \param out_max: size of output buffer
- *
- * Performs the decryption.
- *
- * Returns <0 for error, or length of decrypted data.
- *
- * This and related APIs operate identically with OpenSSL or mbedTLS backends.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genrsa_public_decrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in,
- size_t in_len, uint8_t *out, size_t out_max);
-
-/** lws_genrsa_public_verify() - Perform RSA public verification
- *
- * \param ctx: your struct lws_genrsa_ctx
- * \param in: unencrypted payload (usually a recomputed hash)
- * \param hash_type: one of LWS_GENHASH_TYPE_
- * \param sig: pointer to the signature we received with the payload
- * \param sig_len: length of the signature we are checking in bytes
- *
- * Returns <0 for error, or 0 if signature matches the payload + key.
- *
- * This and related APIs operate identically with OpenSSL or mbedTLS backends.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genrsa_public_verify(struct lws_genrsa_ctx *ctx, const uint8_t *in,
- enum lws_genhash_types hash_type,
- const uint8_t *sig, size_t sig_len);
-
-/** lws_genrsa_public_sign() - Create RSA signature
- *
- * \param ctx: your struct lws_genrsa_ctx
- * \param in: precomputed hash
- * \param hash_type: one of LWS_GENHASH_TYPE_
- * \param sig: pointer to buffer to take signature
- * \param sig_len: length of the buffer (must be >= length of key N)
- *
- * Returns <0 for error, or 0 for success.
- *
- * This and related APIs operate identically with OpenSSL or mbedTLS backends.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genrsa_public_sign(struct lws_genrsa_ctx *ctx, const uint8_t *in,
- enum lws_genhash_types hash_type, uint8_t *sig,
- size_t sig_len);
-
-/** lws_genrsa_public_decrypt_destroy() - Destroy RSA public decrypt context
- *
- * \param ctx: your struct lws_genrsa_ctx
- *
- * Destroys any allocations related to \p ctx.
- *
- * This and related APIs operate identically with OpenSSL or mbedTLS backends.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_genrsa_destroy(struct lws_genrsa_ctx *ctx);
-
-/** lws_genrsa_render_pkey_asn1() - Exports public or private key to ASN1/DER
- *
- * \param ctx: your struct lws_genrsa_ctx
- * \param _private: 0 = public part only, 1 = all parts of the key
- * \param pkey_asn1: pointer to buffer to take the ASN1
- * \param pkey_asn1_len: max size of the pkey_asn1_len
- *
- * Returns length of pkey_asn1 written, or -1 for error.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_genrsa_render_pkey_asn1(struct lws_genrsa_ctx *ctx, int _private,
- uint8_t *pkey_asn1, size_t pkey_asn1_len);
-///@}
-
-/*! \defgroup jwk JSON Web Keys
- * ## JSON Web Keys API
- *
- * Lws provides an API to parse JSON Web Keys into a struct lws_genrsa_elements.
- *
- * "oct" and "RSA" type keys are supported. For "oct" keys, they are held in
- * the "e" member of the struct lws_genrsa_elements.
- *
- * Keys elements are allocated on the heap. You must destroy the allocations
- * in the struct lws_genrsa_elements by calling
- * lws_jwk_destroy_genrsa_elements() when you are finished with it.
- */
-///@{
-
-struct lws_jwk {
- char keytype[5]; /**< "oct" or "RSA" */
- struct lws_genrsa_elements el; /**< OCTet key is in el.e */
-};
-
-/** lws_jwk_import() - Create a JSON Web key from the textual representation
- *
- * \param s: the JWK object to create
- * \param in: a single JWK JSON stanza in utf-8
- * \param len: the length of the JWK JSON stanza in bytes
- *
- * Creates an lws_jwk struct filled with data from the JSON representation.
- * "oct" and "rsa" key types are supported.
- *
- * For "oct" type keys, it is loaded into el.e.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_jwk_import(struct lws_jwk *s, const char *in, size_t len);
-
-/** lws_jwk_destroy() - Destroy a JSON Web key
- *
- * \param s: the JWK object to destroy
- *
- * All allocations in the lws_jwk are destroyed
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_jwk_destroy(struct lws_jwk *s);
-
-/** lws_jwk_export() - Export a JSON Web key to a textual representation
- *
- * \param s: the JWK object to export
- * \param _private: 0 = just export public parts, 1 = export everything
- * \param p: the buffer to write the exported JWK to
- * \param len: the length of the buffer \p p in bytes
- *
- * Returns length of the used part of the buffer if OK, or -1 for error.
- *
- * Serializes the content of the JWK into a char buffer.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_jwk_export(struct lws_jwk *s, int _private, char *p, size_t len);
-
-/** lws_jwk_load() - Import a JSON Web key from a file
- *
- * \param s: the JWK object to load into
- * \param filename: filename to load from
- *
- * Returns 0 for OK or -1 for failure
- */
-LWS_VISIBLE int
-lws_jwk_load(struct lws_jwk *s, const char *filename);
-
-/** lws_jwk_save() - Export a JSON Web key to a file
- *
- * \param s: the JWK object to save from
- * \param filename: filename to save to
- *
- * Returns 0 for OK or -1 for failure
- */
-LWS_VISIBLE int
-lws_jwk_save(struct lws_jwk *s, const char *filename);
-
-/** lws_jwk_rfc7638_fingerprint() - jwk to RFC7638 compliant fingerprint
- *
- * \param s: the JWK object to fingerprint
- * \param digest32: buffer to take 32-byte digest
- *
- * Returns 0 for OK or -1 for failure
- */
-LWS_VISIBLE int
-lws_jwk_rfc7638_fingerprint(struct lws_jwk *s, char *digest32);
-///@}
-
-
-/*! \defgroup jws JSON Web Signature
- * ## JSON Web Signature API
- *
- * Lws provides an API to check and create RFC7515 JSON Web Signatures
- *
- * SHA256/384/512 HMAC, and RSA 256/384/512 are supported.
- *
- * The API uses your TLS library crypto, but works exactly the same no matter
- * what you TLS backend is.
- */
-///@{
-
-LWS_VISIBLE LWS_EXTERN int
-lws_jws_confirm_sig(const char *in, size_t len, struct lws_jwk *jwk);
-
-/**
- * lws_jws_sign_from_b64() - add b64 sig to b64 hdr + payload
- *
- * \param b64_hdr: protected header encoded in b64, may be NULL
- * \param hdr_len: bytes in b64 coding of protected header
- * \param b64_pay: payload encoded in b64
- * \param pay_len: bytes in b64 coding of payload
- * \param b64_sig: buffer to write the b64 encoded signature into
- * \param sig_len: max bytes we can write at b64_sig
- * \param hash_type: one of LWS_GENHASH_TYPE_SHA[256|384|512]
- * \param jwk: the struct lws_jwk containing the signing key
- *
- * This adds a b64-coded JWS signature of the b64-encoded protected header
- * and b64-encoded payload, at \p b64_sig. The signature will be as large
- * as the N element of the RSA key when the RSA key is used, eg, 512 bytes for
- * a 4096-bit key, and then b64-encoding on top.
- *
- * In some special cases, there is only payload to sign and no header, in that
- * case \p b64_hdr may be NULL, and only the payload will be hashed before
- * signing.
- *
- * Returns the length of the encoded signature written to \p b64_sig, or -1.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_jws_sign_from_b64(const char *b64_hdr, size_t hdr_len, const char *b64_pay,
- size_t pay_len, char *b64_sig, size_t sig_len,
- enum lws_genhash_types hash_type, struct lws_jwk *jwk);
-
-/**
- * lws_jws_create_packet() - add b64 sig to b64 hdr + payload
- *
- * \param jwk: the struct lws_jwk containing the signing key
- * \param payload: unencoded payload JSON
- * \param len: length of unencoded payload JSON
- * \param nonce: Nonse string to include in protected header
- * \param out: buffer to take signed packet
- * \param out_len: size of \p out buffer
- *
- * This creates a "flattened" JWS packet from the jwk and the plaintext
- * payload, and signs it. The packet is written into \p out.
- *
- * This does the whole packet assembly and signing, calling through to
- * lws_jws_sign_from_b64() as part of the process.
- *
- * Returns the length written to \p out, or -1.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_jws_create_packet(struct lws_jwk *jwk, const char *payload, size_t len,
- const char *nonce, char *out, size_t out_len);
-
-/**
- * lws_jws_base64_enc() - encode input data into b64url data
- *
- * \param in: the incoming plaintext
- * \param in_len: the length of the incoming plaintext in bytes
- * \param out: the buffer to store the b64url encoded data to
- * \param out_max: the length of \p out in bytes
- *
- * Returns either -1 if problems, or the number of bytes written to \p out.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_jws_base64_enc(const char *in, size_t in_len, char *out, size_t out_max);
-///@}
-#endif
-
-/*! \defgroup extensions Extension related functions
- * ##Extension releated functions
- *
- * Ws defines optional extensions, lws provides the ability to implement these
- * in user code if so desired.
- *
- * We provide one extensions permessage-deflate.
- */
-///@{
-
-/*
- * NOTE: These public enums are part of the abi. If you want to add one,
- * add it at where specified so existing users are unaffected.
- */
-enum lws_extension_callback_reasons {
- LWS_EXT_CB_CONSTRUCT = 4,
- LWS_EXT_CB_CLIENT_CONSTRUCT = 5,
- LWS_EXT_CB_DESTROY = 8,
- LWS_EXT_CB_PACKET_TX_PRESEND = 12,
- LWS_EXT_CB_PAYLOAD_TX = 21,
- LWS_EXT_CB_PAYLOAD_RX = 22,
- LWS_EXT_CB_OPTION_DEFAULT = 23,
- LWS_EXT_CB_OPTION_SET = 24,
- LWS_EXT_CB_OPTION_CONFIRM = 25,
- LWS_EXT_CB_NAMED_OPTION_SET = 26,
-
- /****** add new things just above ---^ ******/
-};
-
-/** enum lws_ext_options_types */
-enum lws_ext_options_types {
- EXTARG_NONE, /**< does not take an argument */
- EXTARG_DEC, /**< requires a decimal argument */
- EXTARG_OPT_DEC /**< may have an optional decimal argument */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility */
-};
-
-/** struct lws_ext_options - Option arguments to the extension. These are
- * used in the negotiation at ws upgrade time.
- * The helper function lws_ext_parse_options()
- * uses these to generate callbacks */
-struct lws_ext_options {
- const char *name; /**< Option name, eg, "server_no_context_takeover" */
- enum lws_ext_options_types type; /**< What kind of args the option can take */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility */
-};
-
-/** struct lws_ext_option_arg */
-struct lws_ext_option_arg {
- const char *option_name; /**< may be NULL, option_index used then */
- int option_index; /**< argument ordinal to use if option_name missing */
- const char *start; /**< value */
- int len; /**< length of value */
-};
-
-/**
- * typedef lws_extension_callback_function() - Hooks to allow extensions to operate
- * \param context: Websockets context
- * \param ext: This extension
- * \param wsi: Opaque websocket instance pointer
- * \param reason: The reason for the call
- * \param user: Pointer to ptr to per-session user data allocated by library
- * \param in: Pointer used for some callback reasons
- * \param len: Length set for some callback reasons
- *
- * Each extension that is active on a particular connection receives
- * callbacks during the connection lifetime to allow the extension to
- * operate on websocket data and manage itself.
- *
- * Libwebsockets takes care of allocating and freeing "user" memory for
- * each active extension on each connection. That is what is pointed to
- * by the user parameter.
- *
- * LWS_EXT_CB_CONSTRUCT: called when the server has decided to
- * select this extension from the list provided by the client,
- * just before the server will send back the handshake accepting
- * the connection with this extension active. This gives the
- * extension a chance to initialize its connection context found
- * in user.
- *
- * LWS_EXT_CB_CLIENT_CONSTRUCT: same as LWS_EXT_CB_CONSTRUCT
- * but called when client is instantiating this extension. Some
- * extensions will work the same on client and server side and then
- * you can just merge handlers for both CONSTRUCTS.
- *
- * LWS_EXT_CB_DESTROY: called when the connection the extension was
- * being used on is about to be closed and deallocated. It's the
- * last chance for the extension to deallocate anything it has
- * allocated in the user data (pointed to by user) before the
- * user data is deleted. This same callback is used whether you
- * are in client or server instantiation context.
- *
- * LWS_EXT_CB_PACKET_TX_PRESEND: this works the same way as
- * LWS_EXT_CB_PACKET_RX_PREPARSE above, except it gives the
- * extension a chance to change websocket data just before it will
- * be sent out. Using the same lws_token pointer scheme in in,
- * the extension can change the buffer and the length to be
- * transmitted how it likes. Again if it wants to grow the
- * buffer safely, it should copy the data into its own buffer and
- * set the lws_tokens token pointer to it.
- *
- * LWS_EXT_CB_ARGS_VALIDATE:
- */
-typedef int
-lws_extension_callback_function(struct lws_context *context,
- const struct lws_extension *ext, struct lws *wsi,
- enum lws_extension_callback_reasons reason,
- void *user, void *in, size_t len);
-
-/** struct lws_extension - An extension we support */
-struct lws_extension {
- const char *name; /**< Formal extension name, eg, "permessage-deflate" */
- lws_extension_callback_function *callback; /**< Service callback */
- const char *client_offer; /**< String containing exts and options client offers */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility */
-};
-
-/**
- * lws_set_extension_option(): set extension option if possible
- *
- * \param wsi: websocket connection
- * \param ext_name: name of ext, like "permessage-deflate"
- * \param opt_name: name of option, like "rx_buf_size"
- * \param opt_val: value to set option to
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_set_extension_option(struct lws *wsi, const char *ext_name,
- const char *opt_name, const char *opt_val);
-
-/**
- * lws_ext_parse_options() - deal with parsing negotiated extension options
- *
- * \param ext: related extension struct
- * \param wsi: websocket connection
- * \param ext_user: per-connection extension private data
- * \param opts: list of supported options
- * \param o: option string to parse
- * \param len: length
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_ext_parse_options(const struct lws_extension *ext, struct lws *wsi,
- void *ext_user, const struct lws_ext_options *opts,
- const char *o, int len);
-
-/** lws_extension_callback_pm_deflate() - extension for RFC7692
- *
- * \param context: lws context
- * \param ext: related lws_extension struct
- * \param wsi: websocket connection
- * \param reason: incoming callback reason
- * \param user: per-connection extension private data
- * \param in: pointer parameter
- * \param len: length parameter
- *
- * Built-in callback implementing RFC7692 permessage-deflate
- */
-LWS_EXTERN
-int lws_extension_callback_pm_deflate(
- struct lws_context *context, const struct lws_extension *ext,
- struct lws *wsi, enum lws_extension_callback_reasons reason,
- void *user, void *in, size_t len);
-
-/*
- * The internal exts are part of the public abi
- * If we add more extensions, publish the callback here ------v
- */
-///@}
-
-/*! \defgroup Protocols-and-Plugins Protocols and Plugins
- * \ingroup lwsapi
- *
- * ##Protocol and protocol plugin -related apis
- *
- * Protocols bind ws protocol names to a custom callback specific to that
- * protocol implementaion.
- *
- * A list of protocols can be passed in at context creation time, but it is
- * also legal to leave that NULL and add the protocols and their callback code
- * using plugins.
- *
- * Plugins are much preferable compared to cut and pasting code into an
- * application each time, since they can be used standalone.
- */
-///@{
-/** struct lws_protocols - List of protocols and handlers client or server
- * supports. */
-
-struct lws_protocols {
- const char *name;
- /**< Protocol name that must match the one given in the client
- * Javascript new WebSocket(url, 'protocol') name. */
- lws_callback_function *callback;
- /**< The service callback used for this protocol. It allows the
- * service action for an entire protocol to be encapsulated in
- * the protocol-specific callback */
- size_t per_session_data_size;
- /**< Each new connection using this protocol gets
- * this much memory allocated on connection establishment and
- * freed on connection takedown. A pointer to this per-connection
- * allocation is passed into the callback in the 'user' parameter */
- size_t rx_buffer_size;
- /**< lws allocates this much space for rx data and informs callback
- * when something came. Due to rx flow control, the callback may not
- * be able to consume it all without having to return to the event
- * loop. That is supported in lws.
- *
- * If .tx_packet_size is 0, this also controls how much may be sent at
- * once for backwards compatibility.
- */
- unsigned int id;
- /**< ignored by lws, but useful to contain user information bound
- * to the selected protocol. For example if this protocol was
- * called "myprotocol-v2", you might set id to 2, and the user
- * code that acts differently according to the version can do so by
- * switch (wsi->protocol->id), user code might use some bits as
- * capability flags based on selected protocol version, etc. */
- void *user; /**< ignored by lws, but user code can pass a pointer
- here it can later access from the protocol callback */
- size_t tx_packet_size;
- /**< 0 indicates restrict send() size to .rx_buffer_size for backwards-
- * compatibility.
- * If greater than zero, a single send() is restricted to this amount
- * and any remainder is buffered by lws and sent afterwards also in
- * these size chunks. Since that is expensive, it's preferable
- * to restrict one fragment you are trying to send to match this
- * size.
- */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility */
-};
-
-/**
- * lws_vhost_name_to_protocol() - get vhost's protocol object from its name
- *
- * \param vh: vhost to search
- * \param name: protocol name
- *
- * Returns NULL or a pointer to the vhost's protocol of the requested name
- */
-LWS_VISIBLE LWS_EXTERN const struct lws_protocols *
-lws_vhost_name_to_protocol(struct lws_vhost *vh, const char *name);
-
-/**
- * lws_get_protocol() - Returns a protocol pointer from a websocket
- * connection.
- * \param wsi: pointer to struct websocket you want to know the protocol of
- *
- *
- * Some apis can act on all live connections of a given protocol,
- * this is how you can get a pointer to the active protocol if needed.
- */
-LWS_VISIBLE LWS_EXTERN const struct lws_protocols *
-lws_get_protocol(struct lws *wsi);
-
-/** lws_protocol_get() - deprecated: use lws_get_protocol */
-LWS_VISIBLE LWS_EXTERN const struct lws_protocols *
-lws_protocol_get(struct lws *wsi) LWS_WARN_DEPRECATED;
-
-/**
- * lws_protocol_vh_priv_zalloc() - Allocate and zero down a protocol's per-vhost
- * storage
- * \param vhost: vhost the instance is related to
- * \param prot: protocol the instance is related to
- * \param size: bytes to allocate
- *
- * Protocols often find it useful to allocate a per-vhost struct, this is a
- * helper to be called in the per-vhost init LWS_CALLBACK_PROTOCOL_INIT
- */
-LWS_VISIBLE LWS_EXTERN void *
-lws_protocol_vh_priv_zalloc(struct lws_vhost *vhost, const struct lws_protocols *prot,
- int size);
-
-/**
- * lws_protocol_vh_priv_get() - retreive a protocol's per-vhost storage
- *
- * \param vhost: vhost the instance is related to
- * \param prot: protocol the instance is related to
- *
- * Recover a pointer to the allocated per-vhost storage for the protocol created
- * by lws_protocol_vh_priv_zalloc() earlier
- */
-LWS_VISIBLE LWS_EXTERN void *
-lws_protocol_vh_priv_get(struct lws_vhost *vhost, const struct lws_protocols *prot);
-
-/**
- * lws_adjust_protocol_psds - change a vhost protocol's per session data size
- *
- * \param wsi: a connection with the protocol to change
- * \param new_size: the new size of the per session data size for the protocol
- *
- * Returns user_space for the wsi, after allocating
- *
- * This should not be used except to initalize a vhost protocol's per session
- * data size one time, before any connections are accepted.
- *
- * Sometimes the protocol wraps another protocol and needs to discover and set
- * its per session data size at runtime.
- */
-LWS_VISIBLE LWS_EXTERN void *
-lws_adjust_protocol_psds(struct lws *wsi, size_t new_size);
-
-/**
- * lws_finalize_startup() - drop initial process privileges
- *
- * \param context: lws context
- *
- * This is called after the end of the vhost protocol initializations, but
- * you may choose to call it earlier
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_finalize_startup(struct lws_context *context);
-
-/**
- * lws_pvo_search() - helper to find a named pvo in a linked-list
- *
- * \param pvo: the first pvo in the linked-list
- * \param name: the name of the pvo to return if found
- *
- * Returns NULL, or a pointer to the name pvo in the linked-list
- */
-LWS_VISIBLE LWS_EXTERN const struct lws_protocol_vhost_options *
-lws_pvo_search(const struct lws_protocol_vhost_options *pvo, const char *name);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_protocol_init(struct lws_context *context);
-
-#ifdef LWS_WITH_PLUGINS
-
-/* PLUGINS implies LIBUV */
-
-#define LWS_PLUGIN_API_MAGIC 180
-
-/** struct lws_plugin_capability - how a plugin introduces itself to lws */
-struct lws_plugin_capability {
- unsigned int api_magic; /**< caller fills this in, plugin fills rest */
- const struct lws_protocols *protocols; /**< array of supported protocols provided by plugin */
- int count_protocols; /**< how many protocols */
- const struct lws_extension *extensions; /**< array of extensions provided by plugin */
- int count_extensions; /**< how many extensions */
-};
-
-typedef int (*lws_plugin_init_func)(struct lws_context *,
- struct lws_plugin_capability *);
-typedef int (*lws_plugin_destroy_func)(struct lws_context *);
-
-/** struct lws_plugin */
-struct lws_plugin {
- struct lws_plugin *list; /**< linked list */
-#if (UV_VERSION_MAJOR > 0)
- uv_lib_t lib; /**< shared library pointer */
-#else
- void *l; /**< so we can compile on ancient libuv */
-#endif
- char name[64]; /**< name of the plugin */
- struct lws_plugin_capability caps; /**< plugin capabilities */
-};
-
-#endif
-
-///@}
-
-
-/*! \defgroup generic-sessions plugin: generic-sessions
- * \ingroup Protocols-and-Plugins
- *
- * ##Plugin Generic-sessions related
- *
- * generic-sessions plugin provides a reusable, generic session and login /
- * register / forgot password framework including email verification.
- */
-///@{
-
-#define LWSGS_EMAIL_CONTENT_SIZE 16384
-/**< Maximum size of email we might send */
-
-/* SHA-1 binary and hexified versions */
-/** typedef struct lwsgw_hash_bin */
-typedef struct { unsigned char bin[20]; /**< binary representation of hash */} lwsgw_hash_bin;
-/** typedef struct lwsgw_hash */
-typedef struct { char id[41]; /**< ascii hex representation of hash */ } lwsgw_hash;
-
-/** enum lwsgs_auth_bits */
-enum lwsgs_auth_bits {
- LWSGS_AUTH_LOGGED_IN = 1, /**< user is logged in as somebody */
- LWSGS_AUTH_ADMIN = 2, /**< logged in as the admin user */
- LWSGS_AUTH_VERIFIED = 4, /**< user has verified his email */
- LWSGS_AUTH_FORGOT_FLOW = 8, /**< he just completed "forgot password" flow */
-};
-
-/** struct lws_session_info - information about user session status */
-struct lws_session_info {
- char username[32]; /**< username logged in as, or empty string */
- char email[100]; /**< email address associated with login, or empty string */
- char ip[72]; /**< ip address session was started from */
- unsigned int mask; /**< access rights mask associated with session
- * see enum lwsgs_auth_bits */
- char session[42]; /**< session id string, usable as opaque uid when not logged in */
-};
-
-/** enum lws_gs_event */
-enum lws_gs_event {
- LWSGSE_CREATED, /**< a new user was created */
- LWSGSE_DELETED /**< an existing user was deleted */
-};
-
-/** struct lws_gs_event_args */
-struct lws_gs_event_args {
- enum lws_gs_event event; /**< which event happened */
- const char *username; /**< which username the event happened to */
- const char *email; /**< the email address of that user */
-};
-
-///@}
-
-
-/*! \defgroup context-and-vhost context and vhost related functions
- * ##Context and Vhost releated functions
- * \ingroup lwsapi
- *
- *
- * LWS requires that there is one context, in which you may define multiple
- * vhosts. Each vhost is a virtual host, with either its own listen port
- * or sharing an existing one. Each vhost has its own SSL context that can
- * be set up individually or left disabled.
- *
- * If you don't care about multiple "site" support, you can ignore it and
- * lws will create a single default vhost at context creation time.
- */
-///@{
-
-/*
- * NOTE: These public enums are part of the abi. If you want to add one,
- * add it at where specified so existing users are unaffected.
- */
-
-/** enum lws_context_options - context and vhost options */
-enum lws_context_options {
- LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT = (1 << 1) |
- (1 << 12),
- /**< (VH) Don't allow the connection unless the client has a
- * client cert that we recognize; provides
- * LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT */
- LWS_SERVER_OPTION_SKIP_SERVER_CANONICAL_NAME = (1 << 2),
- /**< (CTX) Don't try to get the server's hostname */
- LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT = (1 << 3) |
- (1 << 12),
- /**< (VH) Allow non-SSL (plaintext) connections on the same
- * port as SSL is listening... undermines the security of SSL;
- * provides LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT */
- LWS_SERVER_OPTION_LIBEV = (1 << 4),
- /**< (CTX) Use libev event loop */
- LWS_SERVER_OPTION_DISABLE_IPV6 = (1 << 5),
- /**< (VH) Disable IPV6 support */
- LWS_SERVER_OPTION_DISABLE_OS_CA_CERTS = (1 << 6),
- /**< (VH) Don't load OS CA certs, you will need to load your
- * own CA cert(s) */
- LWS_SERVER_OPTION_PEER_CERT_NOT_REQUIRED = (1 << 7),
- /**< (VH) Accept connections with no valid Cert (eg, selfsigned) */
- LWS_SERVER_OPTION_VALIDATE_UTF8 = (1 << 8),
- /**< (VH) Check UT-8 correctness */
- LWS_SERVER_OPTION_SSL_ECDH = (1 << 9) |
- (1 << 12),
- /**< (VH) initialize ECDH ciphers */
- LWS_SERVER_OPTION_LIBUV = (1 << 10),
- /**< (CTX) Use libuv event loop */
- LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS = (1 << 11) |
- (1 << 12),
- /**< (VH) Use http redirect to force http to https
- * (deprecated: use mount redirection) */
- LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT = (1 << 12),
- /**< (CTX) Initialize the SSL library at all */
- LWS_SERVER_OPTION_EXPLICIT_VHOSTS = (1 << 13),
- /**< (CTX) Only create the context when calling context
- * create api, implies user code will create its own vhosts */
- LWS_SERVER_OPTION_UNIX_SOCK = (1 << 14),
- /**< (VH) Use Unix socket */
- LWS_SERVER_OPTION_STS = (1 << 15),
- /**< (VH) Send Strict Transport Security header, making
- * clients subsequently go to https even if user asked for http */
- LWS_SERVER_OPTION_IPV6_V6ONLY_MODIFY = (1 << 16),
- /**< (VH) Enable LWS_SERVER_OPTION_IPV6_V6ONLY_VALUE to take effect */
- LWS_SERVER_OPTION_IPV6_V6ONLY_VALUE = (1 << 17),
- /**< (VH) if set, only ipv6 allowed on the vhost */
- LWS_SERVER_OPTION_UV_NO_SIGSEGV_SIGFPE_SPIN = (1 << 18),
- /**< (CTX) Libuv only: Do not spin on SIGSEGV / SIGFPE. A segfault
- * normally makes the lib spin so you can attach a debugger to it
- * even if it happened without a debugger in place. You can disable
- * that by giving this option.
- */
- LWS_SERVER_OPTION_JUST_USE_RAW_ORIGIN = (1 << 19),
- /**< For backwards-compatibility reasons, by default
- * lws prepends "http://" to the origin you give in the client
- * connection info struct. If you give this flag when you create
- * the context, only the string you give in the client connect
- * info for .origin (if any) will be used directly.
- */
- LWS_SERVER_OPTION_FALLBACK_TO_RAW = (1 << 20),
- /**< (VH) if invalid http is coming in the first line, */
- LWS_SERVER_OPTION_LIBEVENT = (1 << 21),
- /**< (CTX) Use libevent event loop */
- LWS_SERVER_OPTION_ONLY_RAW = (1 << 22),
- /**< (VH) All connections to this vhost / port are RAW as soon as
- * the connection is accepted, no HTTP is going to be coming.
- */
- LWS_SERVER_OPTION_ALLOW_LISTEN_SHARE = (1 << 23),
- /**< (VH) Set to allow multiple listen sockets on one interface +
- * address + port. The default is to strictly allow only one
- * listen socket at a time. This is automatically selected if you
- * have multiple service threads.
- */
- LWS_SERVER_OPTION_CREATE_VHOST_SSL_CTX = (1 << 24),
- /**< (VH) Force setting up the vhost SSL_CTX, even though the user
- * code doesn't explicitly provide a cert in the info struct. It
- * implies the user code is going to provide a cert at the
- * LWS_CALLBACK_OPENSSL_LOAD_EXTRA_SERVER_VERIFY_CERTS callback, which
- * provides the vhost SSL_CTX * in the user parameter.
- */
- LWS_SERVER_OPTION_SKIP_PROTOCOL_INIT = (1 << 25),
- /**< (VH) You probably don't want this. It forces this vhost to not
- * call LWS_CALLBACK_PROTOCOL_INIT on its protocols. It's used in the
- * special case of a temporary vhost bound to a single protocol.
- */
- LWS_SERVER_OPTION_IGNORE_MISSING_CERT = (1 << 26),
- /**< (VH) Don't fail if the vhost TLS cert or key are missing, just
- * continue. The vhost won't be able to serve anything, but if for
- * example the ACME plugin was configured to fetch a cert, this lets
- * you bootstrap your vhost from having no cert to start with.
- */
-
- /****** add new things just above ---^ ******/
-};
-
-#define lws_check_opt(c, f) (((c) & (f)) == (f))
-
-struct lws_plat_file_ops;
-
-/** struct lws_context_creation_info - parameters to create context and /or vhost with
- *
- * This is also used to create vhosts.... if LWS_SERVER_OPTION_EXPLICIT_VHOSTS
- * is not given, then for backwards compatibility one vhost is created at
- * context-creation time using the info from this struct.
- *
- * If LWS_SERVER_OPTION_EXPLICIT_VHOSTS is given, then no vhosts are created
- * at the same time as the context, they are expected to be created afterwards.
- */
-struct lws_context_creation_info {
- int port;
- /**< VHOST: Port to listen on. Use CONTEXT_PORT_NO_LISTEN to suppress
- * listening for a client. Use CONTEXT_PORT_NO_LISTEN_SERVER if you are
- * writing a server but you are using \ref sock-adopt instead of the
- * built-in listener.
- *
- * You can also set port to 0, in which case the kernel will pick
- * a random port that is not already in use. You can find out what
- * port the vhost is listening on using lws_get_vhost_listen_port() */
- const char *iface;
- /**< VHOST: NULL to bind the listen socket to all interfaces, or the
- * interface name, eg, "eth2"
- * If options specifies LWS_SERVER_OPTION_UNIX_SOCK, this member is
- * the pathname of a UNIX domain socket. you can use the UNIX domain
- * sockets in abstract namespace, by prepending an at symbol to the
- * socket name. */
- const struct lws_protocols *protocols;
- /**< VHOST: Array of structures listing supported protocols and a protocol-
- * specific callback for each one. The list is ended with an
- * entry that has a NULL callback pointer. */
- const struct lws_extension *extensions;
- /**< VHOST: NULL or array of lws_extension structs listing the
- * extensions this context supports. */
- const struct lws_token_limits *token_limits;
- /**< CONTEXT: NULL or struct lws_token_limits pointer which is initialized
- * with a token length limit for each possible WSI_TOKEN_ */
- const char *ssl_private_key_password;
- /**< VHOST: NULL or the passphrase needed for the private key. (For
- * backwards compatibility, this can also be used to pass the client
- * cert passphrase when setting up a vhost client SSL context, but it is
- * preferred to use .client_ssl_private_key_password for that.) */
- const char *ssl_cert_filepath;
- /**< VHOST: If libwebsockets was compiled to use ssl, and you want
- * to listen using SSL, set to the filepath to fetch the
- * server cert from, otherwise NULL for unencrypted. (For backwards
- * compatibility, this can also be used to pass the client certificate
- * when setting up a vhost client SSL context, but it is preferred to
- * use .client_ssl_cert_filepath for that.) */
- const char *ssl_private_key_filepath;
- /**< VHOST: filepath to private key if wanting SSL mode;
- * if this is set to NULL but ssl_cert_filepath is set, the
- * OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY callback is called
- * to allow setting of the private key directly via openSSL
- * library calls. (For backwards compatibility, this can also be used
- * to pass the client cert private key filepath when setting up a
- * vhost client SSL context, but it is preferred to use
- * .client_ssl_private_key_filepath for that.) */
- const char *ssl_ca_filepath;
- /**< VHOST: CA certificate filepath or NULL. (For backwards
- * compatibility, this can also be used to pass the client CA
- * filepath when setting up a vhost client SSL context,
- * but it is preferred to use .client_ssl_ca_filepath for that.) */
- const char *ssl_cipher_list;
- /**< VHOST: List of valid ciphers to use (eg,
- * "RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"
- * or you can leave it as NULL to get "DEFAULT" (For backwards
- * compatibility, this can also be used to pass the client cipher
- * list when setting up a vhost client SSL context,
- * but it is preferred to use .client_ssl_cipher_list for that.)*/
- const char *http_proxy_address;
- /**< VHOST: If non-NULL, attempts to proxy via the given address.
- * If proxy auth is required, use format "username:password\@server:port" */
- unsigned int http_proxy_port;
- /**< VHOST: If http_proxy_address was non-NULL, uses this port */
- int gid;
- /**< CONTEXT: group id to change to after setting listen socket, or -1. */
- int uid;
- /**< CONTEXT: user id to change to after setting listen socket, or -1. */
- unsigned int options;
- /**< VHOST + CONTEXT: 0, or LWS_SERVER_OPTION_... bitfields */
- void *user;
- /**< VHOST + CONTEXT: optional user pointer that will be associated
- * with the context when creating the context (and can be retrieved by
- * lws_context_user(context), or with the vhost when creating the vhost
- * (and can be retrieved by lws_vhost_user(vhost)). You will need to
- * use LWS_SERVER_OPTION_EXPLICIT_VHOSTS and create the vhost separately
- * if you care about giving the context and vhost different user pointer
- * values.
- */
- int ka_time;
- /**< CONTEXT: 0 for no TCP keepalive, otherwise apply this keepalive
- * timeout to all libwebsocket sockets, client or server */
- int ka_probes;
- /**< CONTEXT: if ka_time was nonzero, after the timeout expires how many
- * times to try to get a response from the peer before giving up
- * and killing the connection */
- int ka_interval;
- /**< CONTEXT: if ka_time was nonzero, how long to wait before each ka_probes
- * attempt */
-#if defined(LWS_WITH_TLS) && !defined(LWS_WITH_MBEDTLS)
- SSL_CTX *provided_client_ssl_ctx;
- /**< CONTEXT: If non-null, swap out libwebsockets ssl
- * implementation for the one provided by provided_ssl_ctx.
- * Libwebsockets no longer is responsible for freeing the context
- * if this option is selected. */
-#else /* maintain structure layout either way */
- void *provided_client_ssl_ctx; /**< dummy if ssl disabled */
-#endif
-
- short max_http_header_data;
- /**< CONTEXT: The max amount of header payload that can be handled
- * in an http request (unrecognized header payload is dropped) */
- short max_http_header_pool;
- /**< CONTEXT: The max number of connections with http headers that
- * can be processed simultaneously (the corresponding memory is
- * allocated and deallocated dynamically as needed). If the pool is
- * fully busy new incoming connections must wait for accept until one
- * becomes free. 0 = allow as many ah as number of availble fds for
- * the process */
-
- unsigned int count_threads;
- /**< CONTEXT: how many contexts to create in an array, 0 = 1 */
- unsigned int fd_limit_per_thread;
- /**< CONTEXT: nonzero means restrict each service thread to this
- * many fds, 0 means the default which is divide the process fd
- * limit by the number of threads. */
- unsigned int timeout_secs;
- /**< VHOST: various processes involving network roundtrips in the
- * library are protected from hanging forever by timeouts. If
- * nonzero, this member lets you set the timeout used in seconds.
- * Otherwise a default timeout is used. */
- const char *ecdh_curve;
- /**< VHOST: if NULL, defaults to initializing server with "prime256v1" */
- const char *vhost_name;
- /**< VHOST: name of vhost, must match external DNS name used to
- * access the site, like "warmcat.com" as it's used to match
- * Host: header and / or SNI name for SSL. */
- const char * const *plugin_dirs;
- /**< CONTEXT: NULL, or NULL-terminated array of directories to
- * scan for lws protocol plugins at context creation time */
- const struct lws_protocol_vhost_options *pvo;
- /**< VHOST: pointer to optional linked list of per-vhost
- * options made accessible to protocols */
- int keepalive_timeout;
- /**< VHOST: (default = 0 = 5s) seconds to allow remote
- * client to hold on to an idle HTTP/1.1 connection */
- const char *log_filepath;
- /**< VHOST: filepath to append logs to... this is opened before
- * any dropping of initial privileges */
- const struct lws_http_mount *mounts;
- /**< VHOST: optional linked list of mounts for this vhost */
- const char *server_string;
- /**< CONTEXT: string used in HTTP headers to identify server
- * software, if NULL, "libwebsockets". */
- unsigned int pt_serv_buf_size;
- /**< CONTEXT: 0 = default of 4096. This buffer is used by
- * various service related features including file serving, it
- * defines the max chunk of file that can be sent at once.
- * At the risk of lws having to buffer failed large sends, it
- * can be increased to, eg, 128KiB to improve throughput. */
- unsigned int max_http_header_data2;
- /**< CONTEXT: if max_http_header_data is 0 and this
- * is nonzero, this will be used in place of the default. It's
- * like this for compatibility with the original short version,
- * this is unsigned int length. */
- long ssl_options_set;
- /**< VHOST: Any bits set here will be set as SSL options */
- long ssl_options_clear;
- /**< VHOST: Any bits set here will be cleared as SSL options */
- unsigned short ws_ping_pong_interval;
- /**< CONTEXT: 0 for none, else interval in seconds between sending
- * PINGs on idle websocket connections. When the PING is sent,
- * the PONG must come within the normal timeout_secs timeout period
- * or the connection will be dropped.
- * Any RX or TX traffic on the connection restarts the interval timer,
- * so a connection which always sends or receives something at intervals
- * less than the interval given here will never send PINGs / expect
- * PONGs. Conversely as soon as the ws connection is established, an
- * idle connection will do the PING / PONG roundtrip as soon as
- * ws_ping_pong_interval seconds has passed without traffic
- */
- const struct lws_protocol_vhost_options *headers;
- /**< VHOST: pointer to optional linked list of per-vhost
- * canned headers that are added to server responses */
-
- const struct lws_protocol_vhost_options *reject_service_keywords;
- /**< CONTEXT: Optional list of keywords and rejection codes + text.
- *
- * The keywords are checked for existing in the user agent string.
- *
- * Eg, "badrobot" "404 Not Found"
- */
- void *external_baggage_free_on_destroy;
- /**< CONTEXT: NULL, or pointer to something externally malloc'd, that
- * should be freed when the context is destroyed. This allows you to
- * automatically sync the freeing action to the context destruction
- * action, so there is no need for an external free() if the context
- * succeeded to create.
- */
-
- const char *client_ssl_private_key_password;
- /**< VHOST: Client SSL context init: NULL or the passphrase needed
- * for the private key */
- const char *client_ssl_cert_filepath;
- /**< VHOST: Client SSL context init:T he certificate the client
- * should present to the peer on connection */
- const char *client_ssl_private_key_filepath;
- /**< VHOST: Client SSL context init: filepath to client private key
- * if this is set to NULL but client_ssl_cert_filepath is set, you
- * can handle the LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS
- * callback of protocols[0] to allow setting of the private key directly
- * via openSSL library calls */
- const char *client_ssl_ca_filepath;
- /**< VHOST: Client SSL context init: CA certificate filepath or NULL */
- const char *client_ssl_cipher_list;
- /**< VHOST: Client SSL context init: List of valid ciphers to use (eg,
- * "RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"
- * or you can leave it as NULL to get "DEFAULT" */
-
- const struct lws_plat_file_ops *fops;
- /**< CONTEXT: NULL, or pointer to an array of fops structs, terminated
- * by a sentinel with NULL .open.
- *
- * If NULL, lws provides just the platform file operations struct for
- * backwards compatibility.
- */
- int simultaneous_ssl_restriction;
- /**< CONTEXT: 0 (no limit) or limit of simultaneous SSL sessions possible.*/
- const char *socks_proxy_address;
- /**< VHOST: If non-NULL, attempts to proxy via the given address.
- * If proxy auth is required, use format "username:password\@server:port" */
- unsigned int socks_proxy_port;
- /**< VHOST: If socks_proxy_address was non-NULL, uses this port */
-#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
- cap_value_t caps[4];
- /**< CONTEXT: array holding Linux capabilities you want to
- * continue to be available to the server after it transitions
- * to a noprivileged user. Usually none are needed but for, eg,
- * .bind_iface, CAP_NET_RAW is required. This gives you a way
- * to still have the capability but drop root.
- */
- char count_caps;
- /**< CONTEXT: count of Linux capabilities in .caps[]. 0 means
- * no capabilities will be inherited from root (the default) */
-#endif
- int bind_iface;
- /**< VHOST: nonzero to strictly bind sockets to the interface name in
- * .iface (eg, "eth2"), using SO_BIND_TO_DEVICE.
- *
- * Requires SO_BINDTODEVICE support from your OS and CAP_NET_RAW
- * capability.
- *
- * Notice that common things like access network interface IP from
- * your local machine use your lo / loopback interface and will be
- * disallowed by this.
- */
- int ssl_info_event_mask;
- /**< VHOST: mask of ssl events to be reported on LWS_CALLBACK_SSL_INFO
- * callback for connections on this vhost. The mask values are of
- * the form SSL_CB_ALERT, defined in openssl/ssl.h. The default of
- * 0 means no info events will be reported.
- */
- unsigned int timeout_secs_ah_idle;
- /**< VHOST: seconds to allow a client to hold an ah without using it.
- * 0 defaults to 10s. */
- unsigned short ip_limit_ah;
- /**< CONTEXT: max number of ah a single IP may use simultaneously
- * 0 is no limit. This is a soft limit: if the limit is
- * reached, connections from that IP will wait in the ah
- * waiting list and not be able to acquire an ah until
- * a connection belonging to the IP relinquishes one it
- * already has.
- */
- unsigned short ip_limit_wsi;
- /**< CONTEXT: max number of wsi a single IP may use simultaneously.
- * 0 is no limit. This is a hard limit, connections from
- * the same IP will simply be dropped once it acquires the
- * amount of simultaneous wsi / accepted connections
- * given here.
- */
- uint32_t http2_settings[7];
- /**< VHOST: if http2_settings[0] is nonzero, the values given in
- * http2_settings[1]..[6] are used instead of the lws
- * platform default values.
- * Just leave all at 0 if you don't care.
- */
- const char *error_document_404;
- /**< VHOST: If non-NULL, when asked to serve a non-existent file,
- * lws attempts to server this url path instead. Eg,
- * "/404.html" */
- const char *alpn;
- /**< CONTEXT: If non-NULL, default list of advertised alpn, comma-
- * separated
- *
- * VHOST: If non-NULL, per-vhost list of advertised alpn, comma-
- * separated
- */
- void **foreign_loops;
- /**< CONTEXT: This is ignored if the context is not being started with
- * an event loop, ie, .options has a flag like
- * LWS_SERVER_OPTION_LIBUV.
- *
- * NULL indicates lws should start its own even loop for
- * each service thread, and deal with closing the loops
- * when the context is destroyed.
- *
- * Non-NULL means it points to an array of external
- * ("foreign") event loops that are to be used in turn for
- * each service thread. In the default case of 1 service
- * thread, it can just point to one foreign event loop.
- */
- void (*signal_cb)(void *event_lib_handle, int signum);
- /**< CONTEXT: NULL: default signal handling. Otherwise this receives
- * the signal handler callback. event_lib_handle is the
- * native event library signal handle, eg uv_signal_t *
- * for libuv.
- */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility
- *
- * The below is to ensure later library versions with new
- * members added above will see 0 (default) even if the app
- * was not built against the newer headers.
- */
- struct lws_context **pcontext;
- /**< CONTEXT: if non-NULL, at the end of context destroy processing,
- * the pointer pointed to by pcontext is written with NULL. You can
- * use this to let foreign event loops know that lws context destruction
- * is fully completed.
- */
-
- void *_unused[4]; /**< dummy */
-};
-
-/**
- * lws_create_context() - Create the websocket handler
- * \param info: pointer to struct with parameters
- *
- * This function creates the listening socket (if serving) and takes care
- * of all initialization in one step.
- *
- * If option LWS_SERVER_OPTION_EXPLICIT_VHOSTS is given, no vhost is
- * created; you're expected to create your own vhosts afterwards using
- * lws_create_vhost(). Otherwise a vhost named "default" is also created
- * using the information in the vhost-related members, for compatibility.
- *
- * After initialization, it returns a struct lws_context * that
- * represents this server. After calling, user code needs to take care
- * of calling lws_service() with the context pointer to get the
- * server's sockets serviced. This must be done in the same process
- * context as the initialization call.
- *
- * The protocol callback functions are called for a handful of events
- * including http requests coming in, websocket connections becoming
- * established, and data arriving; it's also called periodically to allow
- * async transmission.
- *
- * HTTP requests are sent always to the FIRST protocol in protocol, since
- * at that time websocket protocol has not been negotiated. Other
- * protocols after the first one never see any HTTP callback activity.
- *
- * The server created is a simple http server by default; part of the
- * websocket standard is upgrading this http connection to a websocket one.
- *
- * This allows the same server to provide files like scripts and favicon /
- * images or whatever over http and dynamic data over websockets all in
- * one place; they're all handled in the user callback.
- */
-LWS_VISIBLE LWS_EXTERN struct lws_context *
-lws_create_context(const struct lws_context_creation_info *info);
-
-
-/**
- * lws_context_destroy() - Destroy the websocket context
- * \param context: Websocket context
- *
- * This function closes any active connections and then frees the
- * context. After calling this, any further use of the context is
- * undefined.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_context_destroy(struct lws_context *context);
-
-typedef int (*lws_reload_func)(void);
-
-/**
- * lws_context_deprecate() - Deprecate the websocket context
- *
- * \param context: Websocket context
- * \param cb: Callback notified when old context listen sockets are closed
- *
- * This function is used on an existing context before superceding it
- * with a new context.
- *
- * It closes any listen sockets in the context, so new connections are
- * not possible.
- *
- * And it marks the context to be deleted when the number of active
- * connections into it falls to zero.
- *
- * Otherwise if you attach the deprecated context to the replacement
- * context when it has been created using lws_context_attach_deprecated()
- * both any deprecated and the new context will service their connections.
- *
- * This is aimed at allowing seamless configuration reloads.
- *
- * The callback cb will be called after the listen sockets are actually
- * closed and may be reopened. In the callback the new context should be
- * configured and created. (With libuv, socket close happens async after
- * more loop events).
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_context_deprecate(struct lws_context *context, lws_reload_func cb);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_context_is_deprecated(struct lws_context *context);
-
-/**
- * lws_set_proxy() - Setups proxy to lws_context.
- * \param vhost: pointer to struct lws_vhost you want set proxy for
- * \param proxy: pointer to c string containing proxy in format address:port
- *
- * Returns 0 if proxy string was parsed and proxy was setup.
- * Returns -1 if proxy is NULL or has incorrect format.
- *
- * This is only required if your OS does not provide the http_proxy
- * environment variable (eg, OSX)
- *
- * IMPORTANT! You should call this function right after creation of the
- * lws_context and before call to connect. If you call this
- * function after connect behavior is undefined.
- * This function will override proxy settings made on lws_context
- * creation with genenv() call.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_set_proxy(struct lws_vhost *vhost, const char *proxy);
-
-/**
- * lws_set_socks() - Setup socks to lws_context.
- * \param vhost: pointer to struct lws_vhost you want set socks for
- * \param socks: pointer to c string containing socks in format address:port
- *
- * Returns 0 if socks string was parsed and socks was setup.
- * Returns -1 if socks is NULL or has incorrect format.
- *
- * This is only required if your OS does not provide the socks_proxy
- * environment variable (eg, OSX)
- *
- * IMPORTANT! You should call this function right after creation of the
- * lws_context and before call to connect. If you call this
- * function after connect behavior is undefined.
- * This function will override proxy settings made on lws_context
- * creation with genenv() call.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_set_socks(struct lws_vhost *vhost, const char *socks);
-
-struct lws_vhost;
-
-/**
- * lws_create_vhost() - Create a vhost (virtual server context)
- * \param context: pointer to result of lws_create_context()
- * \param info: pointer to struct with parameters
- *
- * This function creates a virtual server (vhost) using the vhost-related
- * members of the info struct. You can create many vhosts inside one context
- * if you created the context with the option LWS_SERVER_OPTION_EXPLICIT_VHOSTS
- */
-LWS_VISIBLE LWS_EXTERN struct lws_vhost *
-lws_create_vhost(struct lws_context *context,
- const struct lws_context_creation_info *info);
-
-/**
- * lws_vhost_destroy() - Destroy a vhost (virtual server context)
- *
- * \param vh: pointer to result of lws_create_vhost()
- *
- * This function destroys a vhost. Normally, if you just want to exit,
- * then lws_destroy_context() will take care of everything. If you want
- * to destroy an individual vhost and all connections and allocations, you
- * can do it with this.
- *
- * If the vhost has a listen sockets shared by other vhosts, it will be given
- * to one of the vhosts sharing it rather than closed.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_vhost_destroy(struct lws_vhost *vh);
-
-/**
- * lwsws_get_config_globals() - Parse a JSON server config file
- * \param info: pointer to struct with parameters
- * \param d: filepath of the config file
- * \param config_strings: storage for the config strings extracted from JSON,
- * the pointer is incremented as strings are stored
- * \param len: pointer to the remaining length left in config_strings
- * the value is decremented as strings are stored
- *
- * This function prepares a n lws_context_creation_info struct with global
- * settings from a file d.
- *
- * Requires CMake option LWS_WITH_LEJP_CONF to have been enabled
- */
-LWS_VISIBLE LWS_EXTERN int
-lwsws_get_config_globals(struct lws_context_creation_info *info, const char *d,
- char **config_strings, int *len);
-
-/**
- * lwsws_get_config_vhosts() - Create vhosts from a JSON server config file
- * \param context: pointer to result of lws_create_context()
- * \param info: pointer to struct with parameters
- * \param d: filepath of the config file
- * \param config_strings: storage for the config strings extracted from JSON,
- * the pointer is incremented as strings are stored
- * \param len: pointer to the remaining length left in config_strings
- * the value is decremented as strings are stored
- *
- * This function creates vhosts into a context according to the settings in
- *JSON files found in directory d.
- *
- * Requires CMake option LWS_WITH_LEJP_CONF to have been enabled
- */
-LWS_VISIBLE LWS_EXTERN int
-lwsws_get_config_vhosts(struct lws_context *context,
- struct lws_context_creation_info *info, const char *d,
- char **config_strings, int *len);
-
-/** lws_vhost_get() - \deprecated deprecated: use lws_get_vhost() */
-LWS_VISIBLE LWS_EXTERN struct lws_vhost *
-lws_vhost_get(struct lws *wsi) LWS_WARN_DEPRECATED;
-
-/**
- * lws_get_vhost() - return the vhost a wsi belongs to
- *
- * \param wsi: which connection
- */
-LWS_VISIBLE LWS_EXTERN struct lws_vhost *
-lws_get_vhost(struct lws *wsi);
-
-/**
- * lws_get_vhost_name() - returns the name of a vhost
- *
- * \param vhost: which vhost
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_get_vhost_name(struct lws_vhost *vhost);
-
-/**
- * lws_get_vhost_port() - returns the port a vhost listens on, or -1
- *
- * \param vhost: which vhost
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_get_vhost_port(struct lws_vhost *vhost);
-
-/**
- * lws_get_vhost_user() - returns the user pointer for the vhost
- *
- * \param vhost: which vhost
- */
-LWS_VISIBLE LWS_EXTERN void *
-lws_get_vhost_user(struct lws_vhost *vhost);
-
-/**
- * lws_get_vhost_iface() - returns the binding for the vhost listen socket
- *
- * \param vhost: which vhost
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_get_vhost_iface(struct lws_vhost *vhost);
-
-/**
- * lws_json_dump_vhost() - describe vhost state and stats in JSON
- *
- * \param vh: the vhost
- * \param buf: buffer to fill with JSON
- * \param len: max length of buf
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_json_dump_vhost(const struct lws_vhost *vh, char *buf, int len);
-
-/**
- * lws_json_dump_context() - describe context state and stats in JSON
- *
- * \param context: the context
- * \param buf: buffer to fill with JSON
- * \param len: max length of buf
- * \param hide_vhosts: nonzero to not provide per-vhost mount etc information
- *
- * Generates a JSON description of vhost state into buf
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_json_dump_context(const struct lws_context *context, char *buf, int len,
- int hide_vhosts);
-
-/**
- * lws_vhost_user() - get the user data associated with the vhost
- * \param vhost: Websocket vhost
- *
- * This returns the optional user pointer that can be attached to
- * a vhost when it was created. Lws never dereferences this pointer, it only
- * sets it when the vhost is created, and returns it using this api.
- */
-LWS_VISIBLE LWS_EXTERN void *
-lws_vhost_user(struct lws_vhost *vhost);
-
-/**
- * lws_context_user() - get the user data associated with the context
- * \param context: Websocket context
- *
- * This returns the optional user allocation that can be attached to
- * the context the sockets live in at context_create time. It's a way
- * to let all sockets serviced in the same context share data without
- * using globals statics in the user code.
- */
-LWS_VISIBLE LWS_EXTERN void *
-lws_context_user(struct lws_context *context);
-
-/*! \defgroup vhost-mounts Vhost mounts and options
- * \ingroup context-and-vhost-creation
- *
- * ##Vhost mounts and options
- */
-///@{
-/** struct lws_protocol_vhost_options - linked list of per-vhost protocol
- * name=value options
- *
- * This provides a general way to attach a linked-list of name=value pairs,
- * which can also have an optional child link-list using the options member.
- */
-struct lws_protocol_vhost_options {
- const struct lws_protocol_vhost_options *next; /**< linked list */
- const struct lws_protocol_vhost_options *options; /**< child linked-list of more options for this node */
- const char *name; /**< name of name=value pair */
- const char *value; /**< value of name=value pair */
-};
-
-/** enum lws_mount_protocols
- * This specifies the mount protocol for a mountpoint, whether it is to be
- * served from a filesystem, or it is a cgi etc.
- */
-enum lws_mount_protocols {
- LWSMPRO_HTTP = 0, /**< http reverse proxy */
- LWSMPRO_HTTPS = 1, /**< https reverse proxy */
- LWSMPRO_FILE = 2, /**< serve from filesystem directory */
- LWSMPRO_CGI = 3, /**< pass to CGI to handle */
- LWSMPRO_REDIR_HTTP = 4, /**< redirect to http:// url */
- LWSMPRO_REDIR_HTTPS = 5, /**< redirect to https:// url */
- LWSMPRO_CALLBACK = 6, /**< hand by named protocol's callback */
-};
-
-/** struct lws_http_mount
- *
- * arguments for mounting something in a vhost's url namespace
- */
-struct lws_http_mount {
- const struct lws_http_mount *mount_next;
- /**< pointer to next struct lws_http_mount */
- const char *mountpoint;
- /**< mountpoint in http pathspace, eg, "/" */
- const char *origin;
- /**< path to be mounted, eg, "/var/www/warmcat.com" */
- const char *def;
- /**< default target, eg, "index.html" */
- const char *protocol;
- /**<"protocol-name" to handle mount */
-
- const struct lws_protocol_vhost_options *cgienv;
- /**< optional linked-list of cgi options. These are created
- * as environment variables for the cgi process
- */
- const struct lws_protocol_vhost_options *extra_mimetypes;
- /**< optional linked-list of mimetype mappings */
- const struct lws_protocol_vhost_options *interpret;
- /**< optional linked-list of files to be interpreted */
-
- int cgi_timeout;
- /**< seconds cgi is allowed to live, if cgi://mount type */
- int cache_max_age;
- /**< max-age for reuse of client cache of files, seconds */
- unsigned int auth_mask;
- /**< bits set here must be set for authorized client session */
-
- unsigned int cache_reusable:1; /**< set if client cache may reuse this */
- unsigned int cache_revalidate:1; /**< set if client cache should revalidate on use */
- unsigned int cache_intermediaries:1; /**< set if intermediaries are allowed to cache */
-
- unsigned char origin_protocol; /**< one of enum lws_mount_protocols */
- unsigned char mountpoint_len; /**< length of mountpoint string */
-
- const char *basic_auth_login_file;
- /**<NULL, or filepath to use to check basic auth logins against */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility
- *
- * The below is to ensure later library versions with new
- * members added above will see 0 (default) even if the app
- * was not built against the newer headers.
- */
-
- void *_unused[2]; /**< dummy */
-};
-///@}
-///@}
-
-/*! \defgroup client Client related functions
- * ##Client releated functions
- * \ingroup lwsapi
- *
- * */
-///@{
-
-/** enum lws_client_connect_ssl_connection_flags - flags that may be used
- * with struct lws_client_connect_info ssl_connection member to control if
- * and how SSL checks apply to the client connection being created
- */
-
-enum lws_client_connect_ssl_connection_flags {
- LCCSCF_USE_SSL = (1 << 0),
- LCCSCF_ALLOW_SELFSIGNED = (1 << 1),
- LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK = (1 << 2),
- LCCSCF_ALLOW_EXPIRED = (1 << 3),
-
- LCCSCF_PIPELINE = (1 << 16),
- /**< Serialize / pipeline multiple client connections
- * on a single connection where possible.
- *
- * HTTP/1.0: possible if Keep-Alive: yes sent by server
- * HTTP/1.1: always possible... uses pipelining
- * HTTP/2: always possible... uses parallel streams
- * */
-};
-
-/** struct lws_client_connect_info - parameters to connect with when using
- * lws_client_connect_via_info() */
-
-struct lws_client_connect_info {
- struct lws_context *context;
- /**< lws context to create connection in */
- const char *address;
- /**< remote address to connect to */
- int port;
- /**< remote port to connect to */
- int ssl_connection;
- /**< 0, or a combination of LCCSCF_ flags */
- const char *path;
- /**< uri path */
- const char *host;
- /**< content of host header */
- const char *origin;
- /**< content of origin header */
- const char *protocol;
- /**< list of ws protocols we could accept */
- int ietf_version_or_minus_one;
- /**< deprecated: currently leave at 0 or -1 */
- void *userdata;
- /**< if non-NULL, use this as wsi user_data instead of malloc it */
- const void *client_exts;
- /**< UNUSED... provide in info.extensions at context creation time */
- const char *method;
- /**< if non-NULL, do this http method instead of ws[s] upgrade.
- * use "GET" to be a simple http client connection. "RAW" gets
- * you a connected socket that lws itself will leave alone once
- * connected. */
- struct lws *parent_wsi;
- /**< if another wsi is responsible for this connection, give it here.
- * this is used to make sure if the parent closes so do any
- * child connections first. */
- const char *uri_replace_from;
- /**< if non-NULL, when this string is found in URIs in
- * text/html content-encoding, it's replaced with uri_replace_to */
- const char *uri_replace_to;
- /**< see uri_replace_from */
- struct lws_vhost *vhost;
- /**< vhost to bind to (used to determine related SSL_CTX) */
- struct lws **pwsi;
- /**< if not NULL, store the new wsi here early in the connection
- * process. Although we return the new wsi, the call to create the
- * client connection does progress the connection somewhat and may
- * meet an error that will result in the connection being scrubbed and
- * NULL returned. While the wsi exists though, he may process a
- * callback like CLIENT_CONNECTION_ERROR with his wsi: this gives the
- * user callback a way to identify which wsi it is that faced the error
- * even before the new wsi is returned and even if ultimately no wsi
- * is returned.
- */
- const char *iface;
- /**< NULL to allow routing on any interface, or interface name or IP
- * to bind the socket to */
- const char *local_protocol_name;
- /**< NULL: .protocol is used both to select the local protocol handler
- * to bind to and as the list of remote ws protocols we could
- * accept.
- * non-NULL: this protocol name is used to bind the connection to
- * the local protocol handler. .protocol is used for the
- * list of remote ws protocols we could accept */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility
- *
- * The below is to ensure later library versions with new
- * members added above will see 0 (default) even if the app
- * was not built against the newer headers.
- */
- const char *alpn;
- /* NULL: allow lws default ALPN list, from vhost if present or from
- * list of roles built into lws
- * non-NULL: require one from provided comma-separated list of alpn
- * tokens
- */
-
- void *_unused[4]; /**< dummy */
-};
-
-/**
- * lws_client_connect_via_info() - Connect to another websocket server
- * \param ccinfo: pointer to lws_client_connect_info struct
- *
- * This function creates a connection to a remote server using the
- * information provided in ccinfo.
- */
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_client_connect_via_info(struct lws_client_connect_info * ccinfo);
-
-/**
- * lws_client_connect() - Connect to another websocket server
- * \deprecated DEPRECATED use lws_client_connect_via_info
- * \param clients: Websocket context
- * \param address: Remote server address, eg, "myserver.com"
- * \param port: Port to connect to on the remote server, eg, 80
- * \param ssl_connection: 0 = ws://, 1 = wss:// encrypted, 2 = wss:// allow self
- * signed certs
- * \param path: Websocket path on server
- * \param host: Hostname on server
- * \param origin: Socket origin name
- * \param protocol: Comma-separated list of protocols being asked for from
- * the server, or just one. The server will pick the one it
- * likes best. If you don't want to specify a protocol, which is
- * legal, use NULL here.
- * \param ietf_version_or_minus_one: -1 to ask to connect using the default, latest
- * protocol supported, or the specific protocol ordinal
- *
- * This function creates a connection to a remote server
- */
-/* deprecated, use lws_client_connect_via_info() */
-LWS_VISIBLE LWS_EXTERN struct lws * LWS_WARN_UNUSED_RESULT
-lws_client_connect(struct lws_context *clients, const char *address,
- int port, int ssl_connection, const char *path,
- const char *host, const char *origin, const char *protocol,
- int ietf_version_or_minus_one) LWS_WARN_DEPRECATED;
-/* deprecated, use lws_client_connect_via_info() */
-/**
- * lws_client_connect_extended() - Connect to another websocket server
- * \deprecated DEPRECATED use lws_client_connect_via_info
- * \param clients: Websocket context
- * \param address: Remote server address, eg, "myserver.com"
- * \param port: Port to connect to on the remote server, eg, 80
- * \param ssl_connection: 0 = ws://, 1 = wss:// encrypted, 2 = wss:// allow self
- * signed certs
- * \param path: Websocket path on server
- * \param host: Hostname on server
- * \param origin: Socket origin name
- * \param protocol: Comma-separated list of protocols being asked for from
- * the server, or just one. The server will pick the one it
- * likes best.
- * \param ietf_version_or_minus_one: -1 to ask to connect using the default, latest
- * protocol supported, or the specific protocol ordinal
- * \param userdata: Pre-allocated user data
- *
- * This function creates a connection to a remote server
- */
-LWS_VISIBLE LWS_EXTERN struct lws * LWS_WARN_UNUSED_RESULT
-lws_client_connect_extended(struct lws_context *clients, const char *address,
- int port, int ssl_connection, const char *path,
- const char *host, const char *origin,
- const char *protocol, int ietf_version_or_minus_one,
- void *userdata) LWS_WARN_DEPRECATED;
-
-/**
- * lws_init_vhost_client_ssl() - also enable client SSL on an existing vhost
- *
- * \param info: client ssl related info
- * \param vhost: which vhost to initialize client ssl operations on
- *
- * You only need to call this if you plan on using SSL client connections on
- * the vhost. For non-SSL client connections, it's not necessary to call this.
- *
- * The following members of info are used during the call
- *
- * - options must have LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT set,
- * otherwise the call does nothing
- * - provided_client_ssl_ctx must be NULL to get a generated client
- * ssl context, otherwise you can pass a prepared one in by setting it
- * - ssl_cipher_list may be NULL or set to the client valid cipher list
- * - ssl_ca_filepath may be NULL or client cert filepath
- * - ssl_cert_filepath may be NULL or client cert filepath
- * - ssl_private_key_filepath may be NULL or client cert private key
- *
- * You must create your vhost explicitly if you want to use this, so you have
- * a pointer to the vhost. Create the context first with the option flag
- * LWS_SERVER_OPTION_EXPLICIT_VHOSTS and then call lws_create_vhost() with
- * the same info struct.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_init_vhost_client_ssl(const struct lws_context_creation_info *info,
- struct lws_vhost *vhost);
-/**
- * lws_http_client_read() - consume waiting received http client data
- *
- * \param wsi: client connection
- * \param buf: pointer to buffer pointer - fill with pointer to your buffer
- * \param len: pointer to chunk length - fill with max length of buffer
- *
- * This is called when the user code is notified client http data has arrived.
- * The user code may choose to delay calling it to consume the data, for example
- * waiting until an onward connection is writeable.
- *
- * For non-chunked connections, up to len bytes of buf are filled with the
- * received content. len is set to the actual amount filled before return.
- *
- * For chunked connections, the linear buffer content contains the chunking
- * headers and it cannot be passed in one lump. Instead, this function will
- * call back LWS_CALLBACK_RECEIVE_CLIENT_HTTP_READ with in pointing to the
- * chunk start and len set to the chunk length. There will be as many calls
- * as there are chunks or partial chunks in the buffer.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_http_client_read(struct lws *wsi, char **buf, int *len);
-
-/**
- * lws_http_client_http_response() - get last HTTP response code
- *
- * \param wsi: client connection
- *
- * Returns the last server response code, eg, 200 for client http connections.
- *
- * You should capture this during the LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP
- * callback, because after that the memory reserved for storing the related
- * headers is freed and this value is lost.
- */
-LWS_VISIBLE LWS_EXTERN unsigned int
-lws_http_client_http_response(struct lws *wsi);
-
-LWS_VISIBLE LWS_EXTERN void
-lws_client_http_body_pending(struct lws *wsi, int something_left_to_send);
-
-/**
- * lws_client_http_body_pending() - control if client connection neeeds to send body
- *
- * \param wsi: client connection
- * \param something_left_to_send: nonzero if need to send more body, 0 (default)
- * if nothing more to send
- *
- * If you will send payload data with your HTTP client connection, eg, for POST,
- * when you set the related http headers in
- * LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER callback you should also call
- * this API with something_left_to_send nonzero, and call
- * lws_callback_on_writable(wsi);
- *
- * After sending the headers, lws will call your callback with
- * LWS_CALLBACK_CLIENT_HTTP_WRITEABLE reason when writable. You can send the
- * next part of the http body payload, calling lws_callback_on_writable(wsi);
- * if there is more to come, or lws_client_http_body_pending(wsi, 0); to
- * let lws know the last part is sent and the connection can move on.
- */
-
-///@}
-
-/** \defgroup service Built-in service loop entry
- *
- * ##Built-in service loop entry
- *
- * If you're not using libev / libuv, these apis are needed to enter the poll()
- * wait in lws and service any connections with pending events.
- */
-///@{
-
-/**
- * lws_service() - Service any pending websocket activity
- * \param context: Websocket context
- * \param timeout_ms: Timeout for poll; 0 means return immediately if nothing needed
- * service otherwise block and service immediately, returning
- * after the timeout if nothing needed service.
- *
- * This function deals with any pending websocket traffic, for three
- * kinds of event. It handles these events on both server and client
- * types of connection the same.
- *
- * 1) Accept new connections to our context's server
- *
- * 2) Call the receive callback for incoming frame data received by
- * server or client connections.
- *
- * You need to call this service function periodically to all the above
- * functions to happen; if your application is single-threaded you can
- * just call it in your main event loop.
- *
- * Alternatively you can fork a new process that asynchronously handles
- * calling this service in a loop. In that case you are happy if this
- * call blocks your thread until it needs to take care of something and
- * would call it with a large nonzero timeout. Your loop then takes no
- * CPU while there is nothing happening.
- *
- * If you are calling it in a single-threaded app, you don't want it to
- * wait around blocking other things in your loop from happening, so you
- * would call it with a timeout_ms of 0, so it returns immediately if
- * nothing is pending, or as soon as it services whatever was pending.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_service(struct lws_context *context, int timeout_ms);
-
-/**
- * lws_service_tsi() - Service any pending websocket activity
- *
- * \param context: Websocket context
- * \param timeout_ms: Timeout for poll; 0 means return immediately if nothing needed
- * service otherwise block and service immediately, returning
- * after the timeout if nothing needed service.
- * \param tsi: Thread service index, starting at 0
- *
- * Same as lws_service(), but for a specific thread service index. Only needed
- * if you are spawning multiple service threads.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_service_tsi(struct lws_context *context, int timeout_ms, int tsi);
-
-/**
- * lws_cancel_service_pt() - Cancel servicing of pending socket activity
- * on one thread
- * \param wsi: Cancel service on the thread this wsi is serviced by
- *
- * Same as lws_cancel_service(), but targets a single service thread, the one
- * the wsi belongs to. You probably want to use lws_cancel_service() instead.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_cancel_service_pt(struct lws *wsi);
-
-/**
- * lws_cancel_service() - Cancel wait for new pending socket activity
- * \param context: Websocket context
- *
- * This function creates an immediate "synchronous interrupt" to the lws poll()
- * wait or event loop. As soon as possible in the serialzed service sequencing,
- * a LWS_CALLBACK_EVENT_WAIT_CANCELLED callback is sent to every protocol on
- * every vhost.
- *
- * lws_cancel_service() may be called from another thread while the context
- * exists, and its effect will be immediately serialized.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_cancel_service(struct lws_context *context);
-
-/**
- * lws_service_fd() - Service polled socket with something waiting
- * \param context: Websocket context
- * \param pollfd: The pollfd entry describing the socket fd and which events
- * happened, or NULL to tell lws to do only timeout servicing.
- *
- * This function takes a pollfd that has POLLIN or POLLOUT activity and
- * services it according to the state of the associated
- * struct lws.
- *
- * The one call deals with all "service" that might happen on a socket
- * including listen accepts, http files as well as websocket protocol.
- *
- * If a pollfd says it has something, you can just pass it to
- * lws_service_fd() whether it is a socket handled by lws or not.
- * If it sees it is a lws socket, the traffic will be handled and
- * pollfd->revents will be zeroed now.
- *
- * If the socket is foreign to lws, it leaves revents alone. So you can
- * see if you should service yourself by checking the pollfd revents
- * after letting lws try to service it.
- *
- * You should also call this with pollfd = NULL to just allow the
- * once-per-second global timeout checks; if less than a second since the last
- * check it returns immediately then.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_service_fd(struct lws_context *context, struct lws_pollfd *pollfd);
-
-/**
- * lws_service_fd_tsi() - Service polled socket in specific service thread
- * \param context: Websocket context
- * \param pollfd: The pollfd entry describing the socket fd and which events
- * happened.
- * \param tsi: thread service index
- *
- * Same as lws_service_fd() but used with multiple service threads
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd,
- int tsi);
-
-/**
- * lws_service_adjust_timeout() - Check for any connection needing forced service
- * \param context: Websocket context
- * \param timeout_ms: The original poll timeout value. You can just set this
- * to 1 if you don't really have a poll timeout.
- * \param tsi: thread service index
- *
- * Under some conditions connections may need service even though there is no
- * pending network action on them, this is "forced service". For default
- * poll() and libuv / libev, the library takes care of calling this and
- * dealing with it for you. But for external poll() integration, you need
- * access to the apis.
- *
- * If anybody needs "forced service", returned timeout is zero. In that case,
- * you can call lws_service_tsi() with a timeout of -1 to only service
- * guys who need forced service.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_service_adjust_timeout(struct lws_context *context, int timeout_ms, int tsi);
-
-/* Backwards compatibility */
-#define lws_plat_service_tsi lws_service_tsi
-
-LWS_VISIBLE LWS_EXTERN int
-lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd);
-
-///@}
-
-/*! \defgroup http HTTP
-
- Modules related to handling HTTP
-*/
-//@{
-
-/*! \defgroup httpft HTTP File transfer
- * \ingroup http
-
- APIs for sending local files in response to HTTP requests
-*/
-//@{
-
-/**
- * lws_get_mimetype() - Determine mimetype to use from filename
- *
- * \param file: filename
- * \param m: NULL, or mount context
- *
- * This uses a canned list of known filetypes first, if no match and m is
- * non-NULL, then tries a list of per-mount file suffix to mimtype mappings.
- *
- * Returns either NULL or a pointer to the mimetype matching the file.
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_get_mimetype(const char *file, const struct lws_http_mount *m);
-
-/**
- * lws_serve_http_file() - Send a file back to the client using http
- * \param wsi: Websocket instance (available from user callback)
- * \param file: The file to issue over http
- * \param content_type: The http content type, eg, text/html
- * \param other_headers: NULL or pointer to header string
- * \param other_headers_len: length of the other headers if non-NULL
- *
- * This function is intended to be called from the callback in response
- * to http requests from the client. It allows the callback to issue
- * local files down the http link in a single step.
- *
- * Returning <0 indicates error and the wsi should be closed. Returning
- * >0 indicates the file was completely sent and
- * lws_http_transaction_completed() called on the wsi (and close if != 0)
- * ==0 indicates the file transfer is started and needs more service later,
- * the wsi should be left alone.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_serve_http_file(struct lws *wsi, const char *file, const char *content_type,
- const char *other_headers, int other_headers_len);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_serve_http_file_fragment(struct lws *wsi);
-//@}
-
-
-enum http_status {
- HTTP_STATUS_CONTINUE = 100,
-
- HTTP_STATUS_OK = 200,
- HTTP_STATUS_NO_CONTENT = 204,
- HTTP_STATUS_PARTIAL_CONTENT = 206,
-
- HTTP_STATUS_MOVED_PERMANENTLY = 301,
- HTTP_STATUS_FOUND = 302,
- HTTP_STATUS_SEE_OTHER = 303,
- HTTP_STATUS_NOT_MODIFIED = 304,
-
- HTTP_STATUS_BAD_REQUEST = 400,
- HTTP_STATUS_UNAUTHORIZED,
- HTTP_STATUS_PAYMENT_REQUIRED,
- HTTP_STATUS_FORBIDDEN,
- HTTP_STATUS_NOT_FOUND,
- HTTP_STATUS_METHOD_NOT_ALLOWED,
- HTTP_STATUS_NOT_ACCEPTABLE,
- HTTP_STATUS_PROXY_AUTH_REQUIRED,
- HTTP_STATUS_REQUEST_TIMEOUT,
- HTTP_STATUS_CONFLICT,
- HTTP_STATUS_GONE,
- HTTP_STATUS_LENGTH_REQUIRED,
- HTTP_STATUS_PRECONDITION_FAILED,
- HTTP_STATUS_REQ_ENTITY_TOO_LARGE,
- HTTP_STATUS_REQ_URI_TOO_LONG,
- HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE,
- HTTP_STATUS_REQ_RANGE_NOT_SATISFIABLE,
- HTTP_STATUS_EXPECTATION_FAILED,
-
- HTTP_STATUS_INTERNAL_SERVER_ERROR = 500,
- HTTP_STATUS_NOT_IMPLEMENTED,
- HTTP_STATUS_BAD_GATEWAY,
- HTTP_STATUS_SERVICE_UNAVAILABLE,
- HTTP_STATUS_GATEWAY_TIMEOUT,
- HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED,
-};
-/*! \defgroup html-chunked-substitution HTML Chunked Substitution
- * \ingroup http
- *
- * ##HTML chunked Substitution
- *
- * APIs for receiving chunks of text, replacing a set of variable names via
- * a callback, and then prepending and appending HTML chunked encoding
- * headers.
- */
-//@{
-
-struct lws_process_html_args {
- char *p; /**< pointer to the buffer containing the data */
- int len; /**< length of the original data at p */
- int max_len; /**< maximum length we can grow the data to */
- int final; /**< set if this is the last chunk of the file */
- int chunked; /**< 0 == unchunked, 1 == produce chunk headers (incompatible with HTTP/2) */
-};
-
-typedef const char *(*lws_process_html_state_cb)(void *data, int index);
-
-struct lws_process_html_state {
- char *start; /**< pointer to start of match */
- char swallow[16]; /**< matched character buffer */
- int pos; /**< position in match */
- void *data; /**< opaque pointer */
- const char * const *vars; /**< list of variable names */
- int count_vars; /**< count of variable names */
-
- lws_process_html_state_cb replace; /**< called on match to perform substitution */
-};
-
-/*! lws_chunked_html_process() - generic chunked substitution
- * \param args: buffer to process using chunked encoding
- * \param s: current processing state
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_chunked_html_process(struct lws_process_html_args *args,
- struct lws_process_html_state *s);
-//@}
-
-/** \defgroup HTTP-headers-read HTTP headers: read
- * \ingroup http
- *
- * ##HTTP header releated functions
- *
- * In lws the client http headers are temporarily stored in a pool, only for the
- * duration of the http part of the handshake. It's because in most cases,
- * the header content is ignored for the whole rest of the connection lifetime
- * and would then just be taking up space needlessly.
- *
- * During LWS_CALLBACK_HTTP when the URI path is delivered is the last time
- * the http headers are still allocated, you can use these apis then to
- * look at and copy out interesting header content (cookies, etc)
- *
- * Notice that the header total length reported does not include a terminating
- * '\0', however you must allocate for it when using the _copy apis. So the
- * length reported for a header containing "123" is 3, but you must provide
- * a buffer of length 4 so that "123\0" may be copied into it, or the copy
- * will fail with a nonzero return code.
- *
- * In the special case of URL arguments, like ?x=1&y=2, the arguments are
- * stored in a token named for the method, eg, WSI_TOKEN_GET_URI if it
- * was a GET or WSI_TOKEN_POST_URI if POST. You can check the total
- * length to confirm the method.
- *
- * For URL arguments, each argument is stored urldecoded in a "fragment", so
- * you can use the fragment-aware api lws_hdr_copy_fragment() to access each
- * argument in turn: the fragments contain urldecoded strings like x=1 or y=2.
- *
- * As a convenience, lws has an api that will find the fragment with a
- * given name= part, lws_get_urlarg_by_name().
- */
-///@{
-
-/** struct lws_tokens
- * you need these to look at headers that have been parsed if using the
- * LWS_CALLBACK_FILTER_CONNECTION callback. If a header from the enum
- * list below is absent, .token = NULL and len = 0. Otherwise .token
- * points to .len chars containing that header content.
- */
-struct lws_tokens {
- char *token; /**< pointer to start of the token */
- int len; /**< length of the token's value */
-};
-
-/* enum lws_token_indexes
- * these have to be kept in sync with lextable.h / minilex.c
- *
- * NOTE: These public enums are part of the abi. If you want to add one,
- * add it at where specified so existing users are unaffected.
- */
-enum lws_token_indexes {
- WSI_TOKEN_GET_URI = 0,
- WSI_TOKEN_POST_URI = 1,
- WSI_TOKEN_OPTIONS_URI = 2,
- WSI_TOKEN_HOST = 3,
- WSI_TOKEN_CONNECTION = 4,
- WSI_TOKEN_UPGRADE = 5,
- WSI_TOKEN_ORIGIN = 6,
- WSI_TOKEN_DRAFT = 7,
- WSI_TOKEN_CHALLENGE = 8,
- WSI_TOKEN_EXTENSIONS = 9,
- WSI_TOKEN_KEY1 = 10,
- WSI_TOKEN_KEY2 = 11,
- WSI_TOKEN_PROTOCOL = 12,
- WSI_TOKEN_ACCEPT = 13,
- WSI_TOKEN_NONCE = 14,
- WSI_TOKEN_HTTP = 15,
- WSI_TOKEN_HTTP2_SETTINGS = 16,
- WSI_TOKEN_HTTP_ACCEPT = 17,
- WSI_TOKEN_HTTP_AC_REQUEST_HEADERS = 18,
- WSI_TOKEN_HTTP_IF_MODIFIED_SINCE = 19,
- WSI_TOKEN_HTTP_IF_NONE_MATCH = 20,
- WSI_TOKEN_HTTP_ACCEPT_ENCODING = 21,
- WSI_TOKEN_HTTP_ACCEPT_LANGUAGE = 22,
- WSI_TOKEN_HTTP_PRAGMA = 23,
- WSI_TOKEN_HTTP_CACHE_CONTROL = 24,
- WSI_TOKEN_HTTP_AUTHORIZATION = 25,
- WSI_TOKEN_HTTP_COOKIE = 26,
- WSI_TOKEN_HTTP_CONTENT_LENGTH = 27,
- WSI_TOKEN_HTTP_CONTENT_TYPE = 28,
- WSI_TOKEN_HTTP_DATE = 29,
- WSI_TOKEN_HTTP_RANGE = 30,
- WSI_TOKEN_HTTP_REFERER = 31,
- WSI_TOKEN_KEY = 32,
- WSI_TOKEN_VERSION = 33,
- WSI_TOKEN_SWORIGIN = 34,
-
- WSI_TOKEN_HTTP_COLON_AUTHORITY = 35,
- WSI_TOKEN_HTTP_COLON_METHOD = 36,
- WSI_TOKEN_HTTP_COLON_PATH = 37,
- WSI_TOKEN_HTTP_COLON_SCHEME = 38,
- WSI_TOKEN_HTTP_COLON_STATUS = 39,
-
- WSI_TOKEN_HTTP_ACCEPT_CHARSET = 40,
- WSI_TOKEN_HTTP_ACCEPT_RANGES = 41,
- WSI_TOKEN_HTTP_ACCESS_CONTROL_ALLOW_ORIGIN = 42,
- WSI_TOKEN_HTTP_AGE = 43,
- WSI_TOKEN_HTTP_ALLOW = 44,
- WSI_TOKEN_HTTP_CONTENT_DISPOSITION = 45,
- WSI_TOKEN_HTTP_CONTENT_ENCODING = 46,
- WSI_TOKEN_HTTP_CONTENT_LANGUAGE = 47,
- WSI_TOKEN_HTTP_CONTENT_LOCATION = 48,
- WSI_TOKEN_HTTP_CONTENT_RANGE = 49,
- WSI_TOKEN_HTTP_ETAG = 50,
- WSI_TOKEN_HTTP_EXPECT = 51,
- WSI_TOKEN_HTTP_EXPIRES = 52,
- WSI_TOKEN_HTTP_FROM = 53,
- WSI_TOKEN_HTTP_IF_MATCH = 54,
- WSI_TOKEN_HTTP_IF_RANGE = 55,
- WSI_TOKEN_HTTP_IF_UNMODIFIED_SINCE = 56,
- WSI_TOKEN_HTTP_LAST_MODIFIED = 57,
- WSI_TOKEN_HTTP_LINK = 58,
- WSI_TOKEN_HTTP_LOCATION = 59,
- WSI_TOKEN_HTTP_MAX_FORWARDS = 60,
- WSI_TOKEN_HTTP_PROXY_AUTHENTICATE = 61,
- WSI_TOKEN_HTTP_PROXY_AUTHORIZATION = 62,
- WSI_TOKEN_HTTP_REFRESH = 63,
- WSI_TOKEN_HTTP_RETRY_AFTER = 64,
- WSI_TOKEN_HTTP_SERVER = 65,
- WSI_TOKEN_HTTP_SET_COOKIE = 66,
- WSI_TOKEN_HTTP_STRICT_TRANSPORT_SECURITY = 67,
- WSI_TOKEN_HTTP_TRANSFER_ENCODING = 68,
- WSI_TOKEN_HTTP_USER_AGENT = 69,
- WSI_TOKEN_HTTP_VARY = 70,
- WSI_TOKEN_HTTP_VIA = 71,
- WSI_TOKEN_HTTP_WWW_AUTHENTICATE = 72,
-
- WSI_TOKEN_PATCH_URI = 73,
- WSI_TOKEN_PUT_URI = 74,
- WSI_TOKEN_DELETE_URI = 75,
-
- WSI_TOKEN_HTTP_URI_ARGS = 76,
- WSI_TOKEN_PROXY = 77,
- WSI_TOKEN_HTTP_X_REAL_IP = 78,
- WSI_TOKEN_HTTP1_0 = 79,
- WSI_TOKEN_X_FORWARDED_FOR = 80,
- WSI_TOKEN_CONNECT = 81,
- WSI_TOKEN_HEAD_URI = 82,
- WSI_TOKEN_TE = 83,
- WSI_TOKEN_REPLAY_NONCE = 84,
- WSI_TOKEN_COLON_PROTOCOL = 85,
- WSI_TOKEN_X_AUTH_TOKEN = 86,
-
- /****** add new things just above ---^ ******/
-
- /* use token storage to stash these internally, not for
- * user use */
-
- _WSI_TOKEN_CLIENT_SENT_PROTOCOLS,
- _WSI_TOKEN_CLIENT_PEER_ADDRESS,
- _WSI_TOKEN_CLIENT_URI,
- _WSI_TOKEN_CLIENT_HOST,
- _WSI_TOKEN_CLIENT_ORIGIN,
- _WSI_TOKEN_CLIENT_METHOD,
- _WSI_TOKEN_CLIENT_IFACE,
- _WSI_TOKEN_CLIENT_ALPN,
-
- /* always last real token index*/
- WSI_TOKEN_COUNT,
-
- /* parser state additions, no storage associated */
- WSI_TOKEN_NAME_PART,
- WSI_TOKEN_SKIPPING,
- WSI_TOKEN_SKIPPING_SAW_CR,
- WSI_PARSING_COMPLETE,
- WSI_INIT_TOKEN_MUXURL,
-};
-
-struct lws_token_limits {
- unsigned short token_limit[WSI_TOKEN_COUNT]; /**< max chars for this token */
-};
-
-/**
- * lws_token_to_string() - returns a textual representation of a hdr token index
- *
- * \param token: token index
- */
-LWS_VISIBLE LWS_EXTERN const unsigned char *
-lws_token_to_string(enum lws_token_indexes token);
-
-/**
- * lws_hdr_total_length: report length of all fragments of a header totalled up
- * The returned length does not include the space for a
- * terminating '\0'
- *
- * \param wsi: websocket connection
- * \param h: which header index we are interested in
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_hdr_total_length(struct lws *wsi, enum lws_token_indexes h);
-
-/**
- * lws_hdr_fragment_length: report length of a single fragment of a header
- * The returned length does not include the space for a
- * terminating '\0'
- *
- * \param wsi: websocket connection
- * \param h: which header index we are interested in
- * \param frag_idx: which fragment of h we want to get the length of
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_hdr_fragment_length(struct lws *wsi, enum lws_token_indexes h, int frag_idx);
-
-/**
- * lws_hdr_copy() - copy a single fragment of the given header to a buffer
- * The buffer length len must include space for an additional
- * terminating '\0', or it will fail returning -1.
- *
- * \param wsi: websocket connection
- * \param dest: destination buffer
- * \param len: length of destination buffer
- * \param h: which header index we are interested in
- *
- * copies the whole, aggregated header, even if it was delivered in
- * several actual headers piece by piece
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_hdr_copy(struct lws *wsi, char *dest, int len, enum lws_token_indexes h);
-
-/**
- * lws_hdr_copy_fragment() - copy a single fragment of the given header to a buffer
- * The buffer length len must include space for an additional
- * terminating '\0', or it will fail returning -1.
- * If the requested fragment index is not present, it fails
- * returning -1.
- *
- * \param wsi: websocket connection
- * \param dest: destination buffer
- * \param len: length of destination buffer
- * \param h: which header index we are interested in
- * \param frag_idx: which fragment of h we want to copy
- *
- * Normally this is only useful
- * to parse URI arguments like ?x=1&y=2, token index WSI_TOKEN_HTTP_URI_ARGS
- * fragment 0 will contain "x=1" and fragment 1 "y=2"
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_hdr_copy_fragment(struct lws *wsi, char *dest, int len,
- enum lws_token_indexes h, int frag_idx);
-
-/**
- * lws_get_urlarg_by_name() - return pointer to arg value if present
- * \param wsi: the connection to check
- * \param name: the arg name, like "token="
- * \param buf: the buffer to receive the urlarg (including the name= part)
- * \param len: the length of the buffer to receive the urlarg
- *
- * Returns NULL if not found or a pointer inside buf to just after the
- * name= part.
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_get_urlarg_by_name(struct lws *wsi, const char *name, char *buf, int len);
-///@}
-
-/*! \defgroup HTTP-headers-create HTTP headers: create
- *
- * ## HTTP headers: Create
- *
- * These apis allow you to create HTTP response headers in a way compatible with
- * both HTTP/1.x and HTTP/2.
- *
- * They each append to a buffer taking care about the buffer end, which is
- * passed in as a pointer. When data is written to the buffer, the current
- * position p is updated accordingly.
- *
- * All of these apis are LWS_WARN_UNUSED_RESULT as they can run out of space
- * and fail with nonzero return.
- */
-///@{
-
-#define LWSAHH_CODE_MASK ((1 << 16) - 1)
-#define LWSAHH_FLAG_NO_SERVER_NAME (1 << 30)
-
-/**
- * lws_add_http_header_status() - add the HTTP response status code
- *
- * \param wsi: the connection to check
- * \param code: an HTTP code like 200, 404 etc (see enum http_status)
- * \param p: pointer to current position in buffer pointer
- * \param end: pointer to end of buffer
- *
- * Adds the initial response code, so should be called first.
- *
- * Code may additionally take OR'd flags:
- *
- * LWSAHH_FLAG_NO_SERVER_NAME: don't apply server name header this time
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_add_http_header_status(struct lws *wsi,
- unsigned int code, unsigned char **p,
- unsigned char *end);
-/**
- * lws_add_http_header_by_name() - append named header and value
- *
- * \param wsi: the connection to check
- * \param name: the hdr name, like "my-header"
- * \param value: the value after the = for this header
- * \param length: the length of the value
- * \param p: pointer to current position in buffer pointer
- * \param end: pointer to end of buffer
- *
- * Appends name: value to the headers
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_add_http_header_by_name(struct lws *wsi, const unsigned char *name,
- const unsigned char *value, int length,
- unsigned char **p, unsigned char *end);
-/**
- * lws_add_http_header_by_token() - append given header and value
- *
- * \param wsi: the connection to check
- * \param token: the token index for the hdr
- * \param value: the value after the = for this header
- * \param length: the length of the value
- * \param p: pointer to current position in buffer pointer
- * \param end: pointer to end of buffer
- *
- * Appends name=value to the headers, but is able to take advantage of better
- * HTTP/2 coding mechanisms where possible.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_add_http_header_by_token(struct lws *wsi, enum lws_token_indexes token,
- const unsigned char *value, int length,
- unsigned char **p, unsigned char *end);
-/**
- * lws_add_http_header_content_length() - append content-length helper
- *
- * \param wsi: the connection to check
- * \param content_length: the content length to use
- * \param p: pointer to current position in buffer pointer
- * \param end: pointer to end of buffer
- *
- * Appends content-length: content_length to the headers
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_add_http_header_content_length(struct lws *wsi,
- lws_filepos_t content_length,
- unsigned char **p, unsigned char *end);
-/**
- * lws_finalize_http_header() - terminate header block
- *
- * \param wsi: the connection to check
- * \param p: pointer to current position in buffer pointer
- * \param end: pointer to end of buffer
- *
- * Indicates no more headers will be added
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_finalize_http_header(struct lws *wsi, unsigned char **p,
- unsigned char *end);
-
-/**
- * lws_finalize_write_http_header() - Helper finializing and writing http headers
- *
- * \param wsi: the connection to check
- * \param start: pointer to the start of headers in the buffer, eg &buf[LWS_PRE]
- * \param p: pointer to current position in buffer pointer
- * \param end: pointer to end of buffer
- *
- * Terminates the headers correctly accoring to the protocol in use (h1 / h2)
- * and writes the headers. Returns nonzero for error.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_finalize_write_http_header(struct lws *wsi, unsigned char *start,
- unsigned char **p, unsigned char *end);
-
-#define LWS_ILLEGAL_HTTP_CONTENT_LEN ((lws_filepos_t)-1ll)
-
-/**
- * lws_add_http_common_headers() - Helper preparing common http headers
- *
- * \param wsi: the connection to check
- * \param code: an HTTP code like 200, 404 etc (see enum http_status)
- * \param content_type: the content type, like "text/html"
- * \param content_len: the content length, in bytes
- * \param p: pointer to current position in buffer pointer
- * \param end: pointer to end of buffer
- *
- * Adds the initial response code, so should be called first.
- *
- * Code may additionally take OR'd flags:
- *
- * LWSAHH_FLAG_NO_SERVER_NAME: don't apply server name header this time
- *
- * This helper just calls public apis to simplify adding headers that are
- * commonly needed. If it doesn't fit your case, or you want to add additional
- * headers just call the public apis directly yourself for what you want.
- *
- * You can miss out the content length header by providing the constant
- * LWS_ILLEGAL_HTTP_CONTENT_LEN for the content_len.
- *
- * It does not call lws_finalize_http_header(), to allow you to add further
- * headers after calling this. You will need to call that yourself at the end.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_add_http_common_headers(struct lws *wsi, unsigned int code,
- const char *content_type, lws_filepos_t content_len,
- unsigned char **p, unsigned char *end);
-///@}
-
-/** \defgroup form-parsing Form Parsing
- * \ingroup http
- * ##POSTed form parsing functions
- *
- * These lws_spa (stateful post arguments) apis let you parse and urldecode
- * POSTed form arguments, both using simple urlencoded and multipart transfer
- * encoding.
- *
- * It's capable of handling file uploads as well a named input parsing,
- * and the apis are the same for both form upload styles.
- *
- * You feed it a list of parameter names and it creates pointers to the
- * urldecoded arguments: file upload parameters pass the file data in chunks to
- * a user-supplied callback as they come.
- *
- * Since it's stateful, it handles the incoming data needing more than one
- * POST_BODY callback and has no limit on uploaded file size.
- */
-///@{
-
-/** enum lws_spa_fileupload_states */
-enum lws_spa_fileupload_states {
- LWS_UFS_CONTENT,
- /**< a chunk of file content has arrived */
- LWS_UFS_FINAL_CONTENT,
- /**< the last chunk (possibly zero length) of file content has arrived */
- LWS_UFS_OPEN
- /**< a new file is starting to arrive */
-};
-
-/**
- * lws_spa_fileupload_cb() - callback to receive file upload data
- *
- * \param data: opt_data pointer set in lws_spa_create
- * \param name: name of the form field being uploaded
- * \param filename: original filename from client
- * \param buf: start of data to receive
- * \param len: length of data to receive
- * \param state: information about how this call relates to file
- *
- * Notice name and filename shouldn't be trusted, as they are passed from
- * HTTP provided by the client.
- */
-typedef int (*lws_spa_fileupload_cb)(void *data, const char *name,
- const char *filename, char *buf, int len,
- enum lws_spa_fileupload_states state);
-
-/** struct lws_spa - opaque urldecode parser capable of handling multipart
- * and file uploads */
-struct lws_spa;
-
-/**
- * lws_spa_create() - create urldecode parser
- *
- * \param wsi: lws connection (used to find Content Type)
- * \param param_names: array of form parameter names, like "username"
- * \param count_params: count of param_names
- * \param max_storage: total amount of form parameter values we can store
- * \param opt_cb: NULL, or callback to receive file upload data.
- * \param opt_data: NULL, or user pointer provided to opt_cb.
- *
- * Creates a urldecode parser and initializes it.
- *
- * opt_cb can be NULL if you just want normal name=value parsing, however
- * if one or more entries in your form are bulk data (file transfer), you
- * can provide this callback and filter on the name callback parameter to
- * treat that urldecoded data separately. The callback should return -1
- * in case of fatal error, and 0 if OK.
- */
-LWS_VISIBLE LWS_EXTERN struct lws_spa *
-lws_spa_create(struct lws *wsi, const char * const *param_names,
- int count_params, int max_storage, lws_spa_fileupload_cb opt_cb,
- void *opt_data);
-
-/**
- * lws_spa_process() - parses a chunk of input data
- *
- * \param spa: the parser object previously created
- * \param in: incoming, urlencoded data
- * \param len: count of bytes valid at \param in
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_spa_process(struct lws_spa *spa, const char *in, int len);
-
-/**
- * lws_spa_finalize() - indicate incoming data completed
- *
- * \param spa: the parser object previously created
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_spa_finalize(struct lws_spa *spa);
-
-/**
- * lws_spa_get_length() - return length of parameter value
- *
- * \param spa: the parser object previously created
- * \param n: parameter ordinal to return length of value for
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_spa_get_length(struct lws_spa *spa, int n);
-
-/**
- * lws_spa_get_string() - return pointer to parameter value
- * \param spa: the parser object previously created
- * \param n: parameter ordinal to return pointer to value for
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_spa_get_string(struct lws_spa *spa, int n);
-
-/**
- * lws_spa_destroy() - destroy parser object
- *
- * \param spa: the parser object previously created
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_spa_destroy(struct lws_spa *spa);
-///@}
-
-/*! \defgroup urlendec Urlencode and Urldecode
- * \ingroup http
- *
- * ##HTML chunked Substitution
- *
- * APIs for receiving chunks of text, replacing a set of variable names via
- * a callback, and then prepending and appending HTML chunked encoding
- * headers.
- */
-//@{
-
-/**
- * lws_urlencode() - like strncpy but with urlencoding
- *
- * \param escaped: output buffer
- * \param string: input buffer ('/0' terminated)
- * \param len: output buffer max length
- *
- * Because urlencoding expands the output string, it's not
- * possible to do it in-place, ie, with escaped == string
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_urlencode(char *escaped, const char *string, int len);
-
-/*
- * URLDECODE 1 / 2
- *
- * This simple urldecode only operates until the first '\0' and requires the
- * data to exist all at once
- */
-/**
- * lws_urldecode() - like strncpy but with urldecoding
- *
- * \param string: output buffer
- * \param escaped: input buffer ('\0' terminated)
- * \param len: output buffer max length
- *
- * This is only useful for '\0' terminated strings
- *
- * Since urldecoding only shrinks the output string, it is possible to
- * do it in-place, ie, string == escaped
- *
- * Returns 0 if completed OK or nonzero for urldecode violation (non-hex chars
- * where hex required, etc)
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_urldecode(char *string, const char *escaped, int len);
-///@}
-/**
- * lws_return_http_status() - Return simple http status
- * \param wsi: Websocket instance (available from user callback)
- * \param code: Status index, eg, 404
- * \param html_body: User-readable HTML description < 1KB, or NULL
- *
- * Helper to report HTTP errors back to the client cleanly and
- * consistently
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_return_http_status(struct lws *wsi, unsigned int code,
- const char *html_body);
-
-/**
- * lws_http_redirect() - write http redirect out on wsi
- *
- * \param wsi: websocket connection
- * \param code: HTTP response code (eg, 301)
- * \param loc: where to redirect to
- * \param len: length of loc
- * \param p: pointer current position in buffer (updated as we write)
- * \param end: pointer to end of buffer
- *
- * Returns amount written, or < 0 indicating fatal write failure.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_http_redirect(struct lws *wsi, int code, const unsigned char *loc, int len,
- unsigned char **p, unsigned char *end);
-
-/**
- * lws_http_transaction_completed() - wait for new http transaction or close
- * \param wsi: websocket connection
- *
- * Returns 1 if the HTTP connection must close now
- * Returns 0 and resets connection to wait for new HTTP header /
- * transaction if possible
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_http_transaction_completed(struct lws *wsi);
-///@}
-
-/*! \defgroup pur Sanitize / purify SQL and JSON helpers
- *
- * ##Sanitize / purify SQL and JSON helpers
- *
- * APIs for escaping untrusted JSON and SQL safely before use
- */
-//@{
-
-/**
- * lws_sql_purify() - like strncpy but with escaping for sql quotes
- *
- * \param escaped: output buffer
- * \param string: input buffer ('/0' terminated)
- * \param len: output buffer max length
- *
- * Because escaping expands the output string, it's not
- * possible to do it in-place, ie, with escaped == string
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_sql_purify(char *escaped, const char *string, int len);
-
-/**
- * lws_json_purify() - like strncpy but with escaping for json chars
- *
- * \param escaped: output buffer
- * \param string: input buffer ('/0' terminated)
- * \param len: output buffer max length
- *
- * Because escaping expands the output string, it's not
- * possible to do it in-place, ie, with escaped == string
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_json_purify(char *escaped, const char *string, int len);
-
-/**
- * lws_filename_purify_inplace() - replace scary filename chars with underscore
- *
- * \param filename: filename to be purified
- *
- * Replace scary characters in the filename (it should not be a path)
- * with underscore, so it's safe to use.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_filename_purify_inplace(char *filename);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_plat_write_cert(struct lws_vhost *vhost, int is_key, int fd, void *buf,
- int len);
-LWS_VISIBLE LWS_EXTERN int
-lws_plat_write_file(const char *filename, void *buf, int len);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_plat_read_file(const char *filename, void *buf, int len);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_plat_recommended_rsa_bits(void);
-///@}
-
-/*! \defgroup uv libuv helpers
- *
- * ##libuv helpers
- *
- * APIs specific to libuv event loop itegration
- */
-///@{
-#ifdef LWS_WITH_LIBUV
-/*
- * Any direct libuv allocations in lws protocol handlers must participate in the
- * lws reference counting scheme. Two apis are provided:
- *
- * - lws_libuv_static_refcount_add(handle, context) to mark the handle with
- * a pointer to the context and increment the global uv object counter
- *
- * - lws_libuv_static_refcount_del() which should be used as the close callback
- * for your own libuv objects declared in the protocol scope.
- *
- * Using the apis allows lws to detach itself from a libuv loop completely
- * cleanly and at the moment all of its libuv objects have completed close.
- */
-
-LWS_VISIBLE LWS_EXTERN uv_loop_t *
-lws_uv_getloop(struct lws_context *context, int tsi);
-
-LWS_VISIBLE LWS_EXTERN void
-lws_libuv_static_refcount_add(uv_handle_t *, struct lws_context *context);
-
-LWS_VISIBLE LWS_EXTERN void
-lws_libuv_static_refcount_del(uv_handle_t *);
-
-#endif /* LWS_WITH_LIBUV */
-
-#if defined(LWS_WITH_ESP32)
-#define lws_libuv_static_refcount_add(_a, _b)
-#define lws_libuv_static_refcount_del NULL
-#endif
-///@}
-
-
-/*! \defgroup timeout Connection timeouts
-
- APIs related to setting connection timeouts
-*/
-//@{
-
-/*
- * NOTE: These public enums are part of the abi. If you want to add one,
- * add it at where specified so existing users are unaffected.
- */
-enum pending_timeout {
- NO_PENDING_TIMEOUT = 0,
- PENDING_TIMEOUT_AWAITING_PROXY_RESPONSE = 1,
- PENDING_TIMEOUT_AWAITING_CONNECT_RESPONSE = 2,
- PENDING_TIMEOUT_ESTABLISH_WITH_SERVER = 3,
- PENDING_TIMEOUT_AWAITING_SERVER_RESPONSE = 4,
- PENDING_TIMEOUT_AWAITING_PING = 5,
- PENDING_TIMEOUT_CLOSE_ACK = 6,
- PENDING_TIMEOUT_UNUSED1 = 7,
- PENDING_TIMEOUT_SENT_CLIENT_HANDSHAKE = 8,
- PENDING_TIMEOUT_SSL_ACCEPT = 9,
- PENDING_TIMEOUT_HTTP_CONTENT = 10,
- PENDING_TIMEOUT_AWAITING_CLIENT_HS_SEND = 11,
- PENDING_FLUSH_STORED_SEND_BEFORE_CLOSE = 12,
- PENDING_TIMEOUT_SHUTDOWN_FLUSH = 13,
- PENDING_TIMEOUT_CGI = 14,
- PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE = 15,
- PENDING_TIMEOUT_WS_PONG_CHECK_SEND_PING = 16,
- PENDING_TIMEOUT_WS_PONG_CHECK_GET_PONG = 17,
- PENDING_TIMEOUT_CLIENT_ISSUE_PAYLOAD = 18,
- PENDING_TIMEOUT_AWAITING_SOCKS_GREETING_REPLY = 19,
- PENDING_TIMEOUT_AWAITING_SOCKS_CONNECT_REPLY = 20,
- PENDING_TIMEOUT_AWAITING_SOCKS_AUTH_REPLY = 21,
- PENDING_TIMEOUT_KILLED_BY_SSL_INFO = 22,
- PENDING_TIMEOUT_KILLED_BY_PARENT = 23,
- PENDING_TIMEOUT_CLOSE_SEND = 24,
- PENDING_TIMEOUT_HOLDING_AH = 25,
- PENDING_TIMEOUT_UDP_IDLE = 26,
- PENDING_TIMEOUT_CLIENT_CONN_IDLE = 27,
- PENDING_TIMEOUT_LAGGING = 28,
-
- /****** add new things just above ---^ ******/
-
- PENDING_TIMEOUT_USER_REASON_BASE = 1000
-};
-
-#define LWS_TO_KILL_ASYNC -1
-/**< If LWS_TO_KILL_ASYNC is given as the timeout sec in a lws_set_timeout()
- * call, then the connection is marked to be killed at the next timeout
- * check. This is how you should force-close the wsi being serviced if
- * you are doing it outside the callback (where you should close by nonzero
- * return).
- */
-#define LWS_TO_KILL_SYNC -2
-/**< If LWS_TO_KILL_SYNC is given as the timeout sec in a lws_set_timeout()
- * call, then the connection is closed before returning (which may delete
- * the wsi). This should only be used where the wsi being closed is not the
- * wsi currently being serviced.
- */
-/**
- * lws_set_timeout() - marks the wsi as subject to a timeout
- *
- * You will not need this unless you are doing something special
- *
- * \param wsi: Websocket connection instance
- * \param reason: timeout reason
- * \param secs: how many seconds. You may set to LWS_TO_KILL_ASYNC to
- * force the connection to timeout at the next opportunity, or
- * LWS_TO_KILL_SYNC to close it synchronously if you know the
- * wsi is not the one currently being serviced.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_set_timeout(struct lws *wsi, enum pending_timeout reason, int secs);
-
-#define LWS_SET_TIMER_USEC_CANCEL ((lws_usec_t)-1ll)
-#define LWS_USEC_PER_SEC (1000000ll)
-
-/**
- * lws_set_timer_usecs() - schedules a callback on the wsi in the future
- *
- * \param wsi: Websocket connection instance
- * \param usecs: LWS_SET_TIMER_USEC_CANCEL removes any existing scheduled
- * callback, otherwise number of microseconds in the future
- * the callback will occur at.
- *
- * NOTE: event loop support for this:
- *
- * default poll() loop: yes
- * libuv event loop: yes
- * libev: not implemented (patch welcome)
- * libevent: not implemented (patch welcome)
- *
- * After the deadline expires, the wsi will get a callback of type
- * LWS_CALLBACK_TIMER and the timer is exhausted. The deadline may be
- * continuously deferred by further calls to lws_set_timer_usecs() with a later
- * deadline, or cancelled by lws_set_timer_usecs(wsi, -1).
- *
- * If the timer should repeat, lws_set_timer_usecs() must be called again from
- * LWS_CALLBACK_TIMER.
- *
- * Accuracy depends on the platform and the load on the event loop or system...
- * all that's guaranteed is the callback will come after the requested wait
- * period.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_set_timer_usecs(struct lws *wsi, lws_usec_t usecs);
-
-/*
- * lws_timed_callback_vh_protocol() - calls back a protocol on a vhost after
- * the specified delay
- *
- * \param vh: the vhost to call back
- * \param protocol: the protocol to call back
- * \param reason: callback reason
- * \param secs: how many seconds in the future to do the callback. Set to
- * -1 to cancel the timer callback.
- *
- * Callback the specified protocol with a fake wsi pointing to the specified
- * vhost and protocol, with the specified reason, at the specified time in the
- * future.
- *
- * Returns 0 if OK.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_timed_callback_vh_protocol(struct lws_vhost *vh,
- const struct lws_protocols *prot,
- int reason, int secs);
-///@}
-
-/*! \defgroup sending-data Sending data
-
- APIs related to writing data on a connection
-*/
-//@{
-#if !defined(LWS_SIZEOFPTR)
-#define LWS_SIZEOFPTR ((int)sizeof (void *))
-#endif
-
-#if defined(__x86_64__)
-#define _LWS_PAD_SIZE 16 /* Intel recommended for best performance */
-#else
-#define _LWS_PAD_SIZE LWS_SIZEOFPTR /* Size of a pointer on the target arch */
-#endif
-#define _LWS_PAD(n) (((n) % _LWS_PAD_SIZE) ? \
- ((n) + (_LWS_PAD_SIZE - ((n) % _LWS_PAD_SIZE))) : (n))
-/* last 2 is for lws-meta */
-#define LWS_PRE _LWS_PAD(4 + 10 + 2)
-/* used prior to 1.7 and retained for backward compatibility */
-#define LWS_SEND_BUFFER_PRE_PADDING LWS_PRE
-#define LWS_SEND_BUFFER_POST_PADDING 0
-
-#define LWS_WRITE_RAW LWS_WRITE_HTTP
-
-/*
- * NOTE: These public enums are part of the abi. If you want to add one,
- * add it at where specified so existing users are unaffected.
- */
-enum lws_write_protocol {
- LWS_WRITE_TEXT = 0,
- /**< Send a ws TEXT message,the pointer must have LWS_PRE valid
- * memory behind it. The receiver expects only valid utf-8 in the
- * payload */
- LWS_WRITE_BINARY = 1,
- /**< Send a ws BINARY message, the pointer must have LWS_PRE valid
- * memory behind it. Any sequence of bytes is valid */
- LWS_WRITE_CONTINUATION = 2,
- /**< Continue a previous ws message, the pointer must have LWS_PRE valid
- * memory behind it */
- LWS_WRITE_HTTP = 3,
- /**< Send HTTP content */
-
- /* LWS_WRITE_CLOSE is handled by lws_close_reason() */
- LWS_WRITE_PING = 5,
- LWS_WRITE_PONG = 6,
-
- /* Same as write_http but we know this write ends the transaction */
- LWS_WRITE_HTTP_FINAL = 7,
-
- /* HTTP2 */
-
- LWS_WRITE_HTTP_HEADERS = 8,
- /**< Send http headers (http2 encodes this payload and LWS_WRITE_HTTP
- * payload differently, http 1.x links also handle this correctly. so
- * to be compatible with both in the future,header response part should
- * be sent using this regardless of http version expected)
- */
- LWS_WRITE_HTTP_HEADERS_CONTINUATION = 9,
- /**< Continuation of http/2 headers
- */
-
- /****** add new things just above ---^ ******/
-
- /* flags */
-
- LWS_WRITE_NO_FIN = 0x40,
- /**< This part of the message is not the end of the message */
-
- LWS_WRITE_H2_STREAM_END = 0x80,
- /**< Flag indicates this packet should go out with STREAM_END if h2
- * STREAM_END is allowed on DATA or HEADERS.
- */
-
- LWS_WRITE_CLIENT_IGNORE_XOR_MASK = 0x80
- /**< client packet payload goes out on wire unmunged
- * only useful for security tests since normal servers cannot
- * decode the content if used */
-};
-
-/* used with LWS_CALLBACK_CHILD_WRITE_VIA_PARENT */
-
-struct lws_write_passthru {
- struct lws *wsi;
- unsigned char *buf;
- size_t len;
- enum lws_write_protocol wp;
-};
-
-
-/**
- * lws_write() - Apply protocol then write data to client
- * \param wsi: Websocket instance (available from user callback)
- * \param buf: The data to send. For data being sent on a websocket
- * connection (ie, not default http), this buffer MUST have
- * LWS_PRE bytes valid BEFORE the pointer.
- * This is so the protocol header data can be added in-situ.
- * \param len: Count of the data bytes in the payload starting from buf
- * \param protocol: Use LWS_WRITE_HTTP to reply to an http connection, and one
- * of LWS_WRITE_BINARY or LWS_WRITE_TEXT to send appropriate
- * data on a websockets connection. Remember to allow the extra
- * bytes before and after buf if LWS_WRITE_BINARY or LWS_WRITE_TEXT
- * are used.
- *
- * This function provides the way to issue data back to the client
- * for both http and websocket protocols.
- *
- * IMPORTANT NOTICE!
- *
- * When sending with websocket protocol
- *
- * LWS_WRITE_TEXT,
- * LWS_WRITE_BINARY,
- * LWS_WRITE_CONTINUATION,
- * LWS_WRITE_PING,
- * LWS_WRITE_PONG
- *
- * the send buffer has to have LWS_PRE bytes valid BEFORE
- * the buffer pointer you pass to lws_write().
- *
- * This allows us to add protocol info before and after the data, and send as
- * one packet on the network without payload copying, for maximum efficiency.
- *
- * So for example you need this kind of code to use lws_write with a
- * 128-byte payload
- *
- * char buf[LWS_PRE + 128];
- *
- * // fill your part of the buffer... for example here it's all zeros
- * memset(&buf[LWS_PRE], 0, 128);
- *
- * lws_write(wsi, &buf[LWS_PRE], 128, LWS_WRITE_TEXT);
- *
- * When sending HTTP, with
- *
- * LWS_WRITE_HTTP,
- * LWS_WRITE_HTTP_HEADERS
- * LWS_WRITE_HTTP_FINAL
- *
- * there is no protocol data prepended, and don't need to take care about the
- * LWS_PRE bytes valid before the buffer pointer.
- *
- * LWS_PRE is at least the frame nonce + 2 header + 8 length
- * LWS_SEND_BUFFER_POST_PADDING is deprecated, it's now 0 and can be left off.
- * The example apps no longer use it.
- *
- * Pad LWS_PRE to the CPU word size, so that word references
- * to the address immediately after the padding won't cause an unaligned access
- * error. Sometimes for performance reasons the recommended padding is even
- * larger than sizeof(void *).
- *
- * In the case of sending using websocket protocol, be sure to allocate
- * valid storage before and after buf as explained above. This scheme
- * allows maximum efficiency of sending data and protocol in a single
- * packet while not burdening the user code with any protocol knowledge.
- *
- * Return may be -1 for a fatal error needing connection close, or the
- * number of bytes sent.
- *
- * Truncated Writes
- * ================
- *
- * The OS may not accept everything you asked to write on the connection.
- *
- * Posix defines POLLOUT indication from poll() to show that the connection
- * will accept more write data, but it doesn't specifiy how much. It may just
- * accept one byte of whatever you wanted to send.
- *
- * LWS will buffer the remainder automatically, and send it out autonomously.
- *
- * During that time, WRITABLE callbacks will be suppressed.
- *
- * This is to handle corner cases where unexpectedly the OS refuses what we
- * usually expect it to accept. You should try to send in chunks that are
- * almost always accepted in order to avoid the inefficiency of the buffering.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_write(struct lws *wsi, unsigned char *buf, size_t len,
- enum lws_write_protocol protocol);
-
-/* helper for case where buffer may be const */
-#define lws_write_http(wsi, buf, len) \
- lws_write(wsi, (unsigned char *)(buf), len, LWS_WRITE_HTTP)
-
-/* helper for multi-frame ws message flags */
-static LWS_INLINE int
-lws_write_ws_flags(int initial, int is_start, int is_end)
-{
- int r;
-
- if (is_start)
- r = initial;
- else
- r = LWS_WRITE_CONTINUATION;
-
- if (!is_end)
- r |= LWS_WRITE_NO_FIN;
-
- return r;
-}
-///@}
-
-/** \defgroup callback-when-writeable Callback when writeable
- *
- * ##Callback When Writeable
- *
- * lws can only write data on a connection when it is able to accept more
- * data without blocking.
- *
- * So a basic requirement is we should only use the lws_write() apis when the
- * connection we want to write on says that he can accept more data.
- *
- * When lws cannot complete your send at the time, it will buffer the data
- * and send it in the background, suppressing any further WRITEABLE callbacks
- * on that connection until it completes. So it is important to write new
- * things in a new writeable callback.
- *
- * These apis reflect the various ways we can indicate we would like to be
- * called back when one or more connections is writeable.
- */
-///@{
-
-/**
- * lws_callback_on_writable() - Request a callback when this socket
- * becomes able to be written to without
- * blocking
- *
- * \param wsi: Websocket connection instance to get callback for
- *
- * - Which: only this wsi
- * - When: when the individual connection becomes writeable
- * - What: LWS_CALLBACK_*_WRITEABLE
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_on_writable(struct lws *wsi);
-
-/**
- * lws_callback_on_writable_all_protocol() - Request a callback for all
- * connections using the given protocol when it
- * becomes possible to write to each socket without
- * blocking in turn.
- *
- * \param context: lws_context
- * \param protocol: Protocol whose connections will get callbacks
- *
- * - Which: connections using this protocol on ANY VHOST
- * - When: when the individual connection becomes writeable
- * - What: LWS_CALLBACK_*_WRITEABLE
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_on_writable_all_protocol(const struct lws_context *context,
- const struct lws_protocols *protocol);
-
-/**
- * lws_callback_on_writable_all_protocol_vhost() - Request a callback for
- * all connections on same vhost using the given protocol
- * when it becomes possible to write to each socket without
- * blocking in turn.
- *
- * \param vhost: Only consider connections on this lws_vhost
- * \param protocol: Protocol whose connections will get callbacks
- *
- * - Which: connections using this protocol on GIVEN VHOST ONLY
- * - When: when the individual connection becomes writeable
- * - What: LWS_CALLBACK_*_WRITEABLE
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_on_writable_all_protocol_vhost(const struct lws_vhost *vhost,
- const struct lws_protocols *protocol);
-
-/**
- * lws_callback_all_protocol() - Callback all connections using
- * the given protocol with the given reason
- *
- * \param context: lws_context
- * \param protocol: Protocol whose connections will get callbacks
- * \param reason: Callback reason index
- *
- * - Which: connections using this protocol on ALL VHOSTS
- * - When: before returning
- * - What: reason
- *
- * This isn't normally what you want... normally any update of connection-
- * specific information can wait until a network-related callback like rx,
- * writable, or close.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_all_protocol(struct lws_context *context,
- const struct lws_protocols *protocol, int reason);
-
-/**
- * lws_callback_all_protocol_vhost() - Callback all connections using
- * the given protocol with the given reason. This is
- * deprecated since v2.4: use lws_callback_all_protocol_vhost_args
- *
- * \param vh: Vhost whose connections will get callbacks
- * \param protocol: Which protocol to match. NULL means all.
- * \param reason: Callback reason index
- *
- * - Which: connections using this protocol on GIVEN VHOST ONLY
- * - When: now
- * - What: reason
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_all_protocol_vhost(struct lws_vhost *vh,
- const struct lws_protocols *protocol, int reason)
-LWS_WARN_DEPRECATED;
-
-/**
- * lws_callback_all_protocol_vhost_args() - Callback all connections using
- * the given protocol with the given reason and args
- *
- * \param vh: Vhost whose connections will get callbacks
- * \param protocol: Which protocol to match. NULL means all.
- * \param reason: Callback reason index
- * \param argp: Callback "in" parameter
- * \param len: Callback "len" parameter
- *
- * - Which: connections using this protocol on GIVEN VHOST ONLY
- * - When: now
- * - What: reason
- */
-LWS_VISIBLE int
-lws_callback_all_protocol_vhost_args(struct lws_vhost *vh,
- const struct lws_protocols *protocol, int reason,
- void *argp, size_t len);
-
-/**
- * lws_callback_vhost_protocols() - Callback all protocols enabled on a vhost
- * with the given reason
- *
- * \param wsi: wsi whose vhost will get callbacks
- * \param reason: Callback reason index
- * \param in: in argument to callback
- * \param len: len argument to callback
- *
- * - Which: connections using this protocol on same VHOST as wsi ONLY
- * - When: now
- * - What: reason
- *
- * This is deprecated since v2.5, use lws_callback_vhost_protocols_vhost()
- * which takes the pointer to the vhost directly without using or needing the
- * wsi.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_vhost_protocols(struct lws *wsi, int reason, void *in, int len)
-LWS_WARN_DEPRECATED;
-
-/**
- * lws_callback_vhost_protocols_vhost() - Callback all protocols enabled on a vhost
- * with the given reason
- *
- * \param vh: vhost that will get callbacks
- * \param reason: Callback reason index
- * \param in: in argument to callback
- * \param len: len argument to callback
- *
- * - Which: connections using this protocol on same VHOST as wsi ONLY
- * - When: now
- * - What: reason
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_vhost_protocols_vhost(struct lws_vhost *vh, int reason, void *in,
- size_t len);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
- void *user, void *in, size_t len);
-
-/**
- * lws_get_socket_fd() - returns the socket file descriptor
- *
- * This is needed to use sendto() on UDP raw sockets
- *
- * \param wsi: Websocket connection instance
- */
-LWS_VISIBLE LWS_EXTERN lws_sockfd_type
-lws_get_socket_fd(struct lws *wsi);
-
-/**
- * lws_get_peer_write_allowance() - get the amount of data writeable to peer
- * if known
- *
- * \param wsi: Websocket connection instance
- *
- * if the protocol does not have any guidance, returns -1. Currently only
- * http2 connections get send window information from this API. But your code
- * should use it so it can work properly with any protocol.
- *
- * If nonzero return is the amount of payload data the peer or intermediary has
- * reported it has buffer space for. That has NO relationship with the amount
- * of buffer space your OS can accept on this connection for a write action.
- *
- * This number represents the maximum you could send to the peer or intermediary
- * on this connection right now without the protocol complaining.
- *
- * lws manages accounting for send window updates and payload writes
- * automatically, so this number reflects the situation at the peer or
- * intermediary dynamically.
- */
-LWS_VISIBLE LWS_EXTERN lws_fileofs_t
-lws_get_peer_write_allowance(struct lws *wsi);
-///@}
-
-enum {
- /*
- * Flags for enable and disable rxflow with reason bitmap and with
- * backwards-compatible single bool
- */
- LWS_RXFLOW_REASON_USER_BOOL = (1 << 0),
- LWS_RXFLOW_REASON_HTTP_RXBUFFER = (1 << 6),
- LWS_RXFLOW_REASON_H2_PPS_PENDING = (1 << 7),
-
- LWS_RXFLOW_REASON_APPLIES = (1 << 14),
- LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT = (1 << 13),
- LWS_RXFLOW_REASON_APPLIES_ENABLE = LWS_RXFLOW_REASON_APPLIES |
- LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT,
- LWS_RXFLOW_REASON_APPLIES_DISABLE = LWS_RXFLOW_REASON_APPLIES,
- LWS_RXFLOW_REASON_FLAG_PROCESS_NOW = (1 << 12),
-
-};
-
-/**
- * lws_rx_flow_control() - Enable and disable socket servicing for
- * received packets.
- *
- * If the output side of a server process becomes choked, this allows flow
- * control for the input side.
- *
- * \param wsi: Websocket connection instance to get callback for
- * \param enable: 0 = disable read servicing for this connection, 1 = enable
- *
- * If you need more than one additive reason for rxflow control, you can give
- * iLWS_RXFLOW_REASON_APPLIES_ENABLE or _DISABLE together with one or more of
- * b5..b0 set to idicate which bits to enable or disable. If any bits are
- * enabled, rx on the connection is suppressed.
- *
- * LWS_RXFLOW_REASON_FLAG_PROCESS_NOW flag may also be given to force any change
- * in rxflowbstatus to benapplied immediately, this should be used when you are
- * changing a wsi flow control state from outside a callback on that wsi.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_rx_flow_control(struct lws *wsi, int enable);
-
-/**
- * lws_rx_flow_allow_all_protocol() - Allow all connections with this protocol to receive
- *
- * When the user server code realizes it can accept more input, it can
- * call this to have the RX flow restriction removed from all connections using
- * the given protocol.
- * \param context: lws_context
- * \param protocol: all connections using this protocol will be allowed to receive
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_rx_flow_allow_all_protocol(const struct lws_context *context,
- const struct lws_protocols *protocol);
-
-/**
- * lws_remaining_packet_payload() - Bytes to come before "overall"
- * rx fragment is complete
- * \param wsi: Websocket instance (available from user callback)
- *
- * This tracks how many bytes are left in the current ws fragment, according
- * to the ws length given in the fragment header.
- *
- * If the message was in a single fragment, and there is no compression, this
- * is the same as "how much data is left to read for this message".
- *
- * However, if the message is being sent in multiple fragments, this will
- * reflect the unread amount of the current **fragment**, not the message. With
- * ws, it is legal to not know the length of the message before it completes.
- *
- * Additionally if the message is sent via the negotiated permessage-deflate
- * extension, this number only tells the amount of **compressed** data left to
- * be read, since that is the only information available at the ws layer.
- */
-LWS_VISIBLE LWS_EXTERN size_t
-lws_remaining_packet_payload(struct lws *wsi);
-
-
-/** \defgroup sock-adopt Socket adoption helpers
- * ##Socket adoption helpers
- *
- * When integrating with an external app with its own event loop, these can
- * be used to accept connections from someone else's listening socket.
- *
- * When using lws own event loop, these are not needed.
- */
-///@{
-
-/**
- * lws_adopt_socket() - adopt foreign socket as if listen socket accepted it
- * for the default vhost of context.
- *
- * \param context: lws context
- * \param accept_fd: fd of already-accepted socket to adopt
- *
- * Either returns new wsi bound to accept_fd, or closes accept_fd and
- * returns NULL, having cleaned up any new wsi pieces.
- *
- * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
- * to ws or just serve http.
- */
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_adopt_socket(struct lws_context *context, lws_sockfd_type accept_fd);
-/**
- * lws_adopt_socket_vhost() - adopt foreign socket as if listen socket accepted it
- * for vhost
- *
- * \param vh: lws vhost
- * \param accept_fd: fd of already-accepted socket to adopt
- *
- * Either returns new wsi bound to accept_fd, or closes accept_fd and
- * returns NULL, having cleaned up any new wsi pieces.
- *
- * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
- * to ws or just serve http.
- */
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_adopt_socket_vhost(struct lws_vhost *vh, lws_sockfd_type accept_fd);
-
-typedef enum {
- LWS_ADOPT_RAW_FILE_DESC = 0, /* convenience constant */
- LWS_ADOPT_HTTP = 1, /* flag: absent implies RAW */
- LWS_ADOPT_SOCKET = 2, /* flag: absent implies file descr */
- LWS_ADOPT_ALLOW_SSL = 4, /* flag: if set requires LWS_ADOPT_SOCKET */
- LWS_ADOPT_WS_PARENTIO = 8, /* flag: ws mode parent handles IO
- * if given must be only flag
- * wsi put directly into ws mode */
- LWS_ADOPT_FLAG_UDP = 16, /* flag: socket is UDP */
-
- LWS_ADOPT_RAW_SOCKET_UDP = LWS_ADOPT_SOCKET | LWS_ADOPT_FLAG_UDP,
-} lws_adoption_type;
-
-typedef union {
- lws_sockfd_type sockfd;
- lws_filefd_type filefd;
-} lws_sock_file_fd_type;
-
-#if !defined(LWS_WITH_ESP32)
-struct lws_udp {
- struct sockaddr sa;
- socklen_t salen;
-
- struct sockaddr sa_pending;
- socklen_t salen_pending;
-};
-#endif
-
-/*
-* lws_adopt_descriptor_vhost() - adopt foreign socket or file descriptor
-* if socket descriptor, should already have been accepted from listen socket
-*
-* \param vhost: lws vhost
-* \param type: OR-ed combinations of lws_adoption_type flags
-* \param fd: union with either .sockfd or .filefd set
-* \param vh_prot_name: NULL or vh protocol name to bind raw connection to
-* \param parent: NULL or struct lws to attach new_wsi to as a child
-*
-* Either returns new wsi bound to accept_fd, or closes accept_fd and
-* returns NULL, having cleaned up any new wsi pieces.
-*
-* If LWS_ADOPT_SOCKET is set, LWS adopts the socket in http serving mode, it's
-* ready to accept an upgrade to ws or just serve http.
-*
-* parent may be NULL, if given it should be an existing wsi that will become the
-* parent of the new wsi created by this call.
-*/
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_adopt_descriptor_vhost(struct lws_vhost *vh, lws_adoption_type type,
- lws_sock_file_fd_type fd, const char *vh_prot_name,
- struct lws *parent);
-
-/**
- * lws_adopt_socket_readbuf() - adopt foreign socket and first rx as if listen socket accepted it
- * for the default vhost of context.
- * \param context: lws context
- * \param accept_fd: fd of already-accepted socket to adopt
- * \param readbuf: NULL or pointer to data that must be drained before reading from
- * accept_fd
- * \param len: The length of the data held at \param readbuf
- *
- * Either returns new wsi bound to accept_fd, or closes accept_fd and
- * returns NULL, having cleaned up any new wsi pieces.
- *
- * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
- * to ws or just serve http.
- *
- * If your external code did not already read from the socket, you can use
- * lws_adopt_socket() instead.
- *
- * This api is guaranteed to use the data at \param readbuf first, before reading from
- * the socket.
- *
- * readbuf is limited to the size of the ah rx buf, currently 2048 bytes.
- */
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_adopt_socket_readbuf(struct lws_context *context, lws_sockfd_type accept_fd,
- const char *readbuf, size_t len);
-/**
- * lws_adopt_socket_vhost_readbuf() - adopt foreign socket and first rx as if listen socket
- * accepted it for vhost.
- * \param vhost: lws vhost
- * \param accept_fd: fd of already-accepted socket to adopt
- * \param readbuf: NULL or pointer to data that must be drained before reading from
- * accept_fd
- * \param len: The length of the data held at \param readbuf
- *
- * Either returns new wsi bound to accept_fd, or closes accept_fd and
- * returns NULL, having cleaned up any new wsi pieces.
- *
- * LWS adopts the socket in http serving mode, it's ready to accept an upgrade
- * to ws or just serve http.
- *
- * If your external code did not already read from the socket, you can use
- * lws_adopt_socket() instead.
- *
- * This api is guaranteed to use the data at \param readbuf first, before reading from
- * the socket.
- *
- * readbuf is limited to the size of the ah rx buf, currently 2048 bytes.
- */
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_adopt_socket_vhost_readbuf(struct lws_vhost *vhost, lws_sockfd_type accept_fd,
- const char *readbuf, size_t len);
-
-#define LWS_CAUDP_BIND 1
-
-/**
- * lws_create_adopt_udp() - create, bind and adopt a UDP socket
- *
- * \param vhost: lws vhost
- * \param port: UDP port to bind to, -1 means unbound
- * \param flags: 0 or LWS_CAUDP_NO_BIND
- * \param protocol_name: Name of protocol on vhost to bind wsi to
- * \param parent_wsi: NULL or parent wsi new wsi will be a child of
- *
- * Either returns new wsi bound to accept_fd, or closes accept_fd and
- * returns NULL, having cleaned up any new wsi pieces.
- * */
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_create_adopt_udp(struct lws_vhost *vhost, int port, int flags,
- const char *protocol_name, struct lws *parent_wsi);
-///@}
-
-/** \defgroup net Network related helper APIs
- * ##Network related helper APIs
- *
- * These wrap miscellaneous useful network-related functions
- */
-///@{
-
-/**
- * lws_canonical_hostname() - returns this host's hostname
- *
- * This is typically used by client code to fill in the host parameter
- * when making a client connection. You can only call it after the context
- * has been created.
- *
- * \param context: Websocket context
- */
-LWS_VISIBLE LWS_EXTERN const char * LWS_WARN_UNUSED_RESULT
-lws_canonical_hostname(struct lws_context *context);
-
-/**
- * lws_get_peer_addresses() - Get client address information
- * \param wsi: Local struct lws associated with
- * \param fd: Connection socket descriptor
- * \param name: Buffer to take client address name
- * \param name_len: Length of client address name buffer
- * \param rip: Buffer to take client address IP dotted quad
- * \param rip_len: Length of client address IP buffer
- *
- * This function fills in name and rip with the name and IP of
- * the client connected with socket descriptor fd. Names may be
- * truncated if there is not enough room. If either cannot be
- * determined, they will be returned as valid zero-length strings.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_get_peer_addresses(struct lws *wsi, lws_sockfd_type fd, char *name,
- int name_len, char *rip, int rip_len);
-
-/**
- * lws_get_peer_simple() - Get client address information without RDNS
- *
- * \param wsi: Local struct lws associated with
- * \param name: Buffer to take client address name
- * \param namelen: Length of client address name buffer
- *
- * This provides a 123.123.123.123 type IP address in name from the
- * peer that has connected to wsi
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_get_peer_simple(struct lws *wsi, char *name, int namelen);
-
-
-#define LWS_ITOSA_NOT_EXIST -1
-#define LWS_ITOSA_NOT_USABLE -2
-#define LWS_ITOSA_USABLE 0
-#if !defined(LWS_WITH_ESP32)
-/**
- * lws_interface_to_sa() - Convert interface name or IP to sockaddr struct
- *
- * \param ipv6: Allow IPV6 addresses
- * \param ifname: Interface name or IP
- * \param addr: struct sockaddr_in * to be written
- * \param addrlen: Length of addr
- *
- * This converts a textual network interface name to a sockaddr usable by
- * other network functions.
- *
- * If the network interface doesn't exist, it will return LWS_ITOSA_NOT_EXIST.
- *
- * If the network interface is not usable, eg ethernet cable is removed, it
- * may logically exist but not have any IP address. As such it will return
- * LWS_ITOSA_NOT_USABLE.
- *
- * If the network interface exists and is usable, it will return
- * LWS_ITOSA_USABLE.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_interface_to_sa(int ipv6, const char *ifname, struct sockaddr_in *addr,
- size_t addrlen);
-///@}
-#endif
-
-/** \defgroup misc Miscellaneous APIs
-* ##Miscellaneous APIs
-*
-* Various APIs outside of other categories
-*/
-///@{
-
-/**
- * lws_start_foreach_ll(): linkedlist iterator helper start
- *
- * \param type: type of iteration, eg, struct xyz *
- * \param it: iterator var name to create
- * \param start: start of list
- *
- * This helper creates an iterator and starts a while (it) {
- * loop. The iterator runs through the linked list starting at start and
- * ends when it gets a NULL.
- * The while loop should be terminated using lws_start_foreach_ll().
- */
-#define lws_start_foreach_ll(type, it, start)\
-{ \
- type it = start; \
- while (it) {
-
-/**
- * lws_end_foreach_ll(): linkedlist iterator helper end
- *
- * \param it: same iterator var name given when starting
- * \param nxt: member name in the iterator pointing to next list element
- *
- * This helper is the partner for lws_start_foreach_ll() that ends the
- * while loop.
- */
-
-#define lws_end_foreach_ll(it, nxt) \
- it = it->nxt; \
- } \
-}
-
-/**
- * lws_start_foreach_llp(): linkedlist pointer iterator helper start
- *
- * \param type: type of iteration, eg, struct xyz **
- * \param it: iterator var name to create
- * \param start: start of list
- *
- * This helper creates an iterator and starts a while (it) {
- * loop. The iterator runs through the linked list starting at the
- * address of start and ends when it gets a NULL.
- * The while loop should be terminated using lws_start_foreach_llp().
- *
- * This helper variant iterates using a pointer to the previous linked-list
- * element. That allows you to easily delete list members by rewriting the
- * previous pointer to the element's next pointer.
- */
-#define lws_start_foreach_llp(type, it, start)\
-{ \
- type it = &(start); \
- while (*(it)) {
-
-#define lws_start_foreach_llp_safe(type, it, start, nxt)\
-{ \
- type it = &(start); \
- type next; \
- while (*(it)) { \
- next = &((*(it))->nxt); \
-
-/**
- * lws_end_foreach_llp(): linkedlist pointer iterator helper end
- *
- * \param it: same iterator var name given when starting
- * \param nxt: member name in the iterator pointing to next list element
- *
- * This helper is the partner for lws_start_foreach_llp() that ends the
- * while loop.
- */
-
-#define lws_end_foreach_llp(it, nxt) \
- it = &(*(it))->nxt; \
- } \
-}
-
-#define lws_end_foreach_llp_safe(it) \
- it = next; \
- } \
-}
-
-#define lws_ll_fwd_insert(\
- ___new_object, /* pointer to new object */ \
- ___m_list, /* member for next list object ptr */ \
- ___list_head /* list head */ \
- ) {\
- ___new_object->___m_list = ___list_head; \
- ___list_head = ___new_object; \
- }
-
-#define lws_ll_fwd_remove(\
- ___type, /* type of listed object */ \
- ___m_list, /* member for next list object ptr */ \
- ___target, /* object to remove from list */ \
- ___list_head /* list head */ \
- ) { \
- lws_start_foreach_llp(___type **, ___ppss, ___list_head) { \
- if (*___ppss == ___target) { \
- *___ppss = ___target->___m_list; \
- break; \
- } \
- } lws_end_foreach_llp(___ppss, ___m_list); \
- }
-
-/*
- * doubly linked-list
- */
-
-struct lws_dll { /* abstract */
- struct lws_dll *prev;
- struct lws_dll *next;
-};
-
-/*
- * these all point to the composed list objects... you have to use the
- * lws_container_of() helper to recover the start of the containing struct
- */
-
-LWS_VISIBLE LWS_EXTERN void
-lws_dll_add_front(struct lws_dll *d, struct lws_dll *phead);
-
-LWS_VISIBLE LWS_EXTERN void
-lws_dll_remove(struct lws_dll *d);
-
-struct lws_dll_lws { /* typed as struct lws * */
- struct lws_dll_lws *prev;
- struct lws_dll_lws *next;
-};
-
-#define lws_dll_is_null(___dll) (!(___dll)->prev && !(___dll)->next)
-
-static LWS_INLINE void
-lws_dll_lws_add_front(struct lws_dll_lws *_a, struct lws_dll_lws *_head)
-{
- lws_dll_add_front((struct lws_dll *)_a, (struct lws_dll *)_head);
-}
-
-static LWS_INLINE void
-lws_dll_lws_remove(struct lws_dll_lws *_a)
-{
- lws_dll_remove((struct lws_dll *)_a);
-}
-
-/*
- * these are safe against the current container object getting deleted,
- * since the hold his next in a temp and go to that next. ___tmp is
- * the temp.
- */
-
-#define lws_start_foreach_dll_safe(___type, ___it, ___tmp, ___start) \
-{ \
- ___type ___it = ___start; \
- while (___it) { \
- ___type ___tmp = (___it)->next;
-
-#define lws_end_foreach_dll_safe(___it, ___tmp) \
- ___it = ___tmp; \
- } \
-}
-
-#define lws_start_foreach_dll(___type, ___it, ___start) \
-{ \
- ___type ___it = ___start; \
- while (___it) {
-
-#define lws_end_foreach_dll(___it) \
- ___it = (___it)->next; \
- } \
-}
-
-struct lws_buflist;
-
-/**
- * lws_buflist_append_segment(): add buffer to buflist at head
- *
- * \param head: list head
- * \param buf: buffer to stash
- * \param len: length of buffer to stash
- *
- * Returns -1 on OOM, 1 if this was the first segment on the list, and 0 if
- * it was a subsequent segment.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_buflist_append_segment(struct lws_buflist **head, const uint8_t *buf,
- size_t len);
-/**
- * lws_buflist_next_segment_len(): number of bytes left in current segment
- *
- * \param head: list head
- * \param buf: if non-NULL, *buf is written with the address of the start of
- * the remaining data in the segment
- *
- * Returns the number of bytes left in the current segment. 0 indicates
- * that the buflist is empty (there are no segments on the buflist).
- */
-LWS_VISIBLE LWS_EXTERN size_t
-lws_buflist_next_segment_len(struct lws_buflist **head, uint8_t **buf);
-/**
- * lws_buflist_use_segment(): remove len bytes from the current segment
- *
- * \param head: list head
- * \param len: number of bytes to mark as used
- *
- * If len is less than the remaining length of the current segment, the position
- * in the current segment is simply advanced and it returns.
- *
- * If len uses up the remaining length of the current segment, then the segment
- * is deleted and the list head moves to the next segment if any.
- *
- * Returns the number of bytes left in the current segment. 0 indicates
- * that the buflist is empty (there are no segments on the buflist).
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_buflist_use_segment(struct lws_buflist **head, size_t len);
-/**
- * lws_buflist_destroy_all_segments(): free all segments on the list
- *
- * \param head: list head
- *
- * This frees everything on the list unconditionally. *head is always
- * NULL after this.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_buflist_destroy_all_segments(struct lws_buflist **head);
-
-void
-lws_buflist_describe(struct lws_buflist **head, void *id);
-
-/**
- * lws_ptr_diff(): helper to report distance between pointers as an int
- *
- * \param head: the pointer with the larger address
- * \param tail: the pointer with the smaller address
- *
- * This helper gives you an int representing the number of bytes further
- * forward the first pointer is compared to the second pointer.
- */
-#define lws_ptr_diff(head, tail) \
- ((int)((char *)(head) - (char *)(tail)))
-
-/**
- * lws_snprintf(): snprintf that truncates the returned length too
- *
- * \param str: destination buffer
- * \param size: bytes left in destination buffer
- * \param format: format string
- * \param ...: args for format
- *
- * This lets you correctly truncate buffers by concatenating lengths, if you
- * reach the limit the reported length doesn't exceed the limit.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_snprintf(char *str, size_t size, const char *format, ...) LWS_FORMAT(3);
-
-/**
- * lws_strncpy(): strncpy that guarantees NUL on truncated copy
- *
- * \param dest: destination buffer
- * \param src: source buffer
- * \param size: bytes left in destination buffer
- *
- * This lets you correctly truncate buffers by concatenating lengths, if you
- * reach the limit the reported length doesn't exceed the limit.
- */
-LWS_VISIBLE LWS_EXTERN char *
-lws_strncpy(char *dest, const char *src, size_t size);
-
-/**
- * lws_get_random(): fill a buffer with platform random data
- *
- * \param context: the lws context
- * \param buf: buffer to fill
- * \param len: how much to fill
- *
- * This is intended to be called from the LWS_CALLBACK_RECEIVE callback if
- * it's interested to see if the frame it's dealing with was sent in binary
- * mode.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_get_random(struct lws_context *context, void *buf, int len);
-/**
- * lws_daemonize(): make current process run in the background
- *
- * \param _lock_path: the filepath to write the lock file
- *
- * Spawn lws as a background process, taking care of various things
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_daemonize(const char *_lock_path);
-/**
- * lws_get_library_version(): return string describing the version of lws
- *
- * On unix, also includes the git describe
- */
-LWS_VISIBLE LWS_EXTERN const char * LWS_WARN_UNUSED_RESULT
-lws_get_library_version(void);
-
-/**
- * lws_wsi_user() - get the user data associated with the connection
- * \param wsi: lws connection
- *
- * Not normally needed since it's passed into the callback
- */
-LWS_VISIBLE LWS_EXTERN void *
-lws_wsi_user(struct lws *wsi);
-
-/**
- * lws_wsi_set_user() - set the user data associated with the client connection
- * \param wsi: lws connection
- * \param user: user data
- *
- * By default lws allocates this and it's not legal to externally set it
- * yourself. However client connections may have it set externally when the
- * connection is created... if so, this api can be used to modify it at
- * runtime additionally.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_set_wsi_user(struct lws *wsi, void *user);
-
-/**
- * lws_parse_uri: cut up prot:/ads:port/path into pieces
- * Notice it does so by dropping '\0' into input string
- * and the leading / on the path is consequently lost
- *
- * \param p: incoming uri string.. will get written to
- * \param prot: result pointer for protocol part (https://)
- * \param ads: result pointer for address part
- * \param port: result pointer for port part
- * \param path: result pointer for path part
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_parse_uri(char *p, const char **prot, const char **ads, int *port,
- const char **path);
-/**
- * lws_cmdline_option(): simple commandline parser
- *
- * \param argc: count of argument strings
- * \param argv: argument strings
- * \param val: string to find
- *
- * Returns NULL if the string \p val is not found in the arguments.
- *
- * If it is found, then it returns a pointer to the next character after \p val.
- * So if \p val is "-d", then for the commandlines "myapp -d15" and
- * "myapp -d 15", in both cases the return will point to the "15".
- *
- * In the case there is no argument, like "myapp -d", the return will
- * either point to the '\\0' at the end of -d, or to the start of the
- * next argument, ie, will be non-NULL.
- */
-LWS_VISIBLE LWS_EXTERN const char *
-lws_cmdline_option(int argc, const char **argv, const char *val);
-
-/**
- * lws_now_secs(): return seconds since 1970-1-1
- */
-LWS_VISIBLE LWS_EXTERN unsigned long
-lws_now_secs(void);
-
-/**
- * lws_compare_time_t(): return relationship between two time_t
- *
- * \param context: struct lws_context
- * \param t1: time_t 1
- * \param t2: time_t 2
- *
- * returns <0 if t2 > t1; >0 if t1 > t2; or == 0 if t1 == t2.
- *
- * This is aware of clock discontiguities that may have affected either t1 or
- * t2 and adapts the comparison for them.
- *
- * For the discontiguity detection to work, you must avoid any arithmetic on
- * the times being compared. For example to have a timeout that triggers
- * 15s from when it was set, store the time it was set and compare like
- * `if (lws_compare_time_t(context, now, set_time) > 15)`
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_compare_time_t(struct lws_context *context, time_t t1, time_t t2);
-
-/**
- * lws_get_context - Allow getting lws_context from a Websocket connection
- * instance
- *
- * With this function, users can access context in the callback function.
- * Otherwise users may have to declare context as a global variable.
- *
- * \param wsi: Websocket connection instance
- */
-LWS_VISIBLE LWS_EXTERN struct lws_context * LWS_WARN_UNUSED_RESULT
-lws_get_context(const struct lws *wsi);
-
-/**
- * lws_get_vhost_listen_port - Find out the port number a vhost is listening on
- *
- * In the case you passed 0 for the port number at context creation time, you
- * can discover the port number that was actually chosen for the vhost using
- * this api.
- *
- * \param vhost: Vhost to get listen port from
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_get_vhost_listen_port(struct lws_vhost *vhost);
-
-/**
- * lws_get_count_threads(): how many service threads the context uses
- *
- * \param context: the lws context
- *
- * By default this is always 1, if you asked for more than lws can handle it
- * will clip the number of threads. So you can use this to find out how many
- * threads are actually in use.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_get_count_threads(struct lws_context *context);
-
-/**
- * lws_get_parent() - get parent wsi or NULL
- * \param wsi: lws connection
- *
- * Specialized wsi like cgi stdin/out/err are associated to a parent wsi,
- * this allows you to get their parent.
- */
-LWS_VISIBLE LWS_EXTERN struct lws * LWS_WARN_UNUSED_RESULT
-lws_get_parent(const struct lws *wsi);
-
-/**
- * lws_get_child() - get child wsi or NULL
- * \param wsi: lws connection
- *
- * Allows you to find a related wsi from the parent wsi.
- */
-LWS_VISIBLE LWS_EXTERN struct lws * LWS_WARN_UNUSED_RESULT
-lws_get_child(const struct lws *wsi);
-
-/**
- * lws_get_udp() - get wsi's udp struct
- *
- * \param wsi: lws connection
- *
- * Returns NULL or pointer to the wsi's UDP-specific information
- */
-LWS_VISIBLE LWS_EXTERN const struct lws_udp * LWS_WARN_UNUSED_RESULT
-lws_get_udp(const struct lws *wsi);
-
-/**
- * lws_parent_carries_io() - mark wsi as needing to send messages via parent
- *
- * \param wsi: child lws connection
- */
-
-LWS_VISIBLE LWS_EXTERN void
-lws_set_parent_carries_io(struct lws *wsi);
-
-LWS_VISIBLE LWS_EXTERN void *
-lws_get_opaque_parent_data(const struct lws *wsi);
-
-LWS_VISIBLE LWS_EXTERN void
-lws_set_opaque_parent_data(struct lws *wsi, void *data);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_get_child_pending_on_writable(const struct lws *wsi);
-
-LWS_VISIBLE LWS_EXTERN void
-lws_clear_child_pending_on_writable(struct lws *wsi);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_get_close_length(struct lws *wsi);
-
-LWS_VISIBLE LWS_EXTERN unsigned char *
-lws_get_close_payload(struct lws *wsi);
-
-/**
- * lws_get_network_wsi() - Returns wsi that has the tcp connection for this wsi
- *
- * \param wsi: wsi you have
- *
- * Returns wsi that has the tcp connection (which may be the incoming wsi)
- *
- * HTTP/1 connections will always return the incoming wsi
- * HTTP/2 connections may return a different wsi that has the tcp connection
- */
-LWS_VISIBLE LWS_EXTERN
-struct lws *lws_get_network_wsi(struct lws *wsi);
-
-/**
- * lws_set_allocator() - custom allocator support
- *
- * \param realloc
- *
- * Allows you to replace the allocator (and deallocator) used by lws
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_set_allocator(void *(*realloc)(void *ptr, size_t size, const char *reason));
-///@}
-
-/** \defgroup wsstatus Websocket status APIs
- * ##Websocket connection status APIs
- *
- * These provide information about ws connection or message status
- */
-///@{
-/**
- * lws_send_pipe_choked() - tests if socket is writable or not
- * \param wsi: lws connection
- *
- * Allows you to check if you can write more on the socket
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_send_pipe_choked(struct lws *wsi);
-
-/**
- * lws_is_final_fragment() - tests if last part of ws message
- *
- * \param wsi: lws connection
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_is_final_fragment(struct lws *wsi);
-
-/**
- * lws_is_first_fragment() - tests if first part of ws message
- *
- * \param wsi: lws connection
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_is_first_fragment(struct lws *wsi);
-
-/**
- * lws_get_reserved_bits() - access reserved bits of ws frame
- * \param wsi: lws connection
- */
-LWS_VISIBLE LWS_EXTERN unsigned char
-lws_get_reserved_bits(struct lws *wsi);
-
-/**
- * lws_partial_buffered() - find out if lws buffered the last write
- * \param wsi: websocket connection to check
- *
- * Returns 1 if you cannot use lws_write because the last
- * write on this connection is still buffered, and can't be cleared without
- * returning to the service loop and waiting for the connection to be
- * writeable again.
- *
- * If you will try to do >1 lws_write call inside a single
- * WRITEABLE callback, you must check this after every write and bail if
- * set, ask for a new writeable callback and continue writing from there.
- *
- * This is never set at the start of a writeable callback, but any write
- * may set it.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_partial_buffered(struct lws *wsi);
-
-/**
- * lws_frame_is_binary(): true if the current frame was sent in binary mode
- *
- * \param wsi: the connection we are inquiring about
- *
- * This is intended to be called from the LWS_CALLBACK_RECEIVE callback if
- * it's interested to see if the frame it's dealing with was sent in binary
- * mode.
- */
-LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
-lws_frame_is_binary(struct lws *wsi);
-
-/**
- * lws_is_ssl() - Find out if connection is using SSL
- * \param wsi: websocket connection to check
- *
- * Returns 0 if the connection is not using SSL, 1 if using SSL and
- * using verified cert, and 2 if using SSL but the cert was not
- * checked (appears for client wsi told to skip check on connection)
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_is_ssl(struct lws *wsi);
-/**
- * lws_is_cgi() - find out if this wsi is running a cgi process
- * \param wsi: lws connection
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_is_cgi(struct lws *wsi);
-
-
-struct lws_wifi_scan { /* generic wlan scan item */
- struct lws_wifi_scan *next;
- char ssid[32];
- int32_t rssi; /* divide by .count to get db */
- uint8_t bssid[6];
- uint8_t count;
- uint8_t channel;
- uint8_t authmode;
-};
-
-#if defined(LWS_WITH_TLS) && !defined(LWS_WITH_MBEDTLS)
-/**
- * lws_get_ssl() - Return wsi's SSL context structure
- * \param wsi: websocket connection
- *
- * Returns pointer to the SSL library's context structure
- */
-LWS_VISIBLE LWS_EXTERN SSL*
-lws_get_ssl(struct lws *wsi);
-#endif
-
-enum lws_tls_cert_info {
- LWS_TLS_CERT_INFO_VALIDITY_FROM,
- /**< fills .time with the time_t the cert validity started from */
- LWS_TLS_CERT_INFO_VALIDITY_TO,
- /**< fills .time with the time_t the cert validity ends at */
- LWS_TLS_CERT_INFO_COMMON_NAME,
- /**< fills up to len bytes of .ns.name with the cert common name */
- LWS_TLS_CERT_INFO_ISSUER_NAME,
- /**< fills up to len bytes of .ns.name with the cert issuer name */
- LWS_TLS_CERT_INFO_USAGE,
- /**< fills verified with a bitfield asserting the valid uses */
- LWS_TLS_CERT_INFO_VERIFIED,
- /**< fills .verified with a bool representing peer cert validity,
- * call returns -1 if no cert */
- LWS_TLS_CERT_INFO_OPAQUE_PUBLIC_KEY,
- /**< the certificate's public key, as an opaque bytestream. These
- * opaque bytestreams can only be compared with each other using the
- * same tls backend, ie, OpenSSL or mbedTLS. The different backends
- * produce different, incompatible representations for the same cert.
- */
-};
-
-union lws_tls_cert_info_results {
- unsigned int verified;
- time_t time;
- unsigned int usage;
- struct {
- int len;
- /* KEEP LAST... notice the [64] is only there because
- * name[] is not allowed in a union. The actual length of
- * name[] is arbitrary and is passed into the api using the
- * len parameter. Eg
- *
- * char big[1024];
- * union lws_tls_cert_info_results *buf =
- * (union lws_tls_cert_info_results *)big;
- *
- * lws_tls_peer_cert_info(wsi, type, buf, sizeof(big) -
- * sizeof(*buf) + sizeof(buf->ns.name));
- */
- char name[64];
- } ns;
-};
-
-/**
- * lws_tls_peer_cert_info() - get information from the peer's TLS cert
- *
- * \param wsi: the connection to query
- * \param type: one of LWS_TLS_CERT_INFO_
- * \param buf: pointer to union to take result
- * \param len: when result is a string, the true length of buf->ns.name[]
- *
- * lws_tls_peer_cert_info() lets you get hold of information from the peer
- * certificate.
- *
- * Return 0 if there is a result in \p buf, or -1 indicating there was no cert
- * or another problem.
- *
- * This function works the same no matter if the TLS backend is OpenSSL or
- * mbedTLS.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_tls_peer_cert_info(struct lws *wsi, enum lws_tls_cert_info type,
- union lws_tls_cert_info_results *buf, size_t len);
-
-/**
- * lws_tls_vhost_cert_info() - get information from the vhost's own TLS cert
- *
- * \param vhost: the vhost to query
- * \param type: one of LWS_TLS_CERT_INFO_
- * \param buf: pointer to union to take result
- * \param len: when result is a string, the true length of buf->ns.name[]
- *
- * lws_tls_vhost_cert_info() lets you get hold of information from the vhost
- * certificate.
- *
- * Return 0 if there is a result in \p buf, or -1 indicating there was no cert
- * or another problem.
- *
- * This function works the same no matter if the TLS backend is OpenSSL or
- * mbedTLS.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_tls_vhost_cert_info(struct lws_vhost *vhost, enum lws_tls_cert_info type,
- union lws_tls_cert_info_results *buf, size_t len);
-
-/**
- * lws_tls_acme_sni_cert_create() - creates a temp selfsigned cert
- * and attaches to a vhost
- *
- * \param vhost: the vhost to acquire the selfsigned cert
- * \param san_a: SAN written into the certificate
- * \param san_b: second SAN written into the certificate
- *
- *
- * Returns 0 if created and attached to the vhost. Returns -1 if problems and
- * frees all allocations before returning.
- *
- * On success, any allocations are destroyed at vhost destruction automatically.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_tls_acme_sni_cert_create(struct lws_vhost *vhost, const char *san_a,
- const char *san_b);
-
-/**
- * lws_tls_acme_sni_csr_create() - creates a CSR and related private key PEM
- *
- * \param context: lws_context used for random
- * \param elements: array of LWS_TLS_REQ_ELEMENT_COUNT const char *
- * \param csr: buffer that will get the b64URL(ASN-1 CSR)
- * \param csr_len: max length of the csr buffer
- * \param privkey_pem: pointer to pointer allocated to hold the privkey_pem
- * \param privkey_len: pointer to size_t set to the length of the privkey_pem
- *
- * Creates a CSR according to the information in \p elements, and a private
- * RSA key used to sign the CSR.
- *
- * The outputs are the b64URL(ASN-1 CSR) into csr, and the PEM private key into
- * privkey_pem.
- *
- * Notice that \p elements points to an array of const char *s pointing to the
- * information listed in the enum above. If an entry is NULL or an empty
- * string, the element is set to "none" in the CSR.
- *
- * Returns 0 on success or nonzero for failure.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_tls_acme_sni_csr_create(struct lws_context *context, const char *elements[],
- uint8_t *csr, size_t csr_len, char **privkey_pem,
- size_t *privkey_len);
-
-/**
- * lws_tls_cert_updated() - update every vhost using the given cert path
- *
- * \param context: our lws_context
- * \param certpath: the filepath to the certificate
- * \param keypath: the filepath to the private key of the certificate
- * \param mem_cert: copy of the cert in memory
- * \param len_mem_cert: length of the copy of the cert in memory
- * \param mem_privkey: copy of the private key in memory
- * \param len_mem_privkey: length of the copy of the private key in memory
- *
- * Checks every vhost to see if it is the using certificate described by the
- * the given filepaths. If so, it attempts to update the vhost ssl_ctx to use
- * the new certificate.
- *
- * Returns 0 on success or nonzero for failure.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_tls_cert_updated(struct lws_context *context, const char *certpath,
- const char *keypath,
- const char *mem_cert, size_t len_mem_cert,
- const char *mem_privkey, size_t len_mem_privkey);
-///@}
-
-/** \defgroup lws_ring LWS Ringbuffer APIs
- * ##lws_ring: generic ringbuffer struct
- *
- * Provides an abstract ringbuffer api supporting one head and one or an
- * unlimited number of tails.
- *
- * All of the members are opaque and manipulated by lws_ring_...() apis.
- *
- * The lws_ring and its buffer is allocated at runtime on the heap, using
- *
- * - lws_ring_create()
- * - lws_ring_destroy()
- *
- * It may contain any type, the size of the "element" stored in the ring
- * buffer and the number of elements is given at creation time.
- *
- * When you create the ringbuffer, you can optionally provide an element
- * destroy callback that frees any allocations inside the element. This is then
- * automatically called for elements with no tail behind them, ie, elements
- * which don't have any pending consumer are auto-freed.
- *
- * Whole elements may be inserted into the ringbuffer and removed from it, using
- *
- * - lws_ring_insert()
- * - lws_ring_consume()
- *
- * You can find out how many whole elements are free or waiting using
- *
- * - lws_ring_get_count_free_elements()
- * - lws_ring_get_count_waiting_elements()
- *
- * In addition there are special purpose optional byte-centric apis
- *
- * - lws_ring_next_linear_insert_range()
- * - lws_ring_bump_head()
- *
- * which let you, eg, read() directly into the ringbuffer without needing
- * an intermediate bounce buffer.
- *
- * The accessors understand that the ring wraps, and optimizes insertion and
- * consumption into one or two memcpy()s depending on if the head or tail
- * wraps.
- *
- * lws_ring only supports a single head, but optionally multiple tails with
- * an API to inform it when the "oldest" tail has moved on. You can give
- * NULL where-ever an api asks for a tail pointer, and it will use an internal
- * single tail pointer for convenience.
- *
- * The "oldest tail", which is the only tail if you give it NULL instead of
- * some other tail, is used to track which elements in the ringbuffer are
- * still unread by anyone.
- *
- * - lws_ring_update_oldest_tail()
- */
-///@{
-struct lws_ring;
-
-/**
- * lws_ring_create(): create a new ringbuffer
- *
- * \param element_len: the size in bytes of one element in the ringbuffer
- * \param count: the number of elements the ringbuffer can contain
- * \param destroy_element: NULL, or callback to be called for each element
- * that is removed from the ringbuffer due to the
- * oldest tail moving beyond it
- *
- * Creates the ringbuffer and allocates the storage. Returns the new
- * lws_ring *, or NULL if the allocation failed.
- *
- * If non-NULL, destroy_element will get called back for every element that is
- * retired from the ringbuffer after the oldest tail has gone past it, and for
- * any element still left in the ringbuffer when it is destroyed. It replaces
- * all other element destruction code in your user code.
- */
-LWS_VISIBLE LWS_EXTERN struct lws_ring *
-lws_ring_create(size_t element_len, size_t count,
- void (*destroy_element)(void *element));
-
-/**
- * lws_ring_destroy(): destroy a previously created ringbuffer
- *
- * \param ring: the struct lws_ring to destroy
- *
- * Destroys the ringbuffer allocation and the struct lws_ring itself.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_ring_destroy(struct lws_ring *ring);
-
-/**
- * lws_ring_get_count_free_elements(): return how many elements can fit
- * in the free space
- *
- * \param ring: the struct lws_ring to report on
- *
- * Returns how much room is left in the ringbuffer for whole element insertion.
- */
-LWS_VISIBLE LWS_EXTERN size_t
-lws_ring_get_count_free_elements(struct lws_ring *ring);
-
-/**
- * lws_ring_get_count_waiting_elements(): return how many elements can be consumed
- *
- * \param ring: the struct lws_ring to report on
- * \param tail: a pointer to the tail struct to use, or NULL for single tail
- *
- * Returns how many elements are waiting to be consumed from the perspective
- * of the tail pointer given.
- */
-LWS_VISIBLE LWS_EXTERN size_t
-lws_ring_get_count_waiting_elements(struct lws_ring *ring, uint32_t *tail);
-
-/**
- * lws_ring_insert(): attempt to insert up to max_count elements from src
- *
- * \param ring: the struct lws_ring to report on
- * \param src: the array of elements to be inserted
- * \param max_count: the number of available elements at src
- *
- * Attempts to insert as many of the elements at src as possible, up to the
- * maximum max_count. Returns the number of elements actually inserted.
- */
-LWS_VISIBLE LWS_EXTERN size_t
-lws_ring_insert(struct lws_ring *ring, const void *src, size_t max_count);
-
-/**
- * lws_ring_consume(): attempt to copy out and remove up to max_count elements
- * to src
- *
- * \param ring: the struct lws_ring to report on
- * \param tail: a pointer to the tail struct to use, or NULL for single tail
- * \param dest: the array of elements to be inserted. or NULL for no copy
- * \param max_count: the number of available elements at src
- *
- * Attempts to copy out as many waiting elements as possible into dest, from
- * the perspective of the given tail, up to max_count. If dest is NULL, the
- * copying out is not done but the elements are logically consumed as usual.
- * NULL dest is useful in combination with lws_ring_get_element(), where you
- * can use the element direct from the ringbuffer and then call this with NULL
- * dest to logically consume it.
- *
- * Increments the tail position according to how many elements could be
- * consumed.
- *
- * Returns the number of elements consumed.
- */
-LWS_VISIBLE LWS_EXTERN size_t
-lws_ring_consume(struct lws_ring *ring, uint32_t *tail, void *dest,
- size_t max_count);
-
-/**
- * lws_ring_get_element(): get a pointer to the next waiting element for tail
- *
- * \param ring: the struct lws_ring to report on
- * \param tail: a pointer to the tail struct to use, or NULL for single tail
- *
- * Points to the next element that tail would consume, directly in the
- * ringbuffer. This lets you write() or otherwise use the element without
- * having to copy it out somewhere first.
- *
- * After calling this, you must call lws_ring_consume(ring, &tail, NULL, 1)
- * which will logically consume the element you used up and increment your
- * tail (tail may also be NULL there if you use a single tail).
- *
- * Returns NULL if no waiting element, or a const void * pointing to it.
- */
-LWS_VISIBLE LWS_EXTERN const void *
-lws_ring_get_element(struct lws_ring *ring, uint32_t *tail);
-
-/**
- * lws_ring_update_oldest_tail(): free up elements older than tail for reuse
- *
- * \param ring: the struct lws_ring to report on
- * \param tail: a pointer to the tail struct to use, or NULL for single tail
- *
- * If you are using multiple tails, you must use this API to inform the
- * lws_ring when none of the tails still need elements in the fifo any more,
- * by updating it when the "oldest" tail has moved on.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_ring_update_oldest_tail(struct lws_ring *ring, uint32_t tail);
-
-/**
- * lws_ring_get_oldest_tail(): get current oldest available data index
- *
- * \param ring: the struct lws_ring to report on
- *
- * If you are initializing a new ringbuffer consumer, you can set its tail to
- * this to start it from the oldest ringbuffer entry still available.
- */
-LWS_VISIBLE LWS_EXTERN uint32_t
-lws_ring_get_oldest_tail(struct lws_ring *ring);
-
-/**
- * lws_ring_next_linear_insert_range(): used to write directly into the ring
- *
- * \param ring: the struct lws_ring to report on
- * \param start: pointer to a void * set to the start of the next ringbuffer area
- * \param bytes: pointer to a size_t set to the max length you may use from *start
- *
- * This provides a low-level, bytewise access directly into the ringbuffer
- * allowing direct insertion of data without having to use a bounce buffer.
- *
- * The api reports the position and length of the next linear range that can
- * be written in the ringbuffer, ie, up to the point it would wrap, and sets
- * *start and *bytes accordingly. You can then, eg, directly read() into
- * *start for up to *bytes, and use lws_ring_bump_head() to update the lws_ring
- * with what you have done.
- *
- * Returns nonzero if no insertion is currently possible.
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_ring_next_linear_insert_range(struct lws_ring *ring, void **start,
- size_t *bytes);
-
-/**
- * lws_ring_bump_head(): used to write directly into the ring
- *
- * \param ring: the struct lws_ring to operate on
- * \param bytes: the number of bytes you inserted at the current head
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_ring_bump_head(struct lws_ring *ring, size_t bytes);
-
-LWS_VISIBLE LWS_EXTERN void
-lws_ring_dump(struct lws_ring *ring, uint32_t *tail);
-
-/*
- * This is a helper that combines the common pattern of needing to consume
- * some ringbuffer elements, move the consumer tail on, and check if that
- * has moved any ringbuffer elements out of scope, because it was the last
- * consumer that had not already consumed them.
- *
- * Elements that go out of scope because the oldest tail is now after them
- * get garbage-collected by calling the destroy_element callback on them
- * defined when the ringbuffer was created.
- */
-
-#define lws_ring_consume_and_update_oldest_tail(\
- ___ring, /* the lws_ring object */ \
- ___type, /* type of objects with tails */ \
- ___ptail, /* ptr to tail of obj with tail doing consuming */ \
- ___count, /* count of payload objects being consumed */ \
- ___list_head, /* head of list of objects with tails */ \
- ___mtail, /* member name of tail in ___type */ \
- ___mlist /* member name of next list member ptr in ___type */ \
- ) { \
- int ___n, ___m; \
- \
- ___n = lws_ring_get_oldest_tail(___ring) == *(___ptail); \
- lws_ring_consume(___ring, ___ptail, NULL, ___count); \
- if (___n) { \
- uint32_t ___oldest; \
- ___n = 0; \
- ___oldest = *(___ptail); \
- lws_start_foreach_llp(___type **, ___ppss, ___list_head) { \
- ___m = lws_ring_get_count_waiting_elements( \
- ___ring, &(*___ppss)->tail); \
- if (___m >= ___n) { \
- ___n = ___m; \
- ___oldest = (*___ppss)->tail; \
- } \
- } lws_end_foreach_llp(___ppss, ___mlist); \
- \
- lws_ring_update_oldest_tail(___ring, ___oldest); \
- } \
-}
-
-/*
- * This does the same as the lws_ring_consume_and_update_oldest_tail()
- * helper, but for the simpler case there is only one consumer, so one
- * tail, and that tail is always the oldest tail.
- */
-
-#define lws_ring_consume_single_tail(\
- ___ring, /* the lws_ring object */ \
- ___ptail, /* ptr to tail of obj with tail doing consuming */ \
- ___count /* count of payload objects being consumed */ \
- ) { \
- lws_ring_consume(___ring, ___ptail, NULL, ___count); \
- lws_ring_update_oldest_tail(___ring, *(___ptail)); \
-}
-///@}
-
-/** \defgroup sha SHA and B64 helpers
- * ##SHA and B64 helpers
- *
- * These provide SHA-1 and B64 helper apis
- */
-///@{
-#ifdef LWS_SHA1_USE_OPENSSL_NAME
-#define lws_SHA1 SHA1
-#else
-/**
- * lws_SHA1(): make a SHA-1 digest of a buffer
- *
- * \param d: incoming buffer
- * \param n: length of incoming buffer
- * \param md: buffer for message digest (must be >= 20 bytes)
- *
- * Reduces any size buffer into a 20-byte SHA-1 hash.
- */
-LWS_VISIBLE LWS_EXTERN unsigned char *
-lws_SHA1(const unsigned char *d, size_t n, unsigned char *md);
-#endif
-/**
- * lws_b64_encode_string(): encode a string into base 64
- *
- * \param in: incoming buffer
- * \param in_len: length of incoming buffer
- * \param out: result buffer
- * \param out_size: length of result buffer
- *
- * Encodes a string using b64
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_b64_encode_string(const char *in, int in_len, char *out, int out_size);
-/**
- * lws_b64_encode_string_url(): encode a string into base 64
- *
- * \param in: incoming buffer
- * \param in_len: length of incoming buffer
- * \param out: result buffer
- * \param out_size: length of result buffer
- *
- * Encodes a string using b64 with the "URL" variant (+ -> -, and / -> _)
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_b64_encode_string_url(const char *in, int in_len, char *out, int out_size);
-/**
- * lws_b64_decode_string(): decode a string from base 64
- *
- * \param in: incoming buffer
- * \param out: result buffer
- * \param out_size: length of result buffer
- *
- * Decodes a NUL-terminated string using b64
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_b64_decode_string(const char *in, char *out, int out_size);
-/**
- * lws_b64_decode_string_len(): decode a string from base 64
- *
- * \param in: incoming buffer
- * \param in_len: length of incoming buffer
- * \param out: result buffer
- * \param out_size: length of result buffer
- *
- * Decodes a range of chars using b64
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_b64_decode_string_len(const char *in, int in_len, char *out, int out_size);
-///@}
-
-
-/*! \defgroup cgi cgi handling
- *
- * ##CGI handling
- *
- * These functions allow low-level control over stdin/out/err of the cgi.
- *
- * However for most cases, binding the cgi to http in and out, the default
- * lws implementation already does the right thing.
- */
-
-enum lws_enum_stdinouterr {
- LWS_STDIN = 0,
- LWS_STDOUT = 1,
- LWS_STDERR = 2,
-};
-
-enum lws_cgi_hdr_state {
- LCHS_HEADER,
- LCHS_CR1,
- LCHS_LF1,
- LCHS_CR2,
- LCHS_LF2,
- LHCS_RESPONSE,
- LHCS_DUMP_HEADERS,
- LHCS_PAYLOAD,
- LCHS_SINGLE_0A,
-};
-
-struct lws_cgi_args {
- struct lws **stdwsi; /**< get fd with lws_get_socket_fd() */
- enum lws_enum_stdinouterr ch; /**< channel index */
- unsigned char *data; /**< for messages with payload */
- enum lws_cgi_hdr_state hdr_state; /**< track where we are in cgi headers */
- int len; /**< length */
-};
-
-#ifdef LWS_WITH_CGI
-/**
- * lws_cgi: spawn network-connected cgi process
- *
- * \param wsi: connection to own the process
- * \param exec_array: array of "exec-name" "arg1" ... "argn" NULL
- * \param script_uri_path_len: how many chars on the left of the uri are the
- * path to the cgi, or -1 to spawn without URL-related env vars
- * \param timeout_secs: seconds script should be allowed to run
- * \param mp_cgienv: pvo list with per-vhost cgi options to put in env
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_cgi(struct lws *wsi, const char * const *exec_array,
- int script_uri_path_len, int timeout_secs,
- const struct lws_protocol_vhost_options *mp_cgienv);
-
-/**
- * lws_cgi_write_split_stdout_headers: write cgi output accounting for header part
- *
- * \param wsi: connection to own the process
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_cgi_write_split_stdout_headers(struct lws *wsi);
-
-/**
- * lws_cgi_kill: terminate cgi process associated with wsi
- *
- * \param wsi: connection to own the process
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_cgi_kill(struct lws *wsi);
-
-/**
- * lws_cgi_get_stdwsi: get wsi for stdin, stdout, or stderr
- *
- * \param wsi: parent wsi that has cgi
- * \param ch: which of LWS_STDIN, LWS_STDOUT or LWS_STDERR
- */
-LWS_VISIBLE LWS_EXTERN struct lws *
-lws_cgi_get_stdwsi(struct lws *wsi, enum lws_enum_stdinouterr ch);
-
-#endif
-///@}
-
-
-/*! \defgroup fops file operation wrapping
- *
- * ##File operation wrapping
- *
- * Use these helper functions if you want to access a file from the perspective
- * of a specific wsi, which is usually the case. If you just want contextless
- * file access, use the fops callbacks directly with NULL wsi instead of these
- * helpers.
- *
- * If so, then it calls the platform handler or user overrides where present
- * (as defined in info->fops)
- *
- * The advantage from all this is user code can be portable for file operations
- * without having to deal with differences between platforms.
- */
-//@{
-
-/** struct lws_plat_file_ops - Platform-specific file operations
- *
- * These provide platform-agnostic ways to deal with filesystem access in the
- * library and in the user code.
- */
-
-#if defined(LWS_WITH_ESP32)
-/* sdk preprocessor defs? compiler issue? gets confused with member names */
-#define LWS_FOP_OPEN _open
-#define LWS_FOP_CLOSE _close
-#define LWS_FOP_SEEK_CUR _seek_cur
-#define LWS_FOP_READ _read
-#define LWS_FOP_WRITE _write
-#else
-#define LWS_FOP_OPEN open
-#define LWS_FOP_CLOSE close
-#define LWS_FOP_SEEK_CUR seek_cur
-#define LWS_FOP_READ read
-#define LWS_FOP_WRITE write
-#endif
-
-#define LWS_FOP_FLAGS_MASK ((1 << 23) - 1)
-#define LWS_FOP_FLAG_COMPR_ACCEPTABLE_GZIP (1 << 24)
-#define LWS_FOP_FLAG_COMPR_IS_GZIP (1 << 25)
-#define LWS_FOP_FLAG_MOD_TIME_VALID (1 << 26)
-#define LWS_FOP_FLAG_VIRTUAL (1 << 27)
-
-struct lws_plat_file_ops;
-
-struct lws_fop_fd {
- lws_filefd_type fd;
- /**< real file descriptor related to the file... */
- const struct lws_plat_file_ops *fops;
- /**< fops that apply to this fop_fd */
- void *filesystem_priv;
- /**< ignored by lws; owned by the fops handlers */
- lws_filepos_t pos;
- /**< generic "position in file" */
- lws_filepos_t len;
- /**< generic "length of file" */
- lws_fop_flags_t flags;
- /**< copy of the returned flags */
- uint32_t mod_time;
- /**< optional "modification time of file", only valid if .open()
- * set the LWS_FOP_FLAG_MOD_TIME_VALID flag */
-};
-typedef struct lws_fop_fd *lws_fop_fd_t;
-
-struct lws_fops_index {
- const char *sig; /* NULL or vfs signature, eg, ".zip/" */
- uint8_t len; /* length of above string */
-};
-
-struct lws_plat_file_ops {
- lws_fop_fd_t (*LWS_FOP_OPEN)(const struct lws_plat_file_ops *fops,
- const char *filename, const char *vpath,
- lws_fop_flags_t *flags);
- /**< Open file (always binary access if plat supports it)
- * vpath may be NULL, or if the fops understands it, the point at which
- * the filename's virtual part starts.
- * *flags & LWS_FOP_FLAGS_MASK should be set to O_RDONLY or O_RDWR.
- * If the file may be gzip-compressed,
- * LWS_FOP_FLAG_COMPR_ACCEPTABLE_GZIP is set. If it actually is
- * gzip-compressed, then the open handler should OR
- * LWS_FOP_FLAG_COMPR_IS_GZIP on to *flags before returning.
- */
- int (*LWS_FOP_CLOSE)(lws_fop_fd_t *fop_fd);
- /**< close file AND set the pointer to NULL */
- lws_fileofs_t (*LWS_FOP_SEEK_CUR)(lws_fop_fd_t fop_fd,
- lws_fileofs_t offset_from_cur_pos);
- /**< seek from current position */
- int (*LWS_FOP_READ)(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len);
- /**< Read from file, on exit *amount is set to amount actually read */
- int (*LWS_FOP_WRITE)(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len);
- /**< Write to file, on exit *amount is set to amount actually written */
-
- struct lws_fops_index fi[3];
- /**< vfs path signatures implying use of this fops */
-
- const struct lws_plat_file_ops *next;
- /**< NULL or next fops in list */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility */
-};
-
-/**
- * lws_get_fops() - get current file ops
- *
- * \param context: context
- */
-LWS_VISIBLE LWS_EXTERN struct lws_plat_file_ops * LWS_WARN_UNUSED_RESULT
-lws_get_fops(struct lws_context *context);
-LWS_VISIBLE LWS_EXTERN void
-lws_set_fops(struct lws_context *context, const struct lws_plat_file_ops *fops);
-/**
- * lws_vfs_tell() - get current file position
- *
- * \param fop_fd: fop_fd we are asking about
- */
-LWS_VISIBLE LWS_EXTERN lws_filepos_t LWS_WARN_UNUSED_RESULT
-lws_vfs_tell(lws_fop_fd_t fop_fd);
-/**
- * lws_vfs_get_length() - get current file total length in bytes
- *
- * \param fop_fd: fop_fd we are asking about
- */
-LWS_VISIBLE LWS_EXTERN lws_filepos_t LWS_WARN_UNUSED_RESULT
-lws_vfs_get_length(lws_fop_fd_t fop_fd);
-/**
- * lws_vfs_get_mod_time() - get time file last modified
- *
- * \param fop_fd: fop_fd we are asking about
- */
-LWS_VISIBLE LWS_EXTERN uint32_t LWS_WARN_UNUSED_RESULT
-lws_vfs_get_mod_time(lws_fop_fd_t fop_fd);
-/**
- * lws_vfs_file_seek_set() - seek relative to start of file
- *
- * \param fop_fd: fop_fd we are seeking in
- * \param offset: offset from start of file
- */
-LWS_VISIBLE LWS_EXTERN lws_fileofs_t
-lws_vfs_file_seek_set(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
-/**
- * lws_vfs_file_seek_end() - seek relative to end of file
- *
- * \param fop_fd: fop_fd we are seeking in
- * \param offset: offset from start of file
- */
-LWS_VISIBLE LWS_EXTERN lws_fileofs_t
-lws_vfs_file_seek_end(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
-
-extern struct lws_plat_file_ops fops_zip;
-
-/**
- * lws_plat_file_open() - open vfs filepath
- *
- * \param fops: file ops struct that applies to this descriptor
- * \param vfs_path: filename to open
- * \param flags: pointer to open flags
- *
- * The vfs_path is scanned for known fops signatures, and the open directed
- * to any matching fops open.
- *
- * User code should use this api to perform vfs opens.
- *
- * returns semi-opaque handle
- */
-LWS_VISIBLE LWS_EXTERN lws_fop_fd_t LWS_WARN_UNUSED_RESULT
-lws_vfs_file_open(const struct lws_plat_file_ops *fops, const char *vfs_path,
- lws_fop_flags_t *flags);
-
-/**
- * lws_plat_file_close() - close file
- *
- * \param fop_fd: file handle to close
- */
-static LWS_INLINE int
-lws_vfs_file_close(lws_fop_fd_t *fop_fd)
-{
- return (*fop_fd)->fops->LWS_FOP_CLOSE(fop_fd);
-}
-
-/**
- * lws_plat_file_seek_cur() - close file
- *
- *
- * \param fop_fd: file handle
- * \param offset: position to seek to
- */
-static LWS_INLINE lws_fileofs_t
-lws_vfs_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
-{
- return fop_fd->fops->LWS_FOP_SEEK_CUR(fop_fd, offset);
-}
-/**
- * lws_plat_file_read() - read from file
- *
- * \param fop_fd: file handle
- * \param amount: how much to read (rewritten by call)
- * \param buf: buffer to write to
- * \param len: max length
- */
-static LWS_INLINE int LWS_WARN_UNUSED_RESULT
-lws_vfs_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len)
-{
- return fop_fd->fops->LWS_FOP_READ(fop_fd, amount, buf, len);
-}
-/**
- * lws_plat_file_write() - write from file
- *
- * \param fop_fd: file handle
- * \param amount: how much to write (rewritten by call)
- * \param buf: buffer to read from
- * \param len: max length
- */
-static LWS_INLINE int LWS_WARN_UNUSED_RESULT
-lws_vfs_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len)
-{
- return fop_fd->fops->LWS_FOP_WRITE(fop_fd, amount, buf, len);
-}
-
-/* these are the platform file operations implementations... they can
- * be called directly and used in fops arrays
- */
-
-LWS_VISIBLE LWS_EXTERN lws_fop_fd_t
-_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
- const char *vpath, lws_fop_flags_t *flags);
-LWS_VISIBLE LWS_EXTERN int
-_lws_plat_file_close(lws_fop_fd_t *fop_fd);
-LWS_VISIBLE LWS_EXTERN lws_fileofs_t
-_lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
-LWS_VISIBLE LWS_EXTERN int
-_lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len);
-LWS_VISIBLE LWS_EXTERN int
-_lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len);
-
-LWS_VISIBLE LWS_EXTERN int
-lws_alloc_vfs_file(struct lws_context *context, const char *filename,
- uint8_t **buf, lws_filepos_t *amount);
-//@}
-
-/** \defgroup smtp SMTP related functions
- * ##SMTP related functions
- * \ingroup lwsapi
- *
- * These apis let you communicate with a local SMTP server to send email from
- * lws. It handles all the SMTP sequencing and protocol actions.
- *
- * Your system should have postfix, sendmail or another MTA listening on port
- * 25 and able to send email using the "mail" commandline app. Usually distro
- * MTAs are configured for this by default.
- *
- * It runs via its own libuv events if initialized (which requires giving it
- * a libuv loop to attach to).
- *
- * It operates using three callbacks, on_next() queries if there is a new email
- * to send, on_get_body() asks for the body of the email, and on_sent() is
- * called after the email is successfully sent.
- *
- * To use it
- *
- * - create an lws_email struct
- *
- * - initialize data, loop, the email_* strings, max_content_size and
- * the callbacks
- *
- * - call lws_email_init()
- *
- * When you have at least one email to send, call lws_email_check() to
- * schedule starting to send it.
- */
-//@{
-#ifdef LWS_WITH_SMTP
-
-/** enum lwsgs_smtp_states - where we are in SMTP protocol sequence */
-enum lwsgs_smtp_states {
- LGSSMTP_IDLE, /**< awaiting new email */
- LGSSMTP_CONNECTING, /**< opening tcp connection to MTA */
- LGSSMTP_CONNECTED, /**< tcp connection to MTA is connected */
- LGSSMTP_SENT_HELO, /**< sent the HELO */
- LGSSMTP_SENT_FROM, /**< sent FROM */
- LGSSMTP_SENT_TO, /**< sent TO */
- LGSSMTP_SENT_DATA, /**< sent DATA request */
- LGSSMTP_SENT_BODY, /**< sent the email body */
- LGSSMTP_SENT_QUIT, /**< sent the session quit */
-};
-
-/** struct lws_email - abstract context for performing SMTP operations */
-struct lws_email {
- void *data;
- /**< opaque pointer set by user code and available to the callbacks */
- uv_loop_t *loop;
- /**< the libuv loop we will work on */
-
- char email_smtp_ip[32]; /**< Fill before init, eg, "127.0.0.1" */
- char email_helo[32]; /**< Fill before init, eg, "myserver.com" */
- char email_from[100]; /**< Fill before init or on_next */
- char email_to[100]; /**< Fill before init or on_next */
-
- unsigned int max_content_size;
- /**< largest possible email body size */
-
- /* Fill all the callbacks before init */
-
- int (*on_next)(struct lws_email *email);
- /**< (Fill in before calling lws_email_init)
- * called when idle, 0 = another email to send, nonzero is idle.
- * If you return 0, all of the email_* char arrays must be set
- * to something useful. */
- int (*on_sent)(struct lws_email *email);
- /**< (Fill in before calling lws_email_init)
- * called when transfer of the email to the SMTP server was
- * successful, your callback would remove the current email
- * from its queue */
- int (*on_get_body)(struct lws_email *email, char *buf, int len);
- /**< (Fill in before calling lws_email_init)
- * called when the body part of the queued email is about to be
- * sent to the SMTP server. */
-
-
- /* private things */
- uv_timer_t timeout_email; /**< private */
- enum lwsgs_smtp_states estate; /**< private */
- uv_connect_t email_connect_req; /**< private */
- uv_tcp_t email_client; /**< private */
- time_t email_connect_started; /**< private */
- char email_buf[256]; /**< private */
- char *content; /**< private */
-};
-
-/**
- * lws_email_init() - Initialize a struct lws_email
- *
- * \param email: struct lws_email to init
- * \param loop: libuv loop to use
- * \param max_content: max email content size
- *
- * Prepares a struct lws_email for use ending SMTP
- */
-LWS_VISIBLE LWS_EXTERN int
-lws_email_init(struct lws_email *email, uv_loop_t *loop, int max_content);
-
-/**
- * lws_email_check() - Request check for new email
- *
- * \param email: struct lws_email context to check
- *
- * Schedules a check for new emails in 1s... call this when you have queued an
- * email for send.
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_email_check(struct lws_email *email);
-/**
- * lws_email_destroy() - stop using the struct lws_email
- *
- * \param email: the struct lws_email context
- *
- * Stop sending email using email and free allocations
- */
-LWS_VISIBLE LWS_EXTERN void
-lws_email_destroy(struct lws_email *email);
-
-#endif
-//@}
-
-
-/** \defgroup lejp JSON parser
- * ##JSON parsing related functions
- * \ingroup lwsapi
- *
- * LEJP is an extremely lightweight JSON stream parser included in lws.
- */
-//@{
-struct lejp_ctx;
-
-#define LWS_ARRAY_SIZE(_x) (sizeof(_x) / sizeof(_x[0]))
-#define LEJP_FLAG_WS_KEEP 64
-#define LEJP_FLAG_WS_COMMENTLINE 32
-
-enum lejp_states {
- LEJP_IDLE = 0,
- LEJP_MEMBERS = 1,
- LEJP_M_P = 2,
- LEJP_MP_STRING = LEJP_FLAG_WS_KEEP | 3,
- LEJP_MP_STRING_ESC = LEJP_FLAG_WS_KEEP | 4,
- LEJP_MP_STRING_ESC_U1 = LEJP_FLAG_WS_KEEP | 5,
- LEJP_MP_STRING_ESC_U2 = LEJP_FLAG_WS_KEEP | 6,
- LEJP_MP_STRING_ESC_U3 = LEJP_FLAG_WS_KEEP | 7,
- LEJP_MP_STRING_ESC_U4 = LEJP_FLAG_WS_KEEP | 8,
- LEJP_MP_DELIM = 9,
- LEJP_MP_VALUE = 10,
- LEJP_MP_VALUE_NUM_INT = LEJP_FLAG_WS_KEEP | 11,
- LEJP_MP_VALUE_NUM_EXP = LEJP_FLAG_WS_KEEP | 12,
- LEJP_MP_VALUE_TOK = LEJP_FLAG_WS_KEEP | 13,
- LEJP_MP_COMMA_OR_END = 14,
- LEJP_MP_ARRAY_END = 15,
-};
-
-enum lejp_reasons {
- LEJP_CONTINUE = -1,
- LEJP_REJECT_IDLE_NO_BRACE = -2,
- LEJP_REJECT_MEMBERS_NO_CLOSE = -3,
- LEJP_REJECT_MP_NO_OPEN_QUOTE = -4,
- LEJP_REJECT_MP_STRING_UNDERRUN = -5,
- LEJP_REJECT_MP_ILLEGAL_CTRL = -6,
- LEJP_REJECT_MP_STRING_ESC_ILLEGAL_ESC = -7,
- LEJP_REJECT_ILLEGAL_HEX = -8,
- LEJP_REJECT_MP_DELIM_MISSING_COLON = -9,
- LEJP_REJECT_MP_DELIM_BAD_VALUE_START = -10,
- LEJP_REJECT_MP_VAL_NUM_INT_NO_FRAC = -11,
- LEJP_REJECT_MP_VAL_NUM_FORMAT = -12,
- LEJP_REJECT_MP_VAL_NUM_EXP_BAD_EXP = -13,
- LEJP_REJECT_MP_VAL_TOK_UNKNOWN = -14,
- LEJP_REJECT_MP_C_OR_E_UNDERF = -15,
- LEJP_REJECT_MP_C_OR_E_NOTARRAY = -16,
- LEJP_REJECT_MP_ARRAY_END_MISSING = -17,
- LEJP_REJECT_STACK_OVERFLOW = -18,
- LEJP_REJECT_MP_DELIM_ISTACK = -19,
- LEJP_REJECT_NUM_TOO_LONG = -20,
- LEJP_REJECT_MP_C_OR_E_NEITHER = -21,
- LEJP_REJECT_UNKNOWN = -22,
- LEJP_REJECT_CALLBACK = -23
-};
-
-#define LEJP_FLAG_CB_IS_VALUE 64
-
-enum lejp_callbacks {
- LEJPCB_CONSTRUCTED = 0,
- LEJPCB_DESTRUCTED = 1,
-
- LEJPCB_START = 2,
- LEJPCB_COMPLETE = 3,
- LEJPCB_FAILED = 4,
-
- LEJPCB_PAIR_NAME = 5,
-
- LEJPCB_VAL_TRUE = LEJP_FLAG_CB_IS_VALUE | 6,
- LEJPCB_VAL_FALSE = LEJP_FLAG_CB_IS_VALUE | 7,
- LEJPCB_VAL_NULL = LEJP_FLAG_CB_IS_VALUE | 8,
- LEJPCB_VAL_NUM_INT = LEJP_FLAG_CB_IS_VALUE | 9,
- LEJPCB_VAL_NUM_FLOAT = LEJP_FLAG_CB_IS_VALUE | 10,
- LEJPCB_VAL_STR_START = 11, /* notice handle separately */
- LEJPCB_VAL_STR_CHUNK = LEJP_FLAG_CB_IS_VALUE | 12,
- LEJPCB_VAL_STR_END = LEJP_FLAG_CB_IS_VALUE | 13,
-
- LEJPCB_ARRAY_START = 14,
- LEJPCB_ARRAY_END = 15,
-
- LEJPCB_OBJECT_START = 16,
- LEJPCB_OBJECT_END = 17
-};
-
-/**
- * _lejp_callback() - User parser actions
- * \param ctx: LEJP context
- * \param reason: Callback reason
- *
- * Your user callback is associated with the context at construction time,
- * and receives calls as the parsing progresses.
- *
- * All of the callbacks may be ignored and just return 0.
- *
- * The reasons it might get called, found in @reason, are:
- *
- * LEJPCB_CONSTRUCTED: The context was just constructed... you might want to
- * perform one-time allocation for the life of the context.
- *
- * LEJPCB_DESTRUCTED: The context is being destructed... if you made any
- * allocations at construction-time, you can free them now
- *
- * LEJPCB_START: Parsing is beginning at the first byte of input
- *
- * LEJPCB_COMPLETE: Parsing has completed successfully. You'll get a 0 or
- * positive return code from lejp_parse indicating the
- * amount of unused bytes left in the input buffer
- *
- * LEJPCB_FAILED: Parsing failed. You'll get a negative error code
- * returned from lejp_parse
- *
- * LEJPCB_PAIR_NAME: When a "name":"value" pair has had the name parsed,
- * this callback occurs. You can find the new name at
- * the end of ctx->path[]
- *
- * LEJPCB_VAL_TRUE: The "true" value appeared
- *
- * LEJPCB_VAL_FALSE: The "false" value appeared
- *
- * LEJPCB_VAL_NULL: The "null" value appeared
- *
- * LEJPCB_VAL_NUM_INT: A string representing an integer is in ctx->buf
- *
- * LEJPCB_VAL_NUM_FLOAT: A string representing a float is in ctx->buf
- *
- * LEJPCB_VAL_STR_START: We are starting to parse a string, no data yet
- *
- * LEJPCB_VAL_STR_CHUNK: We parsed LEJP_STRING_CHUNK -1 bytes of string data in
- * ctx->buf, which is as much as we can buffer, so we are
- * spilling it. If all your strings are less than
- * LEJP_STRING_CHUNK - 1 bytes, you will never see this
- * callback.
- *
- * LEJPCB_VAL_STR_END: String parsing has completed, the last chunk of the
- * string is in ctx->buf.
- *
- * LEJPCB_ARRAY_START: An array started
- *
- * LEJPCB_ARRAY_END: An array ended
- *
- * LEJPCB_OBJECT_START: An object started
- *
- * LEJPCB_OBJECT_END: An object ended
- */
-LWS_EXTERN signed char _lejp_callback(struct lejp_ctx *ctx, char reason);
-
-typedef signed char (*lejp_callback)(struct lejp_ctx *ctx, char reason);
-
-#ifndef LEJP_MAX_DEPTH
-#define LEJP_MAX_DEPTH 12
-#endif
-#ifndef LEJP_MAX_INDEX_DEPTH
-#define LEJP_MAX_INDEX_DEPTH 5
-#endif
-#ifndef LEJP_MAX_PATH
-#define LEJP_MAX_PATH 128
-#endif
-#ifndef LEJP_STRING_CHUNK
-/* must be >= 30 to assemble floats */
-#define LEJP_STRING_CHUNK 254
-#endif
-
-enum num_flags {
- LEJP_SEEN_MINUS = (1 << 0),
- LEJP_SEEN_POINT = (1 << 1),
- LEJP_SEEN_POST_POINT = (1 << 2),
- LEJP_SEEN_EXP = (1 << 3)
-};
-
-struct _lejp_stack {
- char s; /* lejp_state stack*/
- char p; /* path length */
- char i; /* index array length */
- char b; /* user bitfield */
-};
-
-struct lejp_ctx {
-
- /* sorted by type for most compact alignment
- *
- * pointers
- */
-
- signed char (*callback)(struct lejp_ctx *ctx, char reason);
- void *user;
- const char * const *paths;
-
- /* arrays */
-
- struct _lejp_stack st[LEJP_MAX_DEPTH];
- uint16_t i[LEJP_MAX_INDEX_DEPTH]; /* index array */
- uint16_t wild[LEJP_MAX_INDEX_DEPTH]; /* index array */
- char path[LEJP_MAX_PATH];
- char buf[LEJP_STRING_CHUNK + 1];
-
- /* int */
-
- uint32_t line;
-
- /* short */
-
- uint16_t uni;
-
- /* char */
-
- uint8_t npos;
- uint8_t dcount;
- uint8_t f;
- uint8_t sp; /* stack head */
- uint8_t ipos; /* index stack depth */
- uint8_t ppos;
- uint8_t count_paths;
- uint8_t path_match;
- uint8_t path_match_len;
- uint8_t wildcount;
-};
-
-LWS_VISIBLE LWS_EXTERN void
-lejp_construct(struct lejp_ctx *ctx,
- signed char (*callback)(struct lejp_ctx *ctx, char reason),
- void *user, const char * const *paths, unsigned char paths_count);
-
-LWS_VISIBLE LWS_EXTERN void
-lejp_destruct(struct lejp_ctx *ctx);
-
-LWS_VISIBLE LWS_EXTERN int
-lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len);
-
-LWS_VISIBLE LWS_EXTERN void
-lejp_change_callback(struct lejp_ctx *ctx,
- signed char (*callback)(struct lejp_ctx *ctx, char reason));
-
-LWS_VISIBLE LWS_EXTERN int
-lejp_get_wildcard(struct lejp_ctx *ctx, int wildcard, char *dest, int len);
-//@}
-
-/*
- * Stats are all uint64_t numbers that start at 0.
- * Index names here have the convention
- *
- * _C_ counter
- * _B_ byte count
- * _MS_ millisecond count
- */
-
-enum {
- LWSSTATS_C_CONNECTIONS, /**< count incoming connections */
- LWSSTATS_C_API_CLOSE, /**< count calls to close api */
- LWSSTATS_C_API_READ, /**< count calls to read from socket api */
- LWSSTATS_C_API_LWS_WRITE, /**< count calls to lws_write API */
- LWSSTATS_C_API_WRITE, /**< count calls to write API */
- LWSSTATS_C_WRITE_PARTIALS, /**< count of partial writes */
- LWSSTATS_C_WRITEABLE_CB_REQ, /**< count of writable callback requests */
- LWSSTATS_C_WRITEABLE_CB_EFF_REQ, /**< count of effective writable callback requests */
- LWSSTATS_C_WRITEABLE_CB, /**< count of writable callbacks */
- LWSSTATS_C_SSL_CONNECTIONS_FAILED, /**< count of failed SSL connections */
- LWSSTATS_C_SSL_CONNECTIONS_ACCEPTED, /**< count of accepted SSL connections */
- LWSSTATS_C_SSL_CONNECTIONS_ACCEPT_SPIN, /**< count of SSL_accept() attempts */
- LWSSTATS_C_SSL_CONNS_HAD_RX, /**< count of accepted SSL conns that have had some RX */
- LWSSTATS_C_TIMEOUTS, /**< count of timed-out connections */
- LWSSTATS_C_SERVICE_ENTRY, /**< count of entries to lws service loop */
- LWSSTATS_B_READ, /**< aggregate bytes read */
- LWSSTATS_B_WRITE, /**< aggregate bytes written */
- LWSSTATS_B_PARTIALS_ACCEPTED_PARTS, /**< aggreate of size of accepted write data from new partials */
- LWSSTATS_MS_SSL_CONNECTIONS_ACCEPTED_DELAY, /**< aggregate delay in accepting connection */
- LWSSTATS_MS_WRITABLE_DELAY, /**< aggregate delay between asking for writable and getting cb */
- LWSSTATS_MS_WORST_WRITABLE_DELAY, /**< single worst delay between asking for writable and getting cb */
- LWSSTATS_MS_SSL_RX_DELAY, /**< aggregate delay between ssl accept complete and first RX */
- LWSSTATS_C_PEER_LIMIT_AH_DENIED, /**< number of times we would have given an ah but for the peer limit */
- LWSSTATS_C_PEER_LIMIT_WSI_DENIED, /**< number of times we would have given a wsi but for the peer limit */
-
- /* Add new things just above here ---^
- * This is part of the ABI, don't needlessly break compatibility */
- LWSSTATS_SIZE
-};
-
-#if defined(LWS_WITH_STATS)
-
-LWS_VISIBLE LWS_EXTERN uint64_t
-lws_stats_get(struct lws_context *context, int index);
-LWS_VISIBLE LWS_EXTERN void
-lws_stats_log_dump(struct lws_context *context);
-#else
-static LWS_INLINE uint64_t
-lws_stats_get(struct lws_context *context, int index) { (void)context; (void)index; return 0; }
-static LWS_INLINE void
-lws_stats_log_dump(struct lws_context *context) { (void)context; }
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/thirdparty/libwebsockets/plat/lws-plat-unix.c b/thirdparty/libwebsockets/plat/lws-plat-unix.c
deleted file mode 100644
index 7dba3bd82f..0000000000
--- a/thirdparty/libwebsockets/plat/lws-plat-unix.c
+++ /dev/null
@@ -1,977 +0,0 @@
-/*
- * libwebsockets - small server side websockets and web server implementation
- *
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation:
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#define _GNU_SOURCE
-#include "core/private.h"
-
-#include <pwd.h>
-#include <grp.h>
-
-#ifdef LWS_WITH_PLUGINS
-#include <dlfcn.h>
-#endif
-#include <dirent.h>
-
-void lws_plat_apply_FD_CLOEXEC(int n)
-{
- if (n != -1)
- fcntl(n, F_SETFD, FD_CLOEXEC );
-}
-
-int
-lws_plat_socket_offset(void)
-{
- return 0;
-}
-
-int
-lws_plat_pipe_create(struct lws *wsi)
-{
- struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
-
-#if defined(LWS_HAVE_PIPE2)
- return pipe2(pt->dummy_pipe_fds, O_NONBLOCK);
-#else
- return pipe(pt->dummy_pipe_fds);
-#endif
-}
-
-int
-lws_plat_pipe_signal(struct lws *wsi)
-{
- struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
- char buf = 0;
- int n;
-
- n = write(pt->dummy_pipe_fds[1], &buf, 1);
-
- return n != 1;
-}
-
-void
-lws_plat_pipe_close(struct lws *wsi)
-{
- struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
-
- if (pt->dummy_pipe_fds[0] && pt->dummy_pipe_fds[0] != -1)
- close(pt->dummy_pipe_fds[0]);
- if (pt->dummy_pipe_fds[1] && pt->dummy_pipe_fds[1] != -1)
- close(pt->dummy_pipe_fds[1]);
-
- pt->dummy_pipe_fds[0] = pt->dummy_pipe_fds[1] = -1;
-}
-
-#ifdef __QNX__
-# include "netinet/tcp_var.h"
-# define TCP_KEEPINTVL TCPCTL_KEEPINTVL
-# define TCP_KEEPIDLE TCPCTL_KEEPIDLE
-# define TCP_KEEPCNT TCPCTL_KEEPCNT
-#endif
-
-unsigned long long time_in_microseconds(void)
-{
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
- return ((unsigned long long)tv.tv_sec * 1000000LL) + tv.tv_usec;
-}
-
-LWS_VISIBLE int
-lws_get_random(struct lws_context *context, void *buf, int len)
-{
- return read(context->fd_random, (char *)buf, len);
-}
-
-LWS_VISIBLE int
-lws_send_pipe_choked(struct lws *wsi)
-{
- struct lws_pollfd fds;
- struct lws *wsi_eff = wsi;
-
-#if defined(LWS_WITH_HTTP2)
- wsi_eff = lws_get_network_wsi(wsi);
-#endif
-
- /* the fact we checked implies we avoided back-to-back writes */
- wsi_eff->could_have_pending = 0;
-
- /* treat the fact we got a truncated send pending as if we're choked */
- if (wsi_eff->trunc_len)
- return 1;
-
- fds.fd = wsi_eff->desc.sockfd;
- fds.events = POLLOUT;
- fds.revents = 0;
-
- if (poll(&fds, 1, 0) != 1)
- return 1;
-
- if ((fds.revents & POLLOUT) == 0)
- return 1;
-
- /* okay to send another packet without blocking */
-
- return 0;
-}
-
-LWS_VISIBLE int
-lws_poll_listen_fd(struct lws_pollfd *fd)
-{
- return poll(fd, 1, 0);
-}
-
-LWS_VISIBLE void lwsl_emit_syslog(int level, const char *line)
-{
- int syslog_level = LOG_DEBUG;
-
- switch (level) {
- case LLL_ERR:
- syslog_level = LOG_ERR;
- break;
- case LLL_WARN:
- syslog_level = LOG_WARNING;
- break;
- case LLL_NOTICE:
- syslog_level = LOG_NOTICE;
- break;
- case LLL_INFO:
- syslog_level = LOG_INFO;
- break;
- }
- syslog(syslog_level, "%s", line);
-}
-
-LWS_VISIBLE LWS_EXTERN int
-_lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
-{
- volatile struct lws_foreign_thread_pollfd *ftp, *next;
- volatile struct lws_context_per_thread *vpt;
- struct lws_context_per_thread *pt;
- int n = -1, m, c;
-
- /* stay dead once we are dead */
-
- if (!context || !context->vhost_list)
- return 1;
-
- pt = &context->pt[tsi];
- vpt = (volatile struct lws_context_per_thread *)pt;
-
- lws_stats_atomic_bump(context, pt, LWSSTATS_C_SERVICE_ENTRY, 1);
-
- if (timeout_ms < 0)
- goto faked_service;
-
- if (context->event_loop_ops->run_pt)
- context->event_loop_ops->run_pt(context, tsi);
-
- if (!context->service_tid_detected) {
- struct lws _lws;
-
- memset(&_lws, 0, sizeof(_lws));
- _lws.context = context;
-
- context->service_tid_detected =
- context->vhost_list->protocols[0].callback(
- &_lws, LWS_CALLBACK_GET_THREAD_ID, NULL, NULL, 0);
- context->service_tid = context->service_tid_detected;
- context->service_tid_detected = 1;
- }
-
- /*
- * is there anybody with pending stuff that needs service forcing?
- */
- if (!lws_service_adjust_timeout(context, 1, tsi)) {
- /* -1 timeout means just do forced service */
- _lws_plat_service_tsi(context, -1, pt->tid);
- /* still somebody left who wants forced service? */
- if (!lws_service_adjust_timeout(context, 1, pt->tid))
- /* yes... come back again quickly */
- timeout_ms = 0;
- }
-
- if (timeout_ms) {
- lws_pt_lock(pt, __func__);
- /* don't stay in poll wait longer than next hr timeout */
- lws_usec_t t = __lws_hrtimer_service(pt);
- if ((lws_usec_t)timeout_ms * 1000 > t)
- timeout_ms = t / 1000;
- lws_pt_unlock(pt);
- }
-
- vpt->inside_poll = 1;
- lws_memory_barrier();
- n = poll(pt->fds, pt->fds_count, timeout_ms);
- vpt->inside_poll = 0;
- lws_memory_barrier();
-
- /* Collision will be rare and brief. Just spin until it completes */
- while (vpt->foreign_spinlock)
- ;
-
- /*
- * At this point we are not inside a foreign thread pollfd change,
- * and we have marked ourselves as outside the poll() wait. So we
- * are the only guys that can modify the lws_foreign_thread_pollfd
- * list on the pt. Drain the list and apply the changes to the
- * affected pollfds in the correct order.
- */
-
- lws_pt_lock(pt, __func__);
-
- ftp = vpt->foreign_pfd_list;
- //lwsl_notice("cleared list %p\n", ftp);
- while (ftp) {
- struct lws *wsi;
- struct lws_pollfd *pfd;
-
- next = ftp->next;
- pfd = &vpt->fds[ftp->fd_index];
- if (lws_socket_is_valid(pfd->fd)) {
- wsi = wsi_from_fd(context, pfd->fd);
- if (wsi)
- __lws_change_pollfd(wsi, ftp->_and, ftp->_or);
- }
- lws_free((void *)ftp);
- ftp = next;
- }
- vpt->foreign_pfd_list = NULL;
- lws_memory_barrier();
-
- /* we have come out of a poll wait... check the hrtimer list */
-
- __lws_hrtimer_service(pt);
-
- lws_pt_unlock(pt);
-
- m = 0;
-#if defined(LWS_ROLE_WS) && !defined(LWS_WITHOUT_EXTENSIONS)
- m |= !!pt->ws.rx_draining_ext_list;
-#endif
-
- if (pt->context->tls_ops &&
- pt->context->tls_ops->fake_POLLIN_for_buffered)
- m |= pt->context->tls_ops->fake_POLLIN_for_buffered(pt);
-
- if (!m && !n) { /* nothing to do */
- lws_service_fd_tsi(context, NULL, tsi);
- lws_service_do_ripe_rxflow(pt);
-
- return 0;
- }
-
-faked_service:
- m = lws_service_flag_pending(context, tsi);
- if (m)
- c = -1; /* unknown limit */
- else
- if (n < 0) {
- if (LWS_ERRNO != LWS_EINTR)
- return -1;
- return 0;
- } else
- c = n;
-
- /* any socket with events to service? */
- for (n = 0; n < (int)pt->fds_count && c; n++) {
- if (!pt->fds[n].revents)
- continue;
-
- c--;
-
- m = lws_service_fd_tsi(context, &pt->fds[n], tsi);
- if (m < 0)
- return -1;
- /* if something closed, retry this slot */
- if (m)
- n--;
- }
-
- lws_service_do_ripe_rxflow(pt);
-
- return 0;
-}
-
-LWS_VISIBLE int
-lws_plat_check_connection_error(struct lws *wsi)
-{
- return 0;
-}
-
-LWS_VISIBLE int
-lws_plat_service(struct lws_context *context, int timeout_ms)
-{
- return _lws_plat_service_tsi(context, timeout_ms, 0);
-}
-
-LWS_VISIBLE int
-lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
-{
- int optval = 1;
- socklen_t optlen = sizeof(optval);
-
-#if defined(__APPLE__) || \
- defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
- defined(__NetBSD__) || \
- defined(__OpenBSD__) || \
- defined(__HAIKU__)
- struct protoent *tcp_proto;
-#endif
-
- fcntl(fd, F_SETFD, FD_CLOEXEC);
-
- if (vhost->ka_time) {
- /* enable keepalive on this socket */
- optval = 1;
- if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
- (const void *)&optval, optlen) < 0)
- return 1;
-
-#if defined(__APPLE__) || \
- defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
- defined(__NetBSD__) || \
- defined(__CYGWIN__) || defined(__OpenBSD__) || defined (__sun) || \
- defined(__HAIKU__)
-
- /*
- * didn't find a way to set these per-socket, need to
- * tune kernel systemwide values
- */
-#else
- /* set the keepalive conditions we want on it too */
-
-#if defined(LWS_HAVE_TCP_USER_TIMEOUT)
- optval = 1000 * (vhost->ka_time +
- (vhost->ka_interval * vhost->ka_probes));
- if (setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT,
- (const void *)&optval, optlen) < 0)
- return 1;
-#endif
- optval = vhost->ka_time;
- if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE,
- (const void *)&optval, optlen) < 0)
- return 1;
-
- optval = vhost->ka_interval;
- if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL,
- (const void *)&optval, optlen) < 0)
- return 1;
-
- optval = vhost->ka_probes;
- if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT,
- (const void *)&optval, optlen) < 0)
- return 1;
-#endif
- }
-
-#if defined(SO_BINDTODEVICE)
- if (vhost->bind_iface && vhost->iface) {
- lwsl_info("binding listen skt to %s using SO_BINDTODEVICE\n", vhost->iface);
- if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, vhost->iface,
- strlen(vhost->iface)) < 0) {
- lwsl_warn("Failed to bind to device %s\n", vhost->iface);
- return 1;
- }
- }
-#endif
-
- /* Disable Nagle */
- optval = 1;
-#if defined (__sun) || defined(__QNX__)
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0)
- return 1;
-#elif !defined(__APPLE__) && \
- !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && \
- !defined(__NetBSD__) && \
- !defined(__OpenBSD__) && \
- !defined(__HAIKU__)
- if (setsockopt(fd, SOL_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0)
- return 1;
-#else
- tcp_proto = getprotobyname("TCP");
- if (setsockopt(fd, tcp_proto->p_proto, TCP_NODELAY, &optval, optlen) < 0)
- return 1;
-#endif
-
- /* We are nonblocking... */
- if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
- return 1;
-
- return 0;
-}
-
-#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
-static void
-_lws_plat_apply_caps(int mode, const cap_value_t *cv, int count)
-{
- cap_t caps;
-
- if (!count)
- return;
-
- caps = cap_get_proc();
-
- cap_set_flag(caps, mode, count, cv, CAP_SET);
- cap_set_proc(caps);
- prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
- cap_free(caps);
-}
-#endif
-
-LWS_VISIBLE void
-lws_plat_drop_app_privileges(const struct lws_context_creation_info *info)
-{
-#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
- int n;
-#endif
-
- if (info->gid && info->gid != -1)
- if (setgid(info->gid))
- lwsl_warn("setgid: %s\n", strerror(LWS_ERRNO));
-
- if (info->uid && info->uid != -1) {
- struct passwd *p = getpwuid(info->uid);
-
- if (p) {
-
-#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
- _lws_plat_apply_caps(CAP_PERMITTED, info->caps, info->count_caps);
-#endif
-
- initgroups(p->pw_name, info->gid);
- if (setuid(info->uid))
- lwsl_warn("setuid: %s\n", strerror(LWS_ERRNO));
- else
- lwsl_notice("Set privs to user '%s'\n", p->pw_name);
-
-#if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
- _lws_plat_apply_caps(CAP_EFFECTIVE, info->caps, info->count_caps);
-
- if (info->count_caps)
- for (n = 0; n < info->count_caps; n++)
- lwsl_notice(" RETAINING CAPABILITY %d\n", (int)info->caps[n]);
-#endif
-
- } else
- lwsl_warn("getpwuid: unable to find uid %d", info->uid);
- }
-}
-
-#ifdef LWS_WITH_PLUGINS
-
-#if defined(LWS_WITH_LIBUV) && UV_VERSION_MAJOR > 0
-
-/* libuv.c implements these in a cross-platform way */
-
-#else
-
-static int filter(const struct dirent *ent)
-{
- if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."))
- return 0;
-
- return 1;
-}
-
-LWS_VISIBLE int
-lws_plat_plugins_init(struct lws_context * context, const char * const *d)
-{
- struct lws_plugin_capability lcaps;
- struct lws_plugin *plugin;
- lws_plugin_init_func initfunc;
- struct dirent **namelist;
- int n, i, m, ret = 0;
- char path[256];
- void *l;
-
- lwsl_notice(" Plugins:\n");
-
- while (d && *d) {
- n = scandir(*d, &namelist, filter, alphasort);
- if (n < 0) {
- lwsl_err("Scandir on %s failed\n", *d);
- return 1;
- }
-
- for (i = 0; i < n; i++) {
- if (strlen(namelist[i]->d_name) < 7)
- goto inval;
-
- lwsl_notice(" %s\n", namelist[i]->d_name);
-
- lws_snprintf(path, sizeof(path) - 1, "%s/%s", *d,
- namelist[i]->d_name);
- l = dlopen(path, RTLD_NOW);
- if (!l) {
- lwsl_err("Error loading DSO: %s\n", dlerror());
- while (i++ < n)
- free(namelist[i]);
- goto bail;
- }
- /* we could open it, can we get his init function? */
- m = lws_snprintf(path, sizeof(path) - 1, "init_%s",
- namelist[i]->d_name + 3 /* snip lib... */);
- path[m - 3] = '\0'; /* snip the .so */
- initfunc = dlsym(l, path);
- if (!initfunc) {
- lwsl_err("Failed to get init on %s: %s",
- namelist[i]->d_name, dlerror());
- dlclose(l);
- }
- lcaps.api_magic = LWS_PLUGIN_API_MAGIC;
- m = initfunc(context, &lcaps);
- if (m) {
- lwsl_err("Initializing %s failed %d\n",
- namelist[i]->d_name, m);
- dlclose(l);
- goto skip;
- }
-
- plugin = lws_malloc(sizeof(*plugin), "plugin");
- if (!plugin) {
- lwsl_err("OOM\n");
- goto bail;
- }
- plugin->list = context->plugin_list;
- context->plugin_list = plugin;
- lws_strncpy(plugin->name, namelist[i]->d_name,
- sizeof(plugin->name));
- plugin->l = l;
- plugin->caps = lcaps;
- context->plugin_protocol_count += lcaps.count_protocols;
- context->plugin_extension_count += lcaps.count_extensions;
-
- free(namelist[i]);
- continue;
-
- skip:
- dlclose(l);
- inval:
- free(namelist[i]);
- }
- free(namelist);
- d++;
- }
-
-bail:
- free(namelist);
-
- return ret;
-}
-
-LWS_VISIBLE int
-lws_plat_plugins_destroy(struct lws_context * context)
-{
- struct lws_plugin *plugin = context->plugin_list, *p;
- lws_plugin_destroy_func func;
- char path[256];
- int m;
-
- if (!plugin)
- return 0;
-
- lwsl_notice("%s\n", __func__);
-
- while (plugin) {
- p = plugin;
- m = lws_snprintf(path, sizeof(path) - 1, "destroy_%s", plugin->name + 3);
- path[m - 3] = '\0';
- func = dlsym(plugin->l, path);
- if (!func) {
- lwsl_err("Failed to get destroy on %s: %s",
- plugin->name, dlerror());
- goto next;
- }
- m = func(context);
- if (m)
- lwsl_err("Initializing %s failed %d\n",
- plugin->name, m);
-next:
- dlclose(p->l);
- plugin = p->list;
- p->list = NULL;
- free(p);
- }
-
- context->plugin_list = NULL;
-
- return 0;
-}
-
-#endif
-#endif
-
-
-#if 0
-static void
-sigabrt_handler(int x)
-{
- printf("%s\n", __func__);
-}
-#endif
-
-LWS_VISIBLE int
-lws_plat_context_early_init(void)
-{
-#if !defined(LWS_AVOID_SIGPIPE_IGN)
- signal(SIGPIPE, SIG_IGN);
-#endif
-
- return 0;
-}
-
-LWS_VISIBLE void
-lws_plat_context_early_destroy(struct lws_context *context)
-{
-}
-
-LWS_VISIBLE void
-lws_plat_context_late_destroy(struct lws_context *context)
-{
-#ifdef LWS_WITH_PLUGINS
- if (context->plugin_list)
- lws_plat_plugins_destroy(context);
-#endif
-
- if (context->lws_lookup)
- lws_free(context->lws_lookup);
-
- if (!context->fd_random)
- lwsl_err("ZERO RANDOM FD\n");
- if (context->fd_random != LWS_INVALID_FILE)
- close(context->fd_random);
-}
-
-/* cast a struct sockaddr_in6 * into addr for ipv6 */
-
-LWS_VISIBLE int
-lws_interface_to_sa(int ipv6, const char *ifname, struct sockaddr_in *addr,
- size_t addrlen)
-{
- int rc = LWS_ITOSA_NOT_EXIST;
-
- struct ifaddrs *ifr;
- struct ifaddrs *ifc;
-#ifdef LWS_WITH_IPV6
- struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)addr;
-#endif
-
- getifaddrs(&ifr);
- for (ifc = ifr; ifc != NULL && rc; ifc = ifc->ifa_next) {
- if (!ifc->ifa_addr)
- continue;
-
- lwsl_debug(" interface %s vs %s (fam %d) ipv6 %d\n", ifc->ifa_name, ifname, ifc->ifa_addr->sa_family, ipv6);
-
- if (strcmp(ifc->ifa_name, ifname))
- continue;
-
- switch (ifc->ifa_addr->sa_family) {
-#if defined(AF_PACKET)
- case AF_PACKET:
- /* interface exists but is not usable */
- rc = LWS_ITOSA_NOT_USABLE;
- continue;
-#endif
-
- case AF_INET:
-#ifdef LWS_WITH_IPV6
- if (ipv6) {
- /* map IPv4 to IPv6 */
- bzero((char *)&addr6->sin6_addr,
- sizeof(struct in6_addr));
- addr6->sin6_addr.s6_addr[10] = 0xff;
- addr6->sin6_addr.s6_addr[11] = 0xff;
- memcpy(&addr6->sin6_addr.s6_addr[12],
- &((struct sockaddr_in *)ifc->ifa_addr)->sin_addr,
- sizeof(struct in_addr));
- } else
-#endif
- memcpy(addr,
- (struct sockaddr_in *)ifc->ifa_addr,
- sizeof(struct sockaddr_in));
- break;
-#ifdef LWS_WITH_IPV6
- case AF_INET6:
- memcpy(&addr6->sin6_addr,
- &((struct sockaddr_in6 *)ifc->ifa_addr)->sin6_addr,
- sizeof(struct in6_addr));
- break;
-#endif
- default:
- continue;
- }
- rc = LWS_ITOSA_USABLE;
- }
-
- freeifaddrs(ifr);
-
- if (rc) {
- /* check if bind to IP address */
-#ifdef LWS_WITH_IPV6
- if (inet_pton(AF_INET6, ifname, &addr6->sin6_addr) == 1)
- rc = LWS_ITOSA_USABLE;
- else
-#endif
- if (inet_pton(AF_INET, ifname, &addr->sin_addr) == 1)
- rc = LWS_ITOSA_USABLE;
- }
-
- return rc;
-}
-
-LWS_VISIBLE void
-lws_plat_insert_socket_into_fds(struct lws_context *context, struct lws *wsi)
-{
- struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
-
- if (context->event_loop_ops->io)
- context->event_loop_ops->io(wsi, LWS_EV_START | LWS_EV_READ);
-
- pt->fds[pt->fds_count++].revents = 0;
-}
-
-LWS_VISIBLE void
-lws_plat_delete_socket_from_fds(struct lws_context *context,
- struct lws *wsi, int m)
-{
- struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
-
- if (context->event_loop_ops->io)
- context->event_loop_ops->io(wsi,
- LWS_EV_STOP | LWS_EV_READ | LWS_EV_WRITE);
-
- pt->fds_count--;
-}
-
-LWS_VISIBLE void
-lws_plat_service_periodic(struct lws_context *context)
-{
- /* if our parent went down, don't linger around */
- if (context->started_with_parent &&
- kill(context->started_with_parent, 0) < 0)
- kill(getpid(), SIGTERM);
-}
-
-LWS_VISIBLE int
-lws_plat_change_pollfd(struct lws_context *context,
- struct lws *wsi, struct lws_pollfd *pfd)
-{
- return 0;
-}
-
-LWS_VISIBLE const char *
-lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt)
-{
- return inet_ntop(af, src, dst, cnt);
-}
-
-LWS_VISIBLE int
-lws_plat_inet_pton(int af, const char *src, void *dst)
-{
- return inet_pton(af, src, dst);
-}
-
-LWS_VISIBLE lws_fop_fd_t
-_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
- const char *vpath, lws_fop_flags_t *flags)
-{
- struct stat stat_buf;
- int ret = open(filename, (*flags) & LWS_FOP_FLAGS_MASK, 0664);
- lws_fop_fd_t fop_fd;
-
- if (ret < 0)
- return NULL;
-
- if (fstat(ret, &stat_buf) < 0)
- goto bail;
-
- fop_fd = malloc(sizeof(*fop_fd));
- if (!fop_fd)
- goto bail;
-
- fop_fd->fops = fops;
- fop_fd->flags = *flags;
- fop_fd->fd = ret;
- fop_fd->filesystem_priv = NULL; /* we don't use it */
- fop_fd->len = stat_buf.st_size;
- fop_fd->pos = 0;
-
- return fop_fd;
-
-bail:
- close(ret);
- return NULL;
-}
-
-LWS_VISIBLE int
-_lws_plat_file_close(lws_fop_fd_t *fop_fd)
-{
- int fd = (*fop_fd)->fd;
-
- free(*fop_fd);
- *fop_fd = NULL;
-
- return close(fd);
-}
-
-LWS_VISIBLE lws_fileofs_t
-_lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
-{
- lws_fileofs_t r;
-
- if (offset > 0 &&
- offset > (lws_fileofs_t)fop_fd->len - (lws_fileofs_t)fop_fd->pos)
- offset = fop_fd->len - fop_fd->pos;
-
- if ((lws_fileofs_t)fop_fd->pos + offset < 0)
- offset = -fop_fd->pos;
-
- r = lseek(fop_fd->fd, offset, SEEK_CUR);
-
- if (r >= 0)
- fop_fd->pos = r;
- else
- lwsl_err("error seeking from cur %ld, offset %ld\n",
- (long)fop_fd->pos, (long)offset);
-
- return r;
-}
-
-LWS_VISIBLE int
-_lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len)
-{
- long n;
-
- n = read((int)fop_fd->fd, buf, len);
- if (n == -1) {
- *amount = 0;
- return -1;
- }
- fop_fd->pos += n;
- lwsl_debug("%s: read %ld of req %ld, pos %ld, len %ld\n", __func__, n,
- (long)len, (long)fop_fd->pos, (long)fop_fd->len);
- *amount = n;
-
- return 0;
-}
-
-LWS_VISIBLE int
-_lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len)
-{
- long n;
-
- n = write((int)fop_fd->fd, buf, len);
- if (n == -1) {
- *amount = 0;
- return -1;
- }
-
- fop_fd->pos += n;
- *amount = n;
-
- return 0;
-}
-
-LWS_VISIBLE int
-lws_plat_init(struct lws_context *context,
- const struct lws_context_creation_info *info)
-{
- int fd;
-
- /* master context has the global fd lookup array */
- context->lws_lookup = lws_zalloc(sizeof(struct lws *) *
- context->max_fds, "lws_lookup");
- if (context->lws_lookup == NULL) {
- lwsl_err("OOM on lws_lookup array for %d connections\n",
- context->max_fds);
- return 1;
- }
-
- lwsl_info(" mem: platform fd map: %5lu bytes\n",
- (unsigned long)(sizeof(struct lws *) * context->max_fds));
- fd = open(SYSTEM_RANDOM_FILEPATH, O_RDONLY);
-
- context->fd_random = fd;
- if (context->fd_random < 0) {
- lwsl_err("Unable to open random device %s %d\n",
- SYSTEM_RANDOM_FILEPATH, context->fd_random);
- return 1;
- }
-
-#ifdef LWS_WITH_PLUGINS
- if (info->plugin_dirs)
- lws_plat_plugins_init(context, info->plugin_dirs);
-#endif
-
- return 0;
-}
-
-LWS_VISIBLE int
-lws_plat_write_cert(struct lws_vhost *vhost, int is_key, int fd, void *buf,
- int len)
-{
- int n;
-
- n = write(fd, buf, len);
-
- fsync(fd);
- lseek(fd, 0, SEEK_SET);
-
- return n != len;
-}
-
-LWS_VISIBLE int
-lws_plat_write_file(const char *filename, void *buf, int len)
-{
- int m, fd;
-
- fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
-
- if (fd == -1)
- return 1;
-
- m = write(fd, buf, len);
- close(fd);
-
- return m != len;
-}
-
-LWS_VISIBLE int
-lws_plat_read_file(const char *filename, void *buf, int len)
-{
- int n, fd = lws_open(filename, O_RDONLY);
- if (fd == -1)
- return -1;
-
- n = read(fd, buf, len);
- close(fd);
-
- return n;
-}
-
-LWS_VISIBLE int
-lws_plat_recommended_rsa_bits(void)
-{
- return 4096;
-}
diff --git a/thirdparty/libwebsockets/plat/lws-plat-win.c b/thirdparty/libwebsockets/plat/lws-plat-win.c
deleted file mode 100644
index 1850b64250..0000000000
--- a/thirdparty/libwebsockets/plat/lws-plat-win.c
+++ /dev/null
@@ -1,847 +0,0 @@
-#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
-#define _WINSOCK_DEPRECATED_NO_WARNINGS
-#endif
-#include "core/private.h"
-
-void lws_plat_apply_FD_CLOEXEC(int n)
-{
-}
-
-int
-lws_plat_socket_offset(void)
-{
- return 0;
-}
-
-int
-lws_plat_pipe_create(struct lws *wsi)
-{
- return 1;
-}
-
-int
-lws_plat_pipe_signal(struct lws *wsi)
-{
- struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
-
- WSASetEvent(pt->events[0]); /* trigger the cancel event */
-
- return 0;
-}
-
-void
-lws_plat_pipe_close(struct lws *wsi)
-{
-}
-
-unsigned long long
-time_in_microseconds()
-{
-#ifndef DELTA_EPOCH_IN_MICROSECS
-#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
-#endif
- FILETIME filetime;
- ULARGE_INTEGER datetime;
-
-#ifdef _WIN32_WCE
- GetCurrentFT(&filetime);
-#else
- GetSystemTimeAsFileTime(&filetime);
-#endif
-
- /*
- * As per Windows documentation for FILETIME, copy the resulting
- * FILETIME structure to a ULARGE_INTEGER structure using memcpy
- * (using memcpy instead of direct assignment can prevent alignment
- * faults on 64-bit Windows).
- */
- memcpy(&datetime, &filetime, sizeof(datetime));
-
- /* Windows file times are in 100s of nanoseconds. */
- return (datetime.QuadPart / 10) - DELTA_EPOCH_IN_MICROSECS;
-}
-
-#ifdef _WIN32_WCE
-time_t time(time_t *t)
-{
- time_t ret = time_in_microseconds() / 1000000;
-
- if(t != NULL)
- *t = ret;
-
- return ret;
-}
-#endif
-
-/* file descriptor hash management */
-
-struct lws *
-wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd)
-{
- int h = LWS_FD_HASH(fd);
- int n = 0;
-
- for (n = 0; n < context->fd_hashtable[h].length; n++)
- if (context->fd_hashtable[h].wsi[n]->desc.sockfd == fd)
- return context->fd_hashtable[h].wsi[n];
-
- return NULL;
-}
-
-int
-insert_wsi(struct lws_context *context, struct lws *wsi)
-{
- int h = LWS_FD_HASH(wsi->desc.sockfd);
-
- if (context->fd_hashtable[h].length == (getdtablesize() - 1)) {
- lwsl_err("hash table overflow\n");
- return 1;
- }
-
- context->fd_hashtable[h].wsi[context->fd_hashtable[h].length++] = wsi;
-
- return 0;
-}
-
-int
-delete_from_fd(struct lws_context *context, lws_sockfd_type fd)
-{
- int h = LWS_FD_HASH(fd);
- int n = 0;
-
- for (n = 0; n < context->fd_hashtable[h].length; n++)
- if (context->fd_hashtable[h].wsi[n]->desc.sockfd == fd) {
- while (n < context->fd_hashtable[h].length) {
- context->fd_hashtable[h].wsi[n] =
- context->fd_hashtable[h].wsi[n + 1];
- n++;
- }
- context->fd_hashtable[h].length--;
-
- return 0;
- }
-
- lwsl_err("Failed to find fd %d requested for "
- "delete in hashtable\n", fd);
- return 1;
-}
-
-LWS_VISIBLE int
-lws_get_random(struct lws_context *context, void *buf, int len)
-{
- int n;
- char *p = (char *)buf;
-
- for (n = 0; n < len; n++)
- p[n] = (unsigned char)rand();
-
- return n;
-}
-
-LWS_VISIBLE int
-lws_send_pipe_choked(struct lws *wsi)
-{ struct lws *wsi_eff = wsi;
-
-#if defined(LWS_WITH_HTTP2)
- wsi_eff = lws_get_network_wsi(wsi);
-#endif
- /* the fact we checked implies we avoided back-to-back writes */
- wsi_eff->could_have_pending = 0;
-
- /* treat the fact we got a truncated send pending as if we're choked */
- if (wsi_eff->trunc_len)
- return 1;
-
- return (int)wsi_eff->sock_send_blocking;
-}
-
-LWS_VISIBLE int
-lws_poll_listen_fd(struct lws_pollfd *fd)
-{
- fd_set readfds;
- struct timeval tv = { 0, 0 };
-
- assert((fd->events & LWS_POLLIN) == LWS_POLLIN);
-
- FD_ZERO(&readfds);
- FD_SET(fd->fd, &readfds);
-
- return select(((int)fd->fd) + 1, &readfds, NULL, NULL, &tv);
-}
-
-LWS_VISIBLE void
-lwsl_emit_syslog(int level, const char *line)
-{
- lwsl_emit_stderr(level, line);
-}
-
-LWS_VISIBLE LWS_EXTERN int
-_lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
-{
- struct lws_context_per_thread *pt;
- WSANETWORKEVENTS networkevents;
- struct lws_pollfd *pfd;
- struct lws *wsi;
- unsigned int i;
- DWORD ev;
- int n, m;
-
- /* stay dead once we are dead */
- if (context == NULL || !context->vhost_list)
- return 1;
-
- pt = &context->pt[tsi];
-
- if (!context->service_tid_detected) {
- struct lws _lws;
-
- memset(&_lws, 0, sizeof(_lws));
- _lws.context = context;
-
- context->service_tid_detected = context->vhost_list->
- protocols[0].callback(&_lws, LWS_CALLBACK_GET_THREAD_ID,
- NULL, NULL, 0);
- context->service_tid = context->service_tid_detected;
- context->service_tid_detected = 1;
- }
-
- if (timeout_ms < 0) {
- if (lws_service_flag_pending(context, tsi)) {
- /* any socket with events to service? */
- for (n = 0; n < (int)pt->fds_count; n++) {
- if (!pt->fds[n].revents)
- continue;
-
- m = lws_service_fd_tsi(context, &pt->fds[n], tsi);
- if (m < 0)
- return -1;
- /* if something closed, retry this slot */
- if (m)
- n--;
- }
- }
- return 0;
- }
-
- if (context->event_loop_ops->run_pt)
- context->event_loop_ops->run_pt(context, tsi);
-
- for (i = 0; i < pt->fds_count; ++i) {
- pfd = &pt->fds[i];
-
- if (!(pfd->events & LWS_POLLOUT))
- continue;
-
- wsi = wsi_from_fd(context, pfd->fd);
- if (!wsi || wsi->listener)
- continue;
- if (wsi->sock_send_blocking)
- continue;
- pfd->revents = LWS_POLLOUT;
- n = lws_service_fd(context, pfd);
- if (n < 0)
- return -1;
-
- /* Force WSAWaitForMultipleEvents() to check events and then return immediately. */
- timeout_ms = 0;
-
- /* if something closed, retry this slot */
- if (n)
- i--;
- }
-
- /*
- * is there anybody with pending stuff that needs service forcing?
- */
- if (!lws_service_adjust_timeout(context, 1, tsi)) {
- /* -1 timeout means just do forced service */
- _lws_plat_service_tsi(context, -1, pt->tid);
- /* still somebody left who wants forced service? */
- if (!lws_service_adjust_timeout(context, 1, pt->tid))
- /* yes... come back again quickly */
- timeout_ms = 0;
- }
-
- if (timeout_ms) {
- lws_usec_t t;
-
- lws_pt_lock(pt, __func__);
- /* don't stay in poll wait longer than next hr timeout */
- t = __lws_hrtimer_service(pt);
-
- if ((lws_usec_t)timeout_ms * 1000 > t)
- timeout_ms = (int)(t / 1000);
- lws_pt_unlock(pt);
- }
-
- ev = WSAWaitForMultipleEvents(1, pt->events, FALSE, timeout_ms, FALSE);
- if (ev == WSA_WAIT_EVENT_0) {
- unsigned int eIdx, err;
-
- WSAResetEvent(pt->events[0]);
-
- if (pt->context->tls_ops &&
- pt->context->tls_ops->fake_POLLIN_for_buffered)
- pt->context->tls_ops->fake_POLLIN_for_buffered(pt);
-
- for (eIdx = 0; eIdx < pt->fds_count; ++eIdx) {
- if (WSAEnumNetworkEvents(pt->fds[eIdx].fd, 0,
- &networkevents) == SOCKET_ERROR) {
- lwsl_err("WSAEnumNetworkEvents() failed "
- "with error %d\n", LWS_ERRNO);
- return -1;
- }
-
- pfd = &pt->fds[eIdx];
- pfd->revents = (short)networkevents.lNetworkEvents;
-
- err = networkevents.iErrorCode[FD_CONNECT_BIT];
-
- if ((networkevents.lNetworkEvents & FD_CONNECT) &&
- err && err != LWS_EALREADY &&
- err != LWS_EINPROGRESS && err != LWS_EWOULDBLOCK &&
- err != WSAEINVAL) {
- lwsl_debug("Unable to connect errno=%d\n", err);
- pfd->revents |= LWS_POLLHUP;
- }
-
- if (pfd->revents & LWS_POLLOUT) {
- wsi = wsi_from_fd(context, pfd->fd);
- if (wsi)
- wsi->sock_send_blocking = 0;
- }
- /* if something closed, retry this slot */
- if (pfd->revents & LWS_POLLHUP)
- --eIdx;
-
- if (pfd->revents) {
- recv(pfd->fd, NULL, 0, 0);
- lws_service_fd_tsi(context, pfd, tsi);
- }
- }
- }
-
- context->service_tid = 0;
-
- if (ev == WSA_WAIT_TIMEOUT)
- lws_service_fd(context, NULL);
-
- return 0;
-}
-
-LWS_VISIBLE int
-lws_plat_service(struct lws_context *context, int timeout_ms)
-{
- return _lws_plat_service_tsi(context, timeout_ms, 0);
-}
-
-LWS_VISIBLE int
-lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd)
-{
- int optval = 1;
- int optlen = sizeof(optval);
- u_long optl = 1;
- DWORD dwBytesRet;
- struct tcp_keepalive alive;
- int protonbr;
-#ifndef _WIN32_WCE
- struct protoent *tcp_proto;
-#endif
-
- if (vhost->ka_time) {
- /* enable keepalive on this socket */
- optval = 1;
- if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
- (const char *)&optval, optlen) < 0)
- return 1;
-
- alive.onoff = TRUE;
- alive.keepalivetime = vhost->ka_time;
- alive.keepaliveinterval = vhost->ka_interval;
-
- if (WSAIoctl(fd, SIO_KEEPALIVE_VALS, &alive, sizeof(alive),
- NULL, 0, &dwBytesRet, NULL, NULL))
- return 1;
- }
-
- /* Disable Nagle */
- optval = 1;
-#ifndef _WIN32_WCE
- tcp_proto = getprotobyname("TCP");
- if (!tcp_proto) {
- lwsl_err("getprotobyname() failed with error %d\n", LWS_ERRNO);
- return 1;
- }
- protonbr = tcp_proto->p_proto;
-#else
- protonbr = 6;
-#endif
-
- setsockopt(fd, protonbr, TCP_NODELAY, (const char *)&optval, optlen);
-
- /* We are nonblocking... */
- ioctlsocket(fd, FIONBIO, &optl);
-
- return 0;
-}
-
-LWS_VISIBLE void
-lws_plat_drop_app_privileges(const struct lws_context_creation_info *info)
-{
-}
-
-LWS_VISIBLE int
-lws_plat_context_early_init(void)
-{
- WORD wVersionRequested;
- WSADATA wsaData;
- int err;
-
- /* Use the MAKEWORD(lowbyte, highbyte) macro from Windef.h */
- wVersionRequested = MAKEWORD(2, 2);
-
- err = WSAStartup(wVersionRequested, &wsaData);
- if (!err)
- return 0;
- /*
- * Tell the user that we could not find a usable
- * Winsock DLL
- */
- lwsl_err("WSAStartup failed with error: %d\n", err);
-
- return 1;
-}
-
-LWS_VISIBLE void
-lws_plat_context_early_destroy(struct lws_context *context)
-{
- struct lws_context_per_thread *pt = &context->pt[0];
- int n = context->count_threads;
-
- while (n--) {
- if (pt->events) {
- WSACloseEvent(pt->events[0]);
- lws_free(pt->events);
- }
- pt++;
- }
-}
-
-LWS_VISIBLE void
-lws_plat_context_late_destroy(struct lws_context *context)
-{
- int n;
-
- for (n = 0; n < FD_HASHTABLE_MODULUS; n++) {
- if (context->fd_hashtable[n].wsi)
- lws_free(context->fd_hashtable[n].wsi);
- }
-
- WSACleanup();
-}
-
-LWS_VISIBLE LWS_EXTERN int
-lws_interface_to_sa(int ipv6,
- const char *ifname, struct sockaddr_in *addr, size_t addrlen)
-{
-#ifdef LWS_WITH_IPV6
- struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)addr;
-
- if (ipv6) {
- if (lws_plat_inet_pton(AF_INET6, ifname, &addr6->sin6_addr) == 1) {
- return LWS_ITOSA_USABLE;
- }
- }
-#endif
-
- long long address = inet_addr(ifname);
-
- if (address == INADDR_NONE) {
- struct hostent *entry = gethostbyname(ifname);
- if (entry)
- address = ((struct in_addr *)entry->h_addr_list[0])->s_addr;
- }
-
- if (address == INADDR_NONE)
- return LWS_ITOSA_NOT_EXIST;
-
- addr->sin_addr.s_addr = (unsigned long)(lws_intptr_t)address;
-
- return LWS_ITOSA_USABLE;
-}
-
-LWS_VISIBLE void
-lws_plat_insert_socket_into_fds(struct lws_context *context, struct lws *wsi)
-{
- struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
-
- pt->fds[pt->fds_count++].revents = 0;
- pt->events[pt->fds_count] = pt->events[0];
- WSAEventSelect(wsi->desc.sockfd, pt->events[0],
- LWS_POLLIN | LWS_POLLHUP | FD_CONNECT);
-}
-
-LWS_VISIBLE void
-lws_plat_delete_socket_from_fds(struct lws_context *context,
- struct lws *wsi, int m)
-{
- struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
-
- pt->events[m + 1] = pt->events[pt->fds_count--];
-}
-
-LWS_VISIBLE void
-lws_plat_service_periodic(struct lws_context *context)
-{
-}
-
-LWS_VISIBLE int
-lws_plat_check_connection_error(struct lws *wsi)
-{
- int optVal;
- int optLen = sizeof(int);
-
- if (getsockopt(wsi->desc.sockfd, SOL_SOCKET, SO_ERROR,
- (char*)&optVal, &optLen) != SOCKET_ERROR && optVal &&
- optVal != LWS_EALREADY && optVal != LWS_EINPROGRESS &&
- optVal != LWS_EWOULDBLOCK && optVal != WSAEINVAL) {
- lwsl_debug("Connect failed SO_ERROR=%d\n", optVal);
- return 1;
- }
-
- return 0;
-}
-
-LWS_VISIBLE int
-lws_plat_change_pollfd(struct lws_context *context,
- struct lws *wsi, struct lws_pollfd *pfd)
-{
- struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
- long networkevents = LWS_POLLHUP | FD_CONNECT;
-
- if ((pfd->events & LWS_POLLIN))
- networkevents |= LWS_POLLIN;
-
- if ((pfd->events & LWS_POLLOUT))
- networkevents |= LWS_POLLOUT;
-
- if (WSAEventSelect(wsi->desc.sockfd,
- pt->events[0],
- networkevents) != SOCKET_ERROR)
- return 0;
-
- lwsl_err("WSAEventSelect() failed with error %d\n", LWS_ERRNO);
-
- return 1;
-}
-
-LWS_VISIBLE const char *
-lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt)
-{
- WCHAR *buffer;
- DWORD bufferlen = cnt;
- BOOL ok = FALSE;
-
- buffer = lws_malloc(bufferlen * 2, "inet_ntop");
- if (!buffer) {
- lwsl_err("Out of memory\n");
- return NULL;
- }
-
- if (af == AF_INET) {
- struct sockaddr_in srcaddr;
- bzero(&srcaddr, sizeof(srcaddr));
- srcaddr.sin_family = AF_INET;
- memcpy(&(srcaddr.sin_addr), src, sizeof(srcaddr.sin_addr));
-
- if (!WSAAddressToStringW((struct sockaddr*)&srcaddr, sizeof(srcaddr), 0, buffer, &bufferlen))
- ok = TRUE;
-#ifdef LWS_WITH_IPV6
- } else if (af == AF_INET6) {
- struct sockaddr_in6 srcaddr;
- bzero(&srcaddr, sizeof(srcaddr));
- srcaddr.sin6_family = AF_INET6;
- memcpy(&(srcaddr.sin6_addr), src, sizeof(srcaddr.sin6_addr));
-
- if (!WSAAddressToStringW((struct sockaddr*)&srcaddr, sizeof(srcaddr), 0, buffer, &bufferlen))
- ok = TRUE;
-#endif
- } else
- lwsl_err("Unsupported type\n");
-
- if (!ok) {
- int rv = WSAGetLastError();
- lwsl_err("WSAAddressToString() : %d\n", rv);
- } else {
- if (WideCharToMultiByte(CP_ACP, 0, buffer, bufferlen, dst, cnt, 0, NULL) <= 0)
- ok = FALSE;
- }
-
- lws_free(buffer);
- return ok ? dst : NULL;
-}
-
-LWS_VISIBLE int
-lws_plat_inet_pton(int af, const char *src, void *dst)
-{
- WCHAR *buffer;
- DWORD bufferlen = (int)strlen(src) + 1;
- BOOL ok = FALSE;
-
- buffer = lws_malloc(bufferlen * 2, "inet_pton");
- if (!buffer) {
- lwsl_err("Out of memory\n");
- return -1;
- }
-
- if (MultiByteToWideChar(CP_ACP, 0, src, bufferlen, buffer, bufferlen) <= 0) {
- lwsl_err("Failed to convert multi byte to wide char\n");
- lws_free(buffer);
- return -1;
- }
-
- if (af == AF_INET) {
- struct sockaddr_in dstaddr;
- int dstaddrlen = sizeof(dstaddr);
- bzero(&dstaddr, sizeof(dstaddr));
- dstaddr.sin_family = AF_INET;
-
- if (!WSAStringToAddressW(buffer, af, 0, (struct sockaddr *) &dstaddr, &dstaddrlen)) {
- ok = TRUE;
- memcpy(dst, &dstaddr.sin_addr, sizeof(dstaddr.sin_addr));
- }
-#ifdef LWS_WITH_IPV6
- } else if (af == AF_INET6) {
- struct sockaddr_in6 dstaddr;
- int dstaddrlen = sizeof(dstaddr);
- bzero(&dstaddr, sizeof(dstaddr));
- dstaddr.sin6_family = AF_INET6;
-
- if (!WSAStringToAddressW(buffer, af, 0, (struct sockaddr *) &dstaddr, &dstaddrlen)) {
- ok = TRUE;
- memcpy(dst, &dstaddr.sin6_addr, sizeof(dstaddr.sin6_addr));
- }
-#endif
- } else
- lwsl_err("Unsupported type\n");
-
- if (!ok) {
- int rv = WSAGetLastError();
- lwsl_err("WSAAddressToString() : %d\n", rv);
- }
-
- lws_free(buffer);
- return ok ? 1 : -1;
-}
-
-LWS_VISIBLE lws_fop_fd_t
-_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
- const char *vpath, lws_fop_flags_t *flags)
-{
- HANDLE ret;
- WCHAR buf[MAX_PATH];
- lws_fop_fd_t fop_fd;
- FILE_STANDARD_INFO fInfo = {0};
-
- MultiByteToWideChar(CP_UTF8, 0, filename, -1, buf, LWS_ARRAY_SIZE(buf));
-
-#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0602 // Windows 8 (minimum when UWP_ENABLED, but can be used in Windows builds)
- CREATEFILE2_EXTENDED_PARAMETERS extParams = {0};
- extParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
-
- if (((*flags) & 7) == _O_RDONLY) {
- ret = CreateFile2(buf, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extParams);
- } else {
- ret = CreateFile2(buf, GENERIC_WRITE, 0, CREATE_ALWAYS, &extParams);
- }
-#else
- if (((*flags) & 7) == _O_RDONLY) {
- ret = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- } else {
- ret = CreateFileW(buf, GENERIC_WRITE, 0, NULL,
- CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- }
-#endif
-
- if (ret == LWS_INVALID_FILE)
- goto bail;
-
- fop_fd = malloc(sizeof(*fop_fd));
- if (!fop_fd)
- goto bail;
-
- fop_fd->fops = fops;
- fop_fd->fd = ret;
- fop_fd->filesystem_priv = NULL; /* we don't use it */
- fop_fd->flags = *flags;
- fop_fd->len = 0;
- if(GetFileInformationByHandleEx(ret, FileStandardInfo, &fInfo, sizeof(fInfo)))
- fop_fd->len = fInfo.EndOfFile.QuadPart;
-
- fop_fd->pos = 0;
-
- return fop_fd;
-
-bail:
- return NULL;
-}
-
-LWS_VISIBLE int
-_lws_plat_file_close(lws_fop_fd_t *fop_fd)
-{
- HANDLE fd = (*fop_fd)->fd;
-
- free(*fop_fd);
- *fop_fd = NULL;
-
- CloseHandle((HANDLE)fd);
-
- return 0;
-}
-
-LWS_VISIBLE lws_fileofs_t
-_lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
-{
- LARGE_INTEGER l;
-
- l.QuadPart = offset;
- return SetFilePointerEx((HANDLE)fop_fd->fd, l, NULL, FILE_CURRENT);
-}
-
-LWS_VISIBLE int
-_lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t *buf, lws_filepos_t len)
-{
- DWORD _amount;
-
- if (!ReadFile((HANDLE)fop_fd->fd, buf, (DWORD)len, &_amount, NULL)) {
- *amount = 0;
-
- return 1;
- }
-
- fop_fd->pos += _amount;
- *amount = (unsigned long)_amount;
-
- return 0;
-}
-
-LWS_VISIBLE int
-_lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
- uint8_t* buf, lws_filepos_t len)
-{
- DWORD _amount;
-
- if (!WriteFile((HANDLE)fop_fd->fd, buf, (DWORD)len, &_amount, NULL)) {
- *amount = 0;
-
- return 1;
- }
-
- fop_fd->pos += _amount;
- *amount = (unsigned long)_amount;
-
- return 0;
-}
-
-LWS_VISIBLE int
-lws_plat_init(struct lws_context *context,
- const struct lws_context_creation_info *info)
-{
- struct lws_context_per_thread *pt = &context->pt[0];
- int i, n = context->count_threads;
-
- for (i = 0; i < FD_HASHTABLE_MODULUS; i++) {
- context->fd_hashtable[i].wsi =
- lws_zalloc(sizeof(struct lws*) * context->max_fds, "win hashtable");
-
- if (!context->fd_hashtable[i].wsi)
- return -1;
- }
-
- while (n--) {
- pt->events = lws_malloc(sizeof(WSAEVENT) *
- (context->fd_limit_per_thread + 1), "event table");
- if (pt->events == NULL) {
- lwsl_err("Unable to allocate events array for %d connections\n",
- context->fd_limit_per_thread + 1);
- return 1;
- }
-
- pt->fds_count = 0;
- pt->events[0] = WSACreateEvent(); /* the cancel event */
-
- pt++;
- }
-
- context->fd_random = 0;
-
-#ifdef LWS_WITH_PLUGINS
- if (info->plugin_dirs)
- lws_plat_plugins_init(context, info->plugin_dirs);
-#endif
-
- return 0;
-}
-
-
-int kill(int pid, int sig)
-{
- lwsl_err("Sorry Windows doesn't support kill().");
- exit(0);
-}
-
-int fork(void)
-{
- lwsl_err("Sorry Windows doesn't support fork().");
- exit(0);
-}
-
-LWS_VISIBLE int
-lws_plat_write_cert(struct lws_vhost *vhost, int is_key, int fd, void *buf,
- int len)
-{
- int n;
-
- n = write(fd, buf, len);
-
- lseek(fd, 0, SEEK_SET);
-
- return n != len;
-}
-
-LWS_VISIBLE int
-lws_plat_write_file(const char *filename, void *buf, int len)
-{
- int m, fd;
-
- fd = lws_open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
-
- if (fd == -1)
- return -1;
-
- m = write(fd, buf, len);
- close(fd);
-
- return m != len;
-}
-
-LWS_VISIBLE int
-lws_plat_read_file(const char *filename, void *buf, int len)
-{
- int n, fd = lws_open(filename, O_RDONLY);
- if (fd == -1)
- return -1;
-
- n = read(fd, buf, len);
- close(fd);
-
- return n;
-}
-
-LWS_VISIBLE int
-lws_plat_recommended_rsa_bits(void)
-{
- return 4096;
-}
diff --git a/thirdparty/libwebsockets/roles/http/server/access-log.c b/thirdparty/libwebsockets/roles/http/server/access-log.c
deleted file mode 100644
index 0e75309d7a..0000000000
--- a/thirdparty/libwebsockets/roles/http/server/access-log.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * libwebsockets - server access log handling
- *
- * Copyright (C) 2010-2017 Andy Green <andy@warmcat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation:
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#include "core/private.h"
-
-/*
- * Produce Apache-compatible log string for wsi, like this:
- *
- * 2.31.234.19 - - [27/Mar/2016:03:22:44 +0800]
- * "GET /aep-screen.png HTTP/1.1"
- * 200 152987 "https://libwebsockets.org/index.html"
- * "Mozilla/5.0 (Macint... Chrome/49.0.2623.87 Safari/537.36"
- *
- */
-
-extern const char * const method_names[];
-
-static const char * const hver[] = {
- "HTTP/1.0", "HTTP/1.1", "HTTP/2"
-};
-
-void
-lws_prepare_access_log_info(struct lws *wsi, char *uri_ptr, int meth)
-{
-#ifdef LWS_WITH_IPV6
- char ads[INET6_ADDRSTRLEN];
-#else
- char ads[INET_ADDRSTRLEN];
-#endif
- char da[64];
- const char *pa, *me;
- struct tm *tmp;
- time_t t = time(NULL);
- int l = 256, m;
-
- if (!wsi->vhost)
- return;
-
- /* only worry about preparing it if we store it */
- if (wsi->vhost->log_fd == (int)LWS_INVALID_FILE)
- return;
-
- if (wsi->access_log_pending)
- lws_access_log(wsi);
-
- wsi->http.access_log.header_log = lws_malloc(l, "access log");
- if (wsi->http.access_log.header_log) {
-
- tmp = localtime(&t);
- if (tmp)
- strftime(da, sizeof(da), "%d/%b/%Y:%H:%M:%S %z", tmp);
- else
- strcpy(da, "01/Jan/1970:00:00:00 +0000");
-
- pa = lws_get_peer_simple(wsi, ads, sizeof(ads));
- if (!pa)
- pa = "(unknown)";
-
- if (wsi->http2_substream)
- me = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HTTP_COLON_METHOD);
- else
- me = method_names[meth];
- if (!me)
- me = "(null)";
-
- lws_snprintf(wsi->http.access_log.header_log, l,
- "%s - - [%s] \"%s %s %s\"",
- pa, da, me, uri_ptr,
- hver[wsi->http.request_version]);
-
- l = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_USER_AGENT);
- if (l) {
- wsi->http.access_log.user_agent = lws_malloc(l + 2, "access log");
- if (!wsi->http.access_log.user_agent) {
- lwsl_err("OOM getting user agent\n");
- lws_free_set_NULL(wsi->http.access_log.header_log);
- return;
- }
-
- lws_hdr_copy(wsi, wsi->http.access_log.user_agent,
- l + 1, WSI_TOKEN_HTTP_USER_AGENT);
-
- for (m = 0; m < l; m++)
- if (wsi->http.access_log.user_agent[m] == '\"')
- wsi->http.access_log.user_agent[m] = '\'';
- }
- l = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_REFERER);
- if (l) {
- wsi->http.access_log.referrer = lws_malloc(l + 2, "referrer");
- if (!wsi->http.access_log.referrer) {
- lwsl_err("OOM getting user agent\n");
- lws_free_set_NULL(wsi->http.access_log.user_agent);
- lws_free_set_NULL(wsi->http.access_log.header_log);
- return;
- }
- lws_hdr_copy(wsi, wsi->http.access_log.referrer,
- l + 1, WSI_TOKEN_HTTP_REFERER);
-
- for (m = 0; m < l; m++)
- if (wsi->http.access_log.referrer[m] == '\"')
- wsi->http.access_log.referrer[m] = '\'';
- }
- wsi->access_log_pending = 1;
- }
-}
-
-
-int
-lws_access_log(struct lws *wsi)
-{
- char *p = wsi->http.access_log.user_agent, ass[512],
- *p1 = wsi->http.access_log.referrer;
- int l;
-
- if (!wsi->vhost)
- return 0;
-
- if (wsi->vhost->log_fd == (int)LWS_INVALID_FILE)
- return 0;
-
- if (!wsi->access_log_pending)
- return 0;
-
- if (!wsi->http.access_log.header_log)
- return 0;
-
- if (!p)
- p = "";
-
- if (!p1)
- p1 = "";
-
- /*
- * We do this in two parts to restrict an oversize referrer such that
- * we will always have space left to append an empty useragent, while
- * maintaining the structure of the log text
- */
- l = lws_snprintf(ass, sizeof(ass) - 7, "%s %d %lu \"%s",
- wsi->http.access_log.header_log,
- wsi->http.access_log.response, wsi->http.access_log.sent, p1);
- if (strlen(p) > sizeof(ass) - 6 - l)
- p[sizeof(ass) - 6 - l] = '\0';
- l += lws_snprintf(ass + l, sizeof(ass) - 1 - l, "\" \"%s\"\n", p);
-
- if (write(wsi->vhost->log_fd, ass, l) != l)
- lwsl_err("Failed to write log\n");
-
- if (wsi->http.access_log.header_log) {
- lws_free(wsi->http.access_log.header_log);
- wsi->http.access_log.header_log = NULL;
- }
- if (wsi->http.access_log.user_agent) {
- lws_free(wsi->http.access_log.user_agent);
- wsi->http.access_log.user_agent = NULL;
- }
- if (wsi->http.access_log.referrer) {
- lws_free(wsi->http.access_log.referrer);
- wsi->http.access_log.referrer = NULL;
- }
- wsi->access_log_pending = 0;
-
- return 0;
-}
-
diff --git a/thirdparty/libwebsockets/uwp_fixes.diff b/thirdparty/libwebsockets/uwp_fixes.diff
index 21c3275bba..3350f2a661 100644
--- a/thirdparty/libwebsockets/uwp_fixes.diff
+++ b/thirdparty/libwebsockets/uwp_fixes.diff
@@ -1,8 +1,8 @@
-diff --git a/thirdparty/libwebsockets/plat/lws-plat-win.c b/thirdparty/libwebsockets/plat/lws-plat-win.c
-index bd513b494..1850b6425 100644
---- a/thirdparty/libwebsockets/plat/lws-plat-win.c
-+++ b/thirdparty/libwebsockets/plat/lws-plat-win.c
-@@ -641,9 +641,20 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+diff --git a/thirdparty/libwebsockets/lib/plat/windows/windows-file.c b/thirdparty/libwebsockets/lib/plat/windows/windows-file.c
+index 6516b70b0..eb73aab7f 100644
+--- a/thirdparty/libwebsockets/lib/plat/windows/windows-file.c
++++ b/thirdparty/libwebsockets/lib/plat/windows/windows-file.c
+@@ -36,9 +36,20 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
HANDLE ret;
WCHAR buf[MAX_PATH];
lws_fop_fd_t fop_fd;
@@ -24,7 +24,7 @@ index bd513b494..1850b6425 100644
if (((*flags) & 7) == _O_RDONLY) {
ret = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-@@ -651,6 +662,7 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+@@ -46,6 +57,7 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
ret = CreateFileW(buf, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
}
@@ -32,7 +32,7 @@ index bd513b494..1850b6425 100644
if (ret == LWS_INVALID_FILE)
goto bail;
-@@ -663,9 +675,9 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+@@ -58,9 +70,9 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
fop_fd->fd = ret;
fop_fd->filesystem_priv = NULL; /* we don't use it */
fop_fd->flags = *flags;
diff --git a/thirdparty/libwebsockets/win32helpers/getopt.c b/thirdparty/libwebsockets/win32helpers/getopt.c
index 3bb21f6f28..2181f1cb12 100644
--- a/thirdparty/libwebsockets/win32helpers/getopt.c
+++ b/thirdparty/libwebsockets/win32helpers/getopt.c
@@ -1,153 +1,153 @@
-/* $NetBSD: getopt.c,v 1.16 1999/12/02 13:15:56 kleink Exp $ */
-
-/*
- * Copyright (c) 1987, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if 0
-static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95";
-#endif
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define __P(x) x
-#define _DIAGASSERT(x) assert(x)
-
-#ifdef __weak_alias
-__weak_alias(getopt,_getopt);
-#endif
-
-
-int opterr = 1, /* if error message should be printed */
- optind = 1, /* index into parent argv vector */
- optopt, /* character checked for validity */
- optreset; /* reset getopt */
-char *optarg; /* argument associated with option */
-
-static char * _progname __P((char *));
-int getopt_internal __P((int, char * const *, const char *));
-
-static char *
-_progname(nargv0)
- char * nargv0;
-{
- char * tmp;
-
- _DIAGASSERT(nargv0 != NULL);
-
- tmp = strrchr(nargv0, '/');
- if (tmp)
- tmp++;
- else
- tmp = nargv0;
- return(tmp);
-}
-
-#define BADCH (int)'?'
-#define BADARG (int)':'
-#define EMSG ""
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt(nargc, nargv, ostr)
- int nargc;
- char * const nargv[];
- const char *ostr;
-{
- static char *__progname = 0;
- static char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
- __progname = __progname?__progname:_progname(*nargv);
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(ostr != NULL);
-
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc || *(place = nargv[optind]) != '-') {
- place = EMSG;
- return (-1);
- }
- if (place[1] && *++place == '-' /* found "--" */
- && place[1] == '\0') {
- ++optind;
- place = EMSG;
- return (-1);
- }
- } /* option letter okay? */
- if ((optopt = (int)*place++) == (int)':' ||
- !(oli = strchr(ostr, optopt))) {
- /*
- * if the user didn't specify '-' as an option,
- * assume it means -1.
- */
- if (optopt == (int)'-')
- return (-1);
- if (!*place)
- ++optind;
- if (opterr && *ostr != ':')
- (void)fprintf(stderr,
- "%s: illegal option -- %c\n", __progname, optopt);
- return (BADCH);
- }
- if (*++oli != ':') { /* don't need argument */
- optarg = NULL;
- if (!*place)
- ++optind;
- }
- else { /* need an argument */
- if (*place) /* no white space */
- optarg = place;
- else if (nargc <= ++optind) { /* no arg */
- place = EMSG;
- if (*ostr == ':')
- return (BADARG);
- if (opterr)
- (void)fprintf(stderr,
- "%s: option requires an argument -- %c\n",
- __progname, optopt);
- return (BADCH);
- }
- else /* white space */
- optarg = nargv[optind];
- place = EMSG;
- ++optind;
- }
- return (optopt); /* dump back option letter */
-}
-
+/* $NetBSD: getopt.c,v 1.16 1999/12/02 13:15:56 kleink Exp $ */
+
+/*
+ * Copyright (c) 1987, 1993, 1994
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if 0
+static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95";
+#endif
+
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+
+#define __P(x) x
+#define _DIAGASSERT(x) assert(x)
+
+#ifdef __weak_alias
+__weak_alias(getopt,_getopt);
+#endif
+
+
+int opterr = 1, /* if error message should be printed */
+ optind = 1, /* index into parent argv vector */
+ optopt, /* character checked for validity */
+ optreset; /* reset getopt */
+char *optarg; /* argument associated with option */
+
+static char * _progname __P((char *));
+int getopt_internal __P((int, char * const *, const char *));
+
+static char *
+_progname(nargv0)
+ char * nargv0;
+{
+ char * tmp;
+
+ _DIAGASSERT(nargv0 != NULL);
+
+ tmp = strrchr(nargv0, '/');
+ if (tmp)
+ tmp++;
+ else
+ tmp = nargv0;
+ return(tmp);
+}
+
+#define BADCH (int)'?'
+#define BADARG (int)':'
+#define EMSG ""
+
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt(nargc, nargv, ostr)
+ int nargc;
+ char * const nargv[];
+ const char *ostr;
+{
+ static char *__progname = 0;
+ static char *place = EMSG; /* option letter processing */
+ char *oli; /* option letter list index */
+ __progname = __progname?__progname:_progname(*nargv);
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(ostr != NULL);
+
+ if (optreset || !*place) { /* update scanning pointer */
+ optreset = 0;
+ if (optind >= nargc || *(place = nargv[optind]) != '-') {
+ place = EMSG;
+ return (-1);
+ }
+ if (place[1] && *++place == '-' /* found "--" */
+ && place[1] == '\0') {
+ ++optind;
+ place = EMSG;
+ return (-1);
+ }
+ } /* option letter okay? */
+ if ((optopt = (int)*place++) == (int)':' ||
+ !(oli = strchr(ostr, optopt))) {
+ /*
+ * if the user didn't specify '-' as an option,
+ * assume it means -1.
+ */
+ if (optopt == (int)'-')
+ return (-1);
+ if (!*place)
+ ++optind;
+ if (opterr && *ostr != ':')
+ (void)fprintf(stderr,
+ "%s: illegal option -- %c\n", __progname, optopt);
+ return (BADCH);
+ }
+ if (*++oli != ':') { /* don't need argument */
+ optarg = NULL;
+ if (!*place)
+ ++optind;
+ }
+ else { /* need an argument */
+ if (*place) /* no white space */
+ optarg = place;
+ else if (nargc <= ++optind) { /* no arg */
+ place = EMSG;
+ if (*ostr == ':')
+ return (BADARG);
+ if (opterr)
+ (void)fprintf(stderr,
+ "%s: option requires an argument -- %c\n",
+ __progname, optopt);
+ return (BADCH);
+ }
+ else /* white space */
+ optarg = nargv[optind];
+ place = EMSG;
+ ++optind;
+ }
+ return (optopt); /* dump back option letter */
+}
+
diff --git a/thirdparty/libwebsockets/win32helpers/getopt_long.c b/thirdparty/libwebsockets/win32helpers/getopt_long.c
index 6dfccf367d..22e5fa8945 100644
--- a/thirdparty/libwebsockets/win32helpers/getopt_long.c
+++ b/thirdparty/libwebsockets/win32helpers/getopt_long.c
@@ -1,240 +1,240 @@
-
-/*
- * Copyright (c) 1987, 1993, 1994, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "getopt.h"
-
-#define lws_ptr_diff(head, tail) \
- ((int)((char *)(head) - (char *)(tail)))
-
-extern int opterr; /* if error message should be printed */
-extern int optind; /* index into parent argv vector */
-extern int optopt; /* character checked for validity */
-extern int optreset; /* reset getopt */
-extern char *optarg; /* argument associated with option */
-
-#define __P(x) x
-#define _DIAGASSERT(x) assert(x)
-
-static char * __progname __P((char *));
-int getopt_internal __P((int, char * const *, const char *));
-
-static char *
-__progname(nargv0)
- char * nargv0;
-{
- char * tmp;
-
- _DIAGASSERT(nargv0 != NULL);
-
- tmp = strrchr(nargv0, '/');
- if (tmp)
- tmp++;
- else
- tmp = nargv0;
- return(tmp);
-}
-
-#define BADCH (int)'?'
-#define BADARG (int)':'
-#define EMSG ""
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt_internal(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
-{
- static char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(ostr != NULL);
-
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc || *(place = nargv[optind]) != '-') {
- place = EMSG;
- return (-1);
- }
- if (place[1] && *++place == '-') { /* found "--" */
- /* ++optind; */
- place = EMSG;
- return (-2);
- }
- } /* option letter okay? */
- if ((optopt = (int)*place++) == (int)':' ||
- !(oli = strchr(ostr, optopt))) {
- /*
- * if the user didn't specify '-' as an option,
- * assume it means -1.
- */
- if (optopt == (int)'-')
- return (-1);
- if (!*place)
- ++optind;
- if (opterr && *ostr != ':')
- (void)fprintf(stderr,
- "%s: illegal option -- %c\n", __progname(nargv[0]), optopt);
- return (BADCH);
- }
- if (*++oli != ':') { /* don't need argument */
- optarg = NULL;
- if (!*place)
- ++optind;
- } else { /* need an argument */
- if (*place) /* no white space */
- optarg = place;
- else if (nargc <= ++optind) { /* no arg */
- place = EMSG;
- if ((opterr) && (*ostr != ':'))
- (void)fprintf(stderr,
- "%s: option requires an argument -- %c\n",
- __progname(nargv[0]), optopt);
- return (BADARG);
- } else /* white space */
- optarg = nargv[optind];
- place = EMSG;
- ++optind;
- }
- return (optopt); /* dump back option letter */
-}
-
-#if 0
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt2(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
-{
- int retval;
-
- if ((retval = getopt_internal(nargc, nargv, ostr)) == -2) {
- retval = -1;
- ++optind;
- }
- return(retval);
-}
-#endif
-
-/*
- * getopt_long --
- * Parse argc/argv argument vector.
- */
-int
-getopt_long(nargc, nargv, options, long_options, index)
- int nargc;
- char ** nargv;
- char * options;
- struct option * long_options;
- int * index;
-{
- int retval;
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(options != NULL);
- _DIAGASSERT(long_options != NULL);
- /* index may be NULL */
-
- if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
- char *current_argv = nargv[optind++] + 2, *has_equal;
- int i, current_argv_len, match = -1;
-
- if (*current_argv == '\0') {
- return(-1);
- }
- if ((has_equal = strchr(current_argv, '=')) != NULL) {
- current_argv_len = lws_ptr_diff(has_equal, current_argv);
- has_equal++;
- } else
- current_argv_len = (int)strlen(current_argv);
-
- for (i = 0; long_options[i].name; i++) {
- if (strncmp(current_argv, long_options[i].name, current_argv_len))
- continue;
-
- if (strlen(long_options[i].name) == (unsigned)current_argv_len) {
- match = i;
- break;
- }
- if (match == -1)
- match = i;
- }
- if (match != -1) {
- if (long_options[match].has_arg == required_argument ||
- long_options[match].has_arg == optional_argument) {
- if (has_equal)
- optarg = has_equal;
- else
- optarg = nargv[optind++];
- }
- if ((long_options[match].has_arg == required_argument)
- && (optarg == NULL)) {
- /*
- * Missing argument, leading :
- * indicates no error should be generated
- */
- if ((opterr) && (*options != ':'))
- (void)fprintf(stderr,
- "%s: option requires an argument -- %s\n",
- __progname(nargv[0]), current_argv);
- return (BADARG);
- }
- } else { /* No matching argument */
- if ((opterr) && (*options != ':'))
- (void)fprintf(stderr,
- "%s: illegal option -- %s\n", __progname(nargv[0]), current_argv);
- return (BADCH);
- }
- if (long_options[match].flag) {
- *long_options[match].flag = long_options[match].val;
- retval = 0;
- } else
- retval = long_options[match].val;
- if (index)
- *index = match;
- }
- return(retval);
-}
+
+/*
+ * Copyright (c) 1987, 1993, 1994, 1996
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "getopt.h"
+
+#define lws_ptr_diff(head, tail) \
+ ((int)((char *)(head) - (char *)(tail)))
+
+extern int opterr; /* if error message should be printed */
+extern int optind; /* index into parent argv vector */
+extern int optopt; /* character checked for validity */
+extern int optreset; /* reset getopt */
+extern char *optarg; /* argument associated with option */
+
+#define __P(x) x
+#define _DIAGASSERT(x) assert(x)
+
+static char * __progname __P((char *));
+int getopt_internal __P((int, char * const *, const char *));
+
+static char *
+__progname(nargv0)
+ char * nargv0;
+{
+ char * tmp;
+
+ _DIAGASSERT(nargv0 != NULL);
+
+ tmp = strrchr(nargv0, '/');
+ if (tmp)
+ tmp++;
+ else
+ tmp = nargv0;
+ return(tmp);
+}
+
+#define BADCH (int)'?'
+#define BADARG (int)':'
+#define EMSG ""
+
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_internal(nargc, nargv, ostr)
+ int nargc;
+ char * const *nargv;
+ const char *ostr;
+{
+ static char *place = EMSG; /* option letter processing */
+ char *oli; /* option letter list index */
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(ostr != NULL);
+
+ if (optreset || !*place) { /* update scanning pointer */
+ optreset = 0;
+ if (optind >= nargc || *(place = nargv[optind]) != '-') {
+ place = EMSG;
+ return (-1);
+ }
+ if (place[1] && *++place == '-') { /* found "--" */
+ /* ++optind; */
+ place = EMSG;
+ return (-2);
+ }
+ } /* option letter okay? */
+ if ((optopt = (int)*place++) == (int)':' ||
+ !(oli = strchr(ostr, optopt))) {
+ /*
+ * if the user didn't specify '-' as an option,
+ * assume it means -1.
+ */
+ if (optopt == (int)'-')
+ return (-1);
+ if (!*place)
+ ++optind;
+ if (opterr && *ostr != ':')
+ (void)fprintf(stderr,
+ "%s: illegal option -- %c\n", __progname(nargv[0]), optopt);
+ return (BADCH);
+ }
+ if (*++oli != ':') { /* don't need argument */
+ optarg = NULL;
+ if (!*place)
+ ++optind;
+ } else { /* need an argument */
+ if (*place) /* no white space */
+ optarg = place;
+ else if (nargc <= ++optind) { /* no arg */
+ place = EMSG;
+ if ((opterr) && (*ostr != ':'))
+ (void)fprintf(stderr,
+ "%s: option requires an argument -- %c\n",
+ __progname(nargv[0]), optopt);
+ return (BADARG);
+ } else /* white space */
+ optarg = nargv[optind];
+ place = EMSG;
+ ++optind;
+ }
+ return (optopt); /* dump back option letter */
+}
+
+#if 0
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt2(nargc, nargv, ostr)
+ int nargc;
+ char * const *nargv;
+ const char *ostr;
+{
+ int retval;
+
+ if ((retval = getopt_internal(nargc, nargv, ostr)) == -2) {
+ retval = -1;
+ ++optind;
+ }
+ return(retval);
+}
+#endif
+
+/*
+ * getopt_long --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_long(nargc, nargv, options, long_options, index)
+ int nargc;
+ char ** nargv;
+ char * options;
+ struct option * long_options;
+ int * index;
+{
+ int retval;
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(options != NULL);
+ _DIAGASSERT(long_options != NULL);
+ /* index may be NULL */
+
+ if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
+ char *current_argv = nargv[optind++] + 2, *has_equal;
+ int i, current_argv_len, match = -1;
+
+ if (*current_argv == '\0') {
+ return(-1);
+ }
+ if ((has_equal = strchr(current_argv, '=')) != NULL) {
+ current_argv_len = lws_ptr_diff(has_equal, current_argv);
+ has_equal++;
+ } else
+ current_argv_len = (int)strlen(current_argv);
+
+ for (i = 0; long_options[i].name; i++) {
+ if (strncmp(current_argv, long_options[i].name, current_argv_len))
+ continue;
+
+ if (strlen(long_options[i].name) == (unsigned)current_argv_len) {
+ match = i;
+ break;
+ }
+ if (match == -1)
+ match = i;
+ }
+ if (match != -1) {
+ if (long_options[match].has_arg == required_argument ||
+ long_options[match].has_arg == optional_argument) {
+ if (has_equal)
+ optarg = has_equal;
+ else
+ optarg = nargv[optind++];
+ }
+ if ((long_options[match].has_arg == required_argument)
+ && (optarg == NULL)) {
+ /*
+ * Missing argument, leading :
+ * indicates no error should be generated
+ */
+ if ((opterr) && (*options != ':'))
+ (void)fprintf(stderr,
+ "%s: option requires an argument -- %s\n",
+ __progname(nargv[0]), current_argv);
+ return (BADARG);
+ }
+ } else { /* No matching argument */
+ if ((opterr) && (*options != ':'))
+ (void)fprintf(stderr,
+ "%s: illegal option -- %s\n", __progname(nargv[0]), current_argv);
+ return (BADCH);
+ }
+ if (long_options[match].flag) {
+ *long_options[match].flag = long_options[match].val;
+ retval = 0;
+ } else
+ retval = long_options[match].val;
+ if (index)
+ *index = match;
+ }
+ return(retval);
+}
diff --git a/thirdparty/libwebsockets/win32helpers/gettimeofday.c b/thirdparty/libwebsockets/win32helpers/gettimeofday.c
index 35dd73531d..08385c2320 100644
--- a/thirdparty/libwebsockets/win32helpers/gettimeofday.c
+++ b/thirdparty/libwebsockets/win32helpers/gettimeofday.c
@@ -1,36 +1,36 @@
-#include <time.h>
-#include <windows.h> //I've omitted context line
-
-#include "gettimeofday.h"
-
-int gettimeofday(struct timeval *tv, struct timezone *tz)
-{
- FILETIME ft;
- unsigned __int64 tmpres = 0;
- static int tzflag;
-
- if (NULL != tv) {
- GetSystemTimeAsFileTime(&ft);
-
- tmpres |= ft.dwHighDateTime;
- tmpres <<= 32;
- tmpres |= ft.dwLowDateTime;
-
- /*converting file time to unix epoch*/
- tmpres /= 10; /*convert into microseconds*/
+#include <time.h>
+#include <windows.h> //I've omitted context line
+
+#include "gettimeofday.h"
+
+int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ FILETIME ft;
+ unsigned __int64 tmpres = 0;
+ static int tzflag;
+
+ if (NULL != tv) {
+ GetSystemTimeAsFileTime(&ft);
+
+ tmpres |= ft.dwHighDateTime;
+ tmpres <<= 32;
+ tmpres |= ft.dwLowDateTime;
+
+ /*converting file time to unix epoch*/
+ tmpres /= 10; /*convert into microseconds*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
- tv->tv_sec = (long)(tmpres / 1000000UL);
- tv->tv_usec = (long)(tmpres % 1000000UL);
- }
-
- if (NULL != tz) {
- if (!tzflag) {
- _tzset();
- tzflag++;
- }
- tz->tz_minuteswest = _timezone / 60;
- tz->tz_dsttime = _daylight;
- }
-
- return 0;
-}
+ tv->tv_sec = (long)(tmpres / 1000000UL);
+ tv->tv_usec = (long)(tmpres % 1000000UL);
+ }
+
+ if (NULL != tz) {
+ if (!tzflag) {
+ _tzset();
+ tzflag++;
+ }
+ tz->tz_minuteswest = _timezone / 60;
+ tz->tz_dsttime = _daylight;
+ }
+
+ return 0;
+}
diff --git a/thirdparty/mbedtls/1453.diff b/thirdparty/mbedtls/1453.diff
index 6630ad861f..b1c9c43ed2 100644
--- a/thirdparty/mbedtls/1453.diff
+++ b/thirdparty/mbedtls/1453.diff
@@ -1,8 +1,8 @@
diff --git a/library/entropy_poll.c b/library/entropy_poll.c
-index 67900c46c8..cefe882d2a 100644
+index 4556f88a5..ba56b70f7 100644
--- a/library/entropy_poll.c
+++ b/library/entropy_poll.c
-@@ -54,28 +54,43 @@
+@@ -61,28 +61,43 @@
#define _WIN32_WINNT 0x0400
#endif
#include <windows.h>
@@ -54,7 +54,7 @@ index 67900c46c8..cefe882d2a 100644
return( 0 );
diff --git a/library/x509_crt.c b/library/x509_crt.c
-index 290c1eb3d1..3cf1743821 100644
+index 76558342e..35a134950 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -65,6 +65,19 @@
@@ -77,20 +77,20 @@ index 290c1eb3d1..3cf1743821 100644
#else
#include <time.h>
#endif
-@@ -1126,6 +1139,7 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
+@@ -1278,6 +1291,7 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
char filename[MAX_PATH];
char *p;
size_t len = strlen( path );
-+ int length_as_int = 0;
++ int lengthAsInt = 0;
WIN32_FIND_DATAW file_data;
HANDLE hFind;
-@@ -1140,7 +1154,18 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
+@@ -1292,7 +1306,18 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
p = filename + len;
filename[len++] = '*';
- w_ret = MultiByteToWideChar( CP_ACP, 0, filename, (int)len, szDir,
-+ if ( FAILED ( SizeTToInt( len, &length_as_int ) ) )
++ if ( FAILED ( SizeTToInt( len, &lengthAsInt ) ) )
+ return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
+
+ /*
@@ -101,20 +101,20 @@ index 290c1eb3d1..3cf1743821 100644
+ * incoming string are less than MAX_PATH to avoid a buffer overrun with
+ * MultiByteToWideChar().
+ */
-+ w_ret = MultiByteToWideChar( CP_ACP, 0, filename, length_as_int, szDir,
++ w_ret = MultiByteToWideChar( CP_ACP, 0, filename, lengthAsInt, szDir,
MAX_PATH - 3 );
if( w_ret == 0 )
return( MBEDTLS_ERR_X509_BAD_INPUT_DATA );
-@@ -1157,8 +1182,11 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
+@@ -1309,8 +1334,11 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
if( file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
continue;
-+ if ( FAILED( SizeTToInt( wcslen( file_data.cFileName ), &length_as_int ) ) )
++ if ( FAILED( SizeTToInt( wcslen( file_data.cFileName ), &lengthAsInt ) ) )
+ return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
+
w_ret = WideCharToMultiByte( CP_ACP, 0, file_data.cFileName,
- lstrlenW( file_data.cFileName ),
-+ length_as_int,
++ lengthAsInt,
p, (int) len - 1,
NULL, NULL );
if( w_ret == 0 )
diff --git a/thirdparty/mbedtls/include/mbedtls/aes.h b/thirdparty/mbedtls/include/mbedtls/aes.h
index f6603d5962..b42e564efc 100644
--- a/thirdparty/mbedtls/include/mbedtls/aes.h
+++ b/thirdparty/mbedtls/include/mbedtls/aes.h
@@ -60,7 +60,11 @@
/* Error codes in range 0x0021-0x0025 */
#define MBEDTLS_ERR_AES_BAD_INPUT_DATA -0x0021 /**< Invalid input data. */
+
+/* MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE is deprecated and should not be used. */
#define MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE -0x0023 /**< Feature not available. For example, an unsupported AES key size. */
+
+/* MBEDTLS_ERR_AES_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_AES_HW_ACCEL_FAILED -0x0025 /**< AES hardware accelerator failed. */
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
@@ -79,7 +83,7 @@ extern "C" {
/**
* \brief The AES context-type definition.
*/
-typedef struct
+typedef struct mbedtls_aes_context
{
int nr; /*!< The number of rounds. */
uint32_t *rk; /*!< AES round keys. */
@@ -98,7 +102,7 @@ mbedtls_aes_context;
/**
* \brief The AES XTS context-type definition.
*/
-typedef struct
+typedef struct mbedtls_aes_xts_context
{
mbedtls_aes_context crypt; /*!< The AES context to use for AES block
encryption or decryption. */
@@ -117,7 +121,7 @@ typedef struct
* It must be the first API called before using
* the context.
*
- * \param ctx The AES context to initialize.
+ * \param ctx The AES context to initialize. This must not be \c NULL.
*/
void mbedtls_aes_init( mbedtls_aes_context *ctx );
@@ -125,6 +129,8 @@ void mbedtls_aes_init( mbedtls_aes_context *ctx );
* \brief This function releases and clears the specified AES context.
*
* \param ctx The AES context to clear.
+ * If this is \c NULL, this function does nothing.
+ * Otherwise, the context must have been at least initialized.
*/
void mbedtls_aes_free( mbedtls_aes_context *ctx );
@@ -135,7 +141,7 @@ void mbedtls_aes_free( mbedtls_aes_context *ctx );
* It must be the first API called before using
* the context.
*
- * \param ctx The AES XTS context to initialize.
+ * \param ctx The AES XTS context to initialize. This must not be \c NULL.
*/
void mbedtls_aes_xts_init( mbedtls_aes_xts_context *ctx );
@@ -143,6 +149,8 @@ void mbedtls_aes_xts_init( mbedtls_aes_xts_context *ctx );
* \brief This function releases and clears the specified AES XTS context.
*
* \param ctx The AES XTS context to clear.
+ * If this is \c NULL, this function does nothing.
+ * Otherwise, the context must have been at least initialized.
*/
void mbedtls_aes_xts_free( mbedtls_aes_xts_context *ctx );
#endif /* MBEDTLS_CIPHER_MODE_XTS */
@@ -151,7 +159,9 @@ void mbedtls_aes_xts_free( mbedtls_aes_xts_context *ctx );
* \brief This function sets the encryption key.
*
* \param ctx The AES context to which the key should be bound.
+ * It must be initialized.
* \param key The encryption key.
+ * This must be a readable buffer of size \p keybits bits.
* \param keybits The size of data passed in bits. Valid options are:
* <ul><li>128 bits</li>
* <li>192 bits</li>
@@ -167,7 +177,9 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
* \brief This function sets the decryption key.
*
* \param ctx The AES context to which the key should be bound.
+ * It must be initialized.
* \param key The decryption key.
+ * This must be a readable buffer of size \p keybits bits.
* \param keybits The size of data passed. Valid options are:
* <ul><li>128 bits</li>
* <li>192 bits</li>
@@ -185,8 +197,10 @@ int mbedtls_aes_setkey_dec( mbedtls_aes_context *ctx, const unsigned char *key,
* sets the encryption key.
*
* \param ctx The AES XTS context to which the key should be bound.
+ * It must be initialized.
* \param key The encryption key. This is comprised of the XTS key1
* concatenated with the XTS key2.
+ * This must be a readable buffer of size \p keybits bits.
* \param keybits The size of \p key passed in bits. Valid options are:
* <ul><li>256 bits (each of key1 and key2 is a 128-bit key)</li>
* <li>512 bits (each of key1 and key2 is a 256-bit key)</li></ul>
@@ -203,8 +217,10 @@ int mbedtls_aes_xts_setkey_enc( mbedtls_aes_xts_context *ctx,
* sets the decryption key.
*
* \param ctx The AES XTS context to which the key should be bound.
+ * It must be initialized.
* \param key The decryption key. This is comprised of the XTS key1
* concatenated with the XTS key2.
+ * This must be a readable buffer of size \p keybits bits.
* \param keybits The size of \p key passed in bits. Valid options are:
* <ul><li>256 bits (each of key1 and key2 is a 128-bit key)</li>
* <li>512 bits (each of key1 and key2 is a 256-bit key)</li></ul>
@@ -230,10 +246,13 @@ int mbedtls_aes_xts_setkey_dec( mbedtls_aes_xts_context *ctx,
* call to this API with the same context.
*
* \param ctx The AES context to use for encryption or decryption.
+ * It must be initialized and bound to a key.
* \param mode The AES operation: #MBEDTLS_AES_ENCRYPT or
* #MBEDTLS_AES_DECRYPT.
- * \param input The 16-Byte buffer holding the input data.
- * \param output The 16-Byte buffer holding the output data.
+ * \param input The buffer holding the input data.
+ * It must be readable and at least \c 16 Bytes long.
+ * \param output The buffer where the output data will be written.
+ * It must be writeable and at least \c 16 Bytes long.
* \return \c 0 on success.
*/
@@ -256,8 +275,8 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_context *ctx,
* mbedtls_aes_setkey_enc() or mbedtls_aes_setkey_dec() must be called
* before the first call to this API with the same context.
*
- * \note This function operates on aligned blocks, that is, the input size
- * must be a multiple of the AES block size of 16 Bytes.
+ * \note This function operates on full blocks, that is, the input size
+ * must be a multiple of the AES block size of \c 16 Bytes.
*
* \note Upon exit, the content of the IV is updated so that you can
* call the same function again on the next
@@ -268,13 +287,17 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_context *ctx,
*
*
* \param ctx The AES context to use for encryption or decryption.
+ * It must be initialized and bound to a key.
* \param mode The AES operation: #MBEDTLS_AES_ENCRYPT or
* #MBEDTLS_AES_DECRYPT.
* \param length The length of the input data in Bytes. This must be a
- * multiple of the block size (16 Bytes).
+ * multiple of the block size (\c 16 Bytes).
* \param iv Initialization vector (updated after use).
+ * It must be a readable and writeable buffer of \c 16 Bytes.
* \param input The buffer holding the input data.
+ * It must be readable and of size \p length Bytes.
* \param output The buffer holding the output data.
+ * It must be writeable and of size \p length Bytes.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH
@@ -302,9 +325,10 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
* returns #MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH.
*
* \param ctx The AES XTS context to use for AES XTS operations.
+ * It must be initialized and bound to a key.
* \param mode The AES operation: #MBEDTLS_AES_ENCRYPT or
* #MBEDTLS_AES_DECRYPT.
- * \param length The length of a data unit in bytes. This can be any
+ * \param length The length of a data unit in Bytes. This can be any
* length between 16 bytes and 2^24 bytes inclusive
* (between 1 and 2^20 block cipher blocks).
* \param data_unit The address of the data unit encoded as an array of 16
@@ -312,15 +336,15 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
* is typically the index of the block device sector that
* contains the data.
* \param input The buffer holding the input data (which is an entire
- * data unit). This function reads \p length bytes from \p
+ * data unit). This function reads \p length Bytes from \p
* input.
* \param output The buffer holding the output data (which is an entire
- * data unit). This function writes \p length bytes to \p
+ * data unit). This function writes \p length Bytes to \p
* output.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH if \p length is
- * smaller than an AES block in size (16 bytes) or if \p
+ * smaller than an AES block in size (16 Bytes) or if \p
* length is larger than 2^20 blocks (16 MiB).
*/
int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
@@ -356,13 +380,18 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
*
*
* \param ctx The AES context to use for encryption or decryption.
+ * It must be initialized and bound to a key.
* \param mode The AES operation: #MBEDTLS_AES_ENCRYPT or
* #MBEDTLS_AES_DECRYPT.
- * \param length The length of the input data.
+ * \param length The length of the input data in Bytes.
* \param iv_off The offset in IV (updated after use).
+ * It must point to a valid \c size_t.
* \param iv The initialization vector (updated after use).
+ * It must be a readable and writeable buffer of \c 16 Bytes.
* \param input The buffer holding the input data.
+ * It must be readable and of size \p length Bytes.
* \param output The buffer holding the output data.
+ * It must be writeable and of size \p length Bytes.
*
* \return \c 0 on success.
*/
@@ -397,12 +426,16 @@ int mbedtls_aes_crypt_cfb128( mbedtls_aes_context *ctx,
*
*
* \param ctx The AES context to use for encryption or decryption.
+ * It must be initialized and bound to a key.
* \param mode The AES operation: #MBEDTLS_AES_ENCRYPT or
* #MBEDTLS_AES_DECRYPT
* \param length The length of the input data.
* \param iv The initialization vector (updated after use).
+ * It must be a readable and writeable buffer of \c 16 Bytes.
* \param input The buffer holding the input data.
+ * It must be readable and of size \p length Bytes.
* \param output The buffer holding the output data.
+ * It must be writeable and of size \p length Bytes.
*
* \return \c 0 on success.
*/
@@ -447,11 +480,16 @@ int mbedtls_aes_crypt_cfb8( mbedtls_aes_context *ctx,
* will compromise security.
*
* \param ctx The AES context to use for encryption or decryption.
+ * It must be initialized and bound to a key.
* \param length The length of the input data.
* \param iv_off The offset in IV (updated after use).
+ * It must point to a valid \c size_t.
* \param iv The initialization vector (updated after use).
+ * It must be a readable and writeable buffer of \c 16 Bytes.
* \param input The buffer holding the input data.
+ * It must be readable and of size \p length Bytes.
* \param output The buffer holding the output data.
+ * It must be writeable and of size \p length Bytes.
*
* \return \c 0 on success.
*/
@@ -523,15 +561,21 @@ int mbedtls_aes_crypt_ofb( mbedtls_aes_context *ctx,
* securely discarded as soon as it's no longer needed.
*
* \param ctx The AES context to use for encryption or decryption.
+ * It must be initialized and bound to a key.
* \param length The length of the input data.
* \param nc_off The offset in the current \p stream_block, for
* resuming within the current cipher stream. The
* offset pointer should be 0 at the start of a stream.
+ * It must point to a valid \c size_t.
* \param nonce_counter The 128-bit nonce and counter.
+ * It must be a readable-writeable buffer of \c 16 Bytes.
* \param stream_block The saved stream block for resuming. This is
* overwritten by the function.
+ * It must be a readable-writeable buffer of \c 16 Bytes.
* \param input The buffer holding the input data.
+ * It must be readable and of size \p length Bytes.
* \param output The buffer holding the output data.
+ * It must be writeable and of size \p length Bytes.
*
* \return \c 0 on success.
*/
@@ -584,7 +628,7 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx,
* \brief Deprecated internal AES block encryption function
* without return value.
*
- * \deprecated Superseded by mbedtls_aes_encrypt_ext() in 2.5.0.
+ * \deprecated Superseded by mbedtls_internal_aes_encrypt()
*
* \param ctx The AES context to use for encryption.
* \param input Plaintext block.
@@ -598,7 +642,7 @@ MBEDTLS_DEPRECATED void mbedtls_aes_encrypt( mbedtls_aes_context *ctx,
* \brief Deprecated internal AES block decryption function
* without return value.
*
- * \deprecated Superseded by mbedtls_aes_decrypt_ext() in 2.5.0.
+ * \deprecated Superseded by mbedtls_internal_aes_decrypt()
*
* \param ctx The AES context to use for decryption.
* \param input Ciphertext block.
diff --git a/thirdparty/mbedtls/include/mbedtls/aesni.h b/thirdparty/mbedtls/include/mbedtls/aesni.h
index 746baa0e17..0196f49b87 100644
--- a/thirdparty/mbedtls/include/mbedtls/aesni.h
+++ b/thirdparty/mbedtls/include/mbedtls/aesni.h
@@ -2,6 +2,9 @@
* \file aesni.h
*
* \brief AES-NI for hardware AES acceleration on some Intel processors
+ *
+ * \warning These functions are only for internal use by other library
+ * functions; you must not call them directly.
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
@@ -42,7 +45,10 @@ extern "C" {
#endif
/**
- * \brief AES-NI features detection routine
+ * \brief Internal function to detect the AES-NI feature in CPUs.
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param what The feature to detect
* (MBEDTLS_AESNI_AES or MBEDTLS_AESNI_CLMUL)
@@ -52,7 +58,10 @@ extern "C" {
int mbedtls_aesni_has_support( unsigned int what );
/**
- * \brief AES-NI AES-ECB block en(de)cryption
+ * \brief Internal AES-NI AES-ECB block encryption and decryption
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param ctx AES context
* \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
@@ -62,12 +71,15 @@ int mbedtls_aesni_has_support( unsigned int what );
* \return 0 on success (cannot fail)
*/
int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx,
- int mode,
- const unsigned char input[16],
- unsigned char output[16] );
+ int mode,
+ const unsigned char input[16],
+ unsigned char output[16] );
/**
- * \brief GCM multiplication: c = a * b in GF(2^128)
+ * \brief Internal GCM multiplication: c = a * b in GF(2^128)
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param c Result
* \param a First operand
@@ -77,21 +89,29 @@ int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx,
* elements of GF(2^128) as per the GCM spec.
*/
void mbedtls_aesni_gcm_mult( unsigned char c[16],
- const unsigned char a[16],
- const unsigned char b[16] );
+ const unsigned char a[16],
+ const unsigned char b[16] );
/**
- * \brief Compute decryption round keys from encryption round keys
+ * \brief Internal round key inversion. This function computes
+ * decryption round keys from the encryption round keys.
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param invkey Round keys for the equivalent inverse cipher
* \param fwdkey Original round keys (for encryption)
* \param nr Number of rounds (that is, number of round keys minus one)
*/
void mbedtls_aesni_inverse_key( unsigned char *invkey,
- const unsigned char *fwdkey, int nr );
+ const unsigned char *fwdkey,
+ int nr );
/**
- * \brief Perform key expansion (for encryption)
+ * \brief Internal key expansion for encryption
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param rk Destination buffer where the round keys are written
* \param key Encryption key
@@ -100,8 +120,8 @@ void mbedtls_aesni_inverse_key( unsigned char *invkey,
* \return 0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH
*/
int mbedtls_aesni_setkey_enc( unsigned char *rk,
- const unsigned char *key,
- size_t bits );
+ const unsigned char *key,
+ size_t bits );
#ifdef __cplusplus
}
diff --git a/thirdparty/mbedtls/include/mbedtls/arc4.h b/thirdparty/mbedtls/include/mbedtls/arc4.h
index f11fc5be0a..c43f4065f1 100644
--- a/thirdparty/mbedtls/include/mbedtls/arc4.h
+++ b/thirdparty/mbedtls/include/mbedtls/arc4.h
@@ -36,6 +36,7 @@
#include <stddef.h>
+/* MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED -0x0019 /**< ARC4 hardware accelerator failed. */
#ifdef __cplusplus
@@ -53,7 +54,7 @@ extern "C" {
* security risk. We recommend considering stronger ciphers instead.
*
*/
-typedef struct
+typedef struct mbedtls_arc4_context
{
int x; /*!< permutation index */
int y; /*!< permutation index */
diff --git a/thirdparty/mbedtls/include/mbedtls/aria.h b/thirdparty/mbedtls/include/mbedtls/aria.h
index bae0621b23..1e8956ed13 100644
--- a/thirdparty/mbedtls/include/mbedtls/aria.h
+++ b/thirdparty/mbedtls/include/mbedtls/aria.h
@@ -39,6 +39,8 @@
#include <stddef.h>
#include <stdint.h>
+#include "platform_util.h"
+
#define MBEDTLS_ARIA_ENCRYPT 1 /**< ARIA encryption. */
#define MBEDTLS_ARIA_DECRYPT 0 /**< ARIA decryption. */
@@ -46,9 +48,18 @@
#define MBEDTLS_ARIA_MAX_ROUNDS 16 /**< Maxiumum number of rounds in ARIA. */
#define MBEDTLS_ARIA_MAX_KEYSIZE 32 /**< Maximum size of an ARIA key in bytes. */
-#define MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH -0x005C /**< Invalid key length. */
-#define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH -0x005E /**< Invalid data input length. */
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+#define MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x005C )
+#endif /* !MBEDTLS_DEPRECATED_REMOVED */
+#define MBEDTLS_ERR_ARIA_BAD_INPUT_DATA -0x005C /**< Bad input data. */
+
+#define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH -0x005E /**< Invalid data input length. */
+
+/* MBEDTLS_ERR_ARIA_FEATURE_UNAVAILABLE is deprecated and should not be used.
+ */
#define MBEDTLS_ERR_ARIA_FEATURE_UNAVAILABLE -0x005A /**< Feature not available. For example, an unsupported ARIA key size. */
+
+/* MBEDTLS_ERR_ARIA_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_ARIA_HW_ACCEL_FAILED -0x0058 /**< ARIA hardware accelerator failed. */
#if !defined(MBEDTLS_ARIA_ALT)
@@ -62,7 +73,7 @@ extern "C" {
/**
* \brief The ARIA context-type definition.
*/
-typedef struct
+typedef struct mbedtls_aria_context
{
unsigned char nr; /*!< The number of rounds (12, 14 or 16) */
/*! The ARIA round keys. */
@@ -80,14 +91,16 @@ mbedtls_aria_context;
* It must be the first API called before using
* the context.
*
- * \param ctx The ARIA context to initialize.
+ * \param ctx The ARIA context to initialize. This must not be \c NULL.
*/
void mbedtls_aria_init( mbedtls_aria_context *ctx );
/**
* \brief This function releases and clears the specified ARIA context.
*
- * \param ctx The ARIA context to clear.
+ * \param ctx The ARIA context to clear. This may be \c NULL, in which
+ * case this function returns immediately. If it is not \c NULL,
+ * it must point to an initialized ARIA context.
*/
void mbedtls_aria_free( mbedtls_aria_context *ctx );
@@ -95,14 +108,16 @@ void mbedtls_aria_free( mbedtls_aria_context *ctx );
* \brief This function sets the encryption key.
*
* \param ctx The ARIA context to which the key should be bound.
- * \param key The encryption key.
- * \param keybits The size of data passed in bits. Valid options are:
+ * This must be initialized.
+ * \param key The encryption key. This must be a readable buffer
+ * of size \p keybits Bits.
+ * \param keybits The size of \p key in Bits. Valid options are:
* <ul><li>128 bits</li>
* <li>192 bits</li>
* <li>256 bits</li></ul>
*
- * \return \c 0 on success or #MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH
- * on failure.
+ * \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_aria_setkey_enc( mbedtls_aria_context *ctx,
const unsigned char *key,
@@ -112,13 +127,16 @@ int mbedtls_aria_setkey_enc( mbedtls_aria_context *ctx,
* \brief This function sets the decryption key.
*
* \param ctx The ARIA context to which the key should be bound.
- * \param key The decryption key.
+ * This must be initialized.
+ * \param key The decryption key. This must be a readable buffer
+ * of size \p keybits Bits.
* \param keybits The size of data passed. Valid options are:
* <ul><li>128 bits</li>
* <li>192 bits</li>
* <li>256 bits</li></ul>
*
- * \return \c 0 on success, or #MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH on failure.
+ * \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_aria_setkey_dec( mbedtls_aria_context *ctx,
const unsigned char *key,
@@ -137,10 +155,12 @@ int mbedtls_aria_setkey_dec( mbedtls_aria_context *ctx,
* call to this API with the same context.
*
* \param ctx The ARIA context to use for encryption or decryption.
+ * This must be initialized and bound to a key.
* \param input The 16-Byte buffer holding the input data.
* \param output The 16-Byte buffer holding the output data.
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_aria_crypt_ecb( mbedtls_aria_context *ctx,
const unsigned char input[MBEDTLS_ARIA_BLOCKSIZE],
@@ -172,16 +192,21 @@ int mbedtls_aria_crypt_ecb( mbedtls_aria_context *ctx,
*
*
* \param ctx The ARIA context to use for encryption or decryption.
- * \param mode The ARIA operation: #MBEDTLS_ARIA_ENCRYPT or
- * #MBEDTLS_ARIA_DECRYPT.
+ * This must be initialized and bound to a key.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_ARIA_ENCRYPT for encryption, or
+ * #MBEDTLS_ARIA_DECRYPT for decryption.
* \param length The length of the input data in Bytes. This must be a
* multiple of the block size (16 Bytes).
* \param iv Initialization vector (updated after use).
- * \param input The buffer holding the input data.
- * \param output The buffer holding the output data.
+ * This must be a readable buffer of size 16 Bytes.
+ * \param input The buffer holding the input data. This must
+ * be a readable buffer of length \p length Bytes.
+ * \param output The buffer holding the output data. This must
+ * be a writable buffer of length \p length Bytes.
*
- * \return \c 0 on success, or #MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH
- * on failure.
+ * \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_aria_crypt_cbc( mbedtls_aria_context *ctx,
int mode,
@@ -216,15 +241,22 @@ int mbedtls_aria_crypt_cbc( mbedtls_aria_context *ctx,
*
*
* \param ctx The ARIA context to use for encryption or decryption.
- * \param mode The ARIA operation: #MBEDTLS_ARIA_ENCRYPT or
- * #MBEDTLS_ARIA_DECRYPT.
- * \param length The length of the input data.
+ * This must be initialized and bound to a key.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_ARIA_ENCRYPT for encryption, or
+ * #MBEDTLS_ARIA_DECRYPT for decryption.
+ * \param length The length of the input data \p input in Bytes.
* \param iv_off The offset in IV (updated after use).
+ * This must not be larger than 15.
* \param iv The initialization vector (updated after use).
- * \param input The buffer holding the input data.
- * \param output The buffer holding the output data.
+ * This must be a readable buffer of size 16 Bytes.
+ * \param input The buffer holding the input data. This must
+ * be a readable buffer of length \p length Bytes.
+ * \param output The buffer holding the output data. This must
+ * be a writable buffer of length \p length Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_aria_crypt_cfb128( mbedtls_aria_context *ctx,
int mode,
@@ -294,17 +326,24 @@ int mbedtls_aria_crypt_cfb128( mbedtls_aria_context *ctx,
* securely discarded as soon as it's no longer needed.
*
* \param ctx The ARIA context to use for encryption or decryption.
- * \param length The length of the input data.
- * \param nc_off The offset in the current \p stream_block, for
- * resuming within the current cipher stream. The
- * offset pointer should be 0 at the start of a stream.
- * \param nonce_counter The 128-bit nonce and counter.
- * \param stream_block The saved stream block for resuming. This is
- * overwritten by the function.
- * \param input The buffer holding the input data.
- * \param output The buffer holding the output data.
- *
- * \return \c 0 on success.
+ * This must be initialized and bound to a key.
+ * \param length The length of the input data \p input in Bytes.
+ * \param nc_off The offset in Bytes in the current \p stream_block,
+ * for resuming within the current cipher stream. The
+ * offset pointer should be \c 0 at the start of a
+ * stream. This must not be larger than \c 15 Bytes.
+ * \param nonce_counter The 128-bit nonce and counter. This must point to
+ * a read/write buffer of length \c 16 bytes.
+ * \param stream_block The saved stream block for resuming. This must
+ * point to a read/write buffer of length \c 16 bytes.
+ * This is overwritten by the function.
+ * \param input The buffer holding the input data. This must
+ * be a readable buffer of length \p length Bytes.
+ * \param output The buffer holding the output data. This must
+ * be a writable buffer of length \p length Bytes.
+ *
+ * \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_aria_crypt_ctr( mbedtls_aria_context *ctx,
size_t length,
diff --git a/thirdparty/mbedtls/include/mbedtls/asn1write.h b/thirdparty/mbedtls/include/mbedtls/asn1write.h
index f76fc807d0..76c1780b59 100644
--- a/thirdparty/mbedtls/include/mbedtls/asn1write.h
+++ b/thirdparty/mbedtls/include/mbedtls/asn1write.h
@@ -26,191 +26,272 @@
#include "asn1.h"
-#define MBEDTLS_ASN1_CHK_ADD(g, f) do { if( ( ret = f ) < 0 ) return( ret ); else \
- g += ret; } while( 0 )
+#define MBEDTLS_ASN1_CHK_ADD(g, f) \
+ do { \
+ if( ( ret = f ) < 0 ) \
+ return( ret ); \
+ else \
+ g += ret; \
+ } while( 0 )
#ifdef __cplusplus
extern "C" {
#endif
/**
- * \brief Write a length field in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write a length field in ASN.1 format.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param len the length to write
+ * \note This function works backwards in data buffer.
*
- * \return the length written or a negative error code
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param len The length value to write.
+ *
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
-int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len );
-
+int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start,
+ size_t len );
/**
- * \brief Write a ASN.1 tag in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write an ASN.1 tag in ASN.1 format.
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param tag the tag to write
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param tag The tag to write.
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
int mbedtls_asn1_write_tag( unsigned char **p, unsigned char *start,
- unsigned char tag );
+ unsigned char tag );
/**
- * \brief Write raw buffer data
- * Note: function works backwards in data buffer
+ * \brief Write raw buffer data.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param buf data buffer to write
- * \param size length of the data buffer
+ * \note This function works backwards in data buffer.
*
- * \return the length written or a negative error code
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param buf The data buffer to write.
+ * \param size The length of the data buffer.
+ *
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start,
- const unsigned char *buf, size_t size );
+ const unsigned char *buf, size_t size );
#if defined(MBEDTLS_BIGNUM_C)
/**
- * \brief Write a big number (MBEDTLS_ASN1_INTEGER) in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write a arbitrary-precision number (#MBEDTLS_ASN1_INTEGER)
+ * in ASN.1 format.
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param X the MPI to write
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param X The MPI to write.
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
-int mbedtls_asn1_write_mpi( unsigned char **p, unsigned char *start, const mbedtls_mpi *X );
+int mbedtls_asn1_write_mpi( unsigned char **p, unsigned char *start,
+ const mbedtls_mpi *X );
#endif /* MBEDTLS_BIGNUM_C */
/**
- * \brief Write a NULL tag (MBEDTLS_ASN1_NULL) with zero data in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write a NULL tag (#MBEDTLS_ASN1_NULL) with zero data
+ * in ASN.1 format.
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
int mbedtls_asn1_write_null( unsigned char **p, unsigned char *start );
/**
- * \brief Write an OID tag (MBEDTLS_ASN1_OID) and data in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write an OID tag (#MBEDTLS_ASN1_OID) and data
+ * in ASN.1 format.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param oid the OID to write
- * \param oid_len length of the OID
+ * \note This function works backwards in data buffer.
*
- * \return the length written or a negative error code
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param oid The OID to write.
+ * \param oid_len The length of the OID.
+ *
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
int mbedtls_asn1_write_oid( unsigned char **p, unsigned char *start,
- const char *oid, size_t oid_len );
+ const char *oid, size_t oid_len );
/**
- * \brief Write an AlgorithmIdentifier sequence in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write an AlgorithmIdentifier sequence in ASN.1 format.
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param oid the OID of the algorithm
- * \param oid_len length of the OID
- * \param par_len length of parameters, which must be already written.
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param oid The OID of the algorithm to write.
+ * \param oid_len The length of the algorithm's OID.
+ * \param par_len The length of the parameters, which must be already written.
* If 0, NULL parameters are added
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
-int mbedtls_asn1_write_algorithm_identifier( unsigned char **p, unsigned char *start,
- const char *oid, size_t oid_len,
- size_t par_len );
+int mbedtls_asn1_write_algorithm_identifier( unsigned char **p,
+ unsigned char *start,
+ const char *oid, size_t oid_len,
+ size_t par_len );
/**
- * \brief Write a boolean tag (MBEDTLS_ASN1_BOOLEAN) and value in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write a boolean tag (#MBEDTLS_ASN1_BOOLEAN) and value
+ * in ASN.1 format.
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param boolean 0 or 1
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param boolean The boolean value to write, either \c 0 or \c 1.
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
-int mbedtls_asn1_write_bool( unsigned char **p, unsigned char *start, int boolean );
+int mbedtls_asn1_write_bool( unsigned char **p, unsigned char *start,
+ int boolean );
/**
- * \brief Write an int tag (MBEDTLS_ASN1_INTEGER) and value in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write an int tag (#MBEDTLS_ASN1_INTEGER) and value
+ * in ASN.1 format.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param val the integer value
+ * \note This function works backwards in data buffer.
*
- * \return the length written or a negative error code
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param val The integer value to write.
+ *
+ * \return The number of bytes written to \p p on success.
+ * \return A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
int mbedtls_asn1_write_int( unsigned char **p, unsigned char *start, int val );
/**
- * \brief Write a printable string tag (MBEDTLS_ASN1_PRINTABLE_STRING) and
- * value in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write a string in ASN.1 format using a specific
+ * string encoding tag.
+
+ * \note This function works backwards in data buffer.
+ *
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param tag The string encoding tag to write, e.g.
+ * #MBEDTLS_ASN1_UTF8_STRING.
+ * \param text The string to write.
+ * \param text_len The length of \p text in bytes (which might
+ * be strictly larger than the number of characters).
+ *
+ * \return The number of bytes written to \p p on success.
+ * \return A negative error code on failure.
+ */
+int mbedtls_asn1_write_tagged_string( unsigned char **p, unsigned char *start,
+ int tag, const char *text,
+ size_t text_len );
+
+/**
+ * \brief Write a string in ASN.1 format using the PrintableString
+ * string encoding tag (#MBEDTLS_ASN1_PRINTABLE_STRING).
+ *
+ * \note This function works backwards in data buffer.
+ *
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param text The string to write.
+ * \param text_len The length of \p text in bytes (which might
+ * be strictly larger than the number of characters).
+ *
+ * \return The number of bytes written to \p p on success.
+ * \return A negative error code on failure.
+ */
+int mbedtls_asn1_write_printable_string( unsigned char **p,
+ unsigned char *start,
+ const char *text, size_t text_len );
+
+/**
+ * \brief Write a UTF8 string in ASN.1 format using the UTF8String
+ * string encoding tag (#MBEDTLS_ASN1_PRINTABLE_STRING).
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param text the text to write
- * \param text_len length of the text
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param text The string to write.
+ * \param text_len The length of \p text in bytes (which might
+ * be strictly larger than the number of characters).
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative error code on failure.
*/
-int mbedtls_asn1_write_printable_string( unsigned char **p, unsigned char *start,
- const char *text, size_t text_len );
+int mbedtls_asn1_write_utf8_string( unsigned char **p, unsigned char *start,
+ const char *text, size_t text_len );
/**
- * \brief Write an IA5 string tag (MBEDTLS_ASN1_IA5_STRING) and
- * value in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write a string in ASN.1 format using the IA5String
+ * string encoding tag (#MBEDTLS_ASN1_IA5_STRING).
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param text the text to write
- * \param text_len length of the text
+ * \note This function works backwards in data buffer.
*
- * \return the length written or a negative error code
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param text The string to write.
+ * \param text_len The length of \p text in bytes (which might
+ * be strictly larger than the number of characters).
+ *
+ * \return The number of bytes written to \p p on success.
+ * \return A negative error code on failure.
*/
int mbedtls_asn1_write_ia5_string( unsigned char **p, unsigned char *start,
- const char *text, size_t text_len );
+ const char *text, size_t text_len );
/**
- * \brief Write a bitstring tag (MBEDTLS_ASN1_BIT_STRING) and
- * value in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write a bitstring tag (#MBEDTLS_ASN1_BIT_STRING) and
+ * value in ASN.1 format.
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param buf the bitstring
- * \param bits the total number of bits in the bitstring
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param buf The bitstring to write.
+ * \param bits The total number of bits in the bitstring.
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative error code on failure.
*/
int mbedtls_asn1_write_bitstring( unsigned char **p, unsigned char *start,
- const unsigned char *buf, size_t bits );
+ const unsigned char *buf, size_t bits );
/**
- * \brief Write an octet string tag (MBEDTLS_ASN1_OCTET_STRING) and
- * value in ASN.1 format
- * Note: function works backwards in data buffer
+ * \brief Write an octet string tag (#MBEDTLS_ASN1_OCTET_STRING)
+ * and value in ASN.1 format.
+ *
+ * \note This function works backwards in data buffer.
*
- * \param p reference to current position pointer
- * \param start start of the buffer (for bounds-checking)
- * \param buf data buffer to write
- * \param size length of the data buffer
+ * \param p The reference to the current position pointer.
+ * \param start The start of the buffer, for bounds-checking.
+ * \param buf The buffer holding the data to write.
+ * \param size The length of the data buffer \p buf.
*
- * \return the length written or a negative error code
+ * \return The number of bytes written to \p p on success.
+ * \return A negative error code on failure.
*/
int mbedtls_asn1_write_octet_string( unsigned char **p, unsigned char *start,
- const unsigned char *buf, size_t size );
+ const unsigned char *buf, size_t size );
/**
* \brief Create or find a specific named_data entry for writing in a
@@ -218,15 +299,16 @@ int mbedtls_asn1_write_octet_string( unsigned char **p, unsigned char *start,
* a new entry is added to the head of the list.
* Warning: Destructive behaviour for the val data!
*
- * \param list Pointer to the location of the head of the list to seek
- * through (will be updated in case of a new entry)
- * \param oid The OID to look for
- * \param oid_len Size of the OID
- * \param val Data to store (can be NULL if you want to fill it by hand)
- * \param val_len Minimum length of the data buffer needed
+ * \param list The pointer to the location of the head of the list to seek
+ * through (will be updated in case of a new entry).
+ * \param oid The OID to look for.
+ * \param oid_len The size of the OID.
+ * \param val The data to store (can be \c NULL if you want to fill
+ * it by hand).
+ * \param val_len The minimum length of the data buffer needed.
*
- * \return NULL if if there was a memory allocation error, or a pointer
- * to the new / existing entry.
+ * \return A pointer to the new / existing entry on success.
+ * \return \c NULL if if there was a memory allocation error.
*/
mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data **list,
const char *oid, size_t oid_len,
diff --git a/thirdparty/mbedtls/include/mbedtls/bignum.h b/thirdparty/mbedtls/include/mbedtls/bignum.h
index 31383b1eb5..141a8e9adf 100644
--- a/thirdparty/mbedtls/include/mbedtls/bignum.h
+++ b/thirdparty/mbedtls/include/mbedtls/bignum.h
@@ -177,7 +177,7 @@ extern "C" {
/**
* \brief MPI structure
*/
-typedef struct
+typedef struct mbedtls_mpi
{
int s; /*!< integer sign */
size_t n; /*!< total # of limbs */
@@ -186,96 +186,115 @@ typedef struct
mbedtls_mpi;
/**
- * \brief Initialize one MPI (make internal references valid)
- * This just makes it ready to be set or freed,
+ * \brief Initialize an MPI context.
+ *
+ * This makes the MPI ready to be set or freed,
* but does not define a value for the MPI.
*
- * \param X One MPI to initialize.
+ * \param X The MPI context to initialize. This must not be \c NULL.
*/
void mbedtls_mpi_init( mbedtls_mpi *X );
/**
- * \brief Unallocate one MPI
+ * \brief This function frees the components of an MPI context.
*
- * \param X One MPI to unallocate.
+ * \param X The MPI context to be cleared. This may be \c NULL,
+ * in which case this function is a no-op. If it is
+ * not \c NULL, it must point to an initialized MPI.
*/
void mbedtls_mpi_free( mbedtls_mpi *X );
/**
- * \brief Enlarge to the specified number of limbs
+ * \brief Enlarge an MPI to the specified number of limbs.
*
- * This function does nothing if the MPI is already large enough.
+ * \note This function does nothing if the MPI is
+ * already large enough.
*
- * \param X MPI to grow
- * \param nblimbs The target number of limbs
+ * \param X The MPI to grow. It must be initialized.
+ * \param nblimbs The target number of limbs.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs );
/**
- * \brief Resize down, keeping at least the specified number of limbs
+ * \brief This function resizes an MPI downwards, keeping at least the
+ * specified number of limbs.
*
* If \c X is smaller than \c nblimbs, it is resized up
* instead.
*
- * \param X MPI to shrink
- * \param nblimbs The minimum number of limbs to keep
+ * \param X The MPI to shrink. This must point to an initialized MPI.
+ * \param nblimbs The minimum number of limbs to keep.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
* (this can only happen when resizing up).
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs );
/**
- * \brief Copy the contents of Y into X
+ * \brief Make a copy of an MPI.
+ *
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param Y The source MPI. This must point to an initialized MPI.
*
- * \param X Destination MPI. It is enlarged if necessary.
- * \param Y Source MPI.
+ * \note The limb-buffer in the destination MPI is enlarged
+ * if necessary to hold the value in the source MPI.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y );
/**
- * \brief Swap the contents of X and Y
+ * \brief Swap the contents of two MPIs.
*
- * \param X First MPI value
- * \param Y Second MPI value
+ * \param X The first MPI. It must be initialized.
+ * \param Y The second MPI. It must be initialized.
*/
void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y );
/**
- * \brief Safe conditional assignement X = Y if assign is 1
+ * \brief Perform a safe conditional copy of MPI which doesn't
+ * reveal whether the condition was true or not.
*
- * \param X MPI to conditionally assign to
- * \param Y Value to be assigned
- * \param assign 1: perform the assignment, 0: keep X's original value
- *
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
+ * \param X The MPI to conditionally assign to. This must point
+ * to an initialized MPI.
+ * \param Y The MPI to be assigned from. This must point to an
+ * initialized MPI.
+ * \param assign The condition deciding whether to perform the
+ * assignment or not. Possible values:
+ * * \c 1: Perform the assignment `X = Y`.
+ * * \c 0: Keep the original value of \p X.
*
* \note This function is equivalent to
- * if( assign ) mbedtls_mpi_copy( X, Y );
+ * `if( assign ) mbedtls_mpi_copy( X, Y );`
* except that it avoids leaking any information about whether
* the assignment was done or not (the above code may leak
* information through branch prediction and/or memory access
* patterns analysis).
+ *
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign );
/**
- * \brief Safe conditional swap X <-> Y if swap is 1
+ * \brief Perform a safe conditional swap which doesn't
+ * reveal whether the condition was true or not.
*
- * \param X First mbedtls_mpi value
- * \param Y Second mbedtls_mpi value
- * \param assign 1: perform the swap, 0: keep X and Y's original values
- *
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
+ * \param X The first MPI. This must be initialized.
+ * \param Y The second MPI. This must be initialized.
+ * \param assign The condition deciding whether to perform
+ * the swap or not. Possible values:
+ * * \c 1: Swap the values of \p X and \p Y.
+ * * \c 0: Keep the original values of \p X and \p Y.
*
* \note This function is equivalent to
* if( assign ) mbedtls_mpi_swap( X, Y );
@@ -283,415 +302,512 @@ int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned
* the assignment was done or not (the above code may leak
* information through branch prediction and/or memory access
* patterns analysis).
+ *
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return Another negative error code on other kinds of failure.
+ *
*/
int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign );
/**
- * \brief Set value from integer
+ * \brief Store integer value in MPI.
*
- * \param X MPI to set
- * \param z Value to use
+ * \param X The MPI to set. This must be initialized.
+ * \param z The value to use.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_mpi_lset( mbedtls_mpi *X, mbedtls_mpi_sint z );
/**
- * \brief Get a specific bit from X
+ * \brief Get a specific bit from an MPI.
*
- * \param X MPI to use
- * \param pos Zero-based index of the bit in X
+ * \param X The MPI to query. This must be initialized.
+ * \param pos Zero-based index of the bit to query.
*
- * \return Either a 0 or a 1
+ * \return \c 0 or \c 1 on success, depending on whether bit \c pos
+ * of \c X is unset or set.
+ * \return A negative error code on failure.
*/
int mbedtls_mpi_get_bit( const mbedtls_mpi *X, size_t pos );
/**
- * \brief Set a bit of X to a specific value of 0 or 1
+ * \brief Modify a specific bit in an MPI.
*
- * \note Will grow X if necessary to set a bit to 1 in a not yet
- * existing limb. Will not grow if bit should be set to 0
+ * \note This function will grow the target MPI if necessary to set a
+ * bit to \c 1 in a not yet existing limb. It will not grow if
+ * the bit should be set to \c 0.
*
- * \param X MPI to use
- * \param pos Zero-based index of the bit in X
- * \param val The value to set the bit to (0 or 1)
+ * \param X The MPI to modify. This must be initialized.
+ * \param pos Zero-based index of the bit to modify.
+ * \param val The desired value of bit \c pos: \c 0 or \c 1.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if val is not 0 or 1
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_mpi_set_bit( mbedtls_mpi *X, size_t pos, unsigned char val );
/**
- * \brief Return the number of zero-bits before the least significant
- * '1' bit
+ * \brief Return the number of bits of value \c 0 before the
+ * least significant bit of value \c 1.
+ *
+ * \note This is the same as the zero-based index of
+ * the least significant bit of value \c 1.
*
- * Note: Thus also the zero-based index of the least significant '1' bit
+ * \param X The MPI to query.
*
- * \param X MPI to use
+ * \return The number of bits of value \c 0 before the least significant
+ * bit of value \c 1 in \p X.
*/
size_t mbedtls_mpi_lsb( const mbedtls_mpi *X );
/**
* \brief Return the number of bits up to and including the most
- * significant '1' bit'
+ * significant bit of value \c 1.
*
- * Note: Thus also the one-based index of the most significant '1' bit
+ * * \note This is same as the one-based index of the most
+ * significant bit of value \c 1.
*
- * \param X MPI to use
+ * \param X The MPI to query. This must point to an initialized MPI.
+ *
+ * \return The number of bits up to and including the most
+ * significant bit of value \c 1.
*/
size_t mbedtls_mpi_bitlen( const mbedtls_mpi *X );
/**
- * \brief Return the total size in bytes
+ * \brief Return the total size of an MPI value in bytes.
+ *
+ * \param X The MPI to use. This must point to an initialized MPI.
*
- * \param X MPI to use
+ * \note The value returned by this function may be less than
+ * the number of bytes used to store \p X internally.
+ * This happens if and only if there are trailing bytes
+ * of value zero.
+ *
+ * \return The least number of bytes capable of storing
+ * the absolute value of \p X.
*/
size_t mbedtls_mpi_size( const mbedtls_mpi *X );
/**
- * \brief Import from an ASCII string
+ * \brief Import an MPI from an ASCII string.
*
- * \param X Destination MPI
- * \param radix Input numeric base
- * \param s Null-terminated string buffer
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param radix The numeric base of the input string.
+ * \param s Null-terminated string buffer.
*
- * \return 0 if successful, or a MBEDTLS_ERR_MPI_XXX error code
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_mpi_read_string( mbedtls_mpi *X, int radix, const char *s );
/**
- * \brief Export into an ASCII string
+ * \brief Export an MPI to an ASCII string.
*
- * \param X Source MPI
- * \param radix Output numeric base
- * \param buf Buffer to write the string to
- * \param buflen Length of buf
- * \param olen Length of the string written, including final NUL byte
+ * \param X The source MPI. This must point to an initialized MPI.
+ * \param radix The numeric base of the output string.
+ * \param buf The buffer to write the string to. This must be writable
+ * buffer of length \p buflen Bytes.
+ * \param buflen The available size in Bytes of \p buf.
+ * \param olen The address at which to store the length of the string
+ * written, including the final \c NULL byte. This must
+ * not be \c NULL.
*
- * \return 0 if successful, or a MBEDTLS_ERR_MPI_XXX error code.
- * *olen is always updated to reflect the amount
- * of data that has (or would have) been written.
+ * \note You can call this function with `buflen == 0` to obtain the
+ * minimum required buffer size in `*olen`.
*
- * \note Call this function with buflen = 0 to obtain the
- * minimum required buffer size in *olen.
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if the target buffer \p buf
+ * is too small to hold the value of \p X in the desired base.
+ * In this case, `*olen` is nonetheless updated to contain the
+ * size of \p buf required for a successful call.
+ * \return Another negative error code on different kinds of failure.
*/
int mbedtls_mpi_write_string( const mbedtls_mpi *X, int radix,
char *buf, size_t buflen, size_t *olen );
#if defined(MBEDTLS_FS_IO)
/**
- * \brief Read MPI from a line in an opened file
- *
- * \param X Destination MPI
- * \param radix Input numeric base
- * \param fin Input file handle
+ * \brief Read an MPI from a line in an opened file.
*
- * \return 0 if successful, MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if
- * the file read buffer is too small or a
- * MBEDTLS_ERR_MPI_XXX error code
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param radix The numeric base of the string representation used
+ * in the source line.
+ * \param fin The input file handle to use. This must not be \c NULL.
*
* \note On success, this function advances the file stream
* to the end of the current line or to EOF.
*
- * The function returns 0 on an empty line.
+ * The function returns \c 0 on an empty line.
*
* Leading whitespaces are ignored, as is a
- * '0x' prefix for radix 16.
+ * '0x' prefix for radix \c 16.
*
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if the file read buffer
+ * is too small.
+ * \return Another negative error code on failure.
*/
int mbedtls_mpi_read_file( mbedtls_mpi *X, int radix, FILE *fin );
/**
- * \brief Write X into an opened file, or stdout if fout is NULL
+ * \brief Export an MPI into an opened file.
*
- * \param p Prefix, can be NULL
- * \param X Source MPI
- * \param radix Output numeric base
- * \param fout Output file handle (can be NULL)
+ * \param p A string prefix to emit prior to the MPI data.
+ * For example, this might be a label, or "0x" when
+ * printing in base \c 16. This may be \c NULL if no prefix
+ * is needed.
+ * \param X The source MPI. This must point to an initialized MPI.
+ * \param radix The numeric base to be used in the emitted string.
+ * \param fout The output file handle. This may be \c NULL, in which case
+ * the output is written to \c stdout.
*
- * \return 0 if successful, or a MBEDTLS_ERR_MPI_XXX error code
- *
- * \note Set fout == NULL to print X on the console.
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
-int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X, int radix, FILE *fout );
+int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X,
+ int radix, FILE *fout );
#endif /* MBEDTLS_FS_IO */
/**
- * \brief Import X from unsigned binary data, big endian
+ * \brief Import an MPI from unsigned big endian binary data.
*
- * \param X Destination MPI
- * \param buf Input buffer
- * \param buflen Input buffer size
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param buf The input buffer. This must be a readable buffer of length
+ * \p buflen Bytes.
+ * \param buflen The length of the input buffer \p p in Bytes.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t buflen );
+int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf,
+ size_t buflen );
/**
- * \brief Export X into unsigned binary data, big endian.
- * Always fills the whole buffer, which will start with zeros
- * if the number is smaller.
+ * \brief Export an MPI into unsigned big endian binary data
+ * of fixed size.
*
- * \param X Source MPI
- * \param buf Output buffer
- * \param buflen Output buffer size
+ * \param X The source MPI. This must point to an initialized MPI.
+ * \param buf The output buffer. This must be a writable buffer of length
+ * \p buflen Bytes.
+ * \param buflen The size of the output buffer \p buf in Bytes.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if buf isn't large enough
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if \p buf isn't
+ * large enough to hold the value of \p X.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf, size_t buflen );
+int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf,
+ size_t buflen );
/**
- * \brief Left-shift: X <<= count
+ * \brief Perform a left-shift on an MPI: X <<= count
*
- * \param X MPI to shift
- * \param count Amount to shift
+ * \param X The MPI to shift. This must point to an initialized MPI.
+ * \param count The number of bits to shift by.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
int mbedtls_mpi_shift_l( mbedtls_mpi *X, size_t count );
/**
- * \brief Right-shift: X >>= count
+ * \brief Perform a right-shift on an MPI: X >>= count
*
- * \param X MPI to shift
- * \param count Amount to shift
+ * \param X The MPI to shift. This must point to an initialized MPI.
+ * \param count The number of bits to shift by.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
int mbedtls_mpi_shift_r( mbedtls_mpi *X, size_t count );
/**
- * \brief Compare unsigned values
+ * \brief Compare the absolute values of two MPIs.
*
- * \param X Left-hand MPI
- * \param Y Right-hand MPI
+ * \param X The left-hand MPI. This must point to an initialized MPI.
+ * \param Y The right-hand MPI. This must point to an initialized MPI.
*
- * \return 1 if |X| is greater than |Y|,
- * -1 if |X| is lesser than |Y| or
- * 0 if |X| is equal to |Y|
+ * \return \c 1 if `|X|` is greater than `|Y|`.
+ * \return \c -1 if `|X|` is lesser than `|Y|`.
+ * \return \c 0 if `|X|` is equal to `|Y|`.
*/
int mbedtls_mpi_cmp_abs( const mbedtls_mpi *X, const mbedtls_mpi *Y );
/**
- * \brief Compare signed values
+ * \brief Compare two MPIs.
*
- * \param X Left-hand MPI
- * \param Y Right-hand MPI
+ * \param X The left-hand MPI. This must point to an initialized MPI.
+ * \param Y The right-hand MPI. This must point to an initialized MPI.
*
- * \return 1 if X is greater than Y,
- * -1 if X is lesser than Y or
- * 0 if X is equal to Y
+ * \return \c 1 if \p X is greater than \p Y.
+ * \return \c -1 if \p X is lesser than \p Y.
+ * \return \c 0 if \p X is equal to \p Y.
*/
int mbedtls_mpi_cmp_mpi( const mbedtls_mpi *X, const mbedtls_mpi *Y );
/**
- * \brief Compare signed values
+ * \brief Compare an MPI with an integer.
*
- * \param X Left-hand MPI
- * \param z The integer value to compare to
+ * \param X The left-hand MPI. This must point to an initialized MPI.
+ * \param z The integer value to compare \p X to.
*
- * \return 1 if X is greater than z,
- * -1 if X is lesser than z or
- * 0 if X is equal to z
+ * \return \c 1 if \p X is greater than \p z.
+ * \return \c -1 if \p X is lesser than \p z.
+ * \return \c 0 if \p X is equal to \p z.
*/
int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z );
/**
- * \brief Unsigned addition: X = |A| + |B|
+ * \brief Perform an unsigned addition of MPIs: X = |A| + |B|
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param B Right-hand MPI
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The first summand. This must point to an initialized MPI.
+ * \param B The second summand. This must point to an initialized MPI.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_add_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B );
+int mbedtls_mpi_add_abs( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Unsigned subtraction: X = |A| - |B|
+ * \brief Perform an unsigned subtraction of MPIs: X = |A| - |B|
+ *
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The minuend. This must point to an initialized MPI.
+ * \param B The subtrahend. This must point to an initialized MPI.
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param B Right-hand MPI
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p B is greater than \p A.
+ * \return Another negative error code on different kinds of failure.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_NEGATIVE_VALUE if B is greater than A
*/
-int mbedtls_mpi_sub_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B );
+int mbedtls_mpi_sub_abs( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Signed addition: X = A + B
+ * \brief Perform a signed addition of MPIs: X = A + B
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param B Right-hand MPI
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The first summand. This must point to an initialized MPI.
+ * \param B The second summand. This must point to an initialized MPI.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_add_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B );
+int mbedtls_mpi_add_mpi( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Signed subtraction: X = A - B
+ * \brief Perform a signed subtraction of MPIs: X = A - B
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param B Right-hand MPI
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The minuend. This must point to an initialized MPI.
+ * \param B The subtrahend. This must point to an initialized MPI.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_sub_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B );
+int mbedtls_mpi_sub_mpi( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Signed addition: X = A + b
+ * \brief Perform a signed addition of an MPI and an integer: X = A + b
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param b The integer value to add
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The first summand. This must point to an initialized MPI.
+ * \param b The second summand.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b );
+int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A,
+ mbedtls_mpi_sint b );
/**
- * \brief Signed subtraction: X = A - b
+ * \brief Perform a signed subtraction of an MPI and an integer:
+ * X = A - b
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param b The integer value to subtract
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The minuend. This must point to an initialized MPI.
+ * \param b The subtrahend.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b );
+int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls_mpi *A,
+ mbedtls_mpi_sint b );
/**
- * \brief Baseline multiplication: X = A * B
+ * \brief Perform a multiplication of two MPIs: X = A * B
+ *
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The first factor. This must point to an initialized MPI.
+ * \param B The second factor. This must point to an initialized MPI.
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param B Right-hand MPI
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
*/
-int mbedtls_mpi_mul_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B );
+int mbedtls_mpi_mul_mpi( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Baseline multiplication: X = A * b
+ * \brief Perform a multiplication of an MPI with an unsigned integer:
+ * X = A * b
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param b The unsigned integer value to multiply with
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The first factor. This must point to an initialized MPI.
+ * \param b The second factor.
*
- * \note b is unsigned
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
*/
-int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b );
+int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A,
+ mbedtls_mpi_uint b );
/**
- * \brief Division by mbedtls_mpi: A = Q * B + R
+ * \brief Perform a division with remainder of two MPIs:
+ * A = Q * B + R
*
- * \param Q Destination MPI for the quotient
- * \param R Destination MPI for the rest value
- * \param A Left-hand MPI
- * \param B Right-hand MPI
+ * \param Q The destination MPI for the quotient.
+ * This may be \c NULL if the value of the
+ * quotient is not needed.
+ * \param R The destination MPI for the remainder value.
+ * This may be \c NULL if the value of the
+ * remainder is not needed.
+ * \param A The dividend. This must point to an initialized MPi.
+ * \param B The divisor. This must point to an initialized MPI.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if B == 0
- *
- * \note Either Q or R can be NULL.
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p B equals zero.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B );
+int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Division by int: A = Q * b + R
- *
- * \param Q Destination MPI for the quotient
- * \param R Destination MPI for the rest value
- * \param A Left-hand MPI
- * \param b Integer to divide by
+ * \brief Perform a division with remainder of an MPI by an integer:
+ * A = Q * b + R
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if b == 0
+ * \param Q The destination MPI for the quotient.
+ * This may be \c NULL if the value of the
+ * quotient is not needed.
+ * \param R The destination MPI for the remainder value.
+ * This may be \c NULL if the value of the
+ * remainder is not needed.
+ * \param A The dividend. This must point to an initialized MPi.
+ * \param b The divisor.
*
- * \note Either Q or R can be NULL.
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p b equals zero.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, mbedtls_mpi_sint b );
+int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
+ mbedtls_mpi_sint b );
/**
- * \brief Modulo: R = A mod B
+ * \brief Perform a modular reduction. R = A mod B
*
- * \param R Destination MPI for the rest value
- * \param A Left-hand MPI
- * \param B Right-hand MPI
+ * \param R The destination MPI for the residue value.
+ * This must point to an initialized MPI.
+ * \param A The MPI to compute the residue of.
+ * This must point to an initialized MPI.
+ * \param B The base of the modular reduction.
+ * This must point to an initialized MPI.
+ *
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p B equals zero.
+ * \return #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p B is negative.
+ * \return Another negative error code on different kinds of failure.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if B == 0,
- * MBEDTLS_ERR_MPI_NEGATIVE_VALUE if B < 0
*/
-int mbedtls_mpi_mod_mpi( mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B );
+int mbedtls_mpi_mod_mpi( mbedtls_mpi *R, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Modulo: r = A mod b
+ * \brief Perform a modular reduction with respect to an integer.
+ * r = A mod b
*
- * \param r Destination mbedtls_mpi_uint
- * \param A Left-hand MPI
- * \param b Integer to divide by
+ * \param r The address at which to store the residue.
+ * This must not be \c NULL.
+ * \param A The MPI to compute the residue of.
+ * This must point to an initialized MPi.
+ * \param b The integer base of the modular reduction.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if b == 0,
- * MBEDTLS_ERR_MPI_NEGATIVE_VALUE if b < 0
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p b equals zero.
+ * \return #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p b is negative.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_sint b );
+int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A,
+ mbedtls_mpi_sint b );
/**
- * \brief Sliding-window exponentiation: X = A^E mod N
- *
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param E Exponent MPI
- * \param N Modular MPI
- * \param _RR Speed-up MPI used for recalculations
+ * \brief Perform a sliding-window exponentiation: X = A^E mod N
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if N is negative or even or
- * if E is negative
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The base of the exponentiation.
+ * This must point to an initialized MPI.
+ * \param E The exponent MPI. This must point to an initialized MPI.
+ * \param N The base for the modular reduction. This must point to an
+ * initialized MPI.
+ * \param _RR A helper MPI depending solely on \p N which can be used to
+ * speed-up multiple modular exponentiations for the same value
+ * of \p N. This may be \c NULL. If it is not \c NULL, it must
+ * point to an initialized MPI. If it hasn't been used after
+ * the call to mbedtls_mpi_init(), this function will compute
+ * the helper value and store it in \p _RR for reuse on
+ * subsequent calls to this function. Otherwise, the function
+ * will assume that \p _RR holds the helper value set by a
+ * previous call to mbedtls_mpi_exp_mod(), and reuse it.
+ *
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \c N is negative or
+ * even, or if \c E is negative.
+ * \return Another negative error code on different kinds of failures.
*
- * \note _RR is used to avoid re-computing R*R mod N across
- * multiple calls, which speeds up things a bit. It can
- * be set to NULL if the extra performance is unneeded.
*/
-int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR );
+int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *E, const mbedtls_mpi *N,
+ mbedtls_mpi *_RR );
/**
- * \brief Fill an MPI X with size bytes of random
+ * \brief Fill an MPI with a number of random bytes.
*
- * \param X Destination MPI
- * \param size Size in bytes
- * \param f_rng RNG function
- * \param p_rng RNG parameter
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param size The number of random bytes to generate.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng doesn't need a context argument.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on failure.
*
- * \note The bytes obtained from the PRNG are interpreted
+ * \note The bytes obtained from the RNG are interpreted
* as a big-endian representation of an MPI; this can
* be relevant in applications like deterministic ECDSA.
*/
@@ -700,61 +816,130 @@ int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size,
void *p_rng );
/**
- * \brief Greatest common divisor: G = gcd(A, B)
- *
- * \param G Destination MPI
- * \param A Left-hand MPI
- * \param B Right-hand MPI
- *
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
- */
-int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B );
-
-/**
- * \brief Modular inverse: X = A^-1 mod N
+ * \brief Compute the greatest common divisor: G = gcd(A, B)
*
- * \param X Destination MPI
- * \param A Left-hand MPI
- * \param N Right-hand MPI
+ * \param G The destination MPI. This must point to an initialized MPI.
+ * \param A The first operand. This must point to an initialized MPI.
+ * \param B The second operand. This must point to an initialized MPI.
*
- * \return 0 if successful,
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if N is <= 1,
- MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if A has no inverse mod N.
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return Another negative error code on different kinds of failure.
*/
-int mbedtls_mpi_inv_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *N );
+int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A,
+ const mbedtls_mpi *B );
/**
- * \brief Miller-Rabin primality test
+ * \brief Compute the modular inverse: X = A^-1 mod N
*
- * \param X MPI to check
- * \param f_rng RNG function
- * \param p_rng RNG parameter
+ * \param X The destination MPI. This must point to an initialized MPI.
+ * \param A The MPI to calculate the modular inverse of. This must point
+ * to an initialized MPI.
+ * \param N The base of the modular inversion. This must point to an
+ * initialized MPI.
*
- * \return 0 if successful (probably prime),
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if X is not prime
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \p N is less than
+ * or equal to one.
+ * \return #MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if \p has no modular inverse
+ * with respect to \p N.
*/
-int mbedtls_mpi_is_prime( const mbedtls_mpi *X,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng );
+int mbedtls_mpi_inv_mod( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *N );
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+#if defined(MBEDTLS_DEPRECATED_WARNING)
+#define MBEDTLS_DEPRECATED __attribute__((deprecated))
+#else
+#define MBEDTLS_DEPRECATED
+#endif
/**
- * \brief Prime number generation
- *
- * \param X Destination MPI
- * \param nbits Required size of X in bits
- * ( 3 <= nbits <= MBEDTLS_MPI_MAX_BITS )
- * \param dh_flag If 1, then (X-1)/2 will be prime too
- * \param f_rng RNG function
- * \param p_rng RNG parameter
- *
- * \return 0 if successful (probably prime),
- * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed,
- * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if nbits is < 3
- */
-int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
+ * \brief Perform a Miller-Rabin primality test with error
+ * probability of 2<sup>-80</sup>.
+ *
+ * \deprecated Superseded by mbedtls_mpi_is_prime_ext() which allows
+ * specifying the number of Miller-Rabin rounds.
+ *
+ * \param X The MPI to check for primality.
+ * This must point to an initialized MPI.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng.
+ * This may be \c NULL if \p f_rng doesn't use a
+ * context parameter.
+ *
+ * \return \c 0 if successful, i.e. \p X is probably prime.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if \p X is not prime.
+ * \return Another negative error code on other kinds of failure.
+ */
+MBEDTLS_DEPRECATED int mbedtls_mpi_is_prime( const mbedtls_mpi *X,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng );
+#undef MBEDTLS_DEPRECATED
+#endif /* !MBEDTLS_DEPRECATED_REMOVED */
+
+/**
+ * \brief Miller-Rabin primality test.
+ *
+ * \warning If \p X is potentially generated by an adversary, for example
+ * when validating cryptographic parameters that you didn't
+ * generate yourself and that are supposed to be prime, then
+ * \p rounds should be at least the half of the security
+ * strength of the cryptographic algorithm. On the other hand,
+ * if \p X is chosen uniformly or non-adversially (as is the
+ * case when mbedtls_mpi_gen_prime calls this function), then
+ * \p rounds can be much lower.
+ *
+ * \param X The MPI to check for primality.
+ * This must point to an initialized MPI.
+ * \param rounds The number of bases to perform the Miller-Rabin primality
+ * test for. The probability of returning 0 on a composite is
+ * at most 2<sup>-2*\p rounds</sup>.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng.
+ * This may be \c NULL if \p f_rng doesn't use
+ * a context parameter.
+ *
+ * \return \c 0 if successful, i.e. \p X is probably prime.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if \p X is not prime.
+ * \return Another negative error code on other kinds of failure.
+ */
+int mbedtls_mpi_is_prime_ext( const mbedtls_mpi *X, int rounds,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng );
+/**
+ * \brief Flags for mbedtls_mpi_gen_prime()
+ *
+ * Each of these flags is a constraint on the result X returned by
+ * mbedtls_mpi_gen_prime().
+ */
+typedef enum {
+ MBEDTLS_MPI_GEN_PRIME_FLAG_DH = 0x0001, /**< (X-1)/2 is prime too */
+ MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR = 0x0002, /**< lower error rate from 2<sup>-80</sup> to 2<sup>-128</sup> */
+} mbedtls_mpi_gen_prime_flag_t;
+
+/**
+ * \brief Generate a prime number.
+ *
+ * \param X The destination MPI to store the generated prime in.
+ * This must point to an initialized MPi.
+ * \param nbits The required size of the destination MPI in bits.
+ * This must be between \c 3 and #MBEDTLS_MPI_MAX_BITS.
+ * \param flags A mask of flags of type #mbedtls_mpi_gen_prime_flag_t.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng.
+ * This may be \c NULL if \p f_rng doesn't use
+ * a context parameter.
+ *
+ * \return \c 0 if successful, in which case \p X holds a
+ * probably prime number.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
+ * \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if `nbits` is not between
+ * \c 3 and #MBEDTLS_MPI_MAX_BITS.
+ */
+int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int flags,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng );
diff --git a/thirdparty/mbedtls/include/mbedtls/blowfish.h b/thirdparty/mbedtls/include/mbedtls/blowfish.h
index 985faa43f0..f01573dcaf 100644
--- a/thirdparty/mbedtls/include/mbedtls/blowfish.h
+++ b/thirdparty/mbedtls/include/mbedtls/blowfish.h
@@ -33,6 +33,8 @@
#include <stddef.h>
#include <stdint.h>
+#include "platform_util.h"
+
#define MBEDTLS_BLOWFISH_ENCRYPT 1
#define MBEDTLS_BLOWFISH_DECRYPT 0
#define MBEDTLS_BLOWFISH_MAX_KEY_BITS 448
@@ -40,9 +42,16 @@
#define MBEDTLS_BLOWFISH_ROUNDS 16 /**< Rounds to use. When increasing this value, make sure to extend the initialisation vectors */
#define MBEDTLS_BLOWFISH_BLOCKSIZE 8 /* Blowfish uses 64 bit blocks */
-#define MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH -0x0016 /**< Invalid key length. */
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+#define MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0016 )
+#endif /* !MBEDTLS_DEPRECATED_REMOVED */
+#define MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA -0x0016 /**< Bad input data. */
+
+#define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 /**< Invalid data input length. */
+
+/* MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED is deprecated and should not be used.
+ */
#define MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED -0x0017 /**< Blowfish hardware accelerator failed. */
-#define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 /**< Invalid data input length. */
#ifdef __cplusplus
extern "C" {
@@ -55,7 +64,7 @@ extern "C" {
/**
* \brief Blowfish context structure
*/
-typedef struct
+typedef struct mbedtls_blowfish_context
{
uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2]; /*!< Blowfish round keys */
uint32_t S[4][256]; /*!< key dependent S-boxes */
@@ -67,40 +76,53 @@ mbedtls_blowfish_context;
#endif /* MBEDTLS_BLOWFISH_ALT */
/**
- * \brief Initialize Blowfish context
+ * \brief Initialize a Blowfish context.
*
- * \param ctx Blowfish context to be initialized
+ * \param ctx The Blowfish context to be initialized.
+ * This must not be \c NULL.
*/
void mbedtls_blowfish_init( mbedtls_blowfish_context *ctx );
/**
- * \brief Clear Blowfish context
+ * \brief Clear a Blowfish context.
*
- * \param ctx Blowfish context to be cleared
+ * \param ctx The Blowfish context to be cleared.
+ * This may be \c NULL, in which case this function
+ * returns immediately. If it is not \c NULL, it must
+ * point to an initialized Blowfish context.
*/
void mbedtls_blowfish_free( mbedtls_blowfish_context *ctx );
/**
- * \brief Blowfish key schedule
+ * \brief Perform a Blowfish key schedule operation.
*
- * \param ctx Blowfish context to be initialized
- * \param key encryption key
- * \param keybits must be between 32 and 448 bits
+ * \param ctx The Blowfish context to perform the key schedule on.
+ * \param key The encryption key. This must be a readable buffer of
+ * length \p keybits Bits.
+ * \param keybits The length of \p key in Bits. This must be between
+ * \c 32 and \c 448 and a multiple of \c 8.
*
- * \return 0 if successful, or MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx, const unsigned char *key,
unsigned int keybits );
/**
- * \brief Blowfish-ECB block encryption/decryption
+ * \brief Perform a Blowfish-ECB block encryption/decryption operation.
*
- * \param ctx Blowfish context
- * \param mode MBEDTLS_BLOWFISH_ENCRYPT or MBEDTLS_BLOWFISH_DECRYPT
- * \param input 8-byte input block
- * \param output 8-byte output block
+ * \param ctx The Blowfish context to use. This must be initialized
+ * and bound to a key.
+ * \param mode The mode of operation. Possible values are
+ * #MBEDTLS_BLOWFISH_ENCRYPT for encryption, or
+ * #MBEDTLS_BLOWFISH_DECRYPT for decryption.
+ * \param input The input block. This must be a readable buffer
+ * of size \c 8 Bytes.
+ * \param output The output block. This must be a writable buffer
+ * of size \c 8 Bytes.
*
- * \return 0 if successful
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx,
int mode,
@@ -109,9 +131,7 @@ int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
/**
- * \brief Blowfish-CBC buffer encryption/decryption
- * Length should be a multiple of the block
- * size (8 bytes)
+ * \brief Perform a Blowfish-CBC buffer encryption/decryption operation.
*
* \note Upon exit, the content of the IV is updated so that you can
* call the function same function again on the following
@@ -121,15 +141,22 @@ int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx,
* IV, you should either save it manually or use the cipher
* module instead.
*
- * \param ctx Blowfish context
- * \param mode MBEDTLS_BLOWFISH_ENCRYPT or MBEDTLS_BLOWFISH_DECRYPT
- * \param length length of the input data
- * \param iv initialization vector (updated after use)
- * \param input buffer holding the input data
- * \param output buffer holding the output data
+ * \param ctx The Blowfish context to use. This must be initialized
+ * and bound to a key.
+ * \param mode The mode of operation. Possible values are
+ * #MBEDTLS_BLOWFISH_ENCRYPT for encryption, or
+ * #MBEDTLS_BLOWFISH_DECRYPT for decryption.
+ * \param length The length of the input data in Bytes. This must be
+ * multiple of \c 8.
+ * \param iv The initialization vector. This must be a read/write buffer
+ * of length \c 8 Bytes. It is updated by this function.
+ * \param input The input data. This must be a readable buffer of length
+ * \p length Bytes.
+ * \param output The output data. This must be a writable buffer of length
+ * \p length Bytes.
*
- * \return 0 if successful, or
- * MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
int mode,
@@ -141,7 +168,7 @@ int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
#if defined(MBEDTLS_CIPHER_MODE_CFB)
/**
- * \brief Blowfish CFB buffer encryption/decryption.
+ * \brief Perform a Blowfish CFB buffer encryption/decryption operation.
*
* \note Upon exit, the content of the IV is updated so that you can
* call the function same function again on the following
@@ -151,15 +178,25 @@ int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
* IV, you should either save it manually or use the cipher
* module instead.
*
- * \param ctx Blowfish context
- * \param mode MBEDTLS_BLOWFISH_ENCRYPT or MBEDTLS_BLOWFISH_DECRYPT
- * \param length length of the input data
- * \param iv_off offset in IV (updated after use)
- * \param iv initialization vector (updated after use)
- * \param input buffer holding the input data
- * \param output buffer holding the output data
+ * \param ctx The Blowfish context to use. This must be initialized
+ * and bound to a key.
+ * \param mode The mode of operation. Possible values are
+ * #MBEDTLS_BLOWFISH_ENCRYPT for encryption, or
+ * #MBEDTLS_BLOWFISH_DECRYPT for decryption.
+ * \param length The length of the input data in Bytes.
+ * \param iv_off The offset in the initialiation vector.
+ * The value pointed to must be smaller than \c 8 Bytes.
+ * It is updated by this function to support the aforementioned
+ * streaming usage.
+ * \param iv The initialization vector. This must be a read/write buffer
+ * of size \c 8 Bytes. It is updated after use.
+ * \param input The input data. This must be a readable buffer of length
+ * \p length Bytes.
+ * \param output The output data. This must be a writable buffer of length
+ * \p length Bytes.
*
- * \return 0 if successful
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
int mode,
@@ -172,7 +209,7 @@ int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
#if defined(MBEDTLS_CIPHER_MODE_CTR)
/**
- * \brief Blowfish-CTR buffer encryption/decryption
+ * \brief Perform a Blowfish-CTR buffer encryption/decryption operation.
*
* \warning You must never reuse a nonce value with the same key. Doing so
* would void the encryption for the two messages encrypted with
@@ -215,18 +252,24 @@ int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
* content must not be written to insecure storage and should be
* securely discarded as soon as it's no longer needed.
*
- * \param ctx Blowfish context
- * \param length The length of the data
+ * \param ctx The Blowfish context to use. This must be initialized
+ * and bound to a key.
+ * \param length The length of the input data in Bytes.
* \param nc_off The offset in the current stream_block (for resuming
- * within current cipher stream). The offset pointer to
- * should be 0 at the start of a stream.
- * \param nonce_counter The 64-bit nonce and counter.
- * \param stream_block The saved stream-block for resuming. Is overwritten
- * by the function.
- * \param input The input data stream
- * \param output The output data stream
- *
- * \return 0 if successful
+ * within current cipher stream). The offset pointer
+ * should be \c 0 at the start of a stream and must be
+ * smaller than \c 8. It is updated by this function.
+ * \param nonce_counter The 64-bit nonce and counter. This must point to a
+ * read/write buffer of length \c 8 Bytes.
+ * \param stream_block The saved stream-block for resuming. This must point to
+ * a read/write buffer of length \c 8 Bytes.
+ * \param input The input data. This must be a readable buffer of
+ * length \p length Bytes.
+ * \param output The output data. This must be a writable buffer of
+ * length \p length Bytes.
+ *
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_ctr( mbedtls_blowfish_context *ctx,
size_t length,
diff --git a/thirdparty/mbedtls/include/mbedtls/bn_mul.h b/thirdparty/mbedtls/include/mbedtls/bn_mul.h
index b587317d95..2f7b72fe4c 100644
--- a/thirdparty/mbedtls/include/mbedtls/bn_mul.h
+++ b/thirdparty/mbedtls/include/mbedtls/bn_mul.h
@@ -170,19 +170,19 @@
#define MULADDC_INIT \
asm( \
- "xorq %%r8, %%r8 \n\t"
+ "xorq %%r8, %%r8\n"
#define MULADDC_CORE \
- "movq (%%rsi), %%rax \n\t" \
- "mulq %%rbx \n\t" \
- "addq $8, %%rsi \n\t" \
- "addq %%rcx, %%rax \n\t" \
- "movq %%r8, %%rcx \n\t" \
- "adcq $0, %%rdx \n\t" \
- "nop \n\t" \
- "addq %%rax, (%%rdi) \n\t" \
- "adcq %%rdx, %%rcx \n\t" \
- "addq $8, %%rdi \n\t"
+ "movq (%%rsi), %%rax\n" \
+ "mulq %%rbx\n" \
+ "addq $8, %%rsi\n" \
+ "addq %%rcx, %%rax\n" \
+ "movq %%r8, %%rcx\n" \
+ "adcq $0, %%rdx\n" \
+ "nop \n" \
+ "addq %%rax, (%%rdi)\n" \
+ "adcq %%rdx, %%rcx\n" \
+ "addq $8, %%rdi\n"
#define MULADDC_STOP \
: "+c" (c), "+D" (d), "+S" (s) \
@@ -565,9 +565,8 @@
#endif /* TriCore */
/*
- * gcc -O0 by default uses r7 for the frame pointer, so it complains about our
- * use of r7 below, unless -fomit-frame-pointer is passed. Unfortunately,
- * passing that option is not easy when building with yotta.
+ * Note, gcc -O0 by default uses r7 for the frame pointer, so it complains about
+ * our use of r7 below, unless -fomit-frame-pointer is passed.
*
* On the other hand, -fomit-frame-pointer is implied by any -Ox options with
* x !=0, which we can detect using __OPTIMIZE__ (which is also defined by
@@ -637,6 +636,23 @@
"r6", "r7", "r8", "r9", "cc" \
);
+#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)
+
+#define MULADDC_INIT \
+ asm(
+
+#define MULADDC_CORE \
+ "ldr r0, [%0], #4 \n\t" \
+ "ldr r1, [%1] \n\t" \
+ "umaal r1, %2, %3, r0 \n\t" \
+ "str r1, [%1], #4 \n\t"
+
+#define MULADDC_STOP \
+ : "=r" (s), "=r" (d), "=r" (c) \
+ : "r" (b), "0" (s), "1" (d), "2" (c) \
+ : "r0", "r1", "memory" \
+ );
+
#else
#define MULADDC_INIT \
diff --git a/thirdparty/mbedtls/include/mbedtls/camellia.h b/thirdparty/mbedtls/include/mbedtls/camellia.h
index 7e4721af78..0f7c42c92d 100644
--- a/thirdparty/mbedtls/include/mbedtls/camellia.h
+++ b/thirdparty/mbedtls/include/mbedtls/camellia.h
@@ -33,11 +33,20 @@
#include <stddef.h>
#include <stdint.h>
+#include "platform_util.h"
+
#define MBEDTLS_CAMELLIA_ENCRYPT 1
#define MBEDTLS_CAMELLIA_DECRYPT 0
-#define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0024 /**< Invalid key length. */
-#define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026 /**< Invalid data input length. */
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+#define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0024 )
+#endif /* !MBEDTLS_DEPRECATED_REMOVED */
+#define MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA -0x0024 /**< Bad input data. */
+
+#define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026 /**< Invalid data input length. */
+
+/* MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED is deprecated and should not be used.
+ */
#define MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED -0x0027 /**< Camellia hardware accelerator failed. */
#ifdef __cplusplus
@@ -51,7 +60,7 @@ extern "C" {
/**
* \brief CAMELLIA context structure
*/
-typedef struct
+typedef struct mbedtls_camellia_context
{
int nr; /*!< number of rounds */
uint32_t rk[68]; /*!< CAMELLIA round keys */
@@ -63,52 +72,68 @@ mbedtls_camellia_context;
#endif /* MBEDTLS_CAMELLIA_ALT */
/**
- * \brief Initialize CAMELLIA context
+ * \brief Initialize a CAMELLIA context.
*
- * \param ctx CAMELLIA context to be initialized
+ * \param ctx The CAMELLIA context to be initialized.
+ * This must not be \c NULL.
*/
void mbedtls_camellia_init( mbedtls_camellia_context *ctx );
/**
- * \brief Clear CAMELLIA context
+ * \brief Clear a CAMELLIA context.
*
- * \param ctx CAMELLIA context to be cleared
+ * \param ctx The CAMELLIA context to be cleared. This may be \c NULL,
+ * in which case this function returns immediately. If it is not
+ * \c NULL, it must be initialized.
*/
void mbedtls_camellia_free( mbedtls_camellia_context *ctx );
/**
- * \brief CAMELLIA key schedule (encryption)
+ * \brief Perform a CAMELLIA key schedule operation for encryption.
*
- * \param ctx CAMELLIA context to be initialized
- * \param key encryption key
- * \param keybits must be 128, 192 or 256
+ * \param ctx The CAMELLIA context to use. This must be initialized.
+ * \param key The encryption key to use. This must be a readable buffer
+ * of size \p keybits Bits.
+ * \param keybits The length of \p key in Bits. This must be either \c 128,
+ * \c 192 or \c 256.
*
- * \return 0 if successful, or MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
-int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned char *key,
- unsigned int keybits );
+int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx,
+ const unsigned char *key,
+ unsigned int keybits );
/**
- * \brief CAMELLIA key schedule (decryption)
+ * \brief Perform a CAMELLIA key schedule operation for decryption.
*
- * \param ctx CAMELLIA context to be initialized
- * \param key decryption key
- * \param keybits must be 128, 192 or 256
+ * \param ctx The CAMELLIA context to use. This must be initialized.
+ * \param key The decryption key. This must be a readable buffer
+ * of size \p keybits Bits.
+ * \param keybits The length of \p key in Bits. This must be either \c 128,
+ * \c 192 or \c 256.
*
- * \return 0 if successful, or MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
-int mbedtls_camellia_setkey_dec( mbedtls_camellia_context *ctx, const unsigned char *key,
- unsigned int keybits );
+int mbedtls_camellia_setkey_dec( mbedtls_camellia_context *ctx,
+ const unsigned char *key,
+ unsigned int keybits );
/**
- * \brief CAMELLIA-ECB block encryption/decryption
- *
- * \param ctx CAMELLIA context
- * \param mode MBEDTLS_CAMELLIA_ENCRYPT or MBEDTLS_CAMELLIA_DECRYPT
- * \param input 16-byte input block
- * \param output 16-byte output block
- *
- * \return 0 if successful
+ * \brief Perform a CAMELLIA-ECB block encryption/decryption operation.
+ *
+ * \param ctx The CAMELLIA context to use. This must be initialized
+ * and bound to a key.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_CAMELLIA_ENCRYPT or #MBEDTLS_CAMELLIA_DECRYPT.
+ * \param input The input block. This must be a readable buffer
+ * of size \c 16 Bytes.
+ * \param output The output block. This must be a writable buffer
+ * of size \c 16 Bytes.
+ *
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx,
int mode,
@@ -117,9 +142,7 @@ int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
/**
- * \brief CAMELLIA-CBC buffer encryption/decryption
- * Length should be a multiple of the block
- * size (16 bytes)
+ * \brief Perform a CAMELLIA-CBC buffer encryption/decryption operation.
*
* \note Upon exit, the content of the IV is updated so that you can
* call the function same function again on the following
@@ -129,15 +152,22 @@ int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx,
* IV, you should either save it manually or use the cipher
* module instead.
*
- * \param ctx CAMELLIA context
- * \param mode MBEDTLS_CAMELLIA_ENCRYPT or MBEDTLS_CAMELLIA_DECRYPT
- * \param length length of the input data
- * \param iv initialization vector (updated after use)
- * \param input buffer holding the input data
- * \param output buffer holding the output data
- *
- * \return 0 if successful, or
- * MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH
+ * \param ctx The CAMELLIA context to use. This must be initialized
+ * and bound to a key.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_CAMELLIA_ENCRYPT or #MBEDTLS_CAMELLIA_DECRYPT.
+ * \param length The length in Bytes of the input data \p input.
+ * This must be a multiple of \c 16 Bytes.
+ * \param iv The initialization vector. This must be a read/write buffer
+ * of length \c 16 Bytes. It is updated to allow streaming
+ * use as explained above.
+ * \param input The buffer holding the input data. This must point to a
+ * readable buffer of length \p length Bytes.
+ * \param output The buffer holding the output data. This must point to a
+ * writable buffer of length \p length Bytes.
+ *
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx,
int mode,
@@ -149,11 +179,14 @@ int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx,
#if defined(MBEDTLS_CIPHER_MODE_CFB)
/**
- * \brief CAMELLIA-CFB128 buffer encryption/decryption
+ * \brief Perform a CAMELLIA-CFB128 buffer encryption/decryption
+ * operation.
*
- * Note: Due to the nature of CFB you should use the same key schedule for
- * both encryption and decryption. So a context initialized with
- * mbedtls_camellia_setkey_enc() for both MBEDTLS_CAMELLIA_ENCRYPT and CAMELLIE_DECRYPT.
+ * \note Due to the nature of CFB mode, you should use the same
+ * key for both encryption and decryption. In particular, calls
+ * to this function should be preceded by a key-schedule via
+ * mbedtls_camellia_setkey_enc() regardless of whether \p mode
+ * is #MBEDTLS_CAMELLIA_ENCRYPT or #MBEDTLS_CAMELLIA_DECRYPT.
*
* \note Upon exit, the content of the IV is updated so that you can
* call the function same function again on the following
@@ -163,16 +196,24 @@ int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx,
* IV, you should either save it manually or use the cipher
* module instead.
*
- * \param ctx CAMELLIA context
- * \param mode MBEDTLS_CAMELLIA_ENCRYPT or MBEDTLS_CAMELLIA_DECRYPT
- * \param length length of the input data
- * \param iv_off offset in IV (updated after use)
- * \param iv initialization vector (updated after use)
- * \param input buffer holding the input data
- * \param output buffer holding the output data
- *
- * \return 0 if successful, or
- * MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH
+ * \param ctx The CAMELLIA context to use. This must be initialized
+ * and bound to a key.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_CAMELLIA_ENCRYPT or #MBEDTLS_CAMELLIA_DECRYPT.
+ * \param length The length of the input data \p input. Any value is allowed.
+ * \param iv_off The current offset in the IV. This must be smaller
+ * than \c 16 Bytes. It is updated after this call to allow
+ * the aforementioned streaming usage.
+ * \param iv The initialization vector. This must be a read/write buffer
+ * of length \c 16 Bytes. It is updated after this call to
+ * allow the aforementioned streaming usage.
+ * \param input The buffer holding the input data. This must be a readable
+ * buffer of size \p length Bytes.
+ * \param output The buffer to hold the output data. This must be a writable
+ * buffer of length \p length Bytes.
+ *
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_camellia_crypt_cfb128( mbedtls_camellia_context *ctx,
int mode,
@@ -185,11 +226,13 @@ int mbedtls_camellia_crypt_cfb128( mbedtls_camellia_context *ctx,
#if defined(MBEDTLS_CIPHER_MODE_CTR)
/**
- * \brief CAMELLIA-CTR buffer encryption/decryption
+ * \brief Perform a CAMELLIA-CTR buffer encryption/decryption operation.
*
- * Note: Due to the nature of CTR you should use the same key schedule for
- * both encryption and decryption. So a context initialized with
- * mbedtls_camellia_setkey_enc() for both MBEDTLS_CAMELLIA_ENCRYPT and MBEDTLS_CAMELLIA_DECRYPT.
+ * *note Due to the nature of CTR mode, you should use the same
+ * key for both encryption and decryption. In particular, calls
+ * to this function should be preceded by a key-schedule via
+ * mbedtls_camellia_setkey_enc() regardless of whether \p mode
+ * is #MBEDTLS_CAMELLIA_ENCRYPT or #MBEDTLS_CAMELLIA_DECRYPT.
*
* \warning You must never reuse a nonce value with the same key. Doing so
* would void the encryption for the two messages encrypted with
@@ -212,41 +255,49 @@ int mbedtls_camellia_crypt_cfb128( mbedtls_camellia_context *ctx,
* per-message nonce, handled by yourself, and the second one
* updated by this function internally.
*
- * For example, you might reserve the first 12 bytes for the
- * per-message nonce, and the last 4 bytes for internal use. In that
- * case, before calling this function on a new message you need to
- * set the first 12 bytes of \p nonce_counter to your chosen nonce
- * value, the last 4 to 0, and \p nc_off to 0 (which will cause \p
- * stream_block to be ignored). That way, you can encrypt at most
- * 2**96 messages of up to 2**32 blocks each with the same key.
+ * For example, you might reserve the first \c 12 Bytes for the
+ * per-message nonce, and the last \c 4 Bytes for internal use.
+ * In that case, before calling this function on a new message you
+ * need to set the first \c 12 Bytes of \p nonce_counter to your
+ * chosen nonce value, the last four to \c 0, and \p nc_off to \c 0
+ * (which will cause \p stream_block to be ignored). That way, you
+ * can encrypt at most \c 2**96 messages of up to \c 2**32 blocks
+ * each with the same key.
*
* The per-message nonce (or information sufficient to reconstruct
- * it) needs to be communicated with the ciphertext and must be unique.
- * The recommended way to ensure uniqueness is to use a message
- * counter. An alternative is to generate random nonces, but this
- * limits the number of messages that can be securely encrypted:
- * for example, with 96-bit random nonces, you should not encrypt
- * more than 2**32 messages with the same key.
+ * it) needs to be communicated with the ciphertext and must be
+ * unique. The recommended way to ensure uniqueness is to use a
+ * message counter. An alternative is to generate random nonces,
+ * but this limits the number of messages that can be securely
+ * encrypted: for example, with 96-bit random nonces, you should
+ * not encrypt more than 2**32 messages with the same key.
*
* Note that for both stategies, sizes are measured in blocks and
- * that a CAMELLIA block is 16 bytes.
+ * that a CAMELLIA block is \c 16 Bytes.
*
* \warning Upon return, \p stream_block contains sensitive data. Its
* content must not be written to insecure storage and should be
* securely discarded as soon as it's no longer needed.
*
- * \param ctx CAMELLIA context
- * \param length The length of the data
- * \param nc_off The offset in the current stream_block (for resuming
+ * \param ctx The CAMELLIA context to use. This must be initialized
+ * and bound to a key.
+ * \param length The length of the input data \p input in Bytes.
+ * Any value is allowed.
+ * \param nc_off The offset in the current \p stream_block (for resuming
* within current cipher stream). The offset pointer to
- * should be 0 at the start of a stream.
- * \param nonce_counter The 128-bit nonce and counter.
- * \param stream_block The saved stream-block for resuming. Is overwritten
- * by the function.
- * \param input The input data stream
- * \param output The output data stream
- *
- * \return 0 if successful
+ * should be \c 0 at the start of a stream. It is updated
+ * at the end of this call.
+ * \param nonce_counter The 128-bit nonce and counter. This must be a read/write
+ * buffer of length \c 16 Bytes.
+ * \param stream_block The saved stream-block for resuming. This must be a
+ * read/write buffer of length \c 16 Bytes.
+ * \param input The input data stream. This must be a readable buffer of
+ * size \p length Bytes.
+ * \param output The output data stream. This must be a writable buffer
+ * of size \p length Bytes.
+ *
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_camellia_crypt_ctr( mbedtls_camellia_context *ctx,
size_t length,
diff --git a/thirdparty/mbedtls/include/mbedtls/ccm.h b/thirdparty/mbedtls/include/mbedtls/ccm.h
index 5d727e7cca..3f6b8f6709 100644
--- a/thirdparty/mbedtls/include/mbedtls/ccm.h
+++ b/thirdparty/mbedtls/include/mbedtls/ccm.h
@@ -53,8 +53,9 @@
#define MBEDTLS_ERR_CCM_BAD_INPUT -0x000D /**< Bad input parameters to the function. */
#define MBEDTLS_ERR_CCM_AUTH_FAILED -0x000F /**< Authenticated decryption failed. */
-#define MBEDTLS_ERR_CCM_HW_ACCEL_FAILED -0x0011 /**< CCM hardware accelerator failed. */
+/* MBEDTLS_ERR_CCM_HW_ACCEL_FAILED is deprecated and should not be used. */
+#define MBEDTLS_ERR_CCM_HW_ACCEL_FAILED -0x0011 /**< CCM hardware accelerator failed. */
#ifdef __cplusplus
extern "C" {
@@ -68,7 +69,8 @@ extern "C" {
* \brief The CCM context-type definition. The CCM context is passed
* to the APIs called.
*/
-typedef struct {
+typedef struct mbedtls_ccm_context
+{
mbedtls_cipher_context_t cipher_ctx; /*!< The cipher context used. */
}
mbedtls_ccm_context;
@@ -82,7 +84,7 @@ mbedtls_ccm_context;
* to make references valid, and prepare the context
* for mbedtls_ccm_setkey() or mbedtls_ccm_free().
*
- * \param ctx The CCM context to initialize.
+ * \param ctx The CCM context to initialize. This must not be \c NULL.
*/
void mbedtls_ccm_init( mbedtls_ccm_context *ctx );
@@ -90,9 +92,10 @@ void mbedtls_ccm_init( mbedtls_ccm_context *ctx );
* \brief This function initializes the CCM context set in the
* \p ctx parameter and sets the encryption key.
*
- * \param ctx The CCM context to initialize.
+ * \param ctx The CCM context to initialize. This must be an initialized
+ * context.
* \param cipher The 128-bit block cipher to use.
- * \param key The encryption key.
+ * \param key The encryption key. This must not be \c NULL.
* \param keybits The key size in bits. This must be acceptable by the cipher.
*
* \return \c 0 on success.
@@ -107,7 +110,8 @@ int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx,
* \brief This function releases and clears the specified CCM context
* and underlying cipher sub-context.
*
- * \param ctx The CCM context to clear.
+ * \param ctx The CCM context to clear. If this is \c NULL, the function
+ * has no effect. Otherwise, this must be initialized.
*/
void mbedtls_ccm_free( mbedtls_ccm_context *ctx );
@@ -120,19 +124,27 @@ void mbedtls_ccm_free( mbedtls_ccm_context *ctx );
* \p tag = \p output + \p length, and make sure that the
* output buffer is at least \p length + \p tag_len wide.
*
- * \param ctx The CCM context to use for encryption.
+ * \param ctx The CCM context to use for encryption. This must be
+ * initialized and bound to a key.
* \param length The length of the input data in Bytes.
- * \param iv Initialization vector (nonce).
+ * \param iv The initialization vector (nonce). This must be a readable
+ * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is
* 15 - \p iv_len.
- * \param add The additional data field.
+ * \param add The additional data field. If \p add_len is greater than
+ * zero, \p add must be a readable buffer of at least that
+ * length.
* \param add_len The length of additional data in Bytes.
- * Must be less than 2^16 - 2^8.
- * \param input The buffer holding the input data.
- * \param output The buffer holding the output data.
- * Must be at least \p length Bytes wide.
- * \param tag The buffer holding the authentication field.
+ * This must be less than `2^16 - 2^8`.
+ * \param input The buffer holding the input data. If \p length is greater
+ * than zero, \p input must be a readable buffer of at least
+ * that length.
+ * \param output The buffer holding the output data. If \p length is greater
+ * than zero, \p output must be a writable buffer of at least
+ * that length.
+ * \param tag The buffer holding the authentication field. This must be a
+ * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication field to generate in Bytes:
* 4, 6, 8, 10, 12, 14 or 16.
*
@@ -158,23 +170,30 @@ int mbedtls_ccm_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
* the tag length has to be encoded into the \p iv passed to
* this function.
*
- * \param ctx The CCM context to use for encryption.
+ * \param ctx The CCM context to use for encryption. This must be
+ * initialized and bound to a key.
* \param length The length of the input data in Bytes.
- * \param iv Initialization vector (nonce).
+ * \param iv The initialization vector (nonce). This must be a readable
+ * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is
* 15 - \p iv_len.
- * \param add The additional data field.
+ * \param add The additional data field. This must be a readable buffer of
+ * at least \p add_len Bytes.
* \param add_len The length of additional data in Bytes.
- * Must be less than 2^16 - 2^8.
- * \param input The buffer holding the input data.
- * \param output The buffer holding the output data.
- * Must be at least \p length Bytes wide.
- * \param tag The buffer holding the authentication field.
+ * This must be less than 2^16 - 2^8.
+ * \param input The buffer holding the input data. If \p length is greater
+ * than zero, \p input must be a readable buffer of at least
+ * that length.
+ * \param output The buffer holding the output data. If \p length is greater
+ * than zero, \p output must be a writable buffer of at least
+ * that length.
+ * \param tag The buffer holding the authentication field. This must be a
+ * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication field to generate in Bytes:
* 0, 4, 6, 8, 10, 12, 14 or 16.
*
- * \warning Passing 0 as \p tag_len means that the message is no
+ * \warning Passing \c 0 as \p tag_len means that the message is no
* longer authenticated.
*
* \return \c 0 on success.
@@ -190,20 +209,27 @@ int mbedtls_ccm_star_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
* \brief This function performs a CCM authenticated decryption of a
* buffer.
*
- * \param ctx The CCM context to use for decryption.
+ * \param ctx The CCM context to use for decryption. This must be
+ * initialized and bound to a key.
* \param length The length of the input data in Bytes.
- * \param iv Initialization vector (nonce).
+ * \param iv The initialization vector (nonce). This must be a readable
+ * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is
* 15 - \p iv_len.
- * \param add The additional data field.
+ * \param add The additional data field. This must be a readable buffer
+ * of at least that \p add_len Bytes..
* \param add_len The length of additional data in Bytes.
- * Must be less than 2^16 - 2^8.
- * \param input The buffer holding the input data.
- * \param output The buffer holding the output data.
- * Must be at least \p length Bytes wide.
- * \param tag The buffer holding the authentication field.
- * \param tag_len The length of the authentication field in Bytes.
+ * This must be less than 2^16 - 2^8.
+ * \param input The buffer holding the input data. If \p length is greater
+ * than zero, \p input must be a readable buffer of at least
+ * that length.
+ * \param output The buffer holding the output data. If \p length is greater
+ * than zero, \p output must be a writable buffer of at least
+ * that length.
+ * \param tag The buffer holding the authentication field. This must be a
+ * readable buffer of at least \p tag_len Bytes.
+ * \param tag_len The length of the authentication field to generate in Bytes:
* 4, 6, 8, 10, 12, 14 or 16.
*
* \return \c 0 on success. This indicates that the message is authentic.
@@ -225,23 +251,30 @@ int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length,
* this function as \p tag_len. (\p tag needs to be adjusted
* accordingly.)
*
- * \param ctx The CCM context to use for decryption.
+ * \param ctx The CCM context to use for decryption. This must be
+ * initialized and bound to a key.
* \param length The length of the input data in Bytes.
- * \param iv Initialization vector (nonce).
+ * \param iv The initialization vector (nonce). This must be a readable
+ * buffer of at least \p iv_len Bytes.
* \param iv_len The length of the nonce in Bytes: 7, 8, 9, 10, 11, 12,
* or 13. The length L of the message length field is
* 15 - \p iv_len.
- * \param add The additional data field.
+ * \param add The additional data field. This must be a readable buffer of
+ * at least that \p add_len Bytes.
* \param add_len The length of additional data in Bytes.
- * Must be less than 2^16 - 2^8.
- * \param input The buffer holding the input data.
- * \param output The buffer holding the output data.
- * Must be at least \p length Bytes wide.
- * \param tag The buffer holding the authentication field.
+ * This must be less than 2^16 - 2^8.
+ * \param input The buffer holding the input data. If \p length is greater
+ * than zero, \p input must be a readable buffer of at least
+ * that length.
+ * \param output The buffer holding the output data. If \p length is greater
+ * than zero, \p output must be a writable buffer of at least
+ * that length.
+ * \param tag The buffer holding the authentication field. This must be a
+ * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication field in Bytes.
* 0, 4, 6, 8, 10, 12, 14 or 16.
*
- * \warning Passing 0 as \p tag_len means that the message is no
+ * \warning Passing \c 0 as \p tag_len means that the message is nos
* longer authenticated.
*
* \return \c 0 on success.
diff --git a/thirdparty/mbedtls/include/mbedtls/chacha20.h b/thirdparty/mbedtls/include/mbedtls/chacha20.h
index 47bd7d38b9..2ae5e6e5f4 100644
--- a/thirdparty/mbedtls/include/mbedtls/chacha20.h
+++ b/thirdparty/mbedtls/include/mbedtls/chacha20.h
@@ -43,7 +43,13 @@
#include <stddef.h>
#define MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA -0x0051 /**< Invalid input parameter(s). */
+
+/* MBEDTLS_ERR_CHACHA20_FEATURE_UNAVAILABLE is deprecated and should not be
+ * used. */
#define MBEDTLS_ERR_CHACHA20_FEATURE_UNAVAILABLE -0x0053 /**< Feature not available. For example, s part of the API is not implemented. */
+
+/* MBEDTLS_ERR_CHACHA20_HW_ACCEL_FAILED is deprecated and should not be used.
+ */
#define MBEDTLS_ERR_CHACHA20_HW_ACCEL_FAILED -0x0055 /**< Chacha20 hardware accelerator failed. */
#ifdef __cplusplus
@@ -52,7 +58,7 @@ extern "C" {
#if !defined(MBEDTLS_CHACHA20_ALT)
-typedef struct
+typedef struct mbedtls_chacha20_context
{
uint32_t state[16]; /*! The state (before round operations). */
uint8_t keystream8[64]; /*! Leftover keystream bytes. */
@@ -77,13 +83,18 @@ mbedtls_chacha20_context;
* \c mbedtls_chacha20_free().
*
* \param ctx The ChaCha20 context to initialize.
+ * This must not be \c NULL.
*/
void mbedtls_chacha20_init( mbedtls_chacha20_context *ctx );
/**
- * \brief This function releases and clears the specified ChaCha20 context.
+ * \brief This function releases and clears the specified
+ * ChaCha20 context.
+ *
+ * \param ctx The ChaCha20 context to clear. This may be \c NULL,
+ * in which case this function is a no-op. If it is not
+ * \c NULL, it must point to an initialized context.
*
- * \param ctx The ChaCha20 context to clear.
*/
void mbedtls_chacha20_free( mbedtls_chacha20_context *ctx );
@@ -96,7 +107,9 @@ void mbedtls_chacha20_free( mbedtls_chacha20_context *ctx );
* \c mbedtls_chacha_update().
*
* \param ctx The ChaCha20 context to which the key should be bound.
- * \param key The encryption/decryption key. Must be 32 bytes in length.
+ * It must be initialized.
+ * \param key The encryption/decryption key. This must be \c 32 Bytes
+ * in length.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA if ctx or key is NULL.
@@ -115,8 +128,9 @@ int mbedtls_chacha20_setkey( mbedtls_chacha20_context *ctx,
* messages encrypted with the same nonce and key.
*
* \param ctx The ChaCha20 context to which the nonce should be bound.
- * \param nonce The nonce. Must be 12 bytes in size.
- * \param counter The initial counter value. This is usually 0.
+ * It must be initialized and bound to a key.
+ * \param nonce The nonce. This must be \c 12 Bytes in size.
+ * \param counter The initial counter value. This is usually \c 0.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA if ctx or nonce is
@@ -144,16 +158,16 @@ int mbedtls_chacha20_starts( mbedtls_chacha20_context* ctx,
* key and nonce.
*
* \param ctx The ChaCha20 context to use for encryption or decryption.
- * \param size The length of the input data in bytes.
+ * It must be initialized and bound to a key and nonce.
+ * \param size The length of the input data in Bytes.
* \param input The buffer holding the input data.
- * This pointer can be NULL if size == 0.
+ * This pointer can be \c NULL if `size == 0`.
* \param output The buffer holding the output data.
- * Must be able to hold \p size bytes.
- * This pointer can be NULL if size == 0.
+ * This must be able to hold \p size Bytes.
+ * This pointer can be \c NULL if `size == 0`.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA if the ctx, input, or
- * output pointers are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_chacha20_update( mbedtls_chacha20_context *ctx,
size_t size,
@@ -174,19 +188,19 @@ int mbedtls_chacha20_update( mbedtls_chacha20_context *ctx,
* \note The \p input and \p output pointers must either be equal or
* point to non-overlapping buffers.
*
- * \param key The encryption/decryption key. Must be 32 bytes in length.
- * \param nonce The nonce. Must be 12 bytes in size.
- * \param counter The initial counter value. This is usually 0.
- * \param size The length of the input data in bytes.
+ * \param key The encryption/decryption key.
+ * This must be \c 32 Bytes in length.
+ * \param nonce The nonce. This must be \c 12 Bytes in size.
+ * \param counter The initial counter value. This is usually \c 0.
+ * \param size The length of the input data in Bytes.
* \param input The buffer holding the input data.
- * This pointer can be NULL if size == 0.
+ * This pointer can be \c NULL if `size == 0`.
* \param output The buffer holding the output data.
- * Must be able to hold \p size bytes.
- * This pointer can be NULL if size == 0.
+ * This must be able to hold \p size Bytes.
+ * This pointer can be \c NULL if `size == 0`.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA if key, nonce, input,
- * or output is NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_chacha20_crypt( const unsigned char key[32],
const unsigned char nonce[12],
diff --git a/thirdparty/mbedtls/include/mbedtls/chachapoly.h b/thirdparty/mbedtls/include/mbedtls/chachapoly.h
index 42b2b230c5..49e615d278 100644
--- a/thirdparty/mbedtls/include/mbedtls/chachapoly.h
+++ b/thirdparty/mbedtls/include/mbedtls/chachapoly.h
@@ -60,7 +60,7 @@ mbedtls_chachapoly_mode_t;
#include "chacha20.h"
-typedef struct
+typedef struct mbedtls_chachapoly_context
{
mbedtls_chacha20_context chacha20_ctx; /**< The ChaCha20 context. */
mbedtls_poly1305_context poly1305_ctx; /**< The Poly1305 context. */
@@ -115,27 +115,29 @@ mbedtls_chachapoly_context;
* all previous outputs of \c mbedtls_chachapoly_update(),
* otherwise you can now safely use the plaintext.
*
- * \param ctx The ChachaPoly context to initialize.
+ * \param ctx The ChachaPoly context to initialize. Must not be \c NULL.
*/
void mbedtls_chachapoly_init( mbedtls_chachapoly_context *ctx );
/**
- * \brief This function releases and clears the specified ChaCha20-Poly1305 context.
+ * \brief This function releases and clears the specified
+ * ChaCha20-Poly1305 context.
*
- * \param ctx The ChachaPoly context to clear.
+ * \param ctx The ChachaPoly context to clear. This may be \c NULL, in which
+ * case this function is a no-op.
*/
void mbedtls_chachapoly_free( mbedtls_chachapoly_context *ctx );
/**
- * \brief This function sets the ChaCha20-Poly1305 symmetric encryption key.
+ * \brief This function sets the ChaCha20-Poly1305
+ * symmetric encryption key.
*
* \param ctx The ChaCha20-Poly1305 context to which the key should be
- * bound.
- * \param key The 256-bit (32 bytes) key.
+ * bound. This must be initialized.
+ * \param key The \c 256 Bit (\c 32 Bytes) key.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if \p ctx or \p key are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_chachapoly_setkey( mbedtls_chachapoly_context *ctx,
const unsigned char key[32] );
@@ -155,14 +157,15 @@ int mbedtls_chachapoly_setkey( mbedtls_chachapoly_context *ctx,
* \warning Decryption with the piecewise API is discouraged, see the
* warning on \c mbedtls_chachapoly_init().
*
- * \param ctx The ChaCha20-Poly1305 context.
- * \param nonce The nonce/IV to use for the message. Must be 12 bytes.
+ * \param ctx The ChaCha20-Poly1305 context. This must be initialized
+ * and bound to a key.
+ * \param nonce The nonce/IV to use for the message.
+ * This must be a redable buffer of length \c 12 Bytes.
* \param mode The operation to perform: #MBEDTLS_CHACHAPOLY_ENCRYPT or
* #MBEDTLS_CHACHAPOLY_DECRYPT (discouraged, see warning).
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if \p ctx or \p mac are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_chachapoly_starts( mbedtls_chachapoly_context *ctx,
const unsigned char nonce[12],
@@ -193,11 +196,12 @@ int mbedtls_chachapoly_starts( mbedtls_chachapoly_context *ctx,
* \warning Decryption with the piecewise API is discouraged, see the
* warning on \c mbedtls_chachapoly_init().
*
- * \param ctx The ChaCha20-Poly1305 context to use.
- * \param aad_len The length (in bytes) of the AAD. The length has no
+ * \param ctx The ChaCha20-Poly1305 context. This must be initialized
+ * and bound to a key.
+ * \param aad_len The length in Bytes of the AAD. The length has no
* restrictions.
* \param aad Buffer containing the AAD.
- * This pointer can be NULL if aad_len == 0.
+ * This pointer can be \c NULL if `aad_len == 0`.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
@@ -227,20 +231,19 @@ int mbedtls_chachapoly_update_aad( mbedtls_chachapoly_context *ctx,
* \warning Decryption with the piecewise API is discouraged, see the
* warning on \c mbedtls_chachapoly_init().
*
- * \param ctx The ChaCha20-Poly1305 context to use.
+ * \param ctx The ChaCha20-Poly1305 context to use. This must be initialized.
* \param len The length (in bytes) of the data to encrypt or decrypt.
* \param input The buffer containing the data to encrypt or decrypt.
- * This pointer can be NULL if len == 0.
- * \param output The buffer to where the encrypted or decrypted data is written.
- * Must be able to hold \p len bytes.
- * This pointer can be NULL if len == 0.
+ * This pointer can be \c NULL if `len == 0`.
+ * \param output The buffer to where the encrypted or decrypted data is
+ * written. This must be able to hold \p len bytes.
+ * This pointer can be \c NULL if `len == 0`.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if \p ctx, \p input, or \p output are NULL.
* \return #MBEDTLS_ERR_CHACHAPOLY_BAD_STATE
* if the operation has not been started or has been
* finished.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_chachapoly_update( mbedtls_chachapoly_context *ctx,
size_t len,
@@ -251,18 +254,17 @@ int mbedtls_chachapoly_update( mbedtls_chachapoly_context *ctx,
* \brief This function finished the ChaCha20-Poly1305 operation and
* generates the MAC (authentication tag).
*
- * \param ctx The ChaCha20-Poly1305 context to use.
+ * \param ctx The ChaCha20-Poly1305 context to use. This must be initialized.
* \param mac The buffer to where the 128-bit (16 bytes) MAC is written.
*
* \warning Decryption with the piecewise API is discouraged, see the
* warning on \c mbedtls_chachapoly_init().
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if \p ctx or \p mac are NULL.
* \return #MBEDTLS_ERR_CHACHAPOLY_BAD_STATE
* if the operation has not been started or has been
* finished.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_chachapoly_finish( mbedtls_chachapoly_context *ctx,
unsigned char mac[16] );
@@ -280,20 +282,21 @@ int mbedtls_chachapoly_finish( mbedtls_chachapoly_context *ctx,
* and key.
*
* \param ctx The ChaCha20-Poly1305 context to use (holds the key).
+ * This must be initialized.
* \param length The length (in bytes) of the data to encrypt or decrypt.
* \param nonce The 96-bit (12 bytes) nonce/IV to use.
- * \param aad The buffer containing the additional authenticated data (AAD).
- * This pointer can be NULL if aad_len == 0.
+ * \param aad The buffer containing the additional authenticated
+ * data (AAD). This pointer can be \c NULL if `aad_len == 0`.
* \param aad_len The length (in bytes) of the AAD data to process.
* \param input The buffer containing the data to encrypt or decrypt.
- * This pointer can be NULL if ilen == 0.
- * \param output The buffer to where the encrypted or decrypted data is written.
- * This pointer can be NULL if ilen == 0.
- * \param tag The buffer to where the computed 128-bit (16 bytes) MAC is written.
+ * This pointer can be \c NULL if `ilen == 0`.
+ * \param output The buffer to where the encrypted or decrypted data
+ * is written. This pointer can be \c NULL if `ilen == 0`.
+ * \param tag The buffer to where the computed 128-bit (16 bytes) MAC
+ * is written. This must not be \c NULL.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if one or more of the required parameters are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_chachapoly_encrypt_and_tag( mbedtls_chachapoly_context *ctx,
size_t length,
@@ -312,22 +315,22 @@ int mbedtls_chachapoly_encrypt_and_tag( mbedtls_chachapoly_context *ctx,
* \c mbedtls_chachapoly_setkey().
*
* \param ctx The ChaCha20-Poly1305 context to use (holds the key).
- * \param length The length (in bytes) of the data to decrypt.
- * \param nonce The 96-bit (12 bytes) nonce/IV to use.
+ * \param length The length (in Bytes) of the data to decrypt.
+ * \param nonce The \c 96 Bit (\c 12 bytes) nonce/IV to use.
* \param aad The buffer containing the additional authenticated data (AAD).
- * This pointer can be NULL if aad_len == 0.
+ * This pointer can be \c NULL if `aad_len == 0`.
* \param aad_len The length (in bytes) of the AAD data to process.
* \param tag The buffer holding the authentication tag.
+ * This must be a readable buffer of length \c 16 Bytes.
* \param input The buffer containing the data to decrypt.
- * This pointer can be NULL if ilen == 0.
+ * This pointer can be \c NULL if `ilen == 0`.
* \param output The buffer to where the decrypted data is written.
- * This pointer can be NULL if ilen == 0.
+ * This pointer can be \c NULL if `ilen == 0`.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if one or more of the required parameters are NULL.
* \return #MBEDTLS_ERR_CHACHAPOLY_AUTH_FAILED
* if the data was not authentic.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_chachapoly_auth_decrypt( mbedtls_chachapoly_context *ctx,
size_t length,
diff --git a/thirdparty/mbedtls/include/mbedtls/check_config.h b/thirdparty/mbedtls/include/mbedtls/check_config.h
index 9e6bb8a46a..b86e5807e0 100644
--- a/thirdparty/mbedtls/include/mbedtls/check_config.h
+++ b/thirdparty/mbedtls/include/mbedtls/check_config.h
@@ -108,6 +108,17 @@
#error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites"
#endif
+#if defined(MBEDTLS_ECP_RESTARTABLE) && \
+ ( defined(MBEDTLS_ECDH_COMPUTE_SHARED_ALT) || \
+ defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT) || \
+ defined(MBEDTLS_ECDSA_SIGN_ALT) || \
+ defined(MBEDTLS_ECDSA_VERIFY_ALT) || \
+ defined(MBEDTLS_ECDSA_GENKEY_ALT) || \
+ defined(MBEDTLS_ECP_INTERNAL_ALT) || \
+ defined(MBEDTLS_ECP_ALT) )
+#error "MBEDTLS_ECP_RESTARTABLE defined, but it cannot coexist with an alternative ECP implementation"
+#endif
+
#if defined(MBEDTLS_ECDSA_DETERMINISTIC) && !defined(MBEDTLS_HMAC_DRBG_C)
#error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites"
#endif
@@ -127,6 +138,10 @@
#error "MBEDTLS_ECP_C defined, but not all prerequisites"
#endif
+#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C)
+#error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites"
+#endif
+
#if defined(MBEDTLS_ENTROPY_C) && (!defined(MBEDTLS_SHA512_C) && \
!defined(MBEDTLS_SHA256_C))
#error "MBEDTLS_ENTROPY_C defined, but not all prerequisites"
diff --git a/thirdparty/mbedtls/include/mbedtls/cipher.h b/thirdparty/mbedtls/include/mbedtls/cipher.h
index ea0ce983f1..922b6c32c6 100644
--- a/thirdparty/mbedtls/include/mbedtls/cipher.h
+++ b/thirdparty/mbedtls/include/mbedtls/cipher.h
@@ -36,6 +36,7 @@
#endif
#include <stddef.h>
+#include "mbedtls/platform_util.h"
#if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C)
#define MBEDTLS_CIPHER_MODE_AEAD
@@ -45,7 +46,8 @@
#define MBEDTLS_CIPHER_MODE_WITH_PADDING
#endif
-#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER)
+#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) || \
+ defined(MBEDTLS_CHACHA20_C)
#define MBEDTLS_CIPHER_MODE_STREAM
#endif
@@ -61,6 +63,8 @@
#define MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED -0x6280 /**< Decryption of block requires a full block. */
#define MBEDTLS_ERR_CIPHER_AUTH_FAILED -0x6300 /**< Authentication failed (for AEAD modes). */
#define MBEDTLS_ERR_CIPHER_INVALID_CONTEXT -0x6380 /**< The context is invalid. For example, because it was freed. */
+
+/* MBEDTLS_ERR_CIPHER_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_CIPHER_HW_ACCEL_FAILED -0x6400 /**< Cipher hardware accelerator failed. */
#define MBEDTLS_CIPHER_VARIABLE_IV_LEN 0x01 /**< Cipher accepts IVs of variable length. */
@@ -235,7 +239,8 @@ typedef struct mbedtls_cmac_context_t mbedtls_cmac_context_t;
* Cipher information. Allows calling cipher functions
* in a generic way.
*/
-typedef struct {
+typedef struct mbedtls_cipher_info_t
+{
/** Full cipher identifier. For example,
* MBEDTLS_CIPHER_AES_256_CBC.
*/
@@ -276,7 +281,8 @@ typedef struct {
/**
* Generic cipher context.
*/
-typedef struct {
+typedef struct mbedtls_cipher_context_t
+{
/** Information about the associated cipher. */
const mbedtls_cipher_info_t *cipher_info;
@@ -331,11 +337,12 @@ const int *mbedtls_cipher_list( void );
* \brief This function retrieves the cipher-information
* structure associated with the given cipher name.
*
- * \param cipher_name Name of the cipher to search for.
+ * \param cipher_name Name of the cipher to search for. This must not be
+ * \c NULL.
*
* \return The cipher information structure associated with the
* given \p cipher_name.
- * \return NULL if the associated cipher information is not found.
+ * \return \c NULL if the associated cipher information is not found.
*/
const mbedtls_cipher_info_t *mbedtls_cipher_info_from_string( const char *cipher_name );
@@ -347,7 +354,7 @@ const mbedtls_cipher_info_t *mbedtls_cipher_info_from_string( const char *cipher
*
* \return The cipher information structure associated with the
* given \p cipher_type.
- * \return NULL if the associated cipher information is not found.
+ * \return \c NULL if the associated cipher information is not found.
*/
const mbedtls_cipher_info_t *mbedtls_cipher_info_from_type( const mbedtls_cipher_type_t cipher_type );
@@ -363,7 +370,7 @@ const mbedtls_cipher_info_t *mbedtls_cipher_info_from_type( const mbedtls_cipher
*
* \return The cipher information structure associated with the
* given \p cipher_id.
- * \return NULL if the associated cipher information is not found.
+ * \return \c NULL if the associated cipher information is not found.
*/
const mbedtls_cipher_info_t *mbedtls_cipher_info_from_values( const mbedtls_cipher_id_t cipher_id,
int key_bitlen,
@@ -371,6 +378,8 @@ const mbedtls_cipher_info_t *mbedtls_cipher_info_from_values( const mbedtls_ciph
/**
* \brief This function initializes a \p cipher_context as NONE.
+ *
+ * \param ctx The context to be initialized. This must not be \c NULL.
*/
void mbedtls_cipher_init( mbedtls_cipher_context_t *ctx );
@@ -378,6 +387,10 @@ void mbedtls_cipher_init( mbedtls_cipher_context_t *ctx );
* \brief This function frees and clears the cipher-specific
* context of \p ctx. Freeing \p ctx itself remains the
* responsibility of the caller.
+ *
+ * \param ctx The context to be freed. If this is \c NULL, the
+ * function has no effect, otherwise this must point to an
+ * initialized context.
*/
void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx );
@@ -387,7 +400,7 @@ void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx );
* structure with the appropriate values. It also clears
* the structure.
*
- * \param ctx The context to initialize. May not be NULL.
+ * \param ctx The context to initialize. This must be initialized.
* \param cipher_info The cipher to use.
*
* \return \c 0 on success.
@@ -400,19 +413,22 @@ void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx );
* In future versions, the caller will be required to call
* mbedtls_cipher_init() on the structure first.
*/
-int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx, const mbedtls_cipher_info_t *cipher_info );
+int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx,
+ const mbedtls_cipher_info_t *cipher_info );
/**
* \brief This function returns the block size of the given cipher.
*
- * \param ctx The context of the cipher. Must be initialized.
+ * \param ctx The context of the cipher. This must be initialized.
*
- * \return The size of the blocks of the cipher.
- * \return 0 if \p ctx has not been initialized.
+ * \return The block size of the underlying cipher.
+ * \return \c 0 if \p ctx has not been initialized.
*/
-static inline unsigned int mbedtls_cipher_get_block_size( const mbedtls_cipher_context_t *ctx )
+static inline unsigned int mbedtls_cipher_get_block_size(
+ const mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ MBEDTLS_INTERNAL_VALIDATE_RET( ctx != NULL, 0 );
+ if( ctx->cipher_info == NULL )
return 0;
return ctx->cipher_info->block_size;
@@ -422,14 +438,16 @@ static inline unsigned int mbedtls_cipher_get_block_size( const mbedtls_cipher_c
* \brief This function returns the mode of operation for
* the cipher. For example, MBEDTLS_MODE_CBC.
*
- * \param ctx The context of the cipher. Must be initialized.
+ * \param ctx The context of the cipher. This must be initialized.
*
* \return The mode of operation.
* \return #MBEDTLS_MODE_NONE if \p ctx has not been initialized.
*/
-static inline mbedtls_cipher_mode_t mbedtls_cipher_get_cipher_mode( const mbedtls_cipher_context_t *ctx )
+static inline mbedtls_cipher_mode_t mbedtls_cipher_get_cipher_mode(
+ const mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ MBEDTLS_INTERNAL_VALIDATE_RET( ctx != NULL, MBEDTLS_MODE_NONE );
+ if( ctx->cipher_info == NULL )
return MBEDTLS_MODE_NONE;
return ctx->cipher_info->mode;
@@ -439,15 +457,17 @@ static inline mbedtls_cipher_mode_t mbedtls_cipher_get_cipher_mode( const mbedtl
* \brief This function returns the size of the IV or nonce
* of the cipher, in Bytes.
*
- * \param ctx The context of the cipher. Must be initialized.
+ * \param ctx The context of the cipher. This must be initialized.
*
* \return The recommended IV size if no IV has been set.
* \return \c 0 for ciphers not using an IV or a nonce.
* \return The actual size if an IV has been set.
*/
-static inline int mbedtls_cipher_get_iv_size( const mbedtls_cipher_context_t *ctx )
+static inline int mbedtls_cipher_get_iv_size(
+ const mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ MBEDTLS_INTERNAL_VALIDATE_RET( ctx != NULL, 0 );
+ if( ctx->cipher_info == NULL )
return 0;
if( ctx->iv_size != 0 )
@@ -459,14 +479,17 @@ static inline int mbedtls_cipher_get_iv_size( const mbedtls_cipher_context_t *ct
/**
* \brief This function returns the type of the given cipher.
*
- * \param ctx The context of the cipher. Must be initialized.
+ * \param ctx The context of the cipher. This must be initialized.
*
* \return The type of the cipher.
* \return #MBEDTLS_CIPHER_NONE if \p ctx has not been initialized.
*/
-static inline mbedtls_cipher_type_t mbedtls_cipher_get_type( const mbedtls_cipher_context_t *ctx )
+static inline mbedtls_cipher_type_t mbedtls_cipher_get_type(
+ const mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ MBEDTLS_INTERNAL_VALIDATE_RET(
+ ctx != NULL, MBEDTLS_CIPHER_NONE );
+ if( ctx->cipher_info == NULL )
return MBEDTLS_CIPHER_NONE;
return ctx->cipher_info->type;
@@ -476,14 +499,16 @@ static inline mbedtls_cipher_type_t mbedtls_cipher_get_type( const mbedtls_ciphe
* \brief This function returns the name of the given cipher
* as a string.
*
- * \param ctx The context of the cipher. Must be initialized.
+ * \param ctx The context of the cipher. This must be initialized.
*
* \return The name of the cipher.
* \return NULL if \p ctx has not been not initialized.
*/
-static inline const char *mbedtls_cipher_get_name( const mbedtls_cipher_context_t *ctx )
+static inline const char *mbedtls_cipher_get_name(
+ const mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ MBEDTLS_INTERNAL_VALIDATE_RET( ctx != NULL, 0 );
+ if( ctx->cipher_info == NULL )
return 0;
return ctx->cipher_info->name;
@@ -492,15 +517,18 @@ static inline const char *mbedtls_cipher_get_name( const mbedtls_cipher_context_
/**
* \brief This function returns the key length of the cipher.
*
- * \param ctx The context of the cipher. Must be initialized.
+ * \param ctx The context of the cipher. This must be initialized.
*
* \return The key length of the cipher in bits.
* \return #MBEDTLS_KEY_LENGTH_NONE if ctx \p has not been
* initialized.
*/
-static inline int mbedtls_cipher_get_key_bitlen( const mbedtls_cipher_context_t *ctx )
+static inline int mbedtls_cipher_get_key_bitlen(
+ const mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ MBEDTLS_INTERNAL_VALIDATE_RET(
+ ctx != NULL, MBEDTLS_KEY_LENGTH_NONE );
+ if( ctx->cipher_info == NULL )
return MBEDTLS_KEY_LENGTH_NONE;
return (int) ctx->cipher_info->key_bitlen;
@@ -509,14 +537,17 @@ static inline int mbedtls_cipher_get_key_bitlen( const mbedtls_cipher_context_t
/**
* \brief This function returns the operation of the given cipher.
*
- * \param ctx The context of the cipher. Must be initialized.
+ * \param ctx The context of the cipher. This must be initialized.
*
* \return The type of operation: #MBEDTLS_ENCRYPT or #MBEDTLS_DECRYPT.
* \return #MBEDTLS_OPERATION_NONE if \p ctx has not been initialized.
*/
-static inline mbedtls_operation_t mbedtls_cipher_get_operation( const mbedtls_cipher_context_t *ctx )
+static inline mbedtls_operation_t mbedtls_cipher_get_operation(
+ const mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ MBEDTLS_INTERNAL_VALIDATE_RET(
+ ctx != NULL, MBEDTLS_OPERATION_NONE );
+ if( ctx->cipher_info == NULL )
return MBEDTLS_OPERATION_NONE;
return ctx->operation;
@@ -525,11 +556,11 @@ static inline mbedtls_operation_t mbedtls_cipher_get_operation( const mbedtls_ci
/**
* \brief This function sets the key to use with the given context.
*
- * \param ctx The generic cipher context. May not be NULL. Must have
- * been initialized using mbedtls_cipher_info_from_type()
- * or mbedtls_cipher_info_from_string().
- * \param key The key to use.
- * \param key_bitlen The key length to use, in bits.
+ * \param ctx The generic cipher context. This must be initialized and
+ * bound to a cipher information structure.
+ * \param key The key to use. This must be a readable buffer of at
+ * least \p key_bitlen Bits.
+ * \param key_bitlen The key length to use, in Bits.
* \param operation The operation that the key will be used for:
* #MBEDTLS_ENCRYPT or #MBEDTLS_DECRYPT.
*
@@ -538,8 +569,10 @@ static inline mbedtls_operation_t mbedtls_cipher_get_operation( const mbedtls_ci
* parameter-verification failure.
* \return A cipher-specific error code on failure.
*/
-int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx, const unsigned char *key,
- int key_bitlen, const mbedtls_operation_t operation );
+int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx,
+ const unsigned char *key,
+ int key_bitlen,
+ const mbedtls_operation_t operation );
#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING)
/**
@@ -548,7 +581,8 @@ int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx, const unsigned char *k
*
* The default passing mode is PKCS7 padding.
*
- * \param ctx The generic cipher context.
+ * \param ctx The generic cipher context. This must be initialized and
+ * bound to a cipher information structure.
* \param mode The padding mode.
*
* \return \c 0 on success.
@@ -557,7 +591,8 @@ int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx, const unsigned char *k
* \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if the cipher mode
* does not support padding.
*/
-int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx, mbedtls_cipher_padding_t mode );
+int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx,
+ mbedtls_cipher_padding_t mode );
#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */
/**
@@ -567,8 +602,10 @@ int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx, mbedtls_ciph
* \note Some ciphers do not use IVs nor nonce. For these
* ciphers, this function has no effect.
*
- * \param ctx The generic cipher context.
- * \param iv The IV to use, or NONCE_COUNTER for CTR-mode ciphers.
+ * \param ctx The generic cipher context. This must be initialized and
+ * bound to a cipher information structure.
+ * \param iv The IV to use, or NONCE_COUNTER for CTR-mode ciphers. This
+ * must be a readable buffer of at least \p iv_len Bytes.
* \param iv_len The IV length for ciphers with variable-size IV.
* This parameter is discarded by ciphers with fixed-size IV.
*
@@ -577,12 +614,13 @@ int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx, mbedtls_ciph
* parameter-verification failure.
*/
int mbedtls_cipher_set_iv( mbedtls_cipher_context_t *ctx,
- const unsigned char *iv, size_t iv_len );
+ const unsigned char *iv,
+ size_t iv_len );
/**
* \brief This function resets the cipher state.
*
- * \param ctx The generic cipher context.
+ * \param ctx The generic cipher context. This must be initialized.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on
@@ -594,11 +632,13 @@ int mbedtls_cipher_reset( mbedtls_cipher_context_t *ctx );
/**
* \brief This function adds additional data for AEAD ciphers.
* Currently supported with GCM and ChaCha20+Poly1305.
- * Must be called exactly once, after mbedtls_cipher_reset().
+ * This must be called exactly once, after
+ * mbedtls_cipher_reset().
*
- * \param ctx The generic cipher context.
- * \param ad The additional data to use.
- * \param ad_len the Length of \p ad.
+ * \param ctx The generic cipher context. This must be initialized.
+ * \param ad The additional data to use. This must be a readable
+ * buffer of at least \p ad_len Bytes.
+ * \param ad_len the Length of \p ad Bytes.
*
* \return \c 0 on success.
* \return A specific error code on failure.
@@ -622,14 +662,17 @@ int mbedtls_cipher_update_ad( mbedtls_cipher_context_t *ctx,
* mbedtls_cipher_finish(), must have \p ilen as a
* multiple of the block size of the cipher.
*
- * \param ctx The generic cipher context.
- * \param input The buffer holding the input data.
+ * \param ctx The generic cipher context. This must be initialized and
+ * bound to a key.
+ * \param input The buffer holding the input data. This must be a
+ * readable buffer of at least \p ilen Bytes.
* \param ilen The length of the input data.
- * \param output The buffer for the output data. Must be able to hold at
- * least \p ilen + block_size. Must not be the same buffer
- * as input.
+ * \param output The buffer for the output data. This must be able to
+ * hold at least `ilen + block_size`. This must not be the
+ * same buffer as \p input.
* \param olen The length of the output data, to be updated with the
- * actual number of Bytes written.
+ * actual number of Bytes written. This must not be
+ * \c NULL.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on
@@ -647,9 +690,12 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
* contained in it is padded to the size of
* the last block, and written to the \p output buffer.
*
- * \param ctx The generic cipher context.
- * \param output The buffer to write data to. Needs block_size available.
+ * \param ctx The generic cipher context. This must be initialized and
+ * bound to a key.
+ * \param output The buffer to write data to. This needs to be a writable
+ * buffer of at least \p block_size Bytes.
* \param olen The length of the data written to the \p output buffer.
+ * This may not be \c NULL.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on
@@ -667,10 +713,14 @@ int mbedtls_cipher_finish( mbedtls_cipher_context_t *ctx,
/**
* \brief This function writes a tag for AEAD ciphers.
* Currently supported with GCM and ChaCha20+Poly1305.
- * Must be called after mbedtls_cipher_finish().
- *
- * \param ctx The generic cipher context.
- * \param tag The buffer to write the tag to.
+ * This must be called after mbedtls_cipher_finish().
+ *
+ * \param ctx The generic cipher context. This must be initialized,
+ * bound to a key, and have just completed a cipher
+ * operation through mbedtls_cipher_finish() the tag for
+ * which should be written.
+ * \param tag The buffer to write the tag to. This must be a writable
+ * buffer of at least \p tag_len Bytes.
* \param tag_len The length of the tag to write.
*
* \return \c 0 on success.
@@ -682,10 +732,11 @@ int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,
/**
* \brief This function checks the tag for AEAD ciphers.
* Currently supported with GCM and ChaCha20+Poly1305.
- * Must be called after mbedtls_cipher_finish().
+ * This must be called after mbedtls_cipher_finish().
*
- * \param ctx The generic cipher context.
- * \param tag The buffer holding the tag.
+ * \param ctx The generic cipher context. This must be initialized.
+ * \param tag The buffer holding the tag. This must be a readable
+ * buffer of at least \p tag_len Bytes.
* \param tag_len The length of the tag to check.
*
* \return \c 0 on success.
@@ -699,18 +750,22 @@ int mbedtls_cipher_check_tag( mbedtls_cipher_context_t *ctx,
* \brief The generic all-in-one encryption/decryption function,
* for all ciphers except AEAD constructs.
*
- * \param ctx The generic cipher context.
+ * \param ctx The generic cipher context. This must be initialized.
* \param iv The IV to use, or NONCE_COUNTER for CTR-mode ciphers.
+ * This must be a readable buffer of at least \p iv_len
+ * Bytes.
* \param iv_len The IV length for ciphers with variable-size IV.
* This parameter is discarded by ciphers with fixed-size
* IV.
- * \param input The buffer holding the input data.
- * \param ilen The length of the input data.
- * \param output The buffer for the output data. Must be able to hold at
- * least \p ilen + block_size. Must not be the same buffer
- * as input.
+ * \param input The buffer holding the input data. This must be a
+ * readable buffer of at least \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
+ * \param output The buffer for the output data. This must be able to
+ * hold at least `ilen + block_size`. This must not be the
+ * same buffer as \p input.
* \param olen The length of the output data, to be updated with the
- * actual number of Bytes written.
+ * actual number of Bytes written. This must not be
+ * \c NULL.
*
* \note Some ciphers do not use IVs nor nonce. For these
* ciphers, use \p iv = NULL and \p iv_len = 0.
@@ -733,19 +788,26 @@ int mbedtls_cipher_crypt( mbedtls_cipher_context_t *ctx,
/**
* \brief The generic autenticated encryption (AEAD) function.
*
- * \param ctx The generic cipher context.
+ * \param ctx The generic cipher context. This must be initialized and
+ * bound to a key.
* \param iv The IV to use, or NONCE_COUNTER for CTR-mode ciphers.
+ * This must be a readable buffer of at least \p iv_len
+ * Bytes.
* \param iv_len The IV length for ciphers with variable-size IV.
* This parameter is discarded by ciphers with fixed-size IV.
- * \param ad The additional data to authenticate.
+ * \param ad The additional data to authenticate. This must be a
+ * readable buffer of at least \p ad_len Bytes.
* \param ad_len The length of \p ad.
- * \param input The buffer holding the input data.
+ * \param input The buffer holding the input data. This must be a
+ * readable buffer of at least \p ilen Bytes.
* \param ilen The length of the input data.
- * \param output The buffer for the output data.
- * Must be able to hold at least \p ilen.
+ * \param output The buffer for the output data. This must be able to
+ * hold at least \p ilen Bytes.
* \param olen The length of the output data, to be updated with the
- * actual number of Bytes written.
- * \param tag The buffer for the authentication tag.
+ * actual number of Bytes written. This must not be
+ * \c NULL.
+ * \param tag The buffer for the authentication tag. This must be a
+ * writable buffer of at least \p tag_len Bytes.
* \param tag_len The desired length of the authentication tag.
*
* \return \c 0 on success.
@@ -767,19 +829,26 @@ int mbedtls_cipher_auth_encrypt( mbedtls_cipher_context_t *ctx,
* is zeroed out to prevent the unauthentic plaintext being
* used, making this interface safer.
*
- * \param ctx The generic cipher context.
+ * \param ctx The generic cipher context. This must be initialized and
+ * and bound to a key.
* \param iv The IV to use, or NONCE_COUNTER for CTR-mode ciphers.
+ * This must be a readable buffer of at least \p iv_len
+ * Bytes.
* \param iv_len The IV length for ciphers with variable-size IV.
* This parameter is discarded by ciphers with fixed-size IV.
- * \param ad The additional data to be authenticated.
+ * \param ad The additional data to be authenticated. This must be a
+ * readable buffer of at least \p ad_len Bytes.
* \param ad_len The length of \p ad.
- * \param input The buffer holding the input data.
+ * \param input The buffer holding the input data. This must be a
+ * readable buffer of at least \p ilen Bytes.
* \param ilen The length of the input data.
* \param output The buffer for the output data.
- * Must be able to hold at least \p ilen.
+ * This must be able to hold at least \p ilen Bytes.
* \param olen The length of the output data, to be updated with the
- * actual number of Bytes written.
- * \param tag The buffer holding the authentication tag.
+ * actual number of Bytes written. This must not be
+ * \c NULL.
+ * \param tag The buffer holding the authentication tag. This must be
+ * a readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the authentication tag.
*
* \return \c 0 on success.
diff --git a/thirdparty/mbedtls/include/mbedtls/cmac.h b/thirdparty/mbedtls/include/mbedtls/cmac.h
index a4fd552565..c196793531 100644
--- a/thirdparty/mbedtls/include/mbedtls/cmac.h
+++ b/thirdparty/mbedtls/include/mbedtls/cmac.h
@@ -34,6 +34,7 @@
extern "C" {
#endif
+/* MBEDTLS_ERR_CMAC_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_CMAC_HW_ACCEL_FAILED -0x007A /**< CMAC hardware accelerator failed. */
#define MBEDTLS_AES_BLOCK_SIZE 16
diff --git a/thirdparty/mbedtls/include/mbedtls/config.h b/thirdparty/mbedtls/include/mbedtls/config.h
index 6daa8d103b..51d66291a5 100644
--- a/thirdparty/mbedtls/include/mbedtls/config.h
+++ b/thirdparty/mbedtls/include/mbedtls/config.h
@@ -137,12 +137,21 @@
/**
* \def MBEDTLS_HAVE_TIME_DATE
*
- * System has time.h and time(), gmtime() and the clock is correct.
+ * System has time.h, time(), and an implementation for
+ * mbedtls_platform_gmtime_r() (see below).
* The time needs to be correct (not necesarily very accurate, but at least
* the date should be correct). This is used to verify the validity period of
* X.509 certificates.
*
* Comment if your system does not have a correct clock.
+ *
+ * \note mbedtls_platform_gmtime_r() is an abstraction in platform_util.h that
+ * behaves similarly to the gmtime_r() function from the C standard. Refer to
+ * the documentation for mbedtls_platform_gmtime_r() for more information.
+ *
+ * \note It is possible to configure an implementation for
+ * mbedtls_platform_gmtime_r() at compile-time by using the macro
+ * MBEDTLS_PLATFORM_GMTIME_R_ALT.
*/
#define MBEDTLS_HAVE_TIME_DATE
@@ -247,6 +256,48 @@
*/
//#define MBEDTLS_DEPRECATED_REMOVED
+/**
+ * \def MBEDTLS_CHECK_PARAMS
+ *
+ * This configuration option controls whether the library validates more of
+ * the parameters passed to it.
+ *
+ * When this flag is not defined, the library only attempts to validate an
+ * input parameter if: (1) they may come from the outside world (such as the
+ * network, the filesystem, etc.) or (2) not validating them could result in
+ * internal memory errors such as overflowing a buffer controlled by the
+ * library. On the other hand, it doesn't attempt to validate parameters whose
+ * values are fully controlled by the application (such as pointers).
+ *
+ * When this flag is defined, the library additionally attempts to validate
+ * parameters that are fully controlled by the application, and should always
+ * be valid if the application code is fully correct and trusted.
+ *
+ * For example, when a function accepts as input a pointer to a buffer that may
+ * contain untrusted data, and its documentation mentions that this pointer
+ * must not be NULL:
+ * - the pointer is checked to be non-NULL only if this option is enabled
+ * - the content of the buffer is always validated
+ *
+ * When this flag is defined, if a library function receives a parameter that
+ * is invalid, it will:
+ * - invoke the macro MBEDTLS_PARAM_FAILED() which by default expands to a
+ * call to the function mbedtls_param_failed()
+ * - immediately return (with a specific error code unless the function
+ * returns void and can't communicate an error).
+ *
+ * When defining this flag, you also need to:
+ * - either provide a definition of the function mbedtls_param_failed() in
+ * your application (see platform_util.h for its prototype) as the library
+ * calls that function, but does not provide a default definition for it,
+ * - or provide a different definition of the macro MBEDTLS_PARAM_FAILED()
+ * below if the above mechanism is not flexible enough to suit your needs.
+ * See the documentation of this macro later in this file.
+ *
+ * Uncomment to enable validation of application-controlled parameters.
+ */
+//#define MBEDTLS_CHECK_PARAMS
+
/* \} name SECTION: System support */
/**
@@ -405,11 +456,11 @@
* unsigned char mbedtls_internal_ecp_grp_capable(
* const mbedtls_ecp_group *grp )
* int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp )
- * void mbedtls_internal_ecp_deinit( const mbedtls_ecp_group *grp )
+ * void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp )
* The mbedtls_internal_ecp_grp_capable function should return 1 if the
* replacement functions implement arithmetic for the given group and 0
* otherwise.
- * The functions mbedtls_internal_ecp_init and mbedtls_internal_ecp_deinit are
+ * The functions mbedtls_internal_ecp_init and mbedtls_internal_ecp_free are
* called before and after each point operation and provide an opportunity to
* implement optimized set up and tear down instructions.
*
@@ -669,6 +720,30 @@
#define MBEDTLS_ECP_NIST_OPTIM
/**
+ * \def MBEDTLS_ECP_RESTARTABLE
+ *
+ * Enable "non-blocking" ECC operations that can return early and be resumed.
+ *
+ * This allows various functions to pause by returning
+ * #MBEDTLS_ERR_ECP_IN_PROGRESS (or, for functions in the SSL module,
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS) and then be called later again in
+ * order to further progress and eventually complete their operation. This is
+ * controlled through mbedtls_ecp_set_max_ops() which limits the maximum
+ * number of ECC operations a function may perform before pausing; see
+ * mbedtls_ecp_set_max_ops() for more information.
+ *
+ * This is useful in non-threaded environments if you want to avoid blocking
+ * for too long on ECC (and, hence, X.509 or SSL/TLS) operations.
+ *
+ * Uncomment this macro to enable restartable ECC computations.
+ *
+ * \note This option only works with the default software implementation of
+ * elliptic curve functionality. It is incompatible with
+ * MBEDTLS_ECP_ALT, MBEDTLS_ECDH_XXX_ALT and MBEDTLS_ECDSA_XXX_ALT.
+ */
+//#define MBEDTLS_ECP_RESTARTABLE
+
+/**
* \def MBEDTLS_ECDSA_DETERMINISTIC
*
* Enable deterministic ECDSA (RFC 6979).
@@ -1279,7 +1354,7 @@
/**
* \def MBEDTLS_SSL_RENEGOTIATION
*
- * Disable support for TLS renegotiation.
+ * Enable support for TLS renegotiation.
*
* The two main uses of renegotiation are (1) refresh keys on long-lived
* connections and (2) client authentication after the initial handshake.
@@ -2018,14 +2093,16 @@
/**
* \def MBEDTLS_CTR_DRBG_C
*
- * Enable the CTR_DRBG AES-256-based random generator.
+ * Enable the CTR_DRBG AES-based random generator.
+ * The CTR_DRBG generator uses AES-256 by default.
+ * To use AES-128 instead, enable MBEDTLS_CTR_DRBG_USE_128_BIT_KEY below.
*
* Module: library/ctr_drbg.c
* Caller:
*
* Requires: MBEDTLS_AES_C
*
- * This module provides the CTR_DRBG AES-256 random number generator.
+ * This module provides the CTR_DRBG AES random number generator.
*/
#define MBEDTLS_CTR_DRBG_C
@@ -2389,6 +2466,22 @@
#define MBEDTLS_OID_C
/**
+ * \def MBEDTLS_PADLOCK_C
+ *
+ * Enable VIA Padlock support on x86.
+ *
+ * Module: library/padlock.c
+ * Caller: library/aes.c
+ *
+ * Requires: MBEDTLS_HAVE_ASM
+ *
+ * This modules adds support for the VIA PadLock on x86.
+ */
+// -- GODOT start --
+// #define MBEDTLS_PADLOCK_C
+// -- GODOT end --
+
+/**
* \def MBEDTLS_PEM_PARSE_C
*
* Enable PEM decoding / parsing.
@@ -2896,6 +2989,7 @@
//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
+//#define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY /**< Use 128-bit key for CTR_DRBG - may reduce security (see ctr_drbg.h) */
/* HMAC_DRBG options */
//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
@@ -2946,6 +3040,36 @@
//#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
//#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
+/**
+ * \brief This macro is invoked by the library when an invalid parameter
+ * is detected that is only checked with MBEDTLS_CHECK_PARAMS
+ * (see the documentation of that option for context).
+ *
+ * When you leave this undefined here, a default definition is
+ * provided that invokes the function mbedtls_param_failed(),
+ * which is declared in platform_util.h for the benefit of the
+ * library, but that you need to define in your application.
+ *
+ * When you define this here, this replaces the default
+ * definition in platform_util.h (which no longer declares the
+ * function mbedtls_param_failed()) and it is your responsibility
+ * to make sure this macro expands to something suitable (in
+ * particular, that all the necessary declarations are visible
+ * from within the library - you can ensure that by providing
+ * them in this file next to the macro definition).
+ *
+ * Note that you may define this macro to expand to nothing, in
+ * which case you don't have to worry about declarations or
+ * definitions. However, you will then be notified about invalid
+ * parameters only in non-void functions, and void function will
+ * just silently return early on invalid parameters, which
+ * partially negates the benefits of enabling
+ * #MBEDTLS_CHECK_PARAMS in the first place, so is discouraged.
+ *
+ * \param cond The expression that should evaluate to true, but doesn't.
+ */
+//#define MBEDTLS_PARAM_FAILED( cond ) assert( cond )
+
/* SSL Cache options */
//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
@@ -2954,31 +3078,65 @@
/** \def MBEDTLS_SSL_MAX_CONTENT_LEN
*
- * Maximum fragment length in bytes.
+ * Maximum length (in bytes) of incoming and outgoing plaintext fragments.
+ *
+ * This determines the size of both the incoming and outgoing TLS I/O buffers
+ * in such a way that both are capable of holding the specified amount of
+ * plaintext data, regardless of the protection mechanism used.
*
- * Determines the size of both the incoming and outgoing TLS I/O buffers.
+ * To configure incoming and outgoing I/O buffers separately, use
+ * #MBEDTLS_SSL_IN_CONTENT_LEN and #MBEDTLS_SSL_OUT_CONTENT_LEN,
+ * which overwrite the value set by this option.
*
- * Uncommenting MBEDTLS_SSL_IN_CONTENT_LEN and/or MBEDTLS_SSL_OUT_CONTENT_LEN
- * will override this length by setting maximum incoming and/or outgoing
- * fragment length, respectively.
+ * \note When using a value less than the default of 16KB on the client, it is
+ * recommended to use the Maximum Fragment Length (MFL) extension to
+ * inform the server about this limitation. On the server, there
+ * is no supported, standardized way of informing the client about
+ * restriction on the maximum size of incoming messages, and unless
+ * the limitation has been communicated by other means, it is recommended
+ * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN
+ * while keeping the default value of 16KB for the incoming buffer.
+ *
+ * Uncomment to set the maximum plaintext size of both
+ * incoming and outgoing I/O buffers.
*/
//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384
/** \def MBEDTLS_SSL_IN_CONTENT_LEN
*
- * Maximum incoming fragment length in bytes.
+ * Maximum length (in bytes) of incoming plaintext fragments.
+ *
+ * This determines the size of the incoming TLS I/O buffer in such a way
+ * that it is capable of holding the specified amount of plaintext data,
+ * regardless of the protection mechanism used.
+ *
+ * If this option is undefined, it inherits its value from
+ * #MBEDTLS_SSL_MAX_CONTENT_LEN.
+ *
+ * \note When using a value less than the default of 16KB on the client, it is
+ * recommended to use the Maximum Fragment Length (MFL) extension to
+ * inform the server about this limitation. On the server, there
+ * is no supported, standardized way of informing the client about
+ * restriction on the maximum size of incoming messages, and unless
+ * the limitation has been communicated by other means, it is recommended
+ * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN
+ * while keeping the default value of 16KB for the incoming buffer.
*
- * Uncomment to set the size of the inward TLS buffer independently of the
- * outward buffer.
+ * Uncomment to set the maximum plaintext size of the incoming I/O buffer
+ * independently of the outgoing I/O buffer.
*/
//#define MBEDTLS_SSL_IN_CONTENT_LEN 16384
/** \def MBEDTLS_SSL_OUT_CONTENT_LEN
*
- * Maximum outgoing fragment length in bytes.
+ * Maximum length (in bytes) of outgoing plaintext fragments.
*
- * Uncomment to set the size of the outward TLS buffer independently of the
- * inward buffer.
+ * This determines the size of the outgoing TLS I/O buffer in such a way
+ * that it is capable of holding the specified amount of plaintext data,
+ * regardless of the protection mechanism used.
+ *
+ * If this option undefined, it inherits its value from
+ * #MBEDTLS_SSL_MAX_CONTENT_LEN.
*
* It is possible to save RAM by setting a smaller outward buffer, while keeping
* the default inward 16384 byte buffer to conform to the TLS specification.
@@ -2988,14 +3146,28 @@
* The specific size requirement depends on the configured ciphers and any
* certificate data which is sent during the handshake.
*
- * For absolute minimum RAM usage, it's best to enable
- * MBEDTLS_SSL_MAX_FRAGMENT_LENGTH and reduce MBEDTLS_SSL_MAX_CONTENT_LEN. This
- * reduces both incoming and outgoing buffer sizes. However this is only
- * guaranteed if the other end of the connection also supports the TLS
- * max_fragment_len extension. Otherwise the connection may fail.
+ * Uncomment to set the maximum plaintext size of the outgoing I/O buffer
+ * independently of the incoming I/O buffer.
*/
//#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384
+/** \def MBEDTLS_SSL_DTLS_MAX_BUFFERING
+ *
+ * Maximum number of heap-allocated bytes for the purpose of
+ * DTLS handshake message reassembly and future message buffering.
+ *
+ * This should be at least 9/8 * MBEDTLSSL_IN_CONTENT_LEN
+ * to account for a reassembled handshake message of maximum size,
+ * together with its reassembly bitmap.
+ *
+ * A value of 2 * MBEDTLS_SSL_IN_CONTENT_LEN (32768 by default)
+ * should be sufficient for all practical situations as it allows
+ * to reassembly a large handshake message (such as a certificate)
+ * while buffering multiple smaller handshake messages.
+ *
+ */
+//#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
+
//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
//#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
@@ -3069,25 +3241,33 @@
*/
//#define MBEDTLS_PLATFORM_ZEROIZE_ALT
-/* \} name SECTION: Customisation configuration options */
-
-/* Target and application specific configurations */
-//#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "target_config.h"
+/**
+ * Uncomment the macro to let Mbed TLS use your alternate implementation of
+ * mbedtls_platform_gmtime_r(). This replaces the default implementation in
+ * platform_util.c.
+ *
+ * gmtime() is not a thread-safe function as defined in the C standard. The
+ * library will try to use safer implementations of this function, such as
+ * gmtime_r() when available. However, if Mbed TLS cannot identify the target
+ * system, the implementation of mbedtls_platform_gmtime_r() will default to
+ * using the standard gmtime(). In this case, calls from the library to
+ * gmtime() will be guarded by the global mutex mbedtls_threading_gmtime_mutex
+ * if MBEDTLS_THREADING_C is enabled. We recommend that calls from outside the
+ * library are also guarded with this mutex to avoid race conditions. However,
+ * if the macro MBEDTLS_PLATFORM_GMTIME_R_ALT is defined, Mbed TLS will
+ * unconditionally use the implementation for mbedtls_platform_gmtime_r()
+ * supplied at compile time.
+ */
+//#define MBEDTLS_PLATFORM_GMTIME_R_ALT
-#if defined(TARGET_LIKE_MBED) && defined(YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE)
-#include YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE
-#endif
+/* \} name SECTION: Customisation configuration options */
-/*
+/* Target and application specific configurations
+ *
* Allow user to override any previous default.
*
- * Use two macro names for that, as:
- * - with yotta the prefix YOTTA_CFG_ is forced
- * - without yotta is looks weird to have a YOTTA prefix.
*/
-#if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE)
-#include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE
-#elif defined(MBEDTLS_USER_CONFIG_FILE)
+#if defined(MBEDTLS_USER_CONFIG_FILE)
#include MBEDTLS_USER_CONFIG_FILE
#endif
diff --git a/thirdparty/mbedtls/include/mbedtls/ctr_drbg.h b/thirdparty/mbedtls/include/mbedtls/ctr_drbg.h
index 3835d7299b..10f9389d9f 100644
--- a/thirdparty/mbedtls/include/mbedtls/ctr_drbg.h
+++ b/thirdparty/mbedtls/include/mbedtls/ctr_drbg.h
@@ -8,8 +8,11 @@
* Recommendation for Random Number Generation Using Deterministic Random
* Bit Generators</em>.
*
- * The Mbed TLS implementation of CTR_DRBG uses AES-256 as the underlying
- * block cipher.
+ * The Mbed TLS implementation of CTR_DRBG uses AES-256 (default) or AES-128
+ * as the underlying block cipher.
+ *
+ * \warning Using 128-bit keys for CTR_DRBG limits the security of generated
+ * keys and operations that use random values generated to 128-bit security.
*/
/*
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
@@ -45,7 +48,13 @@
#define MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR -0x003A /**< Read or write error in file. */
#define MBEDTLS_CTR_DRBG_BLOCKSIZE 16 /**< The block size used by the cipher. */
-#define MBEDTLS_CTR_DRBG_KEYSIZE 32 /**< The key size used by the cipher. */
+
+#if defined(MBEDTLS_CTR_DRBG_USE_128_BIT_KEY)
+#define MBEDTLS_CTR_DRBG_KEYSIZE 16 /**< The key size used by the cipher (compile-time choice: 128 bits). */
+#else
+#define MBEDTLS_CTR_DRBG_KEYSIZE 32 /**< The key size used by the cipher (compile-time choice: 256 bits). */
+#endif
+
#define MBEDTLS_CTR_DRBG_KEYBITS ( MBEDTLS_CTR_DRBG_KEYSIZE * 8 ) /**< The key size for the DRBG operation, in bits. */
#define MBEDTLS_CTR_DRBG_SEEDLEN ( MBEDTLS_CTR_DRBG_KEYSIZE + MBEDTLS_CTR_DRBG_BLOCKSIZE ) /**< The seed length, calculated as (counter + AES key). */
@@ -108,7 +117,7 @@ extern "C" {
/**
* \brief The CTR_DRBG context structure.
*/
-typedef struct
+typedef struct mbedtls_ctr_drbg_context
{
unsigned char counter[16]; /*!< The counter (V). */
int reseed_counter; /*!< The reseed counter. */
@@ -230,18 +239,20 @@ int mbedtls_ctr_drbg_reseed( mbedtls_ctr_drbg_context *ctx,
/**
* \brief This function updates the state of the CTR_DRBG context.
*
- * \note If \p add_len is greater than
- * #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT, only the first
- * #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT Bytes are used.
- * The remaining Bytes are silently discarded.
- *
* \param ctx The CTR_DRBG context.
* \param additional The data to update the state with.
- * \param add_len Length of \p additional data.
- *
+ * \param add_len Length of \p additional in bytes. This must be at
+ * most #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT.
+ *
+ * \return \c 0 on success.
+ * \return #MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG if
+ * \p add_len is more than
+ * #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT.
+ * \return An error from the underlying AES cipher on failure.
*/
-void mbedtls_ctr_drbg_update( mbedtls_ctr_drbg_context *ctx,
- const unsigned char *additional, size_t add_len );
+int mbedtls_ctr_drbg_update_ret( mbedtls_ctr_drbg_context *ctx,
+ const unsigned char *additional,
+ size_t add_len );
/**
* \brief This function updates a CTR_DRBG instance with additional
@@ -281,6 +292,35 @@ int mbedtls_ctr_drbg_random_with_add( void *p_rng,
int mbedtls_ctr_drbg_random( void *p_rng,
unsigned char *output, size_t output_len );
+
+#if ! defined(MBEDTLS_DEPRECATED_REMOVED)
+#if defined(MBEDTLS_DEPRECATED_WARNING)
+#define MBEDTLS_DEPRECATED __attribute__((deprecated))
+#else
+#define MBEDTLS_DEPRECATED
+#endif
+/**
+ * \brief This function updates the state of the CTR_DRBG context.
+ *
+ * \deprecated Superseded by mbedtls_ctr_drbg_update_ret()
+ * in 2.16.0.
+ *
+ * \note If \p add_len is greater than
+ * #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT, only the first
+ * #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT Bytes are used.
+ * The remaining Bytes are silently discarded.
+ *
+ * \param ctx The CTR_DRBG context.
+ * \param additional The data to update the state with.
+ * \param add_len Length of \p additional data.
+ */
+MBEDTLS_DEPRECATED void mbedtls_ctr_drbg_update(
+ mbedtls_ctr_drbg_context *ctx,
+ const unsigned char *additional,
+ size_t add_len );
+#undef MBEDTLS_DEPRECATED
+#endif /* !MBEDTLS_DEPRECATED_REMOVED */
+
#if defined(MBEDTLS_FS_IO)
/**
* \brief This function writes a seed file.
diff --git a/thirdparty/mbedtls/include/mbedtls/debug.h b/thirdparty/mbedtls/include/mbedtls/debug.h
index ef8db67ff1..736444bb76 100644
--- a/thirdparty/mbedtls/include/mbedtls/debug.h
+++ b/thirdparty/mbedtls/include/mbedtls/debug.h
@@ -65,6 +65,11 @@
mbedtls_debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt )
#endif
+#if defined(MBEDTLS_ECDH_C)
+#define MBEDTLS_SSL_DEBUG_ECDH( level, ecdh, attr ) \
+ mbedtls_debug_printf_ecdh( ssl, level, __FILE__, __LINE__, ecdh, attr )
+#endif
+
#else /* MBEDTLS_DEBUG_C */
#define MBEDTLS_SSL_DEBUG_MSG( level, args ) do { } while( 0 )
@@ -73,6 +78,7 @@
#define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) do { } while( 0 )
#define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) do { } while( 0 )
#define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) do { } while( 0 )
+#define MBEDTLS_SSL_DEBUG_ECDH( level, ecdh, attr ) do { } while( 0 )
#endif /* MBEDTLS_DEBUG_C */
@@ -221,6 +227,36 @@ void mbedtls_debug_print_crt( const mbedtls_ssl_context *ssl, int level,
const char *text, const mbedtls_x509_crt *crt );
#endif
+#if defined(MBEDTLS_ECDH_C)
+typedef enum
+{
+ MBEDTLS_DEBUG_ECDH_Q,
+ MBEDTLS_DEBUG_ECDH_QP,
+ MBEDTLS_DEBUG_ECDH_Z,
+} mbedtls_debug_ecdh_attr;
+
+/**
+ * \brief Print a field of the ECDH structure in the SSL context to the debug
+ * output. This function is always used through the
+ * MBEDTLS_SSL_DEBUG_ECDH() macro, which supplies the ssl context, file
+ * and line number parameters.
+ *
+ * \param ssl SSL context
+ * \param level error level of the debug message
+ * \param file file the error has occurred in
+ * \param line line number the error has occurred in
+ * \param ecdh the ECDH context
+ * \param attr the identifier of the attribute being output
+ *
+ * \attention This function is intended for INTERNAL usage within the
+ * library only.
+ */
+void mbedtls_debug_printf_ecdh( const mbedtls_ssl_context *ssl, int level,
+ const char *file, int line,
+ const mbedtls_ecdh_context *ecdh,
+ mbedtls_debug_ecdh_attr attr );
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/thirdparty/mbedtls/include/mbedtls/des.h b/thirdparty/mbedtls/include/mbedtls/des.h
index 6eb7d03bae..d62042d14e 100644
--- a/thirdparty/mbedtls/include/mbedtls/des.h
+++ b/thirdparty/mbedtls/include/mbedtls/des.h
@@ -42,6 +42,8 @@
#define MBEDTLS_DES_DECRYPT 0
#define MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH -0x0032 /**< The data input has an invalid length. */
+
+/* MBEDTLS_ERR_DES_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_DES_HW_ACCEL_FAILED -0x0033 /**< DES hardware accelerator failed. */
#define MBEDTLS_DES_KEY_SIZE 8
@@ -61,7 +63,7 @@ extern "C" {
* security risk. We recommend considering stronger ciphers
* instead.
*/
-typedef struct
+typedef struct mbedtls_des_context
{
uint32_t sk[32]; /*!< DES subkeys */
}
@@ -70,7 +72,7 @@ mbedtls_des_context;
/**
* \brief Triple-DES context structure
*/
-typedef struct
+typedef struct mbedtls_des3_context
{
uint32_t sk[96]; /*!< 3DES subkeys */
}
diff --git a/thirdparty/mbedtls/include/mbedtls/dhm.h b/thirdparty/mbedtls/include/mbedtls/dhm.h
index 75317a8e6d..a5452c199a 100644
--- a/thirdparty/mbedtls/include/mbedtls/dhm.h
+++ b/thirdparty/mbedtls/include/mbedtls/dhm.h
@@ -84,7 +84,10 @@
#define MBEDTLS_ERR_DHM_INVALID_FORMAT -0x3380 /**< The ASN.1 data is not formatted correctly. */
#define MBEDTLS_ERR_DHM_ALLOC_FAILED -0x3400 /**< Allocation of memory failed. */
#define MBEDTLS_ERR_DHM_FILE_IO_ERROR -0x3480 /**< Read or write of file failed. */
+
+/* MBEDTLS_ERR_DHM_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_DHM_HW_ACCEL_FAILED -0x3500 /**< DHM hardware accelerator failed. */
+
#define MBEDTLS_ERR_DHM_SET_GROUP_FAILED -0x3580 /**< Setting the modulus and generator failed. */
#ifdef __cplusplus
@@ -96,7 +99,7 @@ extern "C" {
/**
* \brief The DHM context structure.
*/
-typedef struct
+typedef struct mbedtls_dhm_context
{
size_t len; /*!< The size of \p P in Bytes. */
mbedtls_mpi P; /*!< The prime modulus. */
@@ -124,9 +127,15 @@ mbedtls_dhm_context;
void mbedtls_dhm_init( mbedtls_dhm_context *ctx );
/**
- * \brief This function parses the ServerKeyExchange parameters.
+ * \brief This function parses the DHM parameters in a
+ * TLS ServerKeyExchange handshake message
+ * (DHM modulus, generator, and public key).
*
- * \param ctx The DHM context.
+ * \note In a TLS handshake, this is the how the client
+ * sets up its DHM context from the server's public
+ * DHM key material.
+ *
+ * \param ctx The DHM context to use. This must be initialized.
* \param p On input, *p must be the start of the input buffer.
* On output, *p is updated to point to the end of the data
* that has been read. On success, this is the first byte
@@ -140,31 +149,37 @@ void mbedtls_dhm_init( mbedtls_dhm_context *ctx );
* \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
*/
int mbedtls_dhm_read_params( mbedtls_dhm_context *ctx,
- unsigned char **p,
- const unsigned char *end );
+ unsigned char **p,
+ const unsigned char *end );
/**
- * \brief This function sets up and writes the ServerKeyExchange
- * parameters.
- *
- * \note The destination buffer must be large enough to hold
- * the reduced binary presentation of the modulus, the generator
- * and the public key, each wrapped with a 2-byte length field.
- * It is the responsibility of the caller to ensure that enough
- * space is available. Refer to \c mbedtls_mpi_size to computing
- * the byte-size of an MPI.
+ * \brief This function generates a DHM key pair and exports its
+ * public part together with the DHM parameters in the format
+ * used in a TLS ServerKeyExchange handshake message.
*
- * \note This function assumes that \c ctx->P and \c ctx->G
- * have already been properly set. For that, use
+ * \note This function assumes that the DHM parameters \c ctx->P
+ * and \c ctx->G have already been properly set. For that, use
* mbedtls_dhm_set_group() below in conjunction with
* mbedtls_mpi_read_binary() and mbedtls_mpi_read_string().
*
- * \param ctx The DHM context.
+ * \note In a TLS handshake, this is the how the server generates
+ * and exports its DHM key material.
+ *
+ * \param ctx The DHM context to use. This must be initialized
+ * and have the DHM parameters set. It may or may not
+ * already have imported the peer's public key.
* \param x_size The private key size in Bytes.
- * \param olen The number of characters written.
- * \param output The destination buffer.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param olen The address at which to store the number of Bytes
+ * written on success. This must not be \c NULL.
+ * \param output The destination buffer. This must be a writable buffer of
+ * sufficient size to hold the reduced binary presentation of
+ * the modulus, the generator and the public key, each wrapped
+ * with a 2-byte length field. It is the responsibility of the
+ * caller to ensure that enough space is available. Refer to
+ * mbedtls_mpi_size() to computing the byte-size of an MPI.
+ * \param f_rng The RNG function. Must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng doesn't need a context parameter.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
@@ -177,12 +192,14 @@ int mbedtls_dhm_make_params( mbedtls_dhm_context *ctx, int x_size,
/**
* \brief This function sets the prime modulus and generator.
*
- * \note This function can be used to set \p P, \p G
+ * \note This function can be used to set \c ctx->P, \c ctx->G
* in preparation for mbedtls_dhm_make_params().
*
- * \param ctx The DHM context.
- * \param P The MPI holding the DHM prime modulus.
- * \param G The MPI holding the DHM generator.
+ * \param ctx The DHM context to configure. This must be initialized.
+ * \param P The MPI holding the DHM prime modulus. This must be
+ * an initialized MPI.
+ * \param G The MPI holding the DHM generator. This must be an
+ * initialized MPI.
*
* \return \c 0 if successful.
* \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
@@ -192,11 +209,17 @@ int mbedtls_dhm_set_group( mbedtls_dhm_context *ctx,
const mbedtls_mpi *G );
/**
- * \brief This function imports the public value of the peer, G^Y.
+ * \brief This function imports the raw public value of the peer.
+ *
+ * \note In a TLS handshake, this is the how the server imports
+ * the Client's public DHM key.
*
- * \param ctx The DHM context.
- * \param input The input buffer containing the G^Y value of the peer.
- * \param ilen The size of the input buffer.
+ * \param ctx The DHM context to use. This must be initialized and have
+ * its DHM parameters set, e.g. via mbedtls_dhm_set_group().
+ * It may or may not already have generated its own private key.
+ * \param input The input buffer containing the \c G^Y value of the peer.
+ * This must be a readable buffer of size \p ilen Bytes.
+ * \param ilen The size of the input buffer \p input in Bytes.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
@@ -205,21 +228,25 @@ int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx,
const unsigned char *input, size_t ilen );
/**
- * \brief This function creates its own private key, \c X, and
- * exports \c G^X.
+ * \brief This function creates a DHM key pair and exports
+ * the raw public key in big-endian format.
*
* \note The destination buffer is always fully written
* so as to contain a big-endian representation of G^X mod P.
- * If it is larger than ctx->len, it is padded accordingly
+ * If it is larger than \c ctx->len, it is padded accordingly
* with zero-bytes at the beginning.
*
- * \param ctx The DHM context.
+ * \param ctx The DHM context to use. This must be initialized and
+ * have the DHM parameters set. It may or may not already
+ * have imported the peer's public key.
* \param x_size The private key size in Bytes.
- * \param output The destination buffer.
- * \param olen The length of the destination buffer. Must be at least
- * equal to ctx->len (the size of \c P).
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param output The destination buffer. This must be a writable buffer of
+ * size \p olen Bytes.
+ * \param olen The length of the destination buffer. This must be at least
+ * equal to `ctx->len` (the size of \c P).
+ * \param f_rng The RNG function. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
+ * if \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
@@ -230,22 +257,27 @@ int mbedtls_dhm_make_public( mbedtls_dhm_context *ctx, int x_size,
void *p_rng );
/**
- * \brief This function derives and exports the shared secret
- * \c (G^Y)^X mod \c P.
+ * \brief This function derives and exports the shared secret
+ * \c (G^Y)^X mod \c P.
*
- * \note If \p f_rng is not NULL, it is used to blind the input as
- * a countermeasure against timing attacks. Blinding is used
- * only if our private key \c X is re-used, and not used
- * otherwise. We recommend always passing a non-NULL
- * \p f_rng argument.
+ * \note If \p f_rng is not \c NULL, it is used to blind the input as
+ * a countermeasure against timing attacks. Blinding is used
+ * only if our private key \c X is re-used, and not used
+ * otherwise. We recommend always passing a non-NULL
+ * \p f_rng argument.
*
- * \param ctx The DHM context.
- * \param output The destination buffer.
- * \param output_size The size of the destination buffer. Must be at least
- * the size of ctx->len (the size of \c P).
+ * \param ctx The DHM context to use. This must be initialized
+ * and have its own private key generated and the peer's
+ * public key imported.
+ * \param output The buffer to write the generated shared key to. This
+ * must be a writable buffer of size \p output_size Bytes.
+ * \param output_size The size of the destination buffer. This must be at
+ * least the size of \c ctx->len (the size of \c P).
* \param olen On exit, holds the actual number of Bytes written.
- * \param f_rng The RNG function, for blinding purposes.
- * \param p_rng The RNG context.
+ * \param f_rng The RNG function, for blinding purposes. This may
+ * b \c NULL if blinding isn't needed.
+ * \param p_rng The RNG context. This may be \c NULL if \p f_rng
+ * doesn't need a context argument.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
@@ -256,9 +288,12 @@ int mbedtls_dhm_calc_secret( mbedtls_dhm_context *ctx,
void *p_rng );
/**
- * \brief This function frees and clears the components of a DHM context.
+ * \brief This function frees and clears the components
+ * of a DHM context.
*
- * \param ctx The DHM context to free and clear.
+ * \param ctx The DHM context to free and clear. This may be \c NULL,
+ * in which case this function is a no-op. If it is not \c NULL,
+ * it must point to an initialized DHM context.
*/
void mbedtls_dhm_free( mbedtls_dhm_context *ctx );
@@ -267,17 +302,19 @@ void mbedtls_dhm_free( mbedtls_dhm_context *ctx );
/**
* \brief This function parses DHM parameters in PEM or DER format.
*
- * \param dhm The DHM context to initialize.
- * \param dhmin The input buffer.
- * \param dhminlen The size of the buffer, including the terminating null
- * Byte for PEM data.
+ * \param dhm The DHM context to import the DHM parameters into.
+ * This must be initialized.
+ * \param dhmin The input buffer. This must be a readable buffer of
+ * length \p dhminlen Bytes.
+ * \param dhminlen The size of the input buffer \p dhmin, including the
+ * terminating \c NULL Byte for PEM data.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX error code
- * error code on failure.
+ * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX error
+ * code on failure.
*/
int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin,
- size_t dhminlen );
+ size_t dhminlen );
#if defined(MBEDTLS_FS_IO)
/** \ingroup x509_module */
@@ -285,11 +322,13 @@ int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin,
* \brief This function loads and parses DHM parameters from a file.
*
* \param dhm The DHM context to load the parameters to.
+ * This must be initialized.
* \param path The filename to read the DHM parameters from.
+ * This must not be \c NULL.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX error code
- * error code on failure.
+ * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX
+ * error code on failure.
*/
int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path );
#endif /* MBEDTLS_FS_IO */
@@ -350,15 +389,6 @@ int mbedtls_dhm_self_test( int verbose );
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
-#if defined(MBEDTLS_DEPRECATED_WARNING)
-#define MBEDTLS_DEPRECATED __attribute__((deprecated))
-MBEDTLS_DEPRECATED typedef char const * mbedtls_deprecated_constant_t;
-#define MBEDTLS_DEPRECATED_STRING_CONSTANT( VAL ) \
- ( (mbedtls_deprecated_constant_t) ( VAL ) )
-#else
-#define MBEDTLS_DEPRECATED_STRING_CONSTANT( VAL ) VAL
-#endif /* ! MBEDTLS_DEPRECATED_WARNING */
-
/**
* \warning The origin of the primes in RFC 5114 is not documented and
* their use therefore constitutes a security risk!
diff --git a/thirdparty/mbedtls/include/mbedtls/ecdh.h b/thirdparty/mbedtls/include/mbedtls/ecdh.h
index 5fdf55a88a..05b2b03970 100644
--- a/thirdparty/mbedtls/include/mbedtls/ecdh.h
+++ b/thirdparty/mbedtls/include/mbedtls/ecdh.h
@@ -36,6 +36,18 @@
#include "ecp.h"
+/*
+ * Use a backward compatible ECDH context.
+ *
+ * This flag is always enabled for now and future versions might add a
+ * configuration option that conditionally undefines this flag.
+ * The configuration option in question may have a different name.
+ *
+ * Features undefining this flag, must have a warning in their description in
+ * config.h stating that the feature breaks backward compatibility.
+ */
+#define MBEDTLS_ECDH_LEGACY_CONTEXT
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -49,11 +61,49 @@ typedef enum
MBEDTLS_ECDH_THEIRS, /**< The key of the peer. */
} mbedtls_ecdh_side;
+#if !defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+/**
+ * Defines the ECDH implementation used.
+ *
+ * Later versions of the library may add new variants, therefore users should
+ * not make any assumptions about them.
+ */
+typedef enum
+{
+ MBEDTLS_ECDH_VARIANT_NONE = 0, /*!< Implementation not defined. */
+ MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0,/*!< The default Mbed TLS implementation */
+} mbedtls_ecdh_variant;
+
+/**
+ * The context used by the default ECDH implementation.
+ *
+ * Later versions might change the structure of this context, therefore users
+ * should not make any assumptions about the structure of
+ * mbedtls_ecdh_context_mbed.
+ */
+typedef struct mbedtls_ecdh_context_mbed
+{
+ mbedtls_ecp_group grp; /*!< The elliptic curve used. */
+ mbedtls_mpi d; /*!< The private key. */
+ mbedtls_ecp_point Q; /*!< The public key. */
+ mbedtls_ecp_point Qp; /*!< The value of the public key of the peer. */
+ mbedtls_mpi z; /*!< The shared secret. */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ mbedtls_ecp_restart_ctx rs; /*!< The restart context for EC computations. */
+#endif
+} mbedtls_ecdh_context_mbed;
+#endif
+
/**
+ *
+ * \warning Performing multiple operations concurrently on the same
+ * ECDSA context is not supported; objects of this type
+ * should not be shared between multiple threads.
* \brief The ECDH context structure.
*/
-typedef struct
+typedef struct mbedtls_ecdh_context
{
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
mbedtls_ecp_group grp; /*!< The elliptic curve used. */
mbedtls_mpi d; /*!< The private key. */
mbedtls_ecp_point Q; /*!< The public key. */
@@ -63,6 +113,29 @@ typedef struct
mbedtls_ecp_point Vi; /*!< The blinding value. */
mbedtls_ecp_point Vf; /*!< The unblinding value. */
mbedtls_mpi _d; /*!< The previous \p d. */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ int restart_enabled; /*!< The flag for restartable mode. */
+ mbedtls_ecp_restart_ctx rs; /*!< The restart context for EC computations. */
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+#else
+ uint8_t point_format; /*!< The format of point export in TLS messages
+ as defined in RFC 4492. */
+ mbedtls_ecp_group_id grp_id;/*!< The elliptic curve used. */
+ mbedtls_ecdh_variant var; /*!< The ECDH implementation/structure used. */
+ union
+ {
+ mbedtls_ecdh_context_mbed mbed_ecdh;
+ } ctx; /*!< Implementation-specific context. The
+ context in use is specified by the \c var
+ field. */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ uint8_t restart_enabled; /*!< The flag for restartable mode. Functions of
+ an alternative implementation not supporting
+ restartable mode must return
+ MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED error
+ if this flag is set. */
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+#endif /* MBEDTLS_ECDH_LEGACY_CONTEXT */
}
mbedtls_ecdh_context;
@@ -76,16 +149,20 @@ mbedtls_ecdh_context;
*
* \see ecp.h
*
- * \param grp The ECP group.
+ * \param grp The ECP group to use. This must be initialized and have
+ * domain parameters loaded, for example through
+ * mbedtls_ecp_load() or mbedtls_ecp_tls_read_group().
* \param d The destination MPI (private key).
+ * This must be initialized.
* \param Q The destination point (public key).
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * This must be initialized.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL in case \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_ECP_XXX or
+ * \return Another \c MBEDTLS_ERR_ECP_XXX or
* \c MBEDTLS_MPI_XXX error code on failure.
- *
*/
int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
int (*f_rng)(void *, unsigned char *, size_t),
@@ -104,15 +181,25 @@ int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp
* countermeasures against side-channel attacks.
* For more information, see mbedtls_ecp_mul().
*
- * \param grp The ECP group.
+ * \param grp The ECP group to use. This must be initialized and have
+ * domain parameters loaded, for example through
+ * mbedtls_ecp_load() or mbedtls_ecp_tls_read_group().
* \param z The destination MPI (shared secret).
+ * This must be initialized.
* \param Q The public key from another party.
+ * This must be initialized.
* \param d Our secret exponent (private key).
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * This must be initialized.
+ * \param f_rng The RNG function. This may be \c NULL if randomization
+ * of intermediate results during the ECP computations is
+ * not needed (discouraged). See the documentation of
+ * mbedtls_ecp_mul() for more.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a
+ * context argument.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_ECP_XXX or
+ * \return Another \c MBEDTLS_ERR_ECP_XXX or
* \c MBEDTLS_MPI_XXX error code on failure.
*/
int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z,
@@ -123,39 +210,62 @@ int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z,
/**
* \brief This function initializes an ECDH context.
*
- * \param ctx The ECDH context to initialize.
+ * \param ctx The ECDH context to initialize. This must not be \c NULL.
*/
void mbedtls_ecdh_init( mbedtls_ecdh_context *ctx );
/**
+ * \brief This function sets up the ECDH context with the information
+ * given.
+ *
+ * This function should be called after mbedtls_ecdh_init() but
+ * before mbedtls_ecdh_make_params(). There is no need to call
+ * this function before mbedtls_ecdh_read_params().
+ *
+ * This is the first function used by a TLS server for ECDHE
+ * ciphersuites.
+ *
+ * \param ctx The ECDH context to set up. This must be initialized.
+ * \param grp_id The group id of the group to set up the context for.
+ *
+ * \return \c 0 on success.
+ */
+int mbedtls_ecdh_setup( mbedtls_ecdh_context *ctx,
+ mbedtls_ecp_group_id grp_id );
+
+/**
* \brief This function frees a context.
*
- * \param ctx The context to free.
+ * \param ctx The context to free. This may be \c NULL, in which
+ * case this function does nothing. If it is not \c NULL,
+ * it must point to an initialized ECDH context.
*/
void mbedtls_ecdh_free( mbedtls_ecdh_context *ctx );
/**
- * \brief This function generates a public key and a TLS
- * ServerKeyExchange payload.
- *
- * This is the first function used by a TLS server for ECDHE
- * ciphersuites.
+ * \brief This function generates an EC key pair and exports its
+ * in the format used in a TLS ServerKeyExchange handshake
+ * message.
*
- * \note This function assumes that the ECP group (grp) of the
- * \p ctx context has already been properly set,
- * for example, using mbedtls_ecp_group_load().
+ * This is the second function used by a TLS server for ECDHE
+ * ciphersuites. (It is called after mbedtls_ecdh_setup().)
*
* \see ecp.h
*
- * \param ctx The ECDH context.
- * \param olen The number of characters written.
- * \param buf The destination buffer.
- * \param blen The length of the destination buffer.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param ctx The ECDH context to use. This must be initialized
+ * and bound to a group, for example via mbedtls_ecdh_setup().
+ * \param olen The address at which to store the number of Bytes written.
+ * \param buf The destination buffer. This must be a writable buffer of
+ * length \p blen Bytes.
+ * \param blen The length of the destination buffer \p buf in Bytes.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL in case \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_ECP_XXX error code on failure.
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ * \return Another \c MBEDTLS_ERR_ECP_XXX error code on failure.
*/
int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
unsigned char *buf, size_t blen,
@@ -163,24 +273,32 @@ int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
void *p_rng );
/**
- * \brief This function parses and processes a TLS ServerKeyExhange
- * payload.
+ * \brief This function parses the ECDHE parameters in a
+ * TLS ServerKeyExchange handshake message.
*
- * This is the first function used by a TLS client for ECDHE
- * ciphersuites.
+ * \note In a TLS handshake, this is the how the client
+ * sets up its ECDHE context from the server's public
+ * ECDHE key material.
*
* \see ecp.h
*
- * \param ctx The ECDH context.
- * \param buf The pointer to the start of the input buffer.
- * \param end The address for one Byte past the end of the buffer.
+ * \param ctx The ECDHE context to use. This must be initialized.
+ * \param buf On input, \c *buf must be the start of the input buffer.
+ * On output, \c *buf is updated to point to the end of the
+ * data that has been read. On success, this is the first byte
+ * past the end of the ServerKeyExchange parameters.
+ * On error, this is the point at which an error has been
+ * detected, which is usually not useful except to debug
+ * failures.
+ * \param end The end of the input buffer.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX error code on failure.
*
*/
int mbedtls_ecdh_read_params( mbedtls_ecdh_context *ctx,
- const unsigned char **buf, const unsigned char *end );
+ const unsigned char **buf,
+ const unsigned char *end );
/**
* \brief This function sets up an ECDH context from an EC key.
@@ -191,36 +309,45 @@ int mbedtls_ecdh_read_params( mbedtls_ecdh_context *ctx,
*
* \see ecp.h
*
- * \param ctx The ECDH context to set up.
- * \param key The EC key to use.
- * \param side Defines the source of the key: 1: Our key, or
- * 0: The key of the peer.
+ * \param ctx The ECDH context to set up. This must be initialized.
+ * \param key The EC key to use. This must be initialized.
+ * \param side Defines the source of the key. Possible values are:
+ * - #MBEDTLS_ECDH_OURS: The key is ours.
+ * - #MBEDTLS_ECDH_THEIRS: The key is that of the peer.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_ECP_XXX error code on failure.
+ * \return Another \c MBEDTLS_ERR_ECP_XXX error code on failure.
*
*/
-int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx, const mbedtls_ecp_keypair *key,
- mbedtls_ecdh_side side );
+int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx,
+ const mbedtls_ecp_keypair *key,
+ mbedtls_ecdh_side side );
/**
- * \brief This function generates a public key and a TLS
- * ClientKeyExchange payload.
+ * \brief This function generates a public key and exports it
+ * as a TLS ClientKeyExchange payload.
*
* This is the second function used by a TLS client for ECDH(E)
* ciphersuites.
*
* \see ecp.h
*
- * \param ctx The ECDH context.
- * \param olen The number of Bytes written.
- * \param buf The destination buffer.
- * \param blen The size of the destination buffer.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param ctx The ECDH context to use. This must be initialized
+ * and bound to a group, the latter usually by
+ * mbedtls_ecdh_read_params().
+ * \param olen The address at which to store the number of Bytes written.
+ * This must not be \c NULL.
+ * \param buf The destination buffer. This must be a writable buffer
+ * of length \p blen Bytes.
+ * \param blen The size of the destination buffer \p buf in Bytes.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL in case \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_ECP_XXX error code on failure.
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ * \return Another \c MBEDTLS_ERR_ECP_XXX error code on failure.
*/
int mbedtls_ecdh_make_public( mbedtls_ecdh_context *ctx, size_t *olen,
unsigned char *buf, size_t blen,
@@ -228,23 +355,26 @@ int mbedtls_ecdh_make_public( mbedtls_ecdh_context *ctx, size_t *olen,
void *p_rng );
/**
- * \brief This function parses and processes a TLS ClientKeyExchange
- * payload.
+ * \brief This function parses and processes the ECDHE payload of a
+ * TLS ClientKeyExchange message.
*
- * This is the second function used by a TLS server for ECDH(E)
- * ciphersuites.
+ * This is the third function used by a TLS server for ECDH(E)
+ * ciphersuites. (It is called after mbedtls_ecdh_setup() and
+ * mbedtls_ecdh_make_params().)
*
* \see ecp.h
*
- * \param ctx The ECDH context.
- * \param buf The start of the input buffer.
- * \param blen The length of the input buffer.
+ * \param ctx The ECDH context to use. This must be initialized
+ * and bound to a group, for example via mbedtls_ecdh_setup().
+ * \param buf The pointer to the ClientKeyExchange payload. This must
+ * be a readable buffer of length \p blen Bytes.
+ * \param blen The length of the input buffer \p buf in Bytes.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX error code on failure.
*/
int mbedtls_ecdh_read_public( mbedtls_ecdh_context *ctx,
- const unsigned char *buf, size_t blen );
+ const unsigned char *buf, size_t blen );
/**
* \brief This function derives and exports the shared secret.
@@ -257,22 +387,46 @@ int mbedtls_ecdh_read_public( mbedtls_ecdh_context *ctx,
* For more information, see mbedtls_ecp_mul().
*
* \see ecp.h
- *
- * \param ctx The ECDH context.
- * \param olen The number of Bytes written.
- * \param buf The destination buffer.
- * \param blen The length of the destination buffer.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+
+ * \param ctx The ECDH context to use. This must be initialized
+ * and have its own private key generated and the peer's
+ * public key imported.
+ * \param olen The address at which to store the total number of
+ * Bytes written on success. This must not be \c NULL.
+ * \param buf The buffer to write the generated shared key to. This
+ * must be a writable buffer of size \p blen Bytes.
+ * \param blen The length of the destination buffer \p buf in Bytes.
+ * \param f_rng The RNG function, for blinding purposes. This may
+ * b \c NULL if blinding isn't needed.
+ * \param p_rng The RNG context. This may be \c NULL if \p f_rng
+ * doesn't need a context argument.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_ECP_XXX error code on failure.
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ * \return Another \c MBEDTLS_ERR_ECP_XXX error code on failure.
*/
int mbedtls_ecdh_calc_secret( mbedtls_ecdh_context *ctx, size_t *olen,
unsigned char *buf, size_t blen,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+/**
+ * \brief This function enables restartable EC computations for this
+ * context. (Default: disabled.)
+ *
+ * \see \c mbedtls_ecp_set_max_ops()
+ *
+ * \note It is not possible to safely disable restartable
+ * computations once enabled, except by free-ing the context,
+ * which cancels possible in-progress operations.
+ *
+ * \param ctx The ECDH context to use. This must be initialized.
+ */
+void mbedtls_ecdh_enable_restart( mbedtls_ecdh_context *ctx );
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
#ifdef __cplusplus
}
#endif
diff --git a/thirdparty/mbedtls/include/mbedtls/ecdsa.h b/thirdparty/mbedtls/include/mbedtls/ecdsa.h
index ce1a03d791..40fdab3729 100644
--- a/thirdparty/mbedtls/include/mbedtls/ecdsa.h
+++ b/thirdparty/mbedtls/include/mbedtls/ecdsa.h
@@ -55,20 +55,71 @@
/** The maximal size of an ECDSA signature in Bytes. */
#define MBEDTLS_ECDSA_MAX_LEN ( 3 + 2 * ( 3 + MBEDTLS_ECP_MAX_BYTES ) )
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* \brief The ECDSA context structure.
+ *
+ * \warning Performing multiple operations concurrently on the same
+ * ECDSA context is not supported; objects of this type
+ * should not be shared between multiple threads.
*/
typedef mbedtls_ecp_keypair mbedtls_ecdsa_context;
-#ifdef __cplusplus
-extern "C" {
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+
+/**
+ * \brief Internal restart context for ecdsa_verify()
+ *
+ * \note Opaque struct, defined in ecdsa.c
+ */
+typedef struct mbedtls_ecdsa_restart_ver mbedtls_ecdsa_restart_ver_ctx;
+
+/**
+ * \brief Internal restart context for ecdsa_sign()
+ *
+ * \note Opaque struct, defined in ecdsa.c
+ */
+typedef struct mbedtls_ecdsa_restart_sig mbedtls_ecdsa_restart_sig_ctx;
+
+#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
+/**
+ * \brief Internal restart context for ecdsa_sign_det()
+ *
+ * \note Opaque struct, defined in ecdsa.c
+ */
+typedef struct mbedtls_ecdsa_restart_det mbedtls_ecdsa_restart_det_ctx;
+#endif
+
+/**
+ * \brief General context for resuming ECDSA operations
+ */
+typedef struct
+{
+ mbedtls_ecp_restart_ctx ecp; /*!< base context for ECP restart and
+ shared administrative info */
+ mbedtls_ecdsa_restart_ver_ctx *ver; /*!< ecdsa_verify() sub-context */
+ mbedtls_ecdsa_restart_sig_ctx *sig; /*!< ecdsa_sign() sub-context */
+#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
+ mbedtls_ecdsa_restart_det_ctx *det; /*!< ecdsa_sign_det() sub-context */
#endif
+} mbedtls_ecdsa_restart_ctx;
+
+#else /* MBEDTLS_ECP_RESTARTABLE */
+
+/* Now we can declare functions that take a pointer to that */
+typedef void mbedtls_ecdsa_restart_ctx;
+
+#endif /* MBEDTLS_ECP_RESTARTABLE */
/**
* \brief This function computes the ECDSA signature of a
* previously-hashed message.
*
- * \note The deterministic version is usually preferred.
+ * \note The deterministic version implemented in
+ * mbedtls_ecdsa_sign_det() is usually preferred.
*
* \note If the bitlength of the message hash is larger than the
* bitlength of the group order, then the hash is truncated
@@ -78,14 +129,22 @@ extern "C" {
*
* \see ecp.h
*
- * \param grp The ECP group.
- * \param r The first output integer.
- * \param s The second output integer.
- * \param d The private signing key.
- * \param buf The message hash.
- * \param blen The length of \p buf.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param grp The context for the elliptic curve to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param r The MPI context in which to store the first part
+ * the signature. This must be initialized.
+ * \param s The MPI context in which to store the second part
+ * the signature. This must be initialized.
+ * \param d The private signing key. This must be initialized.
+ * \param buf The content to be signed. This is usually the hash of
+ * the original data to be signed. This must be a readable
+ * buffer of length \p blen Bytes. It may be \c NULL if
+ * \p blen is zero.
+ * \param blen The length of \p buf in Bytes.
+ * \param f_rng The RNG function. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng doesn't need a context parameter.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX
@@ -112,21 +171,29 @@ int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
*
* \see ecp.h
*
- * \param grp The ECP group.
- * \param r The first output integer.
- * \param s The second output integer.
- * \param d The private signing key.
- * \param buf The message hash.
- * \param blen The length of \p buf.
- * \param md_alg The MD algorithm used to hash the message.
+ * \param grp The context for the elliptic curve to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param r The MPI context in which to store the first part
+ * the signature. This must be initialized.
+ * \param s The MPI context in which to store the second part
+ * the signature. This must be initialized.
+ * \param d The private signing key. This must be initialized
+ * and setup, for example through mbedtls_ecp_gen_privkey().
+ * \param buf The hashed content to be signed. This must be a readable
+ * buffer of length \p blen Bytes. It may be \c NULL if
+ * \p blen is zero.
+ * \param blen The length of \p buf in Bytes.
+ * \param md_alg The hash algorithm used to hash the original data.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX
* error code on failure.
*/
-int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
- const mbedtls_mpi *d, const unsigned char *buf, size_t blen,
- mbedtls_md_type_t md_alg );
+int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r,
+ mbedtls_mpi *s, const mbedtls_mpi *d,
+ const unsigned char *buf, size_t blen,
+ mbedtls_md_type_t md_alg );
#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
/**
@@ -141,12 +208,19 @@ int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi
*
* \see ecp.h
*
- * \param grp The ECP group.
- * \param buf The message hash.
- * \param blen The length of \p buf.
- * \param Q The public key to use for verification.
+ * \param grp The ECP group to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param buf The hashed content that was signed. This must be a readable
+ * buffer of length \p blen Bytes. It may be \c NULL if
+ * \p blen is zero.
+ * \param blen The length of \p buf in Bytes.
+ * \param Q The public key to use for verification. This must be
+ * initialized and setup.
* \param r The first integer of the signature.
+ * This must be initialized.
* \param s The second integer of the signature.
+ * This must be initialized.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the signature
@@ -155,8 +229,9 @@ int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi
* error code on failure for any other reason.
*/
int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
- const unsigned char *buf, size_t blen,
- const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s);
+ const unsigned char *buf, size_t blen,
+ const mbedtls_ecp_point *Q, const mbedtls_mpi *r,
+ const mbedtls_mpi *s);
/**
* \brief This function computes the ECDSA signature and writes it
@@ -173,11 +248,6 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
* of the Digital Signature Algorithm (DSA) and Elliptic
* Curve Digital Signature Algorithm (ECDSA)</em>.
*
- * \note The \p sig buffer must be at least twice as large as the
- * size of the curve used, plus 9. For example, 73 Bytes if
- * a 256-bit curve is used. A buffer length of
- * #MBEDTLS_ECDSA_MAX_LEN is always safe.
- *
* \note If the bitlength of the message hash is larger than the
* bitlength of the group order, then the hash is truncated as
* defined in <em>Standards for Efficient Cryptography Group
@@ -186,25 +256,84 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
*
* \see ecp.h
*
- * \param ctx The ECDSA context.
+ * \param ctx The ECDSA context to use. This must be initialized
+ * and have a group and private key bound to it, for example
+ * via mbedtls_ecdsa_genkey() or mbedtls_ecdsa_from_keypair().
* \param md_alg The message digest that was used to hash the message.
- * \param hash The message hash.
- * \param hlen The length of the hash.
- * \param sig The buffer that holds the signature.
- * \param slen The length of the signature written.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param hash The message hash to be signed. This must be a readable
+ * buffer of length \p blen Bytes.
+ * \param hlen The length of the hash \p hash in Bytes.
+ * \param sig The buffer to which to write the signature. This must be a
+ * writable buffer of length at least twice as large as the
+ * size of the curve used, plus 9. For example, 73 Bytes if
+ * a 256-bit curve is used. A buffer length of
+ * #MBEDTLS_ECDSA_MAX_LEN is always safe.
+ * \param slen The address at which to store the actual length of
+ * the signature written. Must not be \c NULL.
+ * \param f_rng The RNG function. This must not be \c NULL if
+ * #MBEDTLS_ECDSA_DETERMINISTIC is unset. Otherwise,
+ * it is unused and may be set to \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't use a context.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX, \c MBEDTLS_ERR_MPI_XXX or
* \c MBEDTLS_ERR_ASN1_XXX error code on failure.
*/
-int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t md_alg,
+int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx,
+ mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hlen,
unsigned char *sig, size_t *slen,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng );
+/**
+ * \brief This function computes the ECDSA signature and writes it
+ * to a buffer, in a restartable way.
+ *
+ * \see \c mbedtls_ecdsa_write_signature()
+ *
+ * \note This function is like \c mbedtls_ecdsa_write_signature()
+ * but it can return early and restart according to the limit
+ * set with \c mbedtls_ecp_set_max_ops() to reduce blocking.
+ *
+ * \param ctx The ECDSA context to use. This must be initialized
+ * and have a group and private key bound to it, for example
+ * via mbedtls_ecdsa_genkey() or mbedtls_ecdsa_from_keypair().
+ * \param md_alg The message digest that was used to hash the message.
+ * \param hash The message hash to be signed. This must be a readable
+ * buffer of length \p blen Bytes.
+ * \param hlen The length of the hash \p hash in Bytes.
+ * \param sig The buffer to which to write the signature. This must be a
+ * writable buffer of length at least twice as large as the
+ * size of the curve used, plus 9. For example, 73 Bytes if
+ * a 256-bit curve is used. A buffer length of
+ * #MBEDTLS_ECDSA_MAX_LEN is always safe.
+ * \param slen The address at which to store the actual length of
+ * the signature written. Must not be \c NULL.
+ * \param f_rng The RNG function. This must not be \c NULL if
+ * #MBEDTLS_ECDSA_DETERMINISTIC is unset. Otherwise,
+ * it is unused and may be set to \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't use a context.
+ * \param rs_ctx The restart context to use. This may be \c NULL to disable
+ * restarting. If it is not \c NULL, it must point to an
+ * initialized restart context.
+ *
+ * \return \c 0 on success.
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ * \return Another \c MBEDTLS_ERR_ECP_XXX, \c MBEDTLS_ERR_MPI_XXX or
+ * \c MBEDTLS_ERR_ASN1_XXX error code on failure.
+ */
+int mbedtls_ecdsa_write_signature_restartable( mbedtls_ecdsa_context *ctx,
+ mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hlen,
+ unsigned char *sig, size_t *slen,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng,
+ mbedtls_ecdsa_restart_ctx *rs_ctx );
+
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
#if ! defined(MBEDTLS_DEPRECATED_REMOVED)
#if defined(MBEDTLS_DEPRECATED_WARNING)
@@ -225,11 +354,6 @@ int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t
* \warning It is not thread-safe to use the same context in
* multiple threads.
*
- * \note The \p sig buffer must be at least twice as large as the
- * size of the curve used, plus 9. For example, 73 Bytes if a
- * 256-bit curve is used. A buffer length of
- * #MBEDTLS_ECDSA_MAX_LEN is always safe.
- *
* \note If the bitlength of the message hash is larger than the
* bitlength of the group order, then the hash is truncated as
* defined in <em>Standards for Efficient Cryptography Group
@@ -241,12 +365,20 @@ int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t
* \deprecated Superseded by mbedtls_ecdsa_write_signature() in
* Mbed TLS version 2.0 and later.
*
- * \param ctx The ECDSA context.
- * \param hash The message hash.
- * \param hlen The length of the hash.
- * \param sig The buffer that holds the signature.
- * \param slen The length of the signature written.
- * \param md_alg The MD algorithm used to hash the message.
+ * \param ctx The ECDSA context to use. This must be initialized
+ * and have a group and private key bound to it, for example
+ * via mbedtls_ecdsa_genkey() or mbedtls_ecdsa_from_keypair().
+ * \param hash The message hash to be signed. This must be a readable
+ * buffer of length \p blen Bytes.
+ * \param hlen The length of the hash \p hash in Bytes.
+ * \param sig The buffer to which to write the signature. This must be a
+ * writable buffer of length at least twice as large as the
+ * size of the curve used, plus 9. For example, 73 Bytes if
+ * a 256-bit curve is used. A buffer length of
+ * #MBEDTLS_ECDSA_MAX_LEN is always safe.
+ * \param slen The address at which to store the actual length of
+ * the signature written. Must not be \c NULL.
+ * \param md_alg The message digest that was used to hash the message.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX, \c MBEDTLS_ERR_MPI_XXX or
@@ -271,11 +403,14 @@ int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx,
*
* \see ecp.h
*
- * \param ctx The ECDSA context.
- * \param hash The message hash.
- * \param hlen The size of the hash.
- * \param sig The signature to read and verify.
- * \param slen The size of \p sig.
+ * \param ctx The ECDSA context to use. This must be initialized
+ * and have a group and public key bound to it.
+ * \param hash The message hash that was signed. This must be a readable
+ * buffer of length \p size Bytes.
+ * \param hlen The size of the hash \p hash.
+ * \param sig The signature to read and verify. This must be a readable
+ * buffer of length \p slen Bytes.
+ * \param slen The size of \p sig in Bytes.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if signature is invalid.
@@ -289,15 +424,53 @@ int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx,
const unsigned char *sig, size_t slen );
/**
+ * \brief This function reads and verifies an ECDSA signature,
+ * in a restartable way.
+ *
+ * \see \c mbedtls_ecdsa_read_signature()
+ *
+ * \note This function is like \c mbedtls_ecdsa_read_signature()
+ * but it can return early and restart according to the limit
+ * set with \c mbedtls_ecp_set_max_ops() to reduce blocking.
+ *
+ * \param ctx The ECDSA context to use. This must be initialized
+ * and have a group and public key bound to it.
+ * \param hash The message hash that was signed. This must be a readable
+ * buffer of length \p size Bytes.
+ * \param hlen The size of the hash \p hash.
+ * \param sig The signature to read and verify. This must be a readable
+ * buffer of length \p slen Bytes.
+ * \param slen The size of \p sig in Bytes.
+ * \param rs_ctx The restart context to use. This may be \c NULL to disable
+ * restarting. If it is not \c NULL, it must point to an
+ * initialized restart context.
+ *
+ * \return \c 0 on success.
+ * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if signature is invalid.
+ * \return #MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH if there is a valid
+ * signature in \p sig, but its length is less than \p siglen.
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ * \return Another \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_ERR_MPI_XXX
+ * error code on failure for any other reason.
+ */
+int mbedtls_ecdsa_read_signature_restartable( mbedtls_ecdsa_context *ctx,
+ const unsigned char *hash, size_t hlen,
+ const unsigned char *sig, size_t slen,
+ mbedtls_ecdsa_restart_ctx *rs_ctx );
+
+/**
* \brief This function generates an ECDSA keypair on the given curve.
*
* \see ecp.h
*
* \param ctx The ECDSA context to store the keypair in.
+ * This must be initialized.
* \param gid The elliptic curve to use. One of the various
* \c MBEDTLS_ECP_DP_XXX macros depending on configuration.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX code on failure.
@@ -306,32 +479,59 @@ int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
/**
- * \brief This function sets an ECDSA context from an EC key pair.
+ * \brief This function sets up an ECDSA context from an EC key pair.
*
* \see ecp.h
*
- * \param ctx The ECDSA context to set.
- * \param key The EC key to use.
+ * \param ctx The ECDSA context to setup. This must be initialized.
+ * \param key The EC key to use. This must be initialized and hold
+ * a private-public key pair or a public key. In the former
+ * case, the ECDSA context may be used for signature creation
+ * and verification after this call. In the latter case, it
+ * may be used for signature verification.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX code on failure.
*/
-int mbedtls_ecdsa_from_keypair( mbedtls_ecdsa_context *ctx, const mbedtls_ecp_keypair *key );
+int mbedtls_ecdsa_from_keypair( mbedtls_ecdsa_context *ctx,
+ const mbedtls_ecp_keypair *key );
/**
* \brief This function initializes an ECDSA context.
*
* \param ctx The ECDSA context to initialize.
+ * This must not be \c NULL.
*/
void mbedtls_ecdsa_init( mbedtls_ecdsa_context *ctx );
/**
* \brief This function frees an ECDSA context.
*
- * \param ctx The ECDSA context to free.
+ * \param ctx The ECDSA context to free. This may be \c NULL,
+ * in which case this function does nothing. If it
+ * is not \c NULL, it must be initialized.
*/
void mbedtls_ecdsa_free( mbedtls_ecdsa_context *ctx );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+/**
+ * \brief Initialize a restart context.
+ *
+ * \param ctx The restart context to initialize.
+ * This must not be \c NULL.
+ */
+void mbedtls_ecdsa_restart_init( mbedtls_ecdsa_restart_ctx *ctx );
+
+/**
+ * \brief Free the components of a restart context.
+ *
+ * \param ctx The restart context to free. This may be \c NULL,
+ * in which case this function does nothing. If it
+ * is not \c NULL, it must be initialized.
+ */
+void mbedtls_ecdsa_restart_free( mbedtls_ecdsa_restart_ctx *ctx );
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
#ifdef __cplusplus
}
#endif
diff --git a/thirdparty/mbedtls/include/mbedtls/ecjpake.h b/thirdparty/mbedtls/include/mbedtls/ecjpake.h
index cc2b316f5e..b967af8385 100644
--- a/thirdparty/mbedtls/include/mbedtls/ecjpake.h
+++ b/thirdparty/mbedtls/include/mbedtls/ecjpake.h
@@ -68,7 +68,7 @@ typedef enum {
* convetion from the Thread v1.0 spec. Correspondance is indicated in the
* description as a pair C: client name, S: server name
*/
-typedef struct
+typedef struct mbedtls_ecjpake_context
{
const mbedtls_md_info_t *md_info; /**< Hash to use */
mbedtls_ecp_group grp; /**< Elliptic curve */
@@ -92,28 +92,33 @@ typedef struct
#endif /* MBEDTLS_ECJPAKE_ALT */
/**
- * \brief Initialize a context
- * (just makes it ready for setup() or free()).
+ * \brief Initialize an ECJPAKE context.
*
- * \param ctx context to initialize
+ * \param ctx The ECJPAKE context to initialize.
+ * This must not be \c NULL.
*/
void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx );
/**
- * \brief Set up a context for use
+ * \brief Set up an ECJPAKE context for use.
*
* \note Currently the only values for hash/curve allowed by the
- * standard are MBEDTLS_MD_SHA256/MBEDTLS_ECP_DP_SECP256R1.
+ * standard are #MBEDTLS_MD_SHA256/#MBEDTLS_ECP_DP_SECP256R1.
*
- * \param ctx context to set up
- * \param role Our role: client or server
- * \param hash hash function to use (MBEDTLS_MD_XXX)
- * \param curve elliptic curve identifier (MBEDTLS_ECP_DP_XXX)
- * \param secret pre-shared secret (passphrase)
- * \param len length of the shared secret
+ * \param ctx The ECJPAKE context to set up. This must be initialized.
+ * \param role The role of the caller. This must be either
+ * #MBEDTLS_ECJPAKE_CLIENT or #MBEDTLS_ECJPAKE_SERVER.
+ * \param hash The identifier of the hash function to use,
+ * for example #MBEDTLS_MD_SHA256.
+ * \param curve The identifier of the elliptic curve to use,
+ * for example #MBEDTLS_ECP_DP_SECP256R1.
+ * \param secret The pre-shared secret (passphrase). This must be
+ * a readable buffer of length \p len Bytes. It need
+ * only be valid for the duration of this call.
+ * \param len The length of the pre-shared secret \p secret.
*
- * \return 0 if successfull,
- * a negative error code otherwise
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx,
mbedtls_ecjpake_role role,
@@ -123,29 +128,34 @@ int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx,
size_t len );
/**
- * \brief Check if a context is ready for use
+ * \brief Check if an ECJPAKE context is ready for use.
*
- * \param ctx Context to check
+ * \param ctx The ECJPAKE context to check. This must be
+ * initialized.
*
- * \return 0 if the context is ready for use,
- * MBEDTLS_ERR_ECP_BAD_INPUT_DATA otherwise
+ * \return \c 0 if the context is ready for use.
+ * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA otherwise.
*/
int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx );
/**
* \brief Generate and write the first round message
* (TLS: contents of the Client/ServerHello extension,
- * excluding extension type and length bytes)
+ * excluding extension type and length bytes).
*
- * \param ctx Context to use
- * \param buf Buffer to write the contents to
- * \param len Buffer size
- * \param olen Will be updated with the number of bytes written
- * \param f_rng RNG function
- * \param p_rng RNG parameter
+ * \param ctx The ECJPAKE context to use. This must be
+ * initialized and set up.
+ * \param buf The buffer to write the contents to. This must be a
+ * writable buffer of length \p len Bytes.
+ * \param len The length of \p buf in Bytes.
+ * \param olen The address at which to store the total number
+ * of Bytes written to \p buf. This must not be \c NULL.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng. This
+ * may be \c NULL if \p f_rng doesn't use a context.
*
- * \return 0 if successfull,
- * a negative error code otherwise
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx,
unsigned char *buf, size_t len, size_t *olen,
@@ -155,14 +165,16 @@ int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx,
/**
* \brief Read and process the first round message
* (TLS: contents of the Client/ServerHello extension,
- * excluding extension type and length bytes)
+ * excluding extension type and length bytes).
*
- * \param ctx Context to use
- * \param buf Pointer to extension contents
- * \param len Extension length
+ * \param ctx The ECJPAKE context to use. This must be initialized
+ * and set up.
+ * \param buf The buffer holding the first round message. This must
+ * be a readable buffer of length \p len Bytes.
+ * \param len The length in Bytes of \p buf.
*
- * \return 0 if successfull,
- * a negative error code otherwise
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx,
const unsigned char *buf,
@@ -170,17 +182,21 @@ int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx,
/**
* \brief Generate and write the second round message
- * (TLS: contents of the Client/ServerKeyExchange)
+ * (TLS: contents of the Client/ServerKeyExchange).
*
- * \param ctx Context to use
- * \param buf Buffer to write the contents to
- * \param len Buffer size
- * \param olen Will be updated with the number of bytes written
- * \param f_rng RNG function
- * \param p_rng RNG parameter
+ * \param ctx The ECJPAKE context to use. This must be initialized,
+ * set up, and already have performed round one.
+ * \param buf The buffer to write the round two contents to.
+ * This must be a writable buffer of length \p len Bytes.
+ * \param len The size of \p buf in Bytes.
+ * \param olen The address at which to store the total number of Bytes
+ * written to \p buf. This must not be \c NULL.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng. This
+ * may be \c NULL if \p f_rng doesn't use a context.
*
- * \return 0 if successfull,
- * a negative error code otherwise
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx,
unsigned char *buf, size_t len, size_t *olen,
@@ -189,14 +205,16 @@ int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx,
/**
* \brief Read and process the second round message
- * (TLS: contents of the Client/ServerKeyExchange)
+ * (TLS: contents of the Client/ServerKeyExchange).
*
- * \param ctx Context to use
- * \param buf Pointer to the message
- * \param len Message length
+ * \param ctx The ECJPAKE context to use. This must be initialized
+ * and set up and already have performed round one.
+ * \param buf The buffer holding the second round message. This must
+ * be a readable buffer of length \p len Bytes.
+ * \param len The length in Bytes of \p buf.
*
- * \return 0 if successfull,
- * a negative error code otherwise
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx,
const unsigned char *buf,
@@ -204,17 +222,21 @@ int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx,
/**
* \brief Derive the shared secret
- * (TLS: Pre-Master Secret)
+ * (TLS: Pre-Master Secret).
*
- * \param ctx Context to use
- * \param buf Buffer to write the contents to
- * \param len Buffer size
- * \param olen Will be updated with the number of bytes written
- * \param f_rng RNG function
- * \param p_rng RNG parameter
+ * \param ctx The ECJPAKE context to use. This must be initialized,
+ * set up and have performed both round one and two.
+ * \param buf The buffer to write the derived secret to. This must
+ * be a writable buffer of length \p len Bytes.
+ * \param len The length of \p buf in Bytes.
+ * \param olen The address at which to store the total number of Bytes
+ * written to \p buf. This must not be \c NULL.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng. This
+ * may be \c NULL if \p f_rng doesn't use a context.
*
- * \return 0 if successfull,
- * a negative error code otherwise
+ * \return \c 0 if successful.
+ * \return A negative error code on failure.
*/
int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx,
unsigned char *buf, size_t len, size_t *olen,
@@ -222,14 +244,15 @@ int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx,
void *p_rng );
/**
- * \brief Free a context's content
+ * \brief This clears an ECJPAKE context and frees any
+ * embedded data structure.
*
- * \param ctx context to free
+ * \param ctx The ECJPAKE context to free. This may be \c NULL,
+ * in which case this function does nothing. If it is not
+ * \c NULL, it must point to an initialized ECJPAKE context.
*/
void mbedtls_ecjpake_free( mbedtls_ecjpake_context *ctx );
-
-
#if defined(MBEDTLS_SELF_TEST)
/**
diff --git a/thirdparty/mbedtls/include/mbedtls/ecp.h b/thirdparty/mbedtls/include/mbedtls/ecp.h
index 3a407986dd..de3a343cb6 100644
--- a/thirdparty/mbedtls/include/mbedtls/ecp.h
+++ b/thirdparty/mbedtls/include/mbedtls/ecp.h
@@ -49,8 +49,12 @@
#define MBEDTLS_ERR_ECP_RANDOM_FAILED -0x4D00 /**< Generation of random value, such as ephemeral key, failed. */
#define MBEDTLS_ERR_ECP_INVALID_KEY -0x4C80 /**< Invalid private or public key. */
#define MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH -0x4C00 /**< The buffer contains a valid signature followed by more data. */
+
+/* MBEDTLS_ERR_ECP_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_ECP_HW_ACCEL_FAILED -0x4B80 /**< The ECP hardware accelerator failed. */
+#define MBEDTLS_ERR_ECP_IN_PROGRESS -0x4B00 /**< Operation in progress, call again with the same parameters to continue. */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -92,7 +96,7 @@ typedef enum
/**
* Curve information, for use by other modules.
*/
-typedef struct
+typedef struct mbedtls_ecp_curve_info
{
mbedtls_ecp_group_id grp_id; /*!< An internal identifier. */
uint16_t tls_id; /*!< The TLS NamedCurve identifier. */
@@ -111,7 +115,7 @@ typedef struct
* Otherwise, \p X and \p Y are its standard (affine)
* coordinates.
*/
-typedef struct
+typedef struct mbedtls_ecp_point
{
mbedtls_mpi X; /*!< The X coordinate of the ECP point. */
mbedtls_mpi Y; /*!< The Y coordinate of the ECP point. */
@@ -155,8 +159,12 @@ mbedtls_ecp_point;
* additions or subtractions. Therefore, it is only an approximative modular
* reduction. It must return 0 on success and non-zero on failure.
*
+ * \note Alternative implementations must keep the group IDs distinct. If
+ * two group structures have the same ID, then they must be
+ * identical.
+ *
*/
-typedef struct
+typedef struct mbedtls_ecp_group
{
mbedtls_ecp_group_id id; /*!< An internal group identifier. */
mbedtls_mpi P; /*!< The prime modulus of the base field. */
@@ -181,6 +189,70 @@ typedef struct
}
mbedtls_ecp_group;
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+
+/**
+ * \brief Internal restart context for multiplication
+ *
+ * \note Opaque struct
+ */
+typedef struct mbedtls_ecp_restart_mul mbedtls_ecp_restart_mul_ctx;
+
+/**
+ * \brief Internal restart context for ecp_muladd()
+ *
+ * \note Opaque struct
+ */
+typedef struct mbedtls_ecp_restart_muladd mbedtls_ecp_restart_muladd_ctx;
+
+/**
+ * \brief General context for resuming ECC operations
+ */
+typedef struct
+{
+ unsigned ops_done; /*!< current ops count */
+ unsigned depth; /*!< call depth (0 = top-level) */
+ mbedtls_ecp_restart_mul_ctx *rsm; /*!< ecp_mul_comb() sub-context */
+ mbedtls_ecp_restart_muladd_ctx *ma; /*!< ecp_muladd() sub-context */
+} mbedtls_ecp_restart_ctx;
+
+/*
+ * Operation counts for restartable functions
+ */
+#define MBEDTLS_ECP_OPS_CHK 3 /*!< basic ops count for ecp_check_pubkey() */
+#define MBEDTLS_ECP_OPS_DBL 8 /*!< basic ops count for ecp_double_jac() */
+#define MBEDTLS_ECP_OPS_ADD 11 /*!< basic ops count for see ecp_add_mixed() */
+#define MBEDTLS_ECP_OPS_INV 120 /*!< empirical equivalent for mpi_mod_inv() */
+
+/**
+ * \brief Internal; for restartable functions in other modules.
+ * Check and update basic ops budget.
+ *
+ * \param grp Group structure
+ * \param rs_ctx Restart context
+ * \param ops Number of basic ops to do
+ *
+ * \return \c 0 if doing \p ops basic ops is still allowed,
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS otherwise.
+ */
+int mbedtls_ecp_check_budget( const mbedtls_ecp_group *grp,
+ mbedtls_ecp_restart_ctx *rs_ctx,
+ unsigned ops );
+
+/* Utility macro for checking and updating ops budget */
+#define MBEDTLS_ECP_BUDGET( ops ) \
+ MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
+ (unsigned) (ops) ) );
+
+#else /* MBEDTLS_ECP_RESTARTABLE */
+
+#define MBEDTLS_ECP_BUDGET( ops ) /* no-op; for compatibility */
+
+/* We want to declare restartable versions of existing functions anyway */
+typedef void mbedtls_ecp_restart_ctx;
+
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
/**
* \name SECTION: Module settings
*
@@ -251,7 +323,7 @@ mbedtls_ecp_group;
* \note Members are deliberately in the same order as in the
* ::mbedtls_ecdsa_context structure.
*/
-typedef struct
+typedef struct mbedtls_ecp_keypair
{
mbedtls_ecp_group grp; /*!< Elliptic curve and base point */
mbedtls_mpi d; /*!< our secret value */
@@ -270,6 +342,75 @@ mbedtls_ecp_keypair;
*/
#define MBEDTLS_ECP_TLS_NAMED_CURVE 3 /**< The named_curve of ECCurveType. */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+/**
+ * \brief Set the maximum number of basic operations done in a row.
+ *
+ * If more operations are needed to complete a computation,
+ * #MBEDTLS_ERR_ECP_IN_PROGRESS will be returned by the
+ * function performing the computation. It is then the
+ * caller's responsibility to either call again with the same
+ * parameters until it returns 0 or an error code; or to free
+ * the restart context if the operation is to be aborted.
+ *
+ * It is strictly required that all input parameters and the
+ * restart context be the same on successive calls for the
+ * same operation, but output parameters need not be the
+ * same; they must not be used until the function finally
+ * returns 0.
+ *
+ * This only applies to functions whose documentation
+ * mentions they may return #MBEDTLS_ERR_ECP_IN_PROGRESS (or
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS for functions in the
+ * SSL module). For functions that accept a "restart context"
+ * argument, passing NULL disables restart and makes the
+ * function equivalent to the function with the same name
+ * with \c _restartable removed. For functions in the ECDH
+ * module, restart is disabled unless the function accepts
+ * an "ECDH context" argument and
+ * mbedtls_ecdh_enable_restart() was previously called on
+ * that context. For function in the SSL module, restart is
+ * only enabled for specific sides and key exchanges
+ * (currently only for clients and ECDHE-ECDSA).
+ *
+ * \param max_ops Maximum number of basic operations done in a row.
+ * Default: 0 (unlimited).
+ * Lower (non-zero) values mean ECC functions will block for
+ * a lesser maximum amount of time.
+ *
+ * \note A "basic operation" is defined as a rough equivalent of a
+ * multiplication in GF(p) for the NIST P-256 curve.
+ * As an indication, with default settings, a scalar
+ * multiplication (full run of \c mbedtls_ecp_mul()) is:
+ * - about 3300 basic operations for P-256
+ * - about 9400 basic operations for P-384
+ *
+ * \note Very low values are not always respected: sometimes
+ * functions need to block for a minimum number of
+ * operations, and will do so even if max_ops is set to a
+ * lower value. That minimum depends on the curve size, and
+ * can be made lower by decreasing the value of
+ * \c MBEDTLS_ECP_WINDOW_SIZE. As an indication, here is the
+ * lowest effective value for various curves and values of
+ * that parameter (w for short):
+ * w=6 w=5 w=4 w=3 w=2
+ * P-256 208 208 160 136 124
+ * P-384 682 416 320 272 248
+ * P-521 1364 832 640 544 496
+ *
+ * \note This setting is currently ignored by Curve25519.
+ */
+void mbedtls_ecp_set_max_ops( unsigned max_ops );
+
+/**
+ * \brief Check if restart is enabled (max_ops != 0)
+ *
+ * \return \c 0 if \c max_ops == 0 (restart disabled)
+ * \return \c 1 otherwise (restart enabled)
+ */
+int mbedtls_ecp_restart_is_enabled( void );
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
/**
* \brief This function retrieves the information defined in
* mbedtls_ecp_curve_info() for all supported curves in order
@@ -356,25 +497,51 @@ void mbedtls_ecp_point_free( mbedtls_ecp_point *pt );
/**
* \brief This function frees the components of an ECP group.
- * \param grp The group to free.
+ *
+ * \param grp The group to free. This may be \c NULL, in which
+ * case this function returns immediately. If it is not
+ * \c NULL, it must point to an initialized ECP group.
*/
void mbedtls_ecp_group_free( mbedtls_ecp_group *grp );
/**
* \brief This function frees the components of a key pair.
- * \param key The key pair to free.
+ *
+ * \param key The key pair to free. This may be \c NULL, in which
+ * case this function returns immediately. If it is not
+ * \c NULL, it must point to an initialized ECP key pair.
*/
void mbedtls_ecp_keypair_free( mbedtls_ecp_keypair *key );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+/**
+ * \brief Initialize a restart context.
+ *
+ * \param ctx The restart context to initialize. This must
+ * not be \c NULL.
+ */
+void mbedtls_ecp_restart_init( mbedtls_ecp_restart_ctx *ctx );
+
+/**
+ * \brief Free the components of a restart context.
+ *
+ * \param ctx The restart context to free. This may be \c NULL, in which
+ * case this function returns immediately. If it is not
+ * \c NULL, it must point to an initialized restart context.
+ */
+void mbedtls_ecp_restart_free( mbedtls_ecp_restart_ctx *ctx );
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
/**
* \brief This function copies the contents of point \p Q into
* point \p P.
*
- * \param P The destination point.
- * \param Q The source point.
+ * \param P The destination point. This must be initialized.
+ * \param Q The source point. This must be initialized.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
+ * \return Another negative error code for other kinds of failure.
*/
int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q );
@@ -382,31 +549,35 @@ int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q );
* \brief This function copies the contents of group \p src into
* group \p dst.
*
- * \param dst The destination group.
- * \param src The source group.
+ * \param dst The destination group. This must be initialized.
+ * \param src The source group. This must be initialized.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
+ * \return Another negative error code on other kinds of failure.
*/
-int mbedtls_ecp_group_copy( mbedtls_ecp_group *dst, const mbedtls_ecp_group *src );
+int mbedtls_ecp_group_copy( mbedtls_ecp_group *dst,
+ const mbedtls_ecp_group *src );
/**
- * \brief This function sets a point to zero.
+ * \brief This function sets a point to the point at infinity.
*
- * \param pt The point to set.
+ * \param pt The point to set. This must be initialized.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_ecp_set_zero( mbedtls_ecp_point *pt );
/**
- * \brief This function checks if a point is zero.
+ * \brief This function checks if a point is the point at infinity.
*
- * \param pt The point to test.
+ * \param pt The point to test. This must be initialized.
*
* \return \c 1 if the point is zero.
* \return \c 0 if the point is non-zero.
+ * \return A negative error code on failure.
*/
int mbedtls_ecp_is_zero( mbedtls_ecp_point *pt );
@@ -416,8 +587,8 @@ int mbedtls_ecp_is_zero( mbedtls_ecp_point *pt );
* \note This assumes that the points are normalized. Otherwise,
* they may compare as "not equal" even if they are.
*
- * \param P The first point to compare.
- * \param Q The second point to compare.
+ * \param P The first point to compare. This must be initialized.
+ * \param Q The second point to compare. This must be initialized.
*
* \return \c 0 if the points are equal.
* \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the points are not equal.
@@ -429,7 +600,7 @@ int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P,
* \brief This function imports a non-zero point from two ASCII
* strings.
*
- * \param P The destination point.
+ * \param P The destination point. This must be initialized.
* \param radix The numeric base of the input.
* \param x The first affine coordinate, as a null-terminated string.
* \param y The second affine coordinate, as a null-terminated string.
@@ -444,15 +615,21 @@ int mbedtls_ecp_point_read_string( mbedtls_ecp_point *P, int radix,
* \brief This function exports a point into unsigned binary data.
*
* \param grp The group to which the point should belong.
- * \param P The point to export.
- * \param format The point format. Should be an \c MBEDTLS_ECP_PF_XXX macro.
- * \param olen The length of the output.
- * \param buf The output buffer.
- * \param buflen The length of the output buffer.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param P The point to export. This must be initialized.
+ * \param format The point format. This must be either
+ * #MBEDTLS_ECP_PF_COMPRESSED or #MBEDTLS_ECP_PF_UNCOMPRESSED.
+ * \param olen The address at which to store the length of
+ * the output in Bytes. This must not be \c NULL.
+ * \param buf The output buffer. This must be a writable buffer
+ * of length \p buflen Bytes.
+ * \param buflen The length of the output buffer \p buf in Bytes.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA
- * or #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL on failure.
+ * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the output buffer
+ * is too small to hold the point.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *P,
int format, size_t *olen,
@@ -466,108 +643,158 @@ int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp, const mbedtls_
* for that.
*
* \param grp The group to which the point should belong.
- * \param P The point to import.
- * \param buf The input buffer.
- * \param ilen The length of the input.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param P The destination context to import the point to.
+ * This must be initialized.
+ * \param buf The input buffer. This must be a readable buffer
+ * of length \p ilen Bytes.
+ * \param ilen The length of the input buffer \p buf in Bytes.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid.
+ * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the input is invalid.
* \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
* \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the point format
* is not implemented.
- *
*/
-int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp, mbedtls_ecp_point *P,
- const unsigned char *buf, size_t ilen );
+int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp,
+ mbedtls_ecp_point *P,
+ const unsigned char *buf, size_t ilen );
/**
* \brief This function imports a point from a TLS ECPoint record.
*
- * \note On function return, \p buf is updated to point to immediately
+ * \note On function return, \p *buf is updated to point immediately
* after the ECPoint record.
*
- * \param grp The ECP group used.
+ * \param grp The ECP group to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
* \param pt The destination point.
* \param buf The address of the pointer to the start of the input buffer.
* \param len The length of the buffer.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_MPI_XXX error code on initialization failure.
+ * \return An \c MBEDTLS_ERR_MPI_XXX error code on initialization
+ * failure.
* \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid.
*/
-int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt,
- const unsigned char **buf, size_t len );
+int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp,
+ mbedtls_ecp_point *pt,
+ const unsigned char **buf, size_t len );
/**
- * \brief This function exports a point as a TLS ECPoint record.
- *
- * \param grp The ECP group used.
- * \param pt The point format to export to. The point format is an
- * \c MBEDTLS_ECP_PF_XXX constant.
- * \param format The export format.
- * \param olen The length of the data written.
- * \param buf The buffer to write to.
- * \param blen The length of the buffer.
+ * \brief This function exports a point as a TLS ECPoint record
+ * defined in RFC 4492, Section 5.4.
+ *
+ * \param grp The ECP group to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param pt The point to be exported. This must be initialized.
+ * \param format The point format to use. This must be either
+ * #MBEDTLS_ECP_PF_COMPRESSED or #MBEDTLS_ECP_PF_UNCOMPRESSED.
+ * \param olen The address at which to store the length in Bytes
+ * of the data written.
+ * \param buf The target buffer. This must be a writable buffer of
+ * length \p blen Bytes.
+ * \param blen The length of the target buffer \p buf in Bytes.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA or
- * #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL on failure.
+ * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the input is invalid.
+ * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the target buffer
+ * is too small to hold the exported point.
+ * \return Another negative error code on other kinds of failure.
*/
-int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt,
- int format, size_t *olen,
- unsigned char *buf, size_t blen );
+int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp,
+ const mbedtls_ecp_point *pt,
+ int format, size_t *olen,
+ unsigned char *buf, size_t blen );
/**
- * \brief This function sets a group using standardized domain parameters.
+ * \brief This function sets up an ECP group context
+ * from a standardized set of domain parameters.
*
* \note The index should be a value of the NamedCurve enum,
* as defined in <em>RFC-4492: Elliptic Curve Cryptography
* (ECC) Cipher Suites for Transport Layer Security (TLS)</em>,
* usually in the form of an \c MBEDTLS_ECP_DP_XXX macro.
*
- * \param grp The destination group.
+ * \param grp The group context to setup. This must be initialized.
* \param id The identifier of the domain parameter set to load.
*
- * \return \c 0 on success,
- * \return An \c MBEDTLS_ERR_MPI_XXX error code on initialization failure.
- * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE for unkownn groups.
-
+ * \return \c 0 on success.
+ * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if \p id doesn't
+ * correspond to a known group.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_ecp_group_load( mbedtls_ecp_group *grp, mbedtls_ecp_group_id id );
/**
- * \brief This function sets a group from a TLS ECParameters record.
+ * \brief This function sets up an ECP group context from a TLS
+ * ECParameters record as defined in RFC 4492, Section 5.4.
*
- * \note \p buf is updated to point right after the ECParameters record
- * on exit.
+ * \note The read pointer \p buf is updated to point right after
+ * the ECParameters record on exit.
*
- * \param grp The destination group.
+ * \param grp The group context to setup. This must be initialized.
* \param buf The address of the pointer to the start of the input buffer.
- * \param len The length of the buffer.
+ * \param len The length of the input buffer \c *buf in Bytes.
*
* \return \c 0 on success.
- * \return An \c MBEDTLS_ERR_MPI_XXX error code on initialization failure.
* \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid.
+ * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the group is not
+ * recognized.
+ * \return Another negative error code on other kinds of failure.
*/
-int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp, const unsigned char **buf, size_t len );
+int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp,
+ const unsigned char **buf, size_t len );
/**
- * \brief This function writes the TLS ECParameters record for a group.
+ * \brief This function extracts an elliptic curve group ID from a
+ * TLS ECParameters record as defined in RFC 4492, Section 5.4.
+ *
+ * \note The read pointer \p buf is updated to point right after
+ * the ECParameters record on exit.
+ *
+ * \param grp The address at which to store the group id.
+ * This must not be \c NULL.
+ * \param buf The address of the pointer to the start of the input buffer.
+ * \param len The length of the input buffer \c *buf in Bytes.
*
- * \param grp The ECP group used.
- * \param olen The number of Bytes written.
- * \param buf The buffer to write to.
- * \param blen The length of the buffer.
+ * \return \c 0 on success.
+ * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid.
+ * \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the group is not
+ * recognized.
+ * \return Another negative error code on other kinds of failure.
+ */
+int mbedtls_ecp_tls_read_group_id( mbedtls_ecp_group_id *grp,
+ const unsigned char **buf,
+ size_t len );
+/**
+ * \brief This function exports an elliptic curve as a TLS
+ * ECParameters record as defined in RFC 4492, Section 5.4.
+ *
+ * \param grp The ECP group to be exported.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param olen The address at which to store the number of Bytes written.
+ * This must not be \c NULL.
+ * \param buf The buffer to write to. This must be a writable buffer
+ * of length \p blen Bytes.
+ * \param blen The length of the output buffer \p buf in Bytes.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL on failure.
+ * \return #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the output
+ * buffer is too small to hold the exported group.
+ * \return Another negative error code on other kinds of failure.
*/
-int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp, size_t *olen,
- unsigned char *buf, size_t blen );
+int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp,
+ size_t *olen,
+ unsigned char *buf, size_t blen );
/**
- * \brief This function performs multiplication of a point by
- * an integer: \p R = \p m * \p P.
+ * \brief This function performs a scalar multiplication of a point
+ * by an integer: \p R = \p m * \p P.
*
* It is not thread-safe to use same group in multiple threads.
*
@@ -581,23 +808,63 @@ int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp, size_t *olen,
* targeting these results. We recommend always providing
* a non-NULL \p f_rng. The overhead is negligible.
*
- * \param grp The ECP group.
- * \param R The destination point.
- * \param m The integer by which to multiply.
- * \param P The point to multiply.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param grp The ECP group to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param R The point in which to store the result of the calculation.
+ * This must be initialized.
+ * \param m The integer by which to multiply. This must be initialized.
+ * \param P The point to multiply. This must be initialized.
+ * \param f_rng The RNG function. This may be \c NULL if randomization
+ * of intermediate results isn't desired (discouraged).
+ * \param p_rng The RNG context to be passed to \p p_rng.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m is not a valid private
* key, or \p P is not a valid public key.
* \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
const mbedtls_mpi *m, const mbedtls_ecp_point *P,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
/**
+ * \brief This function performs multiplication of a point by
+ * an integer: \p R = \p m * \p P in a restartable way.
+ *
+ * \see mbedtls_ecp_mul()
+ *
+ * \note This function does the same as \c mbedtls_ecp_mul(), but
+ * it can return early and restart according to the limit set
+ * with \c mbedtls_ecp_set_max_ops() to reduce blocking.
+ *
+ * \param grp The ECP group to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param R The point in which to store the result of the calculation.
+ * This must be initialized.
+ * \param m The integer by which to multiply. This must be initialized.
+ * \param P The point to multiply. This must be initialized.
+ * \param f_rng The RNG function. This may be \c NULL if randomization
+ * of intermediate results isn't desired (discouraged).
+ * \param p_rng The RNG context to be passed to \p p_rng.
+ * \param rs_ctx The restart context (NULL disables restart).
+ *
+ * \return \c 0 on success.
+ * \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m is not a valid private
+ * key, or \p P is not a valid public key.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ * \return Another negative error code on other kinds of failure.
+ */
+int mbedtls_ecp_mul_restartable( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
+ const mbedtls_mpi *m, const mbedtls_ecp_point *P,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ mbedtls_ecp_restart_ctx *rs_ctx );
+
+/**
* \brief This function performs multiplication and addition of two
* points by integers: \p R = \p m * \p P + \p n * \p Q
*
@@ -606,24 +873,71 @@ int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
* \note In contrast to mbedtls_ecp_mul(), this function does not
* guarantee a constant execution flow and timing.
*
- * \param grp The ECP group.
- * \param R The destination point.
+ * \param grp The ECP group to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param R The point in which to store the result of the calculation.
+ * This must be initialized.
* \param m The integer by which to multiply \p P.
- * \param P The point to multiply by \p m.
+ * This must be initialized.
+ * \param P The point to multiply by \p m. This must be initialized.
* \param n The integer by which to multiply \p Q.
+ * This must be initialized.
* \param Q The point to be multiplied by \p n.
+ * This must be initialized.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m or \p n are not
* valid private keys, or \p P or \p Q are not valid public
* keys.
* \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
+ * \return Another negative error code on other kinds of failure.
*/
int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
const mbedtls_mpi *m, const mbedtls_ecp_point *P,
const mbedtls_mpi *n, const mbedtls_ecp_point *Q );
/**
+ * \brief This function performs multiplication and addition of two
+ * points by integers: \p R = \p m * \p P + \p n * \p Q in a
+ * restartable way.
+ *
+ * \see \c mbedtls_ecp_muladd()
+ *
+ * \note This function works the same as \c mbedtls_ecp_muladd(),
+ * but it can return early and restart according to the limit
+ * set with \c mbedtls_ecp_set_max_ops() to reduce blocking.
+ *
+ * \param grp The ECP group to use.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param R The point in which to store the result of the calculation.
+ * This must be initialized.
+ * \param m The integer by which to multiply \p P.
+ * This must be initialized.
+ * \param P The point to multiply by \p m. This must be initialized.
+ * \param n The integer by which to multiply \p Q.
+ * This must be initialized.
+ * \param Q The point to be multiplied by \p n.
+ * This must be initialized.
+ * \param rs_ctx The restart context (NULL disables restart).
+ *
+ * \return \c 0 on success.
+ * \return #MBEDTLS_ERR_ECP_INVALID_KEY if \p m or \p n are not
+ * valid private keys, or \p P or \p Q are not valid public
+ * keys.
+ * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure.
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ * \return Another negative error code on other kinds of failure.
+ */
+int mbedtls_ecp_muladd_restartable(
+ mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
+ const mbedtls_mpi *m, const mbedtls_ecp_point *P,
+ const mbedtls_mpi *n, const mbedtls_ecp_point *Q,
+ mbedtls_ecp_restart_ctx *rs_ctx );
+
+/**
* \brief This function checks that a point is a valid public key
* on this curve.
*
@@ -640,30 +954,60 @@ int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
* structures, such as ::mbedtls_ecdh_context or
* ::mbedtls_ecdsa_context.
*
- * \param grp The curve the point should lie on.
- * \param pt The point to check.
+ * \param grp The ECP group the point should belong to.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param pt The point to check. This must be initialized.
*
* \return \c 0 if the point is a valid public key.
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY on failure.
+ * \return #MBEDTLS_ERR_ECP_INVALID_KEY if the point is not
+ * a valid public key for the given curve.
+ * \return Another negative error code on other kinds of failure.
*/
-int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt );
+int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp,
+ const mbedtls_ecp_point *pt );
/**
- * \brief This function checks that an \p mbedtls_mpi is a valid private
- * key for this curve.
+ * \brief This function checks that an \p mbedtls_mpi is a
+ * valid private key for this curve.
*
* \note This function uses bare components rather than an
* ::mbedtls_ecp_keypair structure to ease use with other
* structures, such as ::mbedtls_ecdh_context or
* ::mbedtls_ecdsa_context.
*
- * \param grp The group used.
- * \param d The integer to check.
+ * \param grp The ECP group the private key should belong to.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param d The integer to check. This must be initialized.
*
* \return \c 0 if the point is a valid private key.
- * \return #MBEDTLS_ERR_ECP_INVALID_KEY on failure.
+ * \return #MBEDTLS_ERR_ECP_INVALID_KEY if the point is not a valid
+ * private key for the given curve.
+ * \return Another negative error code on other kinds of failure.
+ */
+int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp,
+ const mbedtls_mpi *d );
+
+/**
+ * \brief This function generates a private key.
+ *
+ * \param grp The ECP group to generate a private key for.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param d The destination MPI (secret part). This must be initialized.
+ * \param f_rng The RNG function. This must not be \c NULL.
+ * \param p_rng The RNG parameter to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng doesn't need a context argument.
+ *
+ * \return \c 0 on success.
+ * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
+ * on failure.
*/
-int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, const mbedtls_mpi *d );
+int mbedtls_ecp_gen_privkey( const mbedtls_ecp_group *grp,
+ mbedtls_mpi *d,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng );
/**
* \brief This function generates a keypair with a configurable base
@@ -674,22 +1018,29 @@ int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, const mbedtls_mpi *
* structures, such as ::mbedtls_ecdh_context or
* ::mbedtls_ecdsa_context.
*
- * \param grp The ECP group.
- * \param G The chosen base point.
+ * \param grp The ECP group to generate a key pair for.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
+ * \param G The base point to use. This must be initialized
+ * and belong to \p grp. It replaces the default base
+ * point \c grp->G used by mbedtls_ecp_gen_keypair().
* \param d The destination MPI (secret part).
+ * This must be initialized.
* \param Q The destination point (public part).
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * This must be initialized.
+ * \param f_rng The RNG function. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may
+ * be \c NULL if \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
* on failure.
*/
int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp,
- const mbedtls_ecp_point *G,
- mbedtls_mpi *d, mbedtls_ecp_point *Q,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng );
+ const mbedtls_ecp_point *G,
+ mbedtls_mpi *d, mbedtls_ecp_point *Q,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng );
/**
* \brief This function generates an ECP keypair.
@@ -699,34 +1050,42 @@ int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp,
* structures, such as ::mbedtls_ecdh_context or
* ::mbedtls_ecdsa_context.
*
- * \param grp The ECP group.
+ * \param grp The ECP group to generate a key pair for.
+ * This must be initialized and have group parameters
+ * set, for example through mbedtls_ecp_group_load().
* \param d The destination MPI (secret part).
+ * This must be initialized.
* \param Q The destination point (public part).
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * This must be initialized.
+ * \param f_rng The RNG function. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may
+ * be \c NULL if \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
* on failure.
*/
-int mbedtls_ecp_gen_keypair( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng );
+int mbedtls_ecp_gen_keypair( mbedtls_ecp_group *grp, mbedtls_mpi *d,
+ mbedtls_ecp_point *Q,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng );
/**
* \brief This function generates an ECP key.
*
* \param grp_id The ECP group identifier.
- * \param key The destination key.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param key The destination key. This must be initialized.
+ * \param f_rng The RNG function to use. This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may
+ * be \c NULL if \p f_rng doesn't need a context argument.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code
* on failure.
*/
int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key,
- int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng );
/**
* \brief This function checks that the keypair objects
@@ -734,16 +1093,19 @@ int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key,
* same public point, and that the private key in
* \p prv is consistent with the public key.
*
- * \param pub The keypair structure holding the public key.
- * If it contains a private key, that part is ignored.
+ * \param pub The keypair structure holding the public key. This
+ * must be initialized. If it contains a private key, that
+ * part is ignored.
* \param prv The keypair structure holding the full keypair.
+ * This must be initialized.
*
* \return \c 0 on success, meaning that the keys are valid and match.
* \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the keys are invalid or do not match.
* \return An \c MBEDTLS_ERR_ECP_XXX or an \c MBEDTLS_ERR_MPI_XXX
* error code on calculation failure.
*/
-int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub, const mbedtls_ecp_keypair *prv );
+int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub,
+ const mbedtls_ecp_keypair *prv );
#if defined(MBEDTLS_SELF_TEST)
diff --git a/thirdparty/mbedtls/include/mbedtls/entropy.h b/thirdparty/mbedtls/include/mbedtls/entropy.h
index a5cb05a584..ca06dc3c58 100644
--- a/thirdparty/mbedtls/include/mbedtls/entropy.h
+++ b/thirdparty/mbedtls/include/mbedtls/entropy.h
@@ -107,7 +107,7 @@ typedef int (*mbedtls_entropy_f_source_ptr)(void *data, unsigned char *output, s
/**
* \brief Entropy source state
*/
-typedef struct
+typedef struct mbedtls_entropy_source_state
{
mbedtls_entropy_f_source_ptr f_source; /**< The entropy source callback */
void * p_source; /**< The callback data pointer */
@@ -120,7 +120,7 @@ mbedtls_entropy_source_state;
/**
* \brief Entropy context structure
*/
-typedef struct
+typedef struct mbedtls_entropy_context
{
int accumulator_started;
#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR)
diff --git a/thirdparty/mbedtls/include/mbedtls/error.h b/thirdparty/mbedtls/include/mbedtls/error.h
index 6b82d4fbbe..647a11a566 100644
--- a/thirdparty/mbedtls/include/mbedtls/error.h
+++ b/thirdparty/mbedtls/include/mbedtls/error.h
@@ -74,12 +74,13 @@
* MD4 1 0x002D-0x002D
* MD5 1 0x002F-0x002F
* RIPEMD160 1 0x0031-0x0031
- * SHA1 1 0x0035-0x0035
- * SHA256 1 0x0037-0x0037
- * SHA512 1 0x0039-0x0039
+ * SHA1 1 0x0035-0x0035 0x0073-0x0073
+ * SHA256 1 0x0037-0x0037 0x0074-0x0074
+ * SHA512 1 0x0039-0x0039 0x0075-0x0075
* CHACHA20 3 0x0051-0x0055
* POLY1305 3 0x0057-0x005B
* CHACHAPOLY 2 0x0054-0x0056
+ * PLATFORM 1 0x0070-0x0072
*
* High-level module nr (3 bits - 0x0...-0x7...)
* Name ID Nr of Errors
@@ -90,12 +91,12 @@
* DHM 3 11
* PK 3 15 (Started from top)
* RSA 4 11
- * ECP 4 9 (Started from top)
+ * ECP 4 10 (Started from top)
* MD 5 5
* HKDF 5 1 (Started from top)
* CIPHER 6 8
- * SSL 6 22 (Started from top)
- * SSL 7 31
+ * SSL 6 23 (Started from top)
+ * SSL 7 32
*
* Module dependent error code (5 bits 0x.00.-0x.F8.)
*/
diff --git a/thirdparty/mbedtls/include/mbedtls/gcm.h b/thirdparty/mbedtls/include/mbedtls/gcm.h
index 87535ab957..fccabb0d97 100644
--- a/thirdparty/mbedtls/include/mbedtls/gcm.h
+++ b/thirdparty/mbedtls/include/mbedtls/gcm.h
@@ -41,7 +41,10 @@
#define MBEDTLS_GCM_DECRYPT 0
#define MBEDTLS_ERR_GCM_AUTH_FAILED -0x0012 /**< Authenticated decryption failed. */
+
+/* MBEDTLS_ERR_GCM_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_GCM_HW_ACCEL_FAILED -0x0013 /**< GCM hardware accelerator failed. */
+
#define MBEDTLS_ERR_GCM_BAD_INPUT -0x0014 /**< Bad input parameters to function. */
#ifdef __cplusplus
@@ -53,7 +56,8 @@ extern "C" {
/**
* \brief The GCM context structure.
*/
-typedef struct {
+typedef struct mbedtls_gcm_context
+{
mbedtls_cipher_context_t cipher_ctx; /*!< The cipher context used. */
uint64_t HL[16]; /*!< Precalculated HTable low. */
uint64_t HH[16]; /*!< Precalculated HTable high. */
@@ -81,7 +85,7 @@ mbedtls_gcm_context;
* cipher, nor set the key. For this purpose, use
* mbedtls_gcm_setkey().
*
- * \param ctx The GCM context to initialize.
+ * \param ctx The GCM context to initialize. This must not be \c NULL.
*/
void mbedtls_gcm_init( mbedtls_gcm_context *ctx );
@@ -89,9 +93,10 @@ void mbedtls_gcm_init( mbedtls_gcm_context *ctx );
* \brief This function associates a GCM context with a
* cipher algorithm and a key.
*
- * \param ctx The GCM context to initialize.
+ * \param ctx The GCM context. This must be initialized.
* \param cipher The 128-bit block cipher to use.
- * \param key The encryption key.
+ * \param key The encryption key. This must be a readable buffer of at
+ * least \p keybits bits.
* \param keybits The key size in bits. Valid options are:
* <ul><li>128 bits</li>
* <li>192 bits</li>
@@ -118,7 +123,8 @@ int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx,
* authentic. You should use this function to perform encryption
* only. For decryption, use mbedtls_gcm_auth_decrypt() instead.
*
- * \param ctx The GCM context to use for encryption or decryption.
+ * \param ctx The GCM context to use for encryption or decryption. This
+ * must be initialized.
* \param mode The operation to perform:
* - #MBEDTLS_GCM_ENCRYPT to perform authenticated encryption.
* The ciphertext is written to \p output and the
@@ -132,22 +138,28 @@ int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx,
* calling this function in decryption mode.
* \param length The length of the input data, which is equal to the length
* of the output data.
- * \param iv The initialization vector.
+ * \param iv The initialization vector. This must be a readable buffer of
+ * at least \p iv_len Bytes.
* \param iv_len The length of the IV.
- * \param add The buffer holding the additional data.
+ * \param add The buffer holding the additional data. This must be of at
+ * least that size in Bytes.
* \param add_len The length of the additional data.
- * \param input The buffer holding the input data. Its size is \b length.
- * \param output The buffer for holding the output data. It must have room
- * for \b length bytes.
+ * \param input The buffer holding the input data. If \p length is greater
+ * than zero, this must be a readable buffer of at least that
+ * size in Bytes.
+ * \param output The buffer for holding the output data. If \p length is greater
+ * than zero, this must be a writable buffer of at least that
+ * size in Bytes.
* \param tag_len The length of the tag to generate.
- * \param tag The buffer for holding the tag.
+ * \param tag The buffer for holding the tag. This must be a readable
+ * buffer of at least \p tag_len Bytes.
*
* \return \c 0 if the encryption or decryption was performed
* successfully. Note that in #MBEDTLS_GCM_DECRYPT mode,
* this does not indicate that the data is authentic.
- * \return #MBEDTLS_ERR_GCM_BAD_INPUT if the lengths are not valid.
- * \return #MBEDTLS_ERR_GCM_HW_ACCEL_FAILED or a cipher-specific
- * error code if the encryption or decryption failed.
+ * \return #MBEDTLS_ERR_GCM_BAD_INPUT if the lengths or pointers are
+ * not valid or a cipher-specific error code if the encryption
+ * or decryption failed.
*/
int mbedtls_gcm_crypt_and_tag( mbedtls_gcm_context *ctx,
int mode,
@@ -169,24 +181,30 @@ int mbedtls_gcm_crypt_and_tag( mbedtls_gcm_context *ctx,
* input buffer. If the buffers overlap, the output buffer
* must trail at least 8 Bytes behind the input buffer.
*
- * \param ctx The GCM context.
+ * \param ctx The GCM context. This must be initialized.
* \param length The length of the ciphertext to decrypt, which is also
* the length of the decrypted plaintext.
- * \param iv The initialization vector.
+ * \param iv The initialization vector. This must be a readable buffer
+ * of at least \p iv_len Bytes.
* \param iv_len The length of the IV.
- * \param add The buffer holding the additional data.
+ * \param add The buffer holding the additional data. This must be of at
+ * least that size in Bytes.
* \param add_len The length of the additional data.
- * \param tag The buffer holding the tag to verify.
+ * \param tag The buffer holding the tag to verify. This must be a
+ * readable buffer of at least \p tag_len Bytes.
* \param tag_len The length of the tag to verify.
- * \param input The buffer holding the ciphertext. Its size is \b length.
- * \param output The buffer for holding the decrypted plaintext. It must
- * have room for \b length bytes.
+ * \param input The buffer holding the ciphertext. If \p length is greater
+ * than zero, this must be a readable buffer of at least that
+ * size.
+ * \param output The buffer for holding the decrypted plaintext. If \p length
+ * is greater than zero, this must be a writable buffer of at
+ * least that size.
*
* \return \c 0 if successful and authenticated.
* \return #MBEDTLS_ERR_GCM_AUTH_FAILED if the tag does not match.
- * \return #MBEDTLS_ERR_GCM_BAD_INPUT if the lengths are not valid.
- * \return #MBEDTLS_ERR_GCM_HW_ACCEL_FAILED or a cipher-specific
- * error code if the decryption failed.
+ * \return #MBEDTLS_ERR_GCM_BAD_INPUT if the lengths or pointers are
+ * not valid or a cipher-specific error code if the decryption
+ * failed.
*/
int mbedtls_gcm_auth_decrypt( mbedtls_gcm_context *ctx,
size_t length,
@@ -203,15 +221,16 @@ int mbedtls_gcm_auth_decrypt( mbedtls_gcm_context *ctx,
* \brief This function starts a GCM encryption or decryption
* operation.
*
- * \param ctx The GCM context.
+ * \param ctx The GCM context. This must be initialized.
* \param mode The operation to perform: #MBEDTLS_GCM_ENCRYPT or
* #MBEDTLS_GCM_DECRYPT.
- * \param iv The initialization vector.
+ * \param iv The initialization vector. This must be a readable buffer of
+ * at least \p iv_len Bytes.
* \param iv_len The length of the IV.
- * \param add The buffer holding the additional data, or NULL
- * if \p add_len is 0.
- * \param add_len The length of the additional data. If 0,
- * \p add is NULL.
+ * \param add The buffer holding the additional data, or \c NULL
+ * if \p add_len is \c 0.
+ * \param add_len The length of the additional data. If \c 0,
+ * \p add may be \c NULL.
*
* \return \c 0 on success.
*/
@@ -234,11 +253,15 @@ int mbedtls_gcm_starts( mbedtls_gcm_context *ctx,
* input buffer. If the buffers overlap, the output buffer
* must trail at least 8 Bytes behind the input buffer.
*
- * \param ctx The GCM context.
+ * \param ctx The GCM context. This must be initialized.
* \param length The length of the input data. This must be a multiple of
* 16 except in the last call before mbedtls_gcm_finish().
- * \param input The buffer holding the input data.
- * \param output The buffer for holding the output data.
+ * \param input The buffer holding the input data. If \p length is greater
+ * than zero, this must be a readable buffer of at least that
+ * size in Bytes.
+ * \param output The buffer for holding the output data. If \p length is
+ * greater than zero, this must be a writable buffer of at
+ * least that size in Bytes.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_GCM_BAD_INPUT on failure.
@@ -255,9 +278,11 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
* It wraps up the GCM stream, and generates the
* tag. The tag can have a maximum length of 16 Bytes.
*
- * \param ctx The GCM context.
- * \param tag The buffer for holding the tag.
- * \param tag_len The length of the tag to generate. Must be at least four.
+ * \param ctx The GCM context. This must be initialized.
+ * \param tag The buffer for holding the tag. This must be a readable
+ * buffer of at least \p tag_len Bytes.
+ * \param tag_len The length of the tag to generate. This must be at least
+ * four.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_GCM_BAD_INPUT on failure.
@@ -270,7 +295,8 @@ int mbedtls_gcm_finish( mbedtls_gcm_context *ctx,
* \brief This function clears a GCM context and the underlying
* cipher sub-context.
*
- * \param ctx The GCM context to clear.
+ * \param ctx The GCM context to clear. If this is \c NULL, the call has
+ * no effect. Otherwise, this must be initialized.
*/
void mbedtls_gcm_free( mbedtls_gcm_context *ctx );
diff --git a/thirdparty/mbedtls/include/mbedtls/havege.h b/thirdparty/mbedtls/include/mbedtls/havege.h
index d4cb3ed38d..57e8c40943 100644
--- a/thirdparty/mbedtls/include/mbedtls/havege.h
+++ b/thirdparty/mbedtls/include/mbedtls/havege.h
@@ -35,7 +35,7 @@ extern "C" {
/**
* \brief HAVEGE state structure
*/
-typedef struct
+typedef struct mbedtls_havege_state
{
int PT1, PT2, offset[2];
int pool[MBEDTLS_HAVEGE_COLLECT_SIZE];
diff --git a/thirdparty/mbedtls/include/mbedtls/hkdf.h b/thirdparty/mbedtls/include/mbedtls/hkdf.h
index 6833e7272e..e6ed7cde97 100644
--- a/thirdparty/mbedtls/include/mbedtls/hkdf.h
+++ b/thirdparty/mbedtls/include/mbedtls/hkdf.h
@@ -73,6 +73,11 @@ int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt,
* \brief Take the input keying material \p ikm and extract from it a
* fixed-length pseudorandom key \p prk.
*
+ * \warning This function should only be used if the security of it has been
+ * studied and established in that particular context (eg. TLS 1.3
+ * key schedule). For standard HKDF security guarantees use
+ * \c mbedtls_hkdf instead.
+ *
* \param md A hash function; md.size denotes the length of the
* hash function output in bytes.
* \param salt An optional salt value (a non-secret random value);
@@ -97,10 +102,15 @@ int mbedtls_hkdf_extract( const mbedtls_md_info_t *md,
* \brief Expand the supplied \p prk into several additional pseudorandom
* keys, which is the output of the HKDF.
*
+ * \warning This function should only be used if the security of it has been
+ * studied and established in that particular context (eg. TLS 1.3
+ * key schedule). For standard HKDF security guarantees use
+ * \c mbedtls_hkdf instead.
+ *
* \param md A hash function; md.size denotes the length of the hash
* function output in bytes.
- * \param prk A pseudorandom key of at least md.size bytes. \p prk is usually,
- * the output from the HKDF extract step.
+ * \param prk A pseudorandom key of at least md.size bytes. \p prk is
+ * usually the output from the HKDF extract step.
* \param prk_len The length in bytes of \p prk.
* \param info An optional context and application specific information
* string. This can be a zero-length string.
diff --git a/thirdparty/mbedtls/include/mbedtls/hmac_drbg.h b/thirdparty/mbedtls/include/mbedtls/hmac_drbg.h
index 2608de8595..146367b9de 100644
--- a/thirdparty/mbedtls/include/mbedtls/hmac_drbg.h
+++ b/thirdparty/mbedtls/include/mbedtls/hmac_drbg.h
@@ -74,7 +74,7 @@ extern "C" {
/**
* HMAC_DRBG context.
*/
-typedef struct
+typedef struct mbedtls_hmac_drbg_context
{
/* Working state: the key K is not stored explicitely,
* but is implied by the HMAC context */
@@ -195,10 +195,13 @@ void mbedtls_hmac_drbg_set_reseed_interval( mbedtls_hmac_drbg_context *ctx,
* \param additional Additional data to update state with, or NULL
* \param add_len Length of additional data, or 0
*
+ * \return \c 0 on success, or an error from the underlying
+ * hash calculation.
+ *
* \note Additional data is optional, pass NULL and 0 as second
* third argument if no additional data is being used.
*/
-void mbedtls_hmac_drbg_update( mbedtls_hmac_drbg_context *ctx,
+int mbedtls_hmac_drbg_update_ret( mbedtls_hmac_drbg_context *ctx,
const unsigned char *additional, size_t add_len );
/**
@@ -257,6 +260,31 @@ int mbedtls_hmac_drbg_random( void *p_rng, unsigned char *output, size_t out_len
*/
void mbedtls_hmac_drbg_free( mbedtls_hmac_drbg_context *ctx );
+#if ! defined(MBEDTLS_DEPRECATED_REMOVED)
+#if defined(MBEDTLS_DEPRECATED_WARNING)
+#define MBEDTLS_DEPRECATED __attribute__((deprecated))
+#else
+#define MBEDTLS_DEPRECATED
+#endif
+/**
+ * \brief HMAC_DRBG update state
+ *
+ * \deprecated Superseded by mbedtls_hmac_drbg_update_ret()
+ * in 2.16.0.
+ *
+ * \param ctx HMAC_DRBG context
+ * \param additional Additional data to update state with, or NULL
+ * \param add_len Length of additional data, or 0
+ *
+ * \note Additional data is optional, pass NULL and 0 as second
+ * third argument if no additional data is being used.
+ */
+MBEDTLS_DEPRECATED void mbedtls_hmac_drbg_update(
+ mbedtls_hmac_drbg_context *ctx,
+ const unsigned char *additional, size_t add_len );
+#undef MBEDTLS_DEPRECATED
+#endif /* !MBEDTLS_DEPRECATED_REMOVED */
+
#if defined(MBEDTLS_FS_IO)
/**
* \brief Write a seed file
diff --git a/thirdparty/mbedtls/include/mbedtls/md.h b/thirdparty/mbedtls/include/mbedtls/md.h
index 6b6f5c53dd..8bcf766a6c 100644
--- a/thirdparty/mbedtls/include/mbedtls/md.h
+++ b/thirdparty/mbedtls/include/mbedtls/md.h
@@ -39,6 +39,8 @@
#define MBEDTLS_ERR_MD_BAD_INPUT_DATA -0x5100 /**< Bad input parameters to function. */
#define MBEDTLS_ERR_MD_ALLOC_FAILED -0x5180 /**< Failed to allocate memory. */
#define MBEDTLS_ERR_MD_FILE_IO_ERROR -0x5200 /**< Opening or reading of file failed. */
+
+/* MBEDTLS_ERR_MD_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_MD_HW_ACCEL_FAILED -0x5280 /**< MD hardware accelerator failed. */
#ifdef __cplusplus
@@ -80,7 +82,8 @@ typedef struct mbedtls_md_info_t mbedtls_md_info_t;
/**
* The generic message-digest context.
*/
-typedef struct {
+typedef struct mbedtls_md_context_t
+{
/** Information about the associated message digest. */
const mbedtls_md_info_t *md_info;
diff --git a/thirdparty/mbedtls/include/mbedtls/md2.h b/thirdparty/mbedtls/include/mbedtls/md2.h
index 08e75b247b..f9bd98f804 100644
--- a/thirdparty/mbedtls/include/mbedtls/md2.h
+++ b/thirdparty/mbedtls/include/mbedtls/md2.h
@@ -37,6 +37,7 @@
#include <stddef.h>
+/* MBEDTLS_ERR_MD2_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_MD2_HW_ACCEL_FAILED -0x002B /**< MD2 hardware accelerator failed */
#ifdef __cplusplus
@@ -55,7 +56,7 @@ extern "C" {
* stronger message digests instead.
*
*/
-typedef struct
+typedef struct mbedtls_md2_context
{
unsigned char cksum[16]; /*!< checksum of the data block */
unsigned char state[48]; /*!< intermediate digest state */
diff --git a/thirdparty/mbedtls/include/mbedtls/md4.h b/thirdparty/mbedtls/include/mbedtls/md4.h
index 8ee4e5cabf..dc3c048949 100644
--- a/thirdparty/mbedtls/include/mbedtls/md4.h
+++ b/thirdparty/mbedtls/include/mbedtls/md4.h
@@ -38,6 +38,7 @@
#include <stddef.h>
#include <stdint.h>
+/* MBEDTLS_ERR_MD4_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_MD4_HW_ACCEL_FAILED -0x002D /**< MD4 hardware accelerator failed */
#ifdef __cplusplus
@@ -56,7 +57,7 @@ extern "C" {
* stronger message digests instead.
*
*/
-typedef struct
+typedef struct mbedtls_md4_context
{
uint32_t total[2]; /*!< number of bytes processed */
uint32_t state[4]; /*!< intermediate digest state */
diff --git a/thirdparty/mbedtls/include/mbedtls/md5.h b/thirdparty/mbedtls/include/mbedtls/md5.h
index 43ead4b747..6c3354fd30 100644
--- a/thirdparty/mbedtls/include/mbedtls/md5.h
+++ b/thirdparty/mbedtls/include/mbedtls/md5.h
@@ -37,6 +37,7 @@
#include <stddef.h>
#include <stdint.h>
+/* MBEDTLS_ERR_MD5_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_MD5_HW_ACCEL_FAILED -0x002F /**< MD5 hardware accelerator failed */
#ifdef __cplusplus
@@ -55,7 +56,7 @@ extern "C" {
* stronger message digests instead.
*
*/
-typedef struct
+typedef struct mbedtls_md5_context
{
uint32_t total[2]; /*!< number of bytes processed */
uint32_t state[4]; /*!< intermediate digest state */
diff --git a/thirdparty/mbedtls/include/mbedtls/net_sockets.h b/thirdparty/mbedtls/include/mbedtls/net_sockets.h
index 9f07eeb4d3..4c7ef00fe6 100644
--- a/thirdparty/mbedtls/include/mbedtls/net_sockets.h
+++ b/thirdparty/mbedtls/include/mbedtls/net_sockets.h
@@ -84,7 +84,7 @@ extern "C" {
* (eg two file descriptors for combined IPv4 + IPv6 support, or additional
* structures for hand-made UDP demultiplexing).
*/
-typedef struct
+typedef struct mbedtls_net_context
{
int fd; /**< The underlying file descriptor */
}
diff --git a/thirdparty/mbedtls/include/mbedtls/oid.h b/thirdparty/mbedtls/include/mbedtls/oid.h
index f82554844c..6fbd018aaa 100644
--- a/thirdparty/mbedtls/include/mbedtls/oid.h
+++ b/thirdparty/mbedtls/include/mbedtls/oid.h
@@ -403,7 +403,8 @@ extern "C" {
/**
* \brief Base OID descriptor structure
*/
-typedef struct {
+typedef struct mbedtls_oid_descriptor_t
+{
const char *asn1; /*!< OID ASN.1 representation */
size_t asn1_len; /*!< length of asn1 */
const char *name; /*!< official name (e.g. from RFC) */
diff --git a/thirdparty/mbedtls/include/mbedtls/padlock.h b/thirdparty/mbedtls/include/mbedtls/padlock.h
index 677936ebf8..7a5d083a95 100644
--- a/thirdparty/mbedtls/include/mbedtls/padlock.h
+++ b/thirdparty/mbedtls/include/mbedtls/padlock.h
@@ -3,6 +3,9 @@
*
* \brief VIA PadLock ACE for HW encryption/decryption supported by some
* processors
+ *
+ * \warning These functions are only for internal use by other library
+ * functions; you must not call them directly.
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
@@ -57,7 +60,10 @@ extern "C" {
#endif
/**
- * \brief PadLock detection routine
+ * \brief Internal PadLock detection routine
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param feature The feature to detect
*
@@ -66,7 +72,10 @@ extern "C" {
int mbedtls_padlock_has_support( int feature );
/**
- * \brief PadLock AES-ECB block en(de)cryption
+ * \brief Internal PadLock AES-ECB block en(de)cryption
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param ctx AES context
* \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
@@ -76,12 +85,15 @@ int mbedtls_padlock_has_support( int feature );
* \return 0 if success, 1 if operation failed
*/
int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx,
- int mode,
- const unsigned char input[16],
- unsigned char output[16] );
+ int mode,
+ const unsigned char input[16],
+ unsigned char output[16] );
/**
- * \brief PadLock AES-CBC buffer en(de)cryption
+ * \brief Internal PadLock AES-CBC buffer en(de)cryption
+ *
+ * \note This function is only for internal use by other library
+ * functions; you must not call it directly.
*
* \param ctx AES context
* \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
@@ -93,11 +105,11 @@ int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx,
* \return 0 if success, 1 if operation failed
*/
int mbedtls_padlock_xcryptcbc( mbedtls_aes_context *ctx,
- int mode,
- size_t length,
- unsigned char iv[16],
- const unsigned char *input,
- unsigned char *output );
+ int mode,
+ size_t length,
+ unsigned char iv[16],
+ const unsigned char *input,
+ unsigned char *output );
#ifdef __cplusplus
}
diff --git a/thirdparty/mbedtls/include/mbedtls/pem.h b/thirdparty/mbedtls/include/mbedtls/pem.h
index 2cf4c0a709..fa82f7bdbd 100644
--- a/thirdparty/mbedtls/include/mbedtls/pem.h
+++ b/thirdparty/mbedtls/include/mbedtls/pem.h
@@ -51,7 +51,7 @@ extern "C" {
/**
* \brief PEM context structure
*/
-typedef struct
+typedef struct mbedtls_pem_context
{
unsigned char *buf; /*!< buffer for decoded data */
size_t buflen; /*!< length of the buffer */
diff --git a/thirdparty/mbedtls/include/mbedtls/pk.h b/thirdparty/mbedtls/include/mbedtls/pk.h
index ee06b2fd20..91950f9407 100644
--- a/thirdparty/mbedtls/include/mbedtls/pk.h
+++ b/thirdparty/mbedtls/include/mbedtls/pk.h
@@ -64,6 +64,8 @@
#define MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -0x3A00 /**< Elliptic curve is unsupported (only NIST curves are supported). */
#define MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE -0x3980 /**< Unavailable feature, e.g. RSA disabled for RSA key. */
#define MBEDTLS_ERR_PK_SIG_LEN_MISMATCH -0x3900 /**< The buffer contains a valid signature followed by more data. */
+
+/* MBEDTLS_ERR_PK_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_PK_HW_ACCEL_FAILED -0x3880 /**< PK hardware accelerator failed. */
#ifdef __cplusplus
@@ -87,7 +89,7 @@ typedef enum {
* \brief Options for RSASSA-PSS signature verification.
* See \c mbedtls_rsa_rsassa_pss_verify_ext()
*/
-typedef struct
+typedef struct mbedtls_pk_rsassa_pss_options
{
mbedtls_md_type_t mgf1_hash_id;
int expected_salt_len;
@@ -107,7 +109,7 @@ typedef enum
/**
* \brief Item to send to the debug module
*/
-typedef struct
+typedef struct mbedtls_pk_debug_item
{
mbedtls_pk_debug_type type;
const char *name;
@@ -125,12 +127,26 @@ typedef struct mbedtls_pk_info_t mbedtls_pk_info_t;
/**
* \brief Public key container
*/
-typedef struct
+typedef struct mbedtls_pk_context
{
- const mbedtls_pk_info_t * pk_info; /**< Public key informations */
+ const mbedtls_pk_info_t * pk_info; /**< Public key information */
void * pk_ctx; /**< Underlying public key context */
} mbedtls_pk_context;
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+/**
+ * \brief Context for resuming operations
+ */
+typedef struct
+{
+ const mbedtls_pk_info_t * pk_info; /**< Public key information */
+ void * rs_ctx; /**< Underlying restart context */
+} mbedtls_pk_restart_ctx;
+#else /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+/* Now we can declare functions that take a pointer to that */
+typedef void mbedtls_pk_restart_ctx;
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
#if defined(MBEDTLS_RSA_C)
/**
* Quick access to an RSA context inside a PK context.
@@ -181,20 +197,45 @@ typedef size_t (*mbedtls_pk_rsa_alt_key_len_func)( void *ctx );
const mbedtls_pk_info_t *mbedtls_pk_info_from_type( mbedtls_pk_type_t pk_type );
/**
- * \brief Initialize a mbedtls_pk_context (as NONE)
+ * \brief Initialize a #mbedtls_pk_context (as NONE).
+ *
+ * \param ctx The context to initialize.
+ * This must not be \c NULL.
*/
void mbedtls_pk_init( mbedtls_pk_context *ctx );
/**
- * \brief Free a mbedtls_pk_context
+ * \brief Free the components of a #mbedtls_pk_context.
+ *
+ * \param ctx The context to clear. It must have been initialized.
+ * If this is \c NULL, this function does nothing.
*/
void mbedtls_pk_free( mbedtls_pk_context *ctx );
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+/**
+ * \brief Initialize a restart context
+ *
+ * \param ctx The context to initialize.
+ * This must not be \c NULL.
+ */
+void mbedtls_pk_restart_init( mbedtls_pk_restart_ctx *ctx );
+
+/**
+ * \brief Free the components of a restart context
+ *
+ * \param ctx The context to clear. It must have been initialized.
+ * If this is \c NULL, this function does nothing.
+ */
+void mbedtls_pk_restart_free( mbedtls_pk_restart_ctx *ctx );
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
/**
* \brief Initialize a PK context with the information given
* and allocates the type-specific PK subcontext.
*
- * \param ctx Context to initialize. Must be empty (type NONE).
+ * \param ctx Context to initialize. It must not have been set
+ * up yet (type #MBEDTLS_PK_NONE).
* \param info Information to use
*
* \return 0 on success,
@@ -210,7 +251,8 @@ int mbedtls_pk_setup( mbedtls_pk_context *ctx, const mbedtls_pk_info_t *info );
/**
* \brief Initialize an RSA-alt context
*
- * \param ctx Context to initialize. Must be empty (type NONE).
+ * \param ctx Context to initialize. It must not have been set
+ * up yet (type #MBEDTLS_PK_NONE).
* \param key RSA key pointer
* \param decrypt_func Decryption function
* \param sign_func Signing function
@@ -230,7 +272,7 @@ int mbedtls_pk_setup_rsa_alt( mbedtls_pk_context *ctx, void * key,
/**
* \brief Get the size in bits of the underlying key
*
- * \param ctx Context to use
+ * \param ctx The context to query. It must have been initialized.
*
* \return Key size in bits, or 0 on error
*/
@@ -238,7 +280,8 @@ size_t mbedtls_pk_get_bitlen( const mbedtls_pk_context *ctx );
/**
* \brief Get the length in bytes of the underlying key
- * \param ctx Context to use
+ *
+ * \param ctx The context to query. It must have been initialized.
*
* \return Key length in bytes, or 0 on error
*/
@@ -250,18 +293,21 @@ static inline size_t mbedtls_pk_get_len( const mbedtls_pk_context *ctx )
/**
* \brief Tell if a context can do the operation given by type
*
- * \param ctx Context to test
- * \param type Target type
+ * \param ctx The context to query. It must have been initialized.
+ * \param type The desired type.
*
- * \return 0 if context can't do the operations,
- * 1 otherwise.
+ * \return 1 if the context can do operations on the given type.
+ * \return 0 if the context cannot do the operations on the given
+ * type. This is always the case for a context that has
+ * been initialized but not set up, or that has been
+ * cleared with mbedtls_pk_free().
*/
int mbedtls_pk_can_do( const mbedtls_pk_context *ctx, mbedtls_pk_type_t type );
/**
* \brief Verify signature (including padding if relevant).
*
- * \param ctx PK context to use
+ * \param ctx The PK context to use. It must have been set up.
* \param md_alg Hash algorithm used (see notes)
* \param hash Hash of the message to sign
* \param hash_len Hash length or 0 (see notes)
@@ -287,12 +333,38 @@ int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
const unsigned char *sig, size_t sig_len );
/**
+ * \brief Restartable version of \c mbedtls_pk_verify()
+ *
+ * \note Performs the same job as \c mbedtls_pk_verify(), but can
+ * return early and restart according to the limit set with
+ * \c mbedtls_ecp_set_max_ops() to reduce blocking for ECC
+ * operations. For RSA, same as \c mbedtls_pk_verify().
+ *
+ * \param ctx The PK context to use. It must have been set up.
+ * \param md_alg Hash algorithm used (see notes)
+ * \param hash Hash of the message to sign
+ * \param hash_len Hash length or 0 (see notes)
+ * \param sig Signature to verify
+ * \param sig_len Signature length
+ * \param rs_ctx Restart context (NULL to disable restart)
+ *
+ * \return See \c mbedtls_pk_verify(), or
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ */
+int mbedtls_pk_verify_restartable( mbedtls_pk_context *ctx,
+ mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ const unsigned char *sig, size_t sig_len,
+ mbedtls_pk_restart_ctx *rs_ctx );
+
+/**
* \brief Verify signature, with options.
* (Includes verification of the padding depending on type.)
*
* \param type Signature type (inc. possible padding type) to verify
* \param options Pointer to type-specific options, or NULL
- * \param ctx PK context to use
+ * \param ctx The PK context to use. It must have been set up.
* \param md_alg Hash algorithm used (see notes)
* \param hash Hash of the message to sign
* \param hash_len Hash length or 0 (see notes)
@@ -323,7 +395,8 @@ int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options,
/**
* \brief Make signature, including padding if relevant.
*
- * \param ctx PK context to use - must hold a private key
+ * \param ctx The PK context to use. It must have been set up
+ * with a private key.
* \param md_alg Hash algorithm used (see notes)
* \param hash Hash of the message to sign
* \param hash_len Hash length or 0 (see notes)
@@ -350,9 +423,40 @@ int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
/**
+ * \brief Restartable version of \c mbedtls_pk_sign()
+ *
+ * \note Performs the same job as \c mbedtls_pk_sign(), but can
+ * return early and restart according to the limit set with
+ * \c mbedtls_ecp_set_max_ops() to reduce blocking for ECC
+ * operations. For RSA, same as \c mbedtls_pk_sign().
+ *
+ * \param ctx The PK context to use. It must have been set up
+ * with a private key.
+ * \param md_alg Hash algorithm used (see notes)
+ * \param hash Hash of the message to sign
+ * \param hash_len Hash length or 0 (see notes)
+ * \param sig Place to write the signature
+ * \param sig_len Number of bytes written
+ * \param f_rng RNG function
+ * \param p_rng RNG parameter
+ * \param rs_ctx Restart context (NULL to disable restart)
+ *
+ * \return See \c mbedtls_pk_sign(), or
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ */
+int mbedtls_pk_sign_restartable( mbedtls_pk_context *ctx,
+ mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ unsigned char *sig, size_t *sig_len,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ mbedtls_pk_restart_ctx *rs_ctx );
+
+/**
* \brief Decrypt message (including padding if relevant).
*
- * \param ctx PK context to use - must hold a private key
+ * \param ctx The PK context to use. It must have been set up
+ * with a private key.
* \param input Input to decrypt
* \param ilen Input size
* \param output Decrypted output
@@ -373,7 +477,7 @@ int mbedtls_pk_decrypt( mbedtls_pk_context *ctx,
/**
* \brief Encrypt message (including padding if relevant).
*
- * \param ctx PK context to use
+ * \param ctx The PK context to use. It must have been set up.
* \param input Message to encrypt
* \param ilen Message size
* \param output Encrypted output
@@ -404,7 +508,7 @@ int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_conte
/**
* \brief Export debug information
*
- * \param ctx Context to use
+ * \param ctx The PK context to use. It must have been initialized.
* \param items Place to write debug items
*
* \return 0 on success or MBEDTLS_ERR_PK_BAD_INPUT_DATA
@@ -414,7 +518,7 @@ int mbedtls_pk_debug( const mbedtls_pk_context *ctx, mbedtls_pk_debug_item *item
/**
* \brief Access the type name
*
- * \param ctx Context to use
+ * \param ctx The PK context to use. It must have been initialized.
*
* \return Type name on success, or "invalid PK"
*/
@@ -423,9 +527,10 @@ const char * mbedtls_pk_get_name( const mbedtls_pk_context *ctx );
/**
* \brief Get the key type
*
- * \param ctx Context to use
+ * \param ctx The PK context to use. It must have been initialized.
*
- * \return Type on success, or MBEDTLS_PK_NONE
+ * \return Type on success.
+ * \return #MBEDTLS_PK_NONE for a context that has not been set up.
*/
mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx );
@@ -434,12 +539,22 @@ mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx );
/**
* \brief Parse a private key in PEM or DER format
*
- * \param ctx key to be initialized
- * \param key input buffer
- * \param keylen size of the buffer
- * (including the terminating null byte for PEM data)
- * \param pwd password for decryption (optional)
- * \param pwdlen size of the password
+ * \param ctx The PK context to fill. It must have been initialized
+ * but not set up.
+ * \param key Input buffer to parse.
+ * The buffer must contain the input exactly, with no
+ * extra trailing material. For PEM, the buffer must
+ * contain a null-terminated string.
+ * \param keylen Size of \b key in bytes.
+ * For PEM data, this includes the terminating null byte,
+ * so \p keylen must be equal to `strlen(key) + 1`.
+ * \param pwd Optional password for decryption.
+ * Pass \c NULL if expecting a non-encrypted key.
+ * Pass a string of \p pwdlen bytes if expecting an encrypted
+ * key; a non-encrypted key will also be accepted.
+ * The empty password is not supported.
+ * \param pwdlen Size of the password in bytes.
+ * Ignored if \p pwd is \c NULL.
*
* \note On entry, ctx must be empty, either freshly initialised
* with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
@@ -457,10 +572,15 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *ctx,
/**
* \brief Parse a public key in PEM or DER format
*
- * \param ctx key to be initialized
- * \param key input buffer
- * \param keylen size of the buffer
- * (including the terminating null byte for PEM data)
+ * \param ctx The PK context to fill. It must have been initialized
+ * but not set up.
+ * \param key Input buffer to parse.
+ * The buffer must contain the input exactly, with no
+ * extra trailing material. For PEM, the buffer must
+ * contain a null-terminated string.
+ * \param keylen Size of \b key in bytes.
+ * For PEM data, this includes the terminating null byte,
+ * so \p keylen must be equal to `strlen(key) + 1`.
*
* \note On entry, ctx must be empty, either freshly initialised
* with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
@@ -478,9 +598,14 @@ int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx,
/**
* \brief Load and parse a private key
*
- * \param ctx key to be initialized
+ * \param ctx The PK context to fill. It must have been initialized
+ * but not set up.
* \param path filename to read the private key from
- * \param password password to decrypt the file (can be NULL)
+ * \param password Optional password to decrypt the file.
+ * Pass \c NULL if expecting a non-encrypted key.
+ * Pass a null-terminated string if expecting an encrypted
+ * key; a non-encrypted key will also be accepted.
+ * The empty password is not supported.
*
* \note On entry, ctx must be empty, either freshly initialised
* with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
@@ -497,7 +622,8 @@ int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx,
/**
* \brief Load and parse a public key
*
- * \param ctx key to be initialized
+ * \param ctx The PK context to fill. It must have been initialized
+ * but not set up.
* \param path filename to read the public key from
*
* \note On entry, ctx must be empty, either freshly initialised
@@ -520,7 +646,7 @@ int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path )
* return value to determine where you should start
* using the buffer
*
- * \param ctx private to write away
+ * \param ctx PK context which must contain a valid private key.
* \param buf buffer to write to
* \param size size of the buffer
*
@@ -535,7 +661,7 @@ int mbedtls_pk_write_key_der( mbedtls_pk_context *ctx, unsigned char *buf, size_
* return value to determine where you should start
* using the buffer
*
- * \param ctx public key to write away
+ * \param ctx PK context which must contain a valid public or private key.
* \param buf buffer to write to
* \param size size of the buffer
*
@@ -548,9 +674,10 @@ int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *ctx, unsigned char *buf, si
/**
* \brief Write a public key to a PEM string
*
- * \param ctx public key to write away
- * \param buf buffer to write to
- * \param size size of the buffer
+ * \param ctx PK context which must contain a valid public or private key.
+ * \param buf Buffer to write to. The output includes a
+ * terminating null byte.
+ * \param size Size of the buffer in bytes.
*
* \return 0 if successful, or a specific error code
*/
@@ -559,9 +686,10 @@ int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *ctx, unsigned char *buf, si
/**
* \brief Write a private key to a PKCS#1 or SEC1 PEM string
*
- * \param ctx private to write away
- * \param buf buffer to write to
- * \param size size of the buffer
+ * \param ctx PK context which must contain a valid private key.
+ * \param buf Buffer to write to. The output includes a
+ * terminating null byte.
+ * \param size Size of the buffer in bytes.
*
* \return 0 if successful, or a specific error code
*/
@@ -580,7 +708,8 @@ int mbedtls_pk_write_key_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_
*
* \param p the position in the ASN.1 data
* \param end end of the buffer
- * \param pk the key to fill
+ * \param pk The PK context to fill. It must have been initialized
+ * but not set up.
*
* \return 0 if successful, or a specific PK error code
*/
@@ -595,7 +724,7 @@ int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end,
*
* \param p reference to current position pointer
* \param start start of the buffer (for bounds-checking)
- * \param key public key to write away
+ * \param key PK context which must contain a valid public or private key.
*
* \return the length written or a negative error code
*/
diff --git a/thirdparty/mbedtls/include/mbedtls/pk_internal.h b/thirdparty/mbedtls/include/mbedtls/pk_internal.h
index 3dae0fc5b2..48b7a5f7bf 100644
--- a/thirdparty/mbedtls/include/mbedtls/pk_internal.h
+++ b/thirdparty/mbedtls/include/mbedtls/pk_internal.h
@@ -59,6 +59,21 @@ struct mbedtls_pk_info_t
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng );
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ /** Verify signature (restartable) */
+ int (*verify_rs_func)( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ const unsigned char *sig, size_t sig_len,
+ void *rs_ctx );
+
+ /** Make signature (restartable) */
+ int (*sign_rs_func)( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ unsigned char *sig, size_t *sig_len,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng, void *rs_ctx );
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
/** Decrypt message */
int (*decrypt_func)( void *ctx, const unsigned char *input, size_t ilen,
unsigned char *output, size_t *olen, size_t osize,
@@ -80,6 +95,14 @@ struct mbedtls_pk_info_t
/** Free the given context */
void (*ctx_free_func)( void *ctx );
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ /** Allocate the restart context */
+ void * (*rs_alloc_func)( void );
+
+ /** Free the restart context */
+ void (*rs_free_func)( void *rs_ctx );
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
/** Interface with the debug module */
void (*debug_func)( const void *ctx, mbedtls_pk_debug_item *items );
diff --git a/thirdparty/mbedtls/include/mbedtls/pkcs11.h b/thirdparty/mbedtls/include/mbedtls/pkcs11.h
index bf65c55a79..02427ddc1e 100644
--- a/thirdparty/mbedtls/include/mbedtls/pkcs11.h
+++ b/thirdparty/mbedtls/include/mbedtls/pkcs11.h
@@ -50,7 +50,8 @@ extern "C" {
/**
* Context for PKCS #11 private keys.
*/
-typedef struct {
+typedef struct mbedtls_pkcs11_context
+{
pkcs11h_certificate_t pkcs11h_cert;
int len;
} mbedtls_pkcs11_context;
diff --git a/thirdparty/mbedtls/include/mbedtls/pkcs12.h b/thirdparty/mbedtls/include/mbedtls/pkcs12.h
index a621ef5b15..69f04177c8 100644
--- a/thirdparty/mbedtls/include/mbedtls/pkcs12.h
+++ b/thirdparty/mbedtls/include/mbedtls/pkcs12.h
@@ -46,6 +46,8 @@
extern "C" {
#endif
+#if defined(MBEDTLS_ASN1_PARSE_C)
+
/**
* \brief PKCS12 Password Based function (encryption / decryption)
* for pbeWithSHAAnd128BitRC4
@@ -87,6 +89,8 @@ int mbedtls_pkcs12_pbe( mbedtls_asn1_buf *pbe_params, int mode,
const unsigned char *input, size_t len,
unsigned char *output );
+#endif /* MBEDTLS_ASN1_PARSE_C */
+
/**
* \brief The PKCS#12 derivation function uses a password and a salt
* to produce pseudo-random bits for a particular "purpose".
diff --git a/thirdparty/mbedtls/include/mbedtls/pkcs5.h b/thirdparty/mbedtls/include/mbedtls/pkcs5.h
index 9a3c9fddcc..d4bb36dfae 100644
--- a/thirdparty/mbedtls/include/mbedtls/pkcs5.h
+++ b/thirdparty/mbedtls/include/mbedtls/pkcs5.h
@@ -44,6 +44,8 @@
extern "C" {
#endif
+#if defined(MBEDTLS_ASN1_PARSE_C)
+
/**
* \brief PKCS#5 PBES2 function
*
@@ -62,6 +64,8 @@ int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
const unsigned char *data, size_t datalen,
unsigned char *output );
+#endif /* MBEDTLS_ASN1_PARSE_C */
+
/**
* \brief PKCS#5 PBKDF2 using HMAC
*
diff --git a/thirdparty/mbedtls/include/mbedtls/platform.h b/thirdparty/mbedtls/include/mbedtls/platform.h
index 624cc642ac..89fe8a7b19 100644
--- a/thirdparty/mbedtls/include/mbedtls/platform.h
+++ b/thirdparty/mbedtls/include/mbedtls/platform.h
@@ -43,6 +43,9 @@
#include "platform_time.h"
#endif
+#define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 /**< Hardware accelerator failed */
+#define MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 /**< The requested feature is not supported by the platform */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -315,7 +318,8 @@ int mbedtls_platform_set_nv_seed(
* \note This structure may be used to assist platform-specific
* setup or teardown operations.
*/
-typedef struct {
+typedef struct mbedtls_platform_context
+{
char dummy; /**< A placeholder member, as empty structs are not portable. */
}
mbedtls_platform_context;
diff --git a/thirdparty/mbedtls/include/mbedtls/platform_util.h b/thirdparty/mbedtls/include/mbedtls/platform_util.h
index 84f0732eeb..b0e72ad149 100644
--- a/thirdparty/mbedtls/include/mbedtls/platform_util.h
+++ b/thirdparty/mbedtls/include/mbedtls/platform_util.h
@@ -25,12 +25,104 @@
#ifndef MBEDTLS_PLATFORM_UTIL_H
#define MBEDTLS_PLATFORM_UTIL_H
+#if !defined(MBEDTLS_CONFIG_FILE)
+#include "mbedtls/config.h"
+#else
+#include MBEDTLS_CONFIG_FILE
+#endif
+
#include <stddef.h>
+#if defined(MBEDTLS_HAVE_TIME_DATE)
+#include "mbedtls/platform_time.h"
+#include <time.h>
+#endif /* MBEDTLS_HAVE_TIME_DATE */
#ifdef __cplusplus
extern "C" {
#endif
+#if defined(MBEDTLS_CHECK_PARAMS)
+
+#if defined(MBEDTLS_PARAM_FAILED)
+/** An alternative definition of MBEDTLS_PARAM_FAILED has been set in config.h.
+ *
+ * This flag can be used to check whether it is safe to assume that
+ * MBEDTLS_PARAM_FAILED() will expand to a call to mbedtls_param_failed().
+ */
+#define MBEDTLS_PARAM_FAILED_ALT
+#else /* MBEDTLS_PARAM_FAILED */
+#define MBEDTLS_PARAM_FAILED( cond ) \
+ mbedtls_param_failed( #cond, __FILE__, __LINE__ )
+
+/**
+ * \brief User supplied callback function for parameter validation failure.
+ * See #MBEDTLS_CHECK_PARAMS for context.
+ *
+ * This function will be called unless an alternative treatement
+ * is defined through the #MBEDTLS_PARAM_FAILED macro.
+ *
+ * This function can return, and the operation will be aborted, or
+ * alternatively, through use of setjmp()/longjmp() can resume
+ * execution in the application code.
+ *
+ * \param failure_condition The assertion that didn't hold.
+ * \param file The file where the assertion failed.
+ * \param line The line in the file where the assertion failed.
+ */
+void mbedtls_param_failed( const char *failure_condition,
+ const char *file,
+ int line );
+#endif /* MBEDTLS_PARAM_FAILED */
+
+/* Internal macro meant to be called only from within the library. */
+#define MBEDTLS_INTERNAL_VALIDATE_RET( cond, ret ) \
+ do { \
+ if( !(cond) ) \
+ { \
+ MBEDTLS_PARAM_FAILED( cond ); \
+ return( ret ); \
+ } \
+ } while( 0 )
+
+/* Internal macro meant to be called only from within the library. */
+#define MBEDTLS_INTERNAL_VALIDATE( cond ) \
+ do { \
+ if( !(cond) ) \
+ { \
+ MBEDTLS_PARAM_FAILED( cond ); \
+ return; \
+ } \
+ } while( 0 )
+
+#else /* MBEDTLS_CHECK_PARAMS */
+
+/* Internal macros meant to be called only from within the library. */
+#define MBEDTLS_INTERNAL_VALIDATE_RET( cond, ret ) do { } while( 0 )
+#define MBEDTLS_INTERNAL_VALIDATE( cond ) do { } while( 0 )
+
+#endif /* MBEDTLS_CHECK_PARAMS */
+
+/* Internal helper macros for deprecating API constants. */
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+#if defined(MBEDTLS_DEPRECATED_WARNING)
+/* Deliberately don't (yet) export MBEDTLS_DEPRECATED here
+ * to avoid conflict with other headers which define and use
+ * it, too. We might want to move all these definitions here at
+ * some point for uniformity. */
+#define MBEDTLS_DEPRECATED __attribute__((deprecated))
+MBEDTLS_DEPRECATED typedef char const * mbedtls_deprecated_string_constant_t;
+#define MBEDTLS_DEPRECATED_STRING_CONSTANT( VAL ) \
+ ( (mbedtls_deprecated_string_constant_t) ( VAL ) )
+MBEDTLS_DEPRECATED typedef int mbedtls_deprecated_numeric_constant_t;
+#define MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( VAL ) \
+ ( (mbedtls_deprecated_numeric_constant_t) ( VAL ) )
+#undef MBEDTLS_DEPRECATED
+#else /* MBEDTLS_DEPRECATED_WARNING */
+#define MBEDTLS_DEPRECATED_STRING_CONSTANT( VAL ) VAL
+#define MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( VAL ) VAL
+#endif /* MBEDTLS_DEPRECATED_WARNING */
+#endif /* MBEDTLS_DEPRECATED_REMOVED */
+
/**
* \brief Securely zeroize a buffer
*
@@ -55,6 +147,37 @@ extern "C" {
*/
void mbedtls_platform_zeroize( void *buf, size_t len );
+#if defined(MBEDTLS_HAVE_TIME_DATE)
+/**
+ * \brief Platform-specific implementation of gmtime_r()
+ *
+ * The function is a thread-safe abstraction that behaves
+ * similarly to the gmtime_r() function from Unix/POSIX.
+ *
+ * Mbed TLS will try to identify the underlying platform and
+ * make use of an appropriate underlying implementation (e.g.
+ * gmtime_r() for POSIX and gmtime_s() for Windows). If this is
+ * not possible, then gmtime() will be used. In this case, calls
+ * from the library to gmtime() will be guarded by the mutex
+ * mbedtls_threading_gmtime_mutex if MBEDTLS_THREADING_C is
+ * enabled. It is recommended that calls from outside the library
+ * are also guarded by this mutex.
+ *
+ * If MBEDTLS_PLATFORM_GMTIME_R_ALT is defined, then Mbed TLS will
+ * unconditionally use the alternative implementation for
+ * mbedtls_platform_gmtime_r() supplied by the user at compile time.
+ *
+ * \param tt Pointer to an object containing time (in seconds) since the
+ * epoch to be converted
+ * \param tm_buf Pointer to an object where the results will be stored
+ *
+ * \return Pointer to an object of type struct tm on success, otherwise
+ * NULL
+ */
+struct tm *mbedtls_platform_gmtime_r( const mbedtls_time_t *tt,
+ struct tm *tm_buf );
+#endif /* MBEDTLS_HAVE_TIME_DATE */
+
#ifdef __cplusplus
}
#endif
diff --git a/thirdparty/mbedtls/include/mbedtls/poly1305.h b/thirdparty/mbedtls/include/mbedtls/poly1305.h
index 54b50abc25..05866a2da6 100644
--- a/thirdparty/mbedtls/include/mbedtls/poly1305.h
+++ b/thirdparty/mbedtls/include/mbedtls/poly1305.h
@@ -43,7 +43,13 @@
#include <stddef.h>
#define MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA -0x0057 /**< Invalid input parameter(s). */
+
+/* MBEDTLS_ERR_POLY1305_FEATURE_UNAVAILABLE is deprecated and should not be
+ * used. */
#define MBEDTLS_ERR_POLY1305_FEATURE_UNAVAILABLE -0x0059 /**< Feature not available. For example, s part of the API is not implemented. */
+
+/* MBEDTLS_ERR_POLY1305_HW_ACCEL_FAILED is deprecated and should not be used.
+ */
#define MBEDTLS_ERR_POLY1305_HW_ACCEL_FAILED -0x005B /**< Poly1305 hardware accelerator failed. */
#ifdef __cplusplus
@@ -52,7 +58,7 @@ extern "C" {
#if !defined(MBEDTLS_POLY1305_ALT)
-typedef struct
+typedef struct mbedtls_poly1305_context
{
uint32_t r[4]; /** The value for 'r' (low 128 bits of the key). */
uint32_t s[4]; /** The value for 's' (high 128 bits of the key). */
@@ -78,14 +84,18 @@ mbedtls_poly1305_context;
* \c mbedtls_poly1305_finish(), then finally
* \c mbedtls_poly1305_free().
*
- * \param ctx The Poly1305 context to initialize.
+ * \param ctx The Poly1305 context to initialize. This must
+ * not be \c NULL.
*/
void mbedtls_poly1305_init( mbedtls_poly1305_context *ctx );
/**
- * \brief This function releases and clears the specified Poly1305 context.
+ * \brief This function releases and clears the specified
+ * Poly1305 context.
*
- * \param ctx The Poly1305 context to clear.
+ * \param ctx The Poly1305 context to clear. This may be \c NULL, in which
+ * case this function is a no-op. If it is not \c NULL, it must
+ * point to an initialized Poly1305 context.
*/
void mbedtls_poly1305_free( mbedtls_poly1305_context *ctx );
@@ -96,11 +106,11 @@ void mbedtls_poly1305_free( mbedtls_poly1305_context *ctx );
* invocation of Poly1305.
*
* \param ctx The Poly1305 context to which the key should be bound.
- * \param key The buffer containing the 256-bit key.
+ * This must be initialized.
+ * \param key The buffer containing the \c 32 Byte (\c 256 Bit) key.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if ctx or key are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_poly1305_starts( mbedtls_poly1305_context *ctx,
const unsigned char key[32] );
@@ -114,13 +124,14 @@ int mbedtls_poly1305_starts( mbedtls_poly1305_context *ctx,
* It can be called repeatedly to process a stream of data.
*
* \param ctx The Poly1305 context to use for the Poly1305 operation.
- * \param ilen The length of the input data (in bytes). Any value is accepted.
+ * This must be initialized and bound to a key.
+ * \param ilen The length of the input data in Bytes.
+ * Any value is accepted.
* \param input The buffer holding the input data.
- * This pointer can be NULL if ilen == 0.
+ * This pointer can be \c NULL if `ilen == 0`.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if ctx or input are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_poly1305_update( mbedtls_poly1305_context *ctx,
const unsigned char *input,
@@ -131,12 +142,12 @@ int mbedtls_poly1305_update( mbedtls_poly1305_context *ctx,
* Authentication Code (MAC).
*
* \param ctx The Poly1305 context to use for the Poly1305 operation.
- * \param mac The buffer to where the MAC is written. Must be big enough
- * to hold the 16-byte MAC.
+ * This must be initialized and bound to a key.
+ * \param mac The buffer to where the MAC is written. This must
+ * be a writable buffer of length \c 16 Bytes.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if ctx or mac are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_poly1305_finish( mbedtls_poly1305_context *ctx,
unsigned char mac[16] );
@@ -148,16 +159,16 @@ int mbedtls_poly1305_finish( mbedtls_poly1305_context *ctx,
* \warning The key must be unique and unpredictable for each
* invocation of Poly1305.
*
- * \param key The buffer containing the 256-bit key.
- * \param ilen The length of the input data (in bytes). Any value is accepted.
+ * \param key The buffer containing the \c 32 Byte (\c 256 Bit) key.
+ * \param ilen The length of the input data in Bytes.
+ * Any value is accepted.
* \param input The buffer holding the input data.
- * This pointer can be NULL if ilen == 0.
- * \param mac The buffer to where the MAC is written. Must be big enough
- * to hold the 16-byte MAC.
+ * This pointer can be \c NULL if `ilen == 0`.
+ * \param mac The buffer to where the MAC is written. This must be
+ * a writable buffer of length \c 16 Bytes.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA
- * if key, input, or mac are NULL.
+ * \return A negative error code on failure.
*/
int mbedtls_poly1305_mac( const unsigned char key[32],
const unsigned char *input,
diff --git a/thirdparty/mbedtls/include/mbedtls/ripemd160.h b/thirdparty/mbedtls/include/mbedtls/ripemd160.h
index a0dac0c360..c74b7d2c6c 100644
--- a/thirdparty/mbedtls/include/mbedtls/ripemd160.h
+++ b/thirdparty/mbedtls/include/mbedtls/ripemd160.h
@@ -33,6 +33,8 @@
#include <stddef.h>
#include <stdint.h>
+/* MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED is deprecated and should not be used.
+ */
#define MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED -0x0031 /**< RIPEMD160 hardware accelerator failed */
#ifdef __cplusplus
@@ -46,7 +48,7 @@ extern "C" {
/**
* \brief RIPEMD-160 context structure
*/
-typedef struct
+typedef struct mbedtls_ripemd160_context
{
uint32_t total[2]; /*!< number of bytes processed */
uint32_t state[5]; /*!< intermediate digest state */
diff --git a/thirdparty/mbedtls/include/mbedtls/rsa.h b/thirdparty/mbedtls/include/mbedtls/rsa.h
index 19eb2ee74c..ed65a34452 100644
--- a/thirdparty/mbedtls/include/mbedtls/rsa.h
+++ b/thirdparty/mbedtls/include/mbedtls/rsa.h
@@ -55,7 +55,12 @@
#define MBEDTLS_ERR_RSA_VERIFY_FAILED -0x4380 /**< The PKCS#1 verification failed. */
#define MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE -0x4400 /**< The output buffer for decryption is not large enough. */
#define MBEDTLS_ERR_RSA_RNG_FAILED -0x4480 /**< The random generator failed to generate non-zeros. */
+
+/* MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION is deprecated and should not be used.
+ */
#define MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION -0x4500 /**< The implementation does not offer the requested operation, for example, because of security violations or lack of functionality. */
+
+/* MBEDTLS_ERR_RSA_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_RSA_HW_ACCEL_FAILED -0x4580 /**< RSA hardware accelerator failed. */
/*
@@ -92,7 +97,7 @@ extern "C" {
* is deprecated. All manipulation should instead be done through
* the public interface functions.
*/
-typedef struct
+typedef struct mbedtls_rsa_context
{
int ver; /*!< Always 0.*/
size_t len; /*!< The size of \p N in Bytes. */
@@ -153,15 +158,16 @@ mbedtls_rsa_context;
* making signatures, but can be overriden for verifying them.
* If set to #MBEDTLS_MD_NONE, it is always overriden.
*
- * \param ctx The RSA context to initialize.
- * \param padding Selects padding mode: #MBEDTLS_RSA_PKCS_V15 or
- * #MBEDTLS_RSA_PKCS_V21.
- * \param hash_id The hash identifier of #mbedtls_md_type_t type, if
- * \p padding is #MBEDTLS_RSA_PKCS_V21.
+ * \param ctx The RSA context to initialize. This must not be \c NULL.
+ * \param padding The padding mode to use. This must be either
+ * #MBEDTLS_RSA_PKCS_V15 or #MBEDTLS_RSA_PKCS_V21.
+ * \param hash_id The hash identifier of ::mbedtls_md_type_t type, if
+ * \p padding is #MBEDTLS_RSA_PKCS_V21. It is unused
+ * otherwise.
*/
void mbedtls_rsa_init( mbedtls_rsa_context *ctx,
int padding,
- int hash_id);
+ int hash_id );
/**
* \brief This function imports a set of core parameters into an
@@ -183,11 +189,11 @@ void mbedtls_rsa_init( mbedtls_rsa_context *ctx,
* for the lifetime of the RSA context being set up.
*
* \param ctx The initialized RSA context to store the parameters in.
- * \param N The RSA modulus, or NULL.
- * \param P The first prime factor of \p N, or NULL.
- * \param Q The second prime factor of \p N, or NULL.
- * \param D The private exponent, or NULL.
- * \param E The public exponent, or NULL.
+ * \param N The RSA modulus. This may be \c NULL.
+ * \param P The first prime factor of \p N. This may be \c NULL.
+ * \param Q The second prime factor of \p N. This may be \c NULL.
+ * \param D The private exponent. This may be \c NULL.
+ * \param E The public exponent. This may be \c NULL.
*
* \return \c 0 on success.
* \return A non-zero error code on failure.
@@ -217,16 +223,16 @@ int mbedtls_rsa_import( mbedtls_rsa_context *ctx,
* for the lifetime of the RSA context being set up.
*
* \param ctx The initialized RSA context to store the parameters in.
- * \param N The RSA modulus, or NULL.
- * \param N_len The Byte length of \p N, ignored if \p N == NULL.
- * \param P The first prime factor of \p N, or NULL.
- * \param P_len The Byte length of \p P, ignored if \p P == NULL.
- * \param Q The second prime factor of \p N, or NULL.
- * \param Q_len The Byte length of \p Q, ignored if \p Q == NULL.
- * \param D The private exponent, or NULL.
- * \param D_len The Byte length of \p D, ignored if \p D == NULL.
- * \param E The public exponent, or NULL.
- * \param E_len The Byte length of \p E, ignored if \p E == NULL.
+ * \param N The RSA modulus. This may be \c NULL.
+ * \param N_len The Byte length of \p N; it is ignored if \p N == NULL.
+ * \param P The first prime factor of \p N. This may be \c NULL.
+ * \param P_len The Byte length of \p P; it ns ignored if \p P == NULL.
+ * \param Q The second prime factor of \p N. This may be \c NULL.
+ * \param Q_len The Byte length of \p Q; it is ignored if \p Q == NULL.
+ * \param D The private exponent. This may be \c NULL.
+ * \param D_len The Byte length of \p D; it is ignored if \p D == NULL.
+ * \param E The public exponent. This may be \c NULL.
+ * \param E_len The Byte length of \p E; it is ignored if \p E == NULL.
*
* \return \c 0 on success.
* \return A non-zero error code on failure.
@@ -281,7 +287,7 @@ int mbedtls_rsa_complete( mbedtls_rsa_context *ctx );
* zero Bytes.
*
* Possible reasons for returning
- * #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION:<ul>
+ * #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED:<ul>
* <li>An alternative RSA implementation is in use, which
* stores the key externally, and either cannot or should
* not export it into RAM.</li>
@@ -294,14 +300,19 @@ int mbedtls_rsa_complete( mbedtls_rsa_context *ctx );
* the RSA context stays intact and remains usable.
*
* \param ctx The initialized RSA context.
- * \param N The MPI to hold the RSA modulus, or NULL.
- * \param P The MPI to hold the first prime factor of \p N, or NULL.
- * \param Q The MPI to hold the second prime factor of \p N, or NULL.
- * \param D The MPI to hold the private exponent, or NULL.
- * \param E The MPI to hold the public exponent, or NULL.
+ * \param N The MPI to hold the RSA modulus.
+ * This may be \c NULL if this field need not be exported.
+ * \param P The MPI to hold the first prime factor of \p N.
+ * This may be \c NULL if this field need not be exported.
+ * \param Q The MPI to hold the second prime factor of \p N.
+ * This may be \c NULL if this field need not be exported.
+ * \param D The MPI to hold the private exponent.
+ * This may be \c NULL if this field need not be exported.
+ * \param E The MPI to hold the public exponent.
+ * This may be \c NULL if this field need not be exported.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION if exporting the
+ * \return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED if exporting the
* requested parameters cannot be done due to missing
* functionality or because of security policies.
* \return A non-zero return code on any other failure.
@@ -321,7 +332,7 @@ int mbedtls_rsa_export( const mbedtls_rsa_context *ctx,
* zero Bytes.
*
* Possible reasons for returning
- * #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION:<ul>
+ * #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED:<ul>
* <li>An alternative RSA implementation is in use, which
* stores the key externally, and either cannot or should
* not export it into RAM.</li>
@@ -336,21 +347,24 @@ int mbedtls_rsa_export( const mbedtls_rsa_context *ctx,
* buffer pointers are NULL.
*
* \param ctx The initialized RSA context.
- * \param N The Byte array to store the RSA modulus, or NULL.
+ * \param N The Byte array to store the RSA modulus,
+ * or \c NULL if this field need not be exported.
* \param N_len The size of the buffer for the modulus.
- * \param P The Byte array to hold the first prime factor of \p N, or
- * NULL.
+ * \param P The Byte array to hold the first prime factor of \p N,
+ * or \c NULL if this field need not be exported.
* \param P_len The size of the buffer for the first prime factor.
- * \param Q The Byte array to hold the second prime factor of \p N, or
- * NULL.
+ * \param Q The Byte array to hold the second prime factor of \p N,
+ * or \c NULL if this field need not be exported.
* \param Q_len The size of the buffer for the second prime factor.
- * \param D The Byte array to hold the private exponent, or NULL.
+ * \param D The Byte array to hold the private exponent,
+ * or \c NULL if this field need not be exported.
* \param D_len The size of the buffer for the private exponent.
- * \param E The Byte array to hold the public exponent, or NULL.
+ * \param E The Byte array to hold the public exponent,
+ * or \c NULL if this field need not be exported.
* \param E_len The size of the buffer for the public exponent.
*
* \return \c 0 on success.
- * \return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION if exporting the
+ * \return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED if exporting the
* requested parameters cannot be done due to missing
* functionality or because of security policies.
* \return A non-zero return code on any other failure.
@@ -370,9 +384,12 @@ int mbedtls_rsa_export_raw( const mbedtls_rsa_context *ctx,
* mbedtls_rsa_deduce_opt().
*
* \param ctx The initialized RSA context.
- * \param DP The MPI to hold D modulo P-1, or NULL.
- * \param DQ The MPI to hold D modulo Q-1, or NULL.
- * \param QP The MPI to hold modular inverse of Q modulo P, or NULL.
+ * \param DP The MPI to hold \c D modulo `P-1`,
+ * or \c NULL if it need not be exported.
+ * \param DQ The MPI to hold \c D modulo `Q-1`,
+ * or \c NULL if it need not be exported.
+ * \param QP The MPI to hold modular inverse of \c Q modulo \c P,
+ * or \c NULL if it need not be exported.
*
* \return \c 0 on success.
* \return A non-zero error code on failure.
@@ -385,13 +402,13 @@ int mbedtls_rsa_export_crt( const mbedtls_rsa_context *ctx,
* \brief This function sets padding for an already initialized RSA
* context. See mbedtls_rsa_init() for details.
*
- * \param ctx The RSA context to be set.
- * \param padding Selects padding mode: #MBEDTLS_RSA_PKCS_V15 or
- * #MBEDTLS_RSA_PKCS_V21.
+ * \param ctx The initialized RSA context to be configured.
+ * \param padding The padding mode to use. This must be either
+ * #MBEDTLS_RSA_PKCS_V15 or #MBEDTLS_RSA_PKCS_V21.
* \param hash_id The #MBEDTLS_RSA_PKCS_V21 hash identifier.
*/
void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding,
- int hash_id);
+ int hash_id );
/**
* \brief This function retrieves the length of RSA modulus in Bytes.
@@ -409,11 +426,14 @@ size_t mbedtls_rsa_get_len( const mbedtls_rsa_context *ctx );
* \note mbedtls_rsa_init() must be called before this function,
* to set up the RSA context.
*
- * \param ctx The RSA context used to hold the key.
- * \param f_rng The RNG function.
- * \param p_rng The RNG context.
+ * \param ctx The initialized RSA context used to hold the key.
+ * \param f_rng The RNG function to be used for key generation.
+ * This must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng.
+ * This may be \c NULL if \p f_rng doesn't need a context.
* \param nbits The size of the public key in bits.
- * \param exponent The public exponent. For example, 65537.
+ * \param exponent The public exponent to use. For example, \c 65537.
+ * This must be odd and greater than \c 1.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -431,7 +451,7 @@ int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx,
* enough information is present to perform an RSA public key
* operation using mbedtls_rsa_public().
*
- * \param ctx The RSA context to check.
+ * \param ctx The initialized RSA context to check.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -470,7 +490,7 @@ int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx );
* parameters, which goes beyond what is effectively checkable
* by the library.</li></ul>
*
- * \param ctx The RSA context to check.
+ * \param ctx The initialized RSA context to check.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -482,8 +502,8 @@ int mbedtls_rsa_check_privkey( const mbedtls_rsa_context *ctx );
*
* It checks each of the contexts, and makes sure they match.
*
- * \param pub The RSA context holding the public key.
- * \param prv The RSA context holding the private key.
+ * \param pub The initialized RSA context holding the public key.
+ * \param prv The initialized RSA context holding the private key.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -494,18 +514,19 @@ int mbedtls_rsa_check_pub_priv( const mbedtls_rsa_context *pub,
/**
* \brief This function performs an RSA public key operation.
*
+ * \param ctx The initialized RSA context to use.
+ * \param input The input buffer. This must be a readable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
+ * \param output The output buffer. This must be a writable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
+ *
* \note This function does not handle message padding.
*
* \note Make sure to set \p input[0] = 0 or ensure that
* input is smaller than \p N.
*
- * \note The input and output buffers must be large
- * enough. For example, 128 Bytes if RSA-1024 is used.
- *
- * \param ctx The RSA context.
- * \param input The input buffer.
- * \param output The output buffer.
- *
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
*/
@@ -516,9 +537,6 @@ int mbedtls_rsa_public( mbedtls_rsa_context *ctx,
/**
* \brief This function performs an RSA private key operation.
*
- * \note The input and output buffers must be large
- * enough. For example, 128 Bytes if RSA-1024 is used.
- *
* \note Blinding is used if and only if a PRNG is provided.
*
* \note If blinding is used, both the base of exponentation
@@ -530,11 +548,18 @@ int mbedtls_rsa_public( mbedtls_rsa_context *ctx,
* Future versions of the library may enforce the presence
* of a PRNG.
*
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Needed for blinding.
- * \param p_rng The RNG context.
- * \param input The input buffer.
- * \param output The output buffer.
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function, used for blinding. It is discouraged
+ * and deprecated to pass \c NULL here, in which case
+ * blinding will be omitted.
+ * \param p_rng The RNG context to pass to \p f_rng. This may be \c NULL
+ * if \p f_rng is \c NULL or if \p f_rng doesn't need a context.
+ * \param input The input buffer. This must be a readable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
+ * \param output The output buffer. This must be a writable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -553,9 +578,6 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx,
* It is the generic wrapper for performing a PKCS#1 encryption
* operation using the \p mode from the context.
*
- * \note The input and output buffers must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PRIVATE mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -563,16 +585,26 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Needed for padding, PKCS#1 v2.1
- * encoding, and #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
- * \param ilen The length of the plaintext.
- * \param input The buffer holding the data to encrypt.
- * \param output The buffer used to hold the ciphertext.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG to use. It is mandatory for PKCS#1 v2.1 padding
+ * encoding, and for PKCS#1 v1.5 padding encoding when used
+ * with \p mode set to #MBEDTLS_RSA_PUBLIC. For PKCS#1 v1.5
+ * padding encoding and \p mode set to #MBEDTLS_RSA_PRIVATE,
+ * it is used for blinding and should be provided in this
+ * case; see mbedtls_rsa_private() for more.
+ * \param p_rng The RNG context to be passed to \p f_rng. May be
+ * \c NULL if \p f_rng is \c NULL or if \p f_rng doesn't
+ * need a context argument.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE (deprecated).
+ * \param ilen The length of the plaintext in Bytes.
+ * \param input The input data to encrypt. This must be a readable
+ * buffer of size \p ilen Bytes. This must not be \c NULL.
+ * \param output The output buffer. This must be a writable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -588,9 +620,6 @@ int mbedtls_rsa_pkcs1_encrypt( mbedtls_rsa_context *ctx,
* \brief This function performs a PKCS#1 v1.5 encryption operation
* (RSAES-PKCS1-v1_5-ENCRYPT).
*
- * \note The output buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PRIVATE mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -598,16 +627,24 @@ int mbedtls_rsa_pkcs1_encrypt( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Needed for padding and
- * #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
- * \param ilen The length of the plaintext.
- * \param input The buffer holding the data to encrypt.
- * \param output The buffer used to hold the ciphertext.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function to use. It is needed for padding generation
+ * if \p mode is #MBEDTLS_RSA_PUBLIC. If \p mode is
+ * #MBEDTLS_RSA_PRIVATE (discouraged), it is used for
+ * blinding and should be provided; see mbedtls_rsa_private().
+ * \param p_rng The RNG context to be passed to \p f_rng. This may
+ * be \c NULL if \p f_rng is \c NULL or if \p f_rng
+ * doesn't need a context argument.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE (deprecated).
+ * \param ilen The length of the plaintext in Bytes.
+ * \param input The input data to encrypt. This must be a readable
+ * buffer of size \p ilen Bytes. This must not be \c NULL.
+ * \param output The output buffer. This must be a writable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -633,18 +670,25 @@ int mbedtls_rsa_rsaes_pkcs1_v15_encrypt( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Needed for padding and PKCS#1 v2.1
- * encoding and #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initnialized RSA context to use.
+ * \param f_rng The RNG function to use. This is needed for padding
+ * generation and must be provided.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may
+ * be \c NULL if \p f_rng doesn't need a context argument.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE (deprecated).
* \param label The buffer holding the custom label to use.
- * \param label_len The length of the label.
- * \param ilen The length of the plaintext.
- * \param input The buffer holding the data to encrypt.
- * \param output The buffer used to hold the ciphertext.
+ * This must be a readable buffer of length \p label_len
+ * Bytes. It may be \c NULL if \p label_len is \c 0.
+ * \param label_len The length of the label in Bytes.
+ * \param ilen The length of the plaintext buffer \p input in Bytes.
+ * \param input The input data to encrypt. This must be a readable
+ * buffer of size \p ilen Bytes. This must not be \c NULL.
+ * \param output The output buffer. This must be a writable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -672,9 +716,6 @@ int mbedtls_rsa_rsaes_oaep_encrypt( mbedtls_rsa_context *ctx,
* hold the decryption of the particular ciphertext provided,
* the function returns \c MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE.
*
- * \note The input buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PUBLIC mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -682,16 +723,25 @@ int mbedtls_rsa_rsaes_oaep_encrypt( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PUBLIC and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
- * \param olen The length of the plaintext.
- * \param input The buffer holding the encrypted data.
- * \param output The buffer used to hold the plaintext.
- * \param output_max_len The maximum length of the output buffer.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. If \p mode is
+ * #MBEDTLS_RSA_PUBLIC, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a context.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PRIVATE or #MBEDTLS_RSA_PUBLIC (deprecated).
+ * \param olen The address at which to store the length of
+ * the plaintext. This must not be \c NULL.
+ * \param input The ciphertext buffer. This must be a readable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
+ * \param output The buffer used to hold the plaintext. This must
+ * be a writable buffer of length \p output_max_len Bytes.
+ * \param output_max_len The length in Bytes of the output buffer \p output.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -715,9 +765,6 @@ int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx,
* hold the decryption of the particular ciphertext provided,
* the function returns #MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE.
*
- * \note The input buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PUBLIC mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -725,16 +772,25 @@ int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PUBLIC and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
- * \param olen The length of the plaintext.
- * \param input The buffer holding the encrypted data.
- * \param output The buffer to hold the plaintext.
- * \param output_max_len The maximum length of the output buffer.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. If \p mode is
+ * #MBEDTLS_RSA_PUBLIC, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a context.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PRIVATE or #MBEDTLS_RSA_PUBLIC (deprecated).
+ * \param olen The address at which to store the length of
+ * the plaintext. This must not be \c NULL.
+ * \param input The ciphertext buffer. This must be a readable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
+ * \param output The buffer used to hold the plaintext. This must
+ * be a writable buffer of length \p output_max_len Bytes.
+ * \param output_max_len The length in Bytes of the output buffer \p output.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -760,9 +816,6 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
* ciphertext provided, the function returns
* #MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE.
*
- * \note The input buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PUBLIC mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -770,18 +823,29 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PUBLIC and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. If \p mode is
+ * #MBEDTLS_RSA_PUBLIC, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a context.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PRIVATE or #MBEDTLS_RSA_PUBLIC (deprecated).
* \param label The buffer holding the custom label to use.
- * \param label_len The length of the label.
- * \param olen The length of the plaintext.
- * \param input The buffer holding the encrypted data.
- * \param output The buffer to hold the plaintext.
- * \param output_max_len The maximum length of the output buffer.
+ * This must be a readable buffer of length \p label_len
+ * Bytes. It may be \c NULL if \p label_len is \c 0.
+ * \param label_len The length of the label in Bytes.
+ * \param olen The address at which to store the length of
+ * the plaintext. This must not be \c NULL.
+ * \param input The ciphertext buffer. This must be a readable buffer
+ * of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
+ * \param output The buffer used to hold the plaintext. This must
+ * be a writable buffer of length \p output_max_len Bytes.
+ * \param output_max_len The length in Bytes of the output buffer \p output.
*
* \return \c 0 on success.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -817,18 +881,30 @@ int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PUBLIC and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Needed for PKCS#1 v2.1 encoding and for
- * #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function to use. If the padding mode is PKCS#1 v2.1,
+ * this must be provided. If the padding mode is PKCS#1 v1.5 and
+ * \p mode is #MBEDTLS_RSA_PRIVATE, it is used for blinding
+ * and should be provided; see mbedtls_rsa_private() for more
+ * more. It is ignored otherwise.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
+ * if \p f_rng is \c NULL or doesn't need a context argument.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PRIVATE or #MBEDTLS_RSA_PUBLIC (deprecated).
* \param md_alg The message-digest algorithm used to hash the original data.
* Use #MBEDTLS_MD_NONE for signing raw data.
- * \param hashlen The length of the message digest. Only used if \p md_alg is #MBEDTLS_MD_NONE.
- * \param hash The buffer holding the message digest.
- * \param sig The buffer to hold the ciphertext.
+ * \param hashlen The length of the message digest.
+ * Ths is only used if \p md_alg is #MBEDTLS_MD_NONE.
+ * \param hash The buffer holding the message digest or raw data.
+ * If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
+ * buffer of length \p hashlen Bytes. If \p md_alg is not
+ * #MBEDTLS_MD_NONE, it must be a readable buffer of length
+ * the size of the hash corresponding to \p md_alg.
+ * \param sig The buffer to hold the signature. This must be a writable
+ * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 if the signing operation was successful.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -846,9 +922,6 @@ int mbedtls_rsa_pkcs1_sign( mbedtls_rsa_context *ctx,
* \brief This function performs a PKCS#1 v1.5 signature
* operation (RSASSA-PKCS1-v1_5-SIGN).
*
- * \note The \p sig buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PUBLIC mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -856,17 +929,29 @@ int mbedtls_rsa_pkcs1_sign( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PUBLIC and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. If \p mode is
+ * #MBEDTLS_RSA_PUBLIC, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
+ * if \p f_rng is \c NULL or doesn't need a context argument.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PRIVATE or #MBEDTLS_RSA_PUBLIC (deprecated).
* \param md_alg The message-digest algorithm used to hash the original data.
* Use #MBEDTLS_MD_NONE for signing raw data.
- * \param hashlen The length of the message digest. Only used if \p md_alg is #MBEDTLS_MD_NONE.
- * \param hash The buffer holding the message digest.
- * \param sig The buffer to hold the ciphertext.
+ * \param hashlen The length of the message digest.
+ * Ths is only used if \p md_alg is #MBEDTLS_MD_NONE.
+ * \param hash The buffer holding the message digest or raw data.
+ * If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
+ * buffer of length \p hashlen Bytes. If \p md_alg is not
+ * #MBEDTLS_MD_NONE, it must be a readable buffer of length
+ * the size of the hash corresponding to \p md_alg.
+ * \param sig The buffer to hold the signature. This must be a writable
+ * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 if the signing operation was successful.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -884,9 +969,6 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx,
* \brief This function performs a PKCS#1 v2.1 PSS signature
* operation (RSASSA-PSS-SIGN).
*
- * \note The \p sig buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \note The \p hash_id in the RSA context is the one used for the
* encoding. \p md_alg in the function call is the type of hash
* that is encoded. According to <em>RFC-3447: Public-Key
@@ -894,6 +976,16 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx,
* Specifications</em> it is advised to keep both hashes the
* same.
*
+ * \note This function always uses the maximum possible salt size,
+ * up to the length of the payload hash. This choice of salt
+ * size complies with FIPS 186-4 §5.5 (e) and RFC 8017 (PKCS#1
+ * v2.2) §9.1.1 step 3. Furthermore this function enforces a
+ * minimum salt size which is the hash size minus 2 bytes. If
+ * this minimum size is too large given the key size (the salt
+ * size, plus the hash size, plus 2 bytes must be no more than
+ * the key size in bytes), this function returns
+ * #MBEDTLS_ERR_RSA_BAD_INPUT_DATA.
+ *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PUBLIC mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -901,18 +993,26 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PUBLIC and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA context.
- * \param f_rng The RNG function. Needed for PKCS#1 v2.1 encoding and for
- * #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA context to use.
+ * \param f_rng The RNG function. It must not be \c NULL.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
+ * if \p f_rng doesn't need a context argument.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PRIVATE or #MBEDTLS_RSA_PUBLIC (deprecated).
* \param md_alg The message-digest algorithm used to hash the original data.
* Use #MBEDTLS_MD_NONE for signing raw data.
- * \param hashlen The length of the message digest. Only used if \p md_alg is #MBEDTLS_MD_NONE.
- * \param hash The buffer holding the message digest.
- * \param sig The buffer to hold the ciphertext.
+ * \param hashlen The length of the message digest.
+ * Ths is only used if \p md_alg is #MBEDTLS_MD_NONE.
+ * \param hash The buffer holding the message digest or raw data.
+ * If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
+ * buffer of length \p hashlen Bytes. If \p md_alg is not
+ * #MBEDTLS_MD_NONE, it must be a readable buffer of length
+ * the size of the hash corresponding to \p md_alg.
+ * \param sig The buffer to hold the signature. This must be a writable
+ * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 if the signing operation was successful.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -933,9 +1033,6 @@ int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx,
* This is the generic wrapper for performing a PKCS#1
* verification using the mode from the context.
*
- * \note The \p sig buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \note For PKCS#1 v2.1 encoding, see comments on
* mbedtls_rsa_rsassa_pss_verify() about \p md_alg and
* \p hash_id.
@@ -947,17 +1044,28 @@ int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA public key context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA public key context to use.
+ * \param f_rng The RNG function to use. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. Otherwise, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a context.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE (deprecated).
* \param md_alg The message-digest algorithm used to hash the original data.
* Use #MBEDTLS_MD_NONE for signing raw data.
- * \param hashlen The length of the message digest. Only used if \p md_alg is #MBEDTLS_MD_NONE.
- * \param hash The buffer holding the message digest.
- * \param sig The buffer holding the ciphertext.
+ * \param hashlen The length of the message digest.
+ * This is only used if \p md_alg is #MBEDTLS_MD_NONE.
+ * \param hash The buffer holding the message digest or raw data.
+ * If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
+ * buffer of length \p hashlen Bytes. If \p md_alg is not
+ * #MBEDTLS_MD_NONE, it must be a readable buffer of length
+ * the size of the hash corresponding to \p md_alg.
+ * \param sig The buffer holding the signature. This must be a readable
+ * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 if the verify operation was successful.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -975,9 +1083,6 @@ int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx,
* \brief This function performs a PKCS#1 v1.5 verification
* operation (RSASSA-PKCS1-v1_5-VERIFY).
*
- * \note The \p sig buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \deprecated It is deprecated and discouraged to call this function
* in #MBEDTLS_RSA_PRIVATE mode. Future versions of the library
* are likely to remove the \p mode argument and have it
@@ -985,17 +1090,28 @@ int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA public key context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA public key context to use.
+ * \param f_rng The RNG function to use. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. Otherwise, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a context.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE (deprecated).
* \param md_alg The message-digest algorithm used to hash the original data.
* Use #MBEDTLS_MD_NONE for signing raw data.
- * \param hashlen The length of the message digest. Only used if \p md_alg is #MBEDTLS_MD_NONE.
- * \param hash The buffer holding the message digest.
- * \param sig The buffer holding the ciphertext.
+ * \param hashlen The length of the message digest.
+ * This is only used if \p md_alg is #MBEDTLS_MD_NONE.
+ * \param hash The buffer holding the message digest or raw data.
+ * If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
+ * buffer of length \p hashlen Bytes. If \p md_alg is not
+ * #MBEDTLS_MD_NONE, it must be a readable buffer of length
+ * the size of the hash corresponding to \p md_alg.
+ * \param sig The buffer holding the signature. This must be a readable
+ * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 if the verify operation was successful.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -1016,9 +1132,6 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx,
* The hash function for the MGF mask generating function
* is that specified in the RSA context.
*
- * \note The \p sig buffer must be as large as the size
- * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
- *
* \note The \p hash_id in the RSA context is the one used for the
* verification. \p md_alg in the function call is the type of
* hash that is verified. According to <em>RFC-3447: Public-Key
@@ -1034,17 +1147,28 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx,
*
* \note Alternative implementations of RSA need not support
* mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
- *
- * \param ctx The RSA public key context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
+ *
+ * \param ctx The initialized RSA public key context to use.
+ * \param f_rng The RNG function to use. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. Otherwise, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a context.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE (deprecated).
* \param md_alg The message-digest algorithm used to hash the original data.
* Use #MBEDTLS_MD_NONE for signing raw data.
- * \param hashlen The length of the message digest. Only used if \p md_alg is #MBEDTLS_MD_NONE.
- * \param hash The buffer holding the message digest.
- * \param sig The buffer holding the ciphertext.
+ * \param hashlen The length of the message digest.
+ * This is only used if \p md_alg is #MBEDTLS_MD_NONE.
+ * \param hash The buffer holding the message digest or raw data.
+ * If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
+ * buffer of length \p hashlen Bytes. If \p md_alg is not
+ * #MBEDTLS_MD_NONE, it must be a readable buffer of length
+ * the size of the hash corresponding to \p md_alg.
+ * \param sig The buffer holding the signature. This must be a readable
+ * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 if the verify operation was successful.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -1070,19 +1194,29 @@ int mbedtls_rsa_rsassa_pss_verify( mbedtls_rsa_context *ctx,
*
* \note The \p hash_id in the RSA context is ignored.
*
- * \param ctx The RSA public key context.
- * \param f_rng The RNG function. Only needed for #MBEDTLS_RSA_PRIVATE.
- * \param p_rng The RNG context.
- * \param mode #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
+ * \param ctx The initialized RSA public key context to use.
+ * \param f_rng The RNG function to use. If \p mode is #MBEDTLS_RSA_PRIVATE,
+ * this is used for blinding and should be provided; see
+ * mbedtls_rsa_private() for more. Otherwise, it is ignored.
+ * \param p_rng The RNG context to be passed to \p f_rng. This may be
+ * \c NULL if \p f_rng is \c NULL or doesn't need a context.
+ * \param mode The mode of operation. This must be either
+ * #MBEDTLS_RSA_PUBLIC or #MBEDTLS_RSA_PRIVATE.
* \param md_alg The message-digest algorithm used to hash the original data.
* Use #MBEDTLS_MD_NONE for signing raw data.
- * \param hashlen The length of the message digest. Only used if \p md_alg is
- * #MBEDTLS_MD_NONE.
- * \param hash The buffer holding the message digest.
- * \param mgf1_hash_id The message digest used for mask generation.
- * \param expected_salt_len The length of the salt used in padding. Use
- * #MBEDTLS_RSA_SALT_LEN_ANY to accept any salt length.
- * \param sig The buffer holding the ciphertext.
+ * \param hashlen The length of the message digest.
+ * This is only used if \p md_alg is #MBEDTLS_MD_NONE.
+ * \param hash The buffer holding the message digest or raw data.
+ * If \p md_alg is #MBEDTLS_MD_NONE, this must be a readable
+ * buffer of length \p hashlen Bytes. If \p md_alg is not
+ * #MBEDTLS_MD_NONE, it must be a readable buffer of length
+ * the size of the hash corresponding to \p md_alg.
+ * \param mgf1_hash_id The message digest used for mask generation.
+ * \param expected_salt_len The length of the salt used in padding. Use
+ * #MBEDTLS_RSA_SALT_LEN_ANY to accept any salt length.
+ * \param sig The buffer holding the signature. This must be a readable
+ * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
+ * for an 2048-bit RSA modulus.
*
* \return \c 0 if the verify operation was successful.
* \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.
@@ -1101,8 +1235,8 @@ int mbedtls_rsa_rsassa_pss_verify_ext( mbedtls_rsa_context *ctx,
/**
* \brief This function copies the components of an RSA context.
*
- * \param dst The destination context.
- * \param src The source context.
+ * \param dst The destination context. This must be initialized.
+ * \param src The source context. This must be initialized.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory allocation failure.
@@ -1112,7 +1246,9 @@ int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src )
/**
* \brief This function frees the components of an RSA key.
*
- * \param ctx The RSA Context to free.
+ * \param ctx The RSA context to free. May be \c NULL, in which case
+ * this function is a no-op. If it is not \c NULL, it must
+ * point to an initialized RSA context.
*/
void mbedtls_rsa_free( mbedtls_rsa_context *ctx );
diff --git a/thirdparty/mbedtls/include/mbedtls/sha1.h b/thirdparty/mbedtls/include/mbedtls/sha1.h
index 65a124c94b..38ea10b137 100644
--- a/thirdparty/mbedtls/include/mbedtls/sha1.h
+++ b/thirdparty/mbedtls/include/mbedtls/sha1.h
@@ -40,7 +40,9 @@
#include <stddef.h>
#include <stdint.h>
+/* MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED -0x0035 /**< SHA-1 hardware accelerator failed */
+#define MBEDTLS_ERR_SHA1_BAD_INPUT_DATA -0x0073 /**< SHA-1 input data was malformed. */
#ifdef __cplusplus
extern "C" {
@@ -58,7 +60,7 @@ extern "C" {
* stronger message digests instead.
*
*/
-typedef struct
+typedef struct mbedtls_sha1_context
{
uint32_t total[2]; /*!< The number of Bytes processed. */
uint32_t state[5]; /*!< The intermediate digest state. */
@@ -78,6 +80,7 @@ mbedtls_sha1_context;
* stronger message digests instead.
*
* \param ctx The SHA-1 context to initialize.
+ * This must not be \c NULL.
*
*/
void mbedtls_sha1_init( mbedtls_sha1_context *ctx );
@@ -89,7 +92,10 @@ void mbedtls_sha1_init( mbedtls_sha1_context *ctx );
* constitutes a security risk. We recommend considering
* stronger message digests instead.
*
- * \param ctx The SHA-1 context to clear.
+ * \param ctx The SHA-1 context to clear. This may be \c NULL,
+ * in which case this function does nothing. If it is
+ * not \c NULL, it must point to an initialized
+ * SHA-1 context.
*
*/
void mbedtls_sha1_free( mbedtls_sha1_context *ctx );
@@ -101,8 +107,8 @@ void mbedtls_sha1_free( mbedtls_sha1_context *ctx );
* constitutes a security risk. We recommend considering
* stronger message digests instead.
*
- * \param dst The SHA-1 context to clone to.
- * \param src The SHA-1 context to clone from.
+ * \param dst The SHA-1 context to clone to. This must be initialized.
+ * \param src The SHA-1 context to clone from. This must be initialized.
*
*/
void mbedtls_sha1_clone( mbedtls_sha1_context *dst,
@@ -115,9 +121,10 @@ void mbedtls_sha1_clone( mbedtls_sha1_context *dst,
* constitutes a security risk. We recommend considering
* stronger message digests instead.
*
- * \param ctx The SHA-1 context to initialize.
+ * \param ctx The SHA-1 context to initialize. This must be initialized.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*
*/
int mbedtls_sha1_starts_ret( mbedtls_sha1_context *ctx );
@@ -130,11 +137,14 @@ int mbedtls_sha1_starts_ret( mbedtls_sha1_context *ctx );
* constitutes a security risk. We recommend considering
* stronger message digests instead.
*
- * \param ctx The SHA-1 context.
+ * \param ctx The SHA-1 context. This must be initialized
+ * and have a hash operation started.
* \param input The buffer holding the input data.
- * \param ilen The length of the input data.
+ * This must be a readable buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data \p input in Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha1_update_ret( mbedtls_sha1_context *ctx,
const unsigned char *input,
@@ -148,10 +158,13 @@ int mbedtls_sha1_update_ret( mbedtls_sha1_context *ctx,
* constitutes a security risk. We recommend considering
* stronger message digests instead.
*
- * \param ctx The SHA-1 context.
- * \param output The SHA-1 checksum result.
+ * \param ctx The SHA-1 context to use. This must be initialized and
+ * have a hash operation started.
+ * \param output The SHA-1 checksum result. This must be a writable
+ * buffer of length \c 20 Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha1_finish_ret( mbedtls_sha1_context *ctx,
unsigned char output[20] );
@@ -163,10 +176,12 @@ int mbedtls_sha1_finish_ret( mbedtls_sha1_context *ctx,
* constitutes a security risk. We recommend considering
* stronger message digests instead.
*
- * \param ctx The SHA-1 context.
- * \param data The data block being processed.
+ * \param ctx The SHA-1 context to use. This must be initialized.
+ * \param data The data block being processed. This must be a
+ * readable buffer of length \c 64 Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*
*/
int mbedtls_internal_sha1_process( mbedtls_sha1_context *ctx,
@@ -187,7 +202,7 @@ int mbedtls_internal_sha1_process( mbedtls_sha1_context *ctx,
*
* \deprecated Superseded by mbedtls_sha1_starts_ret() in 2.7.0.
*
- * \param ctx The SHA-1 context to initialize.
+ * \param ctx The SHA-1 context to initialize. This must be initialized.
*
*/
MBEDTLS_DEPRECATED void mbedtls_sha1_starts( mbedtls_sha1_context *ctx );
@@ -202,9 +217,11 @@ MBEDTLS_DEPRECATED void mbedtls_sha1_starts( mbedtls_sha1_context *ctx );
*
* \deprecated Superseded by mbedtls_sha1_update_ret() in 2.7.0.
*
- * \param ctx The SHA-1 context.
+ * \param ctx The SHA-1 context. This must be initialized and
+ * have a hash operation started.
* \param input The buffer holding the input data.
- * \param ilen The length of the input data.
+ * This must be a readable buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data \p input in Bytes.
*
*/
MBEDTLS_DEPRECATED void mbedtls_sha1_update( mbedtls_sha1_context *ctx,
@@ -221,9 +238,10 @@ MBEDTLS_DEPRECATED void mbedtls_sha1_update( mbedtls_sha1_context *ctx,
*
* \deprecated Superseded by mbedtls_sha1_finish_ret() in 2.7.0.
*
- * \param ctx The SHA-1 context.
+ * \param ctx The SHA-1 context. This must be initialized and
+ * have a hash operation started.
* \param output The SHA-1 checksum result.
- *
+ * This must be a writable buffer of length \c 20 Bytes.
*/
MBEDTLS_DEPRECATED void mbedtls_sha1_finish( mbedtls_sha1_context *ctx,
unsigned char output[20] );
@@ -237,8 +255,9 @@ MBEDTLS_DEPRECATED void mbedtls_sha1_finish( mbedtls_sha1_context *ctx,
*
* \deprecated Superseded by mbedtls_internal_sha1_process() in 2.7.0.
*
- * \param ctx The SHA-1 context.
+ * \param ctx The SHA-1 context. This must be initialized.
* \param data The data block being processed.
+ * This must be a readable buffer of length \c 64 bytes.
*
*/
MBEDTLS_DEPRECATED void mbedtls_sha1_process( mbedtls_sha1_context *ctx,
@@ -261,10 +280,13 @@ MBEDTLS_DEPRECATED void mbedtls_sha1_process( mbedtls_sha1_context *ctx,
* stronger message digests instead.
*
* \param input The buffer holding the input data.
- * \param ilen The length of the input data.
+ * This must be a readable buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data \p input in Bytes.
* \param output The SHA-1 checksum result.
+ * This must be a writable buffer of length \c 20 Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*
*/
int mbedtls_sha1_ret( const unsigned char *input,
@@ -293,8 +315,10 @@ int mbedtls_sha1_ret( const unsigned char *input,
* \deprecated Superseded by mbedtls_sha1_ret() in 2.7.0
*
* \param input The buffer holding the input data.
- * \param ilen The length of the input data.
- * \param output The SHA-1 checksum result.
+ * This must be a readable buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data \p input in Bytes.
+ * \param output The SHA-1 checksum result. This must be a writable
+ * buffer of size \c 20 Bytes.
*
*/
MBEDTLS_DEPRECATED void mbedtls_sha1( const unsigned char *input,
diff --git a/thirdparty/mbedtls/include/mbedtls/sha256.h b/thirdparty/mbedtls/include/mbedtls/sha256.h
index adf31a82ed..0e42f0abba 100644
--- a/thirdparty/mbedtls/include/mbedtls/sha256.h
+++ b/thirdparty/mbedtls/include/mbedtls/sha256.h
@@ -36,7 +36,9 @@
#include <stddef.h>
#include <stdint.h>
+/* MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED -0x0037 /**< SHA-256 hardware accelerator failed */
+#define MBEDTLS_ERR_SHA256_BAD_INPUT_DATA -0x0074 /**< SHA-256 input data was malformed. */
#ifdef __cplusplus
extern "C" {
@@ -53,7 +55,7 @@ extern "C" {
* checksum calculations. The choice between these two is
* made in the call to mbedtls_sha256_starts_ret().
*/
-typedef struct
+typedef struct mbedtls_sha256_context
{
uint32_t total[2]; /*!< The number of Bytes processed. */
uint32_t state[8]; /*!< The intermediate digest state. */
@@ -70,22 +72,24 @@ mbedtls_sha256_context;
/**
* \brief This function initializes a SHA-256 context.
*
- * \param ctx The SHA-256 context to initialize.
+ * \param ctx The SHA-256 context to initialize. This must not be \c NULL.
*/
void mbedtls_sha256_init( mbedtls_sha256_context *ctx );
/**
* \brief This function clears a SHA-256 context.
*
- * \param ctx The SHA-256 context to clear.
+ * \param ctx The SHA-256 context to clear. This may be \c NULL, in which
+ * case this function returns immediately. If it is not \c NULL,
+ * it must point to an initialized SHA-256 context.
*/
void mbedtls_sha256_free( mbedtls_sha256_context *ctx );
/**
* \brief This function clones the state of a SHA-256 context.
*
- * \param dst The destination context.
- * \param src The context to clone.
+ * \param dst The destination context. This must be initialized.
+ * \param src The context to clone. This must be initialized.
*/
void mbedtls_sha256_clone( mbedtls_sha256_context *dst,
const mbedtls_sha256_context *src );
@@ -94,11 +98,12 @@ void mbedtls_sha256_clone( mbedtls_sha256_context *dst,
* \brief This function starts a SHA-224 or SHA-256 checksum
* calculation.
*
- * \param ctx The context to initialize.
- * \param is224 Determines which function to use:
- * 0: Use SHA-256, or 1: Use SHA-224.
+ * \param ctx The context to use. This must be initialized.
+ * \param is224 This determines which function to use. This must be
+ * either \c 0 for SHA-256, or \c 1 for SHA-224.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha256_starts_ret( mbedtls_sha256_context *ctx, int is224 );
@@ -106,11 +111,14 @@ int mbedtls_sha256_starts_ret( mbedtls_sha256_context *ctx, int is224 );
* \brief This function feeds an input buffer into an ongoing
* SHA-256 checksum calculation.
*
- * \param ctx The SHA-256 context.
- * \param input The buffer holding the data.
- * \param ilen The length of the input data.
+ * \param ctx The SHA-256 context. This must be initialized
+ * and have a hash operation started.
+ * \param input The buffer holding the data. This must be a readable
+ * buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha256_update_ret( mbedtls_sha256_context *ctx,
const unsigned char *input,
@@ -120,10 +128,13 @@ int mbedtls_sha256_update_ret( mbedtls_sha256_context *ctx,
* \brief This function finishes the SHA-256 operation, and writes
* the result to the output buffer.
*
- * \param ctx The SHA-256 context.
+ * \param ctx The SHA-256 context. This must be initialized
+ * and have a hash operation started.
* \param output The SHA-224 or SHA-256 checksum result.
+ * This must be a writable buffer of length \c 32 Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha256_finish_ret( mbedtls_sha256_context *ctx,
unsigned char output[32] );
@@ -133,10 +144,12 @@ int mbedtls_sha256_finish_ret( mbedtls_sha256_context *ctx,
* the ongoing SHA-256 computation. This function is for
* internal use only.
*
- * \param ctx The SHA-256 context.
- * \param data The buffer holding one block of data.
+ * \param ctx The SHA-256 context. This must be initialized.
+ * \param data The buffer holding one block of data. This must
+ * be a readable buffer of length \c 64 Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_internal_sha256_process( mbedtls_sha256_context *ctx,
const unsigned char data[64] );
@@ -151,12 +164,11 @@ int mbedtls_internal_sha256_process( mbedtls_sha256_context *ctx,
* \brief This function starts a SHA-224 or SHA-256 checksum
* calculation.
*
- *
* \deprecated Superseded by mbedtls_sha256_starts_ret() in 2.7.0.
*
- * \param ctx The context to initialize.
- * \param is224 Determines which function to use:
- * 0: Use SHA-256, or 1: Use SHA-224.
+ * \param ctx The context to use. This must be initialized.
+ * \param is224 Determines which function to use. This must be
+ * either \c 0 for SHA-256, or \c 1 for SHA-224.
*/
MBEDTLS_DEPRECATED void mbedtls_sha256_starts( mbedtls_sha256_context *ctx,
int is224 );
@@ -167,9 +179,11 @@ MBEDTLS_DEPRECATED void mbedtls_sha256_starts( mbedtls_sha256_context *ctx,
*
* \deprecated Superseded by mbedtls_sha256_update_ret() in 2.7.0.
*
- * \param ctx The SHA-256 context to initialize.
- * \param input The buffer holding the data.
- * \param ilen The length of the input data.
+ * \param ctx The SHA-256 context to use. This must be
+ * initialized and have a hash operation started.
+ * \param input The buffer holding the data. This must be a readable
+ * buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
*/
MBEDTLS_DEPRECATED void mbedtls_sha256_update( mbedtls_sha256_context *ctx,
const unsigned char *input,
@@ -181,8 +195,10 @@ MBEDTLS_DEPRECATED void mbedtls_sha256_update( mbedtls_sha256_context *ctx,
*
* \deprecated Superseded by mbedtls_sha256_finish_ret() in 2.7.0.
*
- * \param ctx The SHA-256 context.
- * \param output The SHA-224 or SHA-256 checksum result.
+ * \param ctx The SHA-256 context. This must be initialized and
+ * have a hash operation started.
+ * \param output The SHA-224 or SHA-256 checksum result. This must be
+ * a writable buffer of length \c 32 Bytes.
*/
MBEDTLS_DEPRECATED void mbedtls_sha256_finish( mbedtls_sha256_context *ctx,
unsigned char output[32] );
@@ -194,8 +210,9 @@ MBEDTLS_DEPRECATED void mbedtls_sha256_finish( mbedtls_sha256_context *ctx,
*
* \deprecated Superseded by mbedtls_internal_sha256_process() in 2.7.0.
*
- * \param ctx The SHA-256 context.
- * \param data The buffer holding one block of data.
+ * \param ctx The SHA-256 context. This must be initialized.
+ * \param data The buffer holding one block of data. This must be
+ * a readable buffer of size \c 64 Bytes.
*/
MBEDTLS_DEPRECATED void mbedtls_sha256_process( mbedtls_sha256_context *ctx,
const unsigned char data[64] );
@@ -213,11 +230,13 @@ MBEDTLS_DEPRECATED void mbedtls_sha256_process( mbedtls_sha256_context *ctx,
* The SHA-256 result is calculated as
* output = SHA-256(input buffer).
*
- * \param input The buffer holding the input data.
- * \param ilen The length of the input data.
- * \param output The SHA-224 or SHA-256 checksum result.
- * \param is224 Determines which function to use:
- * 0: Use SHA-256, or 1: Use SHA-224.
+ * \param input The buffer holding the data. This must be a readable
+ * buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
+ * \param output The SHA-224 or SHA-256 checksum result. This must
+ * be a writable buffer of length \c 32 Bytes.
+ * \param is224 Determines which function to use. This must be
+ * either \c 0 for SHA-256, or \c 1 for SHA-224.
*/
int mbedtls_sha256_ret( const unsigned char *input,
size_t ilen,
@@ -243,11 +262,13 @@ int mbedtls_sha256_ret( const unsigned char *input,
*
* \deprecated Superseded by mbedtls_sha256_ret() in 2.7.0.
*
- * \param input The buffer holding the data.
- * \param ilen The length of the input data.
- * \param output The SHA-224 or SHA-256 checksum result.
- * \param is224 Determines which function to use:
- * 0: Use SHA-256, or 1: Use SHA-224.
+ * \param input The buffer holding the data. This must be a readable
+ * buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
+ * \param output The SHA-224 or SHA-256 checksum result. This must be
+ * a writable buffer of length \c 32 Bytes.
+ * \param is224 Determines which function to use. This must be either
+ * \c 0 for SHA-256, or \c 1 for SHA-224.
*/
MBEDTLS_DEPRECATED void mbedtls_sha256( const unsigned char *input,
size_t ilen,
diff --git a/thirdparty/mbedtls/include/mbedtls/sha512.h b/thirdparty/mbedtls/include/mbedtls/sha512.h
index 5bb83f43bd..7b26cf5cc3 100644
--- a/thirdparty/mbedtls/include/mbedtls/sha512.h
+++ b/thirdparty/mbedtls/include/mbedtls/sha512.h
@@ -35,7 +35,9 @@
#include <stddef.h>
#include <stdint.h>
+/* MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED -0x0039 /**< SHA-512 hardware accelerator failed */
+#define MBEDTLS_ERR_SHA512_BAD_INPUT_DATA -0x0075 /**< SHA-512 input data was malformed. */
#ifdef __cplusplus
extern "C" {
@@ -52,7 +54,7 @@ extern "C" {
* checksum calculations. The choice between these two is
* made in the call to mbedtls_sha512_starts_ret().
*/
-typedef struct
+typedef struct mbedtls_sha512_context
{
uint64_t total[2]; /*!< The number of Bytes processed. */
uint64_t state[8]; /*!< The intermediate digest state. */
@@ -69,22 +71,26 @@ mbedtls_sha512_context;
/**
* \brief This function initializes a SHA-512 context.
*
- * \param ctx The SHA-512 context to initialize.
+ * \param ctx The SHA-512 context to initialize. This must
+ * not be \c NULL.
*/
void mbedtls_sha512_init( mbedtls_sha512_context *ctx );
/**
* \brief This function clears a SHA-512 context.
*
- * \param ctx The SHA-512 context to clear.
+ * \param ctx The SHA-512 context to clear. This may be \c NULL,
+ * in which case this function does nothing. If it
+ * is not \c NULL, it must point to an initialized
+ * SHA-512 context.
*/
void mbedtls_sha512_free( mbedtls_sha512_context *ctx );
/**
* \brief This function clones the state of a SHA-512 context.
*
- * \param dst The destination context.
- * \param src The context to clone.
+ * \param dst The destination context. This must be initialized.
+ * \param src The context to clone. This must be initialized.
*/
void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
const mbedtls_sha512_context *src );
@@ -93,11 +99,12 @@ void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
* \brief This function starts a SHA-384 or SHA-512 checksum
* calculation.
*
- * \param ctx The SHA-512 context to initialize.
- * \param is384 Determines which function to use:
- * 0: Use SHA-512, or 1: Use SHA-384.
+ * \param ctx The SHA-512 context to use. This must be initialized.
+ * \param is384 Determines which function to use. This must be
+ * either \c for SHA-512, or \c 1 for SHA-384.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha512_starts_ret( mbedtls_sha512_context *ctx, int is384 );
@@ -105,11 +112,14 @@ int mbedtls_sha512_starts_ret( mbedtls_sha512_context *ctx, int is384 );
* \brief This function feeds an input buffer into an ongoing
* SHA-512 checksum calculation.
*
- * \param ctx The SHA-512 context.
- * \param input The buffer holding the input data.
- * \param ilen The length of the input data.
+ * \param ctx The SHA-512 context. This must be initialized
+ * and have a hash operation started.
+ * \param input The buffer holding the input data. This must
+ * be a readable buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha512_update_ret( mbedtls_sha512_context *ctx,
const unsigned char *input,
@@ -120,10 +130,13 @@ int mbedtls_sha512_update_ret( mbedtls_sha512_context *ctx,
* the result to the output buffer. This function is for
* internal use only.
*
- * \param ctx The SHA-512 context.
+ * \param ctx The SHA-512 context. This must be initialized
+ * and have a hash operation started.
* \param output The SHA-384 or SHA-512 checksum result.
+ * This must be a writable buffer of length \c 64 Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
unsigned char output[64] );
@@ -132,10 +145,12 @@ int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
* \brief This function processes a single data block within
* the ongoing SHA-512 computation.
*
- * \param ctx The SHA-512 context.
- * \param data The buffer holding one block of data.
+ * \param ctx The SHA-512 context. This must be initialized.
+ * \param data The buffer holding one block of data. This
+ * must be a readable buffer of length \c 128 Bytes.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_internal_sha512_process( mbedtls_sha512_context *ctx,
const unsigned char data[128] );
@@ -151,9 +166,9 @@ int mbedtls_internal_sha512_process( mbedtls_sha512_context *ctx,
*
* \deprecated Superseded by mbedtls_sha512_starts_ret() in 2.7.0
*
- * \param ctx The SHA-512 context to initialize.
- * \param is384 Determines which function to use:
- * 0: Use SHA-512, or 1: Use SHA-384.
+ * \param ctx The SHA-512 context to use. This must be initialized.
+ * \param is384 Determines which function to use. This must be either
+ * \c 0 for SHA-512 or \c 1 for SHA-384.
*/
MBEDTLS_DEPRECATED void mbedtls_sha512_starts( mbedtls_sha512_context *ctx,
int is384 );
@@ -164,9 +179,11 @@ MBEDTLS_DEPRECATED void mbedtls_sha512_starts( mbedtls_sha512_context *ctx,
*
* \deprecated Superseded by mbedtls_sha512_update_ret() in 2.7.0.
*
- * \param ctx The SHA-512 context.
- * \param input The buffer holding the data.
- * \param ilen The length of the input data.
+ * \param ctx The SHA-512 context. This must be initialized
+ * and have a hash operation started.
+ * \param input The buffer holding the data. This must be a readable
+ * buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
*/
MBEDTLS_DEPRECATED void mbedtls_sha512_update( mbedtls_sha512_context *ctx,
const unsigned char *input,
@@ -178,8 +195,10 @@ MBEDTLS_DEPRECATED void mbedtls_sha512_update( mbedtls_sha512_context *ctx,
*
* \deprecated Superseded by mbedtls_sha512_finish_ret() in 2.7.0.
*
- * \param ctx The SHA-512 context.
- * \param output The SHA-384 or SHA-512 checksum result.
+ * \param ctx The SHA-512 context. This must be initialized
+ * and have a hash operation started.
+ * \param output The SHA-384 or SHA-512 checksum result. This must
+ * be a writable buffer of size \c 64 Bytes.
*/
MBEDTLS_DEPRECATED void mbedtls_sha512_finish( mbedtls_sha512_context *ctx,
unsigned char output[64] );
@@ -191,8 +210,9 @@ MBEDTLS_DEPRECATED void mbedtls_sha512_finish( mbedtls_sha512_context *ctx,
*
* \deprecated Superseded by mbedtls_internal_sha512_process() in 2.7.0.
*
- * \param ctx The SHA-512 context.
- * \param data The buffer holding one block of data.
+ * \param ctx The SHA-512 context. This must be initialized.
+ * \param data The buffer holding one block of data. This must be
+ * a readable buffer of length \c 128 Bytes.
*/
MBEDTLS_DEPRECATED void mbedtls_sha512_process(
mbedtls_sha512_context *ctx,
@@ -211,13 +231,16 @@ MBEDTLS_DEPRECATED void mbedtls_sha512_process(
* The SHA-512 result is calculated as
* output = SHA-512(input buffer).
*
- * \param input The buffer holding the input data.
- * \param ilen The length of the input data.
+ * \param input The buffer holding the input data. This must be
+ * a readable buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
* \param output The SHA-384 or SHA-512 checksum result.
- * \param is384 Determines which function to use:
- * 0: Use SHA-512, or 1: Use SHA-384.
+ * This must be a writable buffer of length \c 64 Bytes.
+ * \param is384 Determines which function to use. This must be either
+ * \c 0 for SHA-512, or \c 1 for SHA-384.
*
* \return \c 0 on success.
+ * \return A negative error code on failure.
*/
int mbedtls_sha512_ret( const unsigned char *input,
size_t ilen,
@@ -242,11 +265,13 @@ int mbedtls_sha512_ret( const unsigned char *input,
*
* \deprecated Superseded by mbedtls_sha512_ret() in 2.7.0
*
- * \param input The buffer holding the data.
- * \param ilen The length of the input data.
- * \param output The SHA-384 or SHA-512 checksum result.
- * \param is384 Determines which function to use:
- * 0: Use SHA-512, or 1: Use SHA-384.
+ * \param input The buffer holding the data. This must be a
+ * readable buffer of length \p ilen Bytes.
+ * \param ilen The length of the input data in Bytes.
+ * \param output The SHA-384 or SHA-512 checksum result. This must
+ * be a writable buffer of length \c 64 Bytes.
+ * \param is384 Determines which function to use. This must be either
+ * \c 0 for SHA-512, or \c 1 for SHA-384.
*/
MBEDTLS_DEPRECATED void mbedtls_sha512( const unsigned char *input,
size_t ilen,
diff --git a/thirdparty/mbedtls/include/mbedtls/ssl.h b/thirdparty/mbedtls/include/mbedtls/ssl.h
index 2d511a8ea1..8106bb4ab0 100644
--- a/thirdparty/mbedtls/include/mbedtls/ssl.h
+++ b/thirdparty/mbedtls/include/mbedtls/ssl.h
@@ -121,6 +121,8 @@
#define MBEDTLS_ERR_SSL_INVALID_VERIFY_HASH -0x6600 /**< Couldn't set the hash for verifying CertificateVerify */
#define MBEDTLS_ERR_SSL_CONTINUE_PROCESSING -0x6580 /**< Internal-only message signaling that further message-processing should be done */
#define MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS -0x6500 /**< The asynchronous operation is not completed yet. */
+#define MBEDTLS_ERR_SSL_EARLY_MESSAGE -0x6480 /**< Internal-only message signaling that a message arrived early. */
+#define MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS -0x7000 /**< A cryptographic operation is in progress. Try again later. */
/*
* Various constants
@@ -242,6 +244,14 @@
#define MBEDTLS_SSL_OUT_CONTENT_LEN MBEDTLS_SSL_MAX_CONTENT_LEN
#endif
+/*
+ * Maximum number of heap-allocated bytes for the purpose of
+ * DTLS handshake message reassembly and future message buffering.
+ */
+#if !defined(MBEDTLS_SSL_DTLS_MAX_BUFFERING)
+#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
+#endif
+
/* \} name SECTION: Module settings */
/*
@@ -1022,14 +1032,14 @@ struct mbedtls_ssl_context
int renego_records_seen; /*!< Records since renego request, or with DTLS,
number of retransmissions of request if
renego_max_records is < 0 */
-#endif
+#endif /* MBEDTLS_SSL_RENEGOTIATION */
int major_ver; /*!< equal to MBEDTLS_SSL_MAJOR_VERSION_3 */
int minor_ver; /*!< either 0 (SSL3) or 1 (TLS1.0) */
#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT)
unsigned badmac_seen; /*!< records with a bad MAC received */
-#endif
+#endif /* MBEDTLS_SSL_DTLS_BADMAC_LIMIT */
mbedtls_ssl_send_t *f_send; /*!< Callback for network send */
mbedtls_ssl_recv_t *f_recv; /*!< Callback for network receive */
@@ -1085,11 +1095,11 @@ struct mbedtls_ssl_context
uint16_t in_epoch; /*!< DTLS epoch for incoming records */
size_t next_record_offset; /*!< offset of the next record in datagram
(equal to in_left if none) */
-#endif
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
uint64_t in_window_top; /*!< last validated record seq_num */
uint64_t in_window; /*!< bitmask for replay detection */
-#endif
+#endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */
size_t in_hslen; /*!< current handshake message length,
including the handshake header */
@@ -1098,6 +1108,11 @@ struct mbedtls_ssl_context
int keep_current_message; /*!< drop or reuse current message
on next call to record layer? */
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ uint8_t disable_datagram_packing; /*!< Disable packing multiple records
+ * within a single datagram. */
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
/*
* Record layer (outgoing data)
*/
@@ -1112,12 +1127,18 @@ struct mbedtls_ssl_context
size_t out_msglen; /*!< record header: message length */
size_t out_left; /*!< amount of data not yet written */
+ unsigned char cur_out_ctr[8]; /*!< Outgoing record sequence number. */
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ uint16_t mtu; /*!< path mtu, used to fragment outgoing messages */
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
#if defined(MBEDTLS_ZLIB_SUPPORT)
unsigned char *compress_buf; /*!< zlib data buffer */
-#endif
+#endif /* MBEDTLS_ZLIB_SUPPORT */
#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING)
signed char split_done; /*!< current record already splitted? */
-#endif
+#endif /* MBEDTLS_SSL_CBC_RECORD_SPLITTING */
/*
* PKI layer
@@ -1130,11 +1151,11 @@ struct mbedtls_ssl_context
#if defined(MBEDTLS_X509_CRT_PARSE_C)
char *hostname; /*!< expected peer CN for verification
(and SNI if available) */
-#endif
+#endif /* MBEDTLS_X509_CRT_PARSE_C */
#if defined(MBEDTLS_SSL_ALPN)
const char *alpn_chosen; /*!< negotiated protocol */
-#endif
+#endif /* MBEDTLS_SSL_ALPN */
/*
* Information for DTLS hello verify
@@ -1142,7 +1163,7 @@ struct mbedtls_ssl_context
#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C)
unsigned char *cli_id; /*!< transport-level ID of the client */
size_t cli_id_len; /*!< length of cli_id */
-#endif
+#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY && MBEDTLS_SSL_SRV_C */
/*
* Secure renegotiation
@@ -1154,7 +1175,7 @@ struct mbedtls_ssl_context
size_t verify_data_len; /*!< length of verify data stored */
char own_verify_data[MBEDTLS_SSL_VERIFY_DATA_MAX_LEN]; /*!< previous handshake verify data */
char peer_verify_data[MBEDTLS_SSL_VERIFY_DATA_MAX_LEN]; /*!< previous handshake verify data */
-#endif
+#endif /* MBEDTLS_SSL_RENEGOTIATION */
};
#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL)
@@ -1374,6 +1395,52 @@ void mbedtls_ssl_set_bio( mbedtls_ssl_context *ssl,
mbedtls_ssl_recv_t *f_recv,
mbedtls_ssl_recv_timeout_t *f_recv_timeout );
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+/**
+ * \brief Set the Maximum Tranport Unit (MTU).
+ * Special value: 0 means unset (no limit).
+ * This represents the maximum size of a datagram payload
+ * handled by the transport layer (usually UDP) as determined
+ * by the network link and stack. In practice, this controls
+ * the maximum size datagram the DTLS layer will pass to the
+ * \c f_send() callback set using \c mbedtls_ssl_set_bio().
+ *
+ * \note The limit on datagram size is converted to a limit on
+ * record payload by subtracting the current overhead of
+ * encapsulation and encryption/authentication if any.
+ *
+ * \note This can be called at any point during the connection, for
+ * example when a Path Maximum Transfer Unit (PMTU)
+ * estimate becomes available from other sources,
+ * such as lower (or higher) protocol layers.
+ *
+ * \note This setting only controls the size of the packets we send,
+ * and does not restrict the size of the datagrams we're
+ * willing to receive. Client-side, you can request the
+ * server to use smaller records with \c
+ * mbedtls_ssl_conf_max_frag_len().
+ *
+ * \note If both a MTU and a maximum fragment length have been
+ * configured (or negotiated with the peer), the resulting
+ * lower limit on record payload (see first note) is used.
+ *
+ * \note This can only be used to decrease the maximum size
+ * of datagrams (hence records, see first note) sent. It
+ * cannot be used to increase the maximum size of records over
+ * the limit set by #MBEDTLS_SSL_OUT_CONTENT_LEN.
+ *
+ * \note Values lower than the current record layer expansion will
+ * result in an error when trying to send data.
+ *
+ * \note Using record compression together with a non-zero MTU value
+ * will result in an error when trying to send data.
+ *
+ * \param ssl SSL context
+ * \param mtu Value of the path MTU in bytes
+ */
+void mbedtls_ssl_set_mtu( mbedtls_ssl_context *ssl, uint16_t mtu );
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
/**
* \brief Set the timeout period for mbedtls_ssl_read()
* (Default: no timeout.)
@@ -1757,6 +1824,38 @@ void mbedtls_ssl_conf_dtls_badmac_limit( mbedtls_ssl_config *conf, unsigned limi
#endif /* MBEDTLS_SSL_DTLS_BADMAC_LIMIT */
#if defined(MBEDTLS_SSL_PROTO_DTLS)
+
+/**
+ * \brief Allow or disallow packing of multiple handshake records
+ * within a single datagram.
+ *
+ * \param ssl The SSL context to configure.
+ * \param allow_packing This determines whether datagram packing may
+ * be used or not. A value of \c 0 means that every
+ * record will be sent in a separate datagram; a
+ * value of \c 1 means that, if space permits,
+ * multiple handshake messages (including CCS) belonging to
+ * a single flight may be packed within a single datagram.
+ *
+ * \note This is enabled by default and should only be disabled
+ * for test purposes, or if datagram packing causes
+ * interoperability issues with peers that don't support it.
+ *
+ * \note Allowing datagram packing reduces the network load since
+ * there's less overhead if multiple messages share the same
+ * datagram. Also, it increases the handshake efficiency
+ * since messages belonging to a single datagram will not
+ * be reordered in transit, and so future message buffering
+ * or flight retransmission (if no buffering is used) as
+ * means to deal with reordering are needed less frequently.
+ *
+ * \note Application records are not affected by this option and
+ * are currently always sent in separate datagrams.
+ *
+ */
+void mbedtls_ssl_set_datagram_packing( mbedtls_ssl_context *ssl,
+ unsigned allow_packing );
+
/**
* \brief Set retransmit timeout values for the DTLS handshake.
* (DTLS only, no effect on TLS.)
@@ -1945,6 +2044,14 @@ void mbedtls_ssl_conf_ca_chain( mbedtls_ssl_config *conf,
* whether it matches those preferences - the server can then
* decide what it wants to do with it.
*
+ * \note The provided \p pk_key needs to match the public key in the
+ * first certificate in \p own_cert, or all handshakes using
+ * that certificate will fail. It is your responsibility
+ * to ensure that; this function will not perform any check.
+ * You may use mbedtls_pk_check_pair() in order to perform
+ * this check yourself, but be aware that this function can
+ * be computationally expensive on some key types.
+ *
* \param conf SSL configuration
* \param own_cert own public certificate chain
* \param pk_key own private key
@@ -2433,6 +2540,18 @@ void mbedtls_ssl_conf_cert_req_ca_list( mbedtls_ssl_config *conf,
* (Client: set maximum fragment length to emit *and*
* negotiate with the server during handshake)
*
+ * \note With TLS, this currently only affects ApplicationData (sent
+ * with \c mbedtls_ssl_read()), not handshake messages.
+ * With DTLS, this affects both ApplicationData and handshake.
+ *
+ * \note This sets the maximum length for a record's payload,
+ * excluding record overhead that will be added to it, see
+ * \c mbedtls_ssl_get_record_expansion().
+ *
+ * \note For DTLS, it is also possible to set a limit for the total
+ * size of daragrams passed to the transport layer, including
+ * record overhead, see \c mbedtls_ssl_set_mtu().
+ *
* \param conf SSL configuration
* \param mfl_code Code for maximum fragment length (allowed values:
* MBEDTLS_SSL_MAX_FRAG_LEN_512, MBEDTLS_SSL_MAX_FRAG_LEN_1024,
@@ -2663,13 +2782,14 @@ size_t mbedtls_ssl_get_bytes_avail( const mbedtls_ssl_context *ssl );
/**
* \brief Return the result of the certificate verification
*
- * \param ssl SSL context
+ * \param ssl The SSL context to use.
*
- * \return 0 if successful,
- * -1 if result is not available (eg because the handshake was
- * aborted too early), or
- * a combination of BADCERT_xxx and BADCRL_xxx flags, see
- * x509.h
+ * \return \c 0 if the certificate verification was successful.
+ * \return \c -1u if the result is not available. This may happen
+ * e.g. if the handshake aborts early, or a verification
+ * callback returned a fatal error.
+ * \return A bitwise combination of \c MBEDTLS_X509_BADCERT_XXX
+ * and \c MBEDTLS_X509_BADCRL_XXX failure flags; see x509.h.
*/
uint32_t mbedtls_ssl_get_verify_result( const mbedtls_ssl_context *ssl );
@@ -2695,6 +2815,9 @@ const char *mbedtls_ssl_get_version( const mbedtls_ssl_context *ssl );
* \brief Return the (maximum) number of bytes added by the record
* layer: header + encryption/MAC overhead (inc. padding)
*
+ * \note This function is not available (always returns an error)
+ * when record compression is enabled.
+ *
* \param ssl SSL context
*
* \return Current maximum record expansion in bytes, or
@@ -2709,6 +2832,23 @@ int mbedtls_ssl_get_record_expansion( const mbedtls_ssl_context *ssl );
* This is the value negotiated with peer if any,
* or the locally configured value.
*
+ * \sa mbedtls_ssl_conf_max_frag_len()
+ * \sa mbedtls_ssl_get_max_record_payload()
+ *
+ * \param ssl SSL context
+ *
+ * \return Current maximum fragment length.
+ */
+size_t mbedtls_ssl_get_max_frag_len( const mbedtls_ssl_context *ssl );
+#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
+
+/**
+ * \brief Return the current maximum outgoing record payload in bytes.
+ * This takes into account the config.h setting \c
+ * MBEDTLS_SSL_OUT_CONTENT_LEN, the configured and negotiated
+ * max fragment length extension if used, and for DTLS the
+ * path MTU as configured and current record expansion.
+ *
* \note With DTLS, \c mbedtls_ssl_write() will return an error if
* called with a larger length value.
* With TLS, \c mbedtls_ssl_write() will fragment the input if
@@ -2716,12 +2856,19 @@ int mbedtls_ssl_get_record_expansion( const mbedtls_ssl_context *ssl );
* to the caller to call \c mbedtls_ssl_write() again in
* order to send the remaining bytes if any.
*
+ * \note This function is not available (always returns an error)
+ * when record compression is enabled.
+ *
+ * \sa mbedtls_ssl_set_mtu()
+ * \sa mbedtls_ssl_get_max_frag_len()
+ * \sa mbedtls_ssl_get_record_expansion()
+ *
* \param ssl SSL context
*
- * \return Current maximum fragment length.
+ * \return Current maximum payload for an outgoing record,
+ * or a negative error code.
*/
-size_t mbedtls_ssl_get_max_frag_len( const mbedtls_ssl_context *ssl );
-#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
+int mbedtls_ssl_get_max_out_record_payload( const mbedtls_ssl_context *ssl );
#if defined(MBEDTLS_X509_CRT_PARSE_C)
/**
@@ -2776,35 +2923,50 @@ int mbedtls_ssl_get_session( const mbedtls_ssl_context *ssl, mbedtls_ssl_session
*
* \param ssl SSL context
*
- * \return 0 if successful, or
- * MBEDTLS_ERR_SSL_WANT_READ or MBEDTLS_ERR_SSL_WANT_WRITE, or
- * MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED (see below), or
- * a specific SSL error code.
+ * \return \c 0 if successful.
+ * \return #MBEDTLS_ERR_SSL_WANT_READ or #MBEDTLS_ERR_SSL_WANT_WRITE
+ * if the handshake is incomplete and waiting for data to
+ * be available for reading from or writing to the underlying
+ * transport - in this case you must call this function again
+ * when the underlying transport is ready for the operation.
+ * \return #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS if an asynchronous
+ * operation is in progress (see
+ * mbedtls_ssl_conf_async_private_cb()) - in this case you
+ * must call this function again when the operation is ready.
+ * \return #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS if a cryptographic
+ * operation is in progress (see mbedtls_ecp_set_max_ops()) -
+ * in this case you must call this function again to complete
+ * the handshake when you're done attending other tasks.
+ * \return #MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED if DTLS is in use
+ * and the client did not demonstrate reachability yet - in
+ * this case you must stop using the context (see below).
+ * \return Another SSL error code - in this case you must stop using
+ * the context (see below).
+ *
+ * \warning If this function returns something other than
+ * \c 0,
+ * #MBEDTLS_ERR_SSL_WANT_READ,
+ * #MBEDTLS_ERR_SSL_WANT_WRITE,
+ * #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS or
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS,
+ * you must stop using the SSL context for reading or writing,
+ * and either free it or call \c mbedtls_ssl_session_reset()
+ * on it before re-using it for a new connection; the current
+ * connection must be closed.
*
- * If this function returns MBEDTLS_ERR_SSL_WANT_READ, the
- * handshake is unfinished and no further data is available
- * from the underlying transport. In this case, you must call
- * the function again at some later stage.
+ * \note If DTLS is in use, then you may choose to handle
+ * #MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED specially for logging
+ * purposes, as it is an expected return value rather than an
+ * actual error, but you still need to reset/free the context.
*
* \note Remarks regarding event-driven DTLS:
- * If the function returns MBEDTLS_ERR_SSL_WANT_READ, no datagram
+ * If the function returns #MBEDTLS_ERR_SSL_WANT_READ, no datagram
* from the underlying transport layer is currently being processed,
* and it is safe to idle until the timer or the underlying transport
* signal a new event. This is not true for a successful handshake,
* in which case the datagram of the underlying transport that is
* currently being processed might or might not contain further
* DTLS records.
- *
- * \note If this function returns something other than 0 or
- * MBEDTLS_ERR_SSL_WANT_READ/WRITE, you must stop using
- * the SSL context for reading or writing, and either free it or
- * call \c mbedtls_ssl_session_reset() on it before re-using it
- * for a new connection; the current connection must be closed.
- *
- * \note If DTLS is in use, then you may choose to handle
- * MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED specially for logging
- * purposes, as it is an expected return value rather than an
- * actual error, but you still need to reset/free the context.
*/
int mbedtls_ssl_handshake( mbedtls_ssl_context *ssl );
@@ -2812,20 +2974,21 @@ int mbedtls_ssl_handshake( mbedtls_ssl_context *ssl );
* \brief Perform a single step of the SSL handshake
*
* \note The state of the context (ssl->state) will be at
- * the next state after execution of this function. Do not
+ * the next state after this function returns \c 0. Do not
* call this function if state is MBEDTLS_SSL_HANDSHAKE_OVER.
*
- * \note If this function returns something other than 0 or
- * MBEDTLS_ERR_SSL_WANT_READ/WRITE, you must stop using
- * the SSL context for reading or writing, and either free it or
- * call \c mbedtls_ssl_session_reset() on it before re-using it
- * for a new connection; the current connection must be closed.
- *
* \param ssl SSL context
*
- * \return 0 if successful, or
- * MBEDTLS_ERR_SSL_WANT_READ or MBEDTLS_ERR_SSL_WANT_WRITE, or
- * a specific SSL error code.
+ * \return See mbedtls_ssl_handshake().
+ *
+ * \warning If this function returns something other than \c 0,
+ * #MBEDTLS_ERR_SSL_WANT_READ, #MBEDTLS_ERR_SSL_WANT_WRITE,
+ * #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS or
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS, you must stop using
+ * the SSL context for reading or writing, and either free it
+ * or call \c mbedtls_ssl_session_reset() on it before
+ * re-using it for a new connection; the current connection
+ * must be closed.
*/
int mbedtls_ssl_handshake_step( mbedtls_ssl_context *ssl );
@@ -2840,13 +3003,18 @@ int mbedtls_ssl_handshake_step( mbedtls_ssl_context *ssl );
* \param ssl SSL context
*
* \return 0 if successful, or any mbedtls_ssl_handshake() return
- * value.
+ * value except #MBEDTLS_ERR_SSL_CLIENT_RECONNECT that can't
+ * happen during a renegotiation.
+ *
+ * \warning If this function returns something other than \c 0,
+ * #MBEDTLS_ERR_SSL_WANT_READ, #MBEDTLS_ERR_SSL_WANT_WRITE,
+ * #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS or
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS, you must stop using
+ * the SSL context for reading or writing, and either free it
+ * or call \c mbedtls_ssl_session_reset() on it before
+ * re-using it for a new connection; the current connection
+ * must be closed.
*
- * \note If this function returns something other than 0 or
- * MBEDTLS_ERR_SSL_WANT_READ/WRITE, you must stop using
- * the SSL context for reading or writing, and either free it or
- * call \c mbedtls_ssl_session_reset() on it before re-using it
- * for a new connection; the current connection must be closed.
*/
int mbedtls_ssl_renegotiate( mbedtls_ssl_context *ssl );
#endif /* MBEDTLS_SSL_RENEGOTIATION */
@@ -2858,42 +3026,56 @@ int mbedtls_ssl_renegotiate( mbedtls_ssl_context *ssl );
* \param buf buffer that will hold the data
* \param len maximum number of bytes to read
*
- * \return One of the following:
- * - 0 if the read end of the underlying transport was closed,
- * - the (positive) number of bytes read, or
- * - a negative error code on failure.
- *
- * If MBEDTLS_ERR_SSL_WANT_READ is returned, no application data
- * is available from the underlying transport. In this case,
- * the function needs to be called again at some later stage.
- *
- * If MBEDTLS_ERR_SSL_WANT_WRITE is returned, a write is pending
- * but the underlying transport isn't available for writing. In this
- * case, the function needs to be called again at some later stage.
+ * \return The (positive) number of bytes read if successful.
+ * \return \c 0 if the read end of the underlying transport was closed
+ * - in this case you must stop using the context (see below).
+ * \return #MBEDTLS_ERR_SSL_WANT_READ or #MBEDTLS_ERR_SSL_WANT_WRITE
+ * if the handshake is incomplete and waiting for data to
+ * be available for reading from or writing to the underlying
+ * transport - in this case you must call this function again
+ * when the underlying transport is ready for the operation.
+ * \return #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS if an asynchronous
+ * operation is in progress (see
+ * mbedtls_ssl_conf_async_private_cb()) - in this case you
+ * must call this function again when the operation is ready.
+ * \return #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS if a cryptographic
+ * operation is in progress (see mbedtls_ecp_set_max_ops()) -
+ * in this case you must call this function again to complete
+ * the handshake when you're done attending other tasks.
+ * \return #MBEDTLS_ERR_SSL_CLIENT_RECONNECT if we're at the server
+ * side of a DTLS connection and the client is initiating a
+ * new connection using the same source port. See below.
+ * \return Another SSL error code - in this case you must stop using
+ * the context (see below).
+ *
+ * \warning If this function returns something other than
+ * a positive value,
+ * #MBEDTLS_ERR_SSL_WANT_READ,
+ * #MBEDTLS_ERR_SSL_WANT_WRITE,
+ * #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS,
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS or
+ * #MBEDTLS_ERR_SSL_CLIENT_RECONNECT,
+ * you must stop using the SSL context for reading or writing,
+ * and either free it or call \c mbedtls_ssl_session_reset()
+ * on it before re-using it for a new connection; the current
+ * connection must be closed.
*
- * When this function return MBEDTLS_ERR_SSL_CLIENT_RECONNECT
+ * \note When this function returns #MBEDTLS_ERR_SSL_CLIENT_RECONNECT
* (which can only happen server-side), it means that a client
* is initiating a new connection using the same source port.
* You can either treat that as a connection close and wait
* for the client to resend a ClientHello, or directly
* continue with \c mbedtls_ssl_handshake() with the same
- * context (as it has beeen reset internally). Either way, you
- * should make sure this is seen by the application as a new
+ * context (as it has been reset internally). Either way, you
+ * must make sure this is seen by the application as a new
* connection: application state, if any, should be reset, and
* most importantly the identity of the client must be checked
* again. WARNING: not validating the identity of the client
* again, or not transmitting the new identity to the
* application layer, would allow authentication bypass!
*
- * \note If this function returns something other than a positive value
- * or MBEDTLS_ERR_SSL_WANT_READ/WRITE or MBEDTLS_ERR_SSL_CLIENT_RECONNECT,
- * you must stop using the SSL context for reading or writing,
- * and either free it or call \c mbedtls_ssl_session_reset() on it
- * before re-using it for a new connection; the current connection
- * must be closed.
- *
* \note Remarks regarding event-driven DTLS:
- * - If the function returns MBEDTLS_ERR_SSL_WANT_READ, no datagram
+ * - If the function returns #MBEDTLS_ERR_SSL_WANT_READ, no datagram
* from the underlying transport layer is currently being processed,
* and it is safe to idle until the timer or the underlying transport
* signal a new event.
@@ -2922,21 +3104,39 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
* \param buf buffer holding the data
* \param len how many bytes must be written
*
- * \return the number of bytes actually written (may be less than len),
- * or MBEDTLS_ERR_SSL_WANT_WRITE or MBEDTLS_ERR_SSL_WANT_READ,
- * or another negative error code.
- *
- * \note If this function returns something other than 0, a positive
- * value or MBEDTLS_ERR_SSL_WANT_READ/WRITE, you must stop
- * using the SSL context for reading or writing, and either
- * free it or call \c mbedtls_ssl_session_reset() on it before
- * re-using it for a new connection; the current connection
- * must be closed.
+ * \return The (non-negative) number of bytes actually written if
+ * successful (may be less than \p len).
+ * \return #MBEDTLS_ERR_SSL_WANT_READ or #MBEDTLS_ERR_SSL_WANT_WRITE
+ * if the handshake is incomplete and waiting for data to
+ * be available for reading from or writing to the underlying
+ * transport - in this case you must call this function again
+ * when the underlying transport is ready for the operation.
+ * \return #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS if an asynchronous
+ * operation is in progress (see
+ * mbedtls_ssl_conf_async_private_cb()) - in this case you
+ * must call this function again when the operation is ready.
+ * \return #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS if a cryptographic
+ * operation is in progress (see mbedtls_ecp_set_max_ops()) -
+ * in this case you must call this function again to complete
+ * the handshake when you're done attending other tasks.
+ * \return Another SSL error code - in this case you must stop using
+ * the context (see below).
+ *
+ * \warning If this function returns something other than
+ * a non-negative value,
+ * #MBEDTLS_ERR_SSL_WANT_READ,
+ * #MBEDTLS_ERR_SSL_WANT_WRITE,
+ * #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS or
+ * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS,
+ * you must stop using the SSL context for reading or writing,
+ * and either free it or call \c mbedtls_ssl_session_reset()
+ * on it before re-using it for a new connection; the current
+ * connection must be closed.
*
- * \note When this function returns MBEDTLS_ERR_SSL_WANT_WRITE/READ,
+ * \note When this function returns #MBEDTLS_ERR_SSL_WANT_WRITE/READ,
* it must be called later with the *same* arguments,
* until it returns a value greater that or equal to 0. When
- * the function returns MBEDTLS_ERR_SSL_WANT_WRITE there may be
+ * the function returns #MBEDTLS_ERR_SSL_WANT_WRITE there may be
* some partial data in the output buffer, however this is not
* yet sent.
*
diff --git a/thirdparty/mbedtls/include/mbedtls/ssl_cookie.h b/thirdparty/mbedtls/include/mbedtls/ssl_cookie.h
index 80b65bbbb9..6a0ad4fa96 100644
--- a/thirdparty/mbedtls/include/mbedtls/ssl_cookie.h
+++ b/thirdparty/mbedtls/include/mbedtls/ssl_cookie.h
@@ -50,7 +50,7 @@ extern "C" {
/**
* \brief Context for the default cookie functions.
*/
-typedef struct
+typedef struct mbedtls_ssl_cookie_ctx
{
mbedtls_md_context_t hmac_ctx; /*!< context for the HMAC portion */
#if !defined(MBEDTLS_HAVE_TIME)
diff --git a/thirdparty/mbedtls/include/mbedtls/ssl_internal.h b/thirdparty/mbedtls/include/mbedtls/ssl_internal.h
index d214703d77..97abb9f90b 100644
--- a/thirdparty/mbedtls/include/mbedtls/ssl_internal.h
+++ b/thirdparty/mbedtls/include/mbedtls/ssl_internal.h
@@ -93,6 +93,14 @@
#endif /* MBEDTLS_SSL_PROTO_TLS1_1 */
#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */
+/* Shorthand for restartable ECC */
+#if defined(MBEDTLS_ECP_RESTARTABLE) && \
+ defined(MBEDTLS_SSL_CLI_C) && \
+ defined(MBEDTLS_SSL_PROTO_TLS1_2) && \
+ defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
+#define MBEDTLS_SSL__ECP_RESTARTABLE
+#endif
+
#define MBEDTLS_SSL_INITIAL_HANDSHAKE 0
#define MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS 1 /* In progress */
#define MBEDTLS_SSL_RENEGOTIATION_DONE 2 /* Done or aborted */
@@ -155,6 +163,9 @@
#define MBEDTLS_SSL_OUT_PAYLOAD_LEN ( MBEDTLS_SSL_PAYLOAD_OVERHEAD + \
( MBEDTLS_SSL_OUT_CONTENT_LEN ) )
+/* The maximum number of buffered handshake messages. */
+#define MBEDTLS_SSL_MAX_BUFFERED_HS 4
+
/* Maximum length we can advertise as our max content length for
RFC 6066 max_fragment_length extension negotiation purposes
(the lesser of both sizes, if they are unequal.)
@@ -284,7 +295,18 @@ struct mbedtls_ssl_handshake_params
mbedtls_x509_crl *sni_ca_crl; /*!< trusted CAs CRLs from SNI */
#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */
#endif /* MBEDTLS_X509_CRT_PARSE_C */
-
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ int ecrs_enabled; /*!< Handshake supports EC restart? */
+ mbedtls_x509_crt_restart_ctx ecrs_ctx; /*!< restart context */
+ enum { /* this complements ssl->state with info on intra-state operations */
+ ssl_ecrs_none = 0, /*!< nothing going on (yet) */
+ ssl_ecrs_crt_verify, /*!< Certificate: crt_verify() */
+ ssl_ecrs_ske_start_processing, /*!< ServerKeyExchange: pk_verify() */
+ ssl_ecrs_cke_ecdh_calc_secret, /*!< ClientKeyExchange: ECDH step 2 */
+ ssl_ecrs_crt_vrfy_sign, /*!< CertificateVerify: pk_sign() */
+ } ecrs_state; /*!< current (or last) operation */
+ size_t ecrs_n; /*!< place for saving a length */
+#endif
#if defined(MBEDTLS_SSL_PROTO_DTLS)
unsigned int out_msg_seq; /*!< Outgoing handshake sequence number */
unsigned int in_msg_seq; /*!< Incoming handshake sequence number */
@@ -294,18 +316,45 @@ struct mbedtls_ssl_handshake_params
unsigned char verify_cookie_len; /*!< Cli: cookie length
Srv: flag for sending a cookie */
- unsigned char *hs_msg; /*!< Reassembled handshake message */
-
uint32_t retransmit_timeout; /*!< Current value of timeout */
unsigned char retransmit_state; /*!< Retransmission state */
- mbedtls_ssl_flight_item *flight; /*!< Current outgoing flight */
- mbedtls_ssl_flight_item *cur_msg; /*!< Current message in flight */
+ mbedtls_ssl_flight_item *flight; /*!< Current outgoing flight */
+ mbedtls_ssl_flight_item *cur_msg; /*!< Current message in flight */
+ unsigned char *cur_msg_p; /*!< Position in current message */
unsigned int in_flight_start_seq; /*!< Minimum message sequence in the
flight being received */
mbedtls_ssl_transform *alt_transform_out; /*!< Alternative transform for
resending messages */
unsigned char alt_out_ctr[8]; /*!< Alternative record epoch/counter
for resending messages */
+
+ struct
+ {
+ size_t total_bytes_buffered; /*!< Cumulative size of heap allocated
+ * buffers used for message buffering. */
+
+ uint8_t seen_ccs; /*!< Indicates if a CCS message has
+ * been seen in the current flight. */
+
+ struct mbedtls_ssl_hs_buffer
+ {
+ unsigned is_valid : 1;
+ unsigned is_fragmented : 1;
+ unsigned is_complete : 1;
+ unsigned char *data;
+ size_t data_len;
+ } hs[MBEDTLS_SSL_MAX_BUFFERED_HS];
+
+ struct
+ {
+ unsigned char *data;
+ size_t len;
+ unsigned epoch;
+ } future_record;
+
+ } buffering;
+
+ uint16_t mtu; /*!< Handshake mtu, used to fragment outgoing messages */
#endif /* MBEDTLS_SSL_PROTO_DTLS */
/*
@@ -364,6 +413,8 @@ struct mbedtls_ssl_handshake_params
#endif /* MBEDTLS_SSL_ASYNC_PRIVATE */
};
+typedef struct mbedtls_ssl_hs_buffer mbedtls_ssl_hs_buffer;
+
/*
* This structure contains a full set of runtime transform parameters
* either in negotiation or active.
@@ -478,7 +529,6 @@ int mbedtls_ssl_send_fatal_handshake_failure( mbedtls_ssl_context *ssl );
void mbedtls_ssl_reset_checksum( mbedtls_ssl_context *ssl );
int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl );
-int mbedtls_ssl_read_record_layer( mbedtls_ssl_context *ssl );
int mbedtls_ssl_handle_message_type( mbedtls_ssl_context *ssl );
int mbedtls_ssl_prepare_handshake_record( mbedtls_ssl_context *ssl );
void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl );
@@ -490,7 +540,10 @@ void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl );
* of the logic of (D)TLS from the implementation
* of the secure transport.
*
- * \param ssl SSL context to use
+ * \param ssl The SSL context to use.
+ * \param update_hs_digest This indicates if the handshake digest
+ * should be automatically updated in case
+ * a handshake message is found.
*
* \return 0 or non-zero error code.
*
@@ -556,10 +609,12 @@ void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl );
* following the above definition.
*
*/
-int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl );
+int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl,
+ unsigned update_hs_digest );
int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want );
-int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl );
+int mbedtls_ssl_write_handshake_msg( mbedtls_ssl_context *ssl );
+int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl, uint8_t force_flush );
int mbedtls_ssl_flush_output( mbedtls_ssl_context *ssl );
int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl );
@@ -668,6 +723,7 @@ static inline size_t mbedtls_ssl_hs_hdr_len( const mbedtls_ssl_context *ssl )
void mbedtls_ssl_send_flight_completed( mbedtls_ssl_context *ssl );
void mbedtls_ssl_recv_flight_completed( mbedtls_ssl_context *ssl );
int mbedtls_ssl_resend( mbedtls_ssl_context *ssl );
+int mbedtls_ssl_flight_transmit( mbedtls_ssl_context *ssl );
#endif
/* Visible for testing purposes only */
diff --git a/thirdparty/mbedtls/include/mbedtls/ssl_ticket.h b/thirdparty/mbedtls/include/mbedtls/ssl_ticket.h
index 93ad46ac9c..b2686df09f 100644
--- a/thirdparty/mbedtls/include/mbedtls/ssl_ticket.h
+++ b/thirdparty/mbedtls/include/mbedtls/ssl_ticket.h
@@ -44,7 +44,7 @@ extern "C" {
/**
* \brief Information for session ticket protection
*/
-typedef struct
+typedef struct mbedtls_ssl_ticket_key
{
unsigned char name[4]; /*!< random key identifier */
uint32_t generation_time; /*!< key generation timestamp (seconds) */
@@ -55,7 +55,7 @@ mbedtls_ssl_ticket_key;
/**
* \brief Context for session ticket handling functions
*/
-typedef struct
+typedef struct mbedtls_ssl_ticket_context
{
mbedtls_ssl_ticket_key keys[2]; /*!< ticket protection keys */
unsigned char active; /*!< index of the currently active key */
diff --git a/thirdparty/mbedtls/include/mbedtls/threading.h b/thirdparty/mbedtls/include/mbedtls/threading.h
index c25daa5cdf..92e6e6b987 100644
--- a/thirdparty/mbedtls/include/mbedtls/threading.h
+++ b/thirdparty/mbedtls/include/mbedtls/threading.h
@@ -36,13 +36,16 @@
extern "C" {
#endif
+/* MBEDTLS_ERR_THREADING_FEATURE_UNAVAILABLE is deprecated and should not be
+ * used. */
#define MBEDTLS_ERR_THREADING_FEATURE_UNAVAILABLE -0x001A /**< The selected feature is not available. */
+
#define MBEDTLS_ERR_THREADING_BAD_INPUT_DATA -0x001C /**< Bad input parameters to function. */
#define MBEDTLS_ERR_THREADING_MUTEX_ERROR -0x001E /**< Locking / unlocking / free failed with error code. */
#if defined(MBEDTLS_THREADING_PTHREAD)
#include <pthread.h>
-typedef struct
+typedef struct mbedtls_threading_mutex_t
{
pthread_mutex_t mutex;
char is_valid;
@@ -99,6 +102,17 @@ extern int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t *mutex );
#if defined(MBEDTLS_FS_IO)
extern mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex;
#endif
+
+#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_R_ALT)
+/* This mutex may or may not be used in the default definition of
+ * mbedtls_platform_gmtime_r(), but in order to determine that,
+ * we need to check POSIX features, hence modify _POSIX_C_SOURCE.
+ * With the current approach, this declaration is orphaned, lacking
+ * an accompanying definition, in case mbedtls_platform_gmtime_r()
+ * doesn't need it, but that's not a problem. */
+extern mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex;
+#endif /* MBEDTLS_HAVE_TIME_DATE && !MBEDTLS_PLATFORM_GMTIME_R_ALT */
+
#endif /* MBEDTLS_THREADING_C */
#ifdef __cplusplus
diff --git a/thirdparty/mbedtls/include/mbedtls/timing.h b/thirdparty/mbedtls/include/mbedtls/timing.h
index bbcb90688a..a965fe0d35 100644
--- a/thirdparty/mbedtls/include/mbedtls/timing.h
+++ b/thirdparty/mbedtls/include/mbedtls/timing.h
@@ -51,7 +51,7 @@ struct mbedtls_timing_hr_time
/**
* \brief Context for mbedtls_timing_set/get_delay()
*/
-typedef struct
+typedef struct mbedtls_timing_delay_context
{
struct mbedtls_timing_hr_time timer;
uint32_t int_ms;
diff --git a/thirdparty/mbedtls/include/mbedtls/version.h b/thirdparty/mbedtls/include/mbedtls/version.h
index eaf25d908c..56e7398a2a 100644
--- a/thirdparty/mbedtls/include/mbedtls/version.h
+++ b/thirdparty/mbedtls/include/mbedtls/version.h
@@ -39,7 +39,7 @@
* Major, Minor, Patchlevel
*/
#define MBEDTLS_VERSION_MAJOR 2
-#define MBEDTLS_VERSION_MINOR 12
+#define MBEDTLS_VERSION_MINOR 16
#define MBEDTLS_VERSION_PATCH 0
/**
@@ -47,9 +47,9 @@
* MMNNPP00
* Major version | Minor version | Patch version
*/
-#define MBEDTLS_VERSION_NUMBER 0x020C0000
-#define MBEDTLS_VERSION_STRING "2.12.0"
-#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.12.0"
+#define MBEDTLS_VERSION_NUMBER 0x02100000
+#define MBEDTLS_VERSION_STRING "2.16.0"
+#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.16.0"
#if defined(MBEDTLS_VERSION_C)
diff --git a/thirdparty/mbedtls/include/mbedtls/x509_crt.h b/thirdparty/mbedtls/include/mbedtls/x509_crt.h
index ac23cffe84..3dd5922486 100644
--- a/thirdparty/mbedtls/include/mbedtls/x509_crt.h
+++ b/thirdparty/mbedtls/include/mbedtls/x509_crt.h
@@ -105,7 +105,7 @@ mbedtls_x509_crt;
*
* All lists are bitfields, built by ORing flags from MBEDTLS_X509_ID_FLAG().
*/
-typedef struct
+typedef struct mbedtls_x509_crt_profile
{
uint32_t allowed_mds; /**< MDs for signatures */
uint32_t allowed_pks; /**< PK algs for signatures */
@@ -143,6 +143,63 @@ typedef struct mbedtls_x509write_cert
}
mbedtls_x509write_cert;
+/**
+ * Item in a verification chain: cert and flags for it
+ */
+typedef struct {
+ mbedtls_x509_crt *crt;
+ uint32_t flags;
+} mbedtls_x509_crt_verify_chain_item;
+
+/**
+ * Max size of verification chain: end-entity + intermediates + trusted root
+ */
+#define MBEDTLS_X509_MAX_VERIFY_CHAIN_SIZE ( MBEDTLS_X509_MAX_INTERMEDIATE_CA + 2 )
+
+/**
+ * Verification chain as built by \c mbedtls_crt_verify_chain()
+ */
+typedef struct
+{
+ mbedtls_x509_crt_verify_chain_item items[MBEDTLS_X509_MAX_VERIFY_CHAIN_SIZE];
+ unsigned len;
+} mbedtls_x509_crt_verify_chain;
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+
+/**
+ * \brief Context for resuming X.509 verify operations
+ */
+typedef struct
+{
+ /* for check_signature() */
+ mbedtls_pk_restart_ctx pk;
+
+ /* for find_parent_in() */
+ mbedtls_x509_crt *parent; /* non-null iff parent_in in progress */
+ mbedtls_x509_crt *fallback_parent;
+ int fallback_signature_is_good;
+
+ /* for find_parent() */
+ int parent_is_trusted; /* -1 if find_parent is not in progress */
+
+ /* for verify_chain() */
+ enum {
+ x509_crt_rs_none,
+ x509_crt_rs_find_parent,
+ } in_progress; /* none if no operation is in progress */
+ int self_cnt;
+ mbedtls_x509_crt_verify_chain ver_chain;
+
+} mbedtls_x509_crt_restart_ctx;
+
+#else /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
+/* Now we can declare functions that take a pointer to that */
+typedef void mbedtls_x509_crt_restart_ctx;
+
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
#if defined(MBEDTLS_X509_CRT_PARSE_C)
/**
* Default security profile. Should provide a good balance between security
@@ -175,19 +232,34 @@ int mbedtls_x509_crt_parse_der( mbedtls_x509_crt *chain, const unsigned char *bu
size_t buflen );
/**
- * \brief Parse one or more certificates and add them
- * to the chained list. Parses permissively. If some
- * certificates can be parsed, the result is the number
- * of failed certificates it encountered. If none complete
- * correctly, the first error is returned.
+ * \brief Parse one DER-encoded or one or more concatenated PEM-encoded
+ * certificates and add them to the chained list.
*
- * \param chain points to the start of the chain
- * \param buf buffer holding the certificate data in PEM or DER format
- * \param buflen size of the buffer
- * (including the terminating null byte for PEM data)
+ * For CRTs in PEM encoding, the function parses permissively:
+ * if at least one certificate can be parsed, the function
+ * returns the number of certificates for which parsing failed
+ * (hence \c 0 if all certificates were parsed successfully).
+ * If no certificate could be parsed, the function returns
+ * the first (negative) error encountered during parsing.
+ *
+ * PEM encoded certificates may be interleaved by other data
+ * such as human readable descriptions of their content, as
+ * long as the certificates are enclosed in the PEM specific
+ * '-----{BEGIN/END} CERTIFICATE-----' delimiters.
+ *
+ * \param chain The chain to which to add the parsed certificates.
+ * \param buf The buffer holding the certificate data in PEM or DER format.
+ * For certificates in PEM encoding, this may be a concatenation
+ * of multiple certificates; for DER encoding, the buffer must
+ * comprise exactly one certificate.
+ * \param buflen The size of \p buf, including the terminating \c NULL byte
+ * in case of PEM encoded data.
+ *
+ * \return \c 0 if all certificates were parsed successfully.
+ * \return The (positive) number of certificates that couldn't
+ * be parsed if parsing was partly successful (see above).
+ * \return A negative X509 or PEM error code otherwise.
*
- * \return 0 if all certificates parsed successfully, a positive number
- * if partly successful or a specific X509 or PEM error code
*/
int mbedtls_x509_crt_parse( mbedtls_x509_crt *chain, const unsigned char *buf, size_t buflen );
@@ -353,6 +425,37 @@ int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *),
void *p_vrfy );
+/**
+ * \brief Restartable version of \c mbedtls_crt_verify_with_profile()
+ *
+ * \note Performs the same job as \c mbedtls_crt_verify_with_profile()
+ * but can return early and restart according to the limit
+ * set with \c mbedtls_ecp_set_max_ops() to reduce blocking.
+ *
+ * \param crt a certificate (chain) to be verified
+ * \param trust_ca the list of trusted CAs
+ * \param ca_crl the list of CRLs for trusted CAs
+ * \param profile security profile for verification
+ * \param cn expected Common Name (can be set to
+ * NULL if the CN must not be verified)
+ * \param flags result of the verification
+ * \param f_vrfy verification function
+ * \param p_vrfy verification parameter
+ * \param rs_ctx restart context (NULL to disable restart)
+ *
+ * \return See \c mbedtls_crt_verify_with_profile(), or
+ * \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
+ * operations was reached: see \c mbedtls_ecp_set_max_ops().
+ */
+int mbedtls_x509_crt_verify_restartable( mbedtls_x509_crt *crt,
+ mbedtls_x509_crt *trust_ca,
+ mbedtls_x509_crl *ca_crl,
+ const mbedtls_x509_crt_profile *profile,
+ const char *cn, uint32_t *flags,
+ int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *),
+ void *p_vrfy,
+ mbedtls_x509_crt_restart_ctx *rs_ctx );
+
#if defined(MBEDTLS_X509_CHECK_KEY_USAGE)
/**
* \brief Check usage of certificate against keyUsage extension.
@@ -424,6 +527,18 @@ void mbedtls_x509_crt_init( mbedtls_x509_crt *crt );
* \param crt Certificate chain to free
*/
void mbedtls_x509_crt_free( mbedtls_x509_crt *crt );
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+/**
+ * \brief Initialize a restart context
+ */
+void mbedtls_x509_crt_restart_init( mbedtls_x509_crt_restart_ctx *ctx );
+
+/**
+ * \brief Free the components of a restart context
+ */
+void mbedtls_x509_crt_restart_free( mbedtls_x509_crt_restart_ctx *ctx );
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
#endif /* MBEDTLS_X509_CRT_PARSE_C */
/* \} name */
diff --git a/thirdparty/mbedtls/include/mbedtls/xtea.h b/thirdparty/mbedtls/include/mbedtls/xtea.h
index 8df708a3a5..6430c1318a 100644
--- a/thirdparty/mbedtls/include/mbedtls/xtea.h
+++ b/thirdparty/mbedtls/include/mbedtls/xtea.h
@@ -37,6 +37,8 @@
#define MBEDTLS_XTEA_DECRYPT 0
#define MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH -0x0028 /**< The data input has an invalid length. */
+
+/* MBEDTLS_ERR_XTEA_HW_ACCEL_FAILED is deprecated and should not be used. */
#define MBEDTLS_ERR_XTEA_HW_ACCEL_FAILED -0x0029 /**< XTEA hardware accelerator failed. */
#ifdef __cplusplus
@@ -50,7 +52,7 @@ extern "C" {
/**
* \brief XTEA context structure
*/
-typedef struct
+typedef struct mbedtls_xtea_context
{
uint32_t k[4]; /*!< key */
}
diff --git a/thirdparty/mbedtls/library/aes.c b/thirdparty/mbedtls/library/aes.c
index 5c939bba47..0543cd7817 100644
--- a/thirdparty/mbedtls/library/aes.c
+++ b/thirdparty/mbedtls/library/aes.c
@@ -36,6 +36,7 @@
#include <string.h>
#include "mbedtls/aes.h"
+#include "mbedtls/platform.h"
#include "mbedtls/platform_util.h"
#if defined(MBEDTLS_PADLOCK_C)
#include "mbedtls/padlock.h"
@@ -55,6 +56,12 @@
#if !defined(MBEDTLS_AES_ALT)
+/* Parameter validation macros based on platform_util.h */
+#define AES_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_AES_BAD_INPUT_DATA )
+#define AES_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* 32-bit integer manipulation macros (little endian)
*/
@@ -510,6 +517,8 @@ static void aes_gen_tables( void )
void mbedtls_aes_init( mbedtls_aes_context *ctx )
{
+ AES_VALIDATE( ctx != NULL );
+
memset( ctx, 0, sizeof( mbedtls_aes_context ) );
}
@@ -524,12 +533,17 @@ void mbedtls_aes_free( mbedtls_aes_context *ctx )
#if defined(MBEDTLS_CIPHER_MODE_XTS)
void mbedtls_aes_xts_init( mbedtls_aes_xts_context *ctx )
{
+ AES_VALIDATE( ctx != NULL );
+
mbedtls_aes_init( &ctx->crypt );
mbedtls_aes_init( &ctx->tweak );
}
void mbedtls_aes_xts_free( mbedtls_aes_xts_context *ctx )
{
+ if( ctx == NULL )
+ return;
+
mbedtls_aes_free( &ctx->crypt );
mbedtls_aes_free( &ctx->tweak );
}
@@ -545,14 +559,8 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
unsigned int i;
uint32_t *RK;
-#if !defined(MBEDTLS_AES_ROM_TABLES)
- if( aes_init_done == 0 )
- {
- aes_gen_tables();
- aes_init_done = 1;
-
- }
-#endif
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( key != NULL );
switch( keybits )
{
@@ -562,6 +570,14 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
default : return( MBEDTLS_ERR_AES_INVALID_KEY_LENGTH );
}
+#if !defined(MBEDTLS_AES_ROM_TABLES)
+ if( aes_init_done == 0 )
+ {
+ aes_gen_tables();
+ aes_init_done = 1;
+ }
+#endif
+
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16)
if( aes_padlock_ace == -1 )
aes_padlock_ace = mbedtls_padlock_has_support( MBEDTLS_PADLOCK_ACE );
@@ -661,6 +677,9 @@ int mbedtls_aes_setkey_dec( mbedtls_aes_context *ctx, const unsigned char *key,
uint32_t *RK;
uint32_t *SK;
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( key != NULL );
+
mbedtls_aes_init( &cty );
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16)
@@ -751,6 +770,9 @@ int mbedtls_aes_xts_setkey_enc( mbedtls_aes_xts_context *ctx,
const unsigned char *key1, *key2;
unsigned int key1bits, key2bits;
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( key != NULL );
+
ret = mbedtls_aes_xts_decode_keys( key, keybits, &key1, &key1bits,
&key2, &key2bits );
if( ret != 0 )
@@ -773,6 +795,9 @@ int mbedtls_aes_xts_setkey_dec( mbedtls_aes_xts_context *ctx,
const unsigned char *key1, *key2;
unsigned int key1bits, key2bits;
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( key != NULL );
+
ret = mbedtls_aes_xts_decode_keys( key, keybits, &key1, &key1bits,
&key2, &key2bits );
if( ret != 0 )
@@ -976,10 +1001,16 @@ void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
* AES-ECB block encryption/decryption
*/
int mbedtls_aes_crypt_ecb( mbedtls_aes_context *ctx,
- int mode,
- const unsigned char input[16],
- unsigned char output[16] )
+ int mode,
+ const unsigned char input[16],
+ unsigned char output[16] )
{
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( input != NULL );
+ AES_VALIDATE_RET( output != NULL );
+ AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT ||
+ mode == MBEDTLS_AES_DECRYPT );
+
#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64)
if( mbedtls_aesni_has_support( MBEDTLS_AESNI_AES ) )
return( mbedtls_aesni_crypt_ecb( ctx, mode, input, output ) );
@@ -1017,6 +1048,13 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
int i;
unsigned char temp[16];
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT ||
+ mode == MBEDTLS_AES_DECRYPT );
+ AES_VALIDATE_RET( iv != NULL );
+ AES_VALIDATE_RET( input != NULL );
+ AES_VALIDATE_RET( output != NULL );
+
if( length % 16 )
return( MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH );
@@ -1142,11 +1180,18 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
unsigned char prev_tweak[16];
unsigned char tmp[16];
- /* Sectors must be at least 16 bytes. */
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT ||
+ mode == MBEDTLS_AES_DECRYPT );
+ AES_VALIDATE_RET( data_unit != NULL );
+ AES_VALIDATE_RET( input != NULL );
+ AES_VALIDATE_RET( output != NULL );
+
+ /* Data units must be at least 16 bytes long. */
if( length < 16 )
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
- /* NIST SP 80-38E disallows data units larger than 2**20 blocks. */
+ /* NIST SP 800-38E disallows data units larger than 2**20 blocks. */
if( length > ( 1 << 20 ) * 16 )
return MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
@@ -1241,7 +1286,20 @@ int mbedtls_aes_crypt_cfb128( mbedtls_aes_context *ctx,
unsigned char *output )
{
int c;
- size_t n = *iv_off;
+ size_t n;
+
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT ||
+ mode == MBEDTLS_AES_DECRYPT );
+ AES_VALIDATE_RET( iv_off != NULL );
+ AES_VALIDATE_RET( iv != NULL );
+ AES_VALIDATE_RET( input != NULL );
+ AES_VALIDATE_RET( output != NULL );
+
+ n = *iv_off;
+
+ if( n > 15 )
+ return( MBEDTLS_ERR_AES_BAD_INPUT_DATA );
if( mode == MBEDTLS_AES_DECRYPT )
{
@@ -1279,15 +1337,21 @@ int mbedtls_aes_crypt_cfb128( mbedtls_aes_context *ctx,
* AES-CFB8 buffer encryption/decryption
*/
int mbedtls_aes_crypt_cfb8( mbedtls_aes_context *ctx,
- int mode,
- size_t length,
- unsigned char iv[16],
- const unsigned char *input,
- unsigned char *output )
+ int mode,
+ size_t length,
+ unsigned char iv[16],
+ const unsigned char *input,
+ unsigned char *output )
{
unsigned char c;
unsigned char ov[17];
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT ||
+ mode == MBEDTLS_AES_DECRYPT );
+ AES_VALIDATE_RET( iv != NULL );
+ AES_VALIDATE_RET( input != NULL );
+ AES_VALIDATE_RET( output != NULL );
while( length-- )
{
memcpy( ov, iv, 16 );
@@ -1320,7 +1384,18 @@ int mbedtls_aes_crypt_ofb( mbedtls_aes_context *ctx,
unsigned char *output )
{
int ret = 0;
- size_t n = *iv_off;
+ size_t n;
+
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( iv_off != NULL );
+ AES_VALIDATE_RET( iv != NULL );
+ AES_VALIDATE_RET( input != NULL );
+ AES_VALIDATE_RET( output != NULL );
+
+ n = *iv_off;
+
+ if( n > 15 )
+ return( MBEDTLS_ERR_AES_BAD_INPUT_DATA );
while( length-- )
{
@@ -1355,7 +1430,16 @@ int mbedtls_aes_crypt_ctr( mbedtls_aes_context *ctx,
unsigned char *output )
{
int c, i;
- size_t n = *nc_off;
+ size_t n;
+
+ AES_VALIDATE_RET( ctx != NULL );
+ AES_VALIDATE_RET( nc_off != NULL );
+ AES_VALIDATE_RET( nonce_counter != NULL );
+ AES_VALIDATE_RET( stream_block != NULL );
+ AES_VALIDATE_RET( input != NULL );
+ AES_VALIDATE_RET( output != NULL );
+
+ n = *nc_off;
if ( n > 0x0F )
return( MBEDTLS_ERR_AES_BAD_INPUT_DATA );
@@ -1757,7 +1841,7 @@ int mbedtls_aes_self_test( int verbose )
* there is an alternative underlying implementation i.e. when
* MBEDTLS_AES_ALT is defined.
*/
- if( ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && keybits == 192 )
+ if( ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192 )
{
mbedtls_printf( "skipped\n" );
continue;
@@ -1821,7 +1905,7 @@ int mbedtls_aes_self_test( int verbose )
* there is an alternative underlying implementation i.e. when
* MBEDTLS_AES_ALT is defined.
*/
- if( ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && keybits == 192 )
+ if( ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192 )
{
mbedtls_printf( "skipped\n" );
continue;
@@ -1886,7 +1970,7 @@ int mbedtls_aes_self_test( int verbose )
* there is an alternative underlying implementation i.e. when
* MBEDTLS_AES_ALT is defined.
*/
- if( ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && keybits == 192 )
+ if( ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192 )
{
mbedtls_printf( "skipped\n" );
continue;
@@ -1949,7 +2033,7 @@ int mbedtls_aes_self_test( int verbose )
* there is an alternative underlying implementation i.e. when
* MBEDTLS_AES_ALT is defined.
*/
- if( ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && keybits == 192 )
+ if( ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192 )
{
mbedtls_printf( "skipped\n" );
continue;
diff --git a/thirdparty/mbedtls/library/aria.c b/thirdparty/mbedtls/library/aria.c
index e9bcd6d135..aff66d667f 100644
--- a/thirdparty/mbedtls/library/aria.c
+++ b/thirdparty/mbedtls/library/aria.c
@@ -55,6 +55,12 @@
#define inline __inline
#endif
+/* Parameter validation macros */
+#define ARIA_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ARIA_BAD_INPUT_DATA )
+#define ARIA_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* 32-bit integer manipulation macros (little endian)
*/
@@ -449,9 +455,11 @@ int mbedtls_aria_setkey_enc( mbedtls_aria_context *ctx,
int i;
uint32_t w[4][4], *w2;
+ ARIA_VALIDATE_RET( ctx != NULL );
+ ARIA_VALIDATE_RET( key != NULL );
if( keybits != 128 && keybits != 192 && keybits != 256 )
- return( MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH );
+ return( MBEDTLS_ERR_ARIA_BAD_INPUT_DATA );
/* Copy key to W0 (and potential remainder to W1) */
GET_UINT32_LE( w[0][0], key, 0 );
@@ -503,6 +511,8 @@ int mbedtls_aria_setkey_dec( mbedtls_aria_context *ctx,
const unsigned char *key, unsigned int keybits )
{
int i, j, k, ret;
+ ARIA_VALIDATE_RET( ctx != NULL );
+ ARIA_VALIDATE_RET( key != NULL );
ret = mbedtls_aria_setkey_enc( ctx, key, keybits );
if( ret != 0 )
@@ -539,6 +549,9 @@ int mbedtls_aria_crypt_ecb( mbedtls_aria_context *ctx,
int i;
uint32_t a, b, c, d;
+ ARIA_VALIDATE_RET( ctx != NULL );
+ ARIA_VALIDATE_RET( input != NULL );
+ ARIA_VALIDATE_RET( output != NULL );
GET_UINT32_LE( a, input, 0 );
GET_UINT32_LE( b, input, 4 );
@@ -586,6 +599,7 @@ int mbedtls_aria_crypt_ecb( mbedtls_aria_context *ctx,
/* Initialize context */
void mbedtls_aria_init( mbedtls_aria_context *ctx )
{
+ ARIA_VALIDATE( ctx != NULL );
memset( ctx, 0, sizeof( mbedtls_aria_context ) );
}
@@ -612,6 +626,13 @@ int mbedtls_aria_crypt_cbc( mbedtls_aria_context *ctx,
int i;
unsigned char temp[MBEDTLS_ARIA_BLOCKSIZE];
+ ARIA_VALIDATE_RET( ctx != NULL );
+ ARIA_VALIDATE_RET( mode == MBEDTLS_ARIA_ENCRYPT ||
+ mode == MBEDTLS_ARIA_DECRYPT );
+ ARIA_VALIDATE_RET( length == 0 || input != NULL );
+ ARIA_VALIDATE_RET( length == 0 || output != NULL );
+ ARIA_VALIDATE_RET( iv != NULL );
+
if( length % MBEDTLS_ARIA_BLOCKSIZE )
return( MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH );
@@ -665,7 +686,23 @@ int mbedtls_aria_crypt_cfb128( mbedtls_aria_context *ctx,
unsigned char *output )
{
unsigned char c;
- size_t n = *iv_off;
+ size_t n;
+
+ ARIA_VALIDATE_RET( ctx != NULL );
+ ARIA_VALIDATE_RET( mode == MBEDTLS_ARIA_ENCRYPT ||
+ mode == MBEDTLS_ARIA_DECRYPT );
+ ARIA_VALIDATE_RET( length == 0 || input != NULL );
+ ARIA_VALIDATE_RET( length == 0 || output != NULL );
+ ARIA_VALIDATE_RET( iv != NULL );
+ ARIA_VALIDATE_RET( iv_off != NULL );
+
+ n = *iv_off;
+
+ /* An overly large value of n can lead to an unlimited
+ * buffer overflow. Therefore, guard against this
+ * outside of parameter validation. */
+ if( n >= MBEDTLS_ARIA_BLOCKSIZE )
+ return( MBEDTLS_ERR_ARIA_BAD_INPUT_DATA );
if( mode == MBEDTLS_ARIA_DECRYPT )
{
@@ -713,7 +750,21 @@ int mbedtls_aria_crypt_ctr( mbedtls_aria_context *ctx,
unsigned char *output )
{
int c, i;
- size_t n = *nc_off;
+ size_t n;
+
+ ARIA_VALIDATE_RET( ctx != NULL );
+ ARIA_VALIDATE_RET( length == 0 || input != NULL );
+ ARIA_VALIDATE_RET( length == 0 || output != NULL );
+ ARIA_VALIDATE_RET( nonce_counter != NULL );
+ ARIA_VALIDATE_RET( stream_block != NULL );
+ ARIA_VALIDATE_RET( nc_off != NULL );
+
+ n = *nc_off;
+ /* An overly large value of n can lead to an unlimited
+ * buffer overflow. Therefore, guard against this
+ * outside of parameter validation. */
+ if( n >= MBEDTLS_ARIA_BLOCKSIZE )
+ return( MBEDTLS_ERR_ARIA_BAD_INPUT_DATA );
while( length-- )
{
@@ -875,11 +926,11 @@ static const uint8_t aria_test2_ctr_ct[3][48] = // CTR ciphertext
#define ARIA_SELF_TEST_IF_FAIL \
{ \
if( verbose ) \
- printf( "failed\n" ); \
+ mbedtls_printf( "failed\n" ); \
return( 1 ); \
} else { \
if( verbose ) \
- printf( "passed\n" ); \
+ mbedtls_printf( "passed\n" ); \
}
/*
@@ -908,7 +959,7 @@ int mbedtls_aria_self_test( int verbose )
{
/* test ECB encryption */
if( verbose )
- printf( " ARIA-ECB-%d (enc): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-ECB-%d (enc): ", 128 + 64 * i );
mbedtls_aria_setkey_enc( &ctx, aria_test1_ecb_key, 128 + 64 * i );
mbedtls_aria_crypt_ecb( &ctx, aria_test1_ecb_pt, blk );
if( memcmp( blk, aria_test1_ecb_ct[i], MBEDTLS_ARIA_BLOCKSIZE ) != 0 )
@@ -916,14 +967,14 @@ int mbedtls_aria_self_test( int verbose )
/* test ECB decryption */
if( verbose )
- printf( " ARIA-ECB-%d (dec): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-ECB-%d (dec): ", 128 + 64 * i );
mbedtls_aria_setkey_dec( &ctx, aria_test1_ecb_key, 128 + 64 * i );
mbedtls_aria_crypt_ecb( &ctx, aria_test1_ecb_ct[i], blk );
if( memcmp( blk, aria_test1_ecb_pt, MBEDTLS_ARIA_BLOCKSIZE ) != 0 )
ARIA_SELF_TEST_IF_FAIL;
}
if( verbose )
- printf( "\n" );
+ mbedtls_printf( "\n" );
/*
* Test set 2
@@ -933,7 +984,7 @@ int mbedtls_aria_self_test( int verbose )
{
/* Test CBC encryption */
if( verbose )
- printf( " ARIA-CBC-%d (enc): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-CBC-%d (enc): ", 128 + 64 * i );
mbedtls_aria_setkey_enc( &ctx, aria_test2_key, 128 + 64 * i );
memcpy( iv, aria_test2_iv, MBEDTLS_ARIA_BLOCKSIZE );
memset( buf, 0x55, sizeof( buf ) );
@@ -944,7 +995,7 @@ int mbedtls_aria_self_test( int verbose )
/* Test CBC decryption */
if( verbose )
- printf( " ARIA-CBC-%d (dec): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-CBC-%d (dec): ", 128 + 64 * i );
mbedtls_aria_setkey_dec( &ctx, aria_test2_key, 128 + 64 * i );
memcpy( iv, aria_test2_iv, MBEDTLS_ARIA_BLOCKSIZE );
memset( buf, 0xAA, sizeof( buf ) );
@@ -954,7 +1005,7 @@ int mbedtls_aria_self_test( int verbose )
ARIA_SELF_TEST_IF_FAIL;
}
if( verbose )
- printf( "\n" );
+ mbedtls_printf( "\n" );
#endif /* MBEDTLS_CIPHER_MODE_CBC */
@@ -963,7 +1014,7 @@ int mbedtls_aria_self_test( int verbose )
{
/* Test CFB encryption */
if( verbose )
- printf( " ARIA-CFB-%d (enc): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-CFB-%d (enc): ", 128 + 64 * i );
mbedtls_aria_setkey_enc( &ctx, aria_test2_key, 128 + 64 * i );
memcpy( iv, aria_test2_iv, MBEDTLS_ARIA_BLOCKSIZE );
memset( buf, 0x55, sizeof( buf ) );
@@ -975,7 +1026,7 @@ int mbedtls_aria_self_test( int verbose )
/* Test CFB decryption */
if( verbose )
- printf( " ARIA-CFB-%d (dec): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-CFB-%d (dec): ", 128 + 64 * i );
mbedtls_aria_setkey_enc( &ctx, aria_test2_key, 128 + 64 * i );
memcpy( iv, aria_test2_iv, MBEDTLS_ARIA_BLOCKSIZE );
memset( buf, 0xAA, sizeof( buf ) );
@@ -986,7 +1037,7 @@ int mbedtls_aria_self_test( int verbose )
ARIA_SELF_TEST_IF_FAIL;
}
if( verbose )
- printf( "\n" );
+ mbedtls_printf( "\n" );
#endif /* MBEDTLS_CIPHER_MODE_CFB */
#if defined(MBEDTLS_CIPHER_MODE_CTR)
@@ -994,7 +1045,7 @@ int mbedtls_aria_self_test( int verbose )
{
/* Test CTR encryption */
if( verbose )
- printf( " ARIA-CTR-%d (enc): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-CTR-%d (enc): ", 128 + 64 * i );
mbedtls_aria_setkey_enc( &ctx, aria_test2_key, 128 + 64 * i );
memset( iv, 0, MBEDTLS_ARIA_BLOCKSIZE ); // IV = 0
memset( buf, 0x55, sizeof( buf ) );
@@ -1006,7 +1057,7 @@ int mbedtls_aria_self_test( int verbose )
/* Test CTR decryption */
if( verbose )
- printf( " ARIA-CTR-%d (dec): ", 128 + 64 * i );
+ mbedtls_printf( " ARIA-CTR-%d (dec): ", 128 + 64 * i );
mbedtls_aria_setkey_enc( &ctx, aria_test2_key, 128 + 64 * i );
memset( iv, 0, MBEDTLS_ARIA_BLOCKSIZE ); // IV = 0
memset( buf, 0xAA, sizeof( buf ) );
@@ -1017,7 +1068,7 @@ int mbedtls_aria_self_test( int verbose )
ARIA_SELF_TEST_IF_FAIL;
}
if( verbose )
- printf( "\n" );
+ mbedtls_printf( "\n" );
#endif /* MBEDTLS_CIPHER_MODE_CTR */
return( 0 );
diff --git a/thirdparty/mbedtls/library/asn1write.c b/thirdparty/mbedtls/library/asn1write.c
index 72acdf3012..a4d23f6196 100644
--- a/thirdparty/mbedtls/library/asn1write.c
+++ b/thirdparty/mbedtls/library/asn1write.c
@@ -257,34 +257,37 @@ int mbedtls_asn1_write_int( unsigned char **p, unsigned char *start, int val )
return( (int) len );
}
-int mbedtls_asn1_write_printable_string( unsigned char **p, unsigned char *start,
- const char *text, size_t text_len )
+int mbedtls_asn1_write_tagged_string( unsigned char **p, unsigned char *start, int tag,
+ const char *text, size_t text_len )
{
int ret;
size_t len = 0;
MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start,
- (const unsigned char *) text, text_len ) );
+ (const unsigned char *) text, text_len ) );
MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) );
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_PRINTABLE_STRING ) );
+ MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, tag ) );
return( (int) len );
}
-int mbedtls_asn1_write_ia5_string( unsigned char **p, unsigned char *start,
- const char *text, size_t text_len )
+int mbedtls_asn1_write_utf8_string( unsigned char **p, unsigned char *start,
+ const char *text, size_t text_len )
{
- int ret;
- size_t len = 0;
-
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start,
- (const unsigned char *) text, text_len ) );
+ return( mbedtls_asn1_write_tagged_string(p, start, MBEDTLS_ASN1_UTF8_STRING, text, text_len) );
+}
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) );
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_IA5_STRING ) );
+int mbedtls_asn1_write_printable_string( unsigned char **p, unsigned char *start,
+ const char *text, size_t text_len )
+{
+ return( mbedtls_asn1_write_tagged_string(p, start, MBEDTLS_ASN1_PRINTABLE_STRING, text, text_len) );
+}
- return( (int) len );
+int mbedtls_asn1_write_ia5_string( unsigned char **p, unsigned char *start,
+ const char *text, size_t text_len )
+{
+ return( mbedtls_asn1_write_tagged_string(p, start, MBEDTLS_ASN1_IA5_STRING, text, text_len) );
}
int mbedtls_asn1_write_bitstring( unsigned char **p, unsigned char *start,
@@ -328,14 +331,36 @@ int mbedtls_asn1_write_octet_string( unsigned char **p, unsigned char *start,
return( (int) len );
}
-mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data **head,
+
+/* This is a copy of the ASN.1 parsing function mbedtls_asn1_find_named_data(),
+ * which is replicated to avoid a dependency ASN1_WRITE_C on ASN1_PARSE_C. */
+static mbedtls_asn1_named_data *asn1_find_named_data(
+ mbedtls_asn1_named_data *list,
+ const char *oid, size_t len )
+{
+ while( list != NULL )
+ {
+ if( list->oid.len == len &&
+ memcmp( list->oid.p, oid, len ) == 0 )
+ {
+ break;
+ }
+
+ list = list->next;
+ }
+
+ return( list );
+}
+
+mbedtls_asn1_named_data *mbedtls_asn1_store_named_data(
+ mbedtls_asn1_named_data **head,
const char *oid, size_t oid_len,
const unsigned char *val,
size_t val_len )
{
mbedtls_asn1_named_data *cur;
- if( ( cur = mbedtls_asn1_find_named_data( *head, oid, oid_len ) ) == NULL )
+ if( ( cur = asn1_find_named_data( *head, oid, oid_len ) ) == NULL )
{
// Add new entry if not present yet based on OID
//
diff --git a/thirdparty/mbedtls/library/bignum.c b/thirdparty/mbedtls/library/bignum.c
index 423e375fd1..f968a0ad7d 100644
--- a/thirdparty/mbedtls/library/bignum.c
+++ b/thirdparty/mbedtls/library/bignum.c
@@ -59,6 +59,11 @@
#define mbedtls_free free
#endif
+#define MPI_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_MPI_BAD_INPUT_DATA )
+#define MPI_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#define ciL (sizeof(mbedtls_mpi_uint)) /* chars in limb */
#define biL (ciL << 3) /* bits in limb */
#define biH (ciL << 2) /* half limb size */
@@ -83,8 +88,7 @@ static void mbedtls_mpi_zeroize( mbedtls_mpi_uint *v, size_t n )
*/
void mbedtls_mpi_init( mbedtls_mpi *X )
{
- if( X == NULL )
- return;
+ MPI_VALIDATE( X != NULL );
X->s = 1;
X->n = 0;
@@ -116,6 +120,7 @@ void mbedtls_mpi_free( mbedtls_mpi *X )
int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs )
{
mbedtls_mpi_uint *p;
+ MPI_VALIDATE_RET( X != NULL );
if( nblimbs > MBEDTLS_MPI_MAX_LIMBS )
return( MBEDTLS_ERR_MPI_ALLOC_FAILED );
@@ -147,6 +152,10 @@ int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs )
{
mbedtls_mpi_uint *p;
size_t i;
+ MPI_VALIDATE_RET( X != NULL );
+
+ if( nblimbs > MBEDTLS_MPI_MAX_LIMBS )
+ return( MBEDTLS_ERR_MPI_ALLOC_FAILED );
/* Actually resize up in this case */
if( X->n <= nblimbs )
@@ -183,6 +192,8 @@ int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y )
{
int ret = 0;
size_t i;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( Y != NULL );
if( X == Y )
return( 0 );
@@ -222,6 +233,8 @@ cleanup:
void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y )
{
mbedtls_mpi T;
+ MPI_VALIDATE( X != NULL );
+ MPI_VALIDATE( Y != NULL );
memcpy( &T, X, sizeof( mbedtls_mpi ) );
memcpy( X, Y, sizeof( mbedtls_mpi ) );
@@ -237,6 +250,8 @@ int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned
{
int ret = 0;
size_t i;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( Y != NULL );
/* make sure assign is 0 or 1 in a time-constant manner */
assign = (assign | (unsigned char)-assign) >> 7;
@@ -266,6 +281,8 @@ int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char sw
int ret, s;
size_t i;
mbedtls_mpi_uint tmp;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( Y != NULL );
if( X == Y )
return( 0 );
@@ -298,6 +315,7 @@ cleanup:
int mbedtls_mpi_lset( mbedtls_mpi *X, mbedtls_mpi_sint z )
{
int ret;
+ MPI_VALIDATE_RET( X != NULL );
MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, 1 ) );
memset( X->p, 0, X->n * ciL );
@@ -315,12 +333,18 @@ cleanup:
*/
int mbedtls_mpi_get_bit( const mbedtls_mpi *X, size_t pos )
{
+ MPI_VALIDATE_RET( X != NULL );
+
if( X->n * biL <= pos )
return( 0 );
return( ( X->p[pos / biL] >> ( pos % biL ) ) & 0x01 );
}
+/* Get a specific byte, without range checks. */
+#define GET_BYTE( X, i ) \
+ ( ( ( X )->p[( i ) / ciL] >> ( ( ( i ) % ciL ) * 8 ) ) & 0xff )
+
/*
* Set a bit to a specific value of 0 or 1
*/
@@ -329,6 +353,7 @@ int mbedtls_mpi_set_bit( mbedtls_mpi *X, size_t pos, unsigned char val )
int ret = 0;
size_t off = pos / biL;
size_t idx = pos % biL;
+ MPI_VALIDATE_RET( X != NULL );
if( val != 0 && val != 1 )
return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -355,6 +380,7 @@ cleanup:
size_t mbedtls_mpi_lsb( const mbedtls_mpi *X )
{
size_t i, j, count = 0;
+ MBEDTLS_INTERNAL_VALIDATE_RET( X != NULL, 0 );
for( i = 0; i < X->n; i++ )
for( j = 0; j < biL; j++, count++ )
@@ -435,6 +461,8 @@ int mbedtls_mpi_read_string( mbedtls_mpi *X, int radix, const char *s )
size_t i, j, slen, n;
mbedtls_mpi_uint d;
mbedtls_mpi T;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( s != NULL );
if( radix < 2 || radix > 16 )
return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -535,6 +563,9 @@ int mbedtls_mpi_write_string( const mbedtls_mpi *X, int radix,
size_t n;
char *p;
mbedtls_mpi T;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( olen != NULL );
+ MPI_VALIDATE_RET( buflen == 0 || buf != NULL );
if( radix < 2 || radix > 16 )
return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -616,6 +647,12 @@ int mbedtls_mpi_read_file( mbedtls_mpi *X, int radix, FILE *fin )
*/
char s[ MBEDTLS_MPI_RW_BUFFER_SIZE ];
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( fin != NULL );
+
+ if( radix < 2 || radix > 16 )
+ return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
+
memset( s, 0, sizeof( s ) );
if( fgets( s, sizeof( s ) - 1, fin ) == NULL )
return( MBEDTLS_ERR_MPI_FILE_IO_ERROR );
@@ -647,6 +684,10 @@ int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X, int radix, FILE
* newline characters and '\0'
*/
char s[ MBEDTLS_MPI_RW_BUFFER_SIZE ];
+ MPI_VALIDATE_RET( X != NULL );
+
+ if( radix < 2 || radix > 16 )
+ return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
memset( s, 0, sizeof( s ) );
@@ -683,6 +724,9 @@ int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t bu
size_t i, j;
size_t const limbs = CHARS_TO_LIMBS( buflen );
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( buflen == 0 || buf != NULL );
+
/* Ensure that target MPI has exactly the necessary number of limbs */
if( X->n != limbs )
{
@@ -704,19 +748,45 @@ cleanup:
/*
* Export X into unsigned binary data, big endian
*/
-int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf, size_t buflen )
+int mbedtls_mpi_write_binary( const mbedtls_mpi *X,
+ unsigned char *buf, size_t buflen )
{
- size_t i, j, n;
+ size_t stored_bytes;
+ size_t bytes_to_copy;
+ unsigned char *p;
+ size_t i;
- n = mbedtls_mpi_size( X );
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( buflen == 0 || buf != NULL );
- if( buflen < n )
- return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL );
+ stored_bytes = X->n * ciL;
- memset( buf, 0, buflen );
+ if( stored_bytes < buflen )
+ {
+ /* There is enough space in the output buffer. Write initial
+ * null bytes and record the position at which to start
+ * writing the significant bytes. In this case, the execution
+ * trace of this function does not depend on the value of the
+ * number. */
+ bytes_to_copy = stored_bytes;
+ p = buf + buflen - stored_bytes;
+ memset( buf, 0, buflen - stored_bytes );
+ }
+ else
+ {
+ /* The output buffer is smaller than the allocated size of X.
+ * However X may fit if its leading bytes are zero. */
+ bytes_to_copy = buflen;
+ p = buf;
+ for( i = bytes_to_copy; i < stored_bytes; i++ )
+ {
+ if( GET_BYTE( X, i ) != 0 )
+ return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL );
+ }
+ }
- for( i = buflen - 1, j = 0; n > 0; i--, j++, n-- )
- buf[i] = (unsigned char)( X->p[j / ciL] >> ((j % ciL) << 3) );
+ for( i = 0; i < bytes_to_copy; i++ )
+ p[bytes_to_copy - i - 1] = GET_BYTE( X, i );
return( 0 );
}
@@ -729,6 +799,7 @@ int mbedtls_mpi_shift_l( mbedtls_mpi *X, size_t count )
int ret;
size_t i, v0, t1;
mbedtls_mpi_uint r0 = 0, r1;
+ MPI_VALIDATE_RET( X != NULL );
v0 = count / (biL );
t1 = count & (biL - 1);
@@ -778,6 +849,7 @@ int mbedtls_mpi_shift_r( mbedtls_mpi *X, size_t count )
{
size_t i, v0, v1;
mbedtls_mpi_uint r0 = 0, r1;
+ MPI_VALIDATE_RET( X != NULL );
v0 = count / biL;
v1 = count & (biL - 1);
@@ -820,6 +892,8 @@ int mbedtls_mpi_shift_r( mbedtls_mpi *X, size_t count )
int mbedtls_mpi_cmp_abs( const mbedtls_mpi *X, const mbedtls_mpi *Y )
{
size_t i, j;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( Y != NULL );
for( i = X->n; i > 0; i-- )
if( X->p[i - 1] != 0 )
@@ -850,6 +924,8 @@ int mbedtls_mpi_cmp_abs( const mbedtls_mpi *X, const mbedtls_mpi *Y )
int mbedtls_mpi_cmp_mpi( const mbedtls_mpi *X, const mbedtls_mpi *Y )
{
size_t i, j;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( Y != NULL );
for( i = X->n; i > 0; i-- )
if( X->p[i - 1] != 0 )
@@ -884,6 +960,7 @@ int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z )
{
mbedtls_mpi Y;
mbedtls_mpi_uint p[1];
+ MPI_VALIDATE_RET( X != NULL );
*p = ( z < 0 ) ? -z : z;
Y.s = ( z < 0 ) ? -1 : 1;
@@ -901,6 +978,9 @@ int mbedtls_mpi_add_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi
int ret;
size_t i, j;
mbedtls_mpi_uint *o, *p, c, tmp;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
if( X == B )
{
@@ -978,6 +1058,9 @@ int mbedtls_mpi_sub_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi
mbedtls_mpi TB;
int ret;
size_t n;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
if( mbedtls_mpi_cmp_abs( A, B ) < 0 )
return( MBEDTLS_ERR_MPI_NEGATIVE_VALUE );
@@ -1018,8 +1101,12 @@ cleanup:
*/
int mbedtls_mpi_add_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B )
{
- int ret, s = A->s;
+ int ret, s;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
+ s = A->s;
if( A->s * B->s < 0 )
{
if( mbedtls_mpi_cmp_abs( A, B ) >= 0 )
@@ -1049,8 +1136,12 @@ cleanup:
*/
int mbedtls_mpi_sub_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B )
{
- int ret, s = A->s;
+ int ret, s;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
+ s = A->s;
if( A->s * B->s > 0 )
{
if( mbedtls_mpi_cmp_abs( A, B ) >= 0 )
@@ -1082,6 +1173,8 @@ int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint
{
mbedtls_mpi _B;
mbedtls_mpi_uint p[1];
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
p[0] = ( b < 0 ) ? -b : b;
_B.s = ( b < 0 ) ? -1 : 1;
@@ -1098,6 +1191,8 @@ int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint
{
mbedtls_mpi _B;
mbedtls_mpi_uint p[1];
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
p[0] = ( b < 0 ) ? -b : b;
_B.s = ( b < 0 ) ? -1 : 1;
@@ -1187,6 +1282,9 @@ int mbedtls_mpi_mul_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi
int ret;
size_t i, j;
mbedtls_mpi TA, TB;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
mbedtls_mpi_init( &TA ); mbedtls_mpi_init( &TB );
@@ -1223,6 +1321,8 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint
{
mbedtls_mpi _B;
mbedtls_mpi_uint p[1];
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
_B.s = 1;
_B.n = 1;
@@ -1331,11 +1431,14 @@ static mbedtls_mpi_uint mbedtls_int_div_int( mbedtls_mpi_uint u1,
/*
* Division by mbedtls_mpi: A = Q * B + R (HAC 14.20)
*/
-int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B )
+int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
+ const mbedtls_mpi *B )
{
int ret;
size_t i, n, t, k;
mbedtls_mpi X, Y, Z, T1, T2;
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
if( mbedtls_mpi_cmp_int( B, 0 ) == 0 )
return( MBEDTLS_ERR_MPI_DIVISION_BY_ZERO );
@@ -1446,10 +1549,13 @@ cleanup:
/*
* Division by int: A = Q * b + R
*/
-int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, mbedtls_mpi_sint b )
+int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R,
+ const mbedtls_mpi *A,
+ mbedtls_mpi_sint b )
{
mbedtls_mpi _B;
mbedtls_mpi_uint p[1];
+ MPI_VALIDATE_RET( A != NULL );
p[0] = ( b < 0 ) ? -b : b;
_B.s = ( b < 0 ) ? -1 : 1;
@@ -1465,6 +1571,9 @@ int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, m
int mbedtls_mpi_mod_mpi( mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B )
{
int ret;
+ MPI_VALIDATE_RET( R != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
if( mbedtls_mpi_cmp_int( B, 0 ) < 0 )
return( MBEDTLS_ERR_MPI_NEGATIVE_VALUE );
@@ -1489,6 +1598,8 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_
{
size_t i;
mbedtls_mpi_uint x, y, z;
+ MPI_VALIDATE_RET( r != NULL );
+ MPI_VALIDATE_RET( A != NULL );
if( b == 0 )
return( MBEDTLS_ERR_MPI_DIVISION_BY_ZERO );
@@ -1602,7 +1713,8 @@ static int mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi
/*
* Montgomery reduction: A = A * R^-1 mod N
*/
-static int mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, mbedtls_mpi_uint mm, const mbedtls_mpi *T )
+static int mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N,
+ mbedtls_mpi_uint mm, const mbedtls_mpi *T )
{
mbedtls_mpi_uint z = 1;
mbedtls_mpi U;
@@ -1616,7 +1728,9 @@ static int mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, mbedtls_mpi_uint m
/*
* Sliding-window exponentiation: X = A^E mod N (HAC 14.85)
*/
-int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR )
+int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A,
+ const mbedtls_mpi *E, const mbedtls_mpi *N,
+ mbedtls_mpi *_RR )
{
int ret;
size_t wbits, wsize, one = 1;
@@ -1626,6 +1740,11 @@ int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi
mbedtls_mpi RR, T, W[ 2 << MBEDTLS_MPI_WINDOW_SIZE ], Apos;
int neg;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( E != NULL );
+ MPI_VALIDATE_RET( N != NULL );
+
if( mbedtls_mpi_cmp_int( N, 0 ) <= 0 || ( N->p[0] & 1 ) == 0 )
return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -1830,6 +1949,10 @@ int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B
size_t lz, lzt;
mbedtls_mpi TG, TA, TB;
+ MPI_VALIDATE_RET( G != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( B != NULL );
+
mbedtls_mpi_init( &TG ); mbedtls_mpi_init( &TA ); mbedtls_mpi_init( &TB );
MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TA, A ) );
@@ -1886,6 +2009,8 @@ int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size,
{
int ret;
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( f_rng != NULL );
if( size > MBEDTLS_MPI_MAX_SIZE )
return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -1905,6 +2030,9 @@ int mbedtls_mpi_inv_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi
{
int ret;
mbedtls_mpi G, TA, TU, U1, U2, TB, TV, V1, V2;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( A != NULL );
+ MPI_VALIDATE_RET( N != NULL );
if( mbedtls_mpi_cmp_int( N, 1 ) <= 0 )
return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -2056,15 +2184,19 @@ cleanup:
/*
* Miller-Rabin pseudo-primality test (HAC 4.24)
*/
-static int mpi_miller_rabin( const mbedtls_mpi *X,
+static int mpi_miller_rabin( const mbedtls_mpi *X, size_t rounds,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
int ret, count;
- size_t i, j, k, n, s;
+ size_t i, j, k, s;
mbedtls_mpi W, R, T, A, RR;
- mbedtls_mpi_init( &W ); mbedtls_mpi_init( &R ); mbedtls_mpi_init( &T ); mbedtls_mpi_init( &A );
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( f_rng != NULL );
+
+ mbedtls_mpi_init( &W ); mbedtls_mpi_init( &R );
+ mbedtls_mpi_init( &T ); mbedtls_mpi_init( &A );
mbedtls_mpi_init( &RR );
/*
@@ -2077,27 +2209,12 @@ static int mpi_miller_rabin( const mbedtls_mpi *X,
MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &R, s ) );
i = mbedtls_mpi_bitlen( X );
- /*
- * HAC, table 4.4
- */
- n = ( ( i >= 1300 ) ? 2 : ( i >= 850 ) ? 3 :
- ( i >= 650 ) ? 4 : ( i >= 350 ) ? 8 :
- ( i >= 250 ) ? 12 : ( i >= 150 ) ? 18 : 27 );
- for( i = 0; i < n; i++ )
+ for( i = 0; i < rounds; i++ )
{
/*
* pick a random A, 1 < A < |X| - 1
*/
- MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) );
-
- if( mbedtls_mpi_cmp_mpi( &A, &W ) >= 0 )
- {
- j = mbedtls_mpi_bitlen( &A ) - mbedtls_mpi_bitlen( &W );
- MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &A, j + 1 ) );
- }
- A.p[0] |= 3;
-
count = 0;
do {
MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) );
@@ -2105,7 +2222,7 @@ static int mpi_miller_rabin( const mbedtls_mpi *X,
j = mbedtls_mpi_bitlen( &A );
k = mbedtls_mpi_bitlen( &W );
if (j > k) {
- MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &A, j - k ) );
+ A.p[A.n - 1] &= ( (mbedtls_mpi_uint) 1 << ( k - ( A.n - 1 ) * biL - 1 ) ) - 1;
}
if (count++ > 30) {
@@ -2151,7 +2268,8 @@ static int mpi_miller_rabin( const mbedtls_mpi *X,
}
cleanup:
- mbedtls_mpi_free( &W ); mbedtls_mpi_free( &R ); mbedtls_mpi_free( &T ); mbedtls_mpi_free( &A );
+ mbedtls_mpi_free( &W ); mbedtls_mpi_free( &R );
+ mbedtls_mpi_free( &T ); mbedtls_mpi_free( &A );
mbedtls_mpi_free( &RR );
return( ret );
@@ -2160,12 +2278,14 @@ cleanup:
/*
* Pseudo-primality test: small factors, then Miller-Rabin
*/
-int mbedtls_mpi_is_prime( const mbedtls_mpi *X,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+int mbedtls_mpi_is_prime_ext( const mbedtls_mpi *X, int rounds,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
{
int ret;
mbedtls_mpi XX;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( f_rng != NULL );
XX.s = 1;
XX.n = X->n;
@@ -2186,17 +2306,37 @@ int mbedtls_mpi_is_prime( const mbedtls_mpi *X,
return( ret );
}
- return( mpi_miller_rabin( &XX, f_rng, p_rng ) );
+ return( mpi_miller_rabin( &XX, rounds, f_rng, p_rng ) );
+}
+
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+/*
+ * Pseudo-primality test, error probability 2^-80
+ */
+int mbedtls_mpi_is_prime( const mbedtls_mpi *X,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
+{
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( f_rng != NULL );
+
+ /*
+ * In the past our key generation aimed for an error rate of at most
+ * 2^-80. Since this function is deprecated, aim for the same certainty
+ * here as well.
+ */
+ return( mbedtls_mpi_is_prime_ext( X, 40, f_rng, p_rng ) );
}
+#endif
/*
* Prime number generation
*
- * If dh_flag is 0 and nbits is at least 1024, then the procedure
- * follows the RSA probably-prime generation method of FIPS 186-4.
- * NB. FIPS 186-4 only allows the specific bit lengths of 1024 and 1536.
+ * To generate an RSA key in a way recommended by FIPS 186-4, both primes must
+ * be either 1024 bits or 1536 bits long, and flags must contain
+ * MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR.
*/
-int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
+int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int flags,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
@@ -2209,9 +2349,13 @@ int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
#endif
int ret = MBEDTLS_ERR_MPI_NOT_ACCEPTABLE;
size_t k, n;
+ int rounds;
mbedtls_mpi_uint r;
mbedtls_mpi Y;
+ MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( f_rng != NULL );
+
if( nbits < 3 || nbits > MBEDTLS_MPI_MAX_BITS )
return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -2219,6 +2363,27 @@ int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
n = BITS_TO_LIMBS( nbits );
+ if( ( flags & MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR ) == 0 )
+ {
+ /*
+ * 2^-80 error probability, number of rounds chosen per HAC, table 4.4
+ */
+ rounds = ( ( nbits >= 1300 ) ? 2 : ( nbits >= 850 ) ? 3 :
+ ( nbits >= 650 ) ? 4 : ( nbits >= 350 ) ? 8 :
+ ( nbits >= 250 ) ? 12 : ( nbits >= 150 ) ? 18 : 27 );
+ }
+ else
+ {
+ /*
+ * 2^-100 error probability, number of rounds computed based on HAC,
+ * fact 4.48
+ */
+ rounds = ( ( nbits >= 1450 ) ? 4 : ( nbits >= 1150 ) ? 5 :
+ ( nbits >= 1000 ) ? 6 : ( nbits >= 850 ) ? 7 :
+ ( nbits >= 750 ) ? 8 : ( nbits >= 500 ) ? 13 :
+ ( nbits >= 250 ) ? 28 : ( nbits >= 150 ) ? 40 : 51 );
+ }
+
while( 1 )
{
MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( X, n * ciL, f_rng, p_rng ) );
@@ -2229,9 +2394,9 @@ int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
if( k > nbits ) MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( X, k - nbits ) );
X->p[0] |= 1;
- if( dh_flag == 0 )
+ if( ( flags & MBEDTLS_MPI_GEN_PRIME_FLAG_DH ) == 0 )
{
- ret = mbedtls_mpi_is_prime( X, f_rng, p_rng );
+ ret = mbedtls_mpi_is_prime_ext( X, rounds, f_rng, p_rng );
if( ret != MBEDTLS_ERR_MPI_NOT_ACCEPTABLE )
goto cleanup;
@@ -2264,8 +2429,10 @@ int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
*/
if( ( ret = mpi_check_small_factors( X ) ) == 0 &&
( ret = mpi_check_small_factors( &Y ) ) == 0 &&
- ( ret = mpi_miller_rabin( X, f_rng, p_rng ) ) == 0 &&
- ( ret = mpi_miller_rabin( &Y, f_rng, p_rng ) ) == 0 )
+ ( ret = mpi_miller_rabin( X, rounds, f_rng, p_rng ) )
+ == 0 &&
+ ( ret = mpi_miller_rabin( &Y, rounds, f_rng, p_rng ) )
+ == 0 )
goto cleanup;
if( ret != MBEDTLS_ERR_MPI_NOT_ACCEPTABLE )
diff --git a/thirdparty/mbedtls/library/blowfish.c b/thirdparty/mbedtls/library/blowfish.c
index 5b6bb9885f..cbf9238246 100644
--- a/thirdparty/mbedtls/library/blowfish.c
+++ b/thirdparty/mbedtls/library/blowfish.c
@@ -40,6 +40,12 @@
#if !defined(MBEDTLS_BLOWFISH_ALT)
+/* Parameter validation macros */
+#define BLOWFISH_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA )
+#define BLOWFISH_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* 32-bit integer manipulation macros (big endian)
*/
@@ -153,6 +159,7 @@ static void blowfish_dec( mbedtls_blowfish_context *ctx, uint32_t *xl, uint32_t
void mbedtls_blowfish_init( mbedtls_blowfish_context *ctx )
{
+ BLOWFISH_VALIDATE( ctx != NULL );
memset( ctx, 0, sizeof( mbedtls_blowfish_context ) );
}
@@ -167,16 +174,20 @@ void mbedtls_blowfish_free( mbedtls_blowfish_context *ctx )
/*
* Blowfish key schedule
*/
-int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx, const unsigned char *key,
- unsigned int keybits )
+int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx,
+ const unsigned char *key,
+ unsigned int keybits )
{
unsigned int i, j, k;
uint32_t data, datal, datar;
+ BLOWFISH_VALIDATE_RET( ctx != NULL );
+ BLOWFISH_VALIDATE_RET( key != NULL );
- if( keybits < MBEDTLS_BLOWFISH_MIN_KEY_BITS || keybits > MBEDTLS_BLOWFISH_MAX_KEY_BITS ||
- ( keybits % 8 ) )
+ if( keybits < MBEDTLS_BLOWFISH_MIN_KEY_BITS ||
+ keybits > MBEDTLS_BLOWFISH_MAX_KEY_BITS ||
+ keybits % 8 != 0 )
{
- return( MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH );
+ return( MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA );
}
keybits >>= 3;
@@ -231,6 +242,11 @@ int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx,
unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE] )
{
uint32_t X0, X1;
+ BLOWFISH_VALIDATE_RET( ctx != NULL );
+ BLOWFISH_VALIDATE_RET( mode == MBEDTLS_BLOWFISH_ENCRYPT ||
+ mode == MBEDTLS_BLOWFISH_DECRYPT );
+ BLOWFISH_VALIDATE_RET( input != NULL );
+ BLOWFISH_VALIDATE_RET( output != NULL );
GET_UINT32_BE( X0, input, 0 );
GET_UINT32_BE( X1, input, 4 );
@@ -263,6 +279,12 @@ int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
{
int i;
unsigned char temp[MBEDTLS_BLOWFISH_BLOCKSIZE];
+ BLOWFISH_VALIDATE_RET( ctx != NULL );
+ BLOWFISH_VALIDATE_RET( mode == MBEDTLS_BLOWFISH_ENCRYPT ||
+ mode == MBEDTLS_BLOWFISH_DECRYPT );
+ BLOWFISH_VALIDATE_RET( iv != NULL );
+ BLOWFISH_VALIDATE_RET( length == 0 || input != NULL );
+ BLOWFISH_VALIDATE_RET( length == 0 || output != NULL );
if( length % MBEDTLS_BLOWFISH_BLOCKSIZE )
return( MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH );
@@ -317,7 +339,19 @@ int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
unsigned char *output )
{
int c;
- size_t n = *iv_off;
+ size_t n;
+
+ BLOWFISH_VALIDATE_RET( ctx != NULL );
+ BLOWFISH_VALIDATE_RET( mode == MBEDTLS_BLOWFISH_ENCRYPT ||
+ mode == MBEDTLS_BLOWFISH_DECRYPT );
+ BLOWFISH_VALIDATE_RET( iv != NULL );
+ BLOWFISH_VALIDATE_RET( iv_off != NULL );
+ BLOWFISH_VALIDATE_RET( length == 0 || input != NULL );
+ BLOWFISH_VALIDATE_RET( length == 0 || output != NULL );
+
+ n = *iv_off;
+ if( n >= 8 )
+ return( MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA );
if( mode == MBEDTLS_BLOWFISH_DECRYPT )
{
@@ -365,7 +399,17 @@ int mbedtls_blowfish_crypt_ctr( mbedtls_blowfish_context *ctx,
unsigned char *output )
{
int c, i;
- size_t n = *nc_off;
+ size_t n;
+ BLOWFISH_VALIDATE_RET( ctx != NULL );
+ BLOWFISH_VALIDATE_RET( nonce_counter != NULL );
+ BLOWFISH_VALIDATE_RET( stream_block != NULL );
+ BLOWFISH_VALIDATE_RET( nc_off != NULL );
+ BLOWFISH_VALIDATE_RET( length == 0 || input != NULL );
+ BLOWFISH_VALIDATE_RET( length == 0 || output != NULL );
+
+ n = *nc_off;
+ if( n >= 8 )
+ return( MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA );
while( length-- )
{
diff --git a/thirdparty/mbedtls/library/camellia.c b/thirdparty/mbedtls/library/camellia.c
index 41b7da0fae..22262b89a8 100644
--- a/thirdparty/mbedtls/library/camellia.c
+++ b/thirdparty/mbedtls/library/camellia.c
@@ -49,6 +49,12 @@
#if !defined(MBEDTLS_CAMELLIA_ALT)
+/* Parameter validation macros */
+#define CAMELLIA_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA )
+#define CAMELLIA_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* 32-bit integer manipulation macros (big endian)
*/
@@ -321,6 +327,7 @@ static void camellia_feistel( const uint32_t x[2], const uint32_t k[2],
void mbedtls_camellia_init( mbedtls_camellia_context *ctx )
{
+ CAMELLIA_VALIDATE( ctx != NULL );
memset( ctx, 0, sizeof( mbedtls_camellia_context ) );
}
@@ -335,8 +342,9 @@ void mbedtls_camellia_free( mbedtls_camellia_context *ctx )
/*
* Camellia key schedule (encryption)
*/
-int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned char *key,
- unsigned int keybits )
+int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx,
+ const unsigned char *key,
+ unsigned int keybits )
{
int idx;
size_t i;
@@ -346,6 +354,9 @@ int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned c
uint32_t KC[16];
uint32_t TK[20];
+ CAMELLIA_VALIDATE_RET( ctx != NULL );
+ CAMELLIA_VALIDATE_RET( key != NULL );
+
RK = ctx->rk;
memset( t, 0, 64 );
@@ -356,7 +367,7 @@ int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned c
case 128: ctx->nr = 3; idx = 0; break;
case 192:
case 256: ctx->nr = 4; idx = 1; break;
- default : return( MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH );
+ default : return( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA );
}
for( i = 0; i < keybits / 8; ++i )
@@ -440,14 +451,17 @@ int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned c
/*
* Camellia key schedule (decryption)
*/
-int mbedtls_camellia_setkey_dec( mbedtls_camellia_context *ctx, const unsigned char *key,
- unsigned int keybits )
+int mbedtls_camellia_setkey_dec( mbedtls_camellia_context *ctx,
+ const unsigned char *key,
+ unsigned int keybits )
{
int idx, ret;
size_t i;
mbedtls_camellia_context cty;
uint32_t *RK;
uint32_t *SK;
+ CAMELLIA_VALIDATE_RET( ctx != NULL );
+ CAMELLIA_VALIDATE_RET( key != NULL );
mbedtls_camellia_init( &cty );
@@ -495,6 +509,11 @@ int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx,
{
int NR;
uint32_t *RK, X[4];
+ CAMELLIA_VALIDATE_RET( ctx != NULL );
+ CAMELLIA_VALIDATE_RET( mode == MBEDTLS_CAMELLIA_ENCRYPT ||
+ mode == MBEDTLS_CAMELLIA_DECRYPT );
+ CAMELLIA_VALIDATE_RET( input != NULL );
+ CAMELLIA_VALIDATE_RET( output != NULL );
( (void) mode );
@@ -552,14 +571,20 @@ int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx,
* Camellia-CBC buffer encryption/decryption
*/
int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx,
- int mode,
- size_t length,
- unsigned char iv[16],
- const unsigned char *input,
- unsigned char *output )
+ int mode,
+ size_t length,
+ unsigned char iv[16],
+ const unsigned char *input,
+ unsigned char *output )
{
int i;
unsigned char temp[16];
+ CAMELLIA_VALIDATE_RET( ctx != NULL );
+ CAMELLIA_VALIDATE_RET( mode == MBEDTLS_CAMELLIA_ENCRYPT ||
+ mode == MBEDTLS_CAMELLIA_DECRYPT );
+ CAMELLIA_VALIDATE_RET( iv != NULL );
+ CAMELLIA_VALIDATE_RET( length == 0 || input != NULL );
+ CAMELLIA_VALIDATE_RET( length == 0 || output != NULL );
if( length % 16 )
return( MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH );
@@ -614,7 +639,18 @@ int mbedtls_camellia_crypt_cfb128( mbedtls_camellia_context *ctx,
unsigned char *output )
{
int c;
- size_t n = *iv_off;
+ size_t n;
+ CAMELLIA_VALIDATE_RET( ctx != NULL );
+ CAMELLIA_VALIDATE_RET( mode == MBEDTLS_CAMELLIA_ENCRYPT ||
+ mode == MBEDTLS_CAMELLIA_DECRYPT );
+ CAMELLIA_VALIDATE_RET( iv != NULL );
+ CAMELLIA_VALIDATE_RET( iv_off != NULL );
+ CAMELLIA_VALIDATE_RET( length == 0 || input != NULL );
+ CAMELLIA_VALIDATE_RET( length == 0 || output != NULL );
+
+ n = *iv_off;
+ if( n >= 16 )
+ return( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA );
if( mode == MBEDTLS_CAMELLIA_DECRYPT )
{
@@ -662,7 +698,17 @@ int mbedtls_camellia_crypt_ctr( mbedtls_camellia_context *ctx,
unsigned char *output )
{
int c, i;
- size_t n = *nc_off;
+ size_t n;
+ CAMELLIA_VALIDATE_RET( ctx != NULL );
+ CAMELLIA_VALIDATE_RET( nonce_counter != NULL );
+ CAMELLIA_VALIDATE_RET( stream_block != NULL );
+ CAMELLIA_VALIDATE_RET( nc_off != NULL );
+ CAMELLIA_VALIDATE_RET( length == 0 || input != NULL );
+ CAMELLIA_VALIDATE_RET( length == 0 || output != NULL );
+
+ n = *nc_off;
+ if( n >= 16 )
+ return( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA );
while( length-- )
{
diff --git a/thirdparty/mbedtls/library/ccm.c b/thirdparty/mbedtls/library/ccm.c
index 804eaf80f1..01e58b0436 100644
--- a/thirdparty/mbedtls/library/ccm.c
+++ b/thirdparty/mbedtls/library/ccm.c
@@ -52,6 +52,11 @@
#if !defined(MBEDTLS_CCM_ALT)
+#define CCM_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_CCM_BAD_INPUT )
+#define CCM_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#define CCM_ENCRYPT 0
#define CCM_DECRYPT 1
@@ -60,6 +65,7 @@
*/
void mbedtls_ccm_init( mbedtls_ccm_context *ctx )
{
+ CCM_VALIDATE( ctx != NULL );
memset( ctx, 0, sizeof( mbedtls_ccm_context ) );
}
@@ -71,6 +77,9 @@ int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx,
int ret;
const mbedtls_cipher_info_t *cipher_info;
+ CCM_VALIDATE_RET( ctx != NULL );
+ CCM_VALIDATE_RET( key != NULL );
+
cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, MBEDTLS_MODE_ECB );
if( cipher_info == NULL )
return( MBEDTLS_ERR_CCM_BAD_INPUT );
@@ -97,6 +106,8 @@ int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx,
*/
void mbedtls_ccm_free( mbedtls_ccm_context *ctx )
{
+ if( ctx == NULL )
+ return;
mbedtls_cipher_free( &ctx->cipher_ctx );
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_ccm_context ) );
}
@@ -310,6 +321,12 @@ int mbedtls_ccm_star_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
const unsigned char *input, unsigned char *output,
unsigned char *tag, size_t tag_len )
{
+ CCM_VALIDATE_RET( ctx != NULL );
+ CCM_VALIDATE_RET( iv != NULL );
+ CCM_VALIDATE_RET( add_len == 0 || add != NULL );
+ CCM_VALIDATE_RET( length == 0 || input != NULL );
+ CCM_VALIDATE_RET( length == 0 || output != NULL );
+ CCM_VALIDATE_RET( tag_len == 0 || tag != NULL );
return( ccm_auth_crypt( ctx, CCM_ENCRYPT, length, iv, iv_len,
add, add_len, input, output, tag, tag_len ) );
}
@@ -320,6 +337,12 @@ int mbedtls_ccm_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
const unsigned char *input, unsigned char *output,
unsigned char *tag, size_t tag_len )
{
+ CCM_VALIDATE_RET( ctx != NULL );
+ CCM_VALIDATE_RET( iv != NULL );
+ CCM_VALIDATE_RET( add_len == 0 || add != NULL );
+ CCM_VALIDATE_RET( length == 0 || input != NULL );
+ CCM_VALIDATE_RET( length == 0 || output != NULL );
+ CCM_VALIDATE_RET( tag_len == 0 || tag != NULL );
if( tag_len == 0 )
return( MBEDTLS_ERR_CCM_BAD_INPUT );
@@ -341,6 +364,13 @@ int mbedtls_ccm_star_auth_decrypt( mbedtls_ccm_context *ctx, size_t length,
unsigned char i;
int diff;
+ CCM_VALIDATE_RET( ctx != NULL );
+ CCM_VALIDATE_RET( iv != NULL );
+ CCM_VALIDATE_RET( add_len == 0 || add != NULL );
+ CCM_VALIDATE_RET( length == 0 || input != NULL );
+ CCM_VALIDATE_RET( length == 0 || output != NULL );
+ CCM_VALIDATE_RET( tag_len == 0 || tag != NULL );
+
if( ( ret = ccm_auth_crypt( ctx, CCM_DECRYPT, length,
iv, iv_len, add, add_len,
input, output, check_tag, tag_len ) ) != 0 )
@@ -367,6 +397,13 @@ int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length,
const unsigned char *input, unsigned char *output,
const unsigned char *tag, size_t tag_len )
{
+ CCM_VALIDATE_RET( ctx != NULL );
+ CCM_VALIDATE_RET( iv != NULL );
+ CCM_VALIDATE_RET( add_len == 0 || add != NULL );
+ CCM_VALIDATE_RET( length == 0 || input != NULL );
+ CCM_VALIDATE_RET( length == 0 || output != NULL );
+ CCM_VALIDATE_RET( tag_len == 0 || tag != NULL );
+
if( tag_len == 0 )
return( MBEDTLS_ERR_CCM_BAD_INPUT );
@@ -381,7 +418,8 @@ int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length,
*/
#define NB_TESTS 3
-
+#define CCM_SELFTEST_PT_MAX_LEN 24
+#define CCM_SELFTEST_CT_MAX_LEN 32
/*
* The data is the same for all tests, only the used length changes
*/
@@ -401,7 +439,7 @@ static const unsigned char ad[] = {
0x10, 0x11, 0x12, 0x13
};
-static const unsigned char msg[] = {
+static const unsigned char msg[CCM_SELFTEST_PT_MAX_LEN] = {
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
@@ -412,7 +450,7 @@ static const size_t add_len[NB_TESTS] = { 8, 16, 20 };
static const size_t msg_len[NB_TESTS] = { 4, 16, 24 };
static const size_t tag_len[NB_TESTS] = { 4, 6, 8 };
-static const unsigned char res[NB_TESTS][32] = {
+static const unsigned char res[NB_TESTS][CCM_SELFTEST_CT_MAX_LEN] = {
{ 0x71, 0x62, 0x01, 0x5b, 0x4d, 0xac, 0x25, 0x5d },
{ 0xd2, 0xa1, 0xf0, 0xe0, 0x51, 0xea, 0x5f, 0x62,
0x08, 0x1a, 0x77, 0x92, 0x07, 0x3d, 0x59, 0x3d,
@@ -426,7 +464,13 @@ static const unsigned char res[NB_TESTS][32] = {
int mbedtls_ccm_self_test( int verbose )
{
mbedtls_ccm_context ctx;
- unsigned char out[32];
+ /*
+ * Some hardware accelerators require the input and output buffers
+ * would be in RAM, because the flash is not accessible.
+ * Use buffers on the stack to hold the test vectors data.
+ */
+ unsigned char plaintext[CCM_SELFTEST_PT_MAX_LEN];
+ unsigned char ciphertext[CCM_SELFTEST_CT_MAX_LEN];
size_t i;
int ret;
@@ -445,27 +489,32 @@ int mbedtls_ccm_self_test( int verbose )
if( verbose != 0 )
mbedtls_printf( " CCM-AES #%u: ", (unsigned int) i + 1 );
+ memset( plaintext, 0, CCM_SELFTEST_PT_MAX_LEN );
+ memset( ciphertext, 0, CCM_SELFTEST_CT_MAX_LEN );
+ memcpy( plaintext, msg, msg_len[i] );
+
ret = mbedtls_ccm_encrypt_and_tag( &ctx, msg_len[i],
- iv, iv_len[i], ad, add_len[i],
- msg, out,
- out + msg_len[i], tag_len[i] );
+ iv, iv_len[i], ad, add_len[i],
+ plaintext, ciphertext,
+ ciphertext + msg_len[i], tag_len[i] );
if( ret != 0 ||
- memcmp( out, res[i], msg_len[i] + tag_len[i] ) != 0 )
+ memcmp( ciphertext, res[i], msg_len[i] + tag_len[i] ) != 0 )
{
if( verbose != 0 )
mbedtls_printf( "failed\n" );
return( 1 );
}
+ memset( plaintext, 0, CCM_SELFTEST_PT_MAX_LEN );
ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len[i],
- iv, iv_len[i], ad, add_len[i],
- res[i], out,
- res[i] + msg_len[i], tag_len[i] );
+ iv, iv_len[i], ad, add_len[i],
+ ciphertext, plaintext,
+ ciphertext + msg_len[i], tag_len[i] );
if( ret != 0 ||
- memcmp( out, msg, msg_len[i] ) != 0 )
+ memcmp( plaintext, msg, msg_len[i] ) != 0 )
{
if( verbose != 0 )
mbedtls_printf( "failed\n" );
diff --git a/thirdparty/mbedtls/library/certs.c b/thirdparty/mbedtls/library/certs.c
index f1379b8cb1..ff0f11e923 100644
--- a/thirdparty/mbedtls/library/certs.c
+++ b/thirdparty/mbedtls/library/certs.c
@@ -218,12 +218,13 @@ const size_t mbedtls_test_ca_key_rsa_len = sizeof( mbedtls_test_ca_key_rsa );
const char mbedtls_test_ca_pwd_rsa[] = "PolarSSLTest";
const size_t mbedtls_test_ca_pwd_rsa_len = sizeof( mbedtls_test_ca_pwd_rsa ) - 1;
+/* tests/data_files/server2.crt */
const char mbedtls_test_srv_crt_rsa[] =
"-----BEGIN CERTIFICATE-----\r\n"
"MIIDNzCCAh+gAwIBAgIBAjANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER\r\n"
-"MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n"
+"MA8GA1UECgwIUG9sYXJTU0wxGTAXBgNVBAMMEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n"
"MTEwMjEyMTQ0NDA2WhcNMjEwMjEyMTQ0NDA2WjA0MQswCQYDVQQGEwJOTDERMA8G\r\n"
-"A1UEChMIUG9sYXJTU0wxEjAQBgNVBAMTCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcN\r\n"
+"A1UECgwIUG9sYXJTU0wxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcN\r\n"
"AQEBBQADggEPADCCAQoCggEBAMFNo93nzR3RBNdJcriZrA545Do8Ss86ExbQWuTN\r\n"
"owCIp+4ea5anUrSQ7y1yej4kmvy2NKwk9XfgJmSMnLAofaHa6ozmyRyWvP7BBFKz\r\n"
"NtSj+uGxdtiQwWG0ZlI2oiZTqqt0Xgd9GYLbKtgfoNkNHC1JZvdbJXNG6AuKT2kM\r\n"
@@ -231,16 +232,17 @@ const char mbedtls_test_srv_crt_rsa[] =
"hYvai0Re4hjGYi/HZo36Xdh98yeJKQHFkA4/J/EwyEoO79bex8cna8cFPXrEAjya\r\n"
"HT4P6DSYW8tzS1KW2BGiLICIaTla0w+w3lkvEcf36hIBMJcCAwEAAaNNMEswCQYD\r\n"
"VR0TBAIwADAdBgNVHQ4EFgQUpQXoZLjc32APUBJNYKhkr02LQ5MwHwYDVR0jBBgw\r\n"
-"FoAUtFrkpbPe0lL2udWmlQ/rPrzH/f8wDQYJKoZIhvcNAQEFBQADggEBAJxnXClY\r\n"
-"oHkbp70cqBrsGXLybA74czbO5RdLEgFs7rHVS9r+c293luS/KdliLScZqAzYVylw\r\n"
-"UfRWvKMoWhHYKp3dEIS4xTXk6/5zXxhv9Rw8SGc8qn6vITHk1S1mPevtekgasY5Y\r\n"
-"iWQuM3h4YVlRH3HHEMAD1TnAexfXHHDFQGe+Bd1iAbz1/sH9H8l4StwX6egvTK3M\r\n"
-"wXRwkKkvjKaEDA9ATbZx0mI8LGsxSuCqe9r9dyjmttd47J1p1Rulz3CLzaRcVIuS\r\n"
-"RRQfaD8neM9c1S/iJ/amTVqJxA1KOdOS5780WhPfSArA+g4qAmSjelc3p4wWpha8\r\n"
-"zhuYwjVuX6JHG0c=\r\n"
+"FoAUtFrkpbPe0lL2udWmlQ/rPrzH/f8wDQYJKoZIhvcNAQEFBQADggEBAAFzC0rF\r\n"
+"y6De8WMcdgQrEw3AhBHFjzqnxZw1ene4IBSC7lTw8rBSy3jOWQdPUWn+0y/pCeeF\r\n"
+"kti6sevFdl1hLemGtd4q+T9TKEKGg3ND4ARfB5AUZZ9uEHq8WBkiwus5clGS17Qd\r\n"
+"dS/TOisB59tQruLx1E1bPLtBKyqk4koC5WAULJwfpswGSyWJTpYwIpxcWE3D2tBu\r\n"
+"UB6MZfXZFzWmWEOyKbeoXjXe8GBCGgHLywvYDsGQ36HSGtEsAvR2QaTLSxWYcfk1\r\n"
+"fbDn4jSWkb4yZy1r01UEigFQtONieGwRFaUqEcFJHJvEEGVgh9keaVlOj2vrwf5r\r\n"
+"4mN4lW7gLdenN6g=\r\n"
"-----END CERTIFICATE-----\r\n";
const size_t mbedtls_test_srv_crt_rsa_len = sizeof( mbedtls_test_srv_crt_rsa );
+/* tests/data_files/server2.key */
const char mbedtls_test_srv_key_rsa[] =
"-----BEGIN RSA PRIVATE KEY-----\r\n"
"MIIEpAIBAAKCAQEAwU2j3efNHdEE10lyuJmsDnjkOjxKzzoTFtBa5M2jAIin7h5r\r\n"
@@ -271,11 +273,12 @@ const char mbedtls_test_srv_key_rsa[] =
"-----END RSA PRIVATE KEY-----\r\n";
const size_t mbedtls_test_srv_key_rsa_len = sizeof( mbedtls_test_srv_key_rsa );
+/* tests/data_files/cli-rsa-sha256.crt */
const char mbedtls_test_cli_crt_rsa[] =
"-----BEGIN CERTIFICATE-----\r\n"
-"MIIDhTCCAm2gAwIBAgIBBDANBgkqhkiG9w0BAQsFADA7MQswCQYDVQQGEwJOTDER\r\n"
+"MIIDPzCCAiegAwIBAgIBBDANBgkqhkiG9w0BAQsFADA7MQswCQYDVQQGEwJOTDER\r\n"
"MA8GA1UECgwIUG9sYXJTU0wxGTAXBgNVBAMMEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n"
-"MTcwNTA1MTMwNzU5WhcNMjcwNTA2MTMwNzU5WjA8MQswCQYDVQQGEwJOTDERMA8G\r\n"
+"MTEwMjEyMTQ0NDA2WhcNMjEwMjEyMTQ0NDA2WjA8MQswCQYDVQQGEwJOTDERMA8G\r\n"
"A1UECgwIUG9sYXJTU0wxGjAYBgNVBAMMEVBvbGFyU1NMIENsaWVudCAyMIIBIjAN\r\n"
"BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyHTEzLn5tXnpRdkUYLB9u5Pyax6f\r\n"
"M60Nj4o8VmXl3ETZzGaFB9X4J7BKNdBjngpuG7fa8H6r7gwQk4ZJGDTzqCrSV/Uu\r\n"
@@ -283,18 +286,18 @@ const char mbedtls_test_cli_crt_rsa[] =
"MjDV0/YI0FZPRo7yX/k9Z5GIMC5Cst99++UMd//sMcB4j7/Cf8qtbCHWjdmLao5v\r\n"
"4Jv4EFbMs44TFeY0BGbH7vk2DmqV9gmaBmf0ZXH4yqSxJeD+PIs1BGe64E92hfx/\r\n"
"/DZrtenNLQNiTrM9AM+vdqBpVoNq0qjU51Bx5rU2BXcFbXvI5MT9TNUhXwIDAQAB\r\n"
-"o4GSMIGPMB0GA1UdDgQWBBRxoQBzckAvVHZeM/xSj7zx3WtGITBjBgNVHSMEXDBa\r\n"
-"gBS0WuSls97SUva51aaVD+s+vMf9/6E/pD0wOzELMAkGA1UEBhMCTkwxETAPBgNV\r\n"
-"BAoMCFBvbGFyU1NMMRkwFwYDVQQDDBBQb2xhclNTTCBUZXN0IENBggEAMAkGA1Ud\r\n"
-"EwQCMAAwDQYJKoZIhvcNAQELBQADggEBAC7yO786NvcHpK8UovKIG9cB32oSQQom\r\n"
-"LoR0eHDRzdqEkoq7yGZufHFiRAAzbMqJfogRtxlrWAeB4y/jGaMBV25IbFOIcH2W\r\n"
-"iCEaMMbG+VQLKNvuC63kmw/Zewc9ThM6Pa1Hcy0axT0faf1B/U01j0FIcw/6mTfK\r\n"
-"D8w48OIwc1yr0JtutCVjig5DC0yznGMt32RyseOLcUe+lfq005v2PAiCozr5X8rE\r\n"
-"ofGZpiM2NqRPePgYy+Vc75Zk28xkRQq1ncprgQb3S4vTsZdScpM9hLf+eMlrgqlj\r\n"
-"c5PLSkXBeLE5+fedkyfTaLxxQlgCpuoOhKBm04/R1pWNzUHyqagjO9Q=\r\n"
+"o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBRxoQBzckAvVHZeM/xSj7zx3WtGITAf\r\n"
+"BgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQsFAAOC\r\n"
+"AQEAlHabem2Tu69VUN7EipwnQn1dIHdgvT5i+iQHpSxY1crPnBbAeSdAXwsVEqLQ\r\n"
+"gOOIAQD5VIITNuoGgo4i+4OpNh9u7ZkpRHla+/swsfrFWRRbBNP5Bcu74AGLstwU\r\n"
+"zM8gIkBiyfM1Q1qDQISV9trlCG6O8vh8dp/rbI3rfzo99BOHXgFCrzXjCuW4vDsF\r\n"
+"r+Dao26bX3sJ6UnEWg1H3o2x6PpUcvQ36h71/bz4TEbbUUEpe02V4QWuL+wrhHJL\r\n"
+"U7o3SVE3Og7jPF8sat0a50YUWhwEFI256m02KAXLg89ueUyYKEr6rNwhcvXJpvU9\r\n"
+"giIVvd0Sbjjnn7NC4VDbcXV8vw==\r\n"
"-----END CERTIFICATE-----\r\n";
const size_t mbedtls_test_cli_crt_rsa_len = sizeof( mbedtls_test_cli_crt_rsa );
+/* tests/data_files/cli-rsa.key */
const char mbedtls_test_cli_key_rsa[] =
"-----BEGIN RSA PRIVATE KEY-----\r\n"
"MIIEpAIBAAKCAQEAyHTEzLn5tXnpRdkUYLB9u5Pyax6fM60Nj4o8VmXl3ETZzGaF\r\n"
diff --git a/thirdparty/mbedtls/library/chacha20.c b/thirdparty/mbedtls/library/chacha20.c
index d14a51e044..0757163e2f 100644
--- a/thirdparty/mbedtls/library/chacha20.c
+++ b/thirdparty/mbedtls/library/chacha20.c
@@ -53,6 +53,12 @@
#define inline __inline
#endif
+/* Parameter validation macros */
+#define CHACHA20_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA )
+#define CHACHA20_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#define BYTES_TO_U32_LE( data, offset ) \
( (uint32_t) data[offset] \
| (uint32_t) ( (uint32_t) data[( offset ) + 1] << 8 ) \
@@ -181,14 +187,13 @@ static void chacha20_block( const uint32_t initial_state[16],
void mbedtls_chacha20_init( mbedtls_chacha20_context *ctx )
{
- if( ctx != NULL )
- {
- mbedtls_platform_zeroize( ctx->state, sizeof( ctx->state ) );
- mbedtls_platform_zeroize( ctx->keystream8, sizeof( ctx->keystream8 ) );
+ CHACHA20_VALIDATE( ctx != NULL );
- /* Initially, there's no keystream bytes available */
- ctx->keystream_bytes_used = CHACHA20_BLOCK_SIZE_BYTES;
- }
+ mbedtls_platform_zeroize( ctx->state, sizeof( ctx->state ) );
+ mbedtls_platform_zeroize( ctx->keystream8, sizeof( ctx->keystream8 ) );
+
+ /* Initially, there's no keystream bytes available */
+ ctx->keystream_bytes_used = CHACHA20_BLOCK_SIZE_BYTES;
}
void mbedtls_chacha20_free( mbedtls_chacha20_context *ctx )
@@ -202,10 +207,8 @@ void mbedtls_chacha20_free( mbedtls_chacha20_context *ctx )
int mbedtls_chacha20_setkey( mbedtls_chacha20_context *ctx,
const unsigned char key[32] )
{
- if( ( ctx == NULL ) || ( key == NULL ) )
- {
- return( MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA );
- }
+ CHACHA20_VALIDATE_RET( ctx != NULL );
+ CHACHA20_VALIDATE_RET( key != NULL );
/* ChaCha20 constants - the string "expand 32-byte k" */
ctx->state[0] = 0x61707865;
@@ -230,10 +233,8 @@ int mbedtls_chacha20_starts( mbedtls_chacha20_context* ctx,
const unsigned char nonce[12],
uint32_t counter )
{
- if( ( ctx == NULL ) || ( nonce == NULL ) )
- {
- return( MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA );
- }
+ CHACHA20_VALIDATE_RET( ctx != NULL );
+ CHACHA20_VALIDATE_RET( nonce != NULL );
/* Counter */
ctx->state[12] = counter;
@@ -259,15 +260,9 @@ int mbedtls_chacha20_update( mbedtls_chacha20_context *ctx,
size_t offset = 0U;
size_t i;
- if( ctx == NULL )
- {
- return( MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA );
- }
- else if( ( size > 0U ) && ( ( input == NULL ) || ( output == NULL ) ) )
- {
- /* input and output pointers are allowed to be NULL only if size == 0 */
- return( MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA );
- }
+ CHACHA20_VALIDATE_RET( ctx != NULL );
+ CHACHA20_VALIDATE_RET( size == 0 || input != NULL );
+ CHACHA20_VALIDATE_RET( size == 0 || output != NULL );
/* Use leftover keystream bytes, if available */
while( size > 0U && ctx->keystream_bytes_used < CHACHA20_BLOCK_SIZE_BYTES )
@@ -332,6 +327,11 @@ int mbedtls_chacha20_crypt( const unsigned char key[32],
mbedtls_chacha20_context ctx;
int ret;
+ CHACHA20_VALIDATE_RET( key != NULL );
+ CHACHA20_VALIDATE_RET( nonce != NULL );
+ CHACHA20_VALIDATE_RET( data_len == 0 || input != NULL );
+ CHACHA20_VALIDATE_RET( data_len == 0 || output != NULL );
+
mbedtls_chacha20_init( &ctx );
ret = mbedtls_chacha20_setkey( &ctx, key );
diff --git a/thirdparty/mbedtls/library/chachapoly.c b/thirdparty/mbedtls/library/chachapoly.c
index 860f877653..dc643dd618 100644
--- a/thirdparty/mbedtls/library/chachapoly.c
+++ b/thirdparty/mbedtls/library/chachapoly.c
@@ -44,6 +44,12 @@
#if !defined(MBEDTLS_CHACHAPOLY_ALT)
+/* Parameter validation macros */
+#define CHACHAPOLY_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA )
+#define CHACHAPOLY_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#define CHACHAPOLY_STATE_INIT ( 0 )
#define CHACHAPOLY_STATE_AAD ( 1 )
#define CHACHAPOLY_STATE_CIPHERTEXT ( 2 ) /* Encrypting or decrypting */
@@ -90,39 +96,35 @@ static int chachapoly_pad_ciphertext( mbedtls_chachapoly_context *ctx )
void mbedtls_chachapoly_init( mbedtls_chachapoly_context *ctx )
{
- if( ctx != NULL )
- {
- mbedtls_chacha20_init( &ctx->chacha20_ctx );
- mbedtls_poly1305_init( &ctx->poly1305_ctx );
- ctx->aad_len = 0U;
- ctx->ciphertext_len = 0U;
- ctx->state = CHACHAPOLY_STATE_INIT;
- ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT;
- }
+ CHACHAPOLY_VALIDATE( ctx != NULL );
+
+ mbedtls_chacha20_init( &ctx->chacha20_ctx );
+ mbedtls_poly1305_init( &ctx->poly1305_ctx );
+ ctx->aad_len = 0U;
+ ctx->ciphertext_len = 0U;
+ ctx->state = CHACHAPOLY_STATE_INIT;
+ ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT;
}
void mbedtls_chachapoly_free( mbedtls_chachapoly_context *ctx )
{
- if( ctx != NULL )
- {
- mbedtls_chacha20_free( &ctx->chacha20_ctx );
- mbedtls_poly1305_free( &ctx->poly1305_ctx );
- ctx->aad_len = 0U;
- ctx->ciphertext_len = 0U;
- ctx->state = CHACHAPOLY_STATE_INIT;
- ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT;
- }
+ if( ctx == NULL )
+ return;
+
+ mbedtls_chacha20_free( &ctx->chacha20_ctx );
+ mbedtls_poly1305_free( &ctx->poly1305_ctx );
+ ctx->aad_len = 0U;
+ ctx->ciphertext_len = 0U;
+ ctx->state = CHACHAPOLY_STATE_INIT;
+ ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT;
}
int mbedtls_chachapoly_setkey( mbedtls_chachapoly_context *ctx,
const unsigned char key[32] )
{
int ret;
-
- if( ( ctx == NULL ) || ( key == NULL ) )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
+ CHACHAPOLY_VALIDATE_RET( ctx != NULL );
+ CHACHAPOLY_VALIDATE_RET( key != NULL );
ret = mbedtls_chacha20_setkey( &ctx->chacha20_ctx, key );
@@ -135,11 +137,8 @@ int mbedtls_chachapoly_starts( mbedtls_chachapoly_context *ctx,
{
int ret;
unsigned char poly1305_key[64];
-
- if( ( ctx == NULL ) || ( nonce == NULL ) )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
+ CHACHAPOLY_VALIDATE_RET( ctx != NULL );
+ CHACHAPOLY_VALIDATE_RET( nonce != NULL );
/* Set counter = 0, will be update to 1 when generating Poly1305 key */
ret = mbedtls_chacha20_starts( &ctx->chacha20_ctx, nonce, 0U );
@@ -176,19 +175,11 @@ int mbedtls_chachapoly_update_aad( mbedtls_chachapoly_context *ctx,
const unsigned char *aad,
size_t aad_len )
{
- if( ctx == NULL )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
- else if( ( aad_len > 0U ) && ( aad == NULL ) )
- {
- /* aad pointer is allowed to be NULL if aad_len == 0 */
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
- else if( ctx->state != CHACHAPOLY_STATE_AAD )
- {
+ CHACHAPOLY_VALIDATE_RET( ctx != NULL );
+ CHACHAPOLY_VALIDATE_RET( aad_len == 0 || aad != NULL );
+
+ if( ctx->state != CHACHAPOLY_STATE_AAD )
return( MBEDTLS_ERR_CHACHAPOLY_BAD_STATE );
- }
ctx->aad_len += aad_len;
@@ -201,18 +192,12 @@ int mbedtls_chachapoly_update( mbedtls_chachapoly_context *ctx,
unsigned char *output )
{
int ret;
+ CHACHAPOLY_VALIDATE_RET( ctx != NULL );
+ CHACHAPOLY_VALIDATE_RET( len == 0 || input != NULL );
+ CHACHAPOLY_VALIDATE_RET( len == 0 || output != NULL );
- if( ctx == NULL )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
- else if( ( len > 0U ) && ( ( input == NULL ) || ( output == NULL ) ) )
- {
- /* input and output pointers are allowed to be NULL if len == 0 */
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
- else if( ( ctx->state != CHACHAPOLY_STATE_AAD ) &&
- ( ctx->state != CHACHAPOLY_STATE_CIPHERTEXT ) )
+ if( ( ctx->state != CHACHAPOLY_STATE_AAD ) &&
+ ( ctx->state != CHACHAPOLY_STATE_CIPHERTEXT ) )
{
return( MBEDTLS_ERR_CHACHAPOLY_BAD_STATE );
}
@@ -257,12 +242,10 @@ int mbedtls_chachapoly_finish( mbedtls_chachapoly_context *ctx,
{
int ret;
unsigned char len_block[16];
+ CHACHAPOLY_VALIDATE_RET( ctx != NULL );
+ CHACHAPOLY_VALIDATE_RET( mac != NULL );
- if( ( ctx == NULL ) || ( mac == NULL ) )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
- else if( ctx->state == CHACHAPOLY_STATE_INIT )
+ if( ctx->state == CHACHAPOLY_STATE_INIT )
{
return( MBEDTLS_ERR_CHACHAPOLY_BAD_STATE );
}
@@ -350,6 +333,13 @@ int mbedtls_chachapoly_encrypt_and_tag( mbedtls_chachapoly_context *ctx,
unsigned char *output,
unsigned char tag[16] )
{
+ CHACHAPOLY_VALIDATE_RET( ctx != NULL );
+ CHACHAPOLY_VALIDATE_RET( nonce != NULL );
+ CHACHAPOLY_VALIDATE_RET( tag != NULL );
+ CHACHAPOLY_VALIDATE_RET( aad_len == 0 || aad != NULL );
+ CHACHAPOLY_VALIDATE_RET( length == 0 || input != NULL );
+ CHACHAPOLY_VALIDATE_RET( length == 0 || output != NULL );
+
return( chachapoly_crypt_and_tag( ctx, MBEDTLS_CHACHAPOLY_ENCRYPT,
length, nonce, aad, aad_len,
input, output, tag ) );
@@ -368,9 +358,12 @@ int mbedtls_chachapoly_auth_decrypt( mbedtls_chachapoly_context *ctx,
unsigned char check_tag[16];
size_t i;
int diff;
-
- if( tag == NULL )
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
+ CHACHAPOLY_VALIDATE_RET( ctx != NULL );
+ CHACHAPOLY_VALIDATE_RET( nonce != NULL );
+ CHACHAPOLY_VALIDATE_RET( tag != NULL );
+ CHACHAPOLY_VALIDATE_RET( aad_len == 0 || aad != NULL );
+ CHACHAPOLY_VALIDATE_RET( length == 0 || input != NULL );
+ CHACHAPOLY_VALIDATE_RET( length == 0 || output != NULL );
if( ( ret = chachapoly_crypt_and_tag( ctx,
MBEDTLS_CHACHAPOLY_DECRYPT, length, nonce,
diff --git a/thirdparty/mbedtls/library/cipher.c b/thirdparty/mbedtls/library/cipher.c
index 7ae6c4ac5d..273997577b 100644
--- a/thirdparty/mbedtls/library/cipher.c
+++ b/thirdparty/mbedtls/library/cipher.c
@@ -65,6 +65,11 @@
#define mbedtls_free free
#endif
+#define CIPHER_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA )
+#define CIPHER_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CHACHAPOLY_C)
/* Compare the contents of two buffers in constant time.
* Returns 0 if the contents are bitwise identical, otherwise returns
@@ -81,7 +86,7 @@ static int mbedtls_constant_time_memcmp( const void *v1, const void *v2, size_t
for( diff = 0, i = 0; i < len; i++ )
diff |= p1[i] ^ p2[i];
- return (int)diff;
+ return( (int)diff );
}
#endif /* MBEDTLS_GCM_C || MBEDTLS_CHACHAPOLY_C */
@@ -150,6 +155,7 @@ const mbedtls_cipher_info_t *mbedtls_cipher_info_from_values( const mbedtls_ciph
void mbedtls_cipher_init( mbedtls_cipher_context_t *ctx )
{
+ CIPHER_VALIDATE( ctx != NULL );
memset( ctx, 0, sizeof( mbedtls_cipher_context_t ) );
}
@@ -175,7 +181,8 @@ void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx )
int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx, const mbedtls_cipher_info_t *cipher_info )
{
- if( NULL == cipher_info || NULL == ctx )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ if( cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
memset( ctx, 0, sizeof( mbedtls_cipher_context_t ) );
@@ -199,10 +206,16 @@ int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx, const mbedtls_cipher_in
return( 0 );
}
-int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx, const unsigned char *key,
- int key_bitlen, const mbedtls_operation_t operation )
+int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx,
+ const unsigned char *key,
+ int key_bitlen,
+ const mbedtls_operation_t operation )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( key != NULL );
+ CIPHER_VALIDATE_RET( operation == MBEDTLS_ENCRYPT ||
+ operation == MBEDTLS_DECRYPT );
+ if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
if( ( ctx->cipher_info->flags & MBEDTLS_CIPHER_VARIABLE_KEY_LEN ) == 0 &&
@@ -222,23 +235,26 @@ int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx, const unsigned char *k
MBEDTLS_MODE_OFB == ctx->cipher_info->mode ||
MBEDTLS_MODE_CTR == ctx->cipher_info->mode )
{
- return ctx->cipher_info->base->setkey_enc_func( ctx->cipher_ctx, key,
- ctx->key_bitlen );
+ return( ctx->cipher_info->base->setkey_enc_func( ctx->cipher_ctx, key,
+ ctx->key_bitlen ) );
}
if( MBEDTLS_DECRYPT == operation )
- return ctx->cipher_info->base->setkey_dec_func( ctx->cipher_ctx, key,
- ctx->key_bitlen );
+ return( ctx->cipher_info->base->setkey_dec_func( ctx->cipher_ctx, key,
+ ctx->key_bitlen ) );
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
}
int mbedtls_cipher_set_iv( mbedtls_cipher_context_t *ctx,
- const unsigned char *iv, size_t iv_len )
+ const unsigned char *iv,
+ size_t iv_len )
{
size_t actual_iv_size;
- if( NULL == ctx || NULL == ctx->cipher_info || NULL == iv )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( iv_len == 0 || iv != NULL );
+ if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
/* avoid buffer overflow in ctx->iv */
@@ -268,15 +284,19 @@ int mbedtls_cipher_set_iv( mbedtls_cipher_context_t *ctx,
}
#endif
- memcpy( ctx->iv, iv, actual_iv_size );
- ctx->iv_size = actual_iv_size;
+ if ( actual_iv_size != 0 )
+ {
+ memcpy( ctx->iv, iv, actual_iv_size );
+ ctx->iv_size = actual_iv_size;
+ }
return( 0 );
}
int mbedtls_cipher_reset( mbedtls_cipher_context_t *ctx )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
ctx->unprocessed_len = 0;
@@ -288,14 +308,16 @@ int mbedtls_cipher_reset( mbedtls_cipher_context_t *ctx )
int mbedtls_cipher_update_ad( mbedtls_cipher_context_t *ctx,
const unsigned char *ad, size_t ad_len )
{
- if( NULL == ctx || NULL == ctx->cipher_info )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( ad_len == 0 || ad != NULL );
+ if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
#if defined(MBEDTLS_GCM_C)
if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode )
{
- return mbedtls_gcm_starts( (mbedtls_gcm_context *) ctx->cipher_ctx, ctx->operation,
- ctx->iv, ctx->iv_size, ad, ad_len );
+ return( mbedtls_gcm_starts( (mbedtls_gcm_context *) ctx->cipher_ctx, ctx->operation,
+ ctx->iv, ctx->iv_size, ad, ad_len ) );
}
#endif
@@ -315,8 +337,8 @@ int mbedtls_cipher_update_ad( mbedtls_cipher_context_t *ctx,
if ( result != 0 )
return( result );
- return mbedtls_chachapoly_update_aad( (mbedtls_chachapoly_context*) ctx->cipher_ctx,
- ad, ad_len );
+ return( mbedtls_chachapoly_update_aad( (mbedtls_chachapoly_context*) ctx->cipher_ctx,
+ ad, ad_len ) );
}
#endif
@@ -328,12 +350,14 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
size_t ilen, unsigned char *output, size_t *olen )
{
int ret;
- size_t block_size = 0;
+ size_t block_size;
- if( NULL == ctx || NULL == ctx->cipher_info || NULL == olen )
- {
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( ilen == 0 || input != NULL );
+ CIPHER_VALIDATE_RET( output != NULL );
+ CIPHER_VALIDATE_RET( olen != NULL );
+ if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
- }
*olen = 0;
block_size = mbedtls_cipher_get_block_size( ctx );
@@ -358,8 +382,8 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
if( ctx->cipher_info->mode == MBEDTLS_MODE_GCM )
{
*olen = ilen;
- return mbedtls_gcm_update( (mbedtls_gcm_context *) ctx->cipher_ctx, ilen, input,
- output );
+ return( mbedtls_gcm_update( (mbedtls_gcm_context *) ctx->cipher_ctx, ilen, input,
+ output ) );
}
#endif
@@ -367,14 +391,14 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
if ( ctx->cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305 )
{
*olen = ilen;
- return mbedtls_chachapoly_update( (mbedtls_chachapoly_context*) ctx->cipher_ctx,
- ilen, input, output );
+ return( mbedtls_chachapoly_update( (mbedtls_chachapoly_context*) ctx->cipher_ctx,
+ ilen, input, output ) );
}
#endif
if ( 0 == block_size )
{
- return MBEDTLS_ERR_CIPHER_INVALID_CONTEXT;
+ return( MBEDTLS_ERR_CIPHER_INVALID_CONTEXT );
}
if( input == output &&
@@ -437,7 +461,7 @@ int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *i
{
if( 0 == block_size )
{
- return MBEDTLS_ERR_CIPHER_INVALID_CONTEXT;
+ return( MBEDTLS_ERR_CIPHER_INVALID_CONTEXT );
}
/* Encryption: only cache partial blocks
@@ -738,7 +762,10 @@ static int get_no_padding( unsigned char *input, size_t input_len,
int mbedtls_cipher_finish( mbedtls_cipher_context_t *ctx,
unsigned char *output, size_t *olen )
{
- if( NULL == ctx || NULL == ctx->cipher_info || NULL == olen )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( output != NULL );
+ CIPHER_VALIDATE_RET( olen != NULL );
+ if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
*olen = 0;
@@ -808,8 +835,8 @@ int mbedtls_cipher_finish( mbedtls_cipher_context_t *ctx,
/* Set output size for decryption */
if( MBEDTLS_DECRYPT == ctx->operation )
- return ctx->get_padding( output, mbedtls_cipher_get_block_size( ctx ),
- olen );
+ return( ctx->get_padding( output, mbedtls_cipher_get_block_size( ctx ),
+ olen ) );
/* Set output size for encryption */
*olen = mbedtls_cipher_get_block_size( ctx );
@@ -823,10 +850,12 @@ int mbedtls_cipher_finish( mbedtls_cipher_context_t *ctx,
}
#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING)
-int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx, mbedtls_cipher_padding_t mode )
+int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx,
+ mbedtls_cipher_padding_t mode )
{
- if( NULL == ctx ||
- MBEDTLS_MODE_CBC != ctx->cipher_info->mode )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+
+ if( NULL == ctx->cipher_info || MBEDTLS_MODE_CBC != ctx->cipher_info->mode )
{
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
}
@@ -874,7 +903,9 @@ int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx, mbedtls_ciph
int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,
unsigned char *tag, size_t tag_len )
{
- if( NULL == ctx || NULL == ctx->cipher_info || NULL == tag )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( tag_len == 0 || tag != NULL );
+ if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
if( MBEDTLS_ENCRYPT != ctx->operation )
@@ -882,7 +913,8 @@ int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,
#if defined(MBEDTLS_GCM_C)
if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode )
- return mbedtls_gcm_finish( (mbedtls_gcm_context *) ctx->cipher_ctx, tag, tag_len );
+ return( mbedtls_gcm_finish( (mbedtls_gcm_context *) ctx->cipher_ctx,
+ tag, tag_len ) );
#endif
#if defined(MBEDTLS_CHACHAPOLY_C)
@@ -892,8 +924,8 @@ int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,
if ( tag_len != 16U )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
- return mbedtls_chachapoly_finish( (mbedtls_chachapoly_context*) ctx->cipher_ctx,
- tag );
+ return( mbedtls_chachapoly_finish( (mbedtls_chachapoly_context*) ctx->cipher_ctx,
+ tag ) );
}
#endif
@@ -906,8 +938,12 @@ int mbedtls_cipher_check_tag( mbedtls_cipher_context_t *ctx,
unsigned char check_tag[16];
int ret;
- if( NULL == ctx || NULL == ctx->cipher_info ||
- MBEDTLS_DECRYPT != ctx->operation )
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( tag_len == 0 || tag != NULL );
+ if( ctx->cipher_info == NULL )
+ return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
+
+ if( MBEDTLS_DECRYPT != ctx->operation )
{
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
}
@@ -969,6 +1005,12 @@ int mbedtls_cipher_crypt( mbedtls_cipher_context_t *ctx,
int ret;
size_t finish_olen;
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( iv_len == 0 || iv != NULL );
+ CIPHER_VALIDATE_RET( ilen == 0 || input != NULL );
+ CIPHER_VALIDATE_RET( output != NULL );
+ CIPHER_VALIDATE_RET( olen != NULL );
+
if( ( ret = mbedtls_cipher_set_iv( ctx, iv, iv_len ) ) != 0 )
return( ret );
@@ -997,6 +1039,14 @@ int mbedtls_cipher_auth_encrypt( mbedtls_cipher_context_t *ctx,
unsigned char *output, size_t *olen,
unsigned char *tag, size_t tag_len )
{
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( iv != NULL );
+ CIPHER_VALIDATE_RET( ad_len == 0 || ad != NULL );
+ CIPHER_VALIDATE_RET( ilen == 0 || input != NULL );
+ CIPHER_VALIDATE_RET( output != NULL );
+ CIPHER_VALIDATE_RET( olen != NULL );
+ CIPHER_VALIDATE_RET( tag_len == 0 || tag != NULL );
+
#if defined(MBEDTLS_GCM_C)
if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode )
{
@@ -1044,6 +1094,14 @@ int mbedtls_cipher_auth_decrypt( mbedtls_cipher_context_t *ctx,
unsigned char *output, size_t *olen,
const unsigned char *tag, size_t tag_len )
{
+ CIPHER_VALIDATE_RET( ctx != NULL );
+ CIPHER_VALIDATE_RET( iv != NULL );
+ CIPHER_VALIDATE_RET( ad_len == 0 || ad != NULL );
+ CIPHER_VALIDATE_RET( ilen == 0 || input != NULL );
+ CIPHER_VALIDATE_RET( output != NULL );
+ CIPHER_VALIDATE_RET( olen != NULL );
+ CIPHER_VALIDATE_RET( tag_len == 0 || tag != NULL );
+
#if defined(MBEDTLS_GCM_C)
if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode )
{
diff --git a/thirdparty/mbedtls/library/cipher_wrap.c b/thirdparty/mbedtls/library/cipher_wrap.c
index 893490acc8..6dd8c5d3a9 100644
--- a/thirdparty/mbedtls/library/cipher_wrap.c
+++ b/thirdparty/mbedtls/library/cipher_wrap.c
@@ -258,7 +258,7 @@ static const mbedtls_cipher_info_t aes_128_ecb_info = {
MBEDTLS_MODE_ECB,
128,
"AES-128-ECB",
- 16,
+ 0,
0,
16,
&aes_info
@@ -269,7 +269,7 @@ static const mbedtls_cipher_info_t aes_192_ecb_info = {
MBEDTLS_MODE_ECB,
192,
"AES-192-ECB",
- 16,
+ 0,
0,
16,
&aes_info
@@ -280,7 +280,7 @@ static const mbedtls_cipher_info_t aes_256_ecb_info = {
MBEDTLS_MODE_ECB,
256,
"AES-256-ECB",
- 16,
+ 0,
0,
16,
&aes_info
diff --git a/thirdparty/mbedtls/library/ctr_drbg.c b/thirdparty/mbedtls/library/ctr_drbg.c
index d0e5ba862d..fb121575bb 100644
--- a/thirdparty/mbedtls/library/ctr_drbg.c
+++ b/thirdparty/mbedtls/library/ctr_drbg.c
@@ -66,6 +66,18 @@ void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx )
* Non-public function wrapped by mbedtls_ctr_drbg_seed(). Necessary to allow
* NIST tests to succeed (which require known length fixed entropy)
*/
+/* CTR_DRBG_Instantiate with derivation function (SP 800-90A &sect;10.2.1.3.2)
+ * mbedtls_ctr_drbg_seed_entropy_len(ctx, f_entropy, p_entropy,
+ * custom, len, entropy_len)
+ * implements
+ * CTR_DRBG_Instantiate(entropy_input, nonce, personalization_string,
+ * security_strength) -> initial_working_state
+ * with inputs
+ * custom[:len] = nonce || personalization_string
+ * where entropy_input comes from f_entropy for entropy_len bytes
+ * and with outputs
+ * ctx = initial_working_state
+ */
int mbedtls_ctr_drbg_seed_entropy_len(
mbedtls_ctr_drbg_context *ctx,
int (*f_entropy)(void *, unsigned char *, size_t),
@@ -256,6 +268,14 @@ exit:
return( ret );
}
+/* CTR_DRBG_Update (SP 800-90A &sect;10.2.1.2)
+ * ctr_drbg_update_internal(ctx, provided_data)
+ * implements
+ * CTR_DRBG_Update(provided_data, Key, V)
+ * with inputs and outputs
+ * ctx->aes_ctx = Key
+ * ctx->counter = V
+ */
static int ctr_drbg_update_internal( mbedtls_ctr_drbg_context *ctx,
const unsigned char data[MBEDTLS_CTR_DRBG_SEEDLEN] )
{
@@ -279,9 +299,7 @@ static int ctr_drbg_update_internal( mbedtls_ctr_drbg_context *ctx,
* Crypt counter block
*/
if( ( ret = mbedtls_aes_crypt_ecb( &ctx->aes_ctx, MBEDTLS_AES_ENCRYPT, ctx->counter, p ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
p += MBEDTLS_CTR_DRBG_BLOCKSIZE;
}
@@ -293,31 +311,71 @@ static int ctr_drbg_update_internal( mbedtls_ctr_drbg_context *ctx,
* Update key and counter
*/
if( ( ret = mbedtls_aes_setkey_enc( &ctx->aes_ctx, tmp, MBEDTLS_CTR_DRBG_KEYBITS ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
memcpy( ctx->counter, tmp + MBEDTLS_CTR_DRBG_KEYSIZE, MBEDTLS_CTR_DRBG_BLOCKSIZE );
- return( 0 );
+exit:
+ mbedtls_platform_zeroize( tmp, sizeof( tmp ) );
+ return( ret );
}
-void mbedtls_ctr_drbg_update( mbedtls_ctr_drbg_context *ctx,
- const unsigned char *additional, size_t add_len )
+/* CTR_DRBG_Instantiate with derivation function (SP 800-90A &sect;10.2.1.3.2)
+ * mbedtls_ctr_drbg_update(ctx, additional, add_len)
+ * implements
+ * CTR_DRBG_Instantiate(entropy_input, nonce, personalization_string,
+ * security_strength) -> initial_working_state
+ * with inputs
+ * ctx->counter = all-bits-0
+ * ctx->aes_ctx = context from all-bits-0 key
+ * additional[:add_len] = entropy_input || nonce || personalization_string
+ * and with outputs
+ * ctx = initial_working_state
+ */
+int mbedtls_ctr_drbg_update_ret( mbedtls_ctr_drbg_context *ctx,
+ const unsigned char *additional,
+ size_t add_len )
{
unsigned char add_input[MBEDTLS_CTR_DRBG_SEEDLEN];
+ int ret;
- if( add_len > 0 )
- {
- /* MAX_INPUT would be more logical here, but we have to match
- * block_cipher_df()'s limits since we can't propagate errors */
- if( add_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT )
- add_len = MBEDTLS_CTR_DRBG_MAX_SEED_INPUT;
+ if( add_len == 0 )
+ return( 0 );
- block_cipher_df( add_input, additional, add_len );
- ctr_drbg_update_internal( ctx, add_input );
- }
+ if( ( ret = block_cipher_df( add_input, additional, add_len ) ) != 0 )
+ goto exit;
+ if( ( ret = ctr_drbg_update_internal( ctx, add_input ) ) != 0 )
+ goto exit;
+
+exit:
+ mbedtls_platform_zeroize( add_input, sizeof( add_input ) );
+ return( ret );
}
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+void mbedtls_ctr_drbg_update( mbedtls_ctr_drbg_context *ctx,
+ const unsigned char *additional,
+ size_t add_len )
+{
+ /* MAX_INPUT would be more logical here, but we have to match
+ * block_cipher_df()'s limits since we can't propagate errors */
+ if( add_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT )
+ add_len = MBEDTLS_CTR_DRBG_MAX_SEED_INPUT;
+ (void) mbedtls_ctr_drbg_update_ret( ctx, additional, add_len );
+}
+#endif /* MBEDTLS_DEPRECATED_REMOVED */
+
+/* CTR_DRBG_Reseed with derivation function (SP 800-90A &sect;10.2.1.4.2)
+ * mbedtls_ctr_drbg_reseed(ctx, additional, len)
+ * implements
+ * CTR_DRBG_Reseed(working_state, entropy_input, additional_input)
+ * -> new_working_state
+ * with inputs
+ * ctx contains working_state
+ * additional[:len] = additional_input
+ * and entropy_input comes from calling ctx->f_entropy
+ * and with output
+ * ctx contains new_working_state
+ */
int mbedtls_ctr_drbg_reseed( mbedtls_ctr_drbg_context *ctx,
const unsigned char *additional, size_t len )
{
@@ -355,22 +413,39 @@ int mbedtls_ctr_drbg_reseed( mbedtls_ctr_drbg_context *ctx,
* Reduce to 384 bits
*/
if( ( ret = block_cipher_df( seed, seed, seedlen ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
/*
* Update state
*/
if( ( ret = ctr_drbg_update_internal( ctx, seed ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
ctx->reseed_counter = 1;
- return( 0 );
+exit:
+ mbedtls_platform_zeroize( seed, sizeof( seed ) );
+ return( ret );
}
+/* CTR_DRBG_Generate with derivation function (SP 800-90A &sect;10.2.1.5.2)
+ * mbedtls_ctr_drbg_random_with_add(ctx, output, output_len, additional, add_len)
+ * implements
+ * CTR_DRBG_Reseed(working_state, entropy_input, additional[:add_len])
+ * -> working_state_after_reseed
+ * if required, then
+ * CTR_DRBG_Generate(working_state_after_reseed,
+ * requested_number_of_bits, additional_input)
+ * -> status, returned_bits, new_working_state
+ * with inputs
+ * ctx contains working_state
+ * requested_number_of_bits = 8 * output_len
+ * additional[:add_len] = additional_input
+ * and entropy_input comes from calling ctx->f_entropy
+ * and with outputs
+ * status = SUCCESS (this function does the reseed internally)
+ * returned_bits = output[:output_len]
+ * ctx contains new_working_state
+ */
int mbedtls_ctr_drbg_random_with_add( void *p_rng,
unsigned char *output, size_t output_len,
const unsigned char *additional, size_t add_len )
@@ -404,13 +479,9 @@ int mbedtls_ctr_drbg_random_with_add( void *p_rng,
if( add_len > 0 )
{
if( ( ret = block_cipher_df( add_input, additional, add_len ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
if( ( ret = ctr_drbg_update_internal( ctx, add_input ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
}
while( output_len > 0 )
@@ -426,9 +497,7 @@ int mbedtls_ctr_drbg_random_with_add( void *p_rng,
* Crypt counter block
*/
if( ( ret = mbedtls_aes_crypt_ecb( &ctx->aes_ctx, MBEDTLS_AES_ENCRYPT, ctx->counter, tmp ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
use_len = ( output_len > MBEDTLS_CTR_DRBG_BLOCKSIZE ) ? MBEDTLS_CTR_DRBG_BLOCKSIZE :
output_len;
@@ -441,12 +510,13 @@ int mbedtls_ctr_drbg_random_with_add( void *p_rng,
}
if( ( ret = ctr_drbg_update_internal( ctx, add_input ) ) != 0 )
- {
- return( ret );
- }
+ goto exit;
ctx->reseed_counter++;
+exit:
+ mbedtls_platform_zeroize( add_input, sizeof( add_input ) );
+ mbedtls_platform_zeroize( tmp, sizeof( tmp ) );
return( 0 );
}
@@ -498,35 +568,36 @@ exit:
int mbedtls_ctr_drbg_update_seed_file( mbedtls_ctr_drbg_context *ctx, const char *path )
{
int ret = 0;
- FILE *f;
+ FILE *f = NULL;
size_t n;
unsigned char buf[ MBEDTLS_CTR_DRBG_MAX_INPUT ];
+ unsigned char c;
if( ( f = fopen( path, "rb" ) ) == NULL )
return( MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR );
- fseek( f, 0, SEEK_END );
- n = (size_t) ftell( f );
- fseek( f, 0, SEEK_SET );
-
- if( n > MBEDTLS_CTR_DRBG_MAX_INPUT )
+ n = fread( buf, 1, sizeof( buf ), f );
+ if( fread( &c, 1, 1, f ) != 0 )
{
- fclose( f );
- return( MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG );
+ ret = MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG;
+ goto exit;
}
-
- if( fread( buf, 1, n, f ) != n )
+ if( n == 0 || ferror( f ) )
+ {
ret = MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR;
- else
- mbedtls_ctr_drbg_update( ctx, buf, n );
-
+ goto exit;
+ }
fclose( f );
+ f = NULL;
- mbedtls_platform_zeroize( buf, sizeof( buf ) );
+ ret = mbedtls_ctr_drbg_update_ret( ctx, buf, n );
+exit:
+ mbedtls_platform_zeroize( buf, sizeof( buf ) );
+ if( f != NULL )
+ fclose( f );
if( ret != 0 )
return( ret );
-
return( mbedtls_ctr_drbg_write_seed_file( ctx, path ) );
}
#endif /* MBEDTLS_FS_IO */
diff --git a/thirdparty/mbedtls/library/debug.c b/thirdparty/mbedtls/library/debug.c
index db3924ac54..824cd0236e 100644
--- a/thirdparty/mbedtls/library/debug.c
+++ b/thirdparty/mbedtls/library/debug.c
@@ -365,4 +365,54 @@ void mbedtls_debug_print_crt( const mbedtls_ssl_context *ssl, int level,
}
#endif /* MBEDTLS_X509_CRT_PARSE_C */
+#if defined(MBEDTLS_ECDH_C)
+static void mbedtls_debug_printf_ecdh_internal( const mbedtls_ssl_context *ssl,
+ int level, const char *file,
+ int line,
+ const mbedtls_ecdh_context *ecdh,
+ mbedtls_debug_ecdh_attr attr )
+{
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ const mbedtls_ecdh_context* ctx = ecdh;
+#else
+ const mbedtls_ecdh_context_mbed* ctx = &ecdh->ctx.mbed_ecdh;
+#endif
+
+ switch( attr )
+ {
+ case MBEDTLS_DEBUG_ECDH_Q:
+ mbedtls_debug_print_ecp( ssl, level, file, line, "ECDH: Q",
+ &ctx->Q );
+ break;
+ case MBEDTLS_DEBUG_ECDH_QP:
+ mbedtls_debug_print_ecp( ssl, level, file, line, "ECDH: Qp",
+ &ctx->Qp );
+ break;
+ case MBEDTLS_DEBUG_ECDH_Z:
+ mbedtls_debug_print_mpi( ssl, level, file, line, "ECDH: z",
+ &ctx->z );
+ break;
+ default:
+ break;
+ }
+}
+
+void mbedtls_debug_printf_ecdh( const mbedtls_ssl_context *ssl, int level,
+ const char *file, int line,
+ const mbedtls_ecdh_context *ecdh,
+ mbedtls_debug_ecdh_attr attr )
+{
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ mbedtls_debug_printf_ecdh_internal( ssl, level, file, line, ecdh, attr );
+#else
+ switch( ecdh->var )
+ {
+ default:
+ mbedtls_debug_printf_ecdh_internal( ssl, level, file, line, ecdh,
+ attr );
+ }
+#endif
+}
+#endif /* MBEDTLS_ECDH_C */
+
#endif /* MBEDTLS_DEBUG_C */
diff --git a/thirdparty/mbedtls/library/dhm.c b/thirdparty/mbedtls/library/dhm.c
index 82cbb0ce88..fb6937e854 100644
--- a/thirdparty/mbedtls/library/dhm.c
+++ b/thirdparty/mbedtls/library/dhm.c
@@ -60,6 +60,11 @@
#if !defined(MBEDTLS_DHM_ALT)
+#define DHM_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_DHM_BAD_INPUT_DATA )
+#define DHM_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* helper to validate the mbedtls_mpi size and import it
*/
@@ -121,6 +126,7 @@ cleanup:
void mbedtls_dhm_init( mbedtls_dhm_context *ctx )
{
+ DHM_VALIDATE( ctx != NULL );
memset( ctx, 0, sizeof( mbedtls_dhm_context ) );
}
@@ -132,6 +138,9 @@ int mbedtls_dhm_read_params( mbedtls_dhm_context *ctx,
const unsigned char *end )
{
int ret;
+ DHM_VALIDATE_RET( ctx != NULL );
+ DHM_VALIDATE_RET( p != NULL && *p != NULL );
+ DHM_VALIDATE_RET( end != NULL );
if( ( ret = dhm_read_bignum( &ctx->P, p, end ) ) != 0 ||
( ret = dhm_read_bignum( &ctx->G, p, end ) ) != 0 ||
@@ -157,6 +166,10 @@ int mbedtls_dhm_make_params( mbedtls_dhm_context *ctx, int x_size,
int ret, count = 0;
size_t n1, n2, n3;
unsigned char *p;
+ DHM_VALIDATE_RET( ctx != NULL );
+ DHM_VALIDATE_RET( output != NULL );
+ DHM_VALIDATE_RET( olen != NULL );
+ DHM_VALIDATE_RET( f_rng != NULL );
if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 )
return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA );
@@ -227,9 +240,9 @@ int mbedtls_dhm_set_group( mbedtls_dhm_context *ctx,
const mbedtls_mpi *G )
{
int ret;
-
- if( ctx == NULL || P == NULL || G == NULL )
- return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA );
+ DHM_VALIDATE_RET( ctx != NULL );
+ DHM_VALIDATE_RET( P != NULL );
+ DHM_VALIDATE_RET( G != NULL );
if( ( ret = mbedtls_mpi_copy( &ctx->P, P ) ) != 0 ||
( ret = mbedtls_mpi_copy( &ctx->G, G ) ) != 0 )
@@ -248,8 +261,10 @@ int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx,
const unsigned char *input, size_t ilen )
{
int ret;
+ DHM_VALIDATE_RET( ctx != NULL );
+ DHM_VALIDATE_RET( input != NULL );
- if( ctx == NULL || ilen < 1 || ilen > ctx->len )
+ if( ilen < 1 || ilen > ctx->len )
return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA );
if( ( ret = mbedtls_mpi_read_binary( &ctx->GY, input, ilen ) ) != 0 )
@@ -267,8 +282,11 @@ int mbedtls_dhm_make_public( mbedtls_dhm_context *ctx, int x_size,
void *p_rng )
{
int ret, count = 0;
+ DHM_VALIDATE_RET( ctx != NULL );
+ DHM_VALIDATE_RET( output != NULL );
+ DHM_VALIDATE_RET( f_rng != NULL );
- if( ctx == NULL || olen < 1 || olen > ctx->len )
+ if( olen < 1 || olen > ctx->len )
return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA );
if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 )
@@ -380,8 +398,11 @@ int mbedtls_dhm_calc_secret( mbedtls_dhm_context *ctx,
{
int ret;
mbedtls_mpi GYb;
+ DHM_VALIDATE_RET( ctx != NULL );
+ DHM_VALIDATE_RET( output != NULL );
+ DHM_VALIDATE_RET( olen != NULL );
- if( ctx == NULL || output_size < ctx->len )
+ if( output_size < ctx->len )
return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA );
if( ( ret = dhm_check_range( &ctx->GY, &ctx->P ) ) != 0 )
@@ -428,11 +449,19 @@ cleanup:
*/
void mbedtls_dhm_free( mbedtls_dhm_context *ctx )
{
- mbedtls_mpi_free( &ctx->pX ); mbedtls_mpi_free( &ctx->Vf );
- mbedtls_mpi_free( &ctx->Vi ); mbedtls_mpi_free( &ctx->RP );
- mbedtls_mpi_free( &ctx->K ); mbedtls_mpi_free( &ctx->GY );
- mbedtls_mpi_free( &ctx->GX ); mbedtls_mpi_free( &ctx->X );
- mbedtls_mpi_free( &ctx->G ); mbedtls_mpi_free( &ctx->P );
+ if( ctx == NULL )
+ return;
+
+ mbedtls_mpi_free( &ctx->pX );
+ mbedtls_mpi_free( &ctx->Vf );
+ mbedtls_mpi_free( &ctx->Vi );
+ mbedtls_mpi_free( &ctx->RP );
+ mbedtls_mpi_free( &ctx->K );
+ mbedtls_mpi_free( &ctx->GY );
+ mbedtls_mpi_free( &ctx->GX );
+ mbedtls_mpi_free( &ctx->X );
+ mbedtls_mpi_free( &ctx->G );
+ mbedtls_mpi_free( &ctx->P );
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_dhm_context ) );
}
@@ -449,7 +478,12 @@ int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin,
unsigned char *p, *end;
#if defined(MBEDTLS_PEM_PARSE_C)
mbedtls_pem_context pem;
+#endif /* MBEDTLS_PEM_PARSE_C */
+
+ DHM_VALIDATE_RET( dhm != NULL );
+ DHM_VALIDATE_RET( dhmin != NULL );
+#if defined(MBEDTLS_PEM_PARSE_C)
mbedtls_pem_init( &pem );
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
@@ -596,6 +630,8 @@ int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path )
int ret;
size_t n;
unsigned char *buf;
+ DHM_VALIDATE_RET( dhm != NULL );
+ DHM_VALIDATE_RET( path != NULL );
if( ( ret = load_file( path, &buf, &n ) ) != 0 )
return( ret );
diff --git a/thirdparty/mbedtls/library/ecdh.c b/thirdparty/mbedtls/library/ecdh.c
index 61380b6936..da95c60dad 100644
--- a/thirdparty/mbedtls/library/ecdh.c
+++ b/thirdparty/mbedtls/library/ecdh.c
@@ -35,41 +35,82 @@
#if defined(MBEDTLS_ECDH_C)
#include "mbedtls/ecdh.h"
+#include "mbedtls/platform_util.h"
#include <string.h>
+/* Parameter validation macros based on platform_util.h */
+#define ECDH_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA )
+#define ECDH_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+typedef mbedtls_ecdh_context mbedtls_ecdh_context_mbed;
+#endif
+
#if !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
/*
- * Generate public key: simple wrapper around mbedtls_ecp_gen_keypair
+ * Generate public key (restartable version)
+ *
+ * Note: this internal function relies on its caller preserving the value of
+ * the output parameter 'd' across continuation calls. This would not be
+ * acceptable for a public function but is OK here as we control call sites.
+ */
+static int ecdh_gen_public_restartable( mbedtls_ecp_group *grp,
+ mbedtls_mpi *d, mbedtls_ecp_point *Q,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng,
+ mbedtls_ecp_restart_ctx *rs_ctx )
+{
+ int ret;
+
+ /* If multiplication is in progress, we already generated a privkey */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx == NULL || rs_ctx->rsm == NULL )
+#endif
+ MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, d, f_rng, p_rng ) );
+
+ MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G,
+ f_rng, p_rng, rs_ctx ) );
+
+cleanup:
+ return( ret );
+}
+
+/*
+ * Generate public key
*/
int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
- return mbedtls_ecp_gen_keypair( grp, d, Q, f_rng, p_rng );
+ ECDH_VALIDATE_RET( grp != NULL );
+ ECDH_VALIDATE_RET( d != NULL );
+ ECDH_VALIDATE_RET( Q != NULL );
+ ECDH_VALIDATE_RET( f_rng != NULL );
+ return( ecdh_gen_public_restartable( grp, d, Q, f_rng, p_rng, NULL ) );
}
-#endif /* MBEDTLS_ECDH_GEN_PUBLIC_ALT */
+#endif /* !MBEDTLS_ECDH_GEN_PUBLIC_ALT */
#if !defined(MBEDTLS_ECDH_COMPUTE_SHARED_ALT)
/*
* Compute shared secret (SEC1 3.3.1)
*/
-int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z,
+static int ecdh_compute_shared_restartable( mbedtls_ecp_group *grp,
+ mbedtls_mpi *z,
const mbedtls_ecp_point *Q, const mbedtls_mpi *d,
int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+ void *p_rng,
+ mbedtls_ecp_restart_ctx *rs_ctx )
{
int ret;
mbedtls_ecp_point P;
mbedtls_ecp_point_init( &P );
- /*
- * Make sure Q is a valid pubkey before using it
- */
- MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) );
-
- MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, &P, d, Q, f_rng, p_rng ) );
+ MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &P, d, Q,
+ f_rng, p_rng, rs_ctx ) );
if( mbedtls_ecp_is_zero( &P ) )
{
@@ -84,65 +125,195 @@ cleanup:
return( ret );
}
-#endif /* MBEDTLS_ECDH_COMPUTE_SHARED_ALT */
+
+/*
+ * Compute shared secret (SEC1 3.3.1)
+ */
+int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z,
+ const mbedtls_ecp_point *Q, const mbedtls_mpi *d,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
+{
+ ECDH_VALIDATE_RET( grp != NULL );
+ ECDH_VALIDATE_RET( Q != NULL );
+ ECDH_VALIDATE_RET( d != NULL );
+ ECDH_VALIDATE_RET( z != NULL );
+ return( ecdh_compute_shared_restartable( grp, z, Q, d,
+ f_rng, p_rng, NULL ) );
+}
+#endif /* !MBEDTLS_ECDH_COMPUTE_SHARED_ALT */
+
+static void ecdh_init_internal( mbedtls_ecdh_context_mbed *ctx )
+{
+ mbedtls_ecp_group_init( &ctx->grp );
+ mbedtls_mpi_init( &ctx->d );
+ mbedtls_ecp_point_init( &ctx->Q );
+ mbedtls_ecp_point_init( &ctx->Qp );
+ mbedtls_mpi_init( &ctx->z );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ mbedtls_ecp_restart_init( &ctx->rs );
+#endif
+}
/*
* Initialize context
*/
void mbedtls_ecdh_init( mbedtls_ecdh_context *ctx )
{
+ ECDH_VALIDATE( ctx != NULL );
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ ecdh_init_internal( ctx );
+ mbedtls_ecp_point_init( &ctx->Vi );
+ mbedtls_ecp_point_init( &ctx->Vf );
+ mbedtls_mpi_init( &ctx->_d );
+#else
memset( ctx, 0, sizeof( mbedtls_ecdh_context ) );
+
+ ctx->var = MBEDTLS_ECDH_VARIANT_NONE;
+#endif
+ ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ ctx->restart_enabled = 0;
+#endif
+}
+
+static int ecdh_setup_internal( mbedtls_ecdh_context_mbed *ctx,
+ mbedtls_ecp_group_id grp_id )
+{
+ int ret;
+
+ ret = mbedtls_ecp_group_load( &ctx->grp, grp_id );
+ if( ret != 0 )
+ {
+ return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE );
+ }
+
+ return( 0 );
}
/*
- * Free context
+ * Setup context
*/
-void mbedtls_ecdh_free( mbedtls_ecdh_context *ctx )
+int mbedtls_ecdh_setup( mbedtls_ecdh_context *ctx, mbedtls_ecp_group_id grp_id )
{
- if( ctx == NULL )
- return;
+ ECDH_VALIDATE_RET( ctx != NULL );
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ return( ecdh_setup_internal( ctx, grp_id ) );
+#else
+ switch( grp_id )
+ {
+ default:
+ ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
+ ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0;
+ ctx->grp_id = grp_id;
+ ecdh_init_internal( &ctx->ctx.mbed_ecdh );
+ return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) );
+ }
+#endif
+}
+
+static void ecdh_free_internal( mbedtls_ecdh_context_mbed *ctx )
+{
mbedtls_ecp_group_free( &ctx->grp );
+ mbedtls_mpi_free( &ctx->d );
mbedtls_ecp_point_free( &ctx->Q );
mbedtls_ecp_point_free( &ctx->Qp );
- mbedtls_ecp_point_free( &ctx->Vi );
- mbedtls_ecp_point_free( &ctx->Vf );
- mbedtls_mpi_free( &ctx->d );
mbedtls_mpi_free( &ctx->z );
- mbedtls_mpi_free( &ctx->_d );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ mbedtls_ecp_restart_free( &ctx->rs );
+#endif
}
+#if defined(MBEDTLS_ECP_RESTARTABLE)
/*
- * Setup and write the ServerKeyExhange parameters (RFC 4492)
- * struct {
- * ECParameters curve_params;
- * ECPoint public;
- * } ServerECDHParams;
+ * Enable restartable operations for context
*/
-int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
- unsigned char *buf, size_t blen,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+void mbedtls_ecdh_enable_restart( mbedtls_ecdh_context *ctx )
+{
+ ECDH_VALIDATE( ctx != NULL );
+
+ ctx->restart_enabled = 1;
+}
+#endif
+
+/*
+ * Free context
+ */
+void mbedtls_ecdh_free( mbedtls_ecdh_context *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ mbedtls_ecp_point_free( &ctx->Vi );
+ mbedtls_ecp_point_free( &ctx->Vf );
+ mbedtls_mpi_free( &ctx->_d );
+ ecdh_free_internal( ctx );
+#else
+ switch( ctx->var )
+ {
+ case MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0:
+ ecdh_free_internal( &ctx->ctx.mbed_ecdh );
+ break;
+ default:
+ break;
+ }
+
+ ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
+ ctx->var = MBEDTLS_ECDH_VARIANT_NONE;
+ ctx->grp_id = MBEDTLS_ECP_DP_NONE;
+#endif
+}
+
+static int ecdh_make_params_internal( mbedtls_ecdh_context_mbed *ctx,
+ size_t *olen, int point_format,
+ unsigned char *buf, size_t blen,
+ int (*f_rng)(void *,
+ unsigned char *,
+ size_t),
+ void *p_rng,
+ int restart_enabled )
{
int ret;
size_t grp_len, pt_len;
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ mbedtls_ecp_restart_ctx *rs_ctx = NULL;
+#endif
- if( ctx == NULL || ctx->grp.pbits == 0 )
+ if( ctx->grp.pbits == 0 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
- if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) )
- != 0 )
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( restart_enabled )
+ rs_ctx = &ctx->rs;
+#else
+ (void) restart_enabled;
+#endif
+
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( ( ret = ecdh_gen_public_restartable( &ctx->grp, &ctx->d, &ctx->Q,
+ f_rng, p_rng, rs_ctx ) ) != 0 )
return( ret );
+#else
+ if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q,
+ f_rng, p_rng ) ) != 0 )
+ return( ret );
+#endif /* MBEDTLS_ECP_RESTARTABLE */
- if( ( ret = mbedtls_ecp_tls_write_group( &ctx->grp, &grp_len, buf, blen ) )
- != 0 )
+ if( ( ret = mbedtls_ecp_tls_write_group( &ctx->grp, &grp_len, buf,
+ blen ) ) != 0 )
return( ret );
buf += grp_len;
blen -= grp_len;
- if( ( ret = mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, ctx->point_format,
- &pt_len, buf, blen ) ) != 0 )
+ if( ( ret = mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, point_format,
+ &pt_len, buf, blen ) ) != 0 )
return( ret );
*olen = grp_len + pt_len;
@@ -150,6 +321,55 @@ int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
}
/*
+ * Setup and write the ServerKeyExhange parameters (RFC 4492)
+ * struct {
+ * ECParameters curve_params;
+ * ECPoint public;
+ * } ServerECDHParams;
+ */
+int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
+ unsigned char *buf, size_t blen,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
+{
+ int restart_enabled = 0;
+ ECDH_VALIDATE_RET( ctx != NULL );
+ ECDH_VALIDATE_RET( olen != NULL );
+ ECDH_VALIDATE_RET( buf != NULL );
+ ECDH_VALIDATE_RET( f_rng != NULL );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ restart_enabled = ctx->restart_enabled;
+#else
+ (void) restart_enabled;
+#endif
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ return( ecdh_make_params_internal( ctx, olen, ctx->point_format, buf, blen,
+ f_rng, p_rng, restart_enabled ) );
+#else
+ switch( ctx->var )
+ {
+ case MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0:
+ return( ecdh_make_params_internal( &ctx->ctx.mbed_ecdh, olen,
+ ctx->point_format, buf, blen,
+ f_rng, p_rng,
+ restart_enabled ) );
+ default:
+ return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
+ }
+#endif
+}
+
+static int ecdh_read_params_internal( mbedtls_ecdh_context_mbed *ctx,
+ const unsigned char **buf,
+ const unsigned char *end )
+{
+ return( mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, buf,
+ end - *buf ) );
+}
+
+/*
* Read the ServerKeyExhange parameters (RFC 4492)
* struct {
* ECParameters curve_params;
@@ -157,31 +377,43 @@ int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
* } ServerECDHParams;
*/
int mbedtls_ecdh_read_params( mbedtls_ecdh_context *ctx,
- const unsigned char **buf, const unsigned char *end )
+ const unsigned char **buf,
+ const unsigned char *end )
{
int ret;
-
- if( ( ret = mbedtls_ecp_tls_read_group( &ctx->grp, buf, end - *buf ) ) != 0 )
+ mbedtls_ecp_group_id grp_id;
+ ECDH_VALIDATE_RET( ctx != NULL );
+ ECDH_VALIDATE_RET( buf != NULL );
+ ECDH_VALIDATE_RET( *buf != NULL );
+ ECDH_VALIDATE_RET( end != NULL );
+
+ if( ( ret = mbedtls_ecp_tls_read_group_id( &grp_id, buf, end - *buf ) )
+ != 0 )
return( ret );
- if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, buf, end - *buf ) )
- != 0 )
+ if( ( ret = mbedtls_ecdh_setup( ctx, grp_id ) ) != 0 )
return( ret );
- return( 0 );
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ return( ecdh_read_params_internal( ctx, buf, end ) );
+#else
+ switch( ctx->var )
+ {
+ case MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0:
+ return( ecdh_read_params_internal( &ctx->ctx.mbed_ecdh,
+ buf, end ) );
+ default:
+ return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
+ }
+#endif
}
-/*
- * Get parameters from a keypair
- */
-int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx, const mbedtls_ecp_keypair *key,
- mbedtls_ecdh_side side )
+static int ecdh_get_params_internal( mbedtls_ecdh_context_mbed *ctx,
+ const mbedtls_ecp_keypair *key,
+ mbedtls_ecdh_side side )
{
int ret;
- if( ( ret = mbedtls_ecp_group_copy( &ctx->grp, &key->grp ) ) != 0 )
- return( ret );
-
/* If it's not our key, just import the public part as Qp */
if( side == MBEDTLS_ECDH_THEIRS )
return( mbedtls_ecp_copy( &ctx->Qp, &key->Q ) );
@@ -198,39 +430,116 @@ int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx, const mbedtls_ecp_keypai
}
/*
- * Setup and export the client public value
+ * Get parameters from a keypair
*/
-int mbedtls_ecdh_make_public( mbedtls_ecdh_context *ctx, size_t *olen,
- unsigned char *buf, size_t blen,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx,
+ const mbedtls_ecp_keypair *key,
+ mbedtls_ecdh_side side )
{
int ret;
+ ECDH_VALIDATE_RET( ctx != NULL );
+ ECDH_VALIDATE_RET( key != NULL );
+ ECDH_VALIDATE_RET( side == MBEDTLS_ECDH_OURS ||
+ side == MBEDTLS_ECDH_THEIRS );
- if( ctx == NULL || ctx->grp.pbits == 0 )
+ if( ( ret = mbedtls_ecdh_setup( ctx, key->grp.id ) ) != 0 )
+ return( ret );
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ return( ecdh_get_params_internal( ctx, key, side ) );
+#else
+ switch( ctx->var )
+ {
+ case MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0:
+ return( ecdh_get_params_internal( &ctx->ctx.mbed_ecdh,
+ key, side ) );
+ default:
+ return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
+ }
+#endif
+}
+
+static int ecdh_make_public_internal( mbedtls_ecdh_context_mbed *ctx,
+ size_t *olen, int point_format,
+ unsigned char *buf, size_t blen,
+ int (*f_rng)(void *,
+ unsigned char *,
+ size_t),
+ void *p_rng,
+ int restart_enabled )
+{
+ int ret;
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ mbedtls_ecp_restart_ctx *rs_ctx = NULL;
+#endif
+
+ if( ctx->grp.pbits == 0 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
- if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) )
- != 0 )
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( restart_enabled )
+ rs_ctx = &ctx->rs;
+#else
+ (void) restart_enabled;
+#endif
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( ( ret = ecdh_gen_public_restartable( &ctx->grp, &ctx->d, &ctx->Q,
+ f_rng, p_rng, rs_ctx ) ) != 0 )
+ return( ret );
+#else
+ if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q,
+ f_rng, p_rng ) ) != 0 )
return( ret );
+#endif /* MBEDTLS_ECP_RESTARTABLE */
- return mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, ctx->point_format,
- olen, buf, blen );
+ return mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, point_format, olen,
+ buf, blen );
}
/*
- * Parse and import the client's public value
+ * Setup and export the client public value
*/
-int mbedtls_ecdh_read_public( mbedtls_ecdh_context *ctx,
- const unsigned char *buf, size_t blen )
+int mbedtls_ecdh_make_public( mbedtls_ecdh_context *ctx, size_t *olen,
+ unsigned char *buf, size_t blen,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
+{
+ int restart_enabled = 0;
+ ECDH_VALIDATE_RET( ctx != NULL );
+ ECDH_VALIDATE_RET( olen != NULL );
+ ECDH_VALIDATE_RET( buf != NULL );
+ ECDH_VALIDATE_RET( f_rng != NULL );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ restart_enabled = ctx->restart_enabled;
+#endif
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ return( ecdh_make_public_internal( ctx, olen, ctx->point_format, buf, blen,
+ f_rng, p_rng, restart_enabled ) );
+#else
+ switch( ctx->var )
+ {
+ case MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0:
+ return( ecdh_make_public_internal( &ctx->ctx.mbed_ecdh, olen,
+ ctx->point_format, buf, blen,
+ f_rng, p_rng,
+ restart_enabled ) );
+ default:
+ return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
+ }
+#endif
+}
+
+static int ecdh_read_public_internal( mbedtls_ecdh_context_mbed *ctx,
+ const unsigned char *buf, size_t blen )
{
int ret;
const unsigned char *p = buf;
- if( ctx == NULL )
- return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
-
- if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, &p, blen ) ) != 0 )
+ if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, &p,
+ blen ) ) != 0 )
return( ret );
if( (size_t)( p - buf ) != blen )
@@ -240,23 +549,66 @@ int mbedtls_ecdh_read_public( mbedtls_ecdh_context *ctx,
}
/*
- * Derive and export the shared secret
+ * Parse and import the client's public value
*/
-int mbedtls_ecdh_calc_secret( mbedtls_ecdh_context *ctx, size_t *olen,
- unsigned char *buf, size_t blen,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+int mbedtls_ecdh_read_public( mbedtls_ecdh_context *ctx,
+ const unsigned char *buf, size_t blen )
+{
+ ECDH_VALIDATE_RET( ctx != NULL );
+ ECDH_VALIDATE_RET( buf != NULL );
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ return( ecdh_read_public_internal( ctx, buf, blen ) );
+#else
+ switch( ctx->var )
+ {
+ case MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0:
+ return( ecdh_read_public_internal( &ctx->ctx.mbed_ecdh,
+ buf, blen ) );
+ default:
+ return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
+ }
+#endif
+}
+
+static int ecdh_calc_secret_internal( mbedtls_ecdh_context_mbed *ctx,
+ size_t *olen, unsigned char *buf,
+ size_t blen,
+ int (*f_rng)(void *,
+ unsigned char *,
+ size_t),
+ void *p_rng,
+ int restart_enabled )
{
int ret;
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ mbedtls_ecp_restart_ctx *rs_ctx = NULL;
+#endif
- if( ctx == NULL )
+ if( ctx == NULL || ctx->grp.pbits == 0 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
- if( ( ret = mbedtls_ecdh_compute_shared( &ctx->grp, &ctx->z, &ctx->Qp, &ctx->d,
- f_rng, p_rng ) ) != 0 )
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( restart_enabled )
+ rs_ctx = &ctx->rs;
+#else
+ (void) restart_enabled;
+#endif
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( ( ret = ecdh_compute_shared_restartable( &ctx->grp, &ctx->z, &ctx->Qp,
+ &ctx->d, f_rng, p_rng,
+ rs_ctx ) ) != 0 )
{
return( ret );
}
+#else
+ if( ( ret = mbedtls_ecdh_compute_shared( &ctx->grp, &ctx->z, &ctx->Qp,
+ &ctx->d, f_rng, p_rng ) ) != 0 )
+ {
+ return( ret );
+ }
+#endif /* MBEDTLS_ECP_RESTARTABLE */
if( mbedtls_mpi_size( &ctx->z ) > blen )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
@@ -265,4 +617,37 @@ int mbedtls_ecdh_calc_secret( mbedtls_ecdh_context *ctx, size_t *olen,
return mbedtls_mpi_write_binary( &ctx->z, buf, *olen );
}
+/*
+ * Derive and export the shared secret
+ */
+int mbedtls_ecdh_calc_secret( mbedtls_ecdh_context *ctx, size_t *olen,
+ unsigned char *buf, size_t blen,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
+{
+ int restart_enabled = 0;
+ ECDH_VALIDATE_RET( ctx != NULL );
+ ECDH_VALIDATE_RET( olen != NULL );
+ ECDH_VALIDATE_RET( buf != NULL );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ restart_enabled = ctx->restart_enabled;
+#endif
+
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ return( ecdh_calc_secret_internal( ctx, olen, buf, blen, f_rng, p_rng,
+ restart_enabled ) );
+#else
+ switch( ctx->var )
+ {
+ case MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0:
+ return( ecdh_calc_secret_internal( &ctx->ctx.mbed_ecdh, olen, buf,
+ blen, f_rng, p_rng,
+ restart_enabled ) );
+ default:
+ return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
+ }
+#endif
+}
+
#endif /* MBEDTLS_ECDH_C */
diff --git a/thirdparty/mbedtls/library/ecdsa.c b/thirdparty/mbedtls/library/ecdsa.c
index 17a88bdd29..1204ef9949 100644
--- a/thirdparty/mbedtls/library/ecdsa.c
+++ b/thirdparty/mbedtls/library/ecdsa.c
@@ -42,6 +42,186 @@
#include "mbedtls/hmac_drbg.h"
#endif
+#if defined(MBEDTLS_PLATFORM_C)
+#include "mbedtls/platform.h"
+#else
+#include <stdlib.h>
+#define mbedtls_calloc calloc
+#define mbedtls_free free
+#endif
+
+#include "mbedtls/platform_util.h"
+
+/* Parameter validation macros based on platform_util.h */
+#define ECDSA_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA )
+#define ECDSA_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+
+/*
+ * Sub-context for ecdsa_verify()
+ */
+struct mbedtls_ecdsa_restart_ver
+{
+ mbedtls_mpi u1, u2; /* intermediate values */
+ enum { /* what to do next? */
+ ecdsa_ver_init = 0, /* getting started */
+ ecdsa_ver_muladd, /* muladd step */
+ } state;
+};
+
+/*
+ * Init verify restart sub-context
+ */
+static void ecdsa_restart_ver_init( mbedtls_ecdsa_restart_ver_ctx *ctx )
+{
+ mbedtls_mpi_init( &ctx->u1 );
+ mbedtls_mpi_init( &ctx->u2 );
+ ctx->state = ecdsa_ver_init;
+}
+
+/*
+ * Free the components of a verify restart sub-context
+ */
+static void ecdsa_restart_ver_free( mbedtls_ecdsa_restart_ver_ctx *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+ mbedtls_mpi_free( &ctx->u1 );
+ mbedtls_mpi_free( &ctx->u2 );
+
+ ecdsa_restart_ver_init( ctx );
+}
+
+/*
+ * Sub-context for ecdsa_sign()
+ */
+struct mbedtls_ecdsa_restart_sig
+{
+ int sign_tries;
+ int key_tries;
+ mbedtls_mpi k; /* per-signature random */
+ mbedtls_mpi r; /* r value */
+ enum { /* what to do next? */
+ ecdsa_sig_init = 0, /* getting started */
+ ecdsa_sig_mul, /* doing ecp_mul() */
+ ecdsa_sig_modn, /* mod N computations */
+ } state;
+};
+
+/*
+ * Init verify sign sub-context
+ */
+static void ecdsa_restart_sig_init( mbedtls_ecdsa_restart_sig_ctx *ctx )
+{
+ ctx->sign_tries = 0;
+ ctx->key_tries = 0;
+ mbedtls_mpi_init( &ctx->k );
+ mbedtls_mpi_init( &ctx->r );
+ ctx->state = ecdsa_sig_init;
+}
+
+/*
+ * Free the components of a sign restart sub-context
+ */
+static void ecdsa_restart_sig_free( mbedtls_ecdsa_restart_sig_ctx *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+ mbedtls_mpi_free( &ctx->k );
+ mbedtls_mpi_free( &ctx->r );
+}
+
+#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
+/*
+ * Sub-context for ecdsa_sign_det()
+ */
+struct mbedtls_ecdsa_restart_det
+{
+ mbedtls_hmac_drbg_context rng_ctx; /* DRBG state */
+ enum { /* what to do next? */
+ ecdsa_det_init = 0, /* getting started */
+ ecdsa_det_sign, /* make signature */
+ } state;
+};
+
+/*
+ * Init verify sign_det sub-context
+ */
+static void ecdsa_restart_det_init( mbedtls_ecdsa_restart_det_ctx *ctx )
+{
+ mbedtls_hmac_drbg_init( &ctx->rng_ctx );
+ ctx->state = ecdsa_det_init;
+}
+
+/*
+ * Free the components of a sign_det restart sub-context
+ */
+static void ecdsa_restart_det_free( mbedtls_ecdsa_restart_det_ctx *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+ mbedtls_hmac_drbg_free( &ctx->rng_ctx );
+
+ ecdsa_restart_det_init( ctx );
+}
+#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
+
+#define ECDSA_RS_ECP &rs_ctx->ecp
+
+/* Utility macro for checking and updating ops budget */
+#define ECDSA_BUDGET( ops ) \
+ MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, &rs_ctx->ecp, ops ) );
+
+/* Call this when entering a function that needs its own sub-context */
+#define ECDSA_RS_ENTER( SUB ) do { \
+ /* reset ops count for this call if top-level */ \
+ if( rs_ctx != NULL && rs_ctx->ecp.depth++ == 0 ) \
+ rs_ctx->ecp.ops_done = 0; \
+ \
+ /* set up our own sub-context if needed */ \
+ if( mbedtls_ecp_restart_is_enabled() && \
+ rs_ctx != NULL && rs_ctx->SUB == NULL ) \
+ { \
+ rs_ctx->SUB = mbedtls_calloc( 1, sizeof( *rs_ctx->SUB ) ); \
+ if( rs_ctx->SUB == NULL ) \
+ return( MBEDTLS_ERR_ECP_ALLOC_FAILED ); \
+ \
+ ecdsa_restart_## SUB ##_init( rs_ctx->SUB ); \
+ } \
+} while( 0 )
+
+/* Call this when leaving a function that needs its own sub-context */
+#define ECDSA_RS_LEAVE( SUB ) do { \
+ /* clear our sub-context when not in progress (done or error) */ \
+ if( rs_ctx != NULL && rs_ctx->SUB != NULL && \
+ ret != MBEDTLS_ERR_ECP_IN_PROGRESS ) \
+ { \
+ ecdsa_restart_## SUB ##_free( rs_ctx->SUB ); \
+ mbedtls_free( rs_ctx->SUB ); \
+ rs_ctx->SUB = NULL; \
+ } \
+ \
+ if( rs_ctx != NULL ) \
+ rs_ctx->ecp.depth--; \
+} while( 0 )
+
+#else /* MBEDTLS_ECP_RESTARTABLE */
+
+#define ECDSA_RS_ECP NULL
+
+#define ECDSA_BUDGET( ops ) /* no-op; for compatibility */
+
+#define ECDSA_RS_ENTER( SUB ) (void) rs_ctx
+#define ECDSA_RS_LEAVE( SUB ) (void) rs_ctx
+
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
/*
* Derive a suitable integer for group grp from a buffer of length len
* SEC1 4.1.3 step 5 aka SEC1 4.1.4 step 3
@@ -70,13 +250,17 @@ cleanup:
* Compute ECDSA signature of a hashed message (SEC1 4.1.3)
* Obviously, compared to SEC1 4.1.3, we skip step 4 (hash message)
*/
-int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
+static int ecdsa_sign_restartable( mbedtls_ecp_group *grp,
+ mbedtls_mpi *r, mbedtls_mpi *s,
const mbedtls_mpi *d, const unsigned char *buf, size_t blen,
- int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ mbedtls_ecdsa_restart_ctx *rs_ctx )
{
- int ret, key_tries, sign_tries, blind_tries;
+ int ret, key_tries, sign_tries;
+ int *p_sign_tries = &sign_tries, *p_key_tries = &key_tries;
mbedtls_ecp_point R;
mbedtls_mpi k, e, t;
+ mbedtls_mpi *pk = &k, *pr = r;
/* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */
if( grp->N.p == NULL )
@@ -89,26 +273,72 @@ int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
mbedtls_ecp_point_init( &R );
mbedtls_mpi_init( &k ); mbedtls_mpi_init( &e ); mbedtls_mpi_init( &t );
- sign_tries = 0;
+ ECDSA_RS_ENTER( sig );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->sig != NULL )
+ {
+ /* redirect to our context */
+ p_sign_tries = &rs_ctx->sig->sign_tries;
+ p_key_tries = &rs_ctx->sig->key_tries;
+ pk = &rs_ctx->sig->k;
+ pr = &rs_ctx->sig->r;
+
+ /* jump to current step */
+ if( rs_ctx->sig->state == ecdsa_sig_mul )
+ goto mul;
+ if( rs_ctx->sig->state == ecdsa_sig_modn )
+ goto modn;
+ }
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
+ *p_sign_tries = 0;
do
{
+ if( *p_sign_tries++ > 10 )
+ {
+ ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
+ goto cleanup;
+ }
+
/*
* Steps 1-3: generate a suitable ephemeral keypair
* and set r = xR mod n
*/
- key_tries = 0;
+ *p_key_tries = 0;
do
{
- MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair( grp, &k, &R, f_rng, p_rng ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( r, &R.X, &grp->N ) );
-
- if( key_tries++ > 10 )
+ if( *p_key_tries++ > 10 )
{
ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
goto cleanup;
}
+
+ MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, pk, f_rng, p_rng ) );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->sig != NULL )
+ rs_ctx->sig->state = ecdsa_sig_mul;
+
+mul:
+#endif
+ MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &R, pk, &grp->G,
+ f_rng, p_rng, ECDSA_RS_ECP ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( pr, &R.X, &grp->N ) );
}
- while( mbedtls_mpi_cmp_int( r, 0 ) == 0 );
+ while( mbedtls_mpi_cmp_int( pr, 0 ) == 0 );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->sig != NULL )
+ rs_ctx->sig->state = ecdsa_sig_modn;
+
+modn:
+#endif
+ /*
+ * Accounting for everything up to the end of the loop
+ * (step 6, but checking now avoids saving e and t)
+ */
+ ECDSA_BUDGET( MBEDTLS_ECP_OPS_INV + 4 );
/*
* Step 5: derive MPI from hashed message
@@ -119,57 +349,67 @@ int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
* Generate a random value to blind inv_mod in next step,
* avoiding a potential timing leak.
*/
- blind_tries = 0;
- do
- {
- size_t n_size = ( grp->nbits + 7 ) / 8;
- MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &t, n_size, f_rng, p_rng ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &t, 8 * n_size - grp->nbits ) );
-
- /* See mbedtls_ecp_gen_keypair() */
- if( ++blind_tries > 30 )
- return( MBEDTLS_ERR_ECP_RANDOM_FAILED );
- }
- while( mbedtls_mpi_cmp_int( &t, 1 ) < 0 ||
- mbedtls_mpi_cmp_mpi( &t, &grp->N ) >= 0 );
+ MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, &t, f_rng, p_rng ) );
/*
* Step 6: compute s = (e + r * d) / k = t (e + rd) / (kt) mod n
*/
- MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, r, d ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, pr, d ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &e, &e, s ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &e, &e, &t ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &k, &k, &t ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( s, &k, &grp->N ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pk, pk, &t ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( s, pk, &grp->N ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, s, &e ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( s, s, &grp->N ) );
-
- if( sign_tries++ > 10 )
- {
- ret = MBEDTLS_ERR_ECP_RANDOM_FAILED;
- goto cleanup;
- }
}
while( mbedtls_mpi_cmp_int( s, 0 ) == 0 );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->sig != NULL )
+ mbedtls_mpi_copy( r, pr );
+#endif
+
cleanup:
mbedtls_ecp_point_free( &R );
mbedtls_mpi_free( &k ); mbedtls_mpi_free( &e ); mbedtls_mpi_free( &t );
+ ECDSA_RS_LEAVE( sig );
+
return( ret );
}
-#endif /* MBEDTLS_ECDSA_SIGN_ALT */
+
+/*
+ * Compute ECDSA signature of a hashed message
+ */
+int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
+ const mbedtls_mpi *d, const unsigned char *buf, size_t blen,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
+{
+ ECDSA_VALIDATE_RET( grp != NULL );
+ ECDSA_VALIDATE_RET( r != NULL );
+ ECDSA_VALIDATE_RET( s != NULL );
+ ECDSA_VALIDATE_RET( d != NULL );
+ ECDSA_VALIDATE_RET( f_rng != NULL );
+ ECDSA_VALIDATE_RET( buf != NULL || blen == 0 );
+
+ return( ecdsa_sign_restartable( grp, r, s, d, buf, blen,
+ f_rng, p_rng, NULL ) );
+}
+#endif /* !MBEDTLS_ECDSA_SIGN_ALT */
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
/*
* Deterministic signature wrapper
*/
-int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
+static int ecdsa_sign_det_restartable( mbedtls_ecp_group *grp,
+ mbedtls_mpi *r, mbedtls_mpi *s,
const mbedtls_mpi *d, const unsigned char *buf, size_t blen,
- mbedtls_md_type_t md_alg )
+ mbedtls_md_type_t md_alg,
+ mbedtls_ecdsa_restart_ctx *rs_ctx )
{
int ret;
mbedtls_hmac_drbg_context rng_ctx;
+ mbedtls_hmac_drbg_context *p_rng = &rng_ctx;
unsigned char data[2 * MBEDTLS_ECP_MAX_BYTES];
size_t grp_len = ( grp->nbits + 7 ) / 8;
const mbedtls_md_info_t *md_info;
@@ -181,21 +421,64 @@ int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi
mbedtls_mpi_init( &h );
mbedtls_hmac_drbg_init( &rng_ctx );
+ ECDSA_RS_ENTER( det );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->det != NULL )
+ {
+ /* redirect to our context */
+ p_rng = &rs_ctx->det->rng_ctx;
+
+ /* jump to current step */
+ if( rs_ctx->det->state == ecdsa_det_sign )
+ goto sign;
+ }
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
/* Use private key and message hash (reduced) to initialize HMAC_DRBG */
MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( d, data, grp_len ) );
MBEDTLS_MPI_CHK( derive_mpi( grp, &h, buf, blen ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &h, data + grp_len, grp_len ) );
- mbedtls_hmac_drbg_seed_buf( &rng_ctx, md_info, data, 2 * grp_len );
+ mbedtls_hmac_drbg_seed_buf( p_rng, md_info, data, 2 * grp_len );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->det != NULL )
+ rs_ctx->det->state = ecdsa_det_sign;
+sign:
+#endif
+#if defined(MBEDTLS_ECDSA_SIGN_ALT)
ret = mbedtls_ecdsa_sign( grp, r, s, d, buf, blen,
- mbedtls_hmac_drbg_random, &rng_ctx );
+ mbedtls_hmac_drbg_random, p_rng );
+#else
+ ret = ecdsa_sign_restartable( grp, r, s, d, buf, blen,
+ mbedtls_hmac_drbg_random, p_rng, rs_ctx );
+#endif /* MBEDTLS_ECDSA_SIGN_ALT */
cleanup:
mbedtls_hmac_drbg_free( &rng_ctx );
mbedtls_mpi_free( &h );
+ ECDSA_RS_LEAVE( det );
+
return( ret );
}
+
+/*
+ * Deterministic signature wrapper
+ */
+int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
+ const mbedtls_mpi *d, const unsigned char *buf, size_t blen,
+ mbedtls_md_type_t md_alg )
+{
+ ECDSA_VALIDATE_RET( grp != NULL );
+ ECDSA_VALIDATE_RET( r != NULL );
+ ECDSA_VALIDATE_RET( s != NULL );
+ ECDSA_VALIDATE_RET( d != NULL );
+ ECDSA_VALIDATE_RET( buf != NULL || blen == 0 );
+
+ return( ecdsa_sign_det_restartable( grp, r, s, d, buf, blen, md_alg, NULL ) );
+}
#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
#if !defined(MBEDTLS_ECDSA_VERIFY_ALT)
@@ -203,21 +486,40 @@ cleanup:
* Verify ECDSA signature of hashed message (SEC1 4.1.4)
* Obviously, compared to SEC1 4.1.3, we skip step 2 (hash message)
*/
-int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
- const unsigned char *buf, size_t blen,
- const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s)
+static int ecdsa_verify_restartable( mbedtls_ecp_group *grp,
+ const unsigned char *buf, size_t blen,
+ const mbedtls_ecp_point *Q,
+ const mbedtls_mpi *r, const mbedtls_mpi *s,
+ mbedtls_ecdsa_restart_ctx *rs_ctx )
{
int ret;
mbedtls_mpi e, s_inv, u1, u2;
mbedtls_ecp_point R;
+ mbedtls_mpi *pu1 = &u1, *pu2 = &u2;
mbedtls_ecp_point_init( &R );
- mbedtls_mpi_init( &e ); mbedtls_mpi_init( &s_inv ); mbedtls_mpi_init( &u1 ); mbedtls_mpi_init( &u2 );
+ mbedtls_mpi_init( &e ); mbedtls_mpi_init( &s_inv );
+ mbedtls_mpi_init( &u1 ); mbedtls_mpi_init( &u2 );
/* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */
if( grp->N.p == NULL )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
+ ECDSA_RS_ENTER( ver );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->ver != NULL )
+ {
+ /* redirect to our context */
+ pu1 = &rs_ctx->ver->u1;
+ pu2 = &rs_ctx->ver->u2;
+
+ /* jump to current step */
+ if( rs_ctx->ver->state == ecdsa_ver_muladd )
+ goto muladd;
+ }
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
/*
* Step 1: make sure r and s are in range 1..n-1
*/
@@ -229,11 +531,6 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
}
/*
- * Additional precaution: make sure Q is valid
- */
- MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) );
-
- /*
* Step 3: derive MPI from hashed message
*/
MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) );
@@ -241,21 +538,27 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
/*
* Step 4: u1 = e / s mod n, u2 = r / s mod n
*/
+ ECDSA_BUDGET( MBEDTLS_ECP_OPS_CHK + MBEDTLS_ECP_OPS_INV + 2 );
+
MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &s_inv, s, &grp->N ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &u1, &e, &s_inv ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &u1, &u1, &grp->N ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pu1, &e, &s_inv ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( pu1, pu1, &grp->N ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &u2, r, &s_inv ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &u2, &u2, &grp->N ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pu2, r, &s_inv ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( pu2, pu2, &grp->N ) );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->ver != NULL )
+ rs_ctx->ver->state = ecdsa_ver_muladd;
+
+muladd:
+#endif
/*
* Step 5: R = u1 G + u2 Q
- *
- * Since we're not using any secret data, no need to pass a RNG to
- * mbedtls_ecp_mul() for countermesures.
*/
- MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, &R, &u1, &grp->G, &u2, Q ) );
+ MBEDTLS_MPI_CHK( mbedtls_ecp_muladd_restartable( grp,
+ &R, pu1, &grp->G, pu2, Q, ECDSA_RS_ECP ) );
if( mbedtls_ecp_is_zero( &R ) )
{
@@ -280,11 +583,32 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
cleanup:
mbedtls_ecp_point_free( &R );
- mbedtls_mpi_free( &e ); mbedtls_mpi_free( &s_inv ); mbedtls_mpi_free( &u1 ); mbedtls_mpi_free( &u2 );
+ mbedtls_mpi_free( &e ); mbedtls_mpi_free( &s_inv );
+ mbedtls_mpi_free( &u1 ); mbedtls_mpi_free( &u2 );
+
+ ECDSA_RS_LEAVE( ver );
return( ret );
}
-#endif /* MBEDTLS_ECDSA_VERIFY_ALT */
+
+/*
+ * Verify ECDSA signature of hashed message
+ */
+int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
+ const unsigned char *buf, size_t blen,
+ const mbedtls_ecp_point *Q,
+ const mbedtls_mpi *r,
+ const mbedtls_mpi *s)
+{
+ ECDSA_VALIDATE_RET( grp != NULL );
+ ECDSA_VALIDATE_RET( Q != NULL );
+ ECDSA_VALIDATE_RET( r != NULL );
+ ECDSA_VALIDATE_RET( s != NULL );
+ ECDSA_VALIDATE_RET( buf != NULL || blen == 0 );
+
+ return( ecdsa_verify_restartable( grp, buf, blen, Q, r, s, NULL ) );
+}
+#endif /* !MBEDTLS_ECDSA_VERIFY_ALT */
/*
* Convert a signature (given by context) to ASN.1
@@ -313,14 +637,20 @@ static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s,
/*
* Compute and write signature
*/
-int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t md_alg,
+int mbedtls_ecdsa_write_signature_restartable( mbedtls_ecdsa_context *ctx,
+ mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hlen,
unsigned char *sig, size_t *slen,
int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+ void *p_rng,
+ mbedtls_ecdsa_restart_ctx *rs_ctx )
{
int ret;
mbedtls_mpi r, s;
+ ECDSA_VALIDATE_RET( ctx != NULL );
+ ECDSA_VALIDATE_RET( hash != NULL );
+ ECDSA_VALIDATE_RET( sig != NULL );
+ ECDSA_VALIDATE_RET( slen != NULL );
mbedtls_mpi_init( &r );
mbedtls_mpi_init( &s );
@@ -329,14 +659,19 @@ int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t
(void) f_rng;
(void) p_rng;
- MBEDTLS_MPI_CHK( mbedtls_ecdsa_sign_det( &ctx->grp, &r, &s, &ctx->d,
- hash, hlen, md_alg ) );
+ MBEDTLS_MPI_CHK( ecdsa_sign_det_restartable( &ctx->grp, &r, &s, &ctx->d,
+ hash, hlen, md_alg, rs_ctx ) );
#else
(void) md_alg;
+#if defined(MBEDTLS_ECDSA_SIGN_ALT)
MBEDTLS_MPI_CHK( mbedtls_ecdsa_sign( &ctx->grp, &r, &s, &ctx->d,
hash, hlen, f_rng, p_rng ) );
-#endif
+#else
+ MBEDTLS_MPI_CHK( ecdsa_sign_restartable( &ctx->grp, &r, &s, &ctx->d,
+ hash, hlen, f_rng, p_rng, rs_ctx ) );
+#endif /* MBEDTLS_ECDSA_SIGN_ALT */
+#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
MBEDTLS_MPI_CHK( ecdsa_signature_to_asn1( &r, &s, sig, slen ) );
@@ -347,13 +682,35 @@ cleanup:
return( ret );
}
-#if ! defined(MBEDTLS_DEPRECATED_REMOVED) && \
+/*
+ * Compute and write signature
+ */
+int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx,
+ mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hlen,
+ unsigned char *sig, size_t *slen,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
+{
+ ECDSA_VALIDATE_RET( ctx != NULL );
+ ECDSA_VALIDATE_RET( hash != NULL );
+ ECDSA_VALIDATE_RET( sig != NULL );
+ ECDSA_VALIDATE_RET( slen != NULL );
+ return( mbedtls_ecdsa_write_signature_restartable(
+ ctx, md_alg, hash, hlen, sig, slen, f_rng, p_rng, NULL ) );
+}
+
+#if !defined(MBEDTLS_DEPRECATED_REMOVED) && \
defined(MBEDTLS_ECDSA_DETERMINISTIC)
int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx,
const unsigned char *hash, size_t hlen,
unsigned char *sig, size_t *slen,
mbedtls_md_type_t md_alg )
{
+ ECDSA_VALIDATE_RET( ctx != NULL );
+ ECDSA_VALIDATE_RET( hash != NULL );
+ ECDSA_VALIDATE_RET( sig != NULL );
+ ECDSA_VALIDATE_RET( slen != NULL );
return( mbedtls_ecdsa_write_signature( ctx, md_alg, hash, hlen, sig, slen,
NULL, NULL ) );
}
@@ -366,11 +723,29 @@ int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx,
const unsigned char *hash, size_t hlen,
const unsigned char *sig, size_t slen )
{
+ ECDSA_VALIDATE_RET( ctx != NULL );
+ ECDSA_VALIDATE_RET( hash != NULL );
+ ECDSA_VALIDATE_RET( sig != NULL );
+ return( mbedtls_ecdsa_read_signature_restartable(
+ ctx, hash, hlen, sig, slen, NULL ) );
+}
+
+/*
+ * Restartable read and check signature
+ */
+int mbedtls_ecdsa_read_signature_restartable( mbedtls_ecdsa_context *ctx,
+ const unsigned char *hash, size_t hlen,
+ const unsigned char *sig, size_t slen,
+ mbedtls_ecdsa_restart_ctx *rs_ctx )
+{
int ret;
unsigned char *p = (unsigned char *) sig;
const unsigned char *end = sig + slen;
size_t len;
mbedtls_mpi r, s;
+ ECDSA_VALIDATE_RET( ctx != NULL );
+ ECDSA_VALIDATE_RET( hash != NULL );
+ ECDSA_VALIDATE_RET( sig != NULL );
mbedtls_mpi_init( &r );
mbedtls_mpi_init( &s );
@@ -395,10 +770,15 @@ int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx,
ret += MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
goto cleanup;
}
-
+#if defined(MBEDTLS_ECDSA_VERIFY_ALT)
if( ( ret = mbedtls_ecdsa_verify( &ctx->grp, hash, hlen,
- &ctx->Q, &r, &s ) ) != 0 )
+ &ctx->Q, &r, &s ) ) != 0 )
goto cleanup;
+#else
+ if( ( ret = ecdsa_verify_restartable( &ctx->grp, hash, hlen,
+ &ctx->Q, &r, &s, rs_ctx ) ) != 0 )
+ goto cleanup;
+#endif /* MBEDTLS_ECDSA_VERIFY_ALT */
/* At this point we know that the buffer starts with a valid signature.
* Return 0 if the buffer just contains the signature, and a specific
@@ -420,10 +800,13 @@ cleanup:
int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
+ ECDSA_VALIDATE_RET( ctx != NULL );
+ ECDSA_VALIDATE_RET( f_rng != NULL );
+
return( mbedtls_ecp_group_load( &ctx->grp, gid ) ||
mbedtls_ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) );
}
-#endif /* MBEDTLS_ECDSA_GENKEY_ALT */
+#endif /* !MBEDTLS_ECDSA_GENKEY_ALT */
/*
* Set context from an mbedtls_ecp_keypair
@@ -431,6 +814,8 @@ int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid,
int mbedtls_ecdsa_from_keypair( mbedtls_ecdsa_context *ctx, const mbedtls_ecp_keypair *key )
{
int ret;
+ ECDSA_VALIDATE_RET( ctx != NULL );
+ ECDSA_VALIDATE_RET( key != NULL );
if( ( ret = mbedtls_ecp_group_copy( &ctx->grp, &key->grp ) ) != 0 ||
( ret = mbedtls_mpi_copy( &ctx->d, &key->d ) ) != 0 ||
@@ -447,6 +832,8 @@ int mbedtls_ecdsa_from_keypair( mbedtls_ecdsa_context *ctx, const mbedtls_ecp_ke
*/
void mbedtls_ecdsa_init( mbedtls_ecdsa_context *ctx )
{
+ ECDSA_VALIDATE( ctx != NULL );
+
mbedtls_ecp_keypair_init( ctx );
}
@@ -455,7 +842,53 @@ void mbedtls_ecdsa_init( mbedtls_ecdsa_context *ctx )
*/
void mbedtls_ecdsa_free( mbedtls_ecdsa_context *ctx )
{
+ if( ctx == NULL )
+ return;
+
mbedtls_ecp_keypair_free( ctx );
}
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+/*
+ * Initialize a restart context
+ */
+void mbedtls_ecdsa_restart_init( mbedtls_ecdsa_restart_ctx *ctx )
+{
+ ECDSA_VALIDATE( ctx != NULL );
+
+ mbedtls_ecp_restart_init( &ctx->ecp );
+
+ ctx->ver = NULL;
+ ctx->sig = NULL;
+#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
+ ctx->det = NULL;
+#endif
+}
+
+/*
+ * Free the components of a restart context
+ */
+void mbedtls_ecdsa_restart_free( mbedtls_ecdsa_restart_ctx *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+ mbedtls_ecp_restart_free( &ctx->ecp );
+
+ ecdsa_restart_ver_free( ctx->ver );
+ mbedtls_free( ctx->ver );
+ ctx->ver = NULL;
+
+ ecdsa_restart_sig_free( ctx->sig );
+ mbedtls_free( ctx->sig );
+ ctx->sig = NULL;
+
+#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
+ ecdsa_restart_det_free( ctx->det );
+ mbedtls_free( ctx->det );
+ ctx->det = NULL;
+#endif
+}
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
#endif /* MBEDTLS_ECDSA_C */
diff --git a/thirdparty/mbedtls/library/ecjpake.c b/thirdparty/mbedtls/library/ecjpake.c
index ec5a4007db..be941b14b1 100644
--- a/thirdparty/mbedtls/library/ecjpake.c
+++ b/thirdparty/mbedtls/library/ecjpake.c
@@ -33,11 +33,18 @@
#if defined(MBEDTLS_ECJPAKE_C)
#include "mbedtls/ecjpake.h"
+#include "mbedtls/platform_util.h"
#include <string.h>
#if !defined(MBEDTLS_ECJPAKE_ALT)
+/* Parameter validation macros based on platform_util.h */
+#define ECJPAKE_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA )
+#define ECJPAKE_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* Convert a mbedtls_ecjpake_role to identifier string
*/
@@ -54,8 +61,7 @@ static const char * const ecjpake_id[] = {
*/
void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx )
{
- if( ctx == NULL )
- return;
+ ECJPAKE_VALIDATE( ctx != NULL );
ctx->md_info = NULL;
mbedtls_ecp_group_init( &ctx->grp );
@@ -106,6 +112,11 @@ int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx,
{
int ret;
+ ECJPAKE_VALIDATE_RET( ctx != NULL );
+ ECJPAKE_VALIDATE_RET( role == MBEDTLS_ECJPAKE_CLIENT ||
+ role == MBEDTLS_ECJPAKE_SERVER );
+ ECJPAKE_VALIDATE_RET( secret != NULL || len == 0 );
+
ctx->role = role;
if( ( ctx->md_info = mbedtls_md_info_from_type( hash ) ) == NULL )
@@ -127,6 +138,8 @@ cleanup:
*/
int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx )
{
+ ECJPAKE_VALIDATE_RET( ctx != NULL );
+
if( ctx->md_info == NULL ||
ctx->grp.id == MBEDTLS_ECP_DP_NONE ||
ctx->s.p == NULL )
@@ -504,6 +517,9 @@ int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx,
const unsigned char *buf,
size_t len )
{
+ ECJPAKE_VALIDATE_RET( ctx != NULL );
+ ECJPAKE_VALIDATE_RET( buf != NULL );
+
return( ecjpake_kkpp_read( ctx->md_info, &ctx->grp, ctx->point_format,
&ctx->grp.G,
&ctx->Xp1, &ctx->Xp2, ID_PEER,
@@ -518,6 +534,11 @@ int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
+ ECJPAKE_VALIDATE_RET( ctx != NULL );
+ ECJPAKE_VALIDATE_RET( buf != NULL );
+ ECJPAKE_VALIDATE_RET( olen != NULL );
+ ECJPAKE_VALIDATE_RET( f_rng != NULL );
+
return( ecjpake_kkpp_write( ctx->md_info, &ctx->grp, ctx->point_format,
&ctx->grp.G,
&ctx->xm1, &ctx->Xm1, &ctx->xm2, &ctx->Xm2,
@@ -560,6 +581,9 @@ int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx,
mbedtls_ecp_group grp;
mbedtls_ecp_point G; /* C: GB, S: GA */
+ ECJPAKE_VALIDATE_RET( ctx != NULL );
+ ECJPAKE_VALIDATE_RET( buf != NULL );
+
mbedtls_ecp_group_init( &grp );
mbedtls_ecp_point_init( &G );
@@ -652,6 +676,11 @@ int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx,
const unsigned char *end = buf + len;
size_t ec_len;
+ ECJPAKE_VALIDATE_RET( ctx != NULL );
+ ECJPAKE_VALIDATE_RET( buf != NULL );
+ ECJPAKE_VALIDATE_RET( olen != NULL );
+ ECJPAKE_VALIDATE_RET( f_rng != NULL );
+
mbedtls_ecp_point_init( &G );
mbedtls_ecp_point_init( &Xm );
mbedtls_mpi_init( &xm );
@@ -727,6 +756,11 @@ int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx,
unsigned char kx[MBEDTLS_ECP_MAX_BYTES];
size_t x_bytes;
+ ECJPAKE_VALIDATE_RET( ctx != NULL );
+ ECJPAKE_VALIDATE_RET( buf != NULL );
+ ECJPAKE_VALIDATE_RET( olen != NULL );
+ ECJPAKE_VALIDATE_RET( f_rng != NULL );
+
*olen = mbedtls_md_get_size( ctx->md_info );
if( len < *olen )
return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL );
diff --git a/thirdparty/mbedtls/library/ecp.c b/thirdparty/mbedtls/library/ecp.c
index 41db3fbe5b..ecea5910e0 100644
--- a/thirdparty/mbedtls/library/ecp.c
+++ b/thirdparty/mbedtls/library/ecp.c
@@ -47,6 +47,35 @@
#include MBEDTLS_CONFIG_FILE
#endif
+/**
+ * \brief Function level alternative implementation.
+ *
+ * The MBEDTLS_ECP_INTERNAL_ALT macro enables alternative implementations to
+ * replace certain functions in this module. The alternative implementations are
+ * typically hardware accelerators and need to activate the hardware before the
+ * computation starts and deactivate it after it finishes. The
+ * mbedtls_internal_ecp_init() and mbedtls_internal_ecp_free() functions serve
+ * this purpose.
+ *
+ * To preserve the correct functionality the following conditions must hold:
+ *
+ * - The alternative implementation must be activated by
+ * mbedtls_internal_ecp_init() before any of the replaceable functions is
+ * called.
+ * - mbedtls_internal_ecp_free() must \b only be called when the alternative
+ * implementation is activated.
+ * - mbedtls_internal_ecp_init() must \b not be called when the alternative
+ * implementation is activated.
+ * - Public functions must not return while the alternative implementation is
+ * activated.
+ * - Replaceable functions are guarded by \c MBEDTLS_ECP_XXX_ALT macros and
+ * before calling them an \code if( mbedtls_internal_ecp_grp_capable( grp ) )
+ * \endcode ensures that the alternative implementation supports the current
+ * group.
+ */
+#if defined(MBEDTLS_ECP_INTERNAL_ALT)
+#endif
+
#if defined(MBEDTLS_ECP_C)
#include "mbedtls/ecp.h"
@@ -57,6 +86,12 @@
#if !defined(MBEDTLS_ECP_ALT)
+/* Parameter validation macros based on platform_util.h */
+#define ECP_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA )
+#define ECP_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h"
#else
@@ -82,6 +117,233 @@
static unsigned long add_count, dbl_count, mul_count;
#endif
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+/*
+ * Maximum number of "basic operations" to be done in a row.
+ *
+ * Default value 0 means that ECC operations will not yield.
+ * Note that regardless of the value of ecp_max_ops, always at
+ * least one step is performed before yielding.
+ *
+ * Setting ecp_max_ops=1 can be suitable for testing purposes
+ * as it will interrupt computation at all possible points.
+ */
+static unsigned ecp_max_ops = 0;
+
+/*
+ * Set ecp_max_ops
+ */
+void mbedtls_ecp_set_max_ops( unsigned max_ops )
+{
+ ecp_max_ops = max_ops;
+}
+
+/*
+ * Check if restart is enabled
+ */
+int mbedtls_ecp_restart_is_enabled( void )
+{
+ return( ecp_max_ops != 0 );
+}
+
+/*
+ * Restart sub-context for ecp_mul_comb()
+ */
+struct mbedtls_ecp_restart_mul
+{
+ mbedtls_ecp_point R; /* current intermediate result */
+ size_t i; /* current index in various loops, 0 outside */
+ mbedtls_ecp_point *T; /* table for precomputed points */
+ unsigned char T_size; /* number of points in table T */
+ enum { /* what were we doing last time we returned? */
+ ecp_rsm_init = 0, /* nothing so far, dummy initial state */
+ ecp_rsm_pre_dbl, /* precompute 2^n multiples */
+ ecp_rsm_pre_norm_dbl, /* normalize precomputed 2^n multiples */
+ ecp_rsm_pre_add, /* precompute remaining points by adding */
+ ecp_rsm_pre_norm_add, /* normalize all precomputed points */
+ ecp_rsm_comb_core, /* ecp_mul_comb_core() */
+ ecp_rsm_final_norm, /* do the final normalization */
+ } state;
+};
+
+/*
+ * Init restart_mul sub-context
+ */
+static void ecp_restart_rsm_init( mbedtls_ecp_restart_mul_ctx *ctx )
+{
+ mbedtls_ecp_point_init( &ctx->R );
+ ctx->i = 0;
+ ctx->T = NULL;
+ ctx->T_size = 0;
+ ctx->state = ecp_rsm_init;
+}
+
+/*
+ * Free the components of a restart_mul sub-context
+ */
+static void ecp_restart_rsm_free( mbedtls_ecp_restart_mul_ctx *ctx )
+{
+ unsigned char i;
+
+ if( ctx == NULL )
+ return;
+
+ mbedtls_ecp_point_free( &ctx->R );
+
+ if( ctx->T != NULL )
+ {
+ for( i = 0; i < ctx->T_size; i++ )
+ mbedtls_ecp_point_free( ctx->T + i );
+ mbedtls_free( ctx->T );
+ }
+
+ ecp_restart_rsm_init( ctx );
+}
+
+/*
+ * Restart context for ecp_muladd()
+ */
+struct mbedtls_ecp_restart_muladd
+{
+ mbedtls_ecp_point mP; /* mP value */
+ mbedtls_ecp_point R; /* R intermediate result */
+ enum { /* what should we do next? */
+ ecp_rsma_mul1 = 0, /* first multiplication */
+ ecp_rsma_mul2, /* second multiplication */
+ ecp_rsma_add, /* addition */
+ ecp_rsma_norm, /* normalization */
+ } state;
+};
+
+/*
+ * Init restart_muladd sub-context
+ */
+static void ecp_restart_ma_init( mbedtls_ecp_restart_muladd_ctx *ctx )
+{
+ mbedtls_ecp_point_init( &ctx->mP );
+ mbedtls_ecp_point_init( &ctx->R );
+ ctx->state = ecp_rsma_mul1;
+}
+
+/*
+ * Free the components of a restart_muladd sub-context
+ */
+static void ecp_restart_ma_free( mbedtls_ecp_restart_muladd_ctx *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+ mbedtls_ecp_point_free( &ctx->mP );
+ mbedtls_ecp_point_free( &ctx->R );
+
+ ecp_restart_ma_init( ctx );
+}
+
+/*
+ * Initialize a restart context
+ */
+void mbedtls_ecp_restart_init( mbedtls_ecp_restart_ctx *ctx )
+{
+ ECP_VALIDATE( ctx != NULL );
+ ctx->ops_done = 0;
+ ctx->depth = 0;
+ ctx->rsm = NULL;
+ ctx->ma = NULL;
+}
+
+/*
+ * Free the components of a restart context
+ */
+void mbedtls_ecp_restart_free( mbedtls_ecp_restart_ctx *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+ ecp_restart_rsm_free( ctx->rsm );
+ mbedtls_free( ctx->rsm );
+
+ ecp_restart_ma_free( ctx->ma );
+ mbedtls_free( ctx->ma );
+
+ mbedtls_ecp_restart_init( ctx );
+}
+
+/*
+ * Check if we can do the next step
+ */
+int mbedtls_ecp_check_budget( const mbedtls_ecp_group *grp,
+ mbedtls_ecp_restart_ctx *rs_ctx,
+ unsigned ops )
+{
+ ECP_VALIDATE_RET( grp != NULL );
+
+ if( rs_ctx != NULL && ecp_max_ops != 0 )
+ {
+ /* scale depending on curve size: the chosen reference is 256-bit,
+ * and multiplication is quadratic. Round to the closest integer. */
+ if( grp->pbits >= 512 )
+ ops *= 4;
+ else if( grp->pbits >= 384 )
+ ops *= 2;
+
+ /* Avoid infinite loops: always allow first step.
+ * Because of that, however, it's not generally true
+ * that ops_done <= ecp_max_ops, so the check
+ * ops_done > ecp_max_ops below is mandatory. */
+ if( ( rs_ctx->ops_done != 0 ) &&
+ ( rs_ctx->ops_done > ecp_max_ops ||
+ ops > ecp_max_ops - rs_ctx->ops_done ) )
+ {
+ return( MBEDTLS_ERR_ECP_IN_PROGRESS );
+ }
+
+ /* update running count */
+ rs_ctx->ops_done += ops;
+ }
+
+ return( 0 );
+}
+
+/* Call this when entering a function that needs its own sub-context */
+#define ECP_RS_ENTER( SUB ) do { \
+ /* reset ops count for this call if top-level */ \
+ if( rs_ctx != NULL && rs_ctx->depth++ == 0 ) \
+ rs_ctx->ops_done = 0; \
+ \
+ /* set up our own sub-context if needed */ \
+ if( mbedtls_ecp_restart_is_enabled() && \
+ rs_ctx != NULL && rs_ctx->SUB == NULL ) \
+ { \
+ rs_ctx->SUB = mbedtls_calloc( 1, sizeof( *rs_ctx->SUB ) ); \
+ if( rs_ctx->SUB == NULL ) \
+ return( MBEDTLS_ERR_ECP_ALLOC_FAILED ); \
+ \
+ ecp_restart_## SUB ##_init( rs_ctx->SUB ); \
+ } \
+} while( 0 )
+
+/* Call this when leaving a function that needs its own sub-context */
+#define ECP_RS_LEAVE( SUB ) do { \
+ /* clear our sub-context when not in progress (done or error) */ \
+ if( rs_ctx != NULL && rs_ctx->SUB != NULL && \
+ ret != MBEDTLS_ERR_ECP_IN_PROGRESS ) \
+ { \
+ ecp_restart_## SUB ##_free( rs_ctx->SUB ); \
+ mbedtls_free( rs_ctx->SUB ); \
+ rs_ctx->SUB = NULL; \
+ } \
+ \
+ if( rs_ctx != NULL ) \
+ rs_ctx->depth--; \
+} while( 0 )
+
+#else /* MBEDTLS_ECP_RESTARTABLE */
+
+#define ECP_RS_ENTER( sub ) (void) rs_ctx;
+#define ECP_RS_LEAVE( sub ) (void) rs_ctx;
+
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \
@@ -243,6 +505,9 @@ const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_name( const char *name
{
const mbedtls_ecp_curve_info *curve_info;
+ if( name == NULL )
+ return( NULL );
+
for( curve_info = mbedtls_ecp_curve_list();
curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
curve_info++ )
@@ -273,8 +538,7 @@ static inline ecp_curve_type ecp_get_type( const mbedtls_ecp_group *grp )
*/
void mbedtls_ecp_point_init( mbedtls_ecp_point *pt )
{
- if( pt == NULL )
- return;
+ ECP_VALIDATE( pt != NULL );
mbedtls_mpi_init( &pt->X );
mbedtls_mpi_init( &pt->Y );
@@ -286,10 +550,23 @@ void mbedtls_ecp_point_init( mbedtls_ecp_point *pt )
*/
void mbedtls_ecp_group_init( mbedtls_ecp_group *grp )
{
- if( grp == NULL )
- return;
-
- memset( grp, 0, sizeof( mbedtls_ecp_group ) );
+ ECP_VALIDATE( grp != NULL );
+
+ grp->id = MBEDTLS_ECP_DP_NONE;
+ mbedtls_mpi_init( &grp->P );
+ mbedtls_mpi_init( &grp->A );
+ mbedtls_mpi_init( &grp->B );
+ mbedtls_ecp_point_init( &grp->G );
+ mbedtls_mpi_init( &grp->N );
+ grp->pbits = 0;
+ grp->nbits = 0;
+ grp->h = 0;
+ grp->modp = NULL;
+ grp->t_pre = NULL;
+ grp->t_post = NULL;
+ grp->t_data = NULL;
+ grp->T = NULL;
+ grp->T_size = 0;
}
/*
@@ -297,8 +574,7 @@ void mbedtls_ecp_group_init( mbedtls_ecp_group *grp )
*/
void mbedtls_ecp_keypair_init( mbedtls_ecp_keypair *key )
{
- if( key == NULL )
- return;
+ ECP_VALIDATE( key != NULL );
mbedtls_ecp_group_init( &key->grp );
mbedtls_mpi_init( &key->d );
@@ -366,6 +642,8 @@ void mbedtls_ecp_keypair_free( mbedtls_ecp_keypair *key )
int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q )
{
int ret;
+ ECP_VALIDATE_RET( P != NULL );
+ ECP_VALIDATE_RET( Q != NULL );
MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->X, &Q->X ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Y, &Q->Y ) );
@@ -380,7 +658,10 @@ cleanup:
*/
int mbedtls_ecp_group_copy( mbedtls_ecp_group *dst, const mbedtls_ecp_group *src )
{
- return mbedtls_ecp_group_load( dst, src->id );
+ ECP_VALIDATE_RET( dst != NULL );
+ ECP_VALIDATE_RET( src != NULL );
+
+ return( mbedtls_ecp_group_load( dst, src->id ) );
}
/*
@@ -389,6 +670,7 @@ int mbedtls_ecp_group_copy( mbedtls_ecp_group *dst, const mbedtls_ecp_group *src
int mbedtls_ecp_set_zero( mbedtls_ecp_point *pt )
{
int ret;
+ ECP_VALIDATE_RET( pt != NULL );
MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->X , 1 ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Y , 1 ) );
@@ -403,15 +685,20 @@ cleanup:
*/
int mbedtls_ecp_is_zero( mbedtls_ecp_point *pt )
{
+ ECP_VALIDATE_RET( pt != NULL );
+
return( mbedtls_mpi_cmp_int( &pt->Z, 0 ) == 0 );
}
/*
- * Compare two points lazyly
+ * Compare two points lazily
*/
int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P,
const mbedtls_ecp_point *Q )
{
+ ECP_VALIDATE_RET( P != NULL );
+ ECP_VALIDATE_RET( Q != NULL );
+
if( mbedtls_mpi_cmp_mpi( &P->X, &Q->X ) == 0 &&
mbedtls_mpi_cmp_mpi( &P->Y, &Q->Y ) == 0 &&
mbedtls_mpi_cmp_mpi( &P->Z, &Q->Z ) == 0 )
@@ -429,6 +716,9 @@ int mbedtls_ecp_point_read_string( mbedtls_ecp_point *P, int radix,
const char *x, const char *y )
{
int ret;
+ ECP_VALIDATE_RET( P != NULL );
+ ECP_VALIDATE_RET( x != NULL );
+ ECP_VALIDATE_RET( y != NULL );
MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->X, radix, x ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->Y, radix, y ) );
@@ -441,16 +731,19 @@ cleanup:
/*
* Export a point into unsigned binary data (SEC1 2.3.3)
*/
-int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *P,
- int format, size_t *olen,
- unsigned char *buf, size_t buflen )
+int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp,
+ const mbedtls_ecp_point *P,
+ int format, size_t *olen,
+ unsigned char *buf, size_t buflen )
{
int ret = 0;
size_t plen;
-
- if( format != MBEDTLS_ECP_PF_UNCOMPRESSED &&
- format != MBEDTLS_ECP_PF_COMPRESSED )
- return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( P != NULL );
+ ECP_VALIDATE_RET( olen != NULL );
+ ECP_VALIDATE_RET( buf != NULL );
+ ECP_VALIDATE_RET( format == MBEDTLS_ECP_PF_UNCOMPRESSED ||
+ format == MBEDTLS_ECP_PF_COMPRESSED );
/*
* Common case: P == 0
@@ -497,11 +790,15 @@ cleanup:
/*
* Import a point from unsigned binary data (SEC1 2.3.4)
*/
-int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt,
- const unsigned char *buf, size_t ilen )
+int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp,
+ mbedtls_ecp_point *pt,
+ const unsigned char *buf, size_t ilen )
{
int ret;
size_t plen;
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( pt != NULL );
+ ECP_VALIDATE_RET( buf != NULL );
if( ilen < 1 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
@@ -536,11 +833,16 @@ cleanup:
* opaque point <1..2^8-1>;
* } ECPoint;
*/
-int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt,
- const unsigned char **buf, size_t buf_len )
+int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp,
+ mbedtls_ecp_point *pt,
+ const unsigned char **buf, size_t buf_len )
{
unsigned char data_len;
const unsigned char *buf_start;
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( pt != NULL );
+ ECP_VALIDATE_RET( buf != NULL );
+ ECP_VALIDATE_RET( *buf != NULL );
/*
* We must have at least two bytes (1 for length, at least one for data)
@@ -558,7 +860,7 @@ int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp, mbedtls_ecp_point
buf_start = *buf;
*buf += data_len;
- return mbedtls_ecp_point_read_binary( grp, pt, buf_start, data_len );
+ return( mbedtls_ecp_point_read_binary( grp, pt, buf_start, data_len ) );
}
/*
@@ -572,6 +874,12 @@ int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp, const mbedtls_ecp
unsigned char *buf, size_t blen )
{
int ret;
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( pt != NULL );
+ ECP_VALIDATE_RET( olen != NULL );
+ ECP_VALIDATE_RET( buf != NULL );
+ ECP_VALIDATE_RET( format == MBEDTLS_ECP_PF_UNCOMPRESSED ||
+ format == MBEDTLS_ECP_PF_COMPRESSED );
/*
* buffer length must be at least one, for our length byte
@@ -595,10 +903,33 @@ int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp, const mbedtls_ecp
/*
* Set a group from an ECParameters record (RFC 4492)
*/
-int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp, const unsigned char **buf, size_t len )
+int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp,
+ const unsigned char **buf, size_t len )
+{
+ int ret;
+ mbedtls_ecp_group_id grp_id;
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( buf != NULL );
+ ECP_VALIDATE_RET( *buf != NULL );
+
+ if( ( ret = mbedtls_ecp_tls_read_group_id( &grp_id, buf, len ) ) != 0 )
+ return( ret );
+
+ return( mbedtls_ecp_group_load( grp, grp_id ) );
+}
+
+/*
+ * Read a group id from an ECParameters record (RFC 4492) and convert it to
+ * mbedtls_ecp_group_id.
+ */
+int mbedtls_ecp_tls_read_group_id( mbedtls_ecp_group_id *grp,
+ const unsigned char **buf, size_t len )
{
uint16_t tls_id;
const mbedtls_ecp_curve_info *curve_info;
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( buf != NULL );
+ ECP_VALIDATE_RET( *buf != NULL );
/*
* We expect at least three bytes (see below)
@@ -622,7 +953,9 @@ int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp, const unsigned char **bu
if( ( curve_info = mbedtls_ecp_curve_info_from_tls_id( tls_id ) ) == NULL )
return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE );
- return mbedtls_ecp_group_load( grp, curve_info->grp_id );
+ *grp = curve_info->grp_id;
+
+ return( 0 );
}
/*
@@ -632,6 +965,9 @@ int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp, size_t *olen,
unsigned char *buf, size_t blen )
{
const mbedtls_ecp_curve_info *curve_info;
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( buf != NULL );
+ ECP_VALIDATE_RET( olen != NULL );
if( ( curve_info = mbedtls_ecp_curve_info_from_grp_id( grp->id ) ) == NULL )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
@@ -752,11 +1088,10 @@ static int ecp_normalize_jac( const mbedtls_ecp_group *grp, mbedtls_ecp_point *p
return( 0 );
#if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_normalize_jac( grp, pt );
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_normalize_jac( grp, pt ) );
#endif /* MBEDTLS_ECP_NORMALIZE_JAC_ALT */
+
mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi );
/*
@@ -796,32 +1131,33 @@ cleanup:
* Cost: 1N(t) := 1I + (6t - 3)M + 1S
*/
static int ecp_normalize_jac_many( const mbedtls_ecp_group *grp,
- mbedtls_ecp_point *T[], size_t t_len )
+ mbedtls_ecp_point *T[], size_t T_size )
{
int ret;
size_t i;
mbedtls_mpi *c, u, Zi, ZZi;
- if( t_len < 2 )
+ if( T_size < 2 )
return( ecp_normalize_jac( grp, *T ) );
#if defined(MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_normalize_jac_many(grp, T, t_len);
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_normalize_jac_many( grp, T, T_size ) );
#endif
- if( ( c = mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL )
+ if( ( c = mbedtls_calloc( T_size, sizeof( mbedtls_mpi ) ) ) == NULL )
return( MBEDTLS_ERR_ECP_ALLOC_FAILED );
+ for( i = 0; i < T_size; i++ )
+ mbedtls_mpi_init( &c[i] );
+
mbedtls_mpi_init( &u ); mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi );
/*
* c[i] = Z_0 * ... * Z_i
*/
MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &c[0], &T[0]->Z ) );
- for( i = 1; i < t_len; i++ )
+ for( i = 1; i < T_size; i++ )
{
MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &c[i], &c[i-1], &T[i]->Z ) );
MOD_MUL( c[i] );
@@ -830,9 +1166,9 @@ static int ecp_normalize_jac_many( const mbedtls_ecp_group *grp,
/*
* u = 1 / (Z_0 * ... * Z_n) mod P
*/
- MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &u, &c[t_len-1], &grp->P ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &u, &c[T_size-1], &grp->P ) );
- for( i = t_len - 1; ; i-- )
+ for( i = T_size - 1; ; i-- )
{
/*
* Zi = 1 / Z_i mod p
@@ -872,7 +1208,7 @@ static int ecp_normalize_jac_many( const mbedtls_ecp_group *grp,
cleanup:
mbedtls_mpi_free( &u ); mbedtls_mpi_free( &Zi ); mbedtls_mpi_free( &ZZi );
- for( i = 0; i < t_len; i++ )
+ for( i = 0; i < T_size; i++ )
mbedtls_mpi_free( &c[i] );
mbedtls_free( c );
@@ -929,10 +1265,8 @@ static int ecp_double_jac( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
#endif
#if defined(MBEDTLS_ECP_DOUBLE_JAC_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_double_jac( grp, R, P );
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_double_jac( grp, R, P ) );
#endif /* MBEDTLS_ECP_DOUBLE_JAC_ALT */
mbedtls_mpi_init( &M ); mbedtls_mpi_init( &S ); mbedtls_mpi_init( &T ); mbedtls_mpi_init( &U );
@@ -1027,10 +1361,8 @@ static int ecp_add_mixed( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
#endif
#if defined(MBEDTLS_ECP_ADD_MIXED_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_add_mixed( grp, R, P, Q );
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_add_mixed( grp, R, P, Q ) );
#endif /* MBEDTLS_ECP_ADD_MIXED_ALT */
/*
@@ -1114,10 +1446,8 @@ static int ecp_randomize_jac( const mbedtls_ecp_group *grp, mbedtls_ecp_point *p
int count = 0;
#if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_randomize_jac( grp, pt, f_rng, p_rng );
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_randomize_jac( grp, pt, f_rng, p_rng ) );
#endif /* MBEDTLS_ECP_RANDOMIZE_JAC_ALT */
p_size = ( grp->pbits + 7 ) / 8;
@@ -1173,11 +1503,38 @@ cleanup:
* modified version that provides resistance to SPA by avoiding zero
* digits in the representation as in [3]. We modify the method further by
* requiring that all K_i be odd, which has the small cost that our
- * representation uses one more K_i, due to carries.
+ * representation uses one more K_i, due to carries, but saves on the size of
+ * the precomputed table.
*
- * Also, for the sake of compactness, only the seven low-order bits of x[i]
- * are used to represent K_i, and the msb of x[i] encodes the the sign (s_i in
- * the paper): it is set if and only if if s_i == -1;
+ * Summary of the comb method and its modifications:
+ *
+ * - The goal is to compute m*P for some w*d-bit integer m.
+ *
+ * - The basic comb method splits m into the w-bit integers
+ * x[0] .. x[d-1] where x[i] consists of the bits in m whose
+ * index has residue i modulo d, and computes m * P as
+ * S[x[0]] + 2 * S[x[1]] + .. + 2^(d-1) S[x[d-1]], where
+ * S[i_{w-1} .. i_0] := i_{w-1} 2^{(w-1)d} P + ... + i_1 2^d P + i_0 P.
+ *
+ * - If it happens that, say, x[i+1]=0 (=> S[x[i+1]]=0), one can replace the sum by
+ * .. + 2^{i-1} S[x[i-1]] - 2^i S[x[i]] + 2^{i+1} S[x[i]] + 2^{i+2} S[x[i+2]] ..,
+ * thereby successively converting it into a form where all summands
+ * are nonzero, at the cost of negative summands. This is the basic idea of [3].
+ *
+ * - More generally, even if x[i+1] != 0, we can first transform the sum as
+ * .. - 2^i S[x[i]] + 2^{i+1} ( S[x[i]] + S[x[i+1]] ) + 2^{i+2} S[x[i+2]] ..,
+ * and then replace S[x[i]] + S[x[i+1]] = S[x[i] ^ x[i+1]] + 2 S[x[i] & x[i+1]].
+ * Performing and iterating this procedure for those x[i] that are even
+ * (keeping track of carry), we can transform the original sum into one of the form
+ * S[x'[0]] +- 2 S[x'[1]] +- .. +- 2^{d-1} S[x'[d-1]] + 2^d S[x'[d]]
+ * with all x'[i] odd. It is therefore only necessary to know S at odd indices,
+ * which is why we are only computing half of it in the first place in
+ * ecp_precompute_comb and accessing it with index abs(i) / 2 in ecp_select_comb.
+ *
+ * - For the sake of compactness, only the seven low-order bits of x[i]
+ * are used to represent its absolute value (K_i in the paper), and the msb
+ * of x[i] encodes the sign (s_i in the paper): it is set if and only if
+ * if s_i == -1;
*
* Calling conventions:
* - x is an array of size d + 1
@@ -1186,8 +1543,8 @@ cleanup:
* - m is the MPI, expected to be odd and such that bitlength(m) <= w * d
* (the result will be incorrect if these assumptions are not satisfied)
*/
-static void ecp_comb_fixed( unsigned char x[], size_t d,
- unsigned char w, const mbedtls_mpi *m )
+static void ecp_comb_recode_core( unsigned char x[], size_t d,
+ unsigned char w, const mbedtls_mpi *m )
{
size_t i, j;
unsigned char c, cc, adjust;
@@ -1217,70 +1574,178 @@ static void ecp_comb_fixed( unsigned char x[], size_t d,
}
/*
- * Precompute points for the comb method
+ * Precompute points for the adapted comb method
*
- * If i = i_{w-1} ... i_1 is the binary representation of i, then
- * T[i] = i_{w-1} 2^{(w-1)d} P + ... + i_1 2^d P + P
+ * Assumption: T must be able to hold 2^{w - 1} elements.
*
- * T must be able to hold 2^{w - 1} elements
+ * Operation: If i = i_{w-1} ... i_1 is the binary representation of i,
+ * sets T[i] = i_{w-1} 2^{(w-1)d} P + ... + i_1 2^d P + P.
*
* Cost: d(w-1) D + (2^{w-1} - 1) A + 1 N(w-1) + 1 N(2^{w-1} - 1)
+ *
+ * Note: Even comb values (those where P would be omitted from the
+ * sum defining T[i] above) are not needed in our adaption
+ * the comb method. See ecp_comb_recode_core().
+ *
+ * This function currently works in four steps:
+ * (1) [dbl] Computation of intermediate T[i] for 2-power values of i
+ * (2) [norm_dbl] Normalization of coordinates of these T[i]
+ * (3) [add] Computation of all T[i]
+ * (4) [norm_add] Normalization of all T[i]
+ *
+ * Step 1 can be interrupted but not the others; together with the final
+ * coordinate normalization they are the largest steps done at once, depending
+ * on the window size. Here are operation counts for P-256:
+ *
+ * step (2) (3) (4)
+ * w = 5 142 165 208
+ * w = 4 136 77 160
+ * w = 3 130 33 136
+ * w = 2 124 11 124
+ *
+ * So if ECC operations are blocking for too long even with a low max_ops
+ * value, it's useful to set MBEDTLS_ECP_WINDOW_SIZE to a lower value in order
+ * to minimize maximum blocking time.
*/
static int ecp_precompute_comb( const mbedtls_ecp_group *grp,
mbedtls_ecp_point T[], const mbedtls_ecp_point *P,
- unsigned char w, size_t d )
+ unsigned char w, size_t d,
+ mbedtls_ecp_restart_ctx *rs_ctx )
{
int ret;
- unsigned char i, k;
- size_t j;
+ unsigned char i;
+ size_t j = 0;
+ const unsigned char T_size = 1U << ( w - 1 );
mbedtls_ecp_point *cur, *TT[COMB_MAX_PRE - 1];
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ {
+ if( rs_ctx->rsm->state == ecp_rsm_pre_dbl )
+ goto dbl;
+ if( rs_ctx->rsm->state == ecp_rsm_pre_norm_dbl )
+ goto norm_dbl;
+ if( rs_ctx->rsm->state == ecp_rsm_pre_add )
+ goto add;
+ if( rs_ctx->rsm->state == ecp_rsm_pre_norm_add )
+ goto norm_add;
+ }
+#else
+ (void) rs_ctx;
+#endif
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ {
+ rs_ctx->rsm->state = ecp_rsm_pre_dbl;
+
+ /* initial state for the loop */
+ rs_ctx->rsm->i = 0;
+ }
+
+dbl:
+#endif
/*
* Set T[0] = P and
* T[2^{l-1}] = 2^{dl} P for l = 1 .. w-1 (this is not the final value)
*/
MBEDTLS_MPI_CHK( mbedtls_ecp_copy( &T[0], P ) );
- k = 0;
- for( i = 1; i < ( 1U << ( w - 1 ) ); i <<= 1 )
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL && rs_ctx->rsm->i != 0 )
+ j = rs_ctx->rsm->i;
+ else
+#endif
+ j = 0;
+
+ for( ; j < d * ( w - 1 ); j++ )
{
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_DBL );
+
+ i = 1U << ( j / d );
cur = T + i;
- MBEDTLS_MPI_CHK( mbedtls_ecp_copy( cur, T + ( i >> 1 ) ) );
- for( j = 0; j < d; j++ )
- MBEDTLS_MPI_CHK( ecp_double_jac( grp, cur, cur ) );
- TT[k++] = cur;
+ if( j % d == 0 )
+ MBEDTLS_MPI_CHK( mbedtls_ecp_copy( cur, T + ( i >> 1 ) ) );
+
+ MBEDTLS_MPI_CHK( ecp_double_jac( grp, cur, cur ) );
}
- MBEDTLS_MPI_CHK( ecp_normalize_jac_many( grp, TT, k ) );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ rs_ctx->rsm->state = ecp_rsm_pre_norm_dbl;
+norm_dbl:
+#endif
+ /*
+ * Normalize current elements in T. As T has holes,
+ * use an auxiliary array of pointers to elements in T.
+ */
+ j = 0;
+ for( i = 1; i < T_size; i <<= 1 )
+ TT[j++] = T + i;
+
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_INV + 6 * j - 2 );
+
+ MBEDTLS_MPI_CHK( ecp_normalize_jac_many( grp, TT, j ) );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ rs_ctx->rsm->state = ecp_rsm_pre_add;
+
+add:
+#endif
/*
* Compute the remaining ones using the minimal number of additions
* Be careful to update T[2^l] only after using it!
*/
- k = 0;
- for( i = 1; i < ( 1U << ( w - 1 ) ); i <<= 1 )
+ MBEDTLS_ECP_BUDGET( ( T_size - 1 ) * MBEDTLS_ECP_OPS_ADD );
+
+ for( i = 1; i < T_size; i <<= 1 )
{
j = i;
while( j-- )
- {
MBEDTLS_MPI_CHK( ecp_add_mixed( grp, &T[i + j], &T[j], &T[i] ) );
- TT[k++] = &T[i + j];
- }
}
- MBEDTLS_MPI_CHK( ecp_normalize_jac_many( grp, TT, k ) );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ rs_ctx->rsm->state = ecp_rsm_pre_norm_add;
+
+norm_add:
+#endif
+ /*
+ * Normalize final elements in T. Even though there are no holes now, we
+ * still need the auxiliary array for homogeneity with the previous
+ * call. Also, skip T[0] which is already normalised, being a copy of P.
+ */
+ for( j = 0; j + 1 < T_size; j++ )
+ TT[j] = T + j + 1;
+
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_INV + 6 * j - 2 );
+
+ MBEDTLS_MPI_CHK( ecp_normalize_jac_many( grp, TT, j ) );
cleanup:
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL &&
+ ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ {
+ if( rs_ctx->rsm->state == ecp_rsm_pre_dbl )
+ rs_ctx->rsm->i = j;
+ }
+#endif
return( ret );
}
/*
* Select precomputed point: R = sign(i) * T[ abs(i) / 2 ]
+ *
+ * See ecp_comb_recode_core() for background
*/
static int ecp_select_comb( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
- const mbedtls_ecp_point T[], unsigned char t_len,
+ const mbedtls_ecp_point T[], unsigned char T_size,
unsigned char i )
{
int ret;
@@ -1290,7 +1755,7 @@ static int ecp_select_comb( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
ii = ( i & 0x7Fu ) >> 1;
/* Read the whole table to thwart cache-based timing attacks */
- for( j = 0; j < t_len; j++ )
+ for( j = 0; j < T_size; j++ )
{
MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &R->X, &T[j].X, j == ii ) );
MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &R->Y, &T[j].Y, j == ii ) );
@@ -1310,10 +1775,11 @@ cleanup:
* Cost: d A + d D + 1 R
*/
static int ecp_mul_comb_core( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
- const mbedtls_ecp_point T[], unsigned char t_len,
+ const mbedtls_ecp_point T[], unsigned char T_size,
const unsigned char x[], size_t d,
int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+ void *p_rng,
+ mbedtls_ecp_restart_ctx *rs_ctx )
{
int ret;
mbedtls_ecp_point Txi;
@@ -1321,17 +1787,42 @@ static int ecp_mul_comb_core( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R
mbedtls_ecp_point_init( &Txi );
- /* Start with a non-zero point and randomize its coordinates */
- i = d;
- MBEDTLS_MPI_CHK( ecp_select_comb( grp, R, T, t_len, x[i] ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &R->Z, 1 ) );
- if( f_rng != 0 )
- MBEDTLS_MPI_CHK( ecp_randomize_jac( grp, R, f_rng, p_rng ) );
+#if !defined(MBEDTLS_ECP_RESTARTABLE)
+ (void) rs_ctx;
+#endif
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL &&
+ rs_ctx->rsm->state != ecp_rsm_comb_core )
+ {
+ rs_ctx->rsm->i = 0;
+ rs_ctx->rsm->state = ecp_rsm_comb_core;
+ }
+
+ /* new 'if' instead of nested for the sake of the 'else' branch */
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL && rs_ctx->rsm->i != 0 )
+ {
+ /* restore current index (R already pointing to rs_ctx->rsm->R) */
+ i = rs_ctx->rsm->i;
+ }
+ else
+#endif
+ {
+ /* Start with a non-zero point and randomize its coordinates */
+ i = d;
+ MBEDTLS_MPI_CHK( ecp_select_comb( grp, R, T, T_size, x[i] ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &R->Z, 1 ) );
+ if( f_rng != 0 )
+ MBEDTLS_MPI_CHK( ecp_randomize_jac( grp, R, f_rng, p_rng ) );
+ }
- while( i-- != 0 )
+ while( i != 0 )
{
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_DBL + MBEDTLS_ECP_OPS_ADD );
+ --i;
+
MBEDTLS_MPI_CHK( ecp_double_jac( grp, R, R ) );
- MBEDTLS_MPI_CHK( ecp_select_comb( grp, &Txi, T, t_len, x[i] ) );
+ MBEDTLS_MPI_CHK( ecp_select_comb( grp, &Txi, T, T_size, x[i] ) );
MBEDTLS_MPI_CHK( ecp_add_mixed( grp, R, R, &Txi ) );
}
@@ -1339,32 +1830,130 @@ cleanup:
mbedtls_ecp_point_free( &Txi );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL &&
+ ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ {
+ rs_ctx->rsm->i = i;
+ /* no need to save R, already pointing to rs_ctx->rsm->R */
+ }
+#endif
+
return( ret );
}
/*
- * Multiplication using the comb method,
- * for curves in short Weierstrass form
- */
-static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
- const mbedtls_mpi *m, const mbedtls_ecp_point *P,
- int (*f_rng)(void *, unsigned char *, size_t),
- void *p_rng )
+ * Recode the scalar to get constant-time comb multiplication
+ *
+ * As the actual scalar recoding needs an odd scalar as a starting point,
+ * this wrapper ensures that by replacing m by N - m if necessary, and
+ * informs the caller that the result of multiplication will be negated.
+ *
+ * This works because we only support large prime order for Short Weierstrass
+ * curves, so N is always odd hence either m or N - m is.
+ *
+ * See ecp_comb_recode_core() for background.
+ */
+static int ecp_comb_recode_scalar( const mbedtls_ecp_group *grp,
+ const mbedtls_mpi *m,
+ unsigned char k[COMB_MAX_D + 1],
+ size_t d,
+ unsigned char w,
+ unsigned char *parity_trick )
{
int ret;
- unsigned char w, m_is_odd, p_eq_g, pre_len, i;
- size_t d;
- unsigned char k[COMB_MAX_D + 1];
- mbedtls_ecp_point *T;
mbedtls_mpi M, mm;
mbedtls_mpi_init( &M );
mbedtls_mpi_init( &mm );
- /* we need N to be odd to trnaform m in an odd number, check now */
+ /* N is always odd (see above), just make extra sure */
if( mbedtls_mpi_get_bit( &grp->N, 0 ) != 1 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
+ /* do we need the parity trick? */
+ *parity_trick = ( mbedtls_mpi_get_bit( m, 0 ) == 0 );
+
+ /* execute parity fix in constant time */
+ MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &M, m ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &mm, &grp->N, m ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &M, &mm, *parity_trick ) );
+
+ /* actual scalar recoding */
+ ecp_comb_recode_core( k, d, w, &M );
+
+cleanup:
+ mbedtls_mpi_free( &mm );
+ mbedtls_mpi_free( &M );
+
+ return( ret );
+}
+
+/*
+ * Perform comb multiplication (for short Weierstrass curves)
+ * once the auxiliary table has been pre-computed.
+ *
+ * Scalar recoding may use a parity trick that makes us compute -m * P,
+ * if that is the case we'll need to recover m * P at the end.
+ */
+static int ecp_mul_comb_after_precomp( const mbedtls_ecp_group *grp,
+ mbedtls_ecp_point *R,
+ const mbedtls_mpi *m,
+ const mbedtls_ecp_point *T,
+ unsigned char T_size,
+ unsigned char w,
+ size_t d,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng,
+ mbedtls_ecp_restart_ctx *rs_ctx )
+{
+ int ret;
+ unsigned char parity_trick;
+ unsigned char k[COMB_MAX_D + 1];
+ mbedtls_ecp_point *RR = R;
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ {
+ RR = &rs_ctx->rsm->R;
+
+ if( rs_ctx->rsm->state == ecp_rsm_final_norm )
+ goto final_norm;
+ }
+#endif
+
+ MBEDTLS_MPI_CHK( ecp_comb_recode_scalar( grp, m, k, d, w,
+ &parity_trick ) );
+ MBEDTLS_MPI_CHK( ecp_mul_comb_core( grp, RR, T, T_size, k, d,
+ f_rng, p_rng, rs_ctx ) );
+ MBEDTLS_MPI_CHK( ecp_safe_invert_jac( grp, RR, parity_trick ) );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ rs_ctx->rsm->state = ecp_rsm_final_norm;
+
+final_norm:
+#endif
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_INV );
+ MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, RR ) );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL )
+ MBEDTLS_MPI_CHK( mbedtls_ecp_copy( R, RR ) );
+#endif
+
+cleanup:
+ return( ret );
+}
+
+/*
+ * Pick window size based on curve size and whether we optimize for base point
+ */
+static unsigned char ecp_pick_window_size( const mbedtls_ecp_group *grp,
+ unsigned char p_eq_g )
+{
+ unsigned char w;
+
/*
* Minimize the number of multiplications, that is minimize
* 10 * d * w + 18 * 2^(w-1) + 11 * d + 7 * w, with d = ceil( nbits / w )
@@ -1377,14 +1966,8 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
* Just adding one avoids upping the cost of the first mul too much,
* and the memory cost too.
*/
-#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
- p_eq_g = ( mbedtls_mpi_cmp_mpi( &P->Y, &grp->G.Y ) == 0 &&
- mbedtls_mpi_cmp_mpi( &P->X, &grp->G.X ) == 0 );
if( p_eq_g )
w++;
-#else
- p_eq_g = 0;
-#endif
/*
* Make sure w is within bounds.
@@ -1395,70 +1978,140 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
if( w >= grp->nbits )
w = 2;
- /* Other sizes that depend on w */
- pre_len = 1U << ( w - 1 );
+ return( w );
+}
+
+/*
+ * Multiplication using the comb method - for curves in short Weierstrass form
+ *
+ * This function is mainly responsible for administrative work:
+ * - managing the restart context if enabled
+ * - managing the table of precomputed points (passed between the below two
+ * functions): allocation, computation, ownership tranfer, freeing.
+ *
+ * It delegates the actual arithmetic work to:
+ * ecp_precompute_comb() and ecp_mul_comb_with_precomp()
+ *
+ * See comments on ecp_comb_recode_core() regarding the computation strategy.
+ */
+static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
+ const mbedtls_mpi *m, const mbedtls_ecp_point *P,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng,
+ mbedtls_ecp_restart_ctx *rs_ctx )
+{
+ int ret;
+ unsigned char w, p_eq_g, i;
+ size_t d;
+ unsigned char T_size, T_ok;
+ mbedtls_ecp_point *T;
+
+ ECP_RS_ENTER( rsm );
+
+ /* Is P the base point ? */
+#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
+ p_eq_g = ( mbedtls_mpi_cmp_mpi( &P->Y, &grp->G.Y ) == 0 &&
+ mbedtls_mpi_cmp_mpi( &P->X, &grp->G.X ) == 0 );
+#else
+ p_eq_g = 0;
+#endif
+
+ /* Pick window size and deduce related sizes */
+ w = ecp_pick_window_size( grp, p_eq_g );
+ T_size = 1U << ( w - 1 );
d = ( grp->nbits + w - 1 ) / w;
- /*
- * Prepare precomputed points: if P == G we want to
- * use grp->T if already initialized, or initialize it.
- */
- T = p_eq_g ? grp->T : NULL;
+ /* Pre-computed table: do we have it already for the base point? */
+ if( p_eq_g && grp->T != NULL )
+ {
+ /* second pointer to the same table, will be deleted on exit */
+ T = grp->T;
+ T_ok = 1;
+ }
+ else
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ /* Pre-computed table: do we have one in progress? complete? */
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL && rs_ctx->rsm->T != NULL )
+ {
+ /* transfer ownership of T from rsm to local function */
+ T = rs_ctx->rsm->T;
+ rs_ctx->rsm->T = NULL;
+ rs_ctx->rsm->T_size = 0;
- if( T == NULL )
+ /* This effectively jumps to the call to mul_comb_after_precomp() */
+ T_ok = rs_ctx->rsm->state >= ecp_rsm_comb_core;
+ }
+ else
+#endif
+ /* Allocate table if we didn't have any */
{
- T = mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) );
+ T = mbedtls_calloc( T_size, sizeof( mbedtls_ecp_point ) );
if( T == NULL )
{
ret = MBEDTLS_ERR_ECP_ALLOC_FAILED;
goto cleanup;
}
- MBEDTLS_MPI_CHK( ecp_precompute_comb( grp, T, P, w, d ) );
+ for( i = 0; i < T_size; i++ )
+ mbedtls_ecp_point_init( &T[i] );
+
+ T_ok = 0;
+ }
+
+ /* Compute table (or finish computing it) if not done already */
+ if( !T_ok )
+ {
+ MBEDTLS_MPI_CHK( ecp_precompute_comb( grp, T, P, w, d, rs_ctx ) );
if( p_eq_g )
{
+ /* almost transfer ownership of T to the group, but keep a copy of
+ * the pointer to use for calling the next function more easily */
grp->T = T;
- grp->T_size = pre_len;
+ grp->T_size = T_size;
}
}
- /*
- * Make sure M is odd (M = m or M = N - m, since N is odd)
- * using the fact that m * P = - (N - m) * P
- */
- m_is_odd = ( mbedtls_mpi_get_bit( m, 0 ) == 1 );
- MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &M, m ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &mm, &grp->N, m ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &M, &mm, ! m_is_odd ) );
+ /* Actual comb multiplication using precomputed points */
+ MBEDTLS_MPI_CHK( ecp_mul_comb_after_precomp( grp, R, m,
+ T, T_size, w, d,
+ f_rng, p_rng, rs_ctx ) );
- /*
- * Go for comb multiplication, R = M * P
- */
- ecp_comb_fixed( k, d, w, &M );
- MBEDTLS_MPI_CHK( ecp_mul_comb_core( grp, R, T, pre_len, k, d, f_rng, p_rng ) );
+cleanup:
- /*
- * Now get m * P from M * P and normalize it
- */
- MBEDTLS_MPI_CHK( ecp_safe_invert_jac( grp, R, ! m_is_odd ) );
- MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, R ) );
+ /* does T belong to the group? */
+ if( T == grp->T )
+ T = NULL;
-cleanup:
+ /* does T belong to the restart context? */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->rsm != NULL && ret == MBEDTLS_ERR_ECP_IN_PROGRESS && T != NULL )
+ {
+ /* transfer ownership of T from local function to rsm */
+ rs_ctx->rsm->T_size = T_size;
+ rs_ctx->rsm->T = T;
+ T = NULL;
+ }
+#endif
- if( T != NULL && ! p_eq_g )
+ /* did T belong to us? then let's destroy it! */
+ if( T != NULL )
{
- for( i = 0; i < pre_len; i++ )
+ for( i = 0; i < T_size; i++ )
mbedtls_ecp_point_free( &T[i] );
mbedtls_free( T );
}
- mbedtls_mpi_free( &M );
- mbedtls_mpi_free( &mm );
-
+ /* don't free R while in progress in case R == P */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( ret != MBEDTLS_ERR_ECP_IN_PROGRESS )
+#endif
+ /* prevent caller from using invalid value */
if( ret != 0 )
mbedtls_ecp_point_free( R );
+ ECP_RS_LEAVE( rsm );
+
return( ret );
}
@@ -1482,10 +2135,8 @@ static int ecp_normalize_mxz( const mbedtls_ecp_group *grp, mbedtls_ecp_point *P
int ret;
#if defined(MBEDTLS_ECP_NORMALIZE_MXZ_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_normalize_mxz( grp, P );
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_normalize_mxz( grp, P ) );
#endif /* MBEDTLS_ECP_NORMALIZE_MXZ_ALT */
MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &P->Z, &P->Z, &grp->P ) );
@@ -1513,10 +2164,8 @@ static int ecp_randomize_mxz( const mbedtls_ecp_group *grp, mbedtls_ecp_point *P
int count = 0;
#if defined(MBEDTLS_ECP_RANDOMIZE_MXZ_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_randomize_mxz( grp, P, f_rng, p_rng );
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_randomize_mxz( grp, P, f_rng, p_rng );
#endif /* MBEDTLS_ECP_RANDOMIZE_MXZ_ALT */
p_size = ( grp->pbits + 7 ) / 8;
@@ -1568,10 +2217,8 @@ static int ecp_double_add_mxz( const mbedtls_ecp_group *grp,
mbedtls_mpi A, AA, B, BB, E, C, D, DA, CB;
#if defined(MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT)
- if ( mbedtls_internal_ecp_grp_capable( grp ) )
- {
- return mbedtls_internal_ecp_double_add_mxz( grp, R, S, P, Q, d );
- }
+ if( mbedtls_internal_ecp_grp_capable( grp ) )
+ return( mbedtls_internal_ecp_double_add_mxz( grp, R, S, P, Q, d ) );
#endif /* MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT */
mbedtls_mpi_init( &A ); mbedtls_mpi_init( &AA ); mbedtls_mpi_init( &B );
@@ -1668,54 +2315,85 @@ cleanup:
#endif /* ECP_MONTGOMERY */
/*
- * Multiplication R = m * P
+ * Restartable multiplication R = m * P
*/
-int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
+int mbedtls_ecp_mul_restartable( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
const mbedtls_mpi *m, const mbedtls_ecp_point *P,
- int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ mbedtls_ecp_restart_ctx *rs_ctx )
{
int ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
#if defined(MBEDTLS_ECP_INTERNAL_ALT)
char is_grp_capable = 0;
#endif
-
- /* Common sanity checks */
- if( mbedtls_mpi_cmp_int( &P->Z, 1 ) != 0 )
- return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
-
- if( ( ret = mbedtls_ecp_check_privkey( grp, m ) ) != 0 ||
- ( ret = mbedtls_ecp_check_pubkey( grp, P ) ) != 0 )
- return( ret );
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( R != NULL );
+ ECP_VALIDATE_RET( m != NULL );
+ ECP_VALIDATE_RET( P != NULL );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ /* reset ops count for this call if top-level */
+ if( rs_ctx != NULL && rs_ctx->depth++ == 0 )
+ rs_ctx->ops_done = 0;
+#endif
#if defined(MBEDTLS_ECP_INTERNAL_ALT)
- if ( is_grp_capable = mbedtls_internal_ecp_grp_capable( grp ) )
- {
+ if( ( is_grp_capable = mbedtls_internal_ecp_grp_capable( grp ) ) )
MBEDTLS_MPI_CHK( mbedtls_internal_ecp_init( grp ) );
+#endif /* MBEDTLS_ECP_INTERNAL_ALT */
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ /* skip argument check when restarting */
+ if( rs_ctx == NULL || rs_ctx->rsm == NULL )
+#endif
+ {
+ /* check_privkey is free */
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_CHK );
+
+ /* Common sanity checks */
+ MBEDTLS_MPI_CHK( mbedtls_ecp_check_privkey( grp, m ) );
+ MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, P ) );
}
-#endif /* MBEDTLS_ECP_INTERNAL_ALT */
+ ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
#if defined(ECP_MONTGOMERY)
if( ecp_get_type( grp ) == ECP_TYPE_MONTGOMERY )
- ret = ecp_mul_mxz( grp, R, m, P, f_rng, p_rng );
-
+ MBEDTLS_MPI_CHK( ecp_mul_mxz( grp, R, m, P, f_rng, p_rng ) );
#endif
#if defined(ECP_SHORTWEIERSTRASS)
if( ecp_get_type( grp ) == ECP_TYPE_SHORT_WEIERSTRASS )
- ret = ecp_mul_comb( grp, R, m, P, f_rng, p_rng );
-
+ MBEDTLS_MPI_CHK( ecp_mul_comb( grp, R, m, P, f_rng, p_rng, rs_ctx ) );
#endif
-#if defined(MBEDTLS_ECP_INTERNAL_ALT)
+
cleanup:
- if ( is_grp_capable )
- {
+#if defined(MBEDTLS_ECP_INTERNAL_ALT)
+ if( is_grp_capable )
mbedtls_internal_ecp_free( grp );
- }
-
#endif /* MBEDTLS_ECP_INTERNAL_ALT */
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL )
+ rs_ctx->depth--;
+#endif
+
return( ret );
}
+/*
+ * Multiplication R = m * P
+ */
+int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
+ const mbedtls_mpi *m, const mbedtls_ecp_point *P,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
+{
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( R != NULL );
+ ECP_VALIDATE_RET( m != NULL );
+ ECP_VALIDATE_RET( P != NULL );
+ return( mbedtls_ecp_mul_restartable( grp, R, m, P, f_rng, p_rng, NULL ) );
+}
+
#if defined(ECP_SHORTWEIERSTRASS)
/*
* Check that an affine point is valid as a public key,
@@ -1773,7 +2451,8 @@ cleanup:
static int mbedtls_ecp_mul_shortcuts( mbedtls_ecp_group *grp,
mbedtls_ecp_point *R,
const mbedtls_mpi *m,
- const mbedtls_ecp_point *P )
+ const mbedtls_ecp_point *P,
+ mbedtls_ecp_restart_ctx *rs_ctx )
{
int ret;
@@ -1789,7 +2468,8 @@ static int mbedtls_ecp_mul_shortcuts( mbedtls_ecp_group *grp,
}
else
{
- MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, R, m, P, NULL, NULL ) );
+ MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, R, m, P,
+ NULL, NULL, rs_ctx ) );
}
cleanup:
@@ -1797,51 +2477,118 @@ cleanup:
}
/*
- * Linear combination
+ * Restartable linear combination
* NOT constant-time
*/
-int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
+int mbedtls_ecp_muladd_restartable(
+ mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
const mbedtls_mpi *m, const mbedtls_ecp_point *P,
- const mbedtls_mpi *n, const mbedtls_ecp_point *Q )
+ const mbedtls_mpi *n, const mbedtls_ecp_point *Q,
+ mbedtls_ecp_restart_ctx *rs_ctx )
{
int ret;
mbedtls_ecp_point mP;
+ mbedtls_ecp_point *pmP = &mP;
+ mbedtls_ecp_point *pR = R;
#if defined(MBEDTLS_ECP_INTERNAL_ALT)
char is_grp_capable = 0;
#endif
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( R != NULL );
+ ECP_VALIDATE_RET( m != NULL );
+ ECP_VALIDATE_RET( P != NULL );
+ ECP_VALIDATE_RET( n != NULL );
+ ECP_VALIDATE_RET( Q != NULL );
if( ecp_get_type( grp ) != ECP_TYPE_SHORT_WEIERSTRASS )
return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE );
mbedtls_ecp_point_init( &mP );
- MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, &mP, m, P ) );
- MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, R, n, Q ) );
+ ECP_RS_ENTER( ma );
-#if defined(MBEDTLS_ECP_INTERNAL_ALT)
- if ( is_grp_capable = mbedtls_internal_ecp_grp_capable( grp ) )
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->ma != NULL )
{
- MBEDTLS_MPI_CHK( mbedtls_internal_ecp_init( grp ) );
+ /* redirect intermediate results to restart context */
+ pmP = &rs_ctx->ma->mP;
+ pR = &rs_ctx->ma->R;
+
+ /* jump to next operation */
+ if( rs_ctx->ma->state == ecp_rsma_mul2 )
+ goto mul2;
+ if( rs_ctx->ma->state == ecp_rsma_add )
+ goto add;
+ if( rs_ctx->ma->state == ecp_rsma_norm )
+ goto norm;
}
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+ MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, pmP, m, P, rs_ctx ) );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->ma != NULL )
+ rs_ctx->ma->state = ecp_rsma_mul2;
+
+mul2:
+#endif
+ MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, pR, n, Q, rs_ctx ) );
+
+#if defined(MBEDTLS_ECP_INTERNAL_ALT)
+ if( ( is_grp_capable = mbedtls_internal_ecp_grp_capable( grp ) ) )
+ MBEDTLS_MPI_CHK( mbedtls_internal_ecp_init( grp ) );
#endif /* MBEDTLS_ECP_INTERNAL_ALT */
- MBEDTLS_MPI_CHK( ecp_add_mixed( grp, R, &mP, R ) );
- MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, R ) );
-cleanup:
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->ma != NULL )
+ rs_ctx->ma->state = ecp_rsma_add;
+
+add:
+#endif
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_ADD );
+ MBEDTLS_MPI_CHK( ecp_add_mixed( grp, pR, pmP, pR ) );
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->ma != NULL )
+ rs_ctx->ma->state = ecp_rsma_norm;
+
+norm:
+#endif
+ MBEDTLS_ECP_BUDGET( MBEDTLS_ECP_OPS_INV );
+ MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, pR ) );
+
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && rs_ctx->ma != NULL )
+ MBEDTLS_MPI_CHK( mbedtls_ecp_copy( R, pR ) );
+#endif
+cleanup:
#if defined(MBEDTLS_ECP_INTERNAL_ALT)
- if ( is_grp_capable )
- {
+ if( is_grp_capable )
mbedtls_internal_ecp_free( grp );
- }
-
#endif /* MBEDTLS_ECP_INTERNAL_ALT */
+
mbedtls_ecp_point_free( &mP );
+ ECP_RS_LEAVE( ma );
+
return( ret );
}
+/*
+ * Linear combination
+ * NOT constant-time
+ */
+int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
+ const mbedtls_mpi *m, const mbedtls_ecp_point *P,
+ const mbedtls_mpi *n, const mbedtls_ecp_point *Q )
+{
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( R != NULL );
+ ECP_VALIDATE_RET( m != NULL );
+ ECP_VALIDATE_RET( P != NULL );
+ ECP_VALIDATE_RET( n != NULL );
+ ECP_VALIDATE_RET( Q != NULL );
+ return( mbedtls_ecp_muladd_restartable( grp, R, m, P, n, Q, NULL ) );
+}
#if defined(ECP_MONTGOMERY)
/*
@@ -1862,8 +2609,12 @@ static int ecp_check_pubkey_mx( const mbedtls_ecp_group *grp, const mbedtls_ecp_
/*
* Check that a point is valid as a public key
*/
-int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt )
+int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp,
+ const mbedtls_ecp_point *pt )
{
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( pt != NULL );
+
/* Must use affine coordinates */
if( mbedtls_mpi_cmp_int( &pt->Z, 1 ) != 0 )
return( MBEDTLS_ERR_ECP_INVALID_KEY );
@@ -1882,8 +2633,12 @@ int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp, const mbedtls_ecp_po
/*
* Check that an mbedtls_mpi is valid as a private key
*/
-int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, const mbedtls_mpi *d )
+int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp,
+ const mbedtls_mpi *d )
{
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( d != NULL );
+
#if defined(ECP_MONTGOMERY)
if( ecp_get_type( grp ) == ECP_TYPE_MONTGOMERY )
{
@@ -1892,7 +2647,6 @@ int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, const mbedtls_mpi *
mbedtls_mpi_get_bit( d, 1 ) != 0 ||
mbedtls_mpi_bitlen( d ) - 1 != grp->nbits ) /* mbedtls_mpi_bitlen is one-based! */
return( MBEDTLS_ERR_ECP_INVALID_KEY );
- else
/* see [Curve25519] page 5 */
if( grp->nbits == 254 && mbedtls_mpi_get_bit( d, 2 ) != 0 )
@@ -1917,16 +2671,21 @@ int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, const mbedtls_mpi *
}
/*
- * Generate a keypair with configurable base point
+ * Generate a private key
*/
-int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp,
- const mbedtls_ecp_point *G,
- mbedtls_mpi *d, mbedtls_ecp_point *Q,
+int mbedtls_ecp_gen_privkey( const mbedtls_ecp_group *grp,
+ mbedtls_mpi *d,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
- int ret;
- size_t n_size = ( grp->nbits + 7 ) / 8;
+ int ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
+ size_t n_size;
+
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( d != NULL );
+ ECP_VALIDATE_RET( f_rng != NULL );
+
+ n_size = ( grp->nbits + 7 ) / 8;
#if defined(ECP_MONTGOMERY)
if( ecp_get_type( grp ) == ECP_TYPE_MONTGOMERY )
@@ -1954,8 +2713,8 @@ int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp,
MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( d, 2, 0 ) );
}
}
- else
#endif /* ECP_MONTGOMERY */
+
#if defined(ECP_SHORTWEIERSTRASS)
if( ecp_get_type( grp ) == ECP_TYPE_SHORT_WEIERSTRASS )
{
@@ -1989,15 +2748,33 @@ int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp,
while( mbedtls_mpi_cmp_int( d, 1 ) < 0 ||
mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 );
}
- else
#endif /* ECP_SHORTWEIERSTRASS */
- return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
cleanup:
- if( ret != 0 )
- return( ret );
+ return( ret );
+}
- return( mbedtls_ecp_mul( grp, Q, d, G, f_rng, p_rng ) );
+/*
+ * Generate a keypair with configurable base point
+ */
+int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp,
+ const mbedtls_ecp_point *G,
+ mbedtls_mpi *d, mbedtls_ecp_point *Q,
+ int (*f_rng)(void *, unsigned char *, size_t),
+ void *p_rng )
+{
+ int ret;
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( d != NULL );
+ ECP_VALIDATE_RET( G != NULL );
+ ECP_VALIDATE_RET( Q != NULL );
+ ECP_VALIDATE_RET( f_rng != NULL );
+
+ MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, d, f_rng, p_rng ) );
+ MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, Q, d, G, f_rng, p_rng ) );
+
+cleanup:
+ return( ret );
}
/*
@@ -2008,6 +2785,11 @@ int mbedtls_ecp_gen_keypair( mbedtls_ecp_group *grp,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
+ ECP_VALIDATE_RET( grp != NULL );
+ ECP_VALIDATE_RET( d != NULL );
+ ECP_VALIDATE_RET( Q != NULL );
+ ECP_VALIDATE_RET( f_rng != NULL );
+
return( mbedtls_ecp_gen_keypair_base( grp, &grp->G, d, Q, f_rng, p_rng ) );
}
@@ -2018,6 +2800,8 @@ int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
int ret;
+ ECP_VALIDATE_RET( key != NULL );
+ ECP_VALIDATE_RET( f_rng != NULL );
if( ( ret = mbedtls_ecp_group_load( &key->grp, grp_id ) ) != 0 )
return( ret );
@@ -2033,6 +2817,8 @@ int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub, const mbedtls_ec
int ret;
mbedtls_ecp_point Q;
mbedtls_ecp_group grp;
+ ECP_VALIDATE_RET( pub != NULL );
+ ECP_VALIDATE_RET( prv != NULL );
if( pub->grp.id == MBEDTLS_ECP_DP_NONE ||
pub->grp.id != prv->grp.id ||
diff --git a/thirdparty/mbedtls/library/ecp_curves.c b/thirdparty/mbedtls/library/ecp_curves.c
index 68e2441ae8..731621dc3c 100644
--- a/thirdparty/mbedtls/library/ecp_curves.c
+++ b/thirdparty/mbedtls/library/ecp_curves.c
@@ -28,11 +28,18 @@
#if defined(MBEDTLS_ECP_C)
#include "mbedtls/ecp.h"
+#include "mbedtls/platform_util.h"
#include <string.h>
#if !defined(MBEDTLS_ECP_ALT)
+/* Parameter validation macros based on platform_util.h */
+#define ECP_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA )
+#define ECP_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
!defined(inline) && !defined(__cplusplus)
#define inline __inline
@@ -746,6 +753,7 @@ cleanup:
*/
int mbedtls_ecp_group_load( mbedtls_ecp_group *grp, mbedtls_ecp_group_id id )
{
+ ECP_VALIDATE_RET( grp != NULL );
mbedtls_ecp_group_free( grp );
grp->id = id;
diff --git a/thirdparty/mbedtls/library/entropy_poll.c b/thirdparty/mbedtls/library/entropy_poll.c
index f44a753f4d..ba56b70f77 100644
--- a/thirdparty/mbedtls/library/entropy_poll.c
+++ b/thirdparty/mbedtls/library/entropy_poll.c
@@ -114,6 +114,7 @@ int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len
#include <sys/syscall.h>
#if defined(SYS_getrandom)
#define HAVE_GETRANDOM
+#include <errno.h>
static int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags )
{
@@ -123,47 +124,8 @@ static int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags )
memset( buf, 0, buflen );
#endif
#endif
-
return( syscall( SYS_getrandom, buf, buflen, flags ) );
}
-
-#include <sys/utsname.h>
-/* Check if version is at least 3.17.0 */
-static int check_version_3_17_plus( void )
-{
- int minor;
- struct utsname un;
- const char *ver;
-
- /* Get version information */
- uname(&un);
- ver = un.release;
-
- /* Check major version; assume a single digit */
- if( ver[0] < '3' || ver[0] > '9' || ver [1] != '.' )
- return( -1 );
-
- if( ver[0] - '0' > 3 )
- return( 0 );
-
- /* Ok, so now we know major == 3, check minor.
- * Assume 1 or 2 digits. */
- if( ver[2] < '0' || ver[2] > '9' )
- return( -1 );
-
- minor = ver[2] - '0';
-
- if( ver[3] >= '0' && ver[3] <= '9' )
- minor = 10 * minor + ver[3] - '0';
- else if( ver [3] != '.' )
- return( -1 );
-
- if( minor < 17 )
- return( -1 );
-
- return( 0 );
-}
-static int has_getrandom = -1;
#endif /* SYS_getrandom */
#endif /* __linux__ */
@@ -174,22 +136,21 @@ int mbedtls_platform_entropy_poll( void *data,
{
FILE *file;
size_t read_len;
+ int ret;
((void) data);
#if defined(HAVE_GETRANDOM)
- if( has_getrandom == -1 )
- has_getrandom = ( check_version_3_17_plus() == 0 );
-
- if( has_getrandom )
+ ret = getrandom_wrapper( output, len, 0 );
+ if( ret >= 0 )
{
- int ret;
-
- if( ( ret = getrandom_wrapper( output, len, 0 ) ) < 0 )
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
-
*olen = ret;
return( 0 );
}
+ else if( errno != ENOSYS )
+ return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
+ /* Fall through if the system call isn't known. */
+#else
+ ((void) ret);
#endif /* HAVE_GETRANDOM */
*olen = 0;
diff --git a/thirdparty/mbedtls/library/entropy_poll.c.orig b/thirdparty/mbedtls/library/entropy_poll.c.orig
deleted file mode 100644
index 040aa117dc..0000000000
--- a/thirdparty/mbedtls/library/entropy_poll.c.orig
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Platform-specific and custom entropy polling functions
- *
- * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This file is part of mbed TLS (https://tls.mbed.org)
- */
-
-#if defined(__linux__)
-/* Ensure that syscall() is available even when compiling with -std=c99 */
-#define _GNU_SOURCE
-#endif
-
-#if !defined(MBEDTLS_CONFIG_FILE)
-#include "mbedtls/config.h"
-#else
-#include MBEDTLS_CONFIG_FILE
-#endif
-
-#include <string.h>
-
-#if defined(MBEDTLS_ENTROPY_C)
-
-#include "mbedtls/entropy.h"
-#include "mbedtls/entropy_poll.h"
-
-#if defined(MBEDTLS_TIMING_C)
-#include "mbedtls/timing.h"
-#endif
-#if defined(MBEDTLS_HAVEGE_C)
-#include "mbedtls/havege.h"
-#endif
-#if defined(MBEDTLS_ENTROPY_NV_SEED)
-#include "mbedtls/platform.h"
-#endif
-
-#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
-
-#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
- !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
- !defined(__HAIKU__)
-#error "Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in config.h"
-#endif
-
-#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
-
-#if !defined(_WIN32_WINNT)
-#define _WIN32_WINNT 0x0400
-#endif
-#include <windows.h>
-#include <wincrypt.h>
-
-int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len,
- size_t *olen )
-{
- HCRYPTPROV provider;
- ((void) data);
- *olen = 0;
-
- if( CryptAcquireContext( &provider, NULL, NULL,
- PROV_RSA_FULL, CRYPT_VERIFYCONTEXT ) == FALSE )
- {
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
- }
-
- if( CryptGenRandom( provider, (DWORD) len, output ) == FALSE )
- {
- CryptReleaseContext( provider, 0 );
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
- }
-
- CryptReleaseContext( provider, 0 );
- *olen = len;
-
- return( 0 );
-}
-#else /* _WIN32 && !EFIX64 && !EFI32 */
-
-/*
- * Test for Linux getrandom() support.
- * Since there is no wrapper in the libc yet, use the generic syscall wrapper
- * available in GNU libc and compatible libc's (eg uClibc).
- */
-#if defined(__linux__) && defined(__GLIBC__)
-#include <unistd.h>
-#include <sys/syscall.h>
-#if defined(SYS_getrandom)
-#define HAVE_GETRANDOM
-
-static int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags )
-{
- /* MemSan cannot understand that the syscall writes to the buffer */
-#if defined(__has_feature)
-#if __has_feature(memory_sanitizer)
- memset( buf, 0, buflen );
-#endif
-#endif
-
- return( syscall( SYS_getrandom, buf, buflen, flags ) );
-}
-
-#include <sys/utsname.h>
-/* Check if version is at least 3.17.0 */
-static int check_version_3_17_plus( void )
-{
- int minor;
- struct utsname un;
- const char *ver;
-
- /* Get version information */
- uname(&un);
- ver = un.release;
-
- /* Check major version; assume a single digit */
- if( ver[0] < '3' || ver[0] > '9' || ver [1] != '.' )
- return( -1 );
-
- if( ver[0] - '0' > 3 )
- return( 0 );
-
- /* Ok, so now we know major == 3, check minor.
- * Assume 1 or 2 digits. */
- if( ver[2] < '0' || ver[2] > '9' )
- return( -1 );
-
- minor = ver[2] - '0';
-
- if( ver[3] >= '0' && ver[3] <= '9' )
- minor = 10 * minor + ver[3] - '0';
- else if( ver [3] != '.' )
- return( -1 );
-
- if( minor < 17 )
- return( -1 );
-
- return( 0 );
-}
-static int has_getrandom = -1;
-#endif /* SYS_getrandom */
-#endif /* __linux__ */
-
-#include <stdio.h>
-
-int mbedtls_platform_entropy_poll( void *data,
- unsigned char *output, size_t len, size_t *olen )
-{
- FILE *file;
- size_t read_len;
- ((void) data);
-
-#if defined(HAVE_GETRANDOM)
- if( has_getrandom == -1 )
- has_getrandom = ( check_version_3_17_plus() == 0 );
-
- if( has_getrandom )
- {
- int ret;
-
- if( ( ret = getrandom_wrapper( output, len, 0 ) ) < 0 )
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
-
- *olen = ret;
- return( 0 );
- }
-#endif /* HAVE_GETRANDOM */
-
- *olen = 0;
-
- file = fopen( "/dev/urandom", "rb" );
- if( file == NULL )
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
-
- read_len = fread( output, 1, len, file );
- if( read_len != len )
- {
- fclose( file );
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
- }
-
- fclose( file );
- *olen = len;
-
- return( 0 );
-}
-#endif /* _WIN32 && !EFIX64 && !EFI32 */
-#endif /* !MBEDTLS_NO_PLATFORM_ENTROPY */
-
-#if defined(MBEDTLS_TEST_NULL_ENTROPY)
-int mbedtls_null_entropy_poll( void *data,
- unsigned char *output, size_t len, size_t *olen )
-{
- ((void) data);
- ((void) output);
- *olen = 0;
-
- if( len < sizeof(unsigned char) )
- return( 0 );
-
- *olen = sizeof(unsigned char);
-
- return( 0 );
-}
-#endif
-
-#if defined(MBEDTLS_TIMING_C)
-int mbedtls_hardclock_poll( void *data,
- unsigned char *output, size_t len, size_t *olen )
-{
- unsigned long timer = mbedtls_timing_hardclock();
- ((void) data);
- *olen = 0;
-
- if( len < sizeof(unsigned long) )
- return( 0 );
-
- memcpy( output, &timer, sizeof(unsigned long) );
- *olen = sizeof(unsigned long);
-
- return( 0 );
-}
-#endif /* MBEDTLS_TIMING_C */
-
-#if defined(MBEDTLS_HAVEGE_C)
-int mbedtls_havege_poll( void *data,
- unsigned char *output, size_t len, size_t *olen )
-{
- mbedtls_havege_state *hs = (mbedtls_havege_state *) data;
- *olen = 0;
-
- if( mbedtls_havege_random( hs, output, len ) != 0 )
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
-
- *olen = len;
-
- return( 0 );
-}
-#endif /* MBEDTLS_HAVEGE_C */
-
-#if defined(MBEDTLS_ENTROPY_NV_SEED)
-int mbedtls_nv_seed_poll( void *data,
- unsigned char *output, size_t len, size_t *olen )
-{
- unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE];
- size_t use_len = MBEDTLS_ENTROPY_BLOCK_SIZE;
- ((void) data);
-
- memset( buf, 0, MBEDTLS_ENTROPY_BLOCK_SIZE );
-
- if( mbedtls_nv_seed_read( buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) < 0 )
- return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
-
- if( len < use_len )
- use_len = len;
-
- memcpy( output, buf, use_len );
- *olen = use_len;
-
- return( 0 );
-}
-#endif /* MBEDTLS_ENTROPY_NV_SEED */
-
-#endif /* MBEDTLS_ENTROPY_C */
diff --git a/thirdparty/mbedtls/library/error.c b/thirdparty/mbedtls/library/error.c
index 774244b454..12312a0562 100644
--- a/thirdparty/mbedtls/library/error.c
+++ b/thirdparty/mbedtls/library/error.c
@@ -165,6 +165,10 @@
#include "mbedtls/pkcs5.h"
#endif
+#if defined(MBEDTLS_PLATFORM_C)
+#include "mbedtls/platform.h"
+#endif
+
#if defined(MBEDTLS_POLY1305_C)
#include "mbedtls/poly1305.h"
#endif
@@ -289,6 +293,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
mbedtls_snprintf( buf, buflen, "ECP - The buffer contains a valid signature followed by more data" );
if( use_ret == -(MBEDTLS_ERR_ECP_HW_ACCEL_FAILED) )
mbedtls_snprintf( buf, buflen, "ECP - The ECP hardware accelerator failed" );
+ if( use_ret == -(MBEDTLS_ERR_ECP_IN_PROGRESS) )
+ mbedtls_snprintf( buf, buflen, "ECP - Operation in progress, call again with the same parameters to continue" );
#endif /* MBEDTLS_ECP_C */
#if defined(MBEDTLS_MD_C)
@@ -515,6 +521,10 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
mbedtls_snprintf( buf, buflen, "SSL - Internal-only message signaling that further message-processing should be done" );
if( use_ret == -(MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS) )
mbedtls_snprintf( buf, buflen, "SSL - The asynchronous operation is not completed yet" );
+ if( use_ret == -(MBEDTLS_ERR_SSL_EARLY_MESSAGE) )
+ mbedtls_snprintf( buf, buflen, "SSL - Internal-only message signaling that a message arrived early" );
+ if( use_ret == -(MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS) )
+ mbedtls_snprintf( buf, buflen, "SSL - A cryptographic operation is in progress. Try again later" );
#endif /* MBEDTLS_SSL_TLS_C */
#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C)
@@ -608,8 +618,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
#endif /* MBEDTLS_ARC4_C */
#if defined(MBEDTLS_ARIA_C)
- if( use_ret == -(MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH) )
- mbedtls_snprintf( buf, buflen, "ARIA - Invalid key length" );
+ if( use_ret == -(MBEDTLS_ERR_ARIA_BAD_INPUT_DATA) )
+ mbedtls_snprintf( buf, buflen, "ARIA - Bad input data" );
if( use_ret == -(MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH) )
mbedtls_snprintf( buf, buflen, "ARIA - Invalid data input length" );
if( use_ret == -(MBEDTLS_ERR_ARIA_FEATURE_UNAVAILABLE) )
@@ -662,17 +672,17 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
#endif /* MBEDTLS_BIGNUM_C */
#if defined(MBEDTLS_BLOWFISH_C)
- if( use_ret == -(MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH) )
- mbedtls_snprintf( buf, buflen, "BLOWFISH - Invalid key length" );
- if( use_ret == -(MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED) )
- mbedtls_snprintf( buf, buflen, "BLOWFISH - Blowfish hardware accelerator failed" );
+ if( use_ret == -(MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA) )
+ mbedtls_snprintf( buf, buflen, "BLOWFISH - Bad input data" );
if( use_ret == -(MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH) )
mbedtls_snprintf( buf, buflen, "BLOWFISH - Invalid data input length" );
+ if( use_ret == -(MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED) )
+ mbedtls_snprintf( buf, buflen, "BLOWFISH - Blowfish hardware accelerator failed" );
#endif /* MBEDTLS_BLOWFISH_C */
#if defined(MBEDTLS_CAMELLIA_C)
- if( use_ret == -(MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH) )
- mbedtls_snprintf( buf, buflen, "CAMELLIA - Invalid key length" );
+ if( use_ret == -(MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA) )
+ mbedtls_snprintf( buf, buflen, "CAMELLIA - Bad input data" );
if( use_ret == -(MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH) )
mbedtls_snprintf( buf, buflen, "CAMELLIA - Invalid data input length" );
if( use_ret == -(MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED) )
@@ -821,6 +831,13 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
mbedtls_snprintf( buf, buflen, "PADLOCK - Input data should be aligned" );
#endif /* MBEDTLS_PADLOCK_C */
+#if defined(MBEDTLS_PLATFORM_C)
+ if( use_ret == -(MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED) )
+ mbedtls_snprintf( buf, buflen, "PLATFORM - Hardware accelerator failed" );
+ if( use_ret == -(MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED) )
+ mbedtls_snprintf( buf, buflen, "PLATFORM - The requested feature is not supported by the platform" );
+#endif /* MBEDTLS_PLATFORM_C */
+
#if defined(MBEDTLS_POLY1305_C)
if( use_ret == -(MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA) )
mbedtls_snprintf( buf, buflen, "POLY1305 - Invalid input parameter(s)" );
@@ -838,16 +855,22 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
#if defined(MBEDTLS_SHA1_C)
if( use_ret == -(MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED) )
mbedtls_snprintf( buf, buflen, "SHA1 - SHA-1 hardware accelerator failed" );
+ if( use_ret == -(MBEDTLS_ERR_SHA1_BAD_INPUT_DATA) )
+ mbedtls_snprintf( buf, buflen, "SHA1 - SHA-1 input data was malformed" );
#endif /* MBEDTLS_SHA1_C */
#if defined(MBEDTLS_SHA256_C)
if( use_ret == -(MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED) )
mbedtls_snprintf( buf, buflen, "SHA256 - SHA-256 hardware accelerator failed" );
+ if( use_ret == -(MBEDTLS_ERR_SHA256_BAD_INPUT_DATA) )
+ mbedtls_snprintf( buf, buflen, "SHA256 - SHA-256 input data was malformed" );
#endif /* MBEDTLS_SHA256_C */
#if defined(MBEDTLS_SHA512_C)
if( use_ret == -(MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED) )
mbedtls_snprintf( buf, buflen, "SHA512 - SHA-512 hardware accelerator failed" );
+ if( use_ret == -(MBEDTLS_ERR_SHA512_BAD_INPUT_DATA) )
+ mbedtls_snprintf( buf, buflen, "SHA512 - SHA-512 input data was malformed" );
#endif /* MBEDTLS_SHA512_C */
#if defined(MBEDTLS_THREADING_C)
diff --git a/thirdparty/mbedtls/library/gcm.c b/thirdparty/mbedtls/library/gcm.c
index 57b027933d..675926a518 100644
--- a/thirdparty/mbedtls/library/gcm.c
+++ b/thirdparty/mbedtls/library/gcm.c
@@ -48,9 +48,8 @@
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C)
#include "mbedtls/aes.h"
-#if defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h"
-#else
+#if !defined(MBEDTLS_PLATFORM_C)
#include <stdio.h>
#define mbedtls_printf printf
#endif /* MBEDTLS_PLATFORM_C */
@@ -58,6 +57,12 @@
#if !defined(MBEDTLS_GCM_ALT)
+/* Parameter validation macros */
+#define GCM_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_GCM_BAD_INPUT )
+#define GCM_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* 32-bit integer manipulation macros (big endian)
*/
@@ -86,6 +91,7 @@
*/
void mbedtls_gcm_init( mbedtls_gcm_context *ctx )
{
+ GCM_VALIDATE( ctx != NULL );
memset( ctx, 0, sizeof( mbedtls_gcm_context ) );
}
@@ -165,6 +171,10 @@ int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx,
int ret;
const mbedtls_cipher_info_t *cipher_info;
+ GCM_VALIDATE_RET( ctx != NULL );
+ GCM_VALIDATE_RET( key != NULL );
+ GCM_VALIDATE_RET( keybits == 128 || keybits == 192 || keybits == 256 );
+
cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, MBEDTLS_MODE_ECB );
if( cipher_info == NULL )
return( MBEDTLS_ERR_GCM_BAD_INPUT );
@@ -275,6 +285,10 @@ int mbedtls_gcm_starts( mbedtls_gcm_context *ctx,
const unsigned char *p;
size_t use_len, olen = 0;
+ GCM_VALIDATE_RET( ctx != NULL );
+ GCM_VALIDATE_RET( iv != NULL );
+ GCM_VALIDATE_RET( add_len == 0 || add != NULL );
+
/* IV and AD are limited to 2^64 bits, so 2^61 bytes */
/* IV is not allowed to be zero length */
if( iv_len == 0 ||
@@ -357,6 +371,10 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
unsigned char *out_p = output;
size_t use_len, olen = 0;
+ GCM_VALIDATE_RET( ctx != NULL );
+ GCM_VALIDATE_RET( length == 0 || input != NULL );
+ GCM_VALIDATE_RET( length == 0 || output != NULL );
+
if( output > input && (size_t) ( output - input ) < length )
return( MBEDTLS_ERR_GCM_BAD_INPUT );
@@ -410,8 +428,14 @@ int mbedtls_gcm_finish( mbedtls_gcm_context *ctx,
{
unsigned char work_buf[16];
size_t i;
- uint64_t orig_len = ctx->len * 8;
- uint64_t orig_add_len = ctx->add_len * 8;
+ uint64_t orig_len;
+ uint64_t orig_add_len;
+
+ GCM_VALIDATE_RET( ctx != NULL );
+ GCM_VALIDATE_RET( tag != NULL );
+
+ orig_len = ctx->len * 8;
+ orig_add_len = ctx->add_len * 8;
if( tag_len > 16 || tag_len < 4 )
return( MBEDTLS_ERR_GCM_BAD_INPUT );
@@ -453,6 +477,13 @@ int mbedtls_gcm_crypt_and_tag( mbedtls_gcm_context *ctx,
{
int ret;
+ GCM_VALIDATE_RET( ctx != NULL );
+ GCM_VALIDATE_RET( iv != NULL );
+ GCM_VALIDATE_RET( add_len == 0 || add != NULL );
+ GCM_VALIDATE_RET( length == 0 || input != NULL );
+ GCM_VALIDATE_RET( length == 0 || output != NULL );
+ GCM_VALIDATE_RET( tag != NULL );
+
if( ( ret = mbedtls_gcm_starts( ctx, mode, iv, iv_len, add, add_len ) ) != 0 )
return( ret );
@@ -481,6 +512,13 @@ int mbedtls_gcm_auth_decrypt( mbedtls_gcm_context *ctx,
size_t i;
int diff;
+ GCM_VALIDATE_RET( ctx != NULL );
+ GCM_VALIDATE_RET( iv != NULL );
+ GCM_VALIDATE_RET( add_len == 0 || add != NULL );
+ GCM_VALIDATE_RET( tag != NULL );
+ GCM_VALIDATE_RET( length == 0 || input != NULL );
+ GCM_VALIDATE_RET( length == 0 || output != NULL );
+
if( ( ret = mbedtls_gcm_crypt_and_tag( ctx, MBEDTLS_GCM_DECRYPT, length,
iv, iv_len, add, add_len,
input, output, tag_len, check_tag ) ) != 0 )
@@ -503,6 +541,8 @@ int mbedtls_gcm_auth_decrypt( mbedtls_gcm_context *ctx,
void mbedtls_gcm_free( mbedtls_gcm_context *ctx )
{
+ if( ctx == NULL )
+ return;
mbedtls_cipher_free( &ctx->cipher_ctx );
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_gcm_context ) );
}
@@ -764,7 +804,7 @@ int mbedtls_gcm_self_test( int verbose )
* there is an alternative underlying implementation i.e. when
* MBEDTLS_AES_ALT is defined.
*/
- if( ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && key_len == 192 )
+ if( ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && key_len == 192 )
{
mbedtls_printf( "skipped\n" );
break;
diff --git a/thirdparty/mbedtls/library/hmac_drbg.c b/thirdparty/mbedtls/library/hmac_drbg.c
index dad55ff861..c50330e7d8 100644
--- a/thirdparty/mbedtls/library/hmac_drbg.c
+++ b/thirdparty/mbedtls/library/hmac_drbg.c
@@ -66,31 +66,60 @@ void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx )
/*
* HMAC_DRBG update, using optional additional data (10.1.2.2)
*/
-void mbedtls_hmac_drbg_update( mbedtls_hmac_drbg_context *ctx,
- const unsigned char *additional, size_t add_len )
+int mbedtls_hmac_drbg_update_ret( mbedtls_hmac_drbg_context *ctx,
+ const unsigned char *additional,
+ size_t add_len )
{
size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info );
unsigned char rounds = ( additional != NULL && add_len != 0 ) ? 2 : 1;
unsigned char sep[1];
unsigned char K[MBEDTLS_MD_MAX_SIZE];
+ int ret;
for( sep[0] = 0; sep[0] < rounds; sep[0]++ )
{
/* Step 1 or 4 */
- mbedtls_md_hmac_reset( &ctx->md_ctx );
- mbedtls_md_hmac_update( &ctx->md_ctx, ctx->V, md_len );
- mbedtls_md_hmac_update( &ctx->md_ctx, sep, 1 );
+ if( ( ret = mbedtls_md_hmac_reset( &ctx->md_ctx ) ) != 0 )
+ goto exit;
+ if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx,
+ ctx->V, md_len ) ) != 0 )
+ goto exit;
+ if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx,
+ sep, 1 ) ) != 0 )
+ goto exit;
if( rounds == 2 )
- mbedtls_md_hmac_update( &ctx->md_ctx, additional, add_len );
- mbedtls_md_hmac_finish( &ctx->md_ctx, K );
+ {
+ if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx,
+ additional, add_len ) ) != 0 )
+ goto exit;
+ }
+ if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, K ) ) != 0 )
+ goto exit;
/* Step 2 or 5 */
- mbedtls_md_hmac_starts( &ctx->md_ctx, K, md_len );
- mbedtls_md_hmac_update( &ctx->md_ctx, ctx->V, md_len );
- mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V );
+ if( ( ret = mbedtls_md_hmac_starts( &ctx->md_ctx, K, md_len ) ) != 0 )
+ goto exit;
+ if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx,
+ ctx->V, md_len ) ) != 0 )
+ goto exit;
+ if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V ) ) != 0 )
+ goto exit;
}
+
+exit:
+ mbedtls_platform_zeroize( K, sizeof( K ) );
+ return( ret );
}
+#if !defined(MBEDTLS_DEPRECATED_REMOVED)
+void mbedtls_hmac_drbg_update( mbedtls_hmac_drbg_context *ctx,
+ const unsigned char *additional,
+ size_t add_len )
+{
+ (void) mbedtls_hmac_drbg_update_ret( ctx, additional, add_len );
+}
+#endif /* MBEDTLS_DEPRECATED_REMOVED */
+
/*
* Simplified HMAC_DRBG initialisation (for use with deterministic ECDSA)
*/
@@ -108,10 +137,13 @@ int mbedtls_hmac_drbg_seed_buf( mbedtls_hmac_drbg_context *ctx,
* Use the V memory location, which is currently all 0, to initialize the
* MD context with an all-zero key. Then set V to its initial value.
*/
- mbedtls_md_hmac_starts( &ctx->md_ctx, ctx->V, mbedtls_md_get_size( md_info ) );
+ if( ( ret = mbedtls_md_hmac_starts( &ctx->md_ctx, ctx->V,
+ mbedtls_md_get_size( md_info ) ) ) != 0 )
+ return( ret );
memset( ctx->V, 0x01, mbedtls_md_get_size( md_info ) );
- mbedtls_hmac_drbg_update( ctx, data, data_len );
+ if( ( ret = mbedtls_hmac_drbg_update_ret( ctx, data, data_len ) ) != 0 )
+ return( ret );
return( 0 );
}
@@ -124,6 +156,7 @@ int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx,
{
unsigned char seed[MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT];
size_t seedlen;
+ int ret;
/* III. Check input length */
if( len > MBEDTLS_HMAC_DRBG_MAX_INPUT ||
@@ -135,7 +168,8 @@ int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx,
memset( seed, 0, MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT );
/* IV. Gather entropy_len bytes of entropy for the seed */
- if( ctx->f_entropy( ctx->p_entropy, seed, ctx->entropy_len ) != 0 )
+ if( ( ret = ctx->f_entropy( ctx->p_entropy,
+ seed, ctx->entropy_len ) ) != 0 )
return( MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED );
seedlen = ctx->entropy_len;
@@ -148,13 +182,16 @@ int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx,
}
/* 2. Update state */
- mbedtls_hmac_drbg_update( ctx, seed, seedlen );
+ if( ( ret = mbedtls_hmac_drbg_update_ret( ctx, seed, seedlen ) ) != 0 )
+ goto exit;
/* 3. Reset reseed_counter */
ctx->reseed_counter = 1;
+exit:
/* 4. Done */
- return( 0 );
+ mbedtls_platform_zeroize( seed, seedlen );
+ return( ret );
}
/*
@@ -180,7 +217,8 @@ int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx,
* Use the V memory location, which is currently all 0, to initialize the
* MD context with an all-zero key. Then set V to its initial value.
*/
- mbedtls_md_hmac_starts( &ctx->md_ctx, ctx->V, md_size );
+ if( ( ret = mbedtls_md_hmac_starts( &ctx->md_ctx, ctx->V, md_size ) ) != 0 )
+ return( ret );
memset( ctx->V, 0x01, md_size );
ctx->f_entropy = f_entropy;
@@ -273,16 +311,24 @@ int mbedtls_hmac_drbg_random_with_add( void *p_rng,
/* 2. Use additional data if any */
if( additional != NULL && add_len != 0 )
- mbedtls_hmac_drbg_update( ctx, additional, add_len );
+ {
+ if( ( ret = mbedtls_hmac_drbg_update_ret( ctx,
+ additional, add_len ) ) != 0 )
+ goto exit;
+ }
/* 3, 4, 5. Generate bytes */
while( left != 0 )
{
size_t use_len = left > md_len ? md_len : left;
- mbedtls_md_hmac_reset( &ctx->md_ctx );
- mbedtls_md_hmac_update( &ctx->md_ctx, ctx->V, md_len );
- mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V );
+ if( ( ret = mbedtls_md_hmac_reset( &ctx->md_ctx ) ) != 0 )
+ goto exit;
+ if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx,
+ ctx->V, md_len ) ) != 0 )
+ goto exit;
+ if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V ) ) != 0 )
+ goto exit;
memcpy( out, ctx->V, use_len );
out += use_len;
@@ -290,13 +336,16 @@ int mbedtls_hmac_drbg_random_with_add( void *p_rng,
}
/* 6. Update */
- mbedtls_hmac_drbg_update( ctx, additional, add_len );
+ if( ( ret = mbedtls_hmac_drbg_update_ret( ctx,
+ additional, add_len ) ) != 0 )
+ goto exit;
/* 7. Update reseed counter */
ctx->reseed_counter++;
+exit:
/* 8. Done */
- return( 0 );
+ return( ret );
}
/*
@@ -368,35 +417,36 @@ exit:
int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const char *path )
{
int ret = 0;
- FILE *f;
+ FILE *f = NULL;
size_t n;
unsigned char buf[ MBEDTLS_HMAC_DRBG_MAX_INPUT ];
+ unsigned char c;
if( ( f = fopen( path, "rb" ) ) == NULL )
return( MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR );
- fseek( f, 0, SEEK_END );
- n = (size_t) ftell( f );
- fseek( f, 0, SEEK_SET );
-
- if( n > MBEDTLS_HMAC_DRBG_MAX_INPUT )
+ n = fread( buf, 1, sizeof( buf ), f );
+ if( fread( &c, 1, 1, f ) != 0 )
{
- fclose( f );
- return( MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG );
+ ret = MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG;
+ goto exit;
}
-
- if( fread( buf, 1, n, f ) != n )
+ if( n == 0 || ferror( f ) )
+ {
ret = MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR;
- else
- mbedtls_hmac_drbg_update( ctx, buf, n );
-
+ goto exit;
+ }
fclose( f );
+ f = NULL;
- mbedtls_platform_zeroize( buf, sizeof( buf ) );
+ ret = mbedtls_hmac_drbg_update_ret( ctx, buf, n );
+exit:
+ mbedtls_platform_zeroize( buf, sizeof( buf ) );
+ if( f != NULL )
+ fclose( f );
if( ret != 0 )
return( ret );
-
return( mbedtls_hmac_drbg_write_seed_file( ctx, path ) );
}
#endif /* MBEDTLS_FS_IO */
diff --git a/thirdparty/mbedtls/library/nist_kw.c b/thirdparty/mbedtls/library/nist_kw.c
index 176af9fe08..317a2426ae 100644
--- a/thirdparty/mbedtls/library/nist_kw.c
+++ b/thirdparty/mbedtls/library/nist_kw.c
@@ -311,7 +311,7 @@ cleanup:
}
mbedtls_platform_zeroize( inbuff, KW_SEMIBLOCK_LENGTH * 2 );
mbedtls_platform_zeroize( outbuff, KW_SEMIBLOCK_LENGTH * 2 );
- mbedtls_cipher_finish( &ctx->cipher_ctx, NULL, &olen );
+
return( ret );
}
@@ -528,7 +528,7 @@ cleanup:
mbedtls_platform_zeroize( &bad_padding, sizeof( bad_padding) );
mbedtls_platform_zeroize( &diff, sizeof( diff ) );
mbedtls_platform_zeroize( A, sizeof( A ) );
- mbedtls_cipher_finish( &ctx->cipher_ctx, NULL, &olen );
+
return( ret );
}
diff --git a/thirdparty/mbedtls/library/pem.c b/thirdparty/mbedtls/library/pem.c
index 6069a23dec..897c8a0d6f 100644
--- a/thirdparty/mbedtls/library/pem.c
+++ b/thirdparty/mbedtls/library/pem.c
@@ -423,9 +423,11 @@ int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const
void mbedtls_pem_free( mbedtls_pem_context *ctx )
{
- if( ctx->buf != NULL )
+ if ( ctx->buf != NULL )
+ {
mbedtls_platform_zeroize( ctx->buf, ctx->buflen );
- mbedtls_free( ctx->buf );
+ mbedtls_free( ctx->buf );
+ }
mbedtls_free( ctx->info );
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_pem_context ) );
diff --git a/thirdparty/mbedtls/library/pk.c b/thirdparty/mbedtls/library/pk.c
index f05b139e3f..bac685dc19 100644
--- a/thirdparty/mbedtls/library/pk.c
+++ b/thirdparty/mbedtls/library/pk.c
@@ -44,13 +44,18 @@
#include <limits.h>
#include <stdint.h>
+/* Parameter validation macros based on platform_util.h */
+#define PK_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_PK_BAD_INPUT_DATA )
+#define PK_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
/*
* Initialise a mbedtls_pk_context
*/
void mbedtls_pk_init( mbedtls_pk_context *ctx )
{
- if( ctx == NULL )
- return;
+ PK_VALIDATE( ctx != NULL );
ctx->pk_info = NULL;
ctx->pk_ctx = NULL;
@@ -61,14 +66,44 @@ void mbedtls_pk_init( mbedtls_pk_context *ctx )
*/
void mbedtls_pk_free( mbedtls_pk_context *ctx )
{
- if( ctx == NULL || ctx->pk_info == NULL )
+ if( ctx == NULL )
return;
- ctx->pk_info->ctx_free_func( ctx->pk_ctx );
+ if ( ctx->pk_info != NULL )
+ ctx->pk_info->ctx_free_func( ctx->pk_ctx );
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_pk_context ) );
}
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+/*
+ * Initialize a restart context
+ */
+void mbedtls_pk_restart_init( mbedtls_pk_restart_ctx *ctx )
+{
+ PK_VALIDATE( ctx != NULL );
+ ctx->pk_info = NULL;
+ ctx->rs_ctx = NULL;
+}
+
+/*
+ * Free the components of a restart context
+ */
+void mbedtls_pk_restart_free( mbedtls_pk_restart_ctx *ctx )
+{
+ if( ctx == NULL || ctx->pk_info == NULL ||
+ ctx->pk_info->rs_free_func == NULL )
+ {
+ return;
+ }
+
+ ctx->pk_info->rs_free_func( ctx->rs_ctx );
+
+ ctx->pk_info = NULL;
+ ctx->rs_ctx = NULL;
+}
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
/*
* Get pk_info structure from type
*/
@@ -100,7 +135,8 @@ const mbedtls_pk_info_t * mbedtls_pk_info_from_type( mbedtls_pk_type_t pk_type )
*/
int mbedtls_pk_setup( mbedtls_pk_context *ctx, const mbedtls_pk_info_t *info )
{
- if( ctx == NULL || info == NULL || ctx->pk_info != NULL )
+ PK_VALIDATE_RET( ctx != NULL );
+ if( info == NULL || ctx->pk_info != NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
if( ( ctx->pk_ctx = info->ctx_alloc_func() ) == NULL )
@@ -123,7 +159,8 @@ int mbedtls_pk_setup_rsa_alt( mbedtls_pk_context *ctx, void * key,
mbedtls_rsa_alt_context *rsa_alt;
const mbedtls_pk_info_t *info = &mbedtls_rsa_alt_info;
- if( ctx == NULL || ctx->pk_info != NULL )
+ PK_VALIDATE_RET( ctx != NULL );
+ if( ctx->pk_info != NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
if( ( ctx->pk_ctx = info->ctx_alloc_func() ) == NULL )
@@ -147,7 +184,9 @@ int mbedtls_pk_setup_rsa_alt( mbedtls_pk_context *ctx, void * key,
*/
int mbedtls_pk_can_do( const mbedtls_pk_context *ctx, mbedtls_pk_type_t type )
{
- /* null or NONE context can't do anything */
+ /* A context with null pk_info is not set up yet and can't do anything.
+ * For backward compatibility, also accept NULL instead of a context
+ * pointer. */
if( ctx == NULL || ctx->pk_info == NULL )
return( 0 );
@@ -171,17 +210,71 @@ static inline int pk_hashlen_helper( mbedtls_md_type_t md_alg, size_t *hash_len
return( 0 );
}
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
/*
- * Verify a signature
+ * Helper to set up a restart context if needed
*/
-int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
+static int pk_restart_setup( mbedtls_pk_restart_ctx *ctx,
+ const mbedtls_pk_info_t *info )
+{
+ /* Don't do anything if already set up or invalid */
+ if( ctx == NULL || ctx->pk_info != NULL )
+ return( 0 );
+
+ /* Should never happen when we're called */
+ if( info->rs_alloc_func == NULL || info->rs_free_func == NULL )
+ return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
+
+ if( ( ctx->rs_ctx = info->rs_alloc_func() ) == NULL )
+ return( MBEDTLS_ERR_PK_ALLOC_FAILED );
+
+ ctx->pk_info = info;
+
+ return( 0 );
+}
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
+/*
+ * Verify a signature (restartable)
+ */
+int mbedtls_pk_verify_restartable( mbedtls_pk_context *ctx,
+ mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hash_len,
- const unsigned char *sig, size_t sig_len )
+ const unsigned char *sig, size_t sig_len,
+ mbedtls_pk_restart_ctx *rs_ctx )
{
- if( ctx == NULL || ctx->pk_info == NULL ||
+ PK_VALIDATE_RET( ctx != NULL );
+ PK_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE && hash_len == 0 ) ||
+ hash != NULL );
+ PK_VALIDATE_RET( sig != NULL );
+
+ if( ctx->pk_info == NULL ||
pk_hashlen_helper( md_alg, &hash_len ) != 0 )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ /* optimization: use non-restartable version if restart disabled */
+ if( rs_ctx != NULL &&
+ mbedtls_ecp_restart_is_enabled() &&
+ ctx->pk_info->verify_rs_func != NULL )
+ {
+ int ret;
+
+ if( ( ret = pk_restart_setup( rs_ctx, ctx->pk_info ) ) != 0 )
+ return( ret );
+
+ ret = ctx->pk_info->verify_rs_func( ctx->pk_ctx,
+ md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx );
+
+ if( ret != MBEDTLS_ERR_ECP_IN_PROGRESS )
+ mbedtls_pk_restart_free( rs_ctx );
+
+ return( ret );
+ }
+#else /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+ (void) rs_ctx;
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
if( ctx->pk_info->verify_func == NULL )
return( MBEDTLS_ERR_PK_TYPE_MISMATCH );
@@ -190,6 +283,17 @@ int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
}
/*
+ * Verify a signature
+ */
+int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ const unsigned char *sig, size_t sig_len )
+{
+ return( mbedtls_pk_verify_restartable( ctx, md_alg, hash, hash_len,
+ sig, sig_len, NULL ) );
+}
+
+/*
* Verify a signature with options
*/
int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options,
@@ -197,7 +301,12 @@ int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options,
const unsigned char *hash, size_t hash_len,
const unsigned char *sig, size_t sig_len )
{
- if( ctx == NULL || ctx->pk_info == NULL )
+ PK_VALIDATE_RET( ctx != NULL );
+ PK_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE && hash_len == 0 ) ||
+ hash != NULL );
+ PK_VALIDATE_RET( sig != NULL );
+
+ if( ctx->pk_info == NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
if( ! mbedtls_pk_can_do( ctx, type ) )
@@ -248,17 +357,47 @@ int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options,
}
/*
- * Make a signature
+ * Make a signature (restartable)
*/
-int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
+int mbedtls_pk_sign_restartable( mbedtls_pk_context *ctx,
+ mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hash_len,
unsigned char *sig, size_t *sig_len,
- int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ mbedtls_pk_restart_ctx *rs_ctx )
{
- if( ctx == NULL || ctx->pk_info == NULL ||
+ PK_VALIDATE_RET( ctx != NULL );
+ PK_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE && hash_len == 0 ) ||
+ hash != NULL );
+ PK_VALIDATE_RET( sig != NULL );
+
+ if( ctx->pk_info == NULL ||
pk_hashlen_helper( md_alg, &hash_len ) != 0 )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ /* optimization: use non-restartable version if restart disabled */
+ if( rs_ctx != NULL &&
+ mbedtls_ecp_restart_is_enabled() &&
+ ctx->pk_info->sign_rs_func != NULL )
+ {
+ int ret;
+
+ if( ( ret = pk_restart_setup( rs_ctx, ctx->pk_info ) ) != 0 )
+ return( ret );
+
+ ret = ctx->pk_info->sign_rs_func( ctx->pk_ctx, md_alg,
+ hash, hash_len, sig, sig_len, f_rng, p_rng, rs_ctx->rs_ctx );
+
+ if( ret != MBEDTLS_ERR_ECP_IN_PROGRESS )
+ mbedtls_pk_restart_free( rs_ctx );
+
+ return( ret );
+ }
+#else /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+ (void) rs_ctx;
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
if( ctx->pk_info->sign_func == NULL )
return( MBEDTLS_ERR_PK_TYPE_MISMATCH );
@@ -267,6 +406,18 @@ int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
}
/*
+ * Make a signature
+ */
+int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ unsigned char *sig, size_t *sig_len,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
+{
+ return( mbedtls_pk_sign_restartable( ctx, md_alg, hash, hash_len,
+ sig, sig_len, f_rng, p_rng, NULL ) );
+}
+
+/*
* Decrypt message
*/
int mbedtls_pk_decrypt( mbedtls_pk_context *ctx,
@@ -274,7 +425,12 @@ int mbedtls_pk_decrypt( mbedtls_pk_context *ctx,
unsigned char *output, size_t *olen, size_t osize,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
- if( ctx == NULL || ctx->pk_info == NULL )
+ PK_VALIDATE_RET( ctx != NULL );
+ PK_VALIDATE_RET( input != NULL || ilen == 0 );
+ PK_VALIDATE_RET( output != NULL || osize == 0 );
+ PK_VALIDATE_RET( olen != NULL );
+
+ if( ctx->pk_info == NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
if( ctx->pk_info->decrypt_func == NULL )
@@ -292,7 +448,12 @@ int mbedtls_pk_encrypt( mbedtls_pk_context *ctx,
unsigned char *output, size_t *olen, size_t osize,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
- if( ctx == NULL || ctx->pk_info == NULL )
+ PK_VALIDATE_RET( ctx != NULL );
+ PK_VALIDATE_RET( input != NULL || ilen == 0 );
+ PK_VALIDATE_RET( output != NULL || osize == 0 );
+ PK_VALIDATE_RET( olen != NULL );
+
+ if( ctx->pk_info == NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
if( ctx->pk_info->encrypt_func == NULL )
@@ -307,8 +468,11 @@ int mbedtls_pk_encrypt( mbedtls_pk_context *ctx,
*/
int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_context *prv )
{
- if( pub == NULL || pub->pk_info == NULL ||
- prv == NULL || prv->pk_info == NULL ||
+ PK_VALIDATE_RET( pub != NULL );
+ PK_VALIDATE_RET( prv != NULL );
+
+ if( pub->pk_info == NULL ||
+ prv->pk_info == NULL ||
prv->pk_info->check_pair_func == NULL )
{
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
@@ -333,6 +497,8 @@ int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_conte
*/
size_t mbedtls_pk_get_bitlen( const mbedtls_pk_context *ctx )
{
+ /* For backward compatibility, accept NULL or a context that
+ * isn't set up yet, and return a fake value that should be safe. */
if( ctx == NULL || ctx->pk_info == NULL )
return( 0 );
@@ -344,7 +510,8 @@ size_t mbedtls_pk_get_bitlen( const mbedtls_pk_context *ctx )
*/
int mbedtls_pk_debug( const mbedtls_pk_context *ctx, mbedtls_pk_debug_item *items )
{
- if( ctx == NULL || ctx->pk_info == NULL )
+ PK_VALIDATE_RET( ctx != NULL );
+ if( ctx->pk_info == NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
if( ctx->pk_info->debug_func == NULL )
diff --git a/thirdparty/mbedtls/library/pk_wrap.c b/thirdparty/mbedtls/library/pk_wrap.c
index 2c7d2d79b8..87806be337 100644
--- a/thirdparty/mbedtls/library/pk_wrap.c
+++ b/thirdparty/mbedtls/library/pk_wrap.c
@@ -190,11 +190,19 @@ const mbedtls_pk_info_t mbedtls_rsa_info = {
rsa_can_do,
rsa_verify_wrap,
rsa_sign_wrap,
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ NULL,
+ NULL,
+#endif
rsa_decrypt_wrap,
rsa_encrypt_wrap,
rsa_check_pair_wrap,
rsa_alloc_wrap,
rsa_free_wrap,
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ NULL,
+ NULL,
+#endif
rsa_debug,
};
#endif /* MBEDTLS_RSA_C */
@@ -262,6 +270,110 @@ static int eckey_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
return( ret );
}
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+/* Forward declarations */
+static int ecdsa_verify_rs_wrap( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ const unsigned char *sig, size_t sig_len,
+ void *rs_ctx );
+
+static int ecdsa_sign_rs_wrap( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ unsigned char *sig, size_t *sig_len,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ void *rs_ctx );
+
+/*
+ * Restart context for ECDSA operations with ECKEY context
+ *
+ * We need to store an actual ECDSA context, as we need to pass the same to
+ * the underlying ecdsa function, so we can't create it on the fly every time.
+ */
+typedef struct
+{
+ mbedtls_ecdsa_restart_ctx ecdsa_rs;
+ mbedtls_ecdsa_context ecdsa_ctx;
+} eckey_restart_ctx;
+
+static void *eckey_rs_alloc( void )
+{
+ eckey_restart_ctx *rs_ctx;
+
+ void *ctx = mbedtls_calloc( 1, sizeof( eckey_restart_ctx ) );
+
+ if( ctx != NULL )
+ {
+ rs_ctx = ctx;
+ mbedtls_ecdsa_restart_init( &rs_ctx->ecdsa_rs );
+ mbedtls_ecdsa_init( &rs_ctx->ecdsa_ctx );
+ }
+
+ return( ctx );
+}
+
+static void eckey_rs_free( void *ctx )
+{
+ eckey_restart_ctx *rs_ctx;
+
+ if( ctx == NULL)
+ return;
+
+ rs_ctx = ctx;
+ mbedtls_ecdsa_restart_free( &rs_ctx->ecdsa_rs );
+ mbedtls_ecdsa_free( &rs_ctx->ecdsa_ctx );
+
+ mbedtls_free( ctx );
+}
+
+static int eckey_verify_rs_wrap( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ const unsigned char *sig, size_t sig_len,
+ void *rs_ctx )
+{
+ int ret;
+ eckey_restart_ctx *rs = rs_ctx;
+
+ /* Should never happen */
+ if( rs == NULL )
+ return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
+
+ /* set up our own sub-context if needed (that is, on first run) */
+ if( rs->ecdsa_ctx.grp.pbits == 0 )
+ MBEDTLS_MPI_CHK( mbedtls_ecdsa_from_keypair( &rs->ecdsa_ctx, ctx ) );
+
+ MBEDTLS_MPI_CHK( ecdsa_verify_rs_wrap( &rs->ecdsa_ctx,
+ md_alg, hash, hash_len,
+ sig, sig_len, &rs->ecdsa_rs ) );
+
+cleanup:
+ return( ret );
+}
+
+static int eckey_sign_rs_wrap( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ unsigned char *sig, size_t *sig_len,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ void *rs_ctx )
+{
+ int ret;
+ eckey_restart_ctx *rs = rs_ctx;
+
+ /* Should never happen */
+ if( rs == NULL )
+ return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
+
+ /* set up our own sub-context if needed (that is, on first run) */
+ if( rs->ecdsa_ctx.grp.pbits == 0 )
+ MBEDTLS_MPI_CHK( mbedtls_ecdsa_from_keypair( &rs->ecdsa_ctx, ctx ) );
+
+ MBEDTLS_MPI_CHK( ecdsa_sign_rs_wrap( &rs->ecdsa_ctx, md_alg,
+ hash, hash_len, sig, sig_len,
+ f_rng, p_rng, &rs->ecdsa_rs ) );
+
+cleanup:
+ return( ret );
+}
+#endif /* MBEDTLS_ECP_RESTARTABLE */
#endif /* MBEDTLS_ECDSA_C */
static int eckey_check_pair( const void *pub, const void *prv )
@@ -301,15 +413,23 @@ const mbedtls_pk_info_t mbedtls_eckey_info = {
#if defined(MBEDTLS_ECDSA_C)
eckey_verify_wrap,
eckey_sign_wrap,
-#else
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ eckey_verify_rs_wrap,
+ eckey_sign_rs_wrap,
+#endif
+#else /* MBEDTLS_ECDSA_C */
NULL,
NULL,
-#endif
+#endif /* MBEDTLS_ECDSA_C */
NULL,
NULL,
eckey_check_pair,
eckey_alloc_wrap,
eckey_free_wrap,
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ eckey_rs_alloc,
+ eckey_rs_free,
+#endif
eckey_debug,
};
@@ -329,11 +449,19 @@ const mbedtls_pk_info_t mbedtls_eckeydh_info = {
eckeydh_can_do,
NULL,
NULL,
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ NULL,
+ NULL,
+#endif
NULL,
NULL,
eckey_check_pair,
eckey_alloc_wrap, /* Same underlying key structure */
eckey_free_wrap, /* Same underlying key structure */
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ NULL,
+ NULL,
+#endif
eckey_debug, /* Same underlying key structure */
};
#endif /* MBEDTLS_ECP_C */
@@ -369,6 +497,40 @@ static int ecdsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
md_alg, hash, hash_len, sig, sig_len, f_rng, p_rng ) );
}
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+static int ecdsa_verify_rs_wrap( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ const unsigned char *sig, size_t sig_len,
+ void *rs_ctx )
+{
+ int ret;
+ ((void) md_alg);
+
+ ret = mbedtls_ecdsa_read_signature_restartable(
+ (mbedtls_ecdsa_context *) ctx,
+ hash, hash_len, sig, sig_len,
+ (mbedtls_ecdsa_restart_ctx *) rs_ctx );
+
+ if( ret == MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH )
+ return( MBEDTLS_ERR_PK_SIG_LEN_MISMATCH );
+
+ return( ret );
+}
+
+static int ecdsa_sign_rs_wrap( void *ctx, mbedtls_md_type_t md_alg,
+ const unsigned char *hash, size_t hash_len,
+ unsigned char *sig, size_t *sig_len,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
+ void *rs_ctx )
+{
+ return( mbedtls_ecdsa_write_signature_restartable(
+ (mbedtls_ecdsa_context *) ctx,
+ md_alg, hash, hash_len, sig, sig_len, f_rng, p_rng,
+ (mbedtls_ecdsa_restart_ctx *) rs_ctx ) );
+
+}
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
static void *ecdsa_alloc_wrap( void )
{
void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ecdsa_context ) );
@@ -385,6 +547,24 @@ static void ecdsa_free_wrap( void *ctx )
mbedtls_free( ctx );
}
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+static void *ecdsa_rs_alloc( void )
+{
+ void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ecdsa_restart_ctx ) );
+
+ if( ctx != NULL )
+ mbedtls_ecdsa_restart_init( ctx );
+
+ return( ctx );
+}
+
+static void ecdsa_rs_free( void *ctx )
+{
+ mbedtls_ecdsa_restart_free( ctx );
+ mbedtls_free( ctx );
+}
+#endif /* MBEDTLS_ECP_RESTARTABLE */
+
const mbedtls_pk_info_t mbedtls_ecdsa_info = {
MBEDTLS_PK_ECDSA,
"ECDSA",
@@ -392,11 +572,19 @@ const mbedtls_pk_info_t mbedtls_ecdsa_info = {
ecdsa_can_do,
ecdsa_verify_wrap,
ecdsa_sign_wrap,
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ ecdsa_verify_rs_wrap,
+ ecdsa_sign_rs_wrap,
+#endif
NULL,
NULL,
eckey_check_pair, /* Compatible key structures */
ecdsa_alloc_wrap,
ecdsa_free_wrap,
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ ecdsa_rs_alloc,
+ ecdsa_rs_free,
+#endif
eckey_debug, /* Compatible key structures */
};
#endif /* MBEDTLS_ECDSA_C */
@@ -506,6 +694,10 @@ const mbedtls_pk_info_t mbedtls_rsa_alt_info = {
rsa_alt_can_do,
NULL,
rsa_alt_sign_wrap,
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ NULL,
+ NULL,
+#endif
rsa_alt_decrypt_wrap,
NULL,
#if defined(MBEDTLS_RSA_C)
@@ -515,6 +707,10 @@ const mbedtls_pk_info_t mbedtls_rsa_alt_info = {
#endif
rsa_alt_alloc_wrap,
rsa_alt_free_wrap,
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ NULL,
+ NULL,
+#endif
NULL,
};
diff --git a/thirdparty/mbedtls/library/pkcs12.c b/thirdparty/mbedtls/library/pkcs12.c
index 16a15cb63e..7edf064c13 100644
--- a/thirdparty/mbedtls/library/pkcs12.c
+++ b/thirdparty/mbedtls/library/pkcs12.c
@@ -48,6 +48,8 @@
#include "mbedtls/des.h"
#endif
+#if defined(MBEDTLS_ASN1_PARSE_C)
+
static int pkcs12_parse_pbe_params( mbedtls_asn1_buf *params,
mbedtls_asn1_buf *salt, int *iterations )
{
@@ -226,6 +228,8 @@ exit:
return( ret );
}
+#endif /* MBEDTLS_ASN1_PARSE_C */
+
static void pkcs12_fill_buffer( unsigned char *data, size_t data_len,
const unsigned char *filler, size_t fill_len )
{
diff --git a/thirdparty/mbedtls/library/pkcs5.c b/thirdparty/mbedtls/library/pkcs5.c
index f04f0ab25e..50133435ce 100644
--- a/thirdparty/mbedtls/library/pkcs5.c
+++ b/thirdparty/mbedtls/library/pkcs5.c
@@ -54,22 +54,7 @@
#define mbedtls_printf printf
#endif
-#if !defined(MBEDTLS_ASN1_PARSE_C)
-int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
- const unsigned char *pwd, size_t pwdlen,
- const unsigned char *data, size_t datalen,
- unsigned char *output )
-{
- ((void) pbe_params);
- ((void) mode);
- ((void) pwd);
- ((void) pwdlen);
- ((void) data);
- ((void) datalen);
- ((void) output);
- return( MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE );
-}
-#else
+#if defined(MBEDTLS_ASN1_PARSE_C)
static int pkcs5_parse_pbkdf2_params( const mbedtls_asn1_buf *params,
mbedtls_asn1_buf *salt, int *iterations,
int *keylen, mbedtls_md_type_t *md_type )
diff --git a/thirdparty/mbedtls/library/pkparse.c b/thirdparty/mbedtls/library/pkparse.c
index d6ac987e23..ae210bca6a 100644
--- a/thirdparty/mbedtls/library/pkparse.c
+++ b/thirdparty/mbedtls/library/pkparse.c
@@ -61,6 +61,12 @@
#define mbedtls_free free
#endif
+/* Parameter validation macros based on platform_util.h */
+#define PK_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_PK_BAD_INPUT_DATA )
+#define PK_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if defined(MBEDTLS_FS_IO)
/*
* Load all data from a file into a given buffer.
@@ -74,6 +80,10 @@ int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n )
FILE *f;
long size;
+ PK_VALIDATE_RET( path != NULL );
+ PK_VALIDATE_RET( buf != NULL );
+ PK_VALIDATE_RET( n != NULL );
+
if( ( f = fopen( path, "rb" ) ) == NULL )
return( MBEDTLS_ERR_PK_FILE_IO_ERROR );
@@ -124,6 +134,9 @@ int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx,
size_t n;
unsigned char *buf;
+ PK_VALIDATE_RET( ctx != NULL );
+ PK_VALIDATE_RET( path != NULL );
+
if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 )
return( ret );
@@ -148,6 +161,9 @@ int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path )
size_t n;
unsigned char *buf;
+ PK_VALIDATE_RET( ctx != NULL );
+ PK_VALIDATE_RET( path != NULL );
+
if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 )
return( ret );
@@ -605,6 +621,11 @@ int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end,
mbedtls_pk_type_t pk_alg = MBEDTLS_PK_NONE;
const mbedtls_pk_info_t *pk_info;
+ PK_VALIDATE_RET( p != NULL );
+ PK_VALIDATE_RET( *p != NULL );
+ PK_VALIDATE_RET( end != NULL );
+ PK_VALIDATE_RET( pk != NULL );
+
if( ( ret = mbedtls_asn1_get_tag( p, end, &len,
MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 )
{
@@ -1145,16 +1166,22 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
{
int ret;
const mbedtls_pk_info_t *pk_info;
-
#if defined(MBEDTLS_PEM_PARSE_C)
size_t len;
mbedtls_pem_context pem;
+#endif
- mbedtls_pem_init( &pem );
+ PK_VALIDATE_RET( pk != NULL );
+ if( keylen == 0 )
+ return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT );
+ PK_VALIDATE_RET( key != NULL );
+
+#if defined(MBEDTLS_PEM_PARSE_C)
+ mbedtls_pem_init( &pem );
#if defined(MBEDTLS_RSA_C)
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
- if( keylen == 0 || key[keylen - 1] != '\0' )
+ if( key[keylen - 1] != '\0' )
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
else
ret = mbedtls_pem_read_buffer( &pem,
@@ -1185,7 +1212,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
#if defined(MBEDTLS_ECP_C)
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
- if( keylen == 0 || key[keylen - 1] != '\0' )
+ if( key[keylen - 1] != '\0' )
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
else
ret = mbedtls_pem_read_buffer( &pem,
@@ -1215,7 +1242,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
#endif /* MBEDTLS_ECP_C */
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
- if( keylen == 0 || key[keylen - 1] != '\0' )
+ if( key[keylen - 1] != '\0' )
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
else
ret = mbedtls_pem_read_buffer( &pem,
@@ -1238,7 +1265,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
#if defined(MBEDTLS_PKCS12_C) || defined(MBEDTLS_PKCS5_C)
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
- if( keylen == 0 || key[keylen - 1] != '\0' )
+ if( key[keylen - 1] != '\0' )
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
else
ret = mbedtls_pem_read_buffer( &pem,
@@ -1276,9 +1303,6 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
{
unsigned char *key_copy;
- if( keylen == 0 )
- return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT );
-
if( ( key_copy = mbedtls_calloc( 1, keylen ) ) == NULL )
return( MBEDTLS_ERR_PK_ALLOC_FAILED );
@@ -1295,6 +1319,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
return( 0 );
mbedtls_pk_free( pk );
+ mbedtls_pk_init( pk );
if( ret == MBEDTLS_ERR_PK_PASSWORD_MISMATCH )
{
@@ -1306,39 +1331,42 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
return( 0 );
mbedtls_pk_free( pk );
+ mbedtls_pk_init( pk );
#if defined(MBEDTLS_RSA_C)
pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_RSA );
- if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ||
- ( ret = pk_parse_key_pkcs1_der( mbedtls_pk_rsa( *pk ),
- key, keylen ) ) != 0 )
- {
- mbedtls_pk_free( pk );
- }
- else
+ if( mbedtls_pk_setup( pk, pk_info ) == 0 &&
+ pk_parse_key_pkcs1_der( mbedtls_pk_rsa( *pk ), key, keylen ) == 0 )
{
return( 0 );
}
+ mbedtls_pk_free( pk );
+ mbedtls_pk_init( pk );
#endif /* MBEDTLS_RSA_C */
#if defined(MBEDTLS_ECP_C)
-
pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_ECKEY );
- if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ||
- ( ret = pk_parse_key_sec1_der( mbedtls_pk_ec( *pk ),
- key, keylen ) ) != 0 )
- {
- mbedtls_pk_free( pk );
- }
- else
+ if( mbedtls_pk_setup( pk, pk_info ) == 0 &&
+ pk_parse_key_sec1_der( mbedtls_pk_ec( *pk ),
+ key, keylen ) == 0 )
{
return( 0 );
}
-
+ mbedtls_pk_free( pk );
#endif /* MBEDTLS_ECP_C */
+ /* If MBEDTLS_RSA_C is defined but MBEDTLS_ECP_C isn't,
+ * it is ok to leave the PK context initialized but not
+ * freed: It is the caller's responsibility to call pk_init()
+ * before calling this function, and to call pk_free()
+ * when it fails. If MBEDTLS_ECP_C is defined but MBEDTLS_RSA_C
+ * isn't, this leads to mbedtls_pk_free() being called
+ * twice, once here and once by the caller, but this is
+ * also ok and in line with the mbedtls_pk_free() calls
+ * on failed PEM parsing attempts. */
+
return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT );
}
@@ -1356,11 +1384,18 @@ int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx,
#if defined(MBEDTLS_PEM_PARSE_C)
size_t len;
mbedtls_pem_context pem;
+#endif
+ PK_VALIDATE_RET( ctx != NULL );
+ if( keylen == 0 )
+ return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT );
+ PK_VALIDATE_RET( key != NULL || keylen == 0 );
+
+#if defined(MBEDTLS_PEM_PARSE_C)
mbedtls_pem_init( &pem );
#if defined(MBEDTLS_RSA_C)
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
- if( keylen == 0 || key[keylen - 1] != '\0' )
+ if( key[keylen - 1] != '\0' )
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
else
ret = mbedtls_pem_read_buffer( &pem,
@@ -1391,7 +1426,7 @@ int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx,
#endif /* MBEDTLS_RSA_C */
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
- if( keylen == 0 || key[keylen - 1] != '\0' )
+ if( key[keylen - 1] != '\0' )
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
else
ret = mbedtls_pem_read_buffer( &pem,
diff --git a/thirdparty/mbedtls/library/pkwrite.c b/thirdparty/mbedtls/library/pkwrite.c
index 8eabd889b5..8d1da2f757 100644
--- a/thirdparty/mbedtls/library/pkwrite.c
+++ b/thirdparty/mbedtls/library/pkwrite.c
@@ -30,6 +30,7 @@
#include "mbedtls/pk.h"
#include "mbedtls/asn1write.h"
#include "mbedtls/oid.h"
+#include "mbedtls/platform_util.h"
#include <string.h>
@@ -54,6 +55,12 @@
#define mbedtls_free free
#endif
+/* Parameter validation macros based on platform_util.h */
+#define PK_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_PK_BAD_INPUT_DATA )
+#define PK_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if defined(MBEDTLS_RSA_C)
/*
* RSAPublicKey ::= SEQUENCE {
@@ -151,6 +158,11 @@ int mbedtls_pk_write_pubkey( unsigned char **p, unsigned char *start,
int ret;
size_t len = 0;
+ PK_VALIDATE_RET( p != NULL );
+ PK_VALIDATE_RET( *p != NULL );
+ PK_VALIDATE_RET( start != NULL );
+ PK_VALIDATE_RET( key != NULL );
+
#if defined(MBEDTLS_RSA_C)
if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA )
MBEDTLS_ASN1_CHK_ADD( len, pk_write_rsa_pubkey( p, start, mbedtls_pk_rsa( *key ) ) );
@@ -173,6 +185,11 @@ int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *key, unsigned char *buf, si
size_t len = 0, par_len = 0, oid_len;
const char *oid;
+ PK_VALIDATE_RET( key != NULL );
+ if( size == 0 )
+ return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
+ PK_VALIDATE_RET( buf != NULL );
+
c = buf + size;
MBEDTLS_ASN1_CHK_ADD( len, mbedtls_pk_write_pubkey( &c, buf, key ) );
@@ -217,9 +234,16 @@ int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *key, unsigned char *buf, si
int mbedtls_pk_write_key_der( mbedtls_pk_context *key, unsigned char *buf, size_t size )
{
int ret;
- unsigned char *c = buf + size;
+ unsigned char *c;
size_t len = 0;
+ PK_VALIDATE_RET( key != NULL );
+ if( size == 0 )
+ return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
+ PK_VALIDATE_RET( buf != NULL );
+
+ c = buf + size;
+
#if defined(MBEDTLS_RSA_C)
if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA )
{
@@ -457,6 +481,9 @@ int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *key, unsigned char *buf, si
unsigned char output_buf[PUB_DER_MAX_BYTES];
size_t olen = 0;
+ PK_VALIDATE_RET( key != NULL );
+ PK_VALIDATE_RET( buf != NULL || size == 0 );
+
if( ( ret = mbedtls_pk_write_pubkey_der( key, output_buf,
sizeof(output_buf) ) ) < 0 )
{
@@ -480,6 +507,9 @@ int mbedtls_pk_write_key_pem( mbedtls_pk_context *key, unsigned char *buf, size_
const char *begin, *end;
size_t olen = 0;
+ PK_VALIDATE_RET( key != NULL );
+ PK_VALIDATE_RET( buf != NULL || size == 0 );
+
if( ( ret = mbedtls_pk_write_key_der( key, output_buf, sizeof(output_buf) ) ) < 0 )
return( ret );
diff --git a/thirdparty/mbedtls/library/platform.c b/thirdparty/mbedtls/library/platform.c
index b24b2fa652..73a6db9ebe 100644
--- a/thirdparty/mbedtls/library/platform.c
+++ b/thirdparty/mbedtls/library/platform.c
@@ -30,7 +30,14 @@
#include "mbedtls/platform.h"
#include "mbedtls/platform_util.h"
-#if defined(MBEDTLS_PLATFORM_MEMORY)
+/* The compile time configuration of memory allocation via the macros
+ * MBEDTLS_PLATFORM_{FREE/CALLOC}_MACRO takes precedence over the runtime
+ * configuration via mbedtls_platform_set_calloc_free(). So, omit everything
+ * related to the latter if MBEDTLS_PLATFORM_{FREE/CALLOC}_MACRO are defined. */
+#if defined(MBEDTLS_PLATFORM_MEMORY) && \
+ !( defined(MBEDTLS_PLATFORM_CALLOC_MACRO) && \
+ defined(MBEDTLS_PLATFORM_FREE_MACRO) )
+
#if !defined(MBEDTLS_PLATFORM_STD_CALLOC)
static void *platform_calloc_uninit( size_t n, size_t size )
{
@@ -71,7 +78,9 @@ int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ),
mbedtls_free_func = free_func;
return( 0 );
}
-#endif /* MBEDTLS_PLATFORM_MEMORY */
+#endif /* MBEDTLS_PLATFORM_MEMORY &&
+ !( defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&
+ defined(MBEDTLS_PLATFORM_FREE_MACRO) ) */
#if defined(_WIN32)
#include <stdarg.h>
diff --git a/thirdparty/mbedtls/library/platform_util.c b/thirdparty/mbedtls/library/platform_util.c
index 1a57de9393..756e22679a 100644
--- a/thirdparty/mbedtls/library/platform_util.c
+++ b/thirdparty/mbedtls/library/platform_util.c
@@ -20,6 +20,14 @@
* This file is part of Mbed TLS (https://tls.mbed.org)
*/
+/*
+ * Ensure gmtime_r is available even with -std=c99; must be defined before
+ * config.h, which pulls in glibc's features.h. Harmless on other platforms.
+ */
+#if !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE 200112L
+#endif
+
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@@ -27,6 +35,8 @@
#endif
#include "mbedtls/platform_util.h"
+#include "mbedtls/platform.h"
+#include "mbedtls/threading.h"
#include <stddef.h>
#include <string.h>
@@ -65,3 +75,62 @@ void mbedtls_platform_zeroize( void *buf, size_t len )
memset_func( buf, 0, len );
}
#endif /* MBEDTLS_PLATFORM_ZEROIZE_ALT */
+
+#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_R_ALT)
+#include <time.h>
+#if !defined(_WIN32) && (defined(unix) || \
+ defined(__unix) || defined(__unix__) || (defined(__APPLE__) && \
+ defined(__MACH__)))
+#include <unistd.h>
+#endif /* !_WIN32 && (unix || __unix || __unix__ ||
+ * (__APPLE__ && __MACH__)) */
+
+#if !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \
+ ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \
+ _POSIX_THREAD_SAFE_FUNCTIONS >= 20112L ) )
+/*
+ * This is a convenience shorthand macro to avoid checking the long
+ * preprocessor conditions above. Ideally, we could expose this macro in
+ * platform_util.h and simply use it in platform_util.c, threading.c and
+ * threading.h. However, this macro is not part of the Mbed TLS public API, so
+ * we keep it private by only defining it in this file
+ */
+#if ! ( defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) )
+#define PLATFORM_UTIL_USE_GMTIME
+#endif /* ! ( defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) ) */
+
+#endif /* !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \
+ ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \
+ _POSIX_THREAD_SAFE_FUNCTIONS >= 20112L ) ) */
+
+struct tm *mbedtls_platform_gmtime_r( const mbedtls_time_t *tt,
+ struct tm *tm_buf )
+{
+#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
+ return( ( gmtime_s( tm_buf, tt ) == 0 ) ? tm_buf : NULL );
+#elif !defined(PLATFORM_UTIL_USE_GMTIME)
+ return( gmtime_r( tt, tm_buf ) );
+#else
+ struct tm *lt;
+
+#if defined(MBEDTLS_THREADING_C)
+ if( mbedtls_mutex_lock( &mbedtls_threading_gmtime_mutex ) != 0 )
+ return( NULL );
+#endif /* MBEDTLS_THREADING_C */
+
+ lt = gmtime( tt );
+
+ if( lt != NULL )
+ {
+ memcpy( tm_buf, lt, sizeof( struct tm ) );
+ }
+
+#if defined(MBEDTLS_THREADING_C)
+ if( mbedtls_mutex_unlock( &mbedtls_threading_gmtime_mutex ) != 0 )
+ return( NULL );
+#endif /* MBEDTLS_THREADING_C */
+
+ return( ( lt == NULL ) ? NULL : tm_buf );
+#endif /* _WIN32 && !EFIX64 && !EFI32 */
+}
+#endif /* MBEDTLS_HAVE_TIME_DATE && MBEDTLS_PLATFORM_GMTIME_R_ALT */
diff --git a/thirdparty/mbedtls/library/poly1305.c b/thirdparty/mbedtls/library/poly1305.c
index e22d3afb68..b274119181 100644
--- a/thirdparty/mbedtls/library/poly1305.c
+++ b/thirdparty/mbedtls/library/poly1305.c
@@ -49,6 +49,12 @@
#define inline __inline
#endif
+/* Parameter validation macros */
+#define POLY1305_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA )
+#define POLY1305_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#define POLY1305_BLOCK_SIZE_BYTES ( 16U )
#define BYTES_TO_U32_LE( data, offset ) \
@@ -276,27 +282,24 @@ static void poly1305_compute_mac( const mbedtls_poly1305_context *ctx,
void mbedtls_poly1305_init( mbedtls_poly1305_context *ctx )
{
- if( ctx != NULL )
- {
- mbedtls_platform_zeroize( ctx, sizeof( mbedtls_poly1305_context ) );
- }
+ POLY1305_VALIDATE( ctx != NULL );
+
+ mbedtls_platform_zeroize( ctx, sizeof( mbedtls_poly1305_context ) );
}
void mbedtls_poly1305_free( mbedtls_poly1305_context *ctx )
{
- if( ctx != NULL )
- {
- mbedtls_platform_zeroize( ctx, sizeof( mbedtls_poly1305_context ) );
- }
+ if( ctx == NULL )
+ return;
+
+ mbedtls_platform_zeroize( ctx, sizeof( mbedtls_poly1305_context ) );
}
int mbedtls_poly1305_starts( mbedtls_poly1305_context *ctx,
const unsigned char key[32] )
{
- if( ctx == NULL || key == NULL )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
+ POLY1305_VALIDATE_RET( ctx != NULL );
+ POLY1305_VALIDATE_RET( key != NULL );
/* r &= 0x0ffffffc0ffffffc0ffffffc0fffffff */
ctx->r[0] = BYTES_TO_U32_LE( key, 0 ) & 0x0FFFFFFFU;
@@ -331,16 +334,8 @@ int mbedtls_poly1305_update( mbedtls_poly1305_context *ctx,
size_t remaining = ilen;
size_t queue_free_len;
size_t nblocks;
-
- if( ctx == NULL )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
- else if( ( ilen > 0U ) && ( input == NULL ) )
- {
- /* input pointer is allowed to be NULL only if ilen == 0 */
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
+ POLY1305_VALIDATE_RET( ctx != NULL );
+ POLY1305_VALIDATE_RET( ilen == 0 || input != NULL );
if( ( remaining > 0U ) && ( ctx->queue_len > 0U ) )
{
@@ -398,10 +393,8 @@ int mbedtls_poly1305_update( mbedtls_poly1305_context *ctx,
int mbedtls_poly1305_finish( mbedtls_poly1305_context *ctx,
unsigned char mac[16] )
{
- if( ( ctx == NULL ) || ( mac == NULL ) )
- {
- return( MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA );
- }
+ POLY1305_VALIDATE_RET( ctx != NULL );
+ POLY1305_VALIDATE_RET( mac != NULL );
/* Process any leftover data */
if( ctx->queue_len > 0U )
@@ -431,6 +424,9 @@ int mbedtls_poly1305_mac( const unsigned char key[32],
{
mbedtls_poly1305_context ctx;
int ret;
+ POLY1305_VALIDATE_RET( key != NULL );
+ POLY1305_VALIDATE_RET( mac != NULL );
+ POLY1305_VALIDATE_RET( ilen == 0 || input != NULL );
mbedtls_poly1305_init( &ctx );
diff --git a/thirdparty/mbedtls/library/rsa.c b/thirdparty/mbedtls/library/rsa.c
index 88c1cf1007..af1a878599 100644
--- a/thirdparty/mbedtls/library/rsa.c
+++ b/thirdparty/mbedtls/library/rsa.c
@@ -71,6 +71,12 @@
#if !defined(MBEDTLS_RSA_ALT)
+/* Parameter validation macros */
+#define RSA_VALIDATE_RET( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_RSA_BAD_INPUT_DATA )
+#define RSA_VALIDATE( cond ) \
+ MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if defined(MBEDTLS_PKCS1_V15)
/* constant-time buffer comparison */
static inline int mbedtls_safer_memcmp( const void *a, const void *b, size_t n )
@@ -93,6 +99,7 @@ int mbedtls_rsa_import( mbedtls_rsa_context *ctx,
const mbedtls_mpi *D, const mbedtls_mpi *E )
{
int ret;
+ RSA_VALIDATE_RET( ctx != NULL );
if( ( N != NULL && ( ret = mbedtls_mpi_copy( &ctx->N, N ) ) != 0 ) ||
( P != NULL && ( ret = mbedtls_mpi_copy( &ctx->P, P ) ) != 0 ) ||
@@ -117,6 +124,7 @@ int mbedtls_rsa_import_raw( mbedtls_rsa_context *ctx,
unsigned char const *E, size_t E_len )
{
int ret = 0;
+ RSA_VALIDATE_RET( ctx != NULL );
if( N != NULL )
{
@@ -240,12 +248,16 @@ static int rsa_check_context( mbedtls_rsa_context const *ctx, int is_priv,
int mbedtls_rsa_complete( mbedtls_rsa_context *ctx )
{
int ret = 0;
+ int have_N, have_P, have_Q, have_D, have_E;
+ int n_missing, pq_missing, d_missing, is_pub, is_priv;
+
+ RSA_VALIDATE_RET( ctx != NULL );
- const int have_N = ( mbedtls_mpi_cmp_int( &ctx->N, 0 ) != 0 );
- const int have_P = ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) != 0 );
- const int have_Q = ( mbedtls_mpi_cmp_int( &ctx->Q, 0 ) != 0 );
- const int have_D = ( mbedtls_mpi_cmp_int( &ctx->D, 0 ) != 0 );
- const int have_E = ( mbedtls_mpi_cmp_int( &ctx->E, 0 ) != 0 );
+ have_N = ( mbedtls_mpi_cmp_int( &ctx->N, 0 ) != 0 );
+ have_P = ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) != 0 );
+ have_Q = ( mbedtls_mpi_cmp_int( &ctx->Q, 0 ) != 0 );
+ have_D = ( mbedtls_mpi_cmp_int( &ctx->D, 0 ) != 0 );
+ have_E = ( mbedtls_mpi_cmp_int( &ctx->E, 0 ) != 0 );
/*
* Check whether provided parameters are enough
@@ -257,13 +269,13 @@ int mbedtls_rsa_complete( mbedtls_rsa_context *ctx )
*
*/
- const int n_missing = have_P && have_Q && have_D && have_E;
- const int pq_missing = have_N && !have_P && !have_Q && have_D && have_E;
- const int d_missing = have_P && have_Q && !have_D && have_E;
- const int is_pub = have_N && !have_P && !have_Q && !have_D && have_E;
+ n_missing = have_P && have_Q && have_D && have_E;
+ pq_missing = have_N && !have_P && !have_Q && have_D && have_E;
+ d_missing = have_P && have_Q && !have_D && have_E;
+ is_pub = have_N && !have_P && !have_Q && !have_D && have_E;
/* These three alternatives are mutually exclusive */
- const int is_priv = n_missing || pq_missing || d_missing;
+ is_priv = n_missing || pq_missing || d_missing;
if( !is_priv && !is_pub )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -336,9 +348,11 @@ int mbedtls_rsa_export_raw( const mbedtls_rsa_context *ctx,
unsigned char *E, size_t E_len )
{
int ret = 0;
+ int is_priv;
+ RSA_VALIDATE_RET( ctx != NULL );
/* Check if key is private or public */
- const int is_priv =
+ is_priv =
mbedtls_mpi_cmp_int( &ctx->N, 0 ) != 0 &&
mbedtls_mpi_cmp_int( &ctx->P, 0 ) != 0 &&
mbedtls_mpi_cmp_int( &ctx->Q, 0 ) != 0 &&
@@ -379,9 +393,11 @@ int mbedtls_rsa_export( const mbedtls_rsa_context *ctx,
mbedtls_mpi *D, mbedtls_mpi *E )
{
int ret;
+ int is_priv;
+ RSA_VALIDATE_RET( ctx != NULL );
/* Check if key is private or public */
- int is_priv =
+ is_priv =
mbedtls_mpi_cmp_int( &ctx->N, 0 ) != 0 &&
mbedtls_mpi_cmp_int( &ctx->P, 0 ) != 0 &&
mbedtls_mpi_cmp_int( &ctx->Q, 0 ) != 0 &&
@@ -421,9 +437,11 @@ int mbedtls_rsa_export_crt( const mbedtls_rsa_context *ctx,
mbedtls_mpi *DP, mbedtls_mpi *DQ, mbedtls_mpi *QP )
{
int ret;
+ int is_priv;
+ RSA_VALIDATE_RET( ctx != NULL );
/* Check if key is private or public */
- int is_priv =
+ is_priv =
mbedtls_mpi_cmp_int( &ctx->N, 0 ) != 0 &&
mbedtls_mpi_cmp_int( &ctx->P, 0 ) != 0 &&
mbedtls_mpi_cmp_int( &ctx->Q, 0 ) != 0 &&
@@ -459,6 +477,10 @@ void mbedtls_rsa_init( mbedtls_rsa_context *ctx,
int padding,
int hash_id )
{
+ RSA_VALIDATE( ctx != NULL );
+ RSA_VALIDATE( padding == MBEDTLS_RSA_PKCS_V15 ||
+ padding == MBEDTLS_RSA_PKCS_V21 );
+
memset( ctx, 0, sizeof( mbedtls_rsa_context ) );
mbedtls_rsa_set_padding( ctx, padding, hash_id );
@@ -471,8 +493,13 @@ void mbedtls_rsa_init( mbedtls_rsa_context *ctx,
/*
* Set padding for an existing RSA context
*/
-void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding, int hash_id )
+void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding,
+ int hash_id )
{
+ RSA_VALIDATE( ctx != NULL );
+ RSA_VALIDATE( padding == MBEDTLS_RSA_PKCS_V15 ||
+ padding == MBEDTLS_RSA_PKCS_V21 );
+
ctx->padding = padding;
ctx->hash_id = hash_id;
}
@@ -502,12 +529,20 @@ int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx,
{
int ret;
mbedtls_mpi H, G, L;
+ int prime_quality = 0;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( f_rng != NULL );
- if( f_rng == NULL || nbits < 128 || exponent < 3 )
+ if( nbits < 128 || exponent < 3 || nbits % 2 != 0 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
- if( nbits % 2 )
- return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
+ /*
+ * If the modulus is 1024 bit long or shorter, then the security strength of
+ * the RSA algorithm is less than or equal to 80 bits and therefore an error
+ * rate of 2^-80 is sufficient.
+ */
+ if( nbits > 1024 )
+ prime_quality = MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR;
mbedtls_mpi_init( &H );
mbedtls_mpi_init( &G );
@@ -523,11 +558,11 @@ int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx,
do
{
- MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1, 0,
- f_rng, p_rng ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1,
+ prime_quality, f_rng, p_rng ) );
- MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, nbits >> 1, 0,
- f_rng, p_rng ) );
+ MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, nbits >> 1,
+ prime_quality, f_rng, p_rng ) );
/* make sure the difference between p and q is not too small (FIPS 186-4 §B.3.3 step 5.4) */
MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &H, &ctx->P, &ctx->Q ) );
@@ -603,6 +638,8 @@ cleanup:
*/
int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx )
{
+ RSA_VALIDATE_RET( ctx != NULL );
+
if( rsa_check_context( ctx, 0 /* public */, 0 /* no blinding */ ) != 0 )
return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED );
@@ -626,6 +663,8 @@ int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx )
*/
int mbedtls_rsa_check_privkey( const mbedtls_rsa_context *ctx )
{
+ RSA_VALIDATE_RET( ctx != NULL );
+
if( mbedtls_rsa_check_pubkey( ctx ) != 0 ||
rsa_check_context( ctx, 1 /* private */, 1 /* blinding */ ) != 0 )
{
@@ -655,6 +694,9 @@ int mbedtls_rsa_check_privkey( const mbedtls_rsa_context *ctx )
int mbedtls_rsa_check_pub_priv( const mbedtls_rsa_context *pub,
const mbedtls_rsa_context *prv )
{
+ RSA_VALIDATE_RET( pub != NULL );
+ RSA_VALIDATE_RET( prv != NULL );
+
if( mbedtls_rsa_check_pubkey( pub ) != 0 ||
mbedtls_rsa_check_privkey( prv ) != 0 )
{
@@ -680,6 +722,9 @@ int mbedtls_rsa_public( mbedtls_rsa_context *ctx,
int ret;
size_t olen;
mbedtls_mpi T;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( input != NULL );
+ RSA_VALIDATE_RET( output != NULL );
if( rsa_check_context( ctx, 0 /* public */, 0 /* no blinding */ ) )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -822,6 +867,10 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx,
* checked result; should be the same in the end. */
mbedtls_mpi I, C;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( input != NULL );
+ RSA_VALIDATE_RET( output != NULL );
+
if( rsa_check_context( ctx, 1 /* private key checks */,
f_rng != NULL /* blinding y/n */ ) != 0 )
{
@@ -1082,6 +1131,13 @@ int mbedtls_rsa_rsaes_oaep_encrypt( mbedtls_rsa_context *ctx,
const mbedtls_md_info_t *md_info;
mbedtls_md_context_t md_ctx;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( output != NULL );
+ RSA_VALIDATE_RET( input != NULL );
+ RSA_VALIDATE_RET( label_len == 0 || label != NULL );
+
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -1158,11 +1214,13 @@ int mbedtls_rsa_rsaes_pkcs1_v15_encrypt( mbedtls_rsa_context *ctx,
int ret;
unsigned char *p = output;
- if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 )
- return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( output != NULL );
+ RSA_VALIDATE_RET( input != NULL );
- // We don't check p_rng because it won't be dereferenced here
- if( f_rng == NULL || input == NULL || output == NULL )
+ if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
olen = ctx->len;
@@ -1176,6 +1234,9 @@ int mbedtls_rsa_rsaes_pkcs1_v15_encrypt( mbedtls_rsa_context *ctx,
*p++ = 0;
if( mode == MBEDTLS_RSA_PUBLIC )
{
+ if( f_rng == NULL )
+ return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
+
*p++ = MBEDTLS_RSA_CRYPT;
while( nb_pad-- > 0 )
@@ -1220,6 +1281,12 @@ int mbedtls_rsa_pkcs1_encrypt( mbedtls_rsa_context *ctx,
const unsigned char *input,
unsigned char *output )
{
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( output != NULL );
+ RSA_VALIDATE_RET( input != NULL );
+
switch( ctx->padding )
{
#if defined(MBEDTLS_PKCS1_V15)
@@ -1262,6 +1329,14 @@ int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx,
const mbedtls_md_info_t *md_info;
mbedtls_md_context_t md_ctx;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( output_max_len == 0 || output != NULL );
+ RSA_VALIDATE_RET( label_len == 0 || label != NULL );
+ RSA_VALIDATE_RET( input != NULL );
+ RSA_VALIDATE_RET( olen != NULL );
+
/*
* Parameters sanity checks
*/
@@ -1378,6 +1453,97 @@ cleanup:
#endif /* MBEDTLS_PKCS1_V21 */
#if defined(MBEDTLS_PKCS1_V15)
+/** Turn zero-or-nonzero into zero-or-all-bits-one, without branches.
+ *
+ * \param value The value to analyze.
+ * \return Zero if \p value is zero, otherwise all-bits-one.
+ */
+static unsigned all_or_nothing_int( unsigned value )
+{
+ /* MSVC has a warning about unary minus on unsigned, but this is
+ * well-defined and precisely what we want to do here */
+#if defined(_MSC_VER)
+#pragma warning( push )
+#pragma warning( disable : 4146 )
+#endif
+ return( - ( ( value | - value ) >> ( sizeof( value ) * 8 - 1 ) ) );
+#if defined(_MSC_VER)
+#pragma warning( pop )
+#endif
+}
+
+/** Check whether a size is out of bounds, without branches.
+ *
+ * This is equivalent to `size > max`, but is likely to be compiled to
+ * to code using bitwise operation rather than a branch.
+ *
+ * \param size Size to check.
+ * \param max Maximum desired value for \p size.
+ * \return \c 0 if `size <= max`.
+ * \return \c 1 if `size > max`.
+ */
+static unsigned size_greater_than( size_t size, size_t max )
+{
+ /* Return the sign bit (1 for negative) of (max - size). */
+ return( ( max - size ) >> ( sizeof( size_t ) * 8 - 1 ) );
+}
+
+/** Choose between two integer values, without branches.
+ *
+ * This is equivalent to `cond ? if1 : if0`, but is likely to be compiled
+ * to code using bitwise operation rather than a branch.
+ *
+ * \param cond Condition to test.
+ * \param if1 Value to use if \p cond is nonzero.
+ * \param if0 Value to use if \p cond is zero.
+ * \return \c if1 if \p cond is nonzero, otherwise \c if0.
+ */
+static unsigned if_int( unsigned cond, unsigned if1, unsigned if0 )
+{
+ unsigned mask = all_or_nothing_int( cond );
+ return( ( mask & if1 ) | (~mask & if0 ) );
+}
+
+/** Shift some data towards the left inside a buffer without leaking
+ * the length of the data through side channels.
+ *
+ * `mem_move_to_left(start, total, offset)` is functionally equivalent to
+ * ```
+ * memmove(start, start + offset, total - offset);
+ * memset(start + offset, 0, total - offset);
+ * ```
+ * but it strives to use a memory access pattern (and thus total timing)
+ * that does not depend on \p offset. This timing independence comes at
+ * the expense of performance.
+ *
+ * \param start Pointer to the start of the buffer.
+ * \param total Total size of the buffer.
+ * \param offset Offset from which to copy \p total - \p offset bytes.
+ */
+static void mem_move_to_left( void *start,
+ size_t total,
+ size_t offset )
+{
+ volatile unsigned char *buf = start;
+ size_t i, n;
+ if( total == 0 )
+ return;
+ for( i = 0; i < total; i++ )
+ {
+ unsigned no_op = size_greater_than( total - offset, i );
+ /* The first `total - offset` passes are a no-op. The last
+ * `offset` passes shift the data one byte to the left and
+ * zero out the last byte. */
+ for( n = 0; n < total - 1; n++ )
+ {
+ unsigned char current = buf[n];
+ unsigned char next = buf[n+1];
+ buf[n] = if_int( no_op, current, next );
+ }
+ buf[total-1] = if_int( no_op, buf[total-1], 0 );
+ }
+}
+
/*
* Implementation of the PKCS#1 v2.1 RSAES-PKCS1-V1_5-DECRYPT function
*/
@@ -1387,18 +1553,42 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
int mode, size_t *olen,
const unsigned char *input,
unsigned char *output,
- size_t output_max_len)
+ size_t output_max_len )
{
int ret;
- size_t ilen, pad_count = 0, i;
- unsigned char *p, bad, pad_done = 0;
+ size_t ilen, i, plaintext_max_size;
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
+ /* The following variables take sensitive values: their value must
+ * not leak into the observable behavior of the function other than
+ * the designated outputs (output, olen, return value). Otherwise
+ * this would open the execution of the function to
+ * side-channel-based variants of the Bleichenbacher padding oracle
+ * attack. Potential side channels include overall timing, memory
+ * access patterns (especially visible to an adversary who has access
+ * to a shared memory cache), and branches (especially visible to
+ * an adversary who has access to a shared code cache or to a shared
+ * branch predictor). */
+ size_t pad_count = 0;
+ unsigned bad = 0;
+ unsigned char pad_done = 0;
+ size_t plaintext_size = 0;
+ unsigned output_too_large;
+
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( output_max_len == 0 || output != NULL );
+ RSA_VALIDATE_RET( input != NULL );
+ RSA_VALIDATE_RET( olen != NULL );
+
+ ilen = ctx->len;
+ plaintext_max_size = ( output_max_len > ilen - 11 ?
+ ilen - 11 :
+ output_max_len );
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
- ilen = ctx->len;
-
if( ilen < 16 || ilen > sizeof( buf ) )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -1409,63 +1599,109 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
if( ret != 0 )
goto cleanup;
- p = buf;
- bad = 0;
-
- /*
- * Check and get padding len in "constant-time"
- */
- bad |= *p++; /* First byte must be 0 */
+ /* Check and get padding length in constant time and constant
+ * memory trace. The first byte must be 0. */
+ bad |= buf[0];
- /* This test does not depend on secret data */
if( mode == MBEDTLS_RSA_PRIVATE )
{
- bad |= *p++ ^ MBEDTLS_RSA_CRYPT;
+ /* Decode EME-PKCS1-v1_5 padding: 0x00 || 0x02 || PS || 0x00
+ * where PS must be at least 8 nonzero bytes. */
+ bad |= buf[1] ^ MBEDTLS_RSA_CRYPT;
- /* Get padding len, but always read till end of buffer
- * (minus one, for the 00 byte) */
- for( i = 0; i < ilen - 3; i++ )
+ /* Read the whole buffer. Set pad_done to nonzero if we find
+ * the 0x00 byte and remember the padding length in pad_count. */
+ for( i = 2; i < ilen; i++ )
{
- pad_done |= ((p[i] | (unsigned char)-p[i]) >> 7) ^ 1;
+ pad_done |= ((buf[i] | (unsigned char)-buf[i]) >> 7) ^ 1;
pad_count += ((pad_done | (unsigned char)-pad_done) >> 7) ^ 1;
}
-
- p += pad_count;
- bad |= *p++; /* Must be zero */
}
else
{
- bad |= *p++ ^ MBEDTLS_RSA_SIGN;
+ /* Decode EMSA-PKCS1-v1_5 padding: 0x00 || 0x01 || PS || 0x00
+ * where PS must be at least 8 bytes with the value 0xFF. */
+ bad |= buf[1] ^ MBEDTLS_RSA_SIGN;
- /* Get padding len, but always read till end of buffer
- * (minus one, for the 00 byte) */
- for( i = 0; i < ilen - 3; i++ )
+ /* Read the whole buffer. Set pad_done to nonzero if we find
+ * the 0x00 byte and remember the padding length in pad_count.
+ * If there's a non-0xff byte in the padding, the padding is bad. */
+ for( i = 2; i < ilen; i++ )
{
- pad_done |= ( p[i] != 0xFF );
- pad_count += ( pad_done == 0 );
+ pad_done |= if_int( buf[i], 0, 1 );
+ pad_count += if_int( pad_done, 0, 1 );
+ bad |= if_int( pad_done, 0, buf[i] ^ 0xFF );
}
-
- p += pad_count;
- bad |= *p++; /* Must be zero */
}
- bad |= ( pad_count < 8 );
-
- if( bad )
- {
- ret = MBEDTLS_ERR_RSA_INVALID_PADDING;
- goto cleanup;
- }
-
- if( ilen - ( p - buf ) > output_max_len )
- {
- ret = MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE;
- goto cleanup;
- }
-
- *olen = ilen - (p - buf);
- memcpy( output, p, *olen );
- ret = 0;
+ /* If pad_done is still zero, there's no data, only unfinished padding. */
+ bad |= if_int( pad_done, 0, 1 );
+
+ /* There must be at least 8 bytes of padding. */
+ bad |= size_greater_than( 8, pad_count );
+
+ /* If the padding is valid, set plaintext_size to the number of
+ * remaining bytes after stripping the padding. If the padding
+ * is invalid, avoid leaking this fact through the size of the
+ * output: use the maximum message size that fits in the output
+ * buffer. Do it without branches to avoid leaking the padding
+ * validity through timing. RSA keys are small enough that all the
+ * size_t values involved fit in unsigned int. */
+ plaintext_size = if_int( bad,
+ (unsigned) plaintext_max_size,
+ (unsigned) ( ilen - pad_count - 3 ) );
+
+ /* Set output_too_large to 0 if the plaintext fits in the output
+ * buffer and to 1 otherwise. */
+ output_too_large = size_greater_than( plaintext_size,
+ plaintext_max_size );
+
+ /* Set ret without branches to avoid timing attacks. Return:
+ * - INVALID_PADDING if the padding is bad (bad != 0).
+ * - OUTPUT_TOO_LARGE if the padding is good but the decrypted
+ * plaintext does not fit in the output buffer.
+ * - 0 if the padding is correct. */
+ ret = - (int) if_int( bad, - MBEDTLS_ERR_RSA_INVALID_PADDING,
+ if_int( output_too_large, - MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE,
+ 0 ) );
+
+ /* If the padding is bad or the plaintext is too large, zero the
+ * data that we're about to copy to the output buffer.
+ * We need to copy the same amount of data
+ * from the same buffer whether the padding is good or not to
+ * avoid leaking the padding validity through overall timing or
+ * through memory or cache access patterns. */
+ bad = all_or_nothing_int( bad | output_too_large );
+ for( i = 11; i < ilen; i++ )
+ buf[i] &= ~bad;
+
+ /* If the plaintext is too large, truncate it to the buffer size.
+ * Copy anyway to avoid revealing the length through timing, because
+ * revealing the length is as bad as revealing the padding validity
+ * for a Bleichenbacher attack. */
+ plaintext_size = if_int( output_too_large,
+ (unsigned) plaintext_max_size,
+ (unsigned) plaintext_size );
+
+ /* Move the plaintext to the leftmost position where it can start in
+ * the working buffer, i.e. make it start plaintext_max_size from
+ * the end of the buffer. Do this with a memory access trace that
+ * does not depend on the plaintext size. After this move, the
+ * starting location of the plaintext is no longer sensitive
+ * information. */
+ mem_move_to_left( buf + ilen - plaintext_max_size,
+ plaintext_max_size,
+ plaintext_max_size - plaintext_size );
+
+ /* Finally copy the decrypted plaintext plus trailing zeros
+ * into the output buffer. */
+ memcpy( output, buf + ilen - plaintext_max_size, plaintext_max_size );
+
+ /* Report the amount of data we copied to the output buffer. In case
+ * of errors (bad padding or output too large), the value of *olen
+ * when this function returns is not specified. Making it equivalent
+ * to the good case limits the risks of leaking the padding validity. */
+ *olen = plaintext_size;
cleanup:
mbedtls_platform_zeroize( buf, sizeof( buf ) );
@@ -1485,6 +1721,13 @@ int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx,
unsigned char *output,
size_t output_max_len)
{
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( output_max_len == 0 || output != NULL );
+ RSA_VALIDATE_RET( input != NULL );
+ RSA_VALIDATE_RET( olen != NULL );
+
switch( ctx->padding )
{
#if defined(MBEDTLS_PKCS1_V15)
@@ -1521,11 +1764,18 @@ int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx,
size_t olen;
unsigned char *p = sig;
unsigned char salt[MBEDTLS_MD_MAX_SIZE];
- unsigned int slen, hlen, offset = 0;
+ size_t slen, min_slen, hlen, offset = 0;
int ret;
size_t msb;
const mbedtls_md_info_t *md_info;
mbedtls_md_context_t md_ctx;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE &&
+ hashlen == 0 ) ||
+ hash != NULL );
+ RSA_VALIDATE_RET( sig != NULL );
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -1550,10 +1800,20 @@ int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx,
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
hlen = mbedtls_md_get_size( md_info );
- slen = hlen;
- if( olen < hlen + slen + 2 )
+ /* Calculate the largest possible salt length. Normally this is the hash
+ * length, which is the maximum length the salt can have. If there is not
+ * enough room, use the maximum salt length that fits. The constraint is
+ * that the hash length plus the salt length plus 2 bytes must be at most
+ * the key length. This complies with FIPS 186-4 §5.5 (e) and RFC 8017
+ * (PKCS#1 v2.2) §9.1.1 step 3. */
+ min_slen = hlen - 2;
+ if( olen < hlen + min_slen + 2 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
+ else if( olen >= hlen + hlen + 2 )
+ slen = hlen;
+ else
+ slen = olen - hlen - 2;
memset( sig, 0, olen );
@@ -1563,7 +1823,7 @@ int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx,
/* Note: EMSA-PSS encoding is over the length of N - 1 bits */
msb = mbedtls_mpi_bitlen( &ctx->N ) - 1;
- p += olen - hlen * 2 - 2;
+ p += olen - hlen - slen - 2;
*p++ = 0x01;
memcpy( p, salt, slen );
p += slen;
@@ -1763,6 +2023,14 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx,
int ret;
unsigned char *sig_try = NULL, *verif = NULL;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE &&
+ hashlen == 0 ) ||
+ hash != NULL );
+ RSA_VALIDATE_RET( sig != NULL );
+
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -1832,6 +2100,14 @@ int mbedtls_rsa_pkcs1_sign( mbedtls_rsa_context *ctx,
const unsigned char *hash,
unsigned char *sig )
{
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE &&
+ hashlen == 0 ) ||
+ hash != NULL );
+ RSA_VALIDATE_RET( sig != NULL );
+
switch( ctx->padding )
{
#if defined(MBEDTLS_PKCS1_V15)
@@ -1878,6 +2154,14 @@ int mbedtls_rsa_rsassa_pss_verify_ext( mbedtls_rsa_context *ctx,
mbedtls_md_context_t md_ctx;
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( sig != NULL );
+ RSA_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE &&
+ hashlen == 0 ) ||
+ hash != NULL );
+
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -2006,7 +2290,16 @@ int mbedtls_rsa_rsassa_pss_verify( mbedtls_rsa_context *ctx,
const unsigned char *hash,
const unsigned char *sig )
{
- mbedtls_md_type_t mgf1_hash_id = ( ctx->hash_id != MBEDTLS_MD_NONE )
+ mbedtls_md_type_t mgf1_hash_id;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( sig != NULL );
+ RSA_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE &&
+ hashlen == 0 ) ||
+ hash != NULL );
+
+ mgf1_hash_id = ( ctx->hash_id != MBEDTLS_MD_NONE )
? (mbedtls_md_type_t) ctx->hash_id
: md_alg;
@@ -2032,9 +2325,19 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx,
const unsigned char *sig )
{
int ret = 0;
- const size_t sig_len = ctx->len;
+ size_t sig_len;
unsigned char *encoded = NULL, *encoded_expected = NULL;
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( sig != NULL );
+ RSA_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE &&
+ hashlen == 0 ) ||
+ hash != NULL );
+
+ sig_len = ctx->len;
+
if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
@@ -2104,6 +2407,14 @@ int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx,
const unsigned char *hash,
const unsigned char *sig )
{
+ RSA_VALIDATE_RET( ctx != NULL );
+ RSA_VALIDATE_RET( mode == MBEDTLS_RSA_PRIVATE ||
+ mode == MBEDTLS_RSA_PUBLIC );
+ RSA_VALIDATE_RET( sig != NULL );
+ RSA_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE &&
+ hashlen == 0 ) ||
+ hash != NULL );
+
switch( ctx->padding )
{
#if defined(MBEDTLS_PKCS1_V15)
@@ -2129,6 +2440,8 @@ int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx,
int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src )
{
int ret;
+ RSA_VALIDATE_RET( dst != NULL );
+ RSA_VALIDATE_RET( src != NULL );
dst->ver = src->ver;
dst->len = src->len;
@@ -2168,14 +2481,23 @@ cleanup:
*/
void mbedtls_rsa_free( mbedtls_rsa_context *ctx )
{
- mbedtls_mpi_free( &ctx->Vi ); mbedtls_mpi_free( &ctx->Vf );
- mbedtls_mpi_free( &ctx->RN ); mbedtls_mpi_free( &ctx->D );
- mbedtls_mpi_free( &ctx->Q ); mbedtls_mpi_free( &ctx->P );
- mbedtls_mpi_free( &ctx->E ); mbedtls_mpi_free( &ctx->N );
+ if( ctx == NULL )
+ return;
+
+ mbedtls_mpi_free( &ctx->Vi );
+ mbedtls_mpi_free( &ctx->Vf );
+ mbedtls_mpi_free( &ctx->RN );
+ mbedtls_mpi_free( &ctx->D );
+ mbedtls_mpi_free( &ctx->Q );
+ mbedtls_mpi_free( &ctx->P );
+ mbedtls_mpi_free( &ctx->E );
+ mbedtls_mpi_free( &ctx->N );
#if !defined(MBEDTLS_RSA_NO_CRT)
- mbedtls_mpi_free( &ctx->RQ ); mbedtls_mpi_free( &ctx->RP );
- mbedtls_mpi_free( &ctx->QP ); mbedtls_mpi_free( &ctx->DQ );
+ mbedtls_mpi_free( &ctx->RQ );
+ mbedtls_mpi_free( &ctx->RP );
+ mbedtls_mpi_free( &ctx->QP );
+ mbedtls_mpi_free( &ctx->DQ );
mbedtls_mpi_free( &ctx->DP );
#endif /* MBEDTLS_RSA_NO_CRT */
diff --git a/thirdparty/mbedtls/library/rsa_internal.c b/thirdparty/mbedtls/library/rsa_internal.c
index 507009f131..9a42d47ceb 100644
--- a/thirdparty/mbedtls/library/rsa_internal.c
+++ b/thirdparty/mbedtls/library/rsa_internal.c
@@ -351,15 +351,20 @@ int mbedtls_rsa_validate_params( const mbedtls_mpi *N, const mbedtls_mpi *P,
*/
#if defined(MBEDTLS_GENPRIME)
+ /*
+ * When generating keys, the strongest security we support aims for an error
+ * rate of at most 2^-100 and we are aiming for the same certainty here as
+ * well.
+ */
if( f_rng != NULL && P != NULL &&
- ( ret = mbedtls_mpi_is_prime( P, f_rng, p_rng ) ) != 0 )
+ ( ret = mbedtls_mpi_is_prime_ext( P, 50, f_rng, p_rng ) ) != 0 )
{
ret = MBEDTLS_ERR_RSA_KEY_CHECK_FAILED;
goto cleanup;
}
if( f_rng != NULL && Q != NULL &&
- ( ret = mbedtls_mpi_is_prime( Q, f_rng, p_rng ) ) != 0 )
+ ( ret = mbedtls_mpi_is_prime_ext( Q, 50, f_rng, p_rng ) ) != 0 )
{
ret = MBEDTLS_ERR_RSA_KEY_CHECK_FAILED;
goto cleanup;
diff --git a/thirdparty/mbedtls/library/sha1.c b/thirdparty/mbedtls/library/sha1.c
index bab6087c4e..e8d4096fbb 100644
--- a/thirdparty/mbedtls/library/sha1.c
+++ b/thirdparty/mbedtls/library/sha1.c
@@ -46,6 +46,11 @@
#endif /* MBEDTLS_PLATFORM_C */
#endif /* MBEDTLS_SELF_TEST */
+#define SHA1_VALIDATE_RET(cond) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_SHA1_BAD_INPUT_DATA )
+
+#define SHA1_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if !defined(MBEDTLS_SHA1_ALT)
/*
@@ -73,6 +78,8 @@
void mbedtls_sha1_init( mbedtls_sha1_context *ctx )
{
+ SHA1_VALIDATE( ctx != NULL );
+
memset( ctx, 0, sizeof( mbedtls_sha1_context ) );
}
@@ -87,6 +94,9 @@ void mbedtls_sha1_free( mbedtls_sha1_context *ctx )
void mbedtls_sha1_clone( mbedtls_sha1_context *dst,
const mbedtls_sha1_context *src )
{
+ SHA1_VALIDATE( dst != NULL );
+ SHA1_VALIDATE( src != NULL );
+
*dst = *src;
}
@@ -95,6 +105,8 @@ void mbedtls_sha1_clone( mbedtls_sha1_context *dst,
*/
int mbedtls_sha1_starts_ret( mbedtls_sha1_context *ctx )
{
+ SHA1_VALIDATE_RET( ctx != NULL );
+
ctx->total[0] = 0;
ctx->total[1] = 0;
@@ -120,6 +132,9 @@ int mbedtls_internal_sha1_process( mbedtls_sha1_context *ctx,
{
uint32_t temp, W[16], A, B, C, D, E;
+ SHA1_VALIDATE_RET( ctx != NULL );
+ SHA1_VALIDATE_RET( (const unsigned char *)data != NULL );
+
GET_UINT32_BE( W[ 0], data, 0 );
GET_UINT32_BE( W[ 1], data, 4 );
GET_UINT32_BE( W[ 2], data, 8 );
@@ -294,6 +309,9 @@ int mbedtls_sha1_update_ret( mbedtls_sha1_context *ctx,
size_t fill;
uint32_t left;
+ SHA1_VALIDATE_RET( ctx != NULL );
+ SHA1_VALIDATE_RET( ilen == 0 || input != NULL );
+
if( ilen == 0 )
return( 0 );
@@ -352,6 +370,9 @@ int mbedtls_sha1_finish_ret( mbedtls_sha1_context *ctx,
uint32_t used;
uint32_t high, low;
+ SHA1_VALIDATE_RET( ctx != NULL );
+ SHA1_VALIDATE_RET( (unsigned char *)output != NULL );
+
/*
* Add padding: 0x80 then 0x00 until 8 bytes remain for the length
*/
@@ -420,6 +441,9 @@ int mbedtls_sha1_ret( const unsigned char *input,
int ret;
mbedtls_sha1_context ctx;
+ SHA1_VALIDATE_RET( ilen == 0 || input != NULL );
+ SHA1_VALIDATE_RET( (unsigned char *)output != NULL );
+
mbedtls_sha1_init( &ctx );
if( ( ret = mbedtls_sha1_starts_ret( &ctx ) ) != 0 )
diff --git a/thirdparty/mbedtls/library/sha256.c b/thirdparty/mbedtls/library/sha256.c
index dbb4a89861..8a540adfbe 100644
--- a/thirdparty/mbedtls/library/sha256.c
+++ b/thirdparty/mbedtls/library/sha256.c
@@ -49,6 +49,10 @@
#endif /* MBEDTLS_PLATFORM_C */
#endif /* MBEDTLS_SELF_TEST */
+#define SHA256_VALIDATE_RET(cond) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_SHA256_BAD_INPUT_DATA )
+#define SHA256_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if !defined(MBEDTLS_SHA256_ALT)
/*
@@ -76,6 +80,8 @@ do { \
void mbedtls_sha256_init( mbedtls_sha256_context *ctx )
{
+ SHA256_VALIDATE( ctx != NULL );
+
memset( ctx, 0, sizeof( mbedtls_sha256_context ) );
}
@@ -90,6 +96,9 @@ void mbedtls_sha256_free( mbedtls_sha256_context *ctx )
void mbedtls_sha256_clone( mbedtls_sha256_context *dst,
const mbedtls_sha256_context *src )
{
+ SHA256_VALIDATE( dst != NULL );
+ SHA256_VALIDATE( src != NULL );
+
*dst = *src;
}
@@ -98,6 +107,9 @@ void mbedtls_sha256_clone( mbedtls_sha256_context *dst,
*/
int mbedtls_sha256_starts_ret( mbedtls_sha256_context *ctx, int is224 )
{
+ SHA256_VALIDATE_RET( ctx != NULL );
+ SHA256_VALIDATE_RET( is224 == 0 || is224 == 1 );
+
ctx->total[0] = 0;
ctx->total[1] = 0;
@@ -192,6 +204,9 @@ int mbedtls_internal_sha256_process( mbedtls_sha256_context *ctx,
uint32_t A[8];
unsigned int i;
+ SHA256_VALIDATE_RET( ctx != NULL );
+ SHA256_VALIDATE_RET( (const unsigned char *)data != NULL );
+
for( i = 0; i < 8; i++ )
A[i] = ctx->state[i];
@@ -263,6 +278,9 @@ int mbedtls_sha256_update_ret( mbedtls_sha256_context *ctx,
size_t fill;
uint32_t left;
+ SHA256_VALIDATE_RET( ctx != NULL );
+ SHA256_VALIDATE_RET( ilen == 0 || input != NULL );
+
if( ilen == 0 )
return( 0 );
@@ -321,6 +339,9 @@ int mbedtls_sha256_finish_ret( mbedtls_sha256_context *ctx,
uint32_t used;
uint32_t high, low;
+ SHA256_VALIDATE_RET( ctx != NULL );
+ SHA256_VALIDATE_RET( (unsigned char *)output != NULL );
+
/*
* Add padding: 0x80 then 0x00 until 8 bytes remain for the length
*/
@@ -395,6 +416,10 @@ int mbedtls_sha256_ret( const unsigned char *input,
int ret;
mbedtls_sha256_context ctx;
+ SHA256_VALIDATE_RET( is224 == 0 || is224 == 1 );
+ SHA256_VALIDATE_RET( ilen == 0 || input != NULL );
+ SHA256_VALIDATE_RET( (unsigned char *)output != NULL );
+
mbedtls_sha256_init( &ctx );
if( ( ret = mbedtls_sha256_starts_ret( &ctx, is224 ) ) != 0 )
diff --git a/thirdparty/mbedtls/library/sha512.c b/thirdparty/mbedtls/library/sha512.c
index a9440e8af5..941ecda762 100644
--- a/thirdparty/mbedtls/library/sha512.c
+++ b/thirdparty/mbedtls/library/sha512.c
@@ -55,6 +55,10 @@
#endif /* MBEDTLS_PLATFORM_C */
#endif /* MBEDTLS_SELF_TEST */
+#define SHA512_VALIDATE_RET(cond) \
+ MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_SHA512_BAD_INPUT_DATA )
+#define SHA512_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE( cond )
+
#if !defined(MBEDTLS_SHA512_ALT)
/*
@@ -90,6 +94,8 @@
void mbedtls_sha512_init( mbedtls_sha512_context *ctx )
{
+ SHA512_VALIDATE( ctx != NULL );
+
memset( ctx, 0, sizeof( mbedtls_sha512_context ) );
}
@@ -104,6 +110,9 @@ void mbedtls_sha512_free( mbedtls_sha512_context *ctx )
void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
const mbedtls_sha512_context *src )
{
+ SHA512_VALIDATE( dst != NULL );
+ SHA512_VALIDATE( src != NULL );
+
*dst = *src;
}
@@ -112,6 +121,9 @@ void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
*/
int mbedtls_sha512_starts_ret( mbedtls_sha512_context *ctx, int is384 )
{
+ SHA512_VALIDATE_RET( ctx != NULL );
+ SHA512_VALIDATE_RET( is384 == 0 || is384 == 1 );
+
ctx->total[0] = 0;
ctx->total[1] = 0;
@@ -209,6 +221,9 @@ int mbedtls_internal_sha512_process( mbedtls_sha512_context *ctx,
uint64_t temp1, temp2, W[80];
uint64_t A, B, C, D, E, F, G, H;
+ SHA512_VALIDATE_RET( ctx != NULL );
+ SHA512_VALIDATE_RET( (const unsigned char *)data != NULL );
+
#define SHR(x,n) (x >> n)
#define ROTR(x,n) (SHR(x,n) | (x << (64 - n)))
@@ -294,6 +309,9 @@ int mbedtls_sha512_update_ret( mbedtls_sha512_context *ctx,
size_t fill;
unsigned int left;
+ SHA512_VALIDATE_RET( ctx != NULL );
+ SHA512_VALIDATE_RET( ilen == 0 || input != NULL );
+
if( ilen == 0 )
return( 0 );
@@ -351,6 +369,9 @@ int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
unsigned used;
uint64_t high, low;
+ SHA512_VALIDATE_RET( ctx != NULL );
+ SHA512_VALIDATE_RET( (unsigned char *)output != NULL );
+
/*
* Add padding: 0x80 then 0x00 until 16 bytes remain for the length
*/
@@ -427,6 +448,10 @@ int mbedtls_sha512_ret( const unsigned char *input,
int ret;
mbedtls_sha512_context ctx;
+ SHA512_VALIDATE_RET( is384 == 0 || is384 == 1 );
+ SHA512_VALIDATE_RET( ilen == 0 || input != NULL );
+ SHA512_VALIDATE_RET( (unsigned char *)output != NULL );
+
mbedtls_sha512_init( &ctx );
if( ( ret = mbedtls_sha512_starts_ret( &ctx, is384 ) ) != 0 )
diff --git a/thirdparty/mbedtls/library/ssl_ciphersuites.c b/thirdparty/mbedtls/library/ssl_ciphersuites.c
index 59cdc7a806..745474effe 100644
--- a/thirdparty/mbedtls/library/ssl_ciphersuites.c
+++ b/thirdparty/mbedtls/library/ssl_ciphersuites.c
@@ -2320,7 +2320,8 @@ mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg( const mbedtls_ssl_ciphers
#endif /* MBEDTLS_PK_C */
-#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)
+#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
+ defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info )
{
switch( info->key_exchange )
@@ -2330,13 +2331,14 @@ int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info )
case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
+ case MBEDTLS_KEY_EXCHANGE_ECJPAKE:
return( 1 );
default:
return( 0 );
}
}
-#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C */
+#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED*/
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info )
diff --git a/thirdparty/mbedtls/library/ssl_cli.c b/thirdparty/mbedtls/library/ssl_cli.c
index ba59c48989..afced7a99c 100644
--- a/thirdparty/mbedtls/library/ssl_cli.c
+++ b/thirdparty/mbedtls/library/ssl_cli.c
@@ -766,6 +766,10 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
unsigned char offer_compress;
const int *ciphersuites;
const mbedtls_ssl_ciphersuite_t *ciphersuite_info;
+#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
+ defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
+ int uses_ec = 0;
+#endif
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write client hello" ) );
@@ -917,6 +921,11 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %04x",
ciphersuites[i] ) );
+#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
+ defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
+ uses_ec |= mbedtls_ssl_ciphersuite_uses_ec( ciphersuite_info );
+#endif
+
n++;
*p++ = (unsigned char)( ciphersuites[i] >> 8 );
*p++ = (unsigned char)( ciphersuites[i] );
@@ -1010,11 +1019,14 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
- ssl_write_supported_elliptic_curves_ext( ssl, p + 2 + ext_len, &olen );
- ext_len += olen;
+ if( uses_ec )
+ {
+ ssl_write_supported_elliptic_curves_ext( ssl, p + 2 + ext_len, &olen );
+ ext_len += olen;
- ssl_write_supported_point_formats_ext( ssl, p + 2 + ext_len, &olen );
- ext_len += olen;
+ ssl_write_supported_point_formats_ext( ssl, p + 2 + ext_len, &olen );
+ ext_len += olen;
+ }
#endif
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
@@ -1076,11 +1088,20 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
mbedtls_ssl_send_flight_completed( ssl );
#endif
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
+ return( ret );
+ }
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
+ ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flight_transmit", ret );
return( ret );
}
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write client hello" ) );
@@ -1479,7 +1500,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
buf = ssl->in_msg;
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
/* No alert on a read error. */
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
@@ -1742,6 +1763,14 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %s", suite_info->name ) );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( suite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA &&
+ ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 )
+ {
+ ssl->handshake->ecrs_enabled = 1;
+ }
+#endif
+
if( comp != MBEDTLS_SSL_COMPRESS_NULL
#if defined(MBEDTLS_ZLIB_SUPPORT)
&& comp != MBEDTLS_SSL_COMPRESS_DEFLATE
@@ -1998,8 +2027,14 @@ static int ssl_parse_server_dh_params( mbedtls_ssl_context *ssl, unsigned char *
static int ssl_check_server_ecdh_params( const mbedtls_ssl_context *ssl )
{
const mbedtls_ecp_curve_info *curve_info;
+ mbedtls_ecp_group_id grp_id;
+#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
+ grp_id = ssl->handshake->ecdh_ctx.grp.id;
+#else
+ grp_id = ssl->handshake->ecdh_ctx.grp_id;
+#endif
- curve_info = mbedtls_ecp_curve_info_from_grp_id( ssl->handshake->ecdh_ctx.grp.id );
+ curve_info = mbedtls_ecp_curve_info_from_grp_id( grp_id );
if( curve_info == NULL )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
@@ -2009,14 +2044,15 @@ static int ssl_check_server_ecdh_params( const mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDH curve: %s", curve_info->name ) );
#if defined(MBEDTLS_ECP_C)
- if( mbedtls_ssl_check_curve( ssl, ssl->handshake->ecdh_ctx.grp.id ) != 0 )
+ if( mbedtls_ssl_check_curve( ssl, grp_id ) != 0 )
#else
if( ssl->handshake->ecdh_ctx.grp.nbits < 163 ||
ssl->handshake->ecdh_ctx.grp.nbits > 521 )
#endif
return( -1 );
- MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp", &ssl->handshake->ecdh_ctx.Qp );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_QP );
return( 0 );
}
@@ -2047,6 +2083,10 @@ static int ssl_parse_server_ecdh_params( mbedtls_ssl_context *ssl,
(const unsigned char **) p, end ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ecdh_read_params" ), ret );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ ret = MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS;
+#endif
return( ret );
}
@@ -2076,7 +2116,7 @@ static int ssl_parse_server_psk_hint( mbedtls_ssl_context *ssl,
*
* opaque psk_identity_hint<0..2^16-1>;
*/
- if( (*p) > end - 2 )
+ if( end - (*p) < 2 )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message "
"(psk_identity_hint length)" ) );
@@ -2085,7 +2125,7 @@ static int ssl_parse_server_psk_hint( mbedtls_ssl_context *ssl,
len = (*p)[0] << 8 | (*p)[1];
*p += 2;
- if( (*p) > end - len )
+ if( end - (*p) < (int) len )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message "
"(psk_identity_hint length)" ) );
@@ -2328,7 +2368,15 @@ static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl )
#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED ||
MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled &&
+ ssl->handshake->ecrs_state == ssl_ecrs_ske_start_processing )
+ {
+ goto start_processing;
+ }
+#endif
+
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
return( ret );
@@ -2365,6 +2413,12 @@ static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE );
}
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled )
+ ssl->handshake->ecrs_state = ssl_ecrs_ske_start_processing;
+
+start_processing:
+#endif
p = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl );
end = ssl->in_msg + ssl->in_hslen;
MBEDTLS_SSL_DEBUG_BUF( 3, "server key exchange", p, end - p );
@@ -2457,6 +2511,7 @@ static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl )
mbedtls_pk_type_t pk_alg = MBEDTLS_PK_NONE;
unsigned char *params = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl );
size_t params_len = p - params;
+ void *rs_ctx = NULL;
/*
* Handle the digitally-signed structure
@@ -2579,12 +2634,25 @@ static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH );
}
- if( ( ret = mbedtls_pk_verify( &ssl->session_negotiate->peer_cert->pk,
- md_alg, hash, hashlen, p, sig_len ) ) != 0 )
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled )
+ rs_ctx = &ssl->handshake->ecrs_ctx.pk;
+#endif
+
+ if( ( ret = mbedtls_pk_verify_restartable(
+ &ssl->session_negotiate->peer_cert->pk,
+ md_alg, hash, hashlen, p, sig_len, rs_ctx ) ) != 0 )
{
- mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
- MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ret != MBEDTLS_ERR_ECP_IN_PROGRESS )
+#endif
+ mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
+ MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR );
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_pk_verify", ret );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ ret = MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS;
+#endif
return( ret );
}
}
@@ -2635,7 +2703,7 @@ static int ssl_parse_certificate_request( mbedtls_ssl_context *ssl )
return( 0 );
}
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
return( ret );
@@ -2709,7 +2777,7 @@ static int ssl_parse_certificate_request( mbedtls_ssl_context *ssl )
* therefore the buffer length at this point must be greater than that
* regardless of the actual code path.
*/
- if( ssl->in_hslen <= mbedtls_ssl_hs_hdr_len( ssl ) + 3 + n )
+ if( ssl->in_hslen <= mbedtls_ssl_hs_hdr_len( ssl ) + 2 + n )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate request message" ) );
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
@@ -2787,7 +2855,7 @@ static int ssl_parse_server_hello_done( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse server hello done" ) );
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
return( ret );
@@ -2882,6 +2950,16 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
*/
i = 4;
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled )
+ {
+ if( ssl->handshake->ecrs_state == ssl_ecrs_cke_ecdh_calc_secret )
+ goto ecdh_calc_secret;
+
+ mbedtls_ecdh_enable_restart( &ssl->handshake->ecdh_ctx );
+ }
+#endif
+
ret = mbedtls_ecdh_make_public( &ssl->handshake->ecdh_ctx,
&n,
&ssl->out_msg[i], 1000,
@@ -2889,11 +2967,27 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
if( ret != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_make_public", ret );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ ret = MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS;
+#endif
return( ret );
}
- MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Q", &ssl->handshake->ecdh_ctx.Q );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_Q );
+
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled )
+ {
+ ssl->handshake->ecrs_n = n;
+ ssl->handshake->ecrs_state = ssl_ecrs_cke_ecdh_calc_secret;
+ }
+ecdh_calc_secret:
+ if( ssl->handshake->ecrs_enabled )
+ n = ssl->handshake->ecrs_n;
+#endif
if( ( ret = mbedtls_ecdh_calc_secret( &ssl->handshake->ecdh_ctx,
&ssl->handshake->pmslen,
ssl->handshake->premaster,
@@ -2901,10 +2995,15 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_calc_secret", ret );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ ret = MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS;
+#endif
return( ret );
}
- MBEDTLS_SSL_DEBUG_MPI( 3, "ECDH: z", &ssl->handshake->ecdh_ctx.z );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_Z );
}
else
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED ||
@@ -2999,7 +3098,8 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
return( ret );
}
- MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Q", &ssl->handshake->ecdh_ctx.Q );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_Q );
}
else
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
@@ -3063,9 +3163,9 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
ssl->state++;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
@@ -3119,9 +3219,18 @@ static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl )
unsigned char *hash_start = hash;
mbedtls_md_type_t md_alg = MBEDTLS_MD_NONE;
unsigned int hashlen;
+ void *rs_ctx = NULL;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write certificate verify" ) );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled &&
+ ssl->handshake->ecrs_state == ssl_ecrs_crt_vrfy_sign )
+ {
+ goto sign;
+ }
+#endif
+
if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret );
@@ -3153,8 +3262,15 @@ static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl )
}
/*
- * Make an RSA signature of the handshake digests
+ * Make a signature of the handshake digests
*/
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled )
+ ssl->handshake->ecrs_state = ssl_ecrs_crt_vrfy_sign;
+
+sign:
+#endif
+
ssl->handshake->calc_verify( ssl, hash );
#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \
@@ -3231,11 +3347,21 @@ static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
}
- if( ( ret = mbedtls_pk_sign( mbedtls_ssl_own_key( ssl ), md_alg, hash_start, hashlen,
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled )
+ rs_ctx = &ssl->handshake->ecrs_ctx.pk;
+#endif
+
+ if( ( ret = mbedtls_pk_sign_restartable( mbedtls_ssl_own_key( ssl ),
+ md_alg, hash_start, hashlen,
ssl->out_msg + 6 + offset, &n,
- ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 )
+ ssl->conf->f_rng, ssl->conf->p_rng, rs_ctx ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_pk_sign", ret );
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ ret = MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS;
+#endif
return( ret );
}
@@ -3248,9 +3374,9 @@ static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl )
ssl->state++;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
@@ -3276,7 +3402,7 @@ static int ssl_parse_new_session_ticket( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse new session ticket" ) );
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
return( ret );
@@ -3311,8 +3437,8 @@ static int ssl_parse_new_session_ticket( mbedtls_ssl_context *ssl )
msg = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl );
- lifetime = ( msg[0] << 24 ) | ( msg[1] << 16 ) |
- ( msg[2] << 8 ) | ( msg[3] );
+ lifetime = ( ((uint32_t) msg[0]) << 24 ) | ( msg[1] << 16 ) |
+ ( msg[2] << 8 ) | ( msg[3] );
ticket_len = ( msg[4] << 8 ) | ( msg[5] );
@@ -3390,10 +3516,10 @@ int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl )
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING )
{
- if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 )
return( ret );
}
-#endif
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
/* Change state now, so that it is right in mbedtls_ssl_read_record(), used
* by DTLS for dropping out-of-sequence ChangeCipherSpec records */
diff --git a/thirdparty/mbedtls/library/ssl_srv.c b/thirdparty/mbedtls/library/ssl_srv.c
index 52087ae6e1..bc77f80203 100644
--- a/thirdparty/mbedtls/library/ssl_srv.c
+++ b/thirdparty/mbedtls/library/ssl_srv.c
@@ -1294,7 +1294,7 @@ read_record_header:
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO );
}
- memcpy( ssl->out_ctr + 2, ssl->in_ctr + 2, 6 );
+ memcpy( ssl->cur_out_ctr + 2, ssl->in_ctr + 2, 6 );
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
if( mbedtls_ssl_dtls_replay_check( ssl ) != 0 )
@@ -2384,12 +2384,21 @@ static int ssl_write_hello_verify_request( mbedtls_ssl_context *ssl )
ssl->state = MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
+ ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flight_transmit", ret );
+ return( ret );
+ }
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write hello verify request" ) );
return( 0 );
@@ -2589,8 +2598,12 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
- ssl_write_supported_point_formats_ext( ssl, p + 2 + ext_len, &olen );
- ext_len += olen;
+ if ( mbedtls_ssl_ciphersuite_uses_ec(
+ mbedtls_ssl_ciphersuite_from_id( ssl->session_negotiate->ciphersuite ) ) )
+ {
+ ssl_write_supported_point_formats_ext( ssl, p + 2 + ext_len, &olen );
+ ext_len += olen;
+ }
#endif
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
@@ -2620,7 +2633,7 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE;
ssl->out_msg[0] = MBEDTLS_SSL_HS_SERVER_HELLO;
- ret = mbedtls_ssl_write_record( ssl );
+ ret = mbedtls_ssl_write_handshake_msg( ssl );
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write server hello" ) );
@@ -2815,7 +2828,7 @@ static int ssl_write_certificate_request( mbedtls_ssl_context *ssl )
ssl->out_msg[4 + ct_len + sa_len] = (unsigned char)( total_dn_size >> 8 );
ssl->out_msg[5 + ct_len + sa_len] = (unsigned char)( total_dn_size );
- ret = mbedtls_ssl_write_record( ssl );
+ ret = mbedtls_ssl_write_handshake_msg( ssl );
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write certificate request" ) );
@@ -3035,8 +3048,8 @@ curve_matching_done:
MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDHE curve: %s", (*curve)->name ) );
- if( ( ret = mbedtls_ecp_group_load( &ssl->handshake->ecdh_ctx.grp,
- (*curve)->grp_id ) ) != 0 )
+ if( ( ret = mbedtls_ecdh_setup( &ssl->handshake->ecdh_ctx,
+ (*curve)->grp_id ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecp_group_load", ret );
return( ret );
@@ -3058,7 +3071,8 @@ curve_matching_done:
ssl->out_msglen += len;
- MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Q ", &ssl->handshake->ecdh_ctx.Q );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_Q );
}
#endif /* MBEDTLS_KEY_EXCHANGE__SOME__ECDHE_ENABLED */
@@ -3332,9 +3346,9 @@ static int ssl_write_server_key_exchange( mbedtls_ssl_context *ssl )
ssl->state++;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
@@ -3359,11 +3373,20 @@ static int ssl_write_server_hello_done( mbedtls_ssl_context *ssl )
mbedtls_ssl_send_flight_completed( ssl );
#endif
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
+ return( ret );
+ }
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
+ ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flight_transmit", ret );
return( ret );
}
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write server hello done" ) );
@@ -3706,7 +3729,7 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
}
else
#endif
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
return( ret );
@@ -3772,7 +3795,8 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP );
}
- MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp ", &ssl->handshake->ecdh_ctx.Qp );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_QP );
if( ( ret = mbedtls_ecdh_calc_secret( &ssl->handshake->ecdh_ctx,
&ssl->handshake->pmslen,
@@ -3784,7 +3808,8 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS );
}
- MBEDTLS_SSL_DEBUG_MPI( 3, "ECDH: z ", &ssl->handshake->ecdh_ctx.z );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_Z );
}
else
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED ||
@@ -3897,7 +3922,8 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP );
}
- MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp ", &ssl->handshake->ecdh_ctx.Qp );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_QP );
if( ( ret = mbedtls_ssl_psk_derive_premaster( ssl,
ciphersuite_info->key_exchange ) ) != 0 )
@@ -4016,25 +4042,10 @@ static int ssl_parse_certificate_verify( mbedtls_ssl_context *ssl )
}
/* Read the message without adding it to the checksum */
- do {
-
- do ret = mbedtls_ssl_read_record_layer( ssl );
- while( ret == MBEDTLS_ERR_SSL_CONTINUE_PROCESSING );
-
- if( ret != 0 )
- {
- MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ssl_read_record_layer" ), ret );
- return( ret );
- }
-
- ret = mbedtls_ssl_handle_message_type( ssl );
-
- } while( MBEDTLS_ERR_SSL_NON_FATAL == ret ||
- MBEDTLS_ERR_SSL_CONTINUE_PROCESSING == ret );
-
+ ret = mbedtls_ssl_read_record( ssl, 0 /* no checksum update */ );
if( 0 != ret )
{
- MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ssl_handle_message_type" ), ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ssl_read_record" ), ret );
return( ret );
}
@@ -4223,9 +4234,9 @@ static int ssl_write_new_session_ticket( mbedtls_ssl_context *ssl )
*/
ssl->handshake->new_session_ticket = 0;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
@@ -4254,10 +4265,10 @@ int mbedtls_ssl_handshake_server_step( mbedtls_ssl_context *ssl )
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING )
{
- if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 )
return( ret );
}
-#endif
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
switch( ssl->state )
{
diff --git a/thirdparty/mbedtls/library/ssl_ticket.c b/thirdparty/mbedtls/library/ssl_ticket.c
index a2b304869e..8492c19a8c 100644
--- a/thirdparty/mbedtls/library/ssl_ticket.c
+++ b/thirdparty/mbedtls/library/ssl_ticket.c
@@ -97,7 +97,7 @@ static int ssl_ticket_update_keys( mbedtls_ssl_ticket_context *ctx )
uint32_t current_time = (uint32_t) mbedtls_time( NULL );
uint32_t key_time = ctx->keys[ctx->active].generation_time;
- if( current_time > key_time &&
+ if( current_time >= key_time &&
current_time - key_time < ctx->ticket_lifetime )
{
return( 0 );
@@ -188,9 +188,9 @@ static int ssl_save_session( const mbedtls_ssl_session *session,
if( left < 3 + cert_len )
return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL );
- *p++ = (unsigned char)( cert_len >> 16 & 0xFF );
- *p++ = (unsigned char)( cert_len >> 8 & 0xFF );
- *p++ = (unsigned char)( cert_len & 0xFF );
+ *p++ = (unsigned char)( ( cert_len >> 16 ) & 0xFF );
+ *p++ = (unsigned char)( ( cert_len >> 8 ) & 0xFF );
+ *p++ = (unsigned char)( ( cert_len ) & 0xFF );
if( session->peer_cert != NULL )
memcpy( p, session->peer_cert->raw.p, cert_len );
@@ -215,14 +215,14 @@ static int ssl_load_session( mbedtls_ssl_session *session,
size_t cert_len;
#endif /* MBEDTLS_X509_CRT_PARSE_C */
- if( p + sizeof( mbedtls_ssl_session ) > end )
+ if( sizeof( mbedtls_ssl_session ) > (size_t)( end - p ) )
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
memcpy( session, p, sizeof( mbedtls_ssl_session ) );
p += sizeof( mbedtls_ssl_session );
#if defined(MBEDTLS_X509_CRT_PARSE_C)
- if( p + 3 > end )
+ if( 3 > (size_t)( end - p ) )
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
cert_len = ( p[0] << 16 ) | ( p[1] << 8 ) | p[2];
@@ -236,7 +236,7 @@ static int ssl_load_session( mbedtls_ssl_session *session,
{
int ret;
- if( p + cert_len > end )
+ if( cert_len > (size_t)( end - p ) )
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
session->peer_cert = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) );
@@ -247,7 +247,7 @@ static int ssl_load_session( mbedtls_ssl_session *session,
mbedtls_x509_crt_init( session->peer_cert );
if( ( ret = mbedtls_x509_crt_parse_der( session->peer_cert,
- p, cert_len ) ) != 0 )
+ p, cert_len ) ) != 0 )
{
mbedtls_x509_crt_free( session->peer_cert );
mbedtls_free( session->peer_cert );
diff --git a/thirdparty/mbedtls/library/ssl_tls.c b/thirdparty/mbedtls/library/ssl_tls.c
index 91f96c8ab6..38690fa664 100644
--- a/thirdparty/mbedtls/library/ssl_tls.c
+++ b/thirdparty/mbedtls/library/ssl_tls.c
@@ -54,6 +54,9 @@
#include "mbedtls/oid.h"
#endif
+static void ssl_reset_in_out_pointers( mbedtls_ssl_context *ssl );
+static uint32_t ssl_get_hs_total_len( mbedtls_ssl_context const *ssl );
+
/* Length of the "epoch" field in the record header */
static inline size_t ssl_ep_len( const mbedtls_ssl_context *ssl )
{
@@ -96,7 +99,101 @@ static int ssl_check_timer( mbedtls_ssl_context *ssl )
return( 0 );
}
+static void ssl_update_out_pointers( mbedtls_ssl_context *ssl,
+ mbedtls_ssl_transform *transform );
+static void ssl_update_in_pointers( mbedtls_ssl_context *ssl,
+ mbedtls_ssl_transform *transform );
+
+#define SSL_DONT_FORCE_FLUSH 0
+#define SSL_FORCE_FLUSH 1
+
#if defined(MBEDTLS_SSL_PROTO_DTLS)
+
+/* Forward declarations for functions related to message buffering. */
+static void ssl_buffering_free( mbedtls_ssl_context *ssl );
+static void ssl_buffering_free_slot( mbedtls_ssl_context *ssl,
+ uint8_t slot );
+static void ssl_free_buffered_record( mbedtls_ssl_context *ssl );
+static int ssl_load_buffered_message( mbedtls_ssl_context *ssl );
+static int ssl_load_buffered_record( mbedtls_ssl_context *ssl );
+static int ssl_buffer_message( mbedtls_ssl_context *ssl );
+static int ssl_buffer_future_record( mbedtls_ssl_context *ssl );
+static int ssl_next_record_is_in_datagram( mbedtls_ssl_context *ssl );
+
+static size_t ssl_get_current_mtu( const mbedtls_ssl_context *ssl );
+static size_t ssl_get_maximum_datagram_size( mbedtls_ssl_context const *ssl )
+{
+ size_t mtu = ssl_get_current_mtu( ssl );
+
+ if( mtu != 0 && mtu < MBEDTLS_SSL_OUT_BUFFER_LEN )
+ return( mtu );
+
+ return( MBEDTLS_SSL_OUT_BUFFER_LEN );
+}
+
+static int ssl_get_remaining_space_in_datagram( mbedtls_ssl_context const *ssl )
+{
+ size_t const bytes_written = ssl->out_left;
+ size_t const mtu = ssl_get_maximum_datagram_size( ssl );
+
+ /* Double-check that the write-index hasn't gone
+ * past what we can transmit in a single datagram. */
+ if( bytes_written > mtu )
+ {
+ /* Should never happen... */
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
+
+ return( (int) ( mtu - bytes_written ) );
+}
+
+static int ssl_get_remaining_payload_in_datagram( mbedtls_ssl_context const *ssl )
+{
+ int ret;
+ size_t remaining, expansion;
+ size_t max_len = MBEDTLS_SSL_OUT_CONTENT_LEN;
+
+#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH)
+ const size_t mfl = mbedtls_ssl_get_max_frag_len( ssl );
+
+ if( max_len > mfl )
+ max_len = mfl;
+
+ /* By the standard (RFC 6066 Sect. 4), the MFL extension
+ * only limits the maximum record payload size, so in theory
+ * we would be allowed to pack multiple records of payload size
+ * MFL into a single datagram. However, this would mean that there's
+ * no way to explicitly communicate MTU restrictions to the peer.
+ *
+ * The following reduction of max_len makes sure that we never
+ * write datagrams larger than MFL + Record Expansion Overhead.
+ */
+ if( max_len <= ssl->out_left )
+ return( 0 );
+
+ max_len -= ssl->out_left;
+#endif
+
+ ret = ssl_get_remaining_space_in_datagram( ssl );
+ if( ret < 0 )
+ return( ret );
+ remaining = (size_t) ret;
+
+ ret = mbedtls_ssl_get_record_expansion( ssl );
+ if( ret < 0 )
+ return( ret );
+ expansion = (size_t) ret;
+
+ if( remaining <= expansion )
+ return( 0 );
+
+ remaining -= expansion;
+ if( remaining >= max_len )
+ remaining = max_len;
+
+ return( (int) remaining );
+}
+
/*
* Double the retransmit timeout value, within the allowed range,
* returning -1 if the maximum value has already been reached.
@@ -108,6 +205,18 @@ static int ssl_double_retransmit_timeout( mbedtls_ssl_context *ssl )
if( ssl->handshake->retransmit_timeout >= ssl->conf->hs_timeout_max )
return( -1 );
+ /* Implement the final paragraph of RFC 6347 section 4.1.1.1
+ * in the following way: after the initial transmission and a first
+ * retransmission, back off to a temporary estimated MTU of 508 bytes.
+ * This value is guaranteed to be deliverable (if not guaranteed to be
+ * delivered) of any compliant IPv4 (and IPv6) network, and should work
+ * on most non-IP stacks too. */
+ if( ssl->handshake->retransmit_timeout != ssl->conf->hs_timeout_min )
+ {
+ ssl->handshake->mtu = 508;
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "mtu autoreduction to %d bytes", ssl->handshake->mtu ) );
+ }
+
new_timeout = 2 * ssl->handshake->retransmit_timeout;
/* Avoid arithmetic overflow and range overflow */
@@ -1224,7 +1333,8 @@ int mbedtls_ssl_psk_derive_premaster( mbedtls_ssl_context *ssl, mbedtls_key_exch
*(p++) = (unsigned char)( zlen );
p += zlen;
- MBEDTLS_SSL_DEBUG_MPI( 3, "ECDH: z", &ssl->handshake->ecdh_ctx.z );
+ MBEDTLS_SSL_DEBUG_ECDH( 3, &ssl->handshake->ecdh_ctx,
+ MBEDTLS_DEBUG_ECDH_Z );
}
else
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
@@ -1345,14 +1455,6 @@ static int ssl_encrypt_buf( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_BUF( 4, "before encrypt: output payload",
ssl->out_msg, ssl->out_msglen );
- if( ssl->out_msglen > MBEDTLS_SSL_OUT_CONTENT_LEN )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "Record content %u too large, maximum %d",
- (unsigned) ssl->out_msglen,
- MBEDTLS_SSL_OUT_CONTENT_LEN ) );
- return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
- }
-
/*
* Add MAC before if needed
*/
@@ -1626,6 +1728,8 @@ static int ssl_encrypt_buf( mbedtls_ssl_context *ssl )
#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC)
if( auth_done == 0 )
{
+ unsigned char mac[MBEDTLS_SSL_MAC_ADD];
+
/*
* MAC(MAC_write_key, seq_num +
* TLSCipherText.type +
@@ -1648,10 +1752,12 @@ static int ssl_encrypt_buf( mbedtls_ssl_context *ssl )
mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc, pseudo_hdr, 13 );
mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc,
ssl->out_iv, ssl->out_msglen );
- mbedtls_md_hmac_finish( &ssl->transform_out->md_ctx_enc,
- ssl->out_iv + ssl->out_msglen );
+ mbedtls_md_hmac_finish( &ssl->transform_out->md_ctx_enc, mac );
mbedtls_md_hmac_reset( &ssl->transform_out->md_ctx_enc );
+ memcpy( ssl->out_iv + ssl->out_msglen, mac,
+ ssl->transform_out->maclen );
+
ssl->out_msglen += ssl->transform_out->maclen;
auth_done++;
}
@@ -2202,13 +2308,13 @@ static int ssl_decrypt_buf( mbedtls_ssl_context *ssl )
correct = 0;
}
auth_done++;
-
- /*
- * Finally check the correct flag
- */
- if( correct == 0 )
- return( MBEDTLS_ERR_SSL_INVALID_MAC );
}
+
+ /*
+ * Finally check the correct flag
+ */
+ if( correct == 0 )
+ return( MBEDTLS_ERR_SSL_INVALID_MAC );
#endif /* SSL_SOME_MODES_USE_MAC */
/* Make extra sure authentication was performed, exactly once */
@@ -2644,7 +2750,7 @@ int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want )
int mbedtls_ssl_flush_output( mbedtls_ssl_context *ssl )
{
int ret;
- unsigned char *buf, i;
+ unsigned char *buf;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> flush output" ) );
@@ -2667,8 +2773,7 @@ int mbedtls_ssl_flush_output( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 2, ( "message length: %d, out_left: %d",
mbedtls_ssl_hdr_len( ssl ) + ssl->out_msglen, ssl->out_left ) );
- buf = ssl->out_hdr + mbedtls_ssl_hdr_len( ssl ) +
- ssl->out_msglen - ssl->out_left;
+ buf = ssl->out_hdr - ssl->out_left;
ret = ssl->f_send( ssl->p_bio, buf, ssl->out_left );
MBEDTLS_SSL_DEBUG_RET( 2, "ssl->f_send", ret );
@@ -2687,16 +2792,17 @@ int mbedtls_ssl_flush_output( mbedtls_ssl_context *ssl )
ssl->out_left -= ret;
}
- for( i = 8; i > ssl_ep_len( ssl ); i-- )
- if( ++ssl->out_ctr[i - 1] != 0 )
- break;
-
- /* The loop goes to its end iff the counter is wrapping */
- if( i == ssl_ep_len( ssl ) )
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
+ {
+ ssl->out_hdr = ssl->out_buf;
+ }
+ else
+#endif
{
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "outgoing message counter would wrap" ) );
- return( MBEDTLS_ERR_SSL_COUNTER_WRAPPING );
+ ssl->out_hdr = ssl->out_buf + 8;
}
+ ssl_update_out_pointers( ssl, ssl->transform_out );
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= flush output" ) );
@@ -2713,6 +2819,9 @@ int mbedtls_ssl_flush_output( mbedtls_ssl_context *ssl )
static int ssl_flight_append( mbedtls_ssl_context *ssl )
{
mbedtls_ssl_flight_item *msg;
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> ssl_flight_append" ) );
+ MBEDTLS_SSL_DEBUG_BUF( 4, "message appended to flight",
+ ssl->out_msg, ssl->out_msglen );
/* Allocate space for current message */
if( ( msg = mbedtls_calloc( 1, sizeof( mbedtls_ssl_flight_item ) ) ) == NULL )
@@ -2746,6 +2855,7 @@ static int ssl_flight_append( mbedtls_ssl_context *ssl )
cur->next = msg;
}
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= ssl_flight_append" ) );
return( 0 );
}
@@ -2794,19 +2904,12 @@ static void ssl_swap_epochs( mbedtls_ssl_context *ssl )
ssl->handshake->alt_transform_out = tmp_transform;
/* Swap epoch + sequence_number */
- memcpy( tmp_out_ctr, ssl->out_ctr, 8 );
- memcpy( ssl->out_ctr, ssl->handshake->alt_out_ctr, 8 );
+ memcpy( tmp_out_ctr, ssl->cur_out_ctr, 8 );
+ memcpy( ssl->cur_out_ctr, ssl->handshake->alt_out_ctr, 8 );
memcpy( ssl->handshake->alt_out_ctr, tmp_out_ctr, 8 );
/* Adjust to the newly activated transform */
- if( ssl->transform_out != NULL &&
- ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 )
- {
- ssl->out_msg = ssl->out_iv + ssl->transform_out->ivlen -
- ssl->transform_out->fixed_ivlen;
- }
- else
- ssl->out_msg = ssl->out_iv;
+ ssl_update_out_pointers( ssl, ssl->transform_out );
#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL)
if( mbedtls_ssl_hw_record_activate != NULL )
@@ -2822,20 +2925,38 @@ static void ssl_swap_epochs( mbedtls_ssl_context *ssl )
/*
* Retransmit the current flight of messages.
+ */
+int mbedtls_ssl_resend( mbedtls_ssl_context *ssl )
+{
+ int ret = 0;
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> mbedtls_ssl_resend" ) );
+
+ ret = mbedtls_ssl_flight_transmit( ssl );
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= mbedtls_ssl_resend" ) );
+
+ return( ret );
+}
+
+/*
+ * Transmit or retransmit the current flight of messages.
*
* Need to remember the current message in case flush_output returns
* WANT_WRITE, causing us to exit this function and come back later.
* This function must be called until state is no longer SENDING.
*/
-int mbedtls_ssl_resend( mbedtls_ssl_context *ssl )
+int mbedtls_ssl_flight_transmit( mbedtls_ssl_context *ssl )
{
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> mbedtls_ssl_resend" ) );
+ int ret;
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> mbedtls_ssl_flight_transmit" ) );
if( ssl->handshake->retransmit_state != MBEDTLS_SSL_RETRANS_SENDING )
{
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "initialise resending" ) );
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "initialise flight transmission" ) );
ssl->handshake->cur_msg = ssl->handshake->flight;
+ ssl->handshake->cur_msg_p = ssl->handshake->flight->p + 12;
ssl_swap_epochs( ssl );
ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_SENDING;
@@ -2843,33 +2964,129 @@ int mbedtls_ssl_resend( mbedtls_ssl_context *ssl )
while( ssl->handshake->cur_msg != NULL )
{
- int ret;
- mbedtls_ssl_flight_item *cur = ssl->handshake->cur_msg;
+ size_t max_frag_len;
+ const mbedtls_ssl_flight_item * const cur = ssl->handshake->cur_msg;
+
+ int const is_finished =
+ ( cur->type == MBEDTLS_SSL_MSG_HANDSHAKE &&
+ cur->p[0] == MBEDTLS_SSL_HS_FINISHED );
+
+ uint8_t const force_flush = ssl->disable_datagram_packing == 1 ?
+ SSL_FORCE_FLUSH : SSL_DONT_FORCE_FLUSH;
/* Swap epochs before sending Finished: we can't do it after
* sending ChangeCipherSpec, in case write returns WANT_READ.
* Must be done before copying, may change out_msg pointer */
- if( cur->type == MBEDTLS_SSL_MSG_HANDSHAKE &&
- cur->p[0] == MBEDTLS_SSL_HS_FINISHED )
+ if( is_finished && ssl->handshake->cur_msg_p == ( cur->p + 12 ) )
{
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "swap epochs to send finished message" ) );
ssl_swap_epochs( ssl );
}
- memcpy( ssl->out_msg, cur->p, cur->len );
- ssl->out_msglen = cur->len;
- ssl->out_msgtype = cur->type;
+ ret = ssl_get_remaining_payload_in_datagram( ssl );
+ if( ret < 0 )
+ return( ret );
+ max_frag_len = (size_t) ret;
+
+ /* CCS is copied as is, while HS messages may need fragmentation */
+ if( cur->type == MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC )
+ {
+ if( max_frag_len == 0 )
+ {
+ if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 )
+ return( ret );
+
+ continue;
+ }
+
+ memcpy( ssl->out_msg, cur->p, cur->len );
+ ssl->out_msglen = cur->len;
+ ssl->out_msgtype = cur->type;
+
+ /* Update position inside current message */
+ ssl->handshake->cur_msg_p += cur->len;
+ }
+ else
+ {
+ const unsigned char * const p = ssl->handshake->cur_msg_p;
+ const size_t hs_len = cur->len - 12;
+ const size_t frag_off = p - ( cur->p + 12 );
+ const size_t rem_len = hs_len - frag_off;
+ size_t cur_hs_frag_len, max_hs_frag_len;
- ssl->handshake->cur_msg = cur->next;
+ if( ( max_frag_len < 12 ) || ( max_frag_len == 12 && hs_len != 0 ) )
+ {
+ if( is_finished )
+ ssl_swap_epochs( ssl );
- MBEDTLS_SSL_DEBUG_BUF( 3, "resent handshake message header", ssl->out_msg, 12 );
+ if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 )
+ return( ret );
+
+ continue;
+ }
+ max_hs_frag_len = max_frag_len - 12;
+
+ cur_hs_frag_len = rem_len > max_hs_frag_len ?
+ max_hs_frag_len : rem_len;
+
+ if( frag_off == 0 && cur_hs_frag_len != hs_len )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "fragmenting handshake message (%u > %u)",
+ (unsigned) cur_hs_frag_len,
+ (unsigned) max_hs_frag_len ) );
+ }
+
+ /* Messages are stored with handshake headers as if not fragmented,
+ * copy beginning of headers then fill fragmentation fields.
+ * Handshake headers: type(1) len(3) seq(2) f_off(3) f_len(3) */
+ memcpy( ssl->out_msg, cur->p, 6 );
+
+ ssl->out_msg[6] = ( ( frag_off >> 16 ) & 0xff );
+ ssl->out_msg[7] = ( ( frag_off >> 8 ) & 0xff );
+ ssl->out_msg[8] = ( ( frag_off ) & 0xff );
+
+ ssl->out_msg[ 9] = ( ( cur_hs_frag_len >> 16 ) & 0xff );
+ ssl->out_msg[10] = ( ( cur_hs_frag_len >> 8 ) & 0xff );
+ ssl->out_msg[11] = ( ( cur_hs_frag_len ) & 0xff );
+
+ MBEDTLS_SSL_DEBUG_BUF( 3, "handshake header", ssl->out_msg, 12 );
+
+ /* Copy the handshake message content and set records fields */
+ memcpy( ssl->out_msg + 12, p, cur_hs_frag_len );
+ ssl->out_msglen = cur_hs_frag_len + 12;
+ ssl->out_msgtype = cur->type;
+
+ /* Update position inside current message */
+ ssl->handshake->cur_msg_p += cur_hs_frag_len;
+ }
+
+ /* If done with the current message move to the next one if any */
+ if( ssl->handshake->cur_msg_p >= cur->p + cur->len )
+ {
+ if( cur->next != NULL )
+ {
+ ssl->handshake->cur_msg = cur->next;
+ ssl->handshake->cur_msg_p = cur->next->p + 12;
+ }
+ else
+ {
+ ssl->handshake->cur_msg = NULL;
+ ssl->handshake->cur_msg_p = NULL;
+ }
+ }
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ /* Actually send the message out */
+ if( ( ret = mbedtls_ssl_write_record( ssl, force_flush ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
return( ret );
}
}
+ if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 )
+ return( ret );
+
+ /* Update state and set timer */
if( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER )
ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_FINISHED;
else
@@ -2878,7 +3095,7 @@ int mbedtls_ssl_resend( mbedtls_ssl_context *ssl )
ssl_set_timer( ssl, ssl->handshake->retransmit_timeout );
}
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= mbedtls_ssl_resend" ) );
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= mbedtls_ssl_flight_transmit" ) );
return( 0 );
}
@@ -2896,6 +3113,12 @@ void mbedtls_ssl_recv_flight_completed( mbedtls_ssl_context *ssl )
/* The next incoming flight will start with this msg_seq */
ssl->handshake->in_flight_start_seq = ssl->handshake->in_msg_seq;
+ /* We don't want to remember CCS's across flight boundaries. */
+ ssl->handshake->buffering.seen_ccs = 0;
+
+ /* Clear future message buffering structure. */
+ ssl_buffering_free( ssl );
+
/* Cancel timer */
ssl_set_timer( ssl, 0 );
@@ -2927,43 +3150,102 @@ void mbedtls_ssl_send_flight_completed( mbedtls_ssl_context *ssl )
#endif /* MBEDTLS_SSL_PROTO_DTLS */
/*
- * Record layer functions
+ * Handshake layer functions
*/
/*
- * Write current record.
- * Uses ssl->out_msgtype, ssl->out_msglen and bytes at ssl->out_msg.
+ * Write (DTLS: or queue) current handshake (including CCS) message.
+ *
+ * - fill in handshake headers
+ * - update handshake checksum
+ * - DTLS: save message for resending
+ * - then pass to the record layer
+ *
+ * DTLS: except for HelloRequest, messages are only queued, and will only be
+ * actually sent when calling flight_transmit() or resend().
+ *
+ * Inputs:
+ * - ssl->out_msglen: 4 + actual handshake message len
+ * (4 is the size of handshake headers for TLS)
+ * - ssl->out_msg[0]: the handshake type (ClientHello, ServerHello, etc)
+ * - ssl->out_msg + 4: the handshake message body
+ *
+ * Outputs, ie state before passing to flight_append() or write_record():
+ * - ssl->out_msglen: the length of the record contents
+ * (including handshake headers but excluding record headers)
+ * - ssl->out_msg: the record contents (handshake headers + content)
*/
-int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl )
+int mbedtls_ssl_write_handshake_msg( mbedtls_ssl_context *ssl )
{
- int ret, done = 0, out_msg_type;
- size_t len = ssl->out_msglen;
+ int ret;
+ const size_t hs_len = ssl->out_msglen - 4;
+ const unsigned char hs_type = ssl->out_msg[0];
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write record" ) );
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write handshake message" ) );
+
+ /*
+ * Sanity checks
+ */
+ if( ssl->out_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE &&
+ ssl->out_msgtype != MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC )
+ {
+ /* In SSLv3, the client might send a NoCertificate alert. */
+#if defined(MBEDTLS_SSL_PROTO_SSL3) && defined(MBEDTLS_SSL_CLI_C)
+ if( ! ( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 &&
+ ssl->out_msgtype == MBEDTLS_SSL_MSG_ALERT &&
+ ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) )
+#endif /* MBEDTLS_SSL_PROTO_SSL3 && MBEDTLS_SSL_SRV_C */
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
+ }
+
+ /* Whenever we send anything different from a
+ * HelloRequest we should be in a handshake - double check. */
+ if( ! ( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE &&
+ hs_type == MBEDTLS_SSL_HS_HELLO_REQUEST ) &&
+ ssl->handshake == NULL )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
#if defined(MBEDTLS_SSL_PROTO_DTLS)
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
ssl->handshake != NULL &&
ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING )
{
- ; /* Skip special handshake treatment when resending */
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
}
- else
#endif
- if( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE )
- {
- out_msg_type = ssl->out_msg[0];
- if( out_msg_type != MBEDTLS_SSL_HS_HELLO_REQUEST &&
- ssl->handshake == NULL )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
- return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
- }
+ /* Double-check that we did not exceed the bounds
+ * of the outgoing record buffer.
+ * This should never fail as the various message
+ * writing functions must obey the bounds of the
+ * outgoing record buffer, but better be safe.
+ *
+ * Note: We deliberately do not check for the MTU or MFL here.
+ */
+ if( ssl->out_msglen > MBEDTLS_SSL_OUT_CONTENT_LEN )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "Record too large: "
+ "size %u, maximum %u",
+ (unsigned) ssl->out_msglen,
+ (unsigned) MBEDTLS_SSL_OUT_CONTENT_LEN ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
- ssl->out_msg[1] = (unsigned char)( ( len - 4 ) >> 16 );
- ssl->out_msg[2] = (unsigned char)( ( len - 4 ) >> 8 );
- ssl->out_msg[3] = (unsigned char)( ( len - 4 ) );
+ /*
+ * Fill handshake headers
+ */
+ if( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE )
+ {
+ ssl->out_msg[1] = (unsigned char)( hs_len >> 16 );
+ ssl->out_msg[2] = (unsigned char)( hs_len >> 8 );
+ ssl->out_msg[3] = (unsigned char)( hs_len );
/*
* DTLS has additional fields in the Handshake layer,
@@ -2980,17 +3262,16 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "DTLS handshake message too large: "
"size %u, maximum %u",
- (unsigned) ( ssl->in_hslen - 4 ),
+ (unsigned) ( hs_len ),
(unsigned) ( MBEDTLS_SSL_OUT_CONTENT_LEN - 12 ) ) );
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
}
- memmove( ssl->out_msg + 12, ssl->out_msg + 4, len - 4 );
+ memmove( ssl->out_msg + 12, ssl->out_msg + 4, hs_len );
ssl->out_msglen += 8;
- len += 8;
/* Write message_seq and update it, except for HelloRequest */
- if( out_msg_type != MBEDTLS_SSL_HS_HELLO_REQUEST )
+ if( hs_type != MBEDTLS_SSL_HS_HELLO_REQUEST )
{
ssl->out_msg[4] = ( ssl->handshake->out_msg_seq >> 8 ) & 0xFF;
ssl->out_msg[5] = ( ssl->handshake->out_msg_seq ) & 0xFF;
@@ -3002,23 +3283,23 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl )
ssl->out_msg[5] = 0;
}
- /* We don't fragment, so frag_offset = 0 and frag_len = len */
+ /* Handshake hashes are computed without fragmentation,
+ * so set frag_offset = 0 and frag_len = hs_len for now */
memset( ssl->out_msg + 6, 0x00, 3 );
memcpy( ssl->out_msg + 9, ssl->out_msg + 1, 3 );
}
#endif /* MBEDTLS_SSL_PROTO_DTLS */
- if( out_msg_type != MBEDTLS_SSL_HS_HELLO_REQUEST )
- ssl->handshake->update_checksum( ssl, ssl->out_msg, len );
+ /* Update running hashes of handshake messages seen */
+ if( hs_type != MBEDTLS_SSL_HS_HELLO_REQUEST )
+ ssl->handshake->update_checksum( ssl, ssl->out_msg, ssl->out_msglen );
}
- /* Save handshake and CCS messages for resending */
+ /* Either send now, or just save to be sent (and resent) later */
#if defined(MBEDTLS_SSL_PROTO_DTLS)
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
- ssl->handshake != NULL &&
- ssl->handshake->retransmit_state != MBEDTLS_SSL_RETRANS_SENDING &&
- ( ssl->out_msgtype == MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC ||
- ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE ) )
+ ! ( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE &&
+ hs_type == MBEDTLS_SSL_HS_HELLO_REQUEST ) )
{
if( ( ret = ssl_flight_append( ssl ) ) != 0 )
{
@@ -3026,7 +3307,40 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl )
return( ret );
}
}
+ else
#endif
+ {
+ if( ( ret = mbedtls_ssl_write_record( ssl, SSL_FORCE_FLUSH ) ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, "ssl_write_record", ret );
+ return( ret );
+ }
+ }
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write handshake message" ) );
+
+ return( 0 );
+}
+
+/*
+ * Record layer functions
+ */
+
+/*
+ * Write current record.
+ *
+ * Uses:
+ * - ssl->out_msgtype: type of the message (AppData, Handshake, Alert, CCS)
+ * - ssl->out_msglen: length of the record content (excl headers)
+ * - ssl->out_msg: record content
+ */
+int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl, uint8_t force_flush )
+{
+ int ret, done = 0;
+ size_t len = ssl->out_msglen;
+ uint8_t flush = force_flush;
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write record" ) );
#if defined(MBEDTLS_ZLIB_SUPPORT)
if( ssl->transform_out != NULL &&
@@ -3060,10 +3374,14 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl )
#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */
if( !done )
{
+ unsigned i;
+ size_t protected_record_size;
+
ssl->out_hdr[0] = (unsigned char) ssl->out_msgtype;
mbedtls_ssl_write_version( ssl->major_ver, ssl->minor_ver,
ssl->conf->transport, ssl->out_hdr + 1 );
+ memcpy( ssl->out_ctr, ssl->cur_out_ctr, 8 );
ssl->out_len[0] = (unsigned char)( len >> 8 );
ssl->out_len[1] = (unsigned char)( len );
@@ -3080,18 +3398,76 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl )
ssl->out_len[1] = (unsigned char)( len );
}
- ssl->out_left = mbedtls_ssl_hdr_len( ssl ) + ssl->out_msglen;
+ protected_record_size = len + mbedtls_ssl_hdr_len( ssl );
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ /* In case of DTLS, double-check that we don't exceed
+ * the remaining space in the datagram. */
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
+ {
+ ret = ssl_get_remaining_space_in_datagram( ssl );
+ if( ret < 0 )
+ return( ret );
+
+ if( protected_record_size > (size_t) ret )
+ {
+ /* Should never happen */
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
+ }
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
MBEDTLS_SSL_DEBUG_MSG( 3, ( "output record: msgtype = %d, "
- "version = [%d:%d], msglen = %d",
- ssl->out_hdr[0], ssl->out_hdr[1], ssl->out_hdr[2],
- ( ssl->out_len[0] << 8 ) | ssl->out_len[1] ) );
+ "version = [%d:%d], msglen = %d",
+ ssl->out_hdr[0], ssl->out_hdr[1],
+ ssl->out_hdr[2], len ) );
MBEDTLS_SSL_DEBUG_BUF( 4, "output record sent to network",
- ssl->out_hdr, mbedtls_ssl_hdr_len( ssl ) + ssl->out_msglen );
+ ssl->out_hdr, protected_record_size );
+
+ ssl->out_left += protected_record_size;
+ ssl->out_hdr += protected_record_size;
+ ssl_update_out_pointers( ssl, ssl->transform_out );
+
+ for( i = 8; i > ssl_ep_len( ssl ); i-- )
+ if( ++ssl->cur_out_ctr[i - 1] != 0 )
+ break;
+
+ /* The loop goes to its end iff the counter is wrapping */
+ if( i == ssl_ep_len( ssl ) )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "outgoing message counter would wrap" ) );
+ return( MBEDTLS_ERR_SSL_COUNTER_WRAPPING );
+ }
}
- if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 )
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
+ flush == SSL_DONT_FORCE_FLUSH )
+ {
+ size_t remaining;
+ ret = ssl_get_remaining_payload_in_datagram( ssl );
+ if( ret < 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, "ssl_get_remaining_payload_in_datagram",
+ ret );
+ return( ret );
+ }
+
+ remaining = (size_t) ret;
+ if( remaining == 0 )
+ {
+ flush = SSL_FORCE_FLUSH;
+ }
+ else
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Still %u bytes available in current datagram", (unsigned) remaining ) );
+ }
+ }
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
+ if( ( flush == SSL_FORCE_FLUSH ) &&
+ ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flush_output", ret );
return( ret );
@@ -3103,6 +3479,52 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl )
}
#if defined(MBEDTLS_SSL_PROTO_DTLS)
+
+static int ssl_hs_is_proper_fragment( mbedtls_ssl_context *ssl )
+{
+ if( ssl->in_msglen < ssl->in_hslen ||
+ memcmp( ssl->in_msg + 6, "\0\0\0", 3 ) != 0 ||
+ memcmp( ssl->in_msg + 9, ssl->in_msg + 1, 3 ) != 0 )
+ {
+ return( 1 );
+ }
+ return( 0 );
+}
+
+static uint32_t ssl_get_hs_frag_len( mbedtls_ssl_context const *ssl )
+{
+ return( ( ssl->in_msg[9] << 16 ) |
+ ( ssl->in_msg[10] << 8 ) |
+ ssl->in_msg[11] );
+}
+
+static uint32_t ssl_get_hs_frag_off( mbedtls_ssl_context const *ssl )
+{
+ return( ( ssl->in_msg[6] << 16 ) |
+ ( ssl->in_msg[7] << 8 ) |
+ ssl->in_msg[8] );
+}
+
+static int ssl_check_hs_header( mbedtls_ssl_context const *ssl )
+{
+ uint32_t msg_len, frag_off, frag_len;
+
+ msg_len = ssl_get_hs_total_len( ssl );
+ frag_off = ssl_get_hs_frag_off( ssl );
+ frag_len = ssl_get_hs_frag_len( ssl );
+
+ if( frag_off > msg_len )
+ return( -1 );
+
+ if( frag_len > msg_len - frag_off )
+ return( -1 );
+
+ if( frag_len + 12 > ssl->in_msglen )
+ return( -1 );
+
+ return( 0 );
+}
+
/*
* Mark bits in bitmask (used for DTLS HS reassembly)
*/
@@ -3164,161 +3586,29 @@ static int ssl_bitmask_check( unsigned char *mask, size_t len )
return( 0 );
}
-/*
- * Reassemble fragmented DTLS handshake messages.
- *
- * Use a temporary buffer for reassembly, divided in two parts:
- * - the first holds the reassembled message (including handshake header),
- * - the second holds a bitmask indicating which parts of the message
- * (excluding headers) have been received so far.
- */
-static int ssl_reassemble_dtls_handshake( mbedtls_ssl_context *ssl )
+/* msg_len does not include the handshake header */
+static size_t ssl_get_reassembly_buffer_size( size_t msg_len,
+ unsigned add_bitmap )
{
- unsigned char *msg, *bitmask;
- size_t frag_len, frag_off;
- size_t msg_len = ssl->in_hslen - 12; /* Without headers */
-
- if( ssl->handshake == NULL )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "not supported outside handshake (for now)" ) );
- return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
- }
-
- /*
- * For first fragment, check size and allocate buffer
- */
- if( ssl->handshake->hs_msg == NULL )
- {
- size_t alloc_len;
-
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "initialize reassembly, total length = %d",
- msg_len ) );
-
- if( ssl->in_hslen > MBEDTLS_SSL_IN_CONTENT_LEN )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "handshake message too large" ) );
- return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
- }
-
- /* The bitmask needs one bit per byte of message excluding header */
- alloc_len = 12 + msg_len + msg_len / 8 + ( msg_len % 8 != 0 );
-
- ssl->handshake->hs_msg = mbedtls_calloc( 1, alloc_len );
- if( ssl->handshake->hs_msg == NULL )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc failed (%d bytes)", alloc_len ) );
- return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
- }
-
- /* Prepare final header: copy msg_type, length and message_seq,
- * then add standardised fragment_offset and fragment_length */
- memcpy( ssl->handshake->hs_msg, ssl->in_msg, 6 );
- memset( ssl->handshake->hs_msg + 6, 0, 3 );
- memcpy( ssl->handshake->hs_msg + 9,
- ssl->handshake->hs_msg + 1, 3 );
- }
- else
- {
- /* Make sure msg_type and length are consistent */
- if( memcmp( ssl->handshake->hs_msg, ssl->in_msg, 4 ) != 0 )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "fragment header mismatch" ) );
- return( MBEDTLS_ERR_SSL_INVALID_RECORD );
- }
- }
-
- msg = ssl->handshake->hs_msg + 12;
- bitmask = msg + msg_len;
-
- /*
- * Check and copy current fragment
- */
- frag_off = ( ssl->in_msg[6] << 16 ) |
- ( ssl->in_msg[7] << 8 ) |
- ssl->in_msg[8];
- frag_len = ( ssl->in_msg[9] << 16 ) |
- ( ssl->in_msg[10] << 8 ) |
- ssl->in_msg[11];
-
- if( frag_off + frag_len > msg_len )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid fragment offset/len: %d + %d > %d",
- frag_off, frag_len, msg_len ) );
- return( MBEDTLS_ERR_SSL_INVALID_RECORD );
- }
-
- if( frag_len + 12 > ssl->in_msglen )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid fragment length: %d + 12 > %d",
- frag_len, ssl->in_msglen ) );
- return( MBEDTLS_ERR_SSL_INVALID_RECORD );
- }
-
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "adding fragment, offset = %d, length = %d",
- frag_off, frag_len ) );
-
- memcpy( msg + frag_off, ssl->in_msg + 12, frag_len );
- ssl_bitmask_set( bitmask, frag_off, frag_len );
-
- /*
- * Do we have the complete message by now?
- * If yes, finalize it, else ask to read the next record.
- */
- if( ssl_bitmask_check( bitmask, msg_len ) != 0 )
- {
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "message is not complete yet" ) );
- return( MBEDTLS_ERR_SSL_CONTINUE_PROCESSING );
- }
-
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "handshake message completed" ) );
-
- if( frag_len + 12 < ssl->in_msglen )
- {
- /*
- * We'got more handshake messages in the same record.
- * This case is not handled now because no know implementation does
- * that and it's hard to test, so we prefer to fail cleanly for now.
- */
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "last fragment not alone in its record" ) );
- return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
- }
-
- if( ssl->in_left > ssl->next_record_offset )
- {
- /*
- * We've got more data in the buffer after the current record,
- * that we don't want to overwrite. Move it before writing the
- * reassembled message, and adjust in_left and next_record_offset.
- */
- unsigned char *cur_remain = ssl->in_hdr + ssl->next_record_offset;
- unsigned char *new_remain = ssl->in_msg + ssl->in_hslen;
- size_t remain_len = ssl->in_left - ssl->next_record_offset;
-
- /* First compute and check new lengths */
- ssl->next_record_offset = new_remain - ssl->in_hdr;
- ssl->in_left = ssl->next_record_offset + remain_len;
-
- if( ssl->in_left > MBEDTLS_SSL_IN_BUFFER_LEN -
- (size_t)( ssl->in_hdr - ssl->in_buf ) )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "reassembled message too large for buffer" ) );
- return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL );
- }
+ size_t alloc_len;
- memmove( new_remain, cur_remain, remain_len );
- }
+ alloc_len = 12; /* Handshake header */
+ alloc_len += msg_len; /* Content buffer */
- memcpy( ssl->in_msg, ssl->handshake->hs_msg, ssl->in_hslen );
+ if( add_bitmap )
+ alloc_len += msg_len / 8 + ( msg_len % 8 != 0 ); /* Bitmap */
- mbedtls_free( ssl->handshake->hs_msg );
- ssl->handshake->hs_msg = NULL;
+ return( alloc_len );
+}
- MBEDTLS_SSL_DEBUG_BUF( 3, "reassembled handshake message",
- ssl->in_msg, ssl->in_hslen );
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
- return( 0 );
+static uint32_t ssl_get_hs_total_len( mbedtls_ssl_context const *ssl )
+{
+ return( ( ssl->in_msg[1] << 16 ) |
+ ( ssl->in_msg[2] << 8 ) |
+ ssl->in_msg[3] );
}
-#endif /* MBEDTLS_SSL_PROTO_DTLS */
int mbedtls_ssl_prepare_handshake_record( mbedtls_ssl_context *ssl )
{
@@ -3329,10 +3619,7 @@ int mbedtls_ssl_prepare_handshake_record( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_INVALID_RECORD );
}
- ssl->in_hslen = mbedtls_ssl_hs_hdr_len( ssl ) + (
- ( ssl->in_msg[1] << 16 ) |
- ( ssl->in_msg[2] << 8 ) |
- ssl->in_msg[3] );
+ ssl->in_hslen = mbedtls_ssl_hs_hdr_len( ssl ) + ssl_get_hs_total_len( ssl );
MBEDTLS_SSL_DEBUG_MSG( 3, ( "handshake message: msglen ="
" %d, type = %d, hslen = %d",
@@ -3344,12 +3631,26 @@ int mbedtls_ssl_prepare_handshake_record( mbedtls_ssl_context *ssl )
int ret;
unsigned int recv_msg_seq = ( ssl->in_msg[4] << 8 ) | ssl->in_msg[5];
+ if( ssl_check_hs_header( ssl ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid handshake header" ) );
+ return( MBEDTLS_ERR_SSL_INVALID_RECORD );
+ }
+
if( ssl->handshake != NULL &&
( ( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER &&
recv_msg_seq != ssl->handshake->in_msg_seq ) ||
( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER &&
ssl->in_msg[0] != MBEDTLS_SSL_HS_CLIENT_HELLO ) ) )
{
+ if( recv_msg_seq > ssl->handshake->in_msg_seq )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "received future handshake message of sequence number %u (next %u)",
+ recv_msg_seq,
+ ssl->handshake->in_msg_seq ) );
+ return( MBEDTLS_ERR_SSL_EARLY_MESSAGE );
+ }
+
/* Retransmit only on last message from previous flight, to avoid
* too many retransmissions.
* Besides, No sane server ever retransmits HelloVerifyRequest */
@@ -3379,20 +3680,14 @@ int mbedtls_ssl_prepare_handshake_record( mbedtls_ssl_context *ssl )
}
/* Wait until message completion to increment in_msg_seq */
- /* Reassemble if current message is fragmented or reassembly is
- * already in progress */
- if( ssl->in_msglen < ssl->in_hslen ||
- memcmp( ssl->in_msg + 6, "\0\0\0", 3 ) != 0 ||
- memcmp( ssl->in_msg + 9, ssl->in_msg + 1, 3 ) != 0 ||
- ( ssl->handshake != NULL && ssl->handshake->hs_msg != NULL ) )
+ /* Message reassembly is handled alongside buffering of future
+ * messages; the commonality is that both handshake fragments and
+ * future messages cannot be forwarded immediately to the
+ * handshake logic layer. */
+ if( ssl_hs_is_proper_fragment( ssl ) == 1 )
{
MBEDTLS_SSL_DEBUG_MSG( 2, ( "found fragmented DTLS handshake message" ) );
-
- if( ( ret = ssl_reassemble_dtls_handshake( ssl ) ) != 0 )
- {
- MBEDTLS_SSL_DEBUG_RET( 1, "ssl_reassemble_dtls_handshake", ret );
- return( ret );
- }
+ return( MBEDTLS_ERR_SSL_EARLY_MESSAGE );
}
}
else
@@ -3409,9 +3704,9 @@ int mbedtls_ssl_prepare_handshake_record( mbedtls_ssl_context *ssl )
void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl )
{
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
- if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER &&
- ssl->handshake != NULL )
+ if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER && hs != NULL )
{
ssl->handshake->update_checksum( ssl, ssl->in_msg, ssl->in_hslen );
}
@@ -3421,7 +3716,29 @@ void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl )
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
ssl->handshake != NULL )
{
- ssl->handshake->in_msg_seq++;
+ unsigned offset;
+ mbedtls_ssl_hs_buffer *hs_buf;
+
+ /* Increment handshake sequence number */
+ hs->in_msg_seq++;
+
+ /*
+ * Clear up handshake buffering and reassembly structure.
+ */
+
+ /* Free first entry */
+ ssl_buffering_free_slot( ssl, 0 );
+
+ /* Shift all other entries */
+ for( offset = 0, hs_buf = &hs->buffering.hs[0];
+ offset + 1 < MBEDTLS_SSL_MAX_BUFFERED_HS;
+ offset++, hs_buf++ )
+ {
+ *hs_buf = *(hs_buf + 1);
+ }
+
+ /* Create a fresh last entry */
+ memset( hs_buf, 0, sizeof( mbedtls_ssl_hs_buffer ) );
}
#endif
}
@@ -3822,7 +4139,16 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
}
else
#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE && MBEDTLS_SSL_SRV_C */
+ {
+ /* Consider buffering the record. */
+ if( rec_epoch == (unsigned int) ssl->in_epoch + 1 )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Consider record for buffering" ) );
+ return( MBEDTLS_ERR_SSL_EARLY_MESSAGE );
+ }
+
return( MBEDTLS_ERR_SSL_UNEXPECTED_RECORD );
+ }
}
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
@@ -3835,15 +4161,6 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
}
#endif
- /* Drop unexpected ChangeCipherSpec messages */
- if( ssl->in_msgtype == MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC &&
- ssl->state != MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC &&
- ssl->state != MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "dropping unexpected ChangeCipherSpec" ) );
- return( MBEDTLS_ERR_SSL_UNEXPECTED_RECORD );
- }
-
/* Drop unexpected ApplicationData records,
* except at the beginning of renegotiations */
if( ssl->in_msgtype == MBEDTLS_SSL_MSG_APPLICATION_DATA &&
@@ -3980,7 +4297,14 @@ static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl );
* RFC 6347 4.1.2.7) and continue reading until a valid record is found.
*
*/
-int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl )
+
+/* Helper functions for mbedtls_ssl_read_record(). */
+static int ssl_consume_current_message( mbedtls_ssl_context *ssl );
+static int ssl_get_next_record( mbedtls_ssl_context *ssl );
+static int ssl_record_is_in_progress( mbedtls_ssl_context *ssl );
+
+int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl,
+ unsigned update_hs_digest )
{
int ret;
@@ -3990,17 +4314,53 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl )
{
do {
- do ret = mbedtls_ssl_read_record_layer( ssl );
- while( ret == MBEDTLS_ERR_SSL_CONTINUE_PROCESSING );
-
+ ret = ssl_consume_current_message( ssl );
if( ret != 0 )
- {
- MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ssl_read_record_layer" ), ret );
return( ret );
+
+ if( ssl_record_is_in_progress( ssl ) == 0 )
+ {
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ int have_buffered = 0;
+
+ /* We only check for buffered messages if the
+ * current datagram is fully consumed. */
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
+ ssl_next_record_is_in_datagram( ssl ) == 0 )
+ {
+ if( ssl_load_buffered_message( ssl ) == 0 )
+ have_buffered = 1;
+ }
+
+ if( have_buffered == 0 )
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+ {
+ ret = ssl_get_next_record( ssl );
+ if( ret == MBEDTLS_ERR_SSL_CONTINUE_PROCESSING )
+ continue;
+
+ if( ret != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_get_next_record" ), ret );
+ return( ret );
+ }
+ }
}
ret = mbedtls_ssl_handle_message_type( ssl );
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ret == MBEDTLS_ERR_SSL_EARLY_MESSAGE )
+ {
+ /* Buffer future message */
+ ret = ssl_buffer_message( ssl );
+ if( ret != 0 )
+ return( ret );
+
+ ret = MBEDTLS_ERR_SSL_CONTINUE_PROCESSING;
+ }
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
} while( MBEDTLS_ERR_SSL_NON_FATAL == ret ||
MBEDTLS_ERR_SSL_CONTINUE_PROCESSING == ret );
@@ -4010,14 +4370,15 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl )
return( ret );
}
- if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE )
+ if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE &&
+ update_hs_digest == 1 )
{
mbedtls_ssl_update_handshake_status( ssl );
}
}
else
{
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= reuse previously read message" ) );
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "reuse previously read message" ) );
ssl->keep_current_message = 0;
}
@@ -4026,13 +4387,350 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl )
return( 0 );
}
-int mbedtls_ssl_read_record_layer( mbedtls_ssl_context *ssl )
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+static int ssl_next_record_is_in_datagram( mbedtls_ssl_context *ssl )
{
- int ret;
+ if( ssl->in_left > ssl->next_record_offset )
+ return( 1 );
+
+ return( 0 );
+}
+
+static int ssl_load_buffered_message( mbedtls_ssl_context *ssl )
+{
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+ mbedtls_ssl_hs_buffer * hs_buf;
+ int ret = 0;
+
+ if( hs == NULL )
+ return( -1 );
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> ssl_load_buffered_messsage" ) );
+
+ if( ssl->state == MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC ||
+ ssl->state == MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC )
+ {
+ /* Check if we have seen a ChangeCipherSpec before.
+ * If yes, synthesize a CCS record. */
+ if( !hs->buffering.seen_ccs )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "CCS not seen in the current flight" ) );
+ ret = -1;
+ goto exit;
+ }
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Injecting buffered CCS message" ) );
+ ssl->in_msgtype = MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC;
+ ssl->in_msglen = 1;
+ ssl->in_msg[0] = 1;
+
+ /* As long as they are equal, the exact value doesn't matter. */
+ ssl->in_left = 0;
+ ssl->next_record_offset = 0;
+
+ hs->buffering.seen_ccs = 0;
+ goto exit;
+ }
+
+#if defined(MBEDTLS_DEBUG_C)
+ /* Debug only */
+ {
+ unsigned offset;
+ for( offset = 1; offset < MBEDTLS_SSL_MAX_BUFFERED_HS; offset++ )
+ {
+ hs_buf = &hs->buffering.hs[offset];
+ if( hs_buf->is_valid == 1 )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Future message with sequence number %u %s buffered.",
+ hs->in_msg_seq + offset,
+ hs_buf->is_complete ? "fully" : "partially" ) );
+ }
+ }
+ }
+#endif /* MBEDTLS_DEBUG_C */
+
+ /* Check if we have buffered and/or fully reassembled the
+ * next handshake message. */
+ hs_buf = &hs->buffering.hs[0];
+ if( ( hs_buf->is_valid == 1 ) && ( hs_buf->is_complete == 1 ) )
+ {
+ /* Synthesize a record containing the buffered HS message. */
+ size_t msg_len = ( hs_buf->data[1] << 16 ) |
+ ( hs_buf->data[2] << 8 ) |
+ hs_buf->data[3];
+
+ /* Double-check that we haven't accidentally buffered
+ * a message that doesn't fit into the input buffer. */
+ if( msg_len + 12 > MBEDTLS_SSL_IN_CONTENT_LEN )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Next handshake message has been buffered - load" ) );
+ MBEDTLS_SSL_DEBUG_BUF( 3, "Buffered handshake message (incl. header)",
+ hs_buf->data, msg_len + 12 );
+
+ ssl->in_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE;
+ ssl->in_hslen = msg_len + 12;
+ ssl->in_msglen = msg_len + 12;
+ memcpy( ssl->in_msg, hs_buf->data, ssl->in_hslen );
+
+ ret = 0;
+ goto exit;
+ }
+ else
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Next handshake message %u not or only partially bufffered",
+ hs->in_msg_seq ) );
+ }
+
+ ret = -1;
+
+exit:
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= ssl_load_buffered_message" ) );
+ return( ret );
+}
+
+static int ssl_buffer_make_space( mbedtls_ssl_context *ssl,
+ size_t desired )
+{
+ int offset;
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Attempt to free buffered messages to have %u bytes available",
+ (unsigned) desired ) );
+
+ /* Get rid of future records epoch first, if such exist. */
+ ssl_free_buffered_record( ssl );
+
+ /* Check if we have enough space available now. */
+ if( desired <= ( MBEDTLS_SSL_DTLS_MAX_BUFFERING -
+ hs->buffering.total_bytes_buffered ) )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Enough space available after freeing future epoch record" ) );
+ return( 0 );
+ }
+
+ /* We don't have enough space to buffer the next expected handshake
+ * message. Remove buffers used for future messages to gain space,
+ * starting with the most distant one. */
+ for( offset = MBEDTLS_SSL_MAX_BUFFERED_HS - 1;
+ offset >= 0; offset-- )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Free buffering slot %d to make space for reassembly of next handshake message",
+ offset ) );
+
+ ssl_buffering_free_slot( ssl, (uint8_t) offset );
+
+ /* Check if we have enough space available now. */
+ if( desired <= ( MBEDTLS_SSL_DTLS_MAX_BUFFERING -
+ hs->buffering.total_bytes_buffered ) )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Enough space available after freeing buffered HS messages" ) );
+ return( 0 );
+ }
+ }
+
+ return( -1 );
+}
+
+static int ssl_buffer_message( mbedtls_ssl_context *ssl )
+{
+ int ret = 0;
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+
+ if( hs == NULL )
+ return( 0 );
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> ssl_buffer_message" ) );
+
+ switch( ssl->in_msgtype )
+ {
+ case MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC:
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Remember CCS message" ) );
+
+ hs->buffering.seen_ccs = 1;
+ break;
+
+ case MBEDTLS_SSL_MSG_HANDSHAKE:
+ {
+ unsigned recv_msg_seq_offset;
+ unsigned recv_msg_seq = ( ssl->in_msg[4] << 8 ) | ssl->in_msg[5];
+ mbedtls_ssl_hs_buffer *hs_buf;
+ size_t msg_len = ssl->in_hslen - 12;
+
+ /* We should never receive an old handshake
+ * message - double-check nonetheless. */
+ if( recv_msg_seq < ssl->handshake->in_msg_seq )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
+
+ recv_msg_seq_offset = recv_msg_seq - ssl->handshake->in_msg_seq;
+ if( recv_msg_seq_offset >= MBEDTLS_SSL_MAX_BUFFERED_HS )
+ {
+ /* Silently ignore -- message too far in the future */
+ MBEDTLS_SSL_DEBUG_MSG( 2,
+ ( "Ignore future HS message with sequence number %u, "
+ "buffering window %u - %u",
+ recv_msg_seq, ssl->handshake->in_msg_seq,
+ ssl->handshake->in_msg_seq + MBEDTLS_SSL_MAX_BUFFERED_HS - 1 ) );
+
+ goto exit;
+ }
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Buffering HS message with sequence number %u, offset %u ",
+ recv_msg_seq, recv_msg_seq_offset ) );
+
+ hs_buf = &hs->buffering.hs[ recv_msg_seq_offset ];
+
+ /* Check if the buffering for this seq nr has already commenced. */
+ if( !hs_buf->is_valid )
+ {
+ size_t reassembly_buf_sz;
+
+ hs_buf->is_fragmented =
+ ( ssl_hs_is_proper_fragment( ssl ) == 1 );
+
+ /* We copy the message back into the input buffer
+ * after reassembly, so check that it's not too large.
+ * This is an implementation-specific limitation
+ * and not one from the standard, hence it is not
+ * checked in ssl_check_hs_header(). */
+ if( msg_len + 12 > MBEDTLS_SSL_IN_CONTENT_LEN )
+ {
+ /* Ignore message */
+ goto exit;
+ }
+ /* Check if we have enough space to buffer the message. */
+ if( hs->buffering.total_bytes_buffered >
+ MBEDTLS_SSL_DTLS_MAX_BUFFERING )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
+
+ reassembly_buf_sz = ssl_get_reassembly_buffer_size( msg_len,
+ hs_buf->is_fragmented );
+
+ if( reassembly_buf_sz > ( MBEDTLS_SSL_DTLS_MAX_BUFFERING -
+ hs->buffering.total_bytes_buffered ) )
+ {
+ if( recv_msg_seq_offset > 0 )
+ {
+ /* If we can't buffer a future message because
+ * of space limitations -- ignore. */
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Buffering of future message of size %u would exceed the compile-time limit %u (already %u bytes buffered) -- ignore\n",
+ (unsigned) msg_len, MBEDTLS_SSL_DTLS_MAX_BUFFERING,
+ (unsigned) hs->buffering.total_bytes_buffered ) );
+ goto exit;
+ }
+ else
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Buffering of future message of size %u would exceed the compile-time limit %u (already %u bytes buffered) -- attempt to make space by freeing buffered future messages\n",
+ (unsigned) msg_len, MBEDTLS_SSL_DTLS_MAX_BUFFERING,
+ (unsigned) hs->buffering.total_bytes_buffered ) );
+ }
+
+ if( ssl_buffer_make_space( ssl, reassembly_buf_sz ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Reassembly of next message of size %u (%u with bitmap) would exceed the compile-time limit %u (already %u bytes buffered) -- fail\n",
+ (unsigned) msg_len,
+ (unsigned) reassembly_buf_sz,
+ MBEDTLS_SSL_DTLS_MAX_BUFFERING,
+ (unsigned) hs->buffering.total_bytes_buffered ) );
+ ret = MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL;
+ goto exit;
+ }
+ }
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "initialize reassembly, total length = %d",
+ msg_len ) );
+
+ hs_buf->data = mbedtls_calloc( 1, reassembly_buf_sz );
+ if( hs_buf->data == NULL )
+ {
+ ret = MBEDTLS_ERR_SSL_ALLOC_FAILED;
+ goto exit;
+ }
+ hs_buf->data_len = reassembly_buf_sz;
+
+ /* Prepare final header: copy msg_type, length and message_seq,
+ * then add standardised fragment_offset and fragment_length */
+ memcpy( hs_buf->data, ssl->in_msg, 6 );
+ memset( hs_buf->data + 6, 0, 3 );
+ memcpy( hs_buf->data + 9, hs_buf->data + 1, 3 );
+
+ hs_buf->is_valid = 1;
+
+ hs->buffering.total_bytes_buffered += reassembly_buf_sz;
+ }
+ else
+ {
+ /* Make sure msg_type and length are consistent */
+ if( memcmp( hs_buf->data, ssl->in_msg, 4 ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "Fragment header mismatch - ignore" ) );
+ /* Ignore */
+ goto exit;
+ }
+ }
+
+ if( !hs_buf->is_complete )
+ {
+ size_t frag_len, frag_off;
+ unsigned char * const msg = hs_buf->data + 12;
+
+ /*
+ * Check and copy current fragment
+ */
+
+ /* Validation of header fields already done in
+ * mbedtls_ssl_prepare_handshake_record(). */
+ frag_off = ssl_get_hs_frag_off( ssl );
+ frag_len = ssl_get_hs_frag_len( ssl );
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "adding fragment, offset = %d, length = %d",
+ frag_off, frag_len ) );
+ memcpy( msg + frag_off, ssl->in_msg + 12, frag_len );
+
+ if( hs_buf->is_fragmented )
+ {
+ unsigned char * const bitmask = msg + msg_len;
+ ssl_bitmask_set( bitmask, frag_off, frag_len );
+ hs_buf->is_complete = ( ssl_bitmask_check( bitmask,
+ msg_len ) == 0 );
+ }
+ else
+ {
+ hs_buf->is_complete = 1;
+ }
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "message %scomplete",
+ hs_buf->is_complete ? "" : "not yet " ) );
+ }
+
+ break;
+ }
+
+ default:
+ /* We don't buffer other types of messages. */
+ break;
+ }
+
+exit:
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= ssl_buffer_message" ) );
+ return( ret );
+}
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
+static int ssl_consume_current_message( mbedtls_ssl_context *ssl )
+{
/*
- * Step A
- *
* Consume last content-layer message and potentially
* update in_msglen which keeps track of the contents'
* consumption state.
@@ -4114,20 +4812,161 @@ int mbedtls_ssl_read_record_layer( mbedtls_ssl_context *ssl )
ssl->in_msglen = 0;
}
- /*
- * Step B
- *
- * Fetch and decode new record if current one is fully consumed.
- *
- */
+ return( 0 );
+}
+static int ssl_record_is_in_progress( mbedtls_ssl_context *ssl )
+{
if( ssl->in_msglen > 0 )
+ return( 1 );
+
+ return( 0 );
+}
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+
+static void ssl_free_buffered_record( mbedtls_ssl_context *ssl )
+{
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+ if( hs == NULL )
+ return;
+
+ if( hs->buffering.future_record.data != NULL )
{
- /* There's something left to be processed in the current record. */
+ hs->buffering.total_bytes_buffered -=
+ hs->buffering.future_record.len;
+
+ mbedtls_free( hs->buffering.future_record.data );
+ hs->buffering.future_record.data = NULL;
+ }
+}
+
+static int ssl_load_buffered_record( mbedtls_ssl_context *ssl )
+{
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+ unsigned char * rec;
+ size_t rec_len;
+ unsigned rec_epoch;
+
+ if( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM )
+ return( 0 );
+
+ if( hs == NULL )
+ return( 0 );
+
+ rec = hs->buffering.future_record.data;
+ rec_len = hs->buffering.future_record.len;
+ rec_epoch = hs->buffering.future_record.epoch;
+
+ if( rec == NULL )
return( 0 );
+
+ /* Only consider loading future records if the
+ * input buffer is empty. */
+ if( ssl_next_record_is_in_datagram( ssl ) == 1 )
+ return( 0 );
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> ssl_load_buffered_record" ) );
+
+ if( rec_epoch != ssl->in_epoch )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Buffered record not from current epoch." ) );
+ goto exit;
}
- /* Current record either fully processed or to be discarded. */
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Found buffered record from current epoch - load" ) );
+
+ /* Double-check that the record is not too large */
+ if( rec_len > MBEDTLS_SSL_IN_BUFFER_LEN -
+ (size_t)( ssl->in_hdr - ssl->in_buf ) )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
+ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
+ }
+
+ memcpy( ssl->in_hdr, rec, rec_len );
+ ssl->in_left = rec_len;
+ ssl->next_record_offset = 0;
+
+ ssl_free_buffered_record( ssl );
+
+exit:
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= ssl_load_buffered_record" ) );
+ return( 0 );
+}
+
+static int ssl_buffer_future_record( mbedtls_ssl_context *ssl )
+{
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+ size_t const rec_hdr_len = 13;
+ size_t const total_buf_sz = rec_hdr_len + ssl->in_msglen;
+
+ /* Don't buffer future records outside handshakes. */
+ if( hs == NULL )
+ return( 0 );
+
+ /* Only buffer handshake records (we are only interested
+ * in Finished messages). */
+ if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE )
+ return( 0 );
+
+ /* Don't buffer more than one future epoch record. */
+ if( hs->buffering.future_record.data != NULL )
+ return( 0 );
+
+ /* Don't buffer record if there's not enough buffering space remaining. */
+ if( total_buf_sz > ( MBEDTLS_SSL_DTLS_MAX_BUFFERING -
+ hs->buffering.total_bytes_buffered ) )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Buffering of future epoch record of size %u would exceed the compile-time limit %u (already %u bytes buffered) -- ignore\n",
+ (unsigned) total_buf_sz, MBEDTLS_SSL_DTLS_MAX_BUFFERING,
+ (unsigned) hs->buffering.total_bytes_buffered ) );
+ return( 0 );
+ }
+
+ /* Buffer record */
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "Buffer record from epoch %u",
+ ssl->in_epoch + 1 ) );
+ MBEDTLS_SSL_DEBUG_BUF( 3, "Buffered record", ssl->in_hdr,
+ rec_hdr_len + ssl->in_msglen );
+
+ /* ssl_parse_record_header() only considers records
+ * of the next epoch as candidates for buffering. */
+ hs->buffering.future_record.epoch = ssl->in_epoch + 1;
+ hs->buffering.future_record.len = total_buf_sz;
+
+ hs->buffering.future_record.data =
+ mbedtls_calloc( 1, hs->buffering.future_record.len );
+ if( hs->buffering.future_record.data == NULL )
+ {
+ /* If we run out of RAM trying to buffer a
+ * record from the next epoch, just ignore. */
+ return( 0 );
+ }
+
+ memcpy( hs->buffering.future_record.data, ssl->in_hdr, total_buf_sz );
+
+ hs->buffering.total_bytes_buffered += total_buf_sz;
+ return( 0 );
+}
+
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
+static int ssl_get_next_record( mbedtls_ssl_context *ssl )
+{
+ int ret;
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ /* We might have buffered a future record; if so,
+ * and if the epoch matches now, load it.
+ * On success, this call will set ssl->in_left to
+ * the length of the buffered record, so that
+ * the calls to ssl_fetch_input() below will
+ * essentially be no-ops. */
+ ret = ssl_load_buffered_record( ssl );
+ if( ret != 0 )
+ return( ret );
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
if( ( ret = mbedtls_ssl_fetch_input( ssl, mbedtls_ssl_hdr_len( ssl ) ) ) != 0 )
{
@@ -4141,6 +4980,16 @@ int mbedtls_ssl_read_record_layer( mbedtls_ssl_context *ssl )
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
ret != MBEDTLS_ERR_SSL_CLIENT_RECONNECT )
{
+ if( ret == MBEDTLS_ERR_SSL_EARLY_MESSAGE )
+ {
+ ret = ssl_buffer_future_record( ssl );
+ if( ret != 0 )
+ return( ret );
+
+ /* Fall through to handling of unexpected records */
+ ret = MBEDTLS_ERR_SSL_UNEXPECTED_RECORD;
+ }
+
if( ret == MBEDTLS_ERR_SSL_UNEXPECTED_RECORD )
{
/* Skip unexpected record (but not whole datagram) */
@@ -4272,6 +5121,39 @@ int mbedtls_ssl_handle_message_type( mbedtls_ssl_context *ssl )
}
}
+ if( ssl->in_msgtype == MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC )
+ {
+ if( ssl->in_msglen != 1 )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid CCS message, len: %d",
+ ssl->in_msglen ) );
+ return( MBEDTLS_ERR_SSL_INVALID_RECORD );
+ }
+
+ if( ssl->in_msg[0] != 1 )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid CCS message, content: %02x",
+ ssl->in_msg[0] ) );
+ return( MBEDTLS_ERR_SSL_INVALID_RECORD );
+ }
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
+ ssl->state != MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC &&
+ ssl->state != MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC )
+ {
+ if( ssl->handshake == NULL )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "dropping ChangeCipherSpec outside handshake" ) );
+ return( MBEDTLS_ERR_SSL_UNEXPECTED_RECORD );
+ }
+
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "received out-of-order ChangeCipherSpec - remember" ) );
+ return( MBEDTLS_ERR_SSL_EARLY_MESSAGE );
+ }
+#endif
+ }
+
if( ssl->in_msgtype == MBEDTLS_SSL_MSG_ALERT )
{
if( ssl->in_msglen != 2 )
@@ -4373,7 +5255,7 @@ int mbedtls_ssl_send_alert_message( mbedtls_ssl_context *ssl,
ssl->out_msg[0] = level;
ssl->out_msg[1] = message;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_record( ssl, SSL_FORCE_FLUSH ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
return( ret );
@@ -4542,9 +5424,9 @@ write_msg:
ssl->state++;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
@@ -4553,60 +5435,16 @@ write_msg:
return( ret );
}
-int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
+/*
+ * Once the certificate message is read, parse it into a cert chain and
+ * perform basic checks, but leave actual verification to the caller
+ */
+static int ssl_parse_certificate_chain( mbedtls_ssl_context *ssl )
{
- int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE;
+ int ret;
size_t i, n;
- const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info;
- int authmode = ssl->conf->authmode;
uint8_t alert;
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate" ) );
-
- if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK ||
- ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK ||
- ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ||
- ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE )
- {
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) );
- ssl->state++;
- return( 0 );
- }
-
-#if defined(MBEDTLS_SSL_SRV_C)
- if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER &&
- ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK )
- {
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) );
- ssl->state++;
- return( 0 );
- }
-
-#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
- if( ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET )
- authmode = ssl->handshake->sni_authmode;
-#endif
-
- if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER &&
- authmode == MBEDTLS_SSL_VERIFY_NONE )
- {
- ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_SKIP_VERIFY;
- MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) );
- ssl->state++;
- return( 0 );
- }
-#endif
-
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
- {
- /* mbedtls_ssl_read_record may have sent an alert already. We
- let it decide whether to alert. */
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
- return( ret );
- }
-
- ssl->state++;
-
#if defined(MBEDTLS_SSL_SRV_C)
#if defined(MBEDTLS_SSL_PROTO_SSL3)
/*
@@ -4626,10 +5464,7 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
one. The client should know what's going on, so we
don't send an alert. */
ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_MISSING;
- if( authmode == MBEDTLS_SSL_VERIFY_OPTIONAL )
- return( 0 );
- else
- return( MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE );
+ return( MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE );
}
}
#endif /* MBEDTLS_SSL_PROTO_SSL3 */
@@ -4650,10 +5485,7 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
one. The client should know what's going on, so we
don't send an alert. */
ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_MISSING;
- if( authmode == MBEDTLS_SSL_VERIFY_OPTIONAL )
- return( 0 );
- else
- return( MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE );
+ return( MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE );
}
}
#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \
@@ -4803,6 +5635,94 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
}
#endif /* MBEDTLS_SSL_RENEGOTIATION && MBEDTLS_SSL_CLI_C */
+ return( 0 );
+}
+
+int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
+{
+ int ret;
+ const mbedtls_ssl_ciphersuite_t * const ciphersuite_info =
+ ssl->transform_negotiate->ciphersuite_info;
+#if defined(MBEDTLS_SSL_SRV_C) && defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
+ const int authmode = ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET
+ ? ssl->handshake->sni_authmode
+ : ssl->conf->authmode;
+#else
+ const int authmode = ssl->conf->authmode;
+#endif
+ void *rs_ctx = NULL;
+
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate" ) );
+
+ if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK ||
+ ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK ||
+ ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ||
+ ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) );
+ ssl->state++;
+ return( 0 );
+ }
+
+#if defined(MBEDTLS_SSL_SRV_C)
+ if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER &&
+ ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) );
+ ssl->state++;
+ return( 0 );
+ }
+
+ if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER &&
+ authmode == MBEDTLS_SSL_VERIFY_NONE )
+ {
+ ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_SKIP_VERIFY;
+ MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) );
+
+ ssl->state++;
+ return( 0 );
+ }
+#endif
+
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled &&
+ ssl->handshake->ecrs_state == ssl_ecrs_crt_verify )
+ {
+ goto crt_verify;
+ }
+#endif
+
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
+ {
+ /* mbedtls_ssl_read_record may have sent an alert already. We
+ let it decide whether to alert. */
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
+ return( ret );
+ }
+
+ if( ( ret = ssl_parse_certificate_chain( ssl ) ) != 0 )
+ {
+#if defined(MBEDTLS_SSL_SRV_C)
+ if( ret == MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE &&
+ authmode == MBEDTLS_SSL_VERIFY_OPTIONAL )
+ {
+ ret = 0;
+ }
+#endif
+
+ ssl->state++;
+ return( ret );
+ }
+
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ssl->handshake->ecrs_enabled)
+ ssl->handshake->ecrs_state = ssl_ecrs_crt_verify;
+
+crt_verify:
+ if( ssl->handshake->ecrs_enabled)
+ rs_ctx = &ssl->handshake->ecrs_ctx;
+#endif
+
if( authmode != MBEDTLS_SSL_VERIFY_NONE )
{
mbedtls_x509_crt *ca_chain;
@@ -4824,19 +5744,24 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
/*
* Main check: verify certificate
*/
- ret = mbedtls_x509_crt_verify_with_profile(
+ ret = mbedtls_x509_crt_verify_restartable(
ssl->session_negotiate->peer_cert,
ca_chain, ca_crl,
ssl->conf->cert_profile,
ssl->hostname,
&ssl->session_negotiate->verify_result,
- ssl->conf->f_vrfy, ssl->conf->p_vrfy );
+ ssl->conf->f_vrfy, ssl->conf->p_vrfy, rs_ctx );
if( ret != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "x509_verify_cert", ret );
}
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ if( ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ return( MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS );
+#endif
+
/*
* Secondary checks: always done, but change 'ret' only if it was 0
*/
@@ -4889,6 +5814,8 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
if( ret != 0 )
{
+ uint8_t alert;
+
/* The certificate may have been rejected for several reasons.
Pick one and send the corresponding alert. Which alert to send
may be a subject of debate in some cases. */
@@ -4931,6 +5858,8 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
#endif /* MBEDTLS_DEBUG_C */
}
+ ssl->state++;
+
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse certificate" ) );
return( ret );
@@ -4955,9 +5884,9 @@ int mbedtls_ssl_write_change_cipher_spec( mbedtls_ssl_context *ssl )
ssl->state++;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
@@ -4972,7 +5901,7 @@ int mbedtls_ssl_parse_change_cipher_spec( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse change cipher spec" ) );
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
return( ret );
@@ -4986,13 +5915,8 @@ int mbedtls_ssl_parse_change_cipher_spec( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE );
}
- if( ssl->in_msglen != 1 || ssl->in_msg[0] != 1 )
- {
- MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad change cipher spec message" ) );
- mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
- MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR );
- return( MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC );
- }
+ /* CCS records are only accepted if they have length 1 and content '1',
+ * so we don't need to check this here. */
/*
* Switch to our negotiated transform and session parameters for inbound
@@ -5022,16 +5946,7 @@ int mbedtls_ssl_parse_change_cipher_spec( mbedtls_ssl_context *ssl )
#endif /* MBEDTLS_SSL_PROTO_DTLS */
memset( ssl->in_ctr, 0, 8 );
- /*
- * Set the in_msg pointer to the correct location based on IV length
- */
- if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 )
- {
- ssl->in_msg = ssl->in_iv + ssl->transform_negotiate->ivlen -
- ssl->transform_negotiate->fixed_ivlen;
- }
- else
- ssl->in_msg = ssl->in_iv;
+ ssl_update_in_pointers( ssl, ssl->transform_negotiate );
#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL)
if( mbedtls_ssl_hw_record_activate != NULL )
@@ -5482,16 +6397,7 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write finished" ) );
- /*
- * Set the out_msg pointer to the correct location based on IV length
- */
- if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 )
- {
- ssl->out_msg = ssl->out_iv + ssl->transform_negotiate->ivlen -
- ssl->transform_negotiate->fixed_ivlen;
- }
- else
- ssl->out_msg = ssl->out_iv;
+ ssl_update_out_pointers( ssl, ssl->transform_negotiate );
ssl->handshake->calc_finished( ssl, ssl->out_msg + 4, ssl->conf->endpoint );
@@ -5543,14 +6449,14 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl )
/* Remember current epoch settings for resending */
ssl->handshake->alt_transform_out = ssl->transform_out;
- memcpy( ssl->handshake->alt_out_ctr, ssl->out_ctr, 8 );
+ memcpy( ssl->handshake->alt_out_ctr, ssl->cur_out_ctr, 8 );
/* Set sequence_number to zero */
- memset( ssl->out_ctr + 2, 0, 6 );
+ memset( ssl->cur_out_ctr + 2, 0, 6 );
/* Increment epoch */
for( i = 2; i > 0; i-- )
- if( ++ssl->out_ctr[i - 1] != 0 )
+ if( ++ssl->cur_out_ctr[i - 1] != 0 )
break;
/* The loop goes to its end iff the counter is wrapping */
@@ -5562,7 +6468,7 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl )
}
else
#endif /* MBEDTLS_SSL_PROTO_DTLS */
- memset( ssl->out_ctr, 0, 8 );
+ memset( ssl->cur_out_ctr, 0, 8 );
ssl->transform_out = ssl->transform_negotiate;
ssl->session_out = ssl->session_negotiate;
@@ -5583,11 +6489,20 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl )
mbedtls_ssl_send_flight_completed( ssl );
#endif
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
+ return( ret );
+ }
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
+ ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flight_transmit", ret );
return( ret );
}
+#endif
MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write finished" ) );
@@ -5610,7 +6525,7 @@ int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl )
ssl->handshake->calc_finished( ssl, buf, ssl->conf->endpoint ^ 1 );
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
return( ret );
@@ -5722,6 +6637,10 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake )
#endif
#endif
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ mbedtls_x509_crt_restart_init( &handshake->ecrs_ctx );
+#endif
+
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
handshake->sni_authmode = MBEDTLS_SSL_VERIFY_UNSET;
#endif
@@ -5841,6 +6760,78 @@ static int ssl_cookie_check_dummy( void *ctx,
}
#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY && MBEDTLS_SSL_SRV_C */
+/* Once ssl->out_hdr as the address of the beginning of the
+ * next outgoing record is set, deduce the other pointers.
+ *
+ * Note: For TLS, we save the implicit record sequence number
+ * (entering MAC computation) in the 8 bytes before ssl->out_hdr,
+ * and the caller has to make sure there's space for this.
+ */
+
+static void ssl_update_out_pointers( mbedtls_ssl_context *ssl,
+ mbedtls_ssl_transform *transform )
+{
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
+ {
+ ssl->out_ctr = ssl->out_hdr + 3;
+ ssl->out_len = ssl->out_hdr + 11;
+ ssl->out_iv = ssl->out_hdr + 13;
+ }
+ else
+#endif
+ {
+ ssl->out_ctr = ssl->out_hdr - 8;
+ ssl->out_len = ssl->out_hdr + 3;
+ ssl->out_iv = ssl->out_hdr + 5;
+ }
+
+ /* Adjust out_msg to make space for explicit IV, if used. */
+ if( transform != NULL &&
+ ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 )
+ {
+ ssl->out_msg = ssl->out_iv + transform->ivlen - transform->fixed_ivlen;
+ }
+ else
+ ssl->out_msg = ssl->out_iv;
+}
+
+/* Once ssl->in_hdr as the address of the beginning of the
+ * next incoming record is set, deduce the other pointers.
+ *
+ * Note: For TLS, we save the implicit record sequence number
+ * (entering MAC computation) in the 8 bytes before ssl->in_hdr,
+ * and the caller has to make sure there's space for this.
+ */
+
+static void ssl_update_in_pointers( mbedtls_ssl_context *ssl,
+ mbedtls_ssl_transform *transform )
+{
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
+ {
+ ssl->in_ctr = ssl->in_hdr + 3;
+ ssl->in_len = ssl->in_hdr + 11;
+ ssl->in_iv = ssl->in_hdr + 13;
+ }
+ else
+#endif
+ {
+ ssl->in_ctr = ssl->in_hdr - 8;
+ ssl->in_len = ssl->in_hdr + 3;
+ ssl->in_iv = ssl->in_hdr + 5;
+ }
+
+ /* Offset in_msg from in_iv to allow space for explicit IV, if used. */
+ if( transform != NULL &&
+ ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 )
+ {
+ ssl->in_msg = ssl->in_iv + transform->ivlen - transform->fixed_ivlen;
+ }
+ else
+ ssl->in_msg = ssl->in_iv;
+}
+
/*
* Initialize an SSL context
*/
@@ -5852,6 +6843,28 @@ void mbedtls_ssl_init( mbedtls_ssl_context *ssl )
/*
* Setup an SSL context
*/
+
+static void ssl_reset_in_out_pointers( mbedtls_ssl_context *ssl )
+{
+ /* Set the incoming and outgoing record pointers. */
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
+ {
+ ssl->out_hdr = ssl->out_buf;
+ ssl->in_hdr = ssl->in_buf;
+ }
+ else
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+ {
+ ssl->out_hdr = ssl->out_buf + 8;
+ ssl->in_hdr = ssl->in_buf + 8;
+ }
+
+ /* Derive other internal pointers. */
+ ssl_update_out_pointers( ssl, NULL /* no transform enabled */ );
+ ssl_update_in_pointers ( ssl, NULL /* no transform enabled */ );
+}
+
int mbedtls_ssl_setup( mbedtls_ssl_context *ssl,
const mbedtls_ssl_config *conf )
{
@@ -5862,57 +6875,55 @@ int mbedtls_ssl_setup( mbedtls_ssl_context *ssl,
/*
* Prepare base structures
*/
+
+ /* Set to NULL in case of an error condition */
+ ssl->out_buf = NULL;
+
ssl->in_buf = mbedtls_calloc( 1, MBEDTLS_SSL_IN_BUFFER_LEN );
if( ssl->in_buf == NULL )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", MBEDTLS_SSL_IN_BUFFER_LEN) );
- return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
+ ret = MBEDTLS_ERR_SSL_ALLOC_FAILED;
+ goto error;
}
ssl->out_buf = mbedtls_calloc( 1, MBEDTLS_SSL_OUT_BUFFER_LEN );
if( ssl->out_buf == NULL )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", MBEDTLS_SSL_OUT_BUFFER_LEN) );
- mbedtls_free( ssl->in_buf );
- ssl->in_buf = NULL;
- return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
- }
-
-#if defined(MBEDTLS_SSL_PROTO_DTLS)
- if( conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
- {
- ssl->out_hdr = ssl->out_buf;
- ssl->out_ctr = ssl->out_buf + 3;
- ssl->out_len = ssl->out_buf + 11;
- ssl->out_iv = ssl->out_buf + 13;
- ssl->out_msg = ssl->out_buf + 13;
-
- ssl->in_hdr = ssl->in_buf;
- ssl->in_ctr = ssl->in_buf + 3;
- ssl->in_len = ssl->in_buf + 11;
- ssl->in_iv = ssl->in_buf + 13;
- ssl->in_msg = ssl->in_buf + 13;
+ ret = MBEDTLS_ERR_SSL_ALLOC_FAILED;
+ goto error;
}
- else
-#endif
- {
- ssl->out_ctr = ssl->out_buf;
- ssl->out_hdr = ssl->out_buf + 8;
- ssl->out_len = ssl->out_buf + 11;
- ssl->out_iv = ssl->out_buf + 13;
- ssl->out_msg = ssl->out_buf + 13;
- ssl->in_ctr = ssl->in_buf;
- ssl->in_hdr = ssl->in_buf + 8;
- ssl->in_len = ssl->in_buf + 11;
- ssl->in_iv = ssl->in_buf + 13;
- ssl->in_msg = ssl->in_buf + 13;
- }
+ ssl_reset_in_out_pointers( ssl );
if( ( ret = ssl_handshake_init( ssl ) ) != 0 )
- return( ret );
+ goto error;
return( 0 );
+
+error:
+ mbedtls_free( ssl->in_buf );
+ mbedtls_free( ssl->out_buf );
+
+ ssl->conf = NULL;
+
+ ssl->in_buf = NULL;
+ ssl->out_buf = NULL;
+
+ ssl->in_hdr = NULL;
+ ssl->in_ctr = NULL;
+ ssl->in_len = NULL;
+ ssl->in_iv = NULL;
+ ssl->in_msg = NULL;
+
+ ssl->out_hdr = NULL;
+ ssl->out_ctr = NULL;
+ ssl->out_len = NULL;
+ ssl->out_iv = NULL;
+ ssl->out_msg = NULL;
+
+ return( ret );
}
/*
@@ -5926,6 +6937,11 @@ static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial )
{
int ret;
+#if !defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) || \
+ !defined(MBEDTLS_SSL_SRV_C)
+ ((void) partial);
+#endif
+
ssl->state = MBEDTLS_SSL_HELLO_REQUEST;
/* Cancel any possibly running timer */
@@ -5942,12 +6958,10 @@ static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial )
ssl->secure_renegotiation = MBEDTLS_SSL_LEGACY_RENEGOTIATION;
ssl->in_offt = NULL;
+ ssl_reset_in_out_pointers( ssl );
- ssl->in_msg = ssl->in_buf + 13;
ssl->in_msgtype = 0;
ssl->in_msglen = 0;
- if( partial == 0 )
- ssl->in_left = 0;
#if defined(MBEDTLS_SSL_PROTO_DTLS)
ssl->next_record_offset = 0;
ssl->in_epoch = 0;
@@ -5961,7 +6975,6 @@ static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial )
ssl->keep_current_message = 0;
- ssl->out_msg = ssl->out_buf + 13;
ssl->out_msgtype = 0;
ssl->out_msglen = 0;
ssl->out_left = 0;
@@ -5970,12 +6983,23 @@ static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial )
ssl->split_done = 0;
#endif
+ memset( ssl->cur_out_ctr, 0, sizeof( ssl->cur_out_ctr ) );
+
ssl->transform_in = NULL;
ssl->transform_out = NULL;
+ ssl->session_in = NULL;
+ ssl->session_out = NULL;
+
memset( ssl->out_buf, 0, MBEDTLS_SSL_OUT_BUFFER_LEN );
+
+#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && defined(MBEDTLS_SSL_SRV_C)
if( partial == 0 )
+#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE && MBEDTLS_SSL_SRV_C */
+ {
+ ssl->in_left = 0;
memset( ssl->in_buf, 0, MBEDTLS_SSL_IN_BUFFER_LEN );
+ }
#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL)
if( mbedtls_ssl_hw_record_reset != NULL )
@@ -6008,7 +7032,9 @@ static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial )
#endif
#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C)
+#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE)
if( partial == 0 )
+#endif
{
mbedtls_free( ssl->cli_id );
ssl->cli_id = NULL;
@@ -6059,7 +7085,15 @@ void mbedtls_ssl_conf_dtls_badmac_limit( mbedtls_ssl_config *conf, unsigned limi
#endif
#if defined(MBEDTLS_SSL_PROTO_DTLS)
-void mbedtls_ssl_conf_handshake_timeout( mbedtls_ssl_config *conf, uint32_t min, uint32_t max )
+
+void mbedtls_ssl_set_datagram_packing( mbedtls_ssl_context *ssl,
+ unsigned allow_packing )
+{
+ ssl->disable_datagram_packing = !allow_packing;
+}
+
+void mbedtls_ssl_conf_handshake_timeout( mbedtls_ssl_config *conf,
+ uint32_t min, uint32_t max )
{
conf->hs_timeout_min = min;
conf->hs_timeout_max = max;
@@ -6109,6 +7143,13 @@ void mbedtls_ssl_set_bio( mbedtls_ssl_context *ssl,
ssl->f_recv_timeout = f_recv_timeout;
}
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+void mbedtls_ssl_set_mtu( mbedtls_ssl_context *ssl, uint16_t mtu )
+{
+ ssl->mtu = mtu;
+}
+#endif
+
void mbedtls_ssl_conf_read_timeout( mbedtls_ssl_config *conf, uint32_t timeout )
{
conf->read_timeout = timeout;
@@ -6772,7 +7813,7 @@ int mbedtls_ssl_check_pending( const mbedtls_ssl_context *ssl )
/*
* In all other cases, the rest of the message can be dropped.
- * As in ssl_read_record_layer, this needs to be adapted if
+ * As in ssl_get_next_record, this needs to be adapted if
* we implement support for multiple alerts in single records.
*/
@@ -6839,28 +7880,47 @@ const char *mbedtls_ssl_get_version( const mbedtls_ssl_context *ssl )
int mbedtls_ssl_get_record_expansion( const mbedtls_ssl_context *ssl )
{
- size_t transform_expansion;
+ size_t transform_expansion = 0;
const mbedtls_ssl_transform *transform = ssl->transform_out;
+ unsigned block_size;
+
+ if( transform == NULL )
+ return( (int) mbedtls_ssl_hdr_len( ssl ) );
#if defined(MBEDTLS_ZLIB_SUPPORT)
if( ssl->session_out->compression != MBEDTLS_SSL_COMPRESS_NULL )
return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
#endif
- if( transform == NULL )
- return( (int) mbedtls_ssl_hdr_len( ssl ) );
-
switch( mbedtls_cipher_get_cipher_mode( &transform->cipher_ctx_enc ) )
{
case MBEDTLS_MODE_GCM:
case MBEDTLS_MODE_CCM:
+ case MBEDTLS_MODE_CHACHAPOLY:
case MBEDTLS_MODE_STREAM:
transform_expansion = transform->minlen;
break;
case MBEDTLS_MODE_CBC:
- transform_expansion = transform->maclen
- + mbedtls_cipher_get_block_size( &transform->cipher_ctx_enc );
+
+ block_size = mbedtls_cipher_get_block_size(
+ &transform->cipher_ctx_enc );
+
+ /* Expansion due to the addition of the MAC. */
+ transform_expansion += transform->maclen;
+
+ /* Expansion due to the addition of CBC padding;
+ * Theoretically up to 256 bytes, but we never use
+ * more than the block size of the underlying cipher. */
+ transform_expansion += block_size;
+
+ /* For TLS 1.1 or higher, an explicit IV is added
+ * after the record header. */
+#if defined(MBEDTLS_SSL_PROTO_TLS1_1) || defined(MBEDTLS_SSL_PROTO_TLS1_2)
+ if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 )
+ transform_expansion += block_size;
+#endif /* MBEDTLS_SSL_PROTO_TLS1_1 || MBEDTLS_SSL_PROTO_TLS1_2 */
+
break;
default:
@@ -6881,19 +7941,89 @@ size_t mbedtls_ssl_get_max_frag_len( const mbedtls_ssl_context *ssl )
*/
max_len = ssl_mfl_code_to_length( ssl->conf->mfl_code );
- /*
- * Check if a smaller max length was negotiated
- */
+ /* Check if a smaller max length was negotiated */
if( ssl->session_out != NULL &&
ssl_mfl_code_to_length( ssl->session_out->mfl_code ) < max_len )
{
max_len = ssl_mfl_code_to_length( ssl->session_out->mfl_code );
}
- return max_len;
+ /* During a handshake, use the value being negotiated */
+ if( ssl->session_negotiate != NULL &&
+ ssl_mfl_code_to_length( ssl->session_negotiate->mfl_code ) < max_len )
+ {
+ max_len = ssl_mfl_code_to_length( ssl->session_negotiate->mfl_code );
+ }
+
+ return( max_len );
}
#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+static size_t ssl_get_current_mtu( const mbedtls_ssl_context *ssl )
+{
+ /* Return unlimited mtu for client hello messages to avoid fragmentation. */
+ if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT &&
+ ( ssl->state == MBEDTLS_SSL_CLIENT_HELLO ||
+ ssl->state == MBEDTLS_SSL_SERVER_HELLO ) )
+ return ( 0 );
+
+ if( ssl->handshake == NULL || ssl->handshake->mtu == 0 )
+ return( ssl->mtu );
+
+ if( ssl->mtu == 0 )
+ return( ssl->handshake->mtu );
+
+ return( ssl->mtu < ssl->handshake->mtu ?
+ ssl->mtu : ssl->handshake->mtu );
+}
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
+int mbedtls_ssl_get_max_out_record_payload( const mbedtls_ssl_context *ssl )
+{
+ size_t max_len = MBEDTLS_SSL_OUT_CONTENT_LEN;
+
+#if !defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) && \
+ !defined(MBEDTLS_SSL_PROTO_DTLS)
+ (void) ssl;
+#endif
+
+#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH)
+ const size_t mfl = mbedtls_ssl_get_max_frag_len( ssl );
+
+ if( max_len > mfl )
+ max_len = mfl;
+#endif
+
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+ if( ssl_get_current_mtu( ssl ) != 0 )
+ {
+ const size_t mtu = ssl_get_current_mtu( ssl );
+ const int ret = mbedtls_ssl_get_record_expansion( ssl );
+ const size_t overhead = (size_t) ret;
+
+ if( ret < 0 )
+ return( ret );
+
+ if( mtu <= overhead )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 1, ( "MTU too low for record expansion" ) );
+ return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
+ }
+
+ if( max_len > mtu - overhead )
+ max_len = mtu - overhead;
+ }
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
+#if !defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) && \
+ !defined(MBEDTLS_SSL_PROTO_DTLS)
+ ((void) ssl);
+#endif
+
+ return( (int) max_len );
+}
+
#if defined(MBEDTLS_X509_CRT_PARSE_C)
const mbedtls_x509_crt *mbedtls_ssl_get_peer_cert( const mbedtls_ssl_context *ssl )
{
@@ -6981,9 +8111,9 @@ static int ssl_write_hello_request( mbedtls_ssl_context *ssl )
ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE;
ssl->out_msg[0] = MBEDTLS_SSL_HS_HELLO_REQUEST;
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_handshake_msg( ssl ) ) != 0 )
{
- MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_handshake_msg", ret );
return( ret );
}
@@ -7113,7 +8243,7 @@ static int ssl_check_ctr_renegotiate( mbedtls_ssl_context *ssl )
in_ctr_cmp = memcmp( ssl->in_ctr + ep_len,
ssl->conf->renego_period + ep_len, 8 - ep_len );
- out_ctr_cmp = memcmp( ssl->out_ctr + ep_len,
+ out_ctr_cmp = memcmp( ssl->cur_out_ctr + ep_len,
ssl->conf->renego_period + ep_len, 8 - ep_len );
if( in_ctr_cmp <= 0 && out_ctr_cmp <= 0 )
@@ -7148,7 +8278,7 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
if( ssl->handshake != NULL &&
ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING )
{
- if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 )
return( ret );
}
}
@@ -7197,7 +8327,7 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
ssl_set_timer( ssl, ssl->conf->read_timeout );
}
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
if( ret == MBEDTLS_ERR_SSL_CONN_EOF )
return( 0 );
@@ -7212,7 +8342,7 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
/*
* OpenSSL sends empty messages to randomize the IV
*/
- if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_read_record( ssl, 1 ) ) != 0 )
{
if( ret == MBEDTLS_ERR_SSL_CONN_EOF )
return( 0 );
@@ -7445,12 +8575,15 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
static int ssl_write_real( mbedtls_ssl_context *ssl,
const unsigned char *buf, size_t len )
{
- int ret;
-#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH)
- size_t max_len = mbedtls_ssl_get_max_frag_len( ssl );
-#else
- size_t max_len = MBEDTLS_SSL_OUT_CONTENT_LEN;
-#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
+ int ret = mbedtls_ssl_get_max_out_record_payload( ssl );
+ const size_t max_len = (size_t) ret;
+
+ if( ret < 0 )
+ {
+ MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_get_max_out_record_payload", ret );
+ return( ret );
+ }
+
if( len > max_len )
{
#if defined(MBEDTLS_SSL_PROTO_DTLS)
@@ -7491,7 +8624,7 @@ static int ssl_write_real( mbedtls_ssl_context *ssl,
ssl->out_msgtype = MBEDTLS_SSL_MSG_APPLICATION_DATA;
memcpy( ssl->out_msg, buf, len );
- if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 )
+ if( ( ret = mbedtls_ssl_write_record( ssl, SSL_FORCE_FLUSH ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret );
return( ret );
@@ -7643,6 +8776,42 @@ static void ssl_key_cert_free( mbedtls_ssl_key_cert *key_cert )
}
#endif /* MBEDTLS_X509_CRT_PARSE_C */
+#if defined(MBEDTLS_SSL_PROTO_DTLS)
+
+static void ssl_buffering_free( mbedtls_ssl_context *ssl )
+{
+ unsigned offset;
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+
+ if( hs == NULL )
+ return;
+
+ ssl_free_buffered_record( ssl );
+
+ for( offset = 0; offset < MBEDTLS_SSL_MAX_BUFFERED_HS; offset++ )
+ ssl_buffering_free_slot( ssl, offset );
+}
+
+static void ssl_buffering_free_slot( mbedtls_ssl_context *ssl,
+ uint8_t slot )
+{
+ mbedtls_ssl_handshake_params * const hs = ssl->handshake;
+ mbedtls_ssl_hs_buffer * const hs_buf = &hs->buffering.hs[slot];
+
+ if( slot >= MBEDTLS_SSL_MAX_BUFFERED_HS )
+ return;
+
+ if( hs_buf->is_valid == 1 )
+ {
+ hs->buffering.total_bytes_buffered -= hs_buf->data_len;
+ mbedtls_platform_zeroize( hs_buf->data, hs_buf->data_len );
+ mbedtls_free( hs_buf->data );
+ memset( hs_buf, 0, sizeof( mbedtls_ssl_hs_buffer ) );
+ }
+}
+
+#endif /* MBEDTLS_SSL_PROTO_DTLS */
+
void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl )
{
mbedtls_ssl_handshake_params *handshake = ssl->handshake;
@@ -7720,10 +8889,14 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl )
}
#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_SSL_SERVER_NAME_INDICATION */
+#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
+ mbedtls_x509_crt_restart_free( &handshake->ecrs_ctx );
+#endif
+
#if defined(MBEDTLS_SSL_PROTO_DTLS)
mbedtls_free( handshake->verify_cookie );
- mbedtls_free( handshake->hs_msg );
ssl_flight_free( handshake->flight );
+ ssl_buffering_free( ssl );
#endif
mbedtls_platform_zeroize( handshake,
diff --git a/thirdparty/mbedtls/library/threading.c b/thirdparty/mbedtls/library/threading.c
index 7a32e672c7..7c90c7c595 100644
--- a/thirdparty/mbedtls/library/threading.c
+++ b/thirdparty/mbedtls/library/threading.c
@@ -19,6 +19,14 @@
* This file is part of mbed TLS (https://tls.mbed.org)
*/
+/*
+ * Ensure gmtime_r is available even with -std=c99; must be defined before
+ * config.h, which pulls in glibc's features.h. Harmless on other platforms.
+ */
+#if !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE 200112L
+#endif
+
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@@ -29,6 +37,36 @@
#include "mbedtls/threading.h"
+#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_R_ALT)
+
+#if !defined(_WIN32) && (defined(unix) || \
+ defined(__unix) || defined(__unix__) || (defined(__APPLE__) && \
+ defined(__MACH__)))
+#include <unistd.h>
+#endif /* !_WIN32 && (unix || __unix || __unix__ ||
+ * (__APPLE__ && __MACH__)) */
+
+#if !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \
+ ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \
+ _POSIX_THREAD_SAFE_FUNCTIONS >= 20112L ) )
+/*
+ * This is a convenience shorthand macro to avoid checking the long
+ * preprocessor conditions above. Ideally, we could expose this macro in
+ * platform_util.h and simply use it in platform_util.c, threading.c and
+ * threading.h. However, this macro is not part of the Mbed TLS public API, so
+ * we keep it private by only defining it in this file
+ */
+
+#if ! ( defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) )
+#define THREADING_USE_GMTIME
+#endif /* ! ( defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) ) */
+
+#endif /* !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \
+ ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \
+ _POSIX_THREAD_SAFE_FUNCTIONS >= 20112L ) ) */
+
+#endif /* MBEDTLS_HAVE_TIME_DATE && !MBEDTLS_PLATFORM_GMTIME_R_ALT */
+
#if defined(MBEDTLS_THREADING_PTHREAD)
static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex )
{
@@ -114,6 +152,9 @@ void mbedtls_threading_set_alt( void (*mutex_init)( mbedtls_threading_mutex_t *
#if defined(MBEDTLS_FS_IO)
mbedtls_mutex_init( &mbedtls_threading_readdir_mutex );
#endif
+#if defined(THREADING_USE_GMTIME)
+ mbedtls_mutex_init( &mbedtls_threading_gmtime_mutex );
+#endif
}
/*
@@ -124,6 +165,9 @@ void mbedtls_threading_free_alt( void )
#if defined(MBEDTLS_FS_IO)
mbedtls_mutex_free( &mbedtls_threading_readdir_mutex );
#endif
+#if defined(THREADING_USE_GMTIME)
+ mbedtls_mutex_free( &mbedtls_threading_gmtime_mutex );
+#endif
}
#endif /* MBEDTLS_THREADING_ALT */
@@ -136,5 +180,8 @@ void mbedtls_threading_free_alt( void )
#if defined(MBEDTLS_FS_IO)
mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex MUTEX_INIT;
#endif
+#if defined(THREADING_USE_GMTIME)
+mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex MUTEX_INIT;
+#endif
#endif /* MBEDTLS_THREADING_C */
diff --git a/thirdparty/mbedtls/library/timing.c b/thirdparty/mbedtls/library/timing.c
index 3e8139f1f9..413d133fb6 100644
--- a/thirdparty/mbedtls/library/timing.c
+++ b/thirdparty/mbedtls/library/timing.c
@@ -52,6 +52,7 @@
#include <windows.h>
#include <winbase.h>
+#include <process.h>
struct _hr_time
{
@@ -267,18 +268,17 @@ unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int
/* It's OK to use a global because alarm() is supposed to be global anyway */
static DWORD alarmMs;
-static DWORD WINAPI TimerProc( LPVOID TimerContext )
+static void TimerProc( void *TimerContext )
{
- ((void) TimerContext);
+ (void) TimerContext;
Sleep( alarmMs );
mbedtls_timing_alarmed = 1;
- return( TRUE );
+ /* _endthread will be called implicitly on return
+ * That ensures execution of thread funcition's epilogue */
}
void mbedtls_set_alarm( int seconds )
{
- DWORD ThreadId;
-
if( seconds == 0 )
{
/* No need to create a thread for this simple case.
@@ -289,7 +289,7 @@ void mbedtls_set_alarm( int seconds )
mbedtls_timing_alarmed = 0;
alarmMs = seconds * 1000;
- CloseHandle( CreateThread( NULL, 0, TimerProc, NULL, 0, &ThreadId ) );
+ (void) _beginthread( TimerProc, 0, NULL );
}
#else /* _WIN32 && !EFIX64 && !EFI32 */
diff --git a/thirdparty/mbedtls/library/version_features.c b/thirdparty/mbedtls/library/version_features.c
index 777b6034c4..4c36d3caaa 100644
--- a/thirdparty/mbedtls/library/version_features.c
+++ b/thirdparty/mbedtls/library/version_features.c
@@ -84,6 +84,9 @@ static const char *features[] = {
#if defined(MBEDTLS_DEPRECATED_REMOVED)
"MBEDTLS_DEPRECATED_REMOVED",
#endif /* MBEDTLS_DEPRECATED_REMOVED */
+#if defined(MBEDTLS_CHECK_PARAMS)
+ "MBEDTLS_CHECK_PARAMS",
+#endif /* MBEDTLS_CHECK_PARAMS */
#if defined(MBEDTLS_TIMING_ALT)
"MBEDTLS_TIMING_ALT",
#endif /* MBEDTLS_TIMING_ALT */
@@ -339,6 +342,9 @@ static const char *features[] = {
#if defined(MBEDTLS_ECP_NIST_OPTIM)
"MBEDTLS_ECP_NIST_OPTIM",
#endif /* MBEDTLS_ECP_NIST_OPTIM */
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ "MBEDTLS_ECP_RESTARTABLE",
+#endif /* MBEDTLS_ECP_RESTARTABLE */
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
"MBEDTLS_ECDSA_DETERMINISTIC",
#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
diff --git a/thirdparty/mbedtls/library/x509.c b/thirdparty/mbedtls/library/x509.c
index 2e6795f750..52b5b649f7 100644
--- a/thirdparty/mbedtls/library/x509.c
+++ b/thirdparty/mbedtls/library/x509.c
@@ -29,10 +29,6 @@
* http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
*/
-/* Ensure gmtime_r is available even with -std=c99; must be included before
- * config.h, which pulls in glibc's features.h. Harmless on other platforms. */
-#define _POSIX_C_SOURCE 200112L
-
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@@ -67,6 +63,7 @@
#include "mbedtls/platform_time.h"
#endif
#if defined(MBEDTLS_HAVE_TIME_DATE)
+#include "mbedtls/platform_util.h"
#include <time.h>
#endif
@@ -901,11 +898,7 @@ static int x509_get_current_time( mbedtls_x509_time *now )
int ret = 0;
tt = mbedtls_time( NULL );
-#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
- lt = gmtime_s( &tm_buf, &tt ) == 0 ? &tm_buf : NULL;
-#else
- lt = gmtime_r( &tt, &tm_buf );
-#endif
+ lt = mbedtls_platform_gmtime_r( &tt, &tm_buf );
if( lt == NULL )
ret = -1;
diff --git a/thirdparty/mbedtls/library/x509_create.c b/thirdparty/mbedtls/library/x509_create.c
index df20ec8ebd..546e8fa1a9 100644
--- a/thirdparty/mbedtls/library/x509_create.c
+++ b/thirdparty/mbedtls/library/x509_create.c
@@ -33,48 +33,84 @@
#include <string.h>
+/* Structure linking OIDs for X.509 DN AttributeTypes to their
+ * string representations and default string encodings used by Mbed TLS. */
typedef struct {
- const char *name;
- size_t name_len;
- const char*oid;
+ const char *name; /* String representation of AttributeType, e.g.
+ * "CN" or "emailAddress". */
+ size_t name_len; /* Length of 'name', without trailing 0 byte. */
+ const char *oid; /* String representation of OID of AttributeType,
+ * as per RFC 5280, Appendix A.1. */
+ int default_tag; /* The default character encoding used for the
+ * given attribute type, e.g.
+ * MBEDTLS_ASN1_UTF8_STRING for UTF-8. */
} x509_attr_descriptor_t;
#define ADD_STRLEN( s ) s, sizeof( s ) - 1
+/* X.509 DN attributes from RFC 5280, Appendix A.1. */
static const x509_attr_descriptor_t x509_attrs[] =
{
- { ADD_STRLEN( "CN" ), MBEDTLS_OID_AT_CN },
- { ADD_STRLEN( "commonName" ), MBEDTLS_OID_AT_CN },
- { ADD_STRLEN( "C" ), MBEDTLS_OID_AT_COUNTRY },
- { ADD_STRLEN( "countryName" ), MBEDTLS_OID_AT_COUNTRY },
- { ADD_STRLEN( "O" ), MBEDTLS_OID_AT_ORGANIZATION },
- { ADD_STRLEN( "organizationName" ), MBEDTLS_OID_AT_ORGANIZATION },
- { ADD_STRLEN( "L" ), MBEDTLS_OID_AT_LOCALITY },
- { ADD_STRLEN( "locality" ), MBEDTLS_OID_AT_LOCALITY },
- { ADD_STRLEN( "R" ), MBEDTLS_OID_PKCS9_EMAIL },
- { ADD_STRLEN( "OU" ), MBEDTLS_OID_AT_ORG_UNIT },
- { ADD_STRLEN( "organizationalUnitName" ), MBEDTLS_OID_AT_ORG_UNIT },
- { ADD_STRLEN( "ST" ), MBEDTLS_OID_AT_STATE },
- { ADD_STRLEN( "stateOrProvinceName" ), MBEDTLS_OID_AT_STATE },
- { ADD_STRLEN( "emailAddress" ), MBEDTLS_OID_PKCS9_EMAIL },
- { ADD_STRLEN( "serialNumber" ), MBEDTLS_OID_AT_SERIAL_NUMBER },
- { ADD_STRLEN( "postalAddress" ), MBEDTLS_OID_AT_POSTAL_ADDRESS },
- { ADD_STRLEN( "postalCode" ), MBEDTLS_OID_AT_POSTAL_CODE },
- { ADD_STRLEN( "dnQualifier" ), MBEDTLS_OID_AT_DN_QUALIFIER },
- { ADD_STRLEN( "title" ), MBEDTLS_OID_AT_TITLE },
- { ADD_STRLEN( "surName" ), MBEDTLS_OID_AT_SUR_NAME },
- { ADD_STRLEN( "SN" ), MBEDTLS_OID_AT_SUR_NAME },
- { ADD_STRLEN( "givenName" ), MBEDTLS_OID_AT_GIVEN_NAME },
- { ADD_STRLEN( "GN" ), MBEDTLS_OID_AT_GIVEN_NAME },
- { ADD_STRLEN( "initials" ), MBEDTLS_OID_AT_INITIALS },
- { ADD_STRLEN( "pseudonym" ), MBEDTLS_OID_AT_PSEUDONYM },
- { ADD_STRLEN( "generationQualifier" ), MBEDTLS_OID_AT_GENERATION_QUALIFIER },
- { ADD_STRLEN( "domainComponent" ), MBEDTLS_OID_DOMAIN_COMPONENT },
- { ADD_STRLEN( "DC" ), MBEDTLS_OID_DOMAIN_COMPONENT },
- { NULL, 0, NULL }
+ { ADD_STRLEN( "CN" ),
+ MBEDTLS_OID_AT_CN, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "commonName" ),
+ MBEDTLS_OID_AT_CN, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "C" ),
+ MBEDTLS_OID_AT_COUNTRY, MBEDTLS_ASN1_PRINTABLE_STRING },
+ { ADD_STRLEN( "countryName" ),
+ MBEDTLS_OID_AT_COUNTRY, MBEDTLS_ASN1_PRINTABLE_STRING },
+ { ADD_STRLEN( "O" ),
+ MBEDTLS_OID_AT_ORGANIZATION, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "organizationName" ),
+ MBEDTLS_OID_AT_ORGANIZATION, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "L" ),
+ MBEDTLS_OID_AT_LOCALITY, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "locality" ),
+ MBEDTLS_OID_AT_LOCALITY, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "R" ),
+ MBEDTLS_OID_PKCS9_EMAIL, MBEDTLS_ASN1_IA5_STRING },
+ { ADD_STRLEN( "OU" ),
+ MBEDTLS_OID_AT_ORG_UNIT, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "organizationalUnitName" ),
+ MBEDTLS_OID_AT_ORG_UNIT, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "ST" ),
+ MBEDTLS_OID_AT_STATE, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "stateOrProvinceName" ),
+ MBEDTLS_OID_AT_STATE, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "emailAddress" ),
+ MBEDTLS_OID_PKCS9_EMAIL, MBEDTLS_ASN1_IA5_STRING },
+ { ADD_STRLEN( "serialNumber" ),
+ MBEDTLS_OID_AT_SERIAL_NUMBER, MBEDTLS_ASN1_PRINTABLE_STRING },
+ { ADD_STRLEN( "postalAddress" ),
+ MBEDTLS_OID_AT_POSTAL_ADDRESS, MBEDTLS_ASN1_PRINTABLE_STRING },
+ { ADD_STRLEN( "postalCode" ),
+ MBEDTLS_OID_AT_POSTAL_CODE, MBEDTLS_ASN1_PRINTABLE_STRING },
+ { ADD_STRLEN( "dnQualifier" ),
+ MBEDTLS_OID_AT_DN_QUALIFIER, MBEDTLS_ASN1_PRINTABLE_STRING },
+ { ADD_STRLEN( "title" ),
+ MBEDTLS_OID_AT_TITLE, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "surName" ),
+ MBEDTLS_OID_AT_SUR_NAME, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "SN" ),
+ MBEDTLS_OID_AT_SUR_NAME, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "givenName" ),
+ MBEDTLS_OID_AT_GIVEN_NAME, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "GN" ),
+ MBEDTLS_OID_AT_GIVEN_NAME, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "initials" ),
+ MBEDTLS_OID_AT_INITIALS, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "pseudonym" ),
+ MBEDTLS_OID_AT_PSEUDONYM, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "generationQualifier" ),
+ MBEDTLS_OID_AT_GENERATION_QUALIFIER, MBEDTLS_ASN1_UTF8_STRING },
+ { ADD_STRLEN( "domainComponent" ),
+ MBEDTLS_OID_DOMAIN_COMPONENT, MBEDTLS_ASN1_IA5_STRING },
+ { ADD_STRLEN( "DC" ),
+ MBEDTLS_OID_DOMAIN_COMPONENT, MBEDTLS_ASN1_IA5_STRING },
+ { NULL, 0, NULL, MBEDTLS_ASN1_NULL }
};
-static const char *x509_at_oid_from_name( const char *name, size_t name_len )
+static const x509_attr_descriptor_t *x509_attr_descr_from_name( const char *name, size_t name_len )
{
const x509_attr_descriptor_t *cur;
@@ -83,7 +119,10 @@ static const char *x509_at_oid_from_name( const char *name, size_t name_len )
strncmp( cur->name, name, name_len ) == 0 )
break;
- return( cur->oid );
+ if ( cur->name == NULL )
+ return( NULL );
+
+ return( cur );
}
int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *name )
@@ -92,6 +131,7 @@ int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *na
const char *s = name, *c = s;
const char *end = s + strlen( s );
const char *oid = NULL;
+ const x509_attr_descriptor_t* attr_descr = NULL;
int in_tag = 1;
char data[MBEDTLS_X509_MAX_DN_NAME_SIZE];
char *d = data;
@@ -103,12 +143,13 @@ int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *na
{
if( in_tag && *c == '=' )
{
- if( ( oid = x509_at_oid_from_name( s, c - s ) ) == NULL )
+ if( ( attr_descr = x509_attr_descr_from_name( s, c - s ) ) == NULL )
{
ret = MBEDTLS_ERR_X509_UNKNOWN_OID;
goto exit;
}
+ oid = attr_descr->oid;
s = c + 1;
in_tag = 0;
d = data;
@@ -127,13 +168,19 @@ int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *na
}
else if( !in_tag && ( *c == ',' || c == end ) )
{
- if( mbedtls_asn1_store_named_data( head, oid, strlen( oid ),
- (unsigned char *) data,
- d - data ) == NULL )
+ mbedtls_asn1_named_data* cur =
+ mbedtls_asn1_store_named_data( head, oid, strlen( oid ),
+ (unsigned char *) data,
+ d - data );
+
+ if(cur == NULL )
{
return( MBEDTLS_ERR_X509_ALLOC_FAILED );
}
+ // set tagType
+ cur->val.tag = attr_descr->default_tag;
+
while( c < end && *(c + 1) == ' ' )
c++;
@@ -192,46 +239,40 @@ int mbedtls_x509_set_extension( mbedtls_asn1_named_data **head, const char *oid,
*
* AttributeValue ::= ANY DEFINED BY AttributeType
*/
-static int x509_write_name( unsigned char **p, unsigned char *start,
- const char *oid, size_t oid_len,
- const unsigned char *name, size_t name_len )
+static int x509_write_name( unsigned char **p, unsigned char *start, mbedtls_asn1_named_data* cur_name)
{
int ret;
size_t len = 0;
-
- // Write PrintableString for all except MBEDTLS_OID_PKCS9_EMAIL
- //
- if( MBEDTLS_OID_SIZE( MBEDTLS_OID_PKCS9_EMAIL ) == oid_len &&
- memcmp( oid, MBEDTLS_OID_PKCS9_EMAIL, oid_len ) == 0 )
- {
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_ia5_string( p, start,
- (const char *) name,
- name_len ) );
- }
- else
- {
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_printable_string( p, start,
- (const char *) name,
- name_len ) );
- }
-
+ const char *oid = (const char*)cur_name->oid.p;
+ size_t oid_len = cur_name->oid.len;
+ const unsigned char *name = cur_name->val.p;
+ size_t name_len = cur_name->val.len;
+
+ // Write correct string tag and value
+ MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tagged_string( p, start,
+ cur_name->val.tag,
+ (const char *) name,
+ name_len ) );
// Write OID
//
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( p, start, oid, oid_len ) );
+ MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( p, start, oid,
+ oid_len ) );
MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) );
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED |
- MBEDTLS_ASN1_SEQUENCE ) );
+ MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start,
+ MBEDTLS_ASN1_CONSTRUCTED |
+ MBEDTLS_ASN1_SEQUENCE ) );
MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) );
- MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED |
+ MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start,
+ MBEDTLS_ASN1_CONSTRUCTED |
MBEDTLS_ASN1_SET ) );
return( (int) len );
}
int mbedtls_x509_write_names( unsigned char **p, unsigned char *start,
- mbedtls_asn1_named_data *first )
+ mbedtls_asn1_named_data *first )
{
int ret;
size_t len = 0;
@@ -239,9 +280,7 @@ int mbedtls_x509_write_names( unsigned char **p, unsigned char *start,
while( cur != NULL )
{
- MBEDTLS_ASN1_CHK_ADD( len, x509_write_name( p, start, (char *) cur->oid.p,
- cur->oid.len,
- cur->val.p, cur->val.len ) );
+ MBEDTLS_ASN1_CHK_ADD( len, x509_write_name( p, start, cur ) );
cur = cur->next;
}
diff --git a/thirdparty/mbedtls/library/x509_crt.c b/thirdparty/mbedtls/library/x509_crt.c
index 3cf1743821..35a134950e 100644
--- a/thirdparty/mbedtls/library/x509_crt.c
+++ b/thirdparty/mbedtls/library/x509_crt.c
@@ -43,7 +43,6 @@
#include "mbedtls/oid.h"
#include "mbedtls/platform_util.h"
-#include <stdio.h>
#include <string.h>
#if defined(MBEDTLS_PEM_PARSE_C)
@@ -53,6 +52,7 @@
#if defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h"
#else
+#include <stdio.h>
#include <stdlib.h>
#define mbedtls_free free
#define mbedtls_calloc calloc
@@ -176,6 +176,9 @@ const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_suiteb =
static int x509_profile_check_md_alg( const mbedtls_x509_crt_profile *profile,
mbedtls_md_type_t md_alg )
{
+ if( md_alg == MBEDTLS_MD_NONE )
+ return( -1 );
+
if( ( profile->allowed_mds & MBEDTLS_X509_ID_FLAG( md_alg ) ) != 0 )
return( 0 );
@@ -189,6 +192,9 @@ static int x509_profile_check_md_alg( const mbedtls_x509_crt_profile *profile,
static int x509_profile_check_pk_alg( const mbedtls_x509_crt_profile *profile,
mbedtls_pk_type_t pk_alg )
{
+ if( pk_alg == MBEDTLS_PK_NONE )
+ return( -1 );
+
if( ( profile->allowed_pks & MBEDTLS_X509_ID_FLAG( pk_alg ) ) != 0 )
return( 0 );
@@ -221,6 +227,9 @@ static int x509_profile_check_key( const mbedtls_x509_crt_profile *profile,
{
const mbedtls_ecp_group_id gid = mbedtls_pk_ec( *pk )->grp.id;
+ if( gid == MBEDTLS_ECP_DP_NONE )
+ return( -1 );
+
if( ( profile->allowed_curves & MBEDTLS_X509_ID_FLAG( gid ) ) != 0 )
return( 0 );
@@ -232,6 +241,153 @@ static int x509_profile_check_key( const mbedtls_x509_crt_profile *profile,
}
/*
+ * Like memcmp, but case-insensitive and always returns -1 if different
+ */
+static int x509_memcasecmp( const void *s1, const void *s2, size_t len )
+{
+ size_t i;
+ unsigned char diff;
+ const unsigned char *n1 = s1, *n2 = s2;
+
+ for( i = 0; i < len; i++ )
+ {
+ diff = n1[i] ^ n2[i];
+
+ if( diff == 0 )
+ continue;
+
+ if( diff == 32 &&
+ ( ( n1[i] >= 'a' && n1[i] <= 'z' ) ||
+ ( n1[i] >= 'A' && n1[i] <= 'Z' ) ) )
+ {
+ continue;
+ }
+
+ return( -1 );
+ }
+
+ return( 0 );
+}
+
+/*
+ * Return 0 if name matches wildcard, -1 otherwise
+ */
+static int x509_check_wildcard( const char *cn, const mbedtls_x509_buf *name )
+{
+ size_t i;
+ size_t cn_idx = 0, cn_len = strlen( cn );
+
+ /* We can't have a match if there is no wildcard to match */
+ if( name->len < 3 || name->p[0] != '*' || name->p[1] != '.' )
+ return( -1 );
+
+ for( i = 0; i < cn_len; ++i )
+ {
+ if( cn[i] == '.' )
+ {
+ cn_idx = i;
+ break;
+ }
+ }
+
+ if( cn_idx == 0 )
+ return( -1 );
+
+ if( cn_len - cn_idx == name->len - 1 &&
+ x509_memcasecmp( name->p + 1, cn + cn_idx, name->len - 1 ) == 0 )
+ {
+ return( 0 );
+ }
+
+ return( -1 );
+}
+
+/*
+ * Compare two X.509 strings, case-insensitive, and allowing for some encoding
+ * variations (but not all).
+ *
+ * Return 0 if equal, -1 otherwise.
+ */
+static int x509_string_cmp( const mbedtls_x509_buf *a, const mbedtls_x509_buf *b )
+{
+ if( a->tag == b->tag &&
+ a->len == b->len &&
+ memcmp( a->p, b->p, b->len ) == 0 )
+ {
+ return( 0 );
+ }
+
+ if( ( a->tag == MBEDTLS_ASN1_UTF8_STRING || a->tag == MBEDTLS_ASN1_PRINTABLE_STRING ) &&
+ ( b->tag == MBEDTLS_ASN1_UTF8_STRING || b->tag == MBEDTLS_ASN1_PRINTABLE_STRING ) &&
+ a->len == b->len &&
+ x509_memcasecmp( a->p, b->p, b->len ) == 0 )
+ {
+ return( 0 );
+ }
+
+ return( -1 );
+}
+
+/*
+ * Compare two X.509 Names (aka rdnSequence).
+ *
+ * See RFC 5280 section 7.1, though we don't implement the whole algorithm:
+ * we sometimes return unequal when the full algorithm would return equal,
+ * but never the other way. (In particular, we don't do Unicode normalisation
+ * or space folding.)
+ *
+ * Return 0 if equal, -1 otherwise.
+ */
+static int x509_name_cmp( const mbedtls_x509_name *a, const mbedtls_x509_name *b )
+{
+ /* Avoid recursion, it might not be optimised by the compiler */
+ while( a != NULL || b != NULL )
+ {
+ if( a == NULL || b == NULL )
+ return( -1 );
+
+ /* type */
+ if( a->oid.tag != b->oid.tag ||
+ a->oid.len != b->oid.len ||
+ memcmp( a->oid.p, b->oid.p, b->oid.len ) != 0 )
+ {
+ return( -1 );
+ }
+
+ /* value */
+ if( x509_string_cmp( &a->val, &b->val ) != 0 )
+ return( -1 );
+
+ /* structure of the list of sets */
+ if( a->next_merged != b->next_merged )
+ return( -1 );
+
+ a = a->next;
+ b = b->next;
+ }
+
+ /* a == NULL == b */
+ return( 0 );
+}
+
+/*
+ * Reset (init or clear) a verify_chain
+ */
+static void x509_crt_verify_chain_reset(
+ mbedtls_x509_crt_verify_chain *ver_chain )
+{
+ size_t i;
+
+ for( i = 0; i < MBEDTLS_X509_MAX_VERIFY_CHAIN_SIZE; i++ )
+ {
+ ver_chain->items[i].crt = NULL;
+ ver_chain->items[i].flags = -1;
+ }
+
+ ver_chain->len = 0;
+}
+
+/*
* Version ::= INTEGER { v1(0), v2(1), v3(2) }
*/
static int x509_get_version( unsigned char **p,
@@ -583,18 +739,14 @@ static int x509_get_crt_ext( unsigned char **p,
end_ext_data = *p + len;
/* Get extension ID */
- extn_oid.tag = **p;
-
- if( ( ret = mbedtls_asn1_get_tag( p, end, &extn_oid.len, MBEDTLS_ASN1_OID ) ) != 0 )
+ if( ( ret = mbedtls_asn1_get_tag( p, end_ext_data, &extn_oid.len,
+ MBEDTLS_ASN1_OID ) ) != 0 )
return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret );
+ extn_oid.tag = MBEDTLS_ASN1_OID;
extn_oid.p = *p;
*p += extn_oid.len;
- if( ( end - *p ) < 1 )
- return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS +
- MBEDTLS_ERR_ASN1_OUT_OF_DATA );
-
/* Get optional critical */
if( ( ret = mbedtls_asn1_get_bool( p, end_ext_data, &is_critical ) ) != 0 &&
( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) )
@@ -1139,7 +1291,7 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
char filename[MAX_PATH];
char *p;
size_t len = strlen( path );
- int length_as_int = 0;
+ int lengthAsInt = 0;
WIN32_FIND_DATAW file_data;
HANDLE hFind;
@@ -1154,7 +1306,7 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
p = filename + len;
filename[len++] = '*';
- if ( FAILED ( SizeTToInt( len, &length_as_int ) ) )
+ if ( FAILED ( SizeTToInt( len, &lengthAsInt ) ) )
return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
/*
@@ -1165,7 +1317,7 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
* incoming string are less than MAX_PATH to avoid a buffer overrun with
* MultiByteToWideChar().
*/
- w_ret = MultiByteToWideChar( CP_ACP, 0, filename, length_as_int, szDir,
+ w_ret = MultiByteToWideChar( CP_ACP, 0, filename, lengthAsInt, szDir,
MAX_PATH - 3 );
if( w_ret == 0 )
return( MBEDTLS_ERR_X509_BAD_INPUT_DATA );
@@ -1182,11 +1334,11 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
if( file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
continue;
- if ( FAILED( SizeTToInt( wcslen( file_data.cFileName ), &length_as_int ) ) )
+ if ( FAILED( SizeTToInt( wcslen( file_data.cFileName ), &lengthAsInt ) ) )
return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
w_ret = WideCharToMultiByte( CP_ACP, 0, file_data.cFileName,
- length_as_int,
+ lengthAsInt,
p, (int) len - 1,
NULL, NULL );
if( w_ret == 0 )
@@ -1690,9 +1842,7 @@ static int x509_crt_verifycrl( mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
while( crl_list != NULL )
{
if( crl_list->version == 0 ||
- crl_list->issuer_raw.len != ca->subject_raw.len ||
- memcmp( crl_list->issuer_raw.p, ca->subject_raw.p,
- crl_list->issuer_raw.len ) != 0 )
+ x509_name_cmp( &crl_list->issuer, &ca->subject ) != 0 )
{
crl_list = crl_list->next;
continue;
@@ -1702,7 +1852,8 @@ static int x509_crt_verifycrl( mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
* Check if the CA is configured to sign CRLs
*/
#if defined(MBEDTLS_X509_CHECK_KEY_USAGE)
- if( mbedtls_x509_crt_check_key_usage( ca, MBEDTLS_X509_KU_CRL_SIGN ) != 0 )
+ if( mbedtls_x509_crt_check_key_usage( ca,
+ MBEDTLS_X509_KU_CRL_SIGN ) != 0 )
{
flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED;
break;
@@ -1763,140 +1914,11 @@ static int x509_crt_verifycrl( mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
#endif /* MBEDTLS_X509_CRL_PARSE_C */
/*
- * Like memcmp, but case-insensitive and always returns -1 if different
- */
-static int x509_memcasecmp( const void *s1, const void *s2, size_t len )
-{
- size_t i;
- unsigned char diff;
- const unsigned char *n1 = s1, *n2 = s2;
-
- for( i = 0; i < len; i++ )
- {
- diff = n1[i] ^ n2[i];
-
- if( diff == 0 )
- continue;
-
- if( diff == 32 &&
- ( ( n1[i] >= 'a' && n1[i] <= 'z' ) ||
- ( n1[i] >= 'A' && n1[i] <= 'Z' ) ) )
- {
- continue;
- }
-
- return( -1 );
- }
-
- return( 0 );
-}
-
-/*
- * Return 0 if name matches wildcard, -1 otherwise
- */
-static int x509_check_wildcard( const char *cn, const mbedtls_x509_buf *name )
-{
- size_t i;
- size_t cn_idx = 0, cn_len = strlen( cn );
-
- /* We can't have a match if there is no wildcard to match */
- if( name->len < 3 || name->p[0] != '*' || name->p[1] != '.' )
- return( -1 );
-
- for( i = 0; i < cn_len; ++i )
- {
- if( cn[i] == '.' )
- {
- cn_idx = i;
- break;
- }
- }
-
- if( cn_idx == 0 )
- return( -1 );
-
- if( cn_len - cn_idx == name->len - 1 &&
- x509_memcasecmp( name->p + 1, cn + cn_idx, name->len - 1 ) == 0 )
- {
- return( 0 );
- }
-
- return( -1 );
-}
-
-/*
- * Compare two X.509 strings, case-insensitive, and allowing for some encoding
- * variations (but not all).
- *
- * Return 0 if equal, -1 otherwise.
- */
-static int x509_string_cmp( const mbedtls_x509_buf *a, const mbedtls_x509_buf *b )
-{
- if( a->tag == b->tag &&
- a->len == b->len &&
- memcmp( a->p, b->p, b->len ) == 0 )
- {
- return( 0 );
- }
-
- if( ( a->tag == MBEDTLS_ASN1_UTF8_STRING || a->tag == MBEDTLS_ASN1_PRINTABLE_STRING ) &&
- ( b->tag == MBEDTLS_ASN1_UTF8_STRING || b->tag == MBEDTLS_ASN1_PRINTABLE_STRING ) &&
- a->len == b->len &&
- x509_memcasecmp( a->p, b->p, b->len ) == 0 )
- {
- return( 0 );
- }
-
- return( -1 );
-}
-
-/*
- * Compare two X.509 Names (aka rdnSequence).
- *
- * See RFC 5280 section 7.1, though we don't implement the whole algorithm:
- * we sometimes return unequal when the full algorithm would return equal,
- * but never the other way. (In particular, we don't do Unicode normalisation
- * or space folding.)
- *
- * Return 0 if equal, -1 otherwise.
- */
-static int x509_name_cmp( const mbedtls_x509_name *a, const mbedtls_x509_name *b )
-{
- /* Avoid recursion, it might not be optimised by the compiler */
- while( a != NULL || b != NULL )
- {
- if( a == NULL || b == NULL )
- return( -1 );
-
- /* type */
- if( a->oid.tag != b->oid.tag ||
- a->oid.len != b->oid.len ||
- memcmp( a->oid.p, b->oid.p, b->oid.len ) != 0 )
- {
- return( -1 );
- }
-
- /* value */
- if( x509_string_cmp( &a->val, &b->val ) != 0 )
- return( -1 );
-
- /* structure of the list of sets */
- if( a->next_merged != b->next_merged )
- return( -1 );
-
- a = a->next;
- b = b->next;
- }
-
- /* a == NULL == b */
- return( 0 );
-}
-
-/*
* Check the signature of a certificate by its parent
*/
static int x509_crt_check_signature( const mbedtls_x509_crt *child,
- mbedtls_x509_crt *parent )
+ mbedtls_x509_crt *parent,
+ mbedtls_x509_crt_restart_ctx *rs_ctx )
{
const mbedtls_md_info_t *md_info;
unsigned char hash[MBEDTLS_MD_MAX_SIZE];
@@ -1908,14 +1930,24 @@ static int x509_crt_check_signature( const mbedtls_x509_crt *child,
return( -1 );
}
- if( mbedtls_pk_verify_ext( child->sig_pk, child->sig_opts, &parent->pk,
- child->sig_md, hash, mbedtls_md_get_size( md_info ),
- child->sig.p, child->sig.len ) != 0 )
- {
+ /* Skip expensive computation on obvious mismatch */
+ if( ! mbedtls_pk_can_do( &parent->pk, child->sig_pk ) )
return( -1 );
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && child->sig_pk == MBEDTLS_PK_ECDSA )
+ {
+ return( mbedtls_pk_verify_restartable( &parent->pk,
+ child->sig_md, hash, mbedtls_md_get_size( md_info ),
+ child->sig.p, child->sig.len, &rs_ctx->pk ) );
}
+#else
+ (void) rs_ctx;
+#endif
- return( 0 );
+ return( mbedtls_pk_verify_ext( child->sig_pk, child->sig_opts, &parent->pk,
+ child->sig_md, hash, mbedtls_md_get_size( md_info ),
+ child->sig.p, child->sig.len ) );
}
/*
@@ -1962,6 +1994,7 @@ static int x509_crt_check_parent( const mbedtls_x509_crt *child,
* 1. subject name matches child's issuer
* 2. if necessary, the CA bit is set and key usage allows signing certs
* 3. for trusted roots, the signature is correct
+ * (for intermediates, the signature is checked and the result reported)
* 4. pathlen constraints are satisfied
*
* If there's a suitable candidate which is also time-valid, return the first
@@ -1984,23 +2017,54 @@ static int x509_crt_check_parent( const mbedtls_x509_crt *child,
* Arguments:
* - [in] child: certificate for which we're looking for a parent
* - [in] candidates: chained list of potential parents
+ * - [out] r_parent: parent found (or NULL)
+ * - [out] r_signature_is_good: 1 if child signature by parent is valid, or 0
* - [in] top: 1 if candidates consists of trusted roots, ie we're at the top
* of the chain, 0 otherwise
* - [in] path_cnt: number of intermediates seen so far
* - [in] self_cnt: number of self-signed intermediates seen so far
* (will never be greater than path_cnt)
+ * - [in-out] rs_ctx: context for restarting operations
*
* Return value:
- * - the first suitable parent found (see above regarding time-validity)
- * - NULL if no suitable parent was found
+ * - 0 on success
+ * - MBEDTLS_ERR_ECP_IN_PROGRESS otherwise
*/
-static mbedtls_x509_crt *x509_crt_find_parent_in( mbedtls_x509_crt *child,
- mbedtls_x509_crt *candidates,
- int top,
- size_t path_cnt,
- size_t self_cnt )
+static int x509_crt_find_parent_in(
+ mbedtls_x509_crt *child,
+ mbedtls_x509_crt *candidates,
+ mbedtls_x509_crt **r_parent,
+ int *r_signature_is_good,
+ int top,
+ unsigned path_cnt,
+ unsigned self_cnt,
+ mbedtls_x509_crt_restart_ctx *rs_ctx )
{
- mbedtls_x509_crt *parent, *badtime_parent = NULL;
+ int ret;
+ mbedtls_x509_crt *parent, *fallback_parent;
+ int signature_is_good, fallback_signature_is_good;
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ /* did we have something in progress? */
+ if( rs_ctx != NULL && rs_ctx->parent != NULL )
+ {
+ /* restore saved state */
+ parent = rs_ctx->parent;
+ fallback_parent = rs_ctx->fallback_parent;
+ fallback_signature_is_good = rs_ctx->fallback_signature_is_good;
+
+ /* clear saved state */
+ rs_ctx->parent = NULL;
+ rs_ctx->fallback_parent = NULL;
+ rs_ctx->fallback_signature_is_good = 0;
+
+ /* resume where we left */
+ goto check_signature;
+ }
+#endif
+
+ fallback_parent = NULL;
+ fallback_signature_is_good = 0;
for( parent = candidates; parent != NULL; parent = parent->next )
{
@@ -2016,17 +2080,38 @@ static mbedtls_x509_crt *x509_crt_find_parent_in( mbedtls_x509_crt *child,
}
/* Signature */
- if( top && x509_crt_check_signature( child, parent ) != 0 )
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+check_signature:
+#endif
+ ret = x509_crt_check_signature( child, parent, rs_ctx );
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
{
- continue;
+ /* save state */
+ rs_ctx->parent = parent;
+ rs_ctx->fallback_parent = fallback_parent;
+ rs_ctx->fallback_signature_is_good = fallback_signature_is_good;
+
+ return( ret );
}
+#else
+ (void) ret;
+#endif
+
+ signature_is_good = ret == 0;
+ if( top && ! signature_is_good )
+ continue;
/* optional time check */
if( mbedtls_x509_time_is_past( &parent->valid_to ) ||
mbedtls_x509_time_is_future( &parent->valid_from ) )
{
- if( badtime_parent == NULL )
- badtime_parent = parent;
+ if( fallback_parent == NULL )
+ {
+ fallback_parent = parent;
+ fallback_signature_is_good = signature_is_good;
+ }
continue;
}
@@ -2034,10 +2119,18 @@ static mbedtls_x509_crt *x509_crt_find_parent_in( mbedtls_x509_crt *child,
break;
}
- if( parent == NULL )
- parent = badtime_parent;
+ if( parent != NULL )
+ {
+ *r_parent = parent;
+ *r_signature_is_good = signature_is_good;
+ }
+ else
+ {
+ *r_parent = fallback_parent;
+ *r_signature_is_good = fallback_signature_is_good;
+ }
- return( parent );
+ return( 0 );
}
/*
@@ -2049,34 +2142,78 @@ static mbedtls_x509_crt *x509_crt_find_parent_in( mbedtls_x509_crt *child,
* Arguments:
* - [in] child: certificate for which we're looking for a parent, followed
* by a chain of possible intermediates
- * - [in] trust_ca: locally trusted CAs
- * - [out] 1 if parent was found in trust_ca, 0 if found in provided chain
- * - [in] path_cnt: number of intermediates seen so far
- * - [in] self_cnt: number of self-signed intermediates seen so far
+ * - [in] trust_ca: list of locally trusted certificates
+ * - [out] parent: parent found (or NULL)
+ * - [out] parent_is_trusted: 1 if returned `parent` is trusted, or 0
+ * - [out] signature_is_good: 1 if child signature by parent is valid, or 0
+ * - [in] path_cnt: number of links in the chain so far (EE -> ... -> child)
+ * - [in] self_cnt: number of self-signed certs in the chain so far
* (will always be no greater than path_cnt)
+ * - [in-out] rs_ctx: context for restarting operations
*
* Return value:
- * - the first suitable parent found (see find_parent_in() for "suitable")
- * - NULL if no suitable parent was found
+ * - 0 on success
+ * - MBEDTLS_ERR_ECP_IN_PROGRESS otherwise
*/
-static mbedtls_x509_crt *x509_crt_find_parent( mbedtls_x509_crt *child,
- mbedtls_x509_crt *trust_ca,
- int *parent_is_trusted,
- size_t path_cnt,
- size_t self_cnt )
+static int x509_crt_find_parent(
+ mbedtls_x509_crt *child,
+ mbedtls_x509_crt *trust_ca,
+ mbedtls_x509_crt **parent,
+ int *parent_is_trusted,
+ int *signature_is_good,
+ unsigned path_cnt,
+ unsigned self_cnt,
+ mbedtls_x509_crt_restart_ctx *rs_ctx )
{
- mbedtls_x509_crt *parent;
+ int ret;
+ mbedtls_x509_crt *search_list;
- /* Look for a parent in trusted CAs */
*parent_is_trusted = 1;
- parent = x509_crt_find_parent_in( child, trust_ca, 1, path_cnt, self_cnt );
- if( parent != NULL )
- return( parent );
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ /* restore then clear saved state if we have some stored */
+ if( rs_ctx != NULL && rs_ctx->parent_is_trusted != -1 )
+ {
+ *parent_is_trusted = rs_ctx->parent_is_trusted;
+ rs_ctx->parent_is_trusted = -1;
+ }
+#endif
+
+ while( 1 ) {
+ search_list = *parent_is_trusted ? trust_ca : child->next;
+
+ ret = x509_crt_find_parent_in( child, search_list,
+ parent, signature_is_good,
+ *parent_is_trusted,
+ path_cnt, self_cnt, rs_ctx );
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ {
+ /* save state */
+ rs_ctx->parent_is_trusted = *parent_is_trusted;
+ return( ret );
+ }
+#else
+ (void) ret;
+#endif
+
+ /* stop here if found or already in second iteration */
+ if( *parent != NULL || *parent_is_trusted == 0 )
+ break;
+
+ /* prepare second iteration */
+ *parent_is_trusted = 0;
+ }
+
+ /* extra precaution against mistakes in the caller */
+ if( *parent == NULL )
+ {
+ *parent_is_trusted = 0;
+ *signature_is_good = 0;
+ }
- /* Look for a parent upwards the chain */
- *parent_is_trusted = 0;
- return( x509_crt_find_parent_in( child, child->next, 0, path_cnt, self_cnt ) );
+ return( 0 );
}
/*
@@ -2125,11 +2262,24 @@ static int x509_crt_check_ee_locally_trusted(
* - EE, Ci1, ..., Ciq cannot be continued with a trusted root
* -> return that chain with NOT_TRUSTED set on Ciq
*
+ * Tests for (aspects of) this function should include at least:
+ * - trusted EE
+ * - EE -> trusted root
+ * - EE -> intermedate CA -> trusted root
+ * - if relevant: EE untrusted
+ * - if relevant: EE -> intermediate, untrusted
+ * with the aspect under test checked at each relevant level (EE, int, root).
+ * For some aspects longer chains are required, but usually length 2 is
+ * enough (but length 1 is not in general).
+ *
* Arguments:
* - [in] crt: the cert list EE, C1, ..., Cn
* - [in] trust_ca: the trusted list R1, ..., Rp
* - [in] ca_crl, profile: as in verify_with_profile()
- * - [out] ver_chain, chain_len: the built and verified chain
+ * - [out] ver_chain: the built and verified chain
+ * Only valid when return value is 0, may contain garbage otherwise!
+ * Restart note: need not be the same when calling again to resume.
+ * - [in-out] rs_ctx: context for restarting operations
*
* Return value:
* - non-zero if the chain could not be fully built and examined
@@ -2141,24 +2291,50 @@ static int x509_crt_verify_chain(
mbedtls_x509_crt *trust_ca,
mbedtls_x509_crl *ca_crl,
const mbedtls_x509_crt_profile *profile,
- x509_crt_verify_chain_item ver_chain[X509_MAX_VERIFY_CHAIN_SIZE],
- size_t *chain_len )
+ mbedtls_x509_crt_verify_chain *ver_chain,
+ mbedtls_x509_crt_restart_ctx *rs_ctx )
{
+ /* Don't initialize any of those variables here, so that the compiler can
+ * catch potential issues with jumping ahead when restarting */
+ int ret;
uint32_t *flags;
+ mbedtls_x509_crt_verify_chain_item *cur;
mbedtls_x509_crt *child;
mbedtls_x509_crt *parent;
- int parent_is_trusted = 0;
- int child_is_trusted = 0;
- size_t self_cnt = 0;
+ int parent_is_trusted;
+ int child_is_trusted;
+ int signature_is_good;
+ unsigned self_cnt;
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ /* resume if we had an operation in progress */
+ if( rs_ctx != NULL && rs_ctx->in_progress == x509_crt_rs_find_parent )
+ {
+ /* restore saved state */
+ *ver_chain = rs_ctx->ver_chain; /* struct copy */
+ self_cnt = rs_ctx->self_cnt;
+
+ /* restore derived state */
+ cur = &ver_chain->items[ver_chain->len - 1];
+ child = cur->crt;
+ flags = &cur->flags;
+
+ goto find_parent;
+ }
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
child = crt;
- *chain_len = 0;
+ self_cnt = 0;
+ parent_is_trusted = 0;
+ child_is_trusted = 0;
while( 1 ) {
/* Add certificate to the verification chain */
- ver_chain[*chain_len].crt = child;
- flags = &ver_chain[*chain_len].flags;
- ++*chain_len;
+ cur = &ver_chain->items[ver_chain->len];
+ cur->crt = child;
+ cur->flags = 0;
+ ver_chain->len++;
+ flags = &cur->flags;
/* Check time-validity (all certificates) */
if( mbedtls_x509_time_is_past( &child->valid_to ) )
@@ -2179,15 +2355,33 @@ static int x509_crt_verify_chain(
*flags |= MBEDTLS_X509_BADCERT_BAD_PK;
/* Special case: EE certs that are locally trusted */
- if( *chain_len == 1 &&
+ if( ver_chain->len == 1 &&
x509_crt_check_ee_locally_trusted( child, trust_ca ) == 0 )
{
return( 0 );
}
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+find_parent:
+#endif
/* Look for a parent in trusted CAs or up the chain */
- parent = x509_crt_find_parent( child, trust_ca, &parent_is_trusted,
- *chain_len - 1, self_cnt );
+ ret = x509_crt_find_parent( child, trust_ca, &parent,
+ &parent_is_trusted, &signature_is_good,
+ ver_chain->len - 1, self_cnt, rs_ctx );
+
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && ret == MBEDTLS_ERR_ECP_IN_PROGRESS )
+ {
+ /* save state */
+ rs_ctx->in_progress = x509_crt_rs_find_parent;
+ rs_ctx->self_cnt = self_cnt;
+ rs_ctx->ver_chain = *ver_chain; /* struct copy */
+
+ return( ret );
+ }
+#else
+ (void) ret;
+#endif
/* No parent? We're done here */
if( parent == NULL )
@@ -2199,7 +2393,7 @@ static int x509_crt_verify_chain(
/* Count intermediate self-issued (not necessarily self-signed) certs.
* These can occur with some strategies for key rollover, see [SIRO],
* and should be excluded from max_pathlen checks. */
- if( *chain_len != 1 &&
+ if( ver_chain->len != 1 &&
x509_name_cmp( &child->issuer, &child->subject ) == 0 )
{
self_cnt++;
@@ -2208,14 +2402,14 @@ static int x509_crt_verify_chain(
/* path_cnt is 0 for the first intermediate CA,
* and if parent is trusted it's not an intermediate CA */
if( ! parent_is_trusted &&
- *chain_len > MBEDTLS_X509_MAX_INTERMEDIATE_CA )
+ ver_chain->len > MBEDTLS_X509_MAX_INTERMEDIATE_CA )
{
/* return immediately to avoid overflow the chain array */
return( MBEDTLS_ERR_X509_FATAL_ERROR );
}
- /* if parent is trusted, the signature was checked by find_parent() */
- if( ! parent_is_trusted && x509_crt_check_signature( child, parent ) != 0 )
+ /* signature was checked while searching parent */
+ if( ! signature_is_good )
*flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED;
/* check size of signing key */
@@ -2233,6 +2427,7 @@ static int x509_crt_verify_chain(
child = parent;
parent = NULL;
child_is_trusted = parent_is_trusted;
+ signature_is_good = 0;
}
}
@@ -2301,21 +2496,22 @@ static void x509_crt_verify_name( const mbedtls_x509_crt *crt,
*/
static int x509_crt_merge_flags_with_cb(
uint32_t *flags,
- x509_crt_verify_chain_item ver_chain[X509_MAX_VERIFY_CHAIN_SIZE],
- size_t chain_len,
+ const mbedtls_x509_crt_verify_chain *ver_chain,
int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *),
void *p_vrfy )
{
int ret;
- size_t i;
+ unsigned i;
uint32_t cur_flags;
+ const mbedtls_x509_crt_verify_chain_item *cur;
- for( i = chain_len; i != 0; --i )
+ for( i = ver_chain->len; i != 0; --i )
{
- cur_flags = ver_chain[i-1].flags;
+ cur = &ver_chain->items[i-1];
+ cur_flags = cur->flags;
if( NULL != f_vrfy )
- if( ( ret = f_vrfy( p_vrfy, ver_chain[i-1].crt, (int) i-1, &cur_flags ) ) != 0 )
+ if( ( ret = f_vrfy( p_vrfy, cur->crt, (int) i-1, &cur_flags ) ) != 0 )
return( ret );
*flags |= cur_flags;
@@ -2325,7 +2521,7 @@ static int x509_crt_merge_flags_with_cb(
}
/*
- * Verify the certificate validity
+ * Verify the certificate validity (default profile, not restartable)
*/
int mbedtls_x509_crt_verify( mbedtls_x509_crt *crt,
mbedtls_x509_crt *trust_ca,
@@ -2334,12 +2530,28 @@ int mbedtls_x509_crt_verify( mbedtls_x509_crt *crt,
int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *),
void *p_vrfy )
{
- return( mbedtls_x509_crt_verify_with_profile( crt, trust_ca, ca_crl,
- &mbedtls_x509_crt_profile_default, cn, flags, f_vrfy, p_vrfy ) );
+ return( mbedtls_x509_crt_verify_restartable( crt, trust_ca, ca_crl,
+ &mbedtls_x509_crt_profile_default, cn, flags,
+ f_vrfy, p_vrfy, NULL ) );
+}
+
+/*
+ * Verify the certificate validity (user-chosen profile, not restartable)
+ */
+int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
+ mbedtls_x509_crt *trust_ca,
+ mbedtls_x509_crl *ca_crl,
+ const mbedtls_x509_crt_profile *profile,
+ const char *cn, uint32_t *flags,
+ int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *),
+ void *p_vrfy )
+{
+ return( mbedtls_x509_crt_verify_restartable( crt, trust_ca, ca_crl,
+ profile, cn, flags, f_vrfy, p_vrfy, NULL ) );
}
/*
- * Verify the certificate validity, with profile
+ * Verify the certificate validity, with profile, restartable version
*
* This function:
* - checks the requested CN (if any)
@@ -2348,23 +2560,23 @@ int mbedtls_x509_crt_verify( mbedtls_x509_crt *crt,
* - builds and verifies the chain
* - then calls the callback and merges the flags
*/
-int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
+int mbedtls_x509_crt_verify_restartable( mbedtls_x509_crt *crt,
mbedtls_x509_crt *trust_ca,
mbedtls_x509_crl *ca_crl,
const mbedtls_x509_crt_profile *profile,
const char *cn, uint32_t *flags,
int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *),
- void *p_vrfy )
+ void *p_vrfy,
+ mbedtls_x509_crt_restart_ctx *rs_ctx )
{
int ret;
mbedtls_pk_type_t pk_type;
- x509_crt_verify_chain_item ver_chain[X509_MAX_VERIFY_CHAIN_SIZE];
- size_t chain_len;
- uint32_t *ee_flags = &ver_chain[0].flags;
+ mbedtls_x509_crt_verify_chain ver_chain;
+ uint32_t ee_flags;
*flags = 0;
- memset( ver_chain, 0, sizeof( ver_chain ) );
- chain_len = 0;
+ ee_flags = 0;
+ x509_crt_verify_chain_reset( &ver_chain );
if( profile == NULL )
{
@@ -2374,28 +2586,36 @@ int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
/* check name if requested */
if( cn != NULL )
- x509_crt_verify_name( crt, cn, ee_flags );
+ x509_crt_verify_name( crt, cn, &ee_flags );
/* Check the type and size of the key */
pk_type = mbedtls_pk_get_type( &crt->pk );
if( x509_profile_check_pk_alg( profile, pk_type ) != 0 )
- *ee_flags |= MBEDTLS_X509_BADCERT_BAD_PK;
+ ee_flags |= MBEDTLS_X509_BADCERT_BAD_PK;
if( x509_profile_check_key( profile, &crt->pk ) != 0 )
- *ee_flags |= MBEDTLS_X509_BADCERT_BAD_KEY;
+ ee_flags |= MBEDTLS_X509_BADCERT_BAD_KEY;
/* Check the chain */
ret = x509_crt_verify_chain( crt, trust_ca, ca_crl, profile,
- ver_chain, &chain_len );
+ &ver_chain, rs_ctx );
+
if( ret != 0 )
goto exit;
+ /* Merge end-entity flags */
+ ver_chain.items[0].flags |= ee_flags;
+
/* Build final flags, calling callback on the way if any */
- ret = x509_crt_merge_flags_with_cb( flags,
- ver_chain, chain_len, f_vrfy, p_vrfy );
+ ret = x509_crt_merge_flags_with_cb( flags, &ver_chain, f_vrfy, p_vrfy );
exit:
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+ if( rs_ctx != NULL && ret != MBEDTLS_ERR_ECP_IN_PROGRESS )
+ mbedtls_x509_crt_restart_free( rs_ctx );
+#endif
+
/* prevent misuse of the vrfy callback - VERIFY_FAILED would be ignored by
* the SSL module for authmode optional, but non-zero return from the
* callback means a fatal error so it shouldn't be ignored */
@@ -2506,4 +2726,36 @@ void mbedtls_x509_crt_free( mbedtls_x509_crt *crt )
while( cert_cur != NULL );
}
+#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE)
+/*
+ * Initialize a restart context
+ */
+void mbedtls_x509_crt_restart_init( mbedtls_x509_crt_restart_ctx *ctx )
+{
+ mbedtls_pk_restart_init( &ctx->pk );
+
+ ctx->parent = NULL;
+ ctx->fallback_parent = NULL;
+ ctx->fallback_signature_is_good = 0;
+
+ ctx->parent_is_trusted = -1;
+
+ ctx->in_progress = x509_crt_rs_none;
+ ctx->self_cnt = 0;
+ x509_crt_verify_chain_reset( &ctx->ver_chain );
+}
+
+/*
+ * Free the components of a restart context
+ */
+void mbedtls_x509_crt_restart_free( mbedtls_x509_crt_restart_ctx *ctx )
+{
+ if( ctx == NULL )
+ return;
+
+ mbedtls_pk_restart_free( &ctx->pk );
+ mbedtls_x509_crt_restart_init( ctx );
+}
+#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
+
#endif /* MBEDTLS_X509_CRT_PARSE_C */
diff --git a/thirdparty/mbedtls/padlock.diff b/thirdparty/mbedtls/padlock.diff
new file mode 100644
index 0000000000..6ace48891c
--- /dev/null
+++ b/thirdparty/mbedtls/padlock.diff
@@ -0,0 +1,13 @@
+--- a/thirdparty/mbedtls/include/mbedtls/config.h
++++ b/thirdparty/mbedtls/include/mbedtls/config.h
+@@ -2477,7 +2477,9 @@
+ *
+ * This modules adds support for the VIA PadLock on x86.
+ */
+-#define MBEDTLS_PADLOCK_C
++// -- GODOT start --
++// #define MBEDTLS_PADLOCK_C
++// -- GODOT end --
+
+ /**
+ * \def MBEDTLS_PEM_PARSE_C
diff --git a/thirdparty/misc/stb_truetype.h b/thirdparty/misc/stb_truetype.h
index e2efae2285..72299ea86d 100644
--- a/thirdparty/misc/stb_truetype.h
+++ b/thirdparty/misc/stb_truetype.h
@@ -1,4 +1,4 @@
-// stb_truetype.h - v1.19 - public domain
+// stb_truetype.h - v1.21 - public domain
// authored from 2009-2016 by Sean Barrett / RAD Game Tools
//
// This library processes TrueType files:
@@ -49,6 +49,8 @@
//
// VERSION HISTORY
//
+// 1.21 (2019-02-25) fix warning
+// 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics()
// 1.19 (2018-02-11) GPOS kerning, STBTT_fmod
// 1.18 (2018-01-29) add missing function
// 1.17 (2017-07-23) make more arguments const; doc fix
@@ -75,7 +77,7 @@
//
// USAGE
//
-// Include this file in whatever places neeed to refer to it. In ONE C/C++
+// Include this file in whatever places need to refer to it. In ONE C/C++
// file, write:
// #define STB_TRUETYPE_IMPLEMENTATION
// before the #include of this file. This expands out the actual
@@ -242,19 +244,6 @@
// recommend it.
//
//
-// SOURCE STATISTICS (based on v0.6c, 2050 LOC)
-//
-// Documentation & header file 520 LOC \___ 660 LOC documentation
-// Sample code 140 LOC /
-// Truetype parsing 620 LOC ---- 620 LOC TrueType
-// Software rasterization 240 LOC \ .
-// Curve tesselation 120 LOC \__ 550 LOC Bitmap creation
-// Bitmap management 100 LOC /
-// Baked bitmap interface 70 LOC /
-// Font name matching & access 150 LOC ---- 150
-// C runtime library abstraction 60 LOC ---- 60
-//
-//
// PERFORMANCE MEASUREMENTS FOR 1.06:
//
// 32-bit 64-bit
@@ -556,6 +545,8 @@ STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int p
//
// It's inefficient; you might want to c&p it and optimize it.
+STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap);
+// Query the font vertical metrics without having to create a font first.
//////////////////////////////////////////////////////////////////////////////
@@ -641,6 +632,12 @@ STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h
// To use with PackFontRangesGather etc., you must set it before calls
// call to PackFontRangesGatherRects.
+STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip);
+// If skip != 0, this tells stb_truetype to skip any codepoints for which
+// there is no corresponding glyph. If skip=0, which is the default, then
+// codepoints without a glyph recived the font's "missing character" glyph,
+// typically an empty box by convention.
+
STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, // same data as above
int char_index, // character to display
float *xpos, float *ypos, // pointers to current position in screen pixel space
@@ -669,6 +666,7 @@ struct stbtt_pack_context {
int height;
int stride_in_bytes;
int padding;
+ int skip_missing;
unsigned int h_oversample, v_oversample;
unsigned char *pixels;
void *nodes;
@@ -694,7 +692,7 @@ STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index);
// file will only define one font and it always be at offset 0, so it will
// return '0' for index 0, and -1 for all other indices.
-// The following structure is defined publically so you can declare one on
+// The following structure is defined publicly so you can declare one on
// the stack or as a global or etc, but you should treat it as opaque.
struct stbtt_fontinfo
{
@@ -733,6 +731,7 @@ STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codep
// and you want a speed-up, call this function with the character you're
// going to process, then use glyph-based functions instead of the
// codepoint-based functions.
+// Returns 0 if the character codepoint is not defined in the font.
//////////////////////////////////////////////////////////////////////////////
@@ -820,7 +819,7 @@ STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, s
// returns # of vertices and fills *vertices with the pointer to them
// these are expressed in "unscaled" coordinates
//
-// The shape is a series of countours. Each one starts with
+// The shape is a series of contours. Each one starts with
// a STBTT_moveto, then consists of a series of mixed
// STBTT_lineto and STBTT_curveto segments. A lineto
// draws a line from previous endpoint to its x,y; a curveto
@@ -916,7 +915,7 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff);
// These functions compute a discretized SDF field for a single character, suitable for storing
// in a single-channel texture, sampling with bilinear filtering, and testing against
-// larger than some threshhold to produce scalable fonts.
+// larger than some threshold to produce scalable fonts.
// info -- the font
// scale -- controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap
// glyph/codepoint -- the character to generate the SDF for
@@ -2463,6 +2462,7 @@ static stbtt_int32 stbtt__GetGlyphGPOSInfoAdvance(const stbtt_fontinfo *info, i
if (valueFormat2 != 0) return 0;
STBTT_assert(coverageIndex < pairSetCount);
+ STBTT__NOTUSED(pairSetCount);
needle=glyph2;
r=pairValueCount-1;
@@ -3160,7 +3160,13 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
if (e->y0 != e->y1) {
stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata);
if (z != NULL) {
- STBTT_assert(z->ey >= scan_y_top);
+ if (j == 0 && off_y != 0) {
+ if (z->ey < scan_y_top) {
+ // this can happen due to subpixel positioning and some kind of fp rounding error i think
+ z->ey = scan_y_top;
+ }
+ }
+ STBTT_assert(z->ey >= scan_y_top); // if we get really unlucky a tiny bit of an edge can be out of bounds
// insert at front
z->next = active;
active = z;
@@ -3229,7 +3235,7 @@ static void stbtt__sort_edges_ins_sort(stbtt__edge *p, int n)
static void stbtt__sort_edges_quicksort(stbtt__edge *p, int n)
{
- /* threshhold for transitioning to insertion sort */
+ /* threshold for transitioning to insertion sort */
while (n > 12) {
stbtt__edge t;
int c01,c12,c,m,i,j;
@@ -3364,7 +3370,7 @@ static void stbtt__add_point(stbtt__point *points, int n, float x, float y)
points[n].y = y;
}
-// tesselate until threshhold p is happy... @TODO warped to compensate for non-linear stretching
+// tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching
static int stbtt__tesselate_curve(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float objspace_flatness_squared, int n)
{
// midpoint
@@ -3789,6 +3795,7 @@ STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, in
spc->stride_in_bytes = stride_in_bytes != 0 ? stride_in_bytes : pw;
spc->h_oversample = 1;
spc->v_oversample = 1;
+ spc->skip_missing = 0;
stbrp_init_target(context, pw-padding, ph-padding, nodes, num_nodes);
@@ -3814,6 +3821,11 @@ STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h
spc->v_oversample = v_oversample;
}
+STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip)
+{
+ spc->skip_missing = skip;
+}
+
#define STBTT__OVER_MASK (STBTT_MAX_OVERSAMPLE-1)
static void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width)
@@ -3967,13 +3979,17 @@ STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stb
int x0,y0,x1,y1;
int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];
int glyph = stbtt_FindGlyphIndex(info, codepoint);
- stbtt_GetGlyphBitmapBoxSubpixel(info,glyph,
- scale * spc->h_oversample,
- scale * spc->v_oversample,
- 0,0,
- &x0,&y0,&x1,&y1);
- rects[k].w = (stbrp_coord) (x1-x0 + spc->padding + spc->h_oversample-1);
- rects[k].h = (stbrp_coord) (y1-y0 + spc->padding + spc->v_oversample-1);
+ if (glyph == 0 && spc->skip_missing) {
+ rects[k].w = rects[k].h = 0;
+ } else {
+ stbtt_GetGlyphBitmapBoxSubpixel(info,glyph,
+ scale * spc->h_oversample,
+ scale * spc->v_oversample,
+ 0,0,
+ &x0,&y0,&x1,&y1);
+ rects[k].w = (stbrp_coord) (x1-x0 + spc->padding + spc->h_oversample-1);
+ rects[k].h = (stbrp_coord) (y1-y0 + spc->padding + spc->v_oversample-1);
+ }
++k;
}
}
@@ -4026,7 +4042,7 @@ STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const
sub_y = stbtt__oversample_shift(spc->v_oversample);
for (j=0; j < ranges[i].num_chars; ++j) {
stbrp_rect *r = &rects[k];
- if (r->was_packed) {
+ if (r->was_packed && r->w != 0 && r->h != 0) {
stbtt_packedchar *bc = &ranges[i].chardata_for_range[j];
int advance, lsb, x0,y0,x1,y1;
int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];
@@ -4140,6 +4156,19 @@ STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *
return stbtt_PackFontRanges(spc, fontdata, font_index, &range, 1);
}
+STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap)
+{
+ int i_ascent, i_descent, i_lineGap;
+ float scale;
+ stbtt_fontinfo info;
+ stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata, index));
+ scale = size > 0 ? stbtt_ScaleForPixelHeight(&info, size) : stbtt_ScaleForMappingEmToPixels(&info, -size);
+ stbtt_GetFontVMetrics(&info, &i_ascent, &i_descent, &i_lineGap);
+ *ascent = (float) i_ascent * scale;
+ *descent = (float) i_descent * scale;
+ *lineGap = (float) i_lineGap * scale;
+}
+
STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer)
{
float ipw = 1.0f / pw, iph = 1.0f / ph;
diff --git a/thirdparty/misc/stb_vorbis.c b/thirdparty/misc/stb_vorbis.c
index 8edcf0f38a..88276026ef 100644
--- a/thirdparty/misc/stb_vorbis.c
+++ b/thirdparty/misc/stb_vorbis.c
@@ -1,4 +1,4 @@
-// Ogg Vorbis audio decoder - v1.14 - public domain
+// Ogg Vorbis audio decoder - v1.15 - public domain
// http://nothings.org/stb_vorbis/
//
// Original version written by Sean Barrett in 2007.
@@ -33,6 +33,7 @@
// Timur Gagiev
//
// Partial history:
+// 1.15 - 2019-02-07 - explicit failure if Ogg Skeleton data is found
// 1.14 - 2018-02-11 - delete bogus dealloca usage
// 1.13 - 2018-01-29 - fix truncation of last frame (hopefully)
// 1.12 - 2017-11-21 - limit residue begin/end to blocksize/2 to avoid large temp allocs in bad/corrupt files
@@ -253,7 +254,7 @@ extern stb_vorbis * stb_vorbis_open_file(FILE *f, int close_handle_on_close,
// create an ogg vorbis decoder from an open FILE *, looking for a stream at
// the _current_ seek point (ftell). on failure, returns NULL and sets *error.
// note that stb_vorbis must "own" this stream; if you seek it in between
-// calls to stb_vorbis, it will become confused. Morever, if you attempt to
+// calls to stb_vorbis, it will become confused. Moreover, if you attempt to
// perform stb_vorbis_seek_*() operations on this file, it will assume it
// owns the _entire_ rest of the file after the start point. Use the next
// function, stb_vorbis_open_file_section(), to limit it.
@@ -374,7 +375,8 @@ enum STBVorbisError
VORBIS_invalid_first_page,
VORBIS_bad_packet_type,
VORBIS_cant_find_last_page,
- VORBIS_seek_failed
+ VORBIS_seek_failed,
+ VORBIS_ogg_skeleton_not_supported
};
@@ -1073,7 +1075,7 @@ static int compute_codewords(Codebook *c, uint8 *len, int n, uint32 *values)
assert(z >= 0 && z < 32);
available[z] = 0;
add_entry(c, bit_reverse(res), i, m++, len[i], values);
- // propogate availability up the tree
+ // propagate availability up the tree
if (z != len[i]) {
assert(len[i] >= 0 && len[i] < 32);
for (y=len[i]; y > z; --y) {
@@ -2637,7 +2639,7 @@ static void inverse_mdct(float *buffer, int n, vorb *f, int blocktype)
// once I combined the passes.
// so there's a missing 'times 2' here (for adding X to itself).
- // this propogates through linearly to the end, where the numbers
+ // this propagates through linearly to the end, where the numbers
// are 1/2 too small, and need to be compensated for.
{
@@ -3578,7 +3580,22 @@ static int start_decoder(vorb *f)
if (f->page_flag & PAGEFLAG_continued_packet) return error(f, VORBIS_invalid_first_page);
// check for expected packet length
if (f->segment_count != 1) return error(f, VORBIS_invalid_first_page);
- if (f->segments[0] != 30) return error(f, VORBIS_invalid_first_page);
+ if (f->segments[0] != 30) {
+ // check for the Ogg skeleton fishead identifying header to refine our error
+ if (f->segments[0] == 64 &&
+ getn(f, header, 6) &&
+ header[0] == 'f' &&
+ header[1] == 'i' &&
+ header[2] == 's' &&
+ header[3] == 'h' &&
+ header[4] == 'e' &&
+ header[5] == 'a' &&
+ get8(f) == 'd' &&
+ get8(f) == '\0') return error(f, VORBIS_ogg_skeleton_not_supported);
+ else
+ return error(f, VORBIS_invalid_first_page);
+ }
+
// read packet
// check packet header
if (get8(f) != VORBIS_packet_id) return error(f, VORBIS_invalid_first_page);
@@ -4566,7 +4583,7 @@ static int get_seek_page_info(stb_vorbis *f, ProbedPage *z)
return 1;
}
-// rarely used function to seek back to the preceeding page while finding the
+// rarely used function to seek back to the preceding page while finding the
// start of a packet
static int go_to_page_before(stb_vorbis *f, unsigned int limit_offset)
{
diff --git a/thirdparty/nanosvg/nanosvg.h b/thirdparty/nanosvg/nanosvg.h
index 2321c56fd2..8c8b061cd1 100644
--- a/thirdparty/nanosvg/nanosvg.h
+++ b/thirdparty/nanosvg/nanosvg.h
@@ -29,9 +29,11 @@
#ifndef NANOSVG_H
#define NANOSVG_H
+#ifndef NANOSVG_CPLUSPLUS
#ifdef __cplusplus
extern "C" {
#endif
+#endif
// NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes.
//
@@ -45,15 +47,15 @@ extern "C" {
// NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose
// to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters.
//
-// The units passed to NanoVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'.
+// The units passed to NanoSVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'.
// DPI (dots-per-inch) controls how the unit conversion is done.
//
// If you don't know or care about the units stuff, "px" and 96 should get you going.
/* Example Usage:
- // Load
- NSVGImage* image;
+ // Load SVG
+ NSVGimage* image;
image = nsvgParseFromFile("test.svg", "px", 96);
printf("size: %f x %f\n", image->width, image->height);
// Use...
@@ -167,12 +169,17 @@ NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi)
// Important note: changes the string.
NSVGimage* nsvgParse(char* input, const char* units, float dpi);
-// Deletes list of paths.
+// Duplicates a path.
+NSVGpath* nsvgDuplicatePath(NSVGpath* p);
+
+// Deletes an image.
void nsvgDelete(NSVGimage* image);
+#ifndef NANOSVG_CPLUSPLUS
#ifdef __cplusplus
}
#endif
+#endif
#endif // NANOSVG_H
@@ -1415,8 +1422,7 @@ static unsigned int nsvg__parseColor(const char* str)
static float nsvg__parseOpacity(const char* str)
{
- float val = 0;
- sscanf(str, "%f", &val);
+ float val = nsvg__atof(str);
if (val < 0.0f) val = 0.0f;
if (val > 1.0f) val = 1.0f;
return val;
@@ -1424,8 +1430,7 @@ static float nsvg__parseOpacity(const char* str)
static float nsvg__parseMiterLimit(const char* str)
{
- float val = 0;
- sscanf(str, "%f", &val);
+ float val = nsvg__atof(str);
if (val < 0.0f) val = 0.0f;
return val;
}
@@ -1456,9 +1461,9 @@ static int nsvg__parseUnits(const char* units)
static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)
{
NSVGcoordinate coord = {0, NSVG_UNITS_USER};
- char units[32]="";
- sscanf(str, "%f%31s", &coord.value, units);
- coord.units = nsvg__parseUnits(units);
+ char buf[64];
+ coord.units = nsvg__parseUnits(nsvg__parseNumber(str, buf, 64));
+ coord.value = nsvg__atof(buf);
return coord;
}
@@ -1650,7 +1655,7 @@ static char nsvg__parseLineJoin(const char* str)
else if (strcmp(str, "bevel") == 0)
return NSVG_JOIN_BEVEL;
// TODO: handle inherit.
- return NSVG_CAP_BUTT;
+ return NSVG_JOIN_MITER;
}
static char nsvg__parseFillRule(const char* str)
@@ -2494,11 +2499,26 @@ static void nsvg__parseSVG(NSVGparser* p, const char** attr)
for (i = 0; attr[i]; i += 2) {
if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
if (strcmp(attr[i], "width") == 0) {
- p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 1.0f);
+ p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f);
} else if (strcmp(attr[i], "height") == 0) {
- p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 1.0f);
+ p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f);
} else if (strcmp(attr[i], "viewBox") == 0) {
- sscanf(attr[i + 1], "%f%*[%%, \t]%f%*[%%, \t]%f%*[%%, \t]%f", &p->viewMinx, &p->viewMiny, &p->viewWidth, &p->viewHeight);
+ const char *s = attr[i + 1];
+ char buf[64];
+ s = nsvg__parseNumber(s, buf, 64);
+ p->viewMinx = nsvg__atof(buf);
+ while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
+ if (!*s) return;
+ s = nsvg__parseNumber(s, buf, 64);
+ p->viewMiny = nsvg__atof(buf);
+ while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
+ if (!*s) return;
+ s = nsvg__parseNumber(s, buf, 64);
+ p->viewWidth = nsvg__atof(buf);
+ while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++;
+ if (!*s) return;
+ s = nsvg__parseNumber(s, buf, 64);
+ p->viewHeight = nsvg__atof(buf);
} else if (strcmp(attr[i], "preserveAspectRatio") == 0) {
if (strstr(attr[i + 1], "none") != 0) {
// No uniform scaling
@@ -2906,6 +2926,36 @@ error:
return NULL;
}
+NSVGpath* nsvgDuplicatePath(NSVGpath* p)
+{
+ NSVGpath* res = NULL;
+
+ if (p == NULL)
+ return NULL;
+
+ res = (NSVGpath*)malloc(sizeof(NSVGpath));
+ if (res == NULL) goto error;
+ memset(res, 0, sizeof(NSVGpath));
+
+ res->pts = (float*)malloc(p->npts*2*sizeof(float));
+ if (res->pts == NULL) goto error;
+ memcpy(res->pts, p->pts, p->npts * sizeof(float) * 2);
+ res->npts = p->npts;
+
+ memcpy(res->bounds, p->bounds, sizeof(p->bounds));
+
+ res->closed = p->closed;
+
+ return res;
+
+error:
+ if (res != NULL) {
+ free(res->pts);
+ free(res);
+ }
+ return NULL;
+}
+
void nsvgDelete(NSVGimage* image)
{
NSVGshape *snext, *shape;
diff --git a/thirdparty/nanosvg/nanosvgrast.h b/thirdparty/nanosvg/nanosvgrast.h
index 2940c1f916..b740c316ca 100644
--- a/thirdparty/nanosvg/nanosvgrast.h
+++ b/thirdparty/nanosvg/nanosvgrast.h
@@ -25,15 +25,18 @@
#ifndef NANOSVGRAST_H
#define NANOSVGRAST_H
+#ifndef NANOSVGRAST_CPLUSPLUS
#ifdef __cplusplus
extern "C" {
#endif
+#endif
typedef struct NSVGrasterizer NSVGrasterizer;
/* Example Usage:
// Load SVG
- struct SNVGImage* image = nsvgParseFromFile("test.svg.");
+ NSVGimage* image;
+ image = nsvgParseFromFile("test.svg", "px", 96);
// Create rasterizer (can be used to render multiple images).
struct NSVGrasterizer* rast = nsvgCreateRasterizer();
@@ -63,9 +66,11 @@ void nsvgRasterize(NSVGrasterizer* r,
void nsvgDeleteRasterizer(NSVGrasterizer*);
+#ifndef NANOSVGRAST_CPLUSPLUS
#ifdef __cplusplus
}
#endif
+#endif
#endif // NANOSVGRAST_H
diff --git a/thirdparty/opus/http.c b/thirdparty/opus/http.c
deleted file mode 100644
index 99fa8c08e0..0000000000
--- a/thirdparty/opus/http.c
+++ /dev/null
@@ -1,3465 +0,0 @@
-/********************************************************************
- * *
- * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
- * *
- * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 *
- * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
- * *
- ********************************************************************/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "internal.h"
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <string.h>
-
-/*RFCs referenced in this file:
- RFC 761: DOD Standard Transmission Control Protocol
- RFC 1535: A Security Problem and Proposed Correction With Widely Deployed DNS
- Software
- RFC 1738: Uniform Resource Locators (URL)
- RFC 1945: Hypertext Transfer Protocol -- HTTP/1.0
- RFC 2068: Hypertext Transfer Protocol -- HTTP/1.1
- RFC 2145: Use and Interpretation of HTTP Version Numbers
- RFC 2246: The TLS Protocol Version 1.0
- RFC 2459: Internet X.509 Public Key Infrastructure Certificate and
- Certificate Revocation List (CRL) Profile
- RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1
- RFC 2617: HTTP Authentication: Basic and Digest Access Authentication
- RFC 2817: Upgrading to TLS Within HTTP/1.1
- RFC 2818: HTTP Over TLS
- RFC 3492: Punycode: A Bootstring encoding of Unicode for Internationalized
- Domain Names in Applications (IDNA)
- RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
- RFC 3987: Internationalized Resource Identifiers (IRIs)
- RFC 4343: Domain Name System (DNS) Case Insensitivity Clarification
- RFC 5894: Internationalized Domain Names for Applications (IDNA):
- Background, Explanation, and Rationale
- RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
- RFC 6125: Representation and Verification of Domain-Based Application Service
- Identity within Internet Public Key Infrastructure Using X.509 (PKIX)
- Certificates in the Context of Transport Layer Security (TLS)
- RFC 6555: Happy Eyeballs: Success with Dual-Stack Hosts*/
-
-typedef struct OpusParsedURL OpusParsedURL;
-typedef struct OpusStringBuf OpusStringBuf;
-typedef struct OpusHTTPConn OpusHTTPConn;
-typedef struct OpusHTTPStream OpusHTTPStream;
-
-static char *op_string_range_dup(const char *_start,const char *_end){
- size_t len;
- char *ret;
- OP_ASSERT(_start<=_end);
- len=_end-_start;
- /*This is to help avoid overflow elsewhere, later.*/
- if(OP_UNLIKELY(len>=INT_MAX))return NULL;
- ret=(char *)_ogg_malloc(sizeof(*ret)*(len+1));
- if(OP_LIKELY(ret!=NULL)){
- ret=(char *)memcpy(ret,_start,sizeof(*ret)*(len));
- ret[len]='\0';
- }
- return ret;
-}
-
-static char *op_string_dup(const char *_s){
- return op_string_range_dup(_s,_s+strlen(_s));
-}
-
-static char *op_string_tolower(char *_s){
- int i;
- for(i=0;_s[i]!='\0';i++){
- int c;
- c=_s[i];
- if(c>='A'&&c<='Z')c+='a'-'A';
- _s[i]=(char)c;
- }
- return _s;
-}
-
-/*URI character classes (from RFC 3986).*/
-#define OP_URL_ALPHA \
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
-#define OP_URL_DIGIT "0123456789"
-#define OP_URL_HEXDIGIT "0123456789ABCDEFabcdef"
-/*Not a character class, but the characters allowed in <scheme>.*/
-#define OP_URL_SCHEME OP_URL_ALPHA OP_URL_DIGIT "+-."
-#define OP_URL_GEN_DELIMS "#/:?@[]"
-#define OP_URL_SUB_DELIMS "!$&'()*+,;="
-#define OP_URL_RESERVED OP_URL_GEN_DELIMS OP_URL_SUB_DELIMS
-#define OP_URL_UNRESERVED OP_URL_ALPHA OP_URL_DIGIT "-._~"
-/*Not a character class, but the characters allowed in <pct-encoded>.*/
-#define OP_URL_PCT_ENCODED "%"
-/*Not a character class or production rule, but for convenience.*/
-#define OP_URL_PCHAR_BASE \
- OP_URL_UNRESERVED OP_URL_PCT_ENCODED OP_URL_SUB_DELIMS
-#define OP_URL_PCHAR OP_URL_PCHAR_BASE ":@"
-/*Not a character class, but the characters allowed in <userinfo> and
- <IP-literal>.*/
-#define OP_URL_PCHAR_NA OP_URL_PCHAR_BASE ":"
-/*Not a character class, but the characters allowed in <segment-nz-nc>.*/
-#define OP_URL_PCHAR_NC OP_URL_PCHAR_BASE "@"
-/*Not a character clsss, but the characters allowed in <path>.*/
-#define OP_URL_PATH OP_URL_PCHAR "/"
-/*Not a character class, but the characters allowed in <query> / <fragment>.*/
-#define OP_URL_QUERY_FRAG OP_URL_PCHAR "/?"
-
-/*Check the <% HEXDIG HEXDIG> escapes of a URL for validity.
- Return: 0 if valid, or a negative value on failure.*/
-static int op_validate_url_escapes(const char *_s){
- int i;
- for(i=0;_s[i];i++){
- if(_s[i]=='%'){
- if(OP_UNLIKELY(!isxdigit(_s[i+1]))
- ||OP_UNLIKELY(!isxdigit(_s[i+2]))
- /*RFC 3986 says %00 "should be rejected if the application is not
- expecting to receive raw data within a component."*/
- ||OP_UNLIKELY(_s[i+1]=='0'&&_s[i+2]=='0')){
- return OP_FALSE;
- }
- i+=2;
- }
- }
- return 0;
-}
-
-/*Convert a hex digit to its actual value.
- _c: The hex digit to convert.
- Presumed to be valid ('0'...'9', 'A'...'F', or 'a'...'f').
- Return: The value of the digit, in the range [0,15].*/
-static int op_hex_value(int _c){
- return _c>='a'?_c-'a'+10:_c>='A'?_c-'A'+10:_c-'0';
-}
-
-/*Unescape all the <% HEXDIG HEXDIG> sequences in a string in-place.
- This does no validity checking.*/
-static char *op_unescape_url_component(char *_s){
- int i;
- int j;
- for(i=j=0;_s[i];i++,j++){
- if(_s[i]=='%'){
- _s[i]=(char)(op_hex_value(_s[i+1])<<4|op_hex_value(_s[i+2]));
- i+=2;
- }
- }
- return _s;
-}
-
-/*Parse a file: URL.
- This code is not meant to be fast: strspn() with large sets is likely to be
- slow, but it is very convenient.
- It is meant to be RFC 1738-compliant (as updated by RFC 3986).*/
-static const char *op_parse_file_url(const char *_src){
- const char *scheme_end;
- const char *path;
- const char *path_end;
- scheme_end=_src+strspn(_src,OP_URL_SCHEME);
- if(OP_UNLIKELY(*scheme_end!=':')
- ||scheme_end-_src!=4||op_strncasecmp(_src,"file",4)!=0){
- /*Unsupported protocol.*/
- return NULL;
- }
- /*Make sure all escape sequences are valid to simplify unescaping later.*/
- if(OP_UNLIKELY(op_validate_url_escapes(scheme_end+1)<0))return NULL;
- if(scheme_end[1]=='/'&&scheme_end[2]=='/'){
- const char *host;
- /*file: URLs can have a host!
- Yeah, I was surprised, too, but that's what RFC 1738 says.
- It also says, "The file URL scheme is unusual in that it does not specify
- an Internet protocol or access method for such files; as such, its
- utility in network protocols between hosts is limited," which is a mild
- understatement.*/
- host=scheme_end+3;
- /*The empty host is what we expect.*/
- if(OP_LIKELY(*host=='/'))path=host;
- else{
- const char *host_end;
- char host_buf[28];
- /*RFC 1738 says localhost "is interpreted as `the machine from which the
- URL is being interpreted,'" so let's check for it.*/
- host_end=host+strspn(host,OP_URL_PCHAR_BASE);
- /*No <port> allowed.
- This also rejects IP-Literals.*/
- if(*host_end!='/')return NULL;
- /*An escaped "localhost" can take at most 27 characters.*/
- if(OP_UNLIKELY(host_end-host>27))return NULL;
- memcpy(host_buf,host,sizeof(*host_buf)*(host_end-host));
- host_buf[host_end-host]='\0';
- op_unescape_url_component(host_buf);
- op_string_tolower(host_buf);
- /*Some other host: give up.*/
- if(OP_UNLIKELY(strcmp(host_buf,"localhost")!=0))return NULL;
- path=host_end;
- }
- }
- else path=scheme_end+1;
- path_end=path+strspn(path,OP_URL_PATH);
- /*This will reject a <query> or <fragment> component, too.
- I don't know what to do with queries, but a temporal fragment would at
- least make sense.
- RFC 1738 pretty clearly defines a <searchpart> that's equivalent to the
- RFC 3986 <query> component for other schemes, but not the file: scheme,
- so I'm going to just reject it.*/
- if(*path_end!='\0')return NULL;
- return path;
-}
-
-#if defined(OP_ENABLE_HTTP)
-# if defined(_WIN32)
-# include <winsock2.h>
-# include <ws2tcpip.h>
-# include <openssl/ssl.h>
-# include "winerrno.h"
-
-typedef SOCKET op_sock;
-
-# define OP_INVALID_SOCKET (INVALID_SOCKET)
-
-/*Vista and later support WSAPoll(), but we don't want to rely on that.
- Instead we re-implement it badly using select().
- Unfortunately, they define a conflicting struct pollfd, so we only define our
- own if it looks like that one has not already been defined.*/
-# if !defined(POLLIN)
-/*Equivalent to POLLIN.*/
-# define POLLRDNORM (0x0100)
-/*Priority band data can be read.*/
-# define POLLRDBAND (0x0200)
-/*There is data to read.*/
-# define POLLIN (POLLRDNORM|POLLRDBAND)
-/*There is urgent data to read.*/
-# define POLLPRI (0x0400)
-/*Equivalent to POLLOUT.*/
-# define POLLWRNORM (0x0010)
-/*Writing now will not block.*/
-# define POLLOUT (POLLWRNORM)
-/*Priority data may be written.*/
-# define POLLWRBAND (0x0020)
-/*Error condition (output only).*/
-# define POLLERR (0x0001)
-/*Hang up (output only).*/
-# define POLLHUP (0x0002)
-/*Invalid request: fd not open (output only).*/
-# define POLLNVAL (0x0004)
-
-struct pollfd{
- /*File descriptor.*/
- op_sock fd;
- /*Requested events.*/
- short events;
- /*Returned events.*/
- short revents;
-};
-# endif
-
-/*But Winsock never defines nfds_t (it's simply hard-coded to ULONG).*/
-typedef unsigned long nfds_t;
-
-/*The usage of FD_SET() below is O(N^2).
- This is okay because select() is limited to 64 sockets in Winsock, anyway.
- In practice, we only ever call it with one or two sockets.*/
-static int op_poll_win32(struct pollfd *_fds,nfds_t _nfds,int _timeout){
- struct timeval tv;
- fd_set ifds;
- fd_set ofds;
- fd_set efds;
- nfds_t i;
- int ret;
- FD_ZERO(&ifds);
- FD_ZERO(&ofds);
- FD_ZERO(&efds);
- for(i=0;i<_nfds;i++){
- _fds[i].revents=0;
- if(_fds[i].events&POLLIN)FD_SET(_fds[i].fd,&ifds);
- if(_fds[i].events&POLLOUT)FD_SET(_fds[i].fd,&ofds);
- FD_SET(_fds[i].fd,&efds);
- }
- if(_timeout>=0){
- tv.tv_sec=_timeout/1000;
- tv.tv_usec=(_timeout%1000)*1000;
- }
- ret=select(-1,&ifds,&ofds,&efds,_timeout<0?NULL:&tv);
- if(ret>0){
- for(i=0;i<_nfds;i++){
- if(FD_ISSET(_fds[i].fd,&ifds))_fds[i].revents|=POLLIN;
- if(FD_ISSET(_fds[i].fd,&ofds))_fds[i].revents|=POLLOUT;
- /*This isn't correct: there are several different things that might have
- happened to a fd in efds, but I don't know a good way to distinguish
- them without more context from the caller.
- It's okay, because we don't actually check any of these bits, we just
- need _some_ bit set.*/
- if(FD_ISSET(_fds[i].fd,&efds))_fds[i].revents|=POLLHUP;
- }
- }
- return ret;
-}
-
-/*We define op_errno() to make it clear that it's not an l-value like normal
- errno is.*/
-# define op_errno() (WSAGetLastError()?WSAGetLastError()-WSABASEERR:0)
-# define op_reset_errno() (WSASetLastError(0))
-
-/*The remaining functions don't get an op_ prefix even though they only
- operate on sockets, because we don't use non-socket I/O here, and this
- minimizes the changes needed to deal with Winsock.*/
-# define close(_fd) closesocket(_fd)
-/*This relies on sizeof(u_long)==sizeof(int), which is always true on both
- Win32 and Win64.*/
-# define ioctl(_fd,_req,_arg) ioctlsocket(_fd,_req,(u_long *)(_arg))
-# define getsockopt(_fd,_level,_name,_val,_len) \
- getsockopt(_fd,_level,_name,(char *)(_val),_len)
-# define setsockopt(_fd,_level,_name,_val,_len) \
- setsockopt(_fd,_level,_name,(const char *)(_val),_len)
-# define poll(_fds,_nfds,_timeout) op_poll_win32(_fds,_nfds,_timeout)
-
-# if defined(_MSC_VER)
-typedef ptrdiff_t ssize_t;
-# endif
-
-/*Load certificates from the built-in certificate store.*/
-int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx);
-# define SSL_CTX_set_default_verify_paths \
- SSL_CTX_set_default_verify_paths_win32
-
-# else
-/*Normal Berkeley sockets.*/
-# include <sys/ioctl.h>
-# include <sys/types.h>
-# include <sys/socket.h>
-# include <arpa/inet.h>
-# include <netinet/in.h>
-# include <netinet/tcp.h>
-# include <fcntl.h>
-# include <netdb.h>
-# include <poll.h>
-# include <unistd.h>
-# include <openssl/ssl.h>
-
-typedef int op_sock;
-
-# define OP_INVALID_SOCKET (-1)
-
-# define op_errno() (errno)
-# define op_reset_errno() (errno=0)
-
-# endif
-# include <sys/timeb.h>
-# include <openssl/x509v3.h>
-
-/*The maximum number of simultaneous connections.
- RFC 2616 says this SHOULD NOT be more than 2, but everyone on the modern web
- ignores that (e.g., IE 8 bumped theirs up from 2 to 6, Firefox uses 15).
- If it makes you feel better, we'll only ever actively read from one of these
- at a time.
- The others are kept around mainly to avoid slow-starting a new connection
- when seeking, and time out rapidly.*/
-# define OP_NCONNS_MAX (4)
-
-/*The amount of time before we attempt to re-resolve the host.
- This is 10 minutes, as recommended in RFC 6555 for expiring cached connection
- results for dual-stack hosts.*/
-# define OP_RESOLVE_CACHE_TIMEOUT_MS (10*60*(opus_int32)1000)
-
-/*The number of redirections at which we give up.
- The value here is the current default in Firefox.
- RFC 2068 mandated a maximum of 5, but RFC 2616 relaxed that to "a client
- SHOULD detect infinite redirection loops."
- Fortunately, 20 is less than infinity.*/
-# define OP_REDIRECT_LIMIT (20)
-
-/*The initial size of the buffer used to read a response message (before the
- body).*/
-# define OP_RESPONSE_SIZE_MIN (510)
-/*The maximum size of a response message (before the body).
- Responses larger than this will be discarded.
- I've seen a real server return 20 kB of data for a 302 Found response.
- Increasing this beyond 32kB will cause problems on platforms with a 16-bit
- int.*/
-# define OP_RESPONSE_SIZE_MAX (32766)
-
-/*The number of milliseconds we will allow a connection to sit idle before we
- refuse to resurrect it.
- Apache as of 2.2 has reduced its default timeout to 5 seconds (from 15), so
- that's what we'll use here.*/
-# define OP_CONNECTION_IDLE_TIMEOUT_MS (5*1000)
-
-/*The number of milliseconds we will wait to send or receive data before giving
- up.*/
-# define OP_POLL_TIMEOUT_MS (30*1000)
-
-/*We will always attempt to read ahead at least this much in preference to
- opening a new connection.*/
-# define OP_READAHEAD_THRESH_MIN (32*(opus_int32)1024)
-
-/*The amount of data to request after a seek.
- This is a trade-off between read throughput after a seek vs. the the ability
- to quickly perform another seek with the same connection.*/
-# define OP_PIPELINE_CHUNK_SIZE (32*(opus_int32)1024)
-/*Subsequent chunks are requested with larger and larger sizes until they pass
- this threshold, after which we just ask for the rest of the resource.*/
-# define OP_PIPELINE_CHUNK_SIZE_MAX (1024*(opus_int32)1024)
-/*This is the maximum number of requests we'll make with a single connection.
- Many servers will simply disconnect after we attempt some number of requests,
- possibly without sending a Connection: close header, meaning we won't
- discover it until we try to read beyond the end of the current chunk.
- We can reconnect when that happens, but this is slow.
- Instead, we impose a limit ourselves (set to the default for Apache
- installations and thus likely the most common value in use).*/
-# define OP_PIPELINE_MAX_REQUESTS (100)
-/*This should be the number of requests, starting from a chunk size of
- OP_PIPELINE_CHUNK_SIZE and doubling each time, until we exceed
- OP_PIPELINE_CHUNK_SIZE_MAX and just request the rest of the file.
- We won't reuse a connection when seeking unless it has at least this many
- requests left, to reduce the chances we'll have to open a new connection
- while reading forward afterwards.*/
-# define OP_PIPELINE_MIN_REQUESTS (7)
-
-/*Is this an https URL?
- For now we can simply check the last letter of the scheme.*/
-# define OP_URL_IS_SSL(_url) ((_url)->scheme[4]=='s')
-
-/*Does this URL use the default port for its scheme?*/
-# define OP_URL_IS_DEFAULT_PORT(_url) \
- (!OP_URL_IS_SSL(_url)&&(_url)->port==80 \
- ||OP_URL_IS_SSL(_url)&&(_url)->port==443)
-
-struct OpusParsedURL{
- /*Either "http" or "https".*/
- char *scheme;
- /*The user name from the <userinfo> component, or NULL.*/
- char *user;
- /*The password from the <userinfo> component, or NULL.*/
- char *pass;
- /*The <host> component.
- This may not be NULL.*/
- char *host;
- /*The <path> and <query> components.
- This may not be NULL.*/
- char *path;
- /*The <port> component.
- This is set to the default port if the URL did not contain one.*/
- unsigned port;
-};
-
-/*Parse a URL.
- This code is not meant to be fast: strspn() with large sets is likely to be
- slow, but it is very convenient.
- It is meant to be RFC 3986-compliant.
- We currently do not support IRIs (Internationalized Resource Identifiers,
- RFC 3987).
- Callers should translate them to URIs first.*/
-static int op_parse_url_impl(OpusParsedURL *_dst,const char *_src){
- const char *scheme_end;
- const char *authority;
- const char *userinfo_end;
- const char *user;
- const char *user_end;
- const char *pass;
- const char *hostport;
- const char *hostport_end;
- const char *host_end;
- const char *port;
- opus_int32 port_num;
- const char *port_end;
- const char *path;
- const char *path_end;
- const char *uri_end;
- scheme_end=_src+strspn(_src,OP_URL_SCHEME);
- if(OP_UNLIKELY(*scheme_end!=':')
- ||OP_UNLIKELY(scheme_end-_src<4)||OP_UNLIKELY(scheme_end-_src>5)
- ||OP_UNLIKELY(op_strncasecmp(_src,"https",scheme_end-_src)!=0)){
- /*Unsupported protocol.*/
- return OP_EIMPL;
- }
- if(OP_UNLIKELY(scheme_end[1]!='/')||OP_UNLIKELY(scheme_end[2]!='/')){
- /*We require an <authority> component.*/
- return OP_EINVAL;
- }
- authority=scheme_end+3;
- /*Make sure all escape sequences are valid to simplify unescaping later.*/
- if(OP_UNLIKELY(op_validate_url_escapes(authority)<0))return OP_EINVAL;
- /*Look for a <userinfo> component.*/
- userinfo_end=authority+strspn(authority,OP_URL_PCHAR_NA);
- if(*userinfo_end=='@'){
- /*Found one.*/
- user=authority;
- /*Look for a password (yes, clear-text passwords are deprecated, I know,
- but what else are people supposed to use? use SSL if you care).*/
- user_end=authority+strspn(authority,OP_URL_PCHAR_BASE);
- if(*user_end==':')pass=user_end+1;
- else pass=NULL;
- hostport=userinfo_end+1;
- }
- else{
- /*We shouldn't have to initialize user_end, but gcc is too dumb to figure
- out that user!=NULL below means we didn't take this else branch.*/
- user=user_end=NULL;
- pass=NULL;
- hostport=authority;
- }
- /*Try to figure out where the <host> component ends.*/
- if(hostport[0]=='['){
- hostport++;
- /*We have an <IP-literal>, which can contain colons.*/
- hostport_end=host_end=hostport+strspn(hostport,OP_URL_PCHAR_NA);
- if(OP_UNLIKELY(*hostport_end++!=']'))return OP_EINVAL;
- }
- /*Currently we don't support IDNA (RFC 5894), because I don't want to deal
- with the policy about which domains should not be internationalized to
- avoid confusing similarities.
- Give this API Punycode (RFC 3492) domain names instead.*/
- else hostport_end=host_end=hostport+strspn(hostport,OP_URL_PCHAR_BASE);
- /*TODO: Validate host.*/
- /*Is there a port number?*/
- port_num=-1;
- if(*hostport_end==':'){
- int i;
- port=hostport_end+1;
- port_end=port+strspn(port,OP_URL_DIGIT);
- path=port_end;
- /*Not part of RFC 3986, but require port numbers in the range 0...65535.*/
- if(OP_LIKELY(port_end-port>0)){
- while(*port=='0')port++;
- if(OP_UNLIKELY(port_end-port>5))return OP_EINVAL;
- port_num=0;
- for(i=0;i<port_end-port;i++)port_num=port_num*10+port[i]-'0';
- if(OP_UNLIKELY(port_num>65535))return OP_EINVAL;
- }
- }
- else path=hostport_end;
- path_end=path+strspn(path,OP_URL_PATH);
- /*If the path is not empty, it must begin with a '/'.*/
- if(OP_LIKELY(path_end>path)&&OP_UNLIKELY(path[0]!='/'))return OP_EINVAL;
- /*Consume the <query> component, if any (right now we don't split this out
- from the <path> component).*/
- if(*path_end=='?')path_end=path_end+strspn(path_end,OP_URL_QUERY_FRAG);
- /*Discard the <fragment> component, if any.
- This doesn't get sent to the server.
- Some day we should add support for Media Fragment URIs
- <http://www.w3.org/TR/media-frags/>.*/
- if(*path_end=='#')uri_end=path_end+1+strspn(path_end+1,OP_URL_QUERY_FRAG);
- else uri_end=path_end;
- /*If there's anything left, this was not a valid URL.*/
- if(OP_UNLIKELY(*uri_end!='\0'))return OP_EINVAL;
- _dst->scheme=op_string_range_dup(_src,scheme_end);
- if(OP_UNLIKELY(_dst->scheme==NULL))return OP_EFAULT;
- op_string_tolower(_dst->scheme);
- if(user!=NULL){
- _dst->user=op_string_range_dup(user,user_end);
- if(OP_UNLIKELY(_dst->user==NULL))return OP_EFAULT;
- op_unescape_url_component(_dst->user);
- /*Unescaping might have created a ':' in the username.
- That's not allowed by RFC 2617's Basic Authentication Scheme.*/
- if(OP_UNLIKELY(strchr(_dst->user,':')!=NULL))return OP_EINVAL;
- }
- else _dst->user=NULL;
- if(pass!=NULL){
- _dst->pass=op_string_range_dup(pass,userinfo_end);
- if(OP_UNLIKELY(_dst->pass==NULL))return OP_EFAULT;
- op_unescape_url_component(_dst->pass);
- }
- else _dst->pass=NULL;
- _dst->host=op_string_range_dup(hostport,host_end);
- if(OP_UNLIKELY(_dst->host==NULL))return OP_EFAULT;
- if(port_num<0){
- if(_src[4]=='s')port_num=443;
- else port_num=80;
- }
- _dst->port=(unsigned)port_num;
- /*RFC 2616 says an empty <abs-path> component is equivalent to "/", and we
- MUST use the latter in the Request-URI.
- Reserve space for the slash here.*/
- if(path==path_end||path[0]=='?')path--;
- _dst->path=op_string_range_dup(path,path_end);
- if(OP_UNLIKELY(_dst->path==NULL))return OP_EFAULT;
- /*And force-set it here.*/
- _dst->path[0]='/';
- return 0;
-}
-
-static void op_parsed_url_init(OpusParsedURL *_url){
- memset(_url,0,sizeof(*_url));
-}
-
-static void op_parsed_url_clear(OpusParsedURL *_url){
- _ogg_free(_url->scheme);
- _ogg_free(_url->user);
- _ogg_free(_url->pass);
- _ogg_free(_url->host);
- _ogg_free(_url->path);
-}
-
-static int op_parse_url(OpusParsedURL *_dst,const char *_src){
- OpusParsedURL url;
- int ret;
- op_parsed_url_init(&url);
- ret=op_parse_url_impl(&url,_src);
- if(OP_UNLIKELY(ret<0))op_parsed_url_clear(&url);
- else *_dst=*&url;
- return ret;
-}
-
-/*A buffer to hold growing strings.
- The main purpose of this is to consolidate allocation checks and simplify
- cleanup on a failed allocation.*/
-struct OpusStringBuf{
- char *buf;
- int nbuf;
- int cbuf;
-};
-
-static void op_sb_init(OpusStringBuf *_sb){
- _sb->buf=NULL;
- _sb->nbuf=0;
- _sb->cbuf=0;
-}
-
-static void op_sb_clear(OpusStringBuf *_sb){
- _ogg_free(_sb->buf);
-}
-
-/*Make sure we have room for at least _capacity characters (plus 1 more for the
- terminating NUL).*/
-static int op_sb_ensure_capacity(OpusStringBuf *_sb,int _capacity){
- char *buf;
- int cbuf;
- buf=_sb->buf;
- cbuf=_sb->cbuf;
- if(_capacity>=cbuf-1){
- if(OP_UNLIKELY(cbuf>INT_MAX-1>>1))return OP_EFAULT;
- if(OP_UNLIKELY(_capacity>=INT_MAX-1))return OP_EFAULT;
- cbuf=OP_MAX(2*cbuf+1,_capacity+1);
- buf=_ogg_realloc(buf,sizeof(*buf)*cbuf);
- if(OP_UNLIKELY(buf==NULL))return OP_EFAULT;
- _sb->buf=buf;
- _sb->cbuf=cbuf;
- }
- return 0;
-}
-
-/*Increase the capacity of the buffer, but not to more than _max_size
- characters (plus 1 more for the terminating NUL).*/
-static int op_sb_grow(OpusStringBuf *_sb,int _max_size){
- char *buf;
- int cbuf;
- buf=_sb->buf;
- cbuf=_sb->cbuf;
- OP_ASSERT(_max_size<=INT_MAX-1);
- cbuf=cbuf<=_max_size-1>>1?2*cbuf+1:_max_size+1;
- buf=_ogg_realloc(buf,sizeof(*buf)*cbuf);
- if(OP_UNLIKELY(buf==NULL))return OP_EFAULT;
- _sb->buf=buf;
- _sb->cbuf=cbuf;
- return 0;
-}
-
-static int op_sb_append(OpusStringBuf *_sb,const char *_s,int _len){
- char *buf;
- int nbuf;
- int ret;
- nbuf=_sb->nbuf;
- if(OP_UNLIKELY(nbuf>INT_MAX-_len))return OP_EFAULT;
- ret=op_sb_ensure_capacity(_sb,nbuf+_len);
- if(OP_UNLIKELY(ret<0))return ret;
- buf=_sb->buf;
- memcpy(buf+nbuf,_s,sizeof(*buf)*_len);
- nbuf+=_len;
- buf[nbuf]='\0';
- _sb->nbuf=nbuf;
- return 0;
-}
-
-static int op_sb_append_string(OpusStringBuf *_sb,const char *_s){
- return op_sb_append(_sb,_s,strlen(_s));
-}
-
-static int op_sb_append_port(OpusStringBuf *_sb,unsigned _port){
- char port_buf[7];
- OP_ASSERT(_port<=65535U);
- sprintf(port_buf,":%u",_port);
- return op_sb_append_string(_sb,port_buf);
-}
-
-static int op_sb_append_nonnegative_int64(OpusStringBuf *_sb,opus_int64 _i){
- char digit;
- int nbuf_start;
- int ret;
- OP_ASSERT(_i>=0);
- nbuf_start=_sb->nbuf;
- ret=0;
- do{
- digit='0'+_i%10;
- ret|=op_sb_append(_sb,&digit,1);
- _i/=10;
- }
- while(_i>0);
- if(OP_LIKELY(ret>=0)){
- char *buf;
- int nbuf_end;
- buf=_sb->buf;
- nbuf_end=_sb->nbuf-1;
- /*We've added the digits backwards.
- Reverse them.*/
- while(nbuf_start<nbuf_end){
- digit=buf[nbuf_start];
- buf[nbuf_start]=buf[nbuf_end];
- buf[nbuf_end]=digit;
- nbuf_start++;
- nbuf_end--;
- }
- }
- return ret;
-}
-
-static struct addrinfo *op_resolve(const char *_host,unsigned _port){
- struct addrinfo *addrs;
- struct addrinfo hints;
- char service[6];
- memset(&hints,0,sizeof(hints));
- hints.ai_socktype=SOCK_STREAM;
-#if defined(AI_NUMERICSERV)
- hints.ai_flags=AI_NUMERICSERV;
-#endif
- OP_ASSERT(_port<=65535U);
- sprintf(service,"%u",_port);
- if(OP_LIKELY(!getaddrinfo(_host,service,&hints,&addrs)))return addrs;
- return NULL;
-}
-
-static int op_sock_set_nonblocking(op_sock _fd,int _nonblocking){
-#if !defined(_WIN32)
- int flags;
- flags=fcntl(_fd,F_GETFL);
- if(OP_UNLIKELY(flags<0))return flags;
- if(_nonblocking)flags|=O_NONBLOCK;
- else flags&=~O_NONBLOCK;
- return fcntl(_fd,F_SETFL,flags);
-#else
- return ioctl(_fd,FIONBIO,&_nonblocking);
-#endif
-}
-
-/*Disable/enable write coalescing if we can.
- We always send whole requests at once and always parse the response headers
- before sending another one, so normally write coalescing just causes added
- delay.*/
-static void op_sock_set_tcp_nodelay(op_sock _fd,int _nodelay){
-# if defined(TCP_NODELAY)&&(defined(IPPROTO_TCP)||defined(SOL_TCP))
-# if defined(IPPROTO_TCP)
-# define OP_SO_LEVEL IPPROTO_TCP
-# else
-# define OP_SO_LEVEL SOL_TCP
-# endif
- /*It doesn't really matter if this call fails, but it would be interesting
- to hit a case where it does.*/
- OP_ALWAYS_TRUE(!setsockopt(_fd,OP_SO_LEVEL,TCP_NODELAY,
- &_nodelay,sizeof(_nodelay)));
-# endif
-}
-
-#if defined(_WIN32)
-static void op_init_winsock(){
- static LONG count;
- static WSADATA wsadata;
- if(InterlockedIncrement(&count)==1)WSAStartup(0x0202,&wsadata);
-}
-#endif
-
-/*A single physical connection to an HTTP server.
- We may have several of these open at once.*/
-struct OpusHTTPConn{
- /*The current position indicator for this connection.*/
- opus_int64 pos;
- /*The position where the current request will end, or -1 if we're reading
- until EOF (an unseekable stream or the initial HTTP/1.0 request).*/
- opus_int64 end_pos;
- /*The position where next request we've sent will start, or -1 if we haven't
- sent the next request yet.*/
- opus_int64 next_pos;
- /*The end of the next request or -1 if we requested the rest of the resource.
- This is only set to a meaningful value if next_pos is not -1.*/
- opus_int64 next_end;
- /*The SSL connection, if this is https.*/
- SSL *ssl_conn;
- /*The next connection in either the LRU or free list.*/
- OpusHTTPConn *next;
- /*The last time we blocked for reading from this connection.*/
- struct timeb read_time;
- /*The number of bytes we've read since the last time we blocked.*/
- opus_int64 read_bytes;
- /*The estimated throughput of this connection, in bytes/s.*/
- opus_int64 read_rate;
- /*The socket we're reading from.*/
- op_sock fd;
- /*The number of remaining requests we are allowed on this connection.*/
- int nrequests_left;
- /*The chunk size to use for pipelining requests.*/
- opus_int32 chunk_size;
-};
-
-static void op_http_conn_init(OpusHTTPConn *_conn){
- _conn->next_pos=-1;
- _conn->ssl_conn=NULL;
- _conn->next=NULL;
- _conn->fd=OP_INVALID_SOCKET;
-}
-
-static void op_http_conn_clear(OpusHTTPConn *_conn){
- if(_conn->ssl_conn!=NULL)SSL_free(_conn->ssl_conn);
- /*SSL frees the BIO for us.*/
- if(_conn->fd!=OP_INVALID_SOCKET)close(_conn->fd);
-}
-
-/*The global stream state.*/
-struct OpusHTTPStream{
- /*The list of connections.*/
- OpusHTTPConn conns[OP_NCONNS_MAX];
- /*The context object used as a framework for TLS/SSL functions.*/
- SSL_CTX *ssl_ctx;
- /*The cached session to reuse for future connections.*/
- SSL_SESSION *ssl_session;
- /*The LRU list (ordered from MRU to LRU) of currently connected
- connections.*/
- OpusHTTPConn *lru_head;
- /*The free list.*/
- OpusHTTPConn *free_head;
- /*The URL to connect to.*/
- OpusParsedURL url;
- /*Information about the address we connected to.*/
- struct addrinfo addr_info;
- /*The address we connected to.*/
- union{
- struct sockaddr s;
- struct sockaddr_in v4;
- struct sockaddr_in6 v6;
- } addr;
- /*The last time we re-resolved the host.*/
- struct timeb resolve_time;
- /*A buffer used to build HTTP requests.*/
- OpusStringBuf request;
- /*A buffer used to build proxy CONNECT requests.*/
- OpusStringBuf proxy_connect;
- /*A buffer used to receive the response headers.*/
- OpusStringBuf response;
- /*The Content-Length, if specified, or -1 otherwise.
- This will always be specified for seekable streams.*/
- opus_int64 content_length;
- /*The position indicator used when no connection is active.*/
- opus_int64 pos;
- /*The host we actually connected to.*/
- char *connect_host;
- /*The port we actually connected to.*/
- unsigned connect_port;
- /*The connection we're currently reading from.
- This can be -1 if no connection is active.*/
- int cur_conni;
- /*Whether or not the server supports range requests.*/
- int seekable;
- /*Whether or not the server supports HTTP/1.1 with persistent connections.*/
- int pipeline;
- /*Whether or not we should skip certificate checks.*/
- int skip_certificate_check;
- /*The offset of the tail of the request.
- Only the offset in the Range: header appears after this, allowing us to
- quickly edit the request to ask for a new range.*/
- int request_tail;
- /*The estimated time required to open a new connection, in milliseconds.*/
- opus_int32 connect_rate;
-};
-
-static void op_http_stream_init(OpusHTTPStream *_stream){
- OpusHTTPConn **pnext;
- int ci;
- pnext=&_stream->free_head;
- for(ci=0;ci<OP_NCONNS_MAX;ci++){
- op_http_conn_init(_stream->conns+ci);
- *pnext=_stream->conns+ci;
- pnext=&_stream->conns[ci].next;
- }
- _stream->ssl_ctx=NULL;
- _stream->ssl_session=NULL;
- _stream->lru_head=NULL;
- op_parsed_url_init(&_stream->url);
- op_sb_init(&_stream->request);
- op_sb_init(&_stream->proxy_connect);
- op_sb_init(&_stream->response);
- _stream->connect_host=NULL;
- _stream->seekable=0;
-}
-
-/*Close the connection and move it to the free list.
- _stream: The stream containing the free list.
- _conn: The connection to close.
- _pnext: The linked-list pointer currently pointing to this connection.
- _gracefully: Whether or not to shut down cleanly.*/
-static void op_http_conn_close(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
- OpusHTTPConn **_pnext,int _gracefully){
- /*If we don't shut down gracefully, the server MUST NOT re-use our session
- according to RFC 2246, because it can't tell the difference between an
- abrupt close and a truncation attack.
- So we shut down gracefully if we can.
- However, we will not wait if this would block (it's not worth the savings
- from session resumption to do so).
- Clients (that's us) MAY resume a TLS session that ended with an incomplete
- close, according to RFC 2818, so there's no reason to make sure the server
- shut things down gracefully.*/
- if(_gracefully&&_conn->ssl_conn!=NULL)SSL_shutdown(_conn->ssl_conn);
- op_http_conn_clear(_conn);
- _conn->next_pos=-1;
- _conn->ssl_conn=NULL;
- _conn->fd=OP_INVALID_SOCKET;
- OP_ASSERT(*_pnext==_conn);
- *_pnext=_conn->next;
- _conn->next=_stream->free_head;
- _stream->free_head=_conn;
-}
-
-static void op_http_stream_clear(OpusHTTPStream *_stream){
- while(_stream->lru_head!=NULL){
- op_http_conn_close(_stream,_stream->lru_head,&_stream->lru_head,0);
- }
- if(_stream->ssl_session!=NULL)SSL_SESSION_free(_stream->ssl_session);
- if(_stream->ssl_ctx!=NULL)SSL_CTX_free(_stream->ssl_ctx);
- op_sb_clear(&_stream->response);
- op_sb_clear(&_stream->proxy_connect);
- op_sb_clear(&_stream->request);
- if(_stream->connect_host!=_stream->url.host)_ogg_free(_stream->connect_host);
- op_parsed_url_clear(&_stream->url);
-}
-
-static int op_http_conn_write_fully(OpusHTTPConn *_conn,
- const char *_buf,int _buf_size){
- struct pollfd fd;
- SSL *ssl_conn;
- fd.fd=_conn->fd;
- ssl_conn=_conn->ssl_conn;
- while(_buf_size>0){
- int err;
- if(ssl_conn!=NULL){
- int ret;
- ret=SSL_write(ssl_conn,_buf,_buf_size);
- if(ret>0){
- /*Wrote some data.*/
- _buf+=ret;
- _buf_size-=ret;
- continue;
- }
- /*Connection closed.*/
- else if(ret==0)return OP_FALSE;
- err=SSL_get_error(ssl_conn,ret);
- /*Yes, renegotiations can cause SSL_write() to block for reading.*/
- if(err==SSL_ERROR_WANT_READ)fd.events=POLLIN;
- else if(err==SSL_ERROR_WANT_WRITE)fd.events=POLLOUT;
- else return OP_FALSE;
- }
- else{
- ssize_t ret;
- op_reset_errno();
- ret=send(fd.fd,_buf,_buf_size,0);
- if(ret>0){
- _buf+=ret;
- _buf_size-=ret;
- continue;
- }
- err=op_errno();
- if(err!=EAGAIN&&err!=EWOULDBLOCK)return OP_FALSE;
- fd.events=POLLOUT;
- }
- if(poll(&fd,1,OP_POLL_TIMEOUT_MS)<=0)return OP_FALSE;
- }
- return 0;
-}
-
-static int op_http_conn_estimate_available(OpusHTTPConn *_conn){
- int available;
- int ret;
- ret=ioctl(_conn->fd,FIONREAD,&available);
- if(ret<0)available=0;
- /*This requires the SSL read_ahead flag to be unset to work.
- We ignore partial records as well as the protocol overhead for any pending
- bytes.
- This means we might return somewhat less than can truly be read without
- blocking (if there's a partial record).
- This is okay, because we're using this value to estimate network transfer
- time, and we _have_ already received those bytes.
- We also might return slightly more (due to protocol overhead), but that's
- small enough that it probably doesn't matter.*/
- if(_conn->ssl_conn!=NULL)available+=SSL_pending(_conn->ssl_conn);
- return available;
-}
-
-static opus_int32 op_time_diff_ms(const struct timeb *_end,
- const struct timeb *_start){
- opus_int64 dtime;
- dtime=_end->time-(opus_int64)_start->time;
- OP_ASSERT(_end->millitm<1000);
- OP_ASSERT(_start->millitm<1000);
- if(OP_UNLIKELY(dtime>(OP_INT32_MAX-1000)/1000))return OP_INT32_MAX;
- if(OP_UNLIKELY(dtime<(OP_INT32_MIN+1000)/1000))return OP_INT32_MIN;
- return (opus_int32)dtime*1000+_end->millitm-_start->millitm;
-}
-
-/*Update the read rate estimate for this connection.*/
-static void op_http_conn_read_rate_update(OpusHTTPConn *_conn){
- struct timeb read_time;
- opus_int32 read_delta_ms;
- opus_int64 read_delta_bytes;
- opus_int64 read_rate;
- read_delta_bytes=_conn->read_bytes;
- if(read_delta_bytes<=0)return;
- ftime(&read_time);
- read_delta_ms=op_time_diff_ms(&read_time,&_conn->read_time);
- read_rate=_conn->read_rate;
- read_delta_ms=OP_MAX(read_delta_ms,1);
- read_rate+=read_delta_bytes*1000/read_delta_ms-read_rate+4>>3;
- *&_conn->read_time=*&read_time;
- _conn->read_bytes=0;
- _conn->read_rate=read_rate;
-}
-
-/*Tries to read from the given connection.
- [out] _buf: Returns the data read.
- _buf_size: The size of the buffer.
- _blocking: Whether or not to block until some data is retrieved.
- Return: A positive number of bytes read on success.
- 0: The read would block, or the connection was closed.
- OP_EREAD: There was a fatal read error.*/
-static int op_http_conn_read(OpusHTTPConn *_conn,
- char *_buf,int _buf_size,int _blocking){
- struct pollfd fd;
- SSL *ssl_conn;
- int nread;
- int nread_unblocked;
- fd.fd=_conn->fd;
- ssl_conn=_conn->ssl_conn;
- nread=nread_unblocked=0;
- /*RFC 2818 says "client implementations MUST treat any premature closes as
- errors and the data received as potentially truncated," so we make very
- sure to report read errors upwards.*/
- do{
- int err;
- if(ssl_conn!=NULL){
- int ret;
- ret=SSL_read(ssl_conn,_buf+nread,_buf_size-nread);
- OP_ASSERT(ret<=_buf_size-nread);
- if(ret>0){
- /*Read some data.
- Keep going to see if there's more.*/
- nread+=ret;
- nread_unblocked+=ret;
- continue;
- }
- /*If we already read some data, return it right now.*/
- if(nread>0)break;
- err=SSL_get_error(ssl_conn,ret);
- if(ret==0){
- /*Connection close.
- Check for a clean shutdown to prevent truncation attacks.
- This check always succeeds for SSLv2, as it has no "close notify"
- message and thus can't verify an orderly shutdown.*/
- return err==SSL_ERROR_ZERO_RETURN?0:OP_EREAD;
- }
- if(err==SSL_ERROR_WANT_READ)fd.events=POLLIN;
- /*Yes, renegotiations can cause SSL_read() to block for writing.*/
- else if(err==SSL_ERROR_WANT_WRITE)fd.events=POLLOUT;
- /*Some other error.*/
- else return OP_EREAD;
- }
- else{
- ssize_t ret;
- op_reset_errno();
- ret=recv(fd.fd,_buf+nread,_buf_size-nread,0);
- OP_ASSERT(ret<=_buf_size-nread);
- if(ret>0){
- /*Read some data.
- Keep going to see if there's more.*/
- nread+=ret;
- nread_unblocked+=ret;
- continue;
- }
- /*If we already read some data or the connection was closed, return
- right now.*/
- if(ret==0||nread>0)break;
- err=op_errno();
- if(err!=EAGAIN&&err!=EWOULDBLOCK)return OP_EREAD;
- fd.events=POLLIN;
- }
- _conn->read_bytes+=nread_unblocked;
- op_http_conn_read_rate_update(_conn);
- nread_unblocked=0;
- if(!_blocking)break;
- /*Need to wait to get any data at all.*/
- if(poll(&fd,1,OP_POLL_TIMEOUT_MS)<=0)return OP_EREAD;
- }
- while(nread<_buf_size);
- _conn->read_bytes+=nread_unblocked;
- return nread;
-}
-
-/*Tries to look at the pending data for a connection without consuming it.
- [out] _buf: Returns the data at which we're peeking.
- _buf_size: The size of the buffer.*/
-static int op_http_conn_peek(OpusHTTPConn *_conn,char *_buf,int _buf_size){
- struct pollfd fd;
- SSL *ssl_conn;
- int ret;
- fd.fd=_conn->fd;
- ssl_conn=_conn->ssl_conn;
- for(;;){
- int err;
- if(ssl_conn!=NULL){
- ret=SSL_peek(ssl_conn,_buf,_buf_size);
- /*Either saw some data or the connection was closed.*/
- if(ret>=0)return ret;
- err=SSL_get_error(ssl_conn,ret);
- if(err==SSL_ERROR_WANT_READ)fd.events=POLLIN;
- /*Yes, renegotiations can cause SSL_peek() to block for writing.*/
- else if(err==SSL_ERROR_WANT_WRITE)fd.events=POLLOUT;
- else return 0;
- }
- else{
- op_reset_errno();
- ret=(int)recv(fd.fd,_buf,_buf_size,MSG_PEEK);
- /*Either saw some data or the connection was closed.*/
- if(ret>=0)return ret;
- err=op_errno();
- if(err!=EAGAIN&&err!=EWOULDBLOCK)return 0;
- fd.events=POLLIN;
- }
- /*Need to wait to get any data at all.*/
- if(poll(&fd,1,OP_POLL_TIMEOUT_MS)<=0)return 0;
- }
-}
-
-/*When parsing response headers, RFC 2616 mandates that all lines end in CR LF.
- However, even in the year 2012, I have seen broken servers use just a LF.
- This is the evil that Postel's advice from RFC 761 breeds.*/
-
-/*Reads the entirety of a response to an HTTP request into the response buffer.
- Actual parsing and validation is done later.
- Return: The number of bytes in the response on success, OP_EREAD if the
- connection was closed before reading any data, or another negative
- value on any other error.*/
-static int op_http_conn_read_response(OpusHTTPConn *_conn,
- OpusStringBuf *_response){
- int ret;
- _response->nbuf=0;
- ret=op_sb_ensure_capacity(_response,OP_RESPONSE_SIZE_MIN);
- if(OP_UNLIKELY(ret<0))return ret;
- for(;;){
- char *buf;
- int size;
- int capacity;
- int read_limit;
- int terminated;
- size=_response->nbuf;
- capacity=_response->cbuf-1;
- if(OP_UNLIKELY(size>=capacity)){
- ret=op_sb_grow(_response,OP_RESPONSE_SIZE_MAX);
- if(OP_UNLIKELY(ret<0))return ret;
- capacity=_response->cbuf-1;
- /*The response was too large.
- This prevents a bad server from running us out of memory.*/
- if(OP_UNLIKELY(size>=capacity))return OP_EIMPL;
- }
- buf=_response->buf;
- ret=op_http_conn_peek(_conn,buf+size,capacity-size);
- if(OP_UNLIKELY(ret<=0))return size<=0?OP_EREAD:OP_FALSE;
- /*We read some data.*/
- /*Make sure the starting characters are "HTTP".
- Otherwise we could wind up waiting forever for a response from
- something that is not an HTTP server.*/
- if(size<4&&op_strncasecmp(buf,"HTTP",OP_MIN(size+ret,4))!=0){
- return OP_FALSE;
- }
- /*How far can we read without passing the "\r\n\r\n" terminator?*/
- buf[size+ret]='\0';
- terminated=0;
- for(read_limit=OP_MAX(size-3,0);read_limit<size+ret;read_limit++){
- /*We don't look for the leading '\r' thanks to broken servers.*/
- if(buf[read_limit]=='\n'){
- if(buf[read_limit+1]=='\r'&&OP_LIKELY(buf[read_limit+2]=='\n')){
- terminated=3;
- break;
- }
- /*This case is for broken servers.*/
- else if(OP_UNLIKELY(buf[read_limit+1]=='\n')){
- terminated=2;
- break;
- }
- }
- }
- read_limit+=terminated;
- OP_ASSERT(size<=read_limit);
- OP_ASSERT(read_limit<=size+ret);
- /*Actually consume that data.*/
- ret=op_http_conn_read(_conn,buf+size,read_limit-size,1);
- if(OP_UNLIKELY(ret<=0))return OP_FALSE;
- size+=ret;
- buf[size]='\0';
- _response->nbuf=size;
- /*We found the terminator and read all the data up to and including it.*/
- if(terminated&&OP_LIKELY(size>=read_limit))return size;
- }
- return OP_EIMPL;
-}
-
-# define OP_HTTP_DIGIT "0123456789"
-
-/*The Reason-Phrase is not allowed to contain control characters, except
- horizontal tab (HT: \011).*/
-# define OP_HTTP_CREASON_PHRASE \
- "\001\002\003\004\005\006\007\010\012\013\014\015\016\017\020\021" \
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\177"
-
-# define OP_HTTP_CTLS \
- "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020" \
- "\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\177"
-
-/*This also includes '\t', but we get that from OP_HTTP_CTLS.*/
-# define OP_HTTP_SEPARATORS " \"(),/:;<=>?@[\\]{}"
-
-/*TEXT can also include LWS, but that has structure, so we parse it
- separately.*/
-# define OP_HTTP_CTOKEN OP_HTTP_CTLS OP_HTTP_SEPARATORS
-
-/*Return: The amount of linear white space (LWS) at the start of _s.*/
-static int op_http_lwsspn(const char *_s){
- int i;
- for(i=0;;){
- if(_s[0]=='\r'&&_s[1]=='\n'&&(_s[2]=='\t'||_s[2]==' '))i+=3;
- /*This case is for broken servers.*/
- else if(_s[0]=='\n'&&(_s[1]=='\t'||_s[1]==' '))i+=2;
- else if(_s[i]=='\t'||_s[i]==' ')i++;
- else return i;
- }
-}
-
-static char *op_http_parse_status_line(int *_v1_1_compat,
- char **_status_code,char *_response){
- char *next;
- char *status_code;
- int v1_1_compat;
- size_t d;
- /*RFC 2616 Section 6.1 does not say that the tokens in the Status-Line cannot
- be separated by optional LWS, but since it specifically calls out where
- spaces are to be placed and that CR and LF are not allowed except at the
- end, I am assuming this to be true.*/
- /*We already validated that this starts with "HTTP"*/
- OP_ASSERT(op_strncasecmp(_response,"HTTP",4)==0);
- next=_response+4;
- if(OP_UNLIKELY(*next++!='/'))return NULL;
- d=strspn(next,OP_HTTP_DIGIT);
- /*"Leading zeros MUST be ignored by recipients."*/
- while(*next=='0'){
- next++;
- OP_ASSERT(d>0);
- d--;
- }
- /*We only support version 1.x*/
- if(OP_UNLIKELY(d!=1)||OP_UNLIKELY(*next++!='1'))return NULL;
- if(OP_UNLIKELY(*next++!='.'))return NULL;
- d=strspn(next,OP_HTTP_DIGIT);
- if(OP_UNLIKELY(d<=0))return NULL;
- /*"Leading zeros MUST be ignored by recipients."*/
- while(*next=='0'){
- next++;
- OP_ASSERT(d>0);
- d--;
- }
- /*We don't need to parse the version number.
- Any non-zero digit means it's greater than 1.*/
- v1_1_compat=d>0;
- next+=d;
- if(OP_UNLIKELY(*next++!=' '))return NULL;
- status_code=next;
- d=strspn(next,OP_HTTP_DIGIT);
- if(OP_UNLIKELY(d!=3))return NULL;
- next+=d;
- /*The Reason-Phrase can be empty, but the space must be here.*/
- if(OP_UNLIKELY(*next++!=' '))return NULL;
- next+=strcspn(next,OP_HTTP_CREASON_PHRASE);
- /*We are not mandating this be present thanks to broken servers.*/
- if(OP_LIKELY(*next=='\r'))next++;
- if(OP_UNLIKELY(*next++!='\n'))return NULL;
- if(_v1_1_compat!=NULL)*_v1_1_compat=v1_1_compat;
- *_status_code=status_code;
- return next;
-}
-
-/*Get the next response header.
- [out] _header: The header token, NUL-terminated, with leading and trailing
- whitespace stripped, and converted to lower case (to simplify
- case-insensitive comparisons), or NULL if there are no more
- response headers.
- [out] _cdr: The remaining contents of the header, excluding the initial
- colon (':') and the terminating CRLF ("\r\n"),
- NUL-terminated, and with leading and trailing whitespace
- stripped, or NULL if there are no more response headers.
- [inout] _s: On input, this points to the start of the current line of the
- response headers.
- On output, it points to the start of the first line following
- this header, or NULL if there are no more response headers.
- Return: 0 on success, or a negative value on failure.*/
-static int op_http_get_next_header(char **_header,char **_cdr,char **_s){
- char *header;
- char *header_end;
- char *cdr;
- char *cdr_end;
- char *next;
- size_t d;
- next=*_s;
- /*The second case is for broken servers.*/
- if(next[0]=='\r'&&next[1]=='\n'||OP_UNLIKELY(next[0]=='\n')){
- /*No more headers.*/
- *_header=NULL;
- *_cdr=NULL;
- *_s=NULL;
- return 0;
- }
- header=next+op_http_lwsspn(next);
- d=strcspn(header,OP_HTTP_CTOKEN);
- if(OP_UNLIKELY(d<=0))return OP_FALSE;
- header_end=header+d;
- next=header_end+op_http_lwsspn(header_end);
- if(OP_UNLIKELY(*next++!=':'))return OP_FALSE;
- next+=op_http_lwsspn(next);
- cdr=next;
- do{
- cdr_end=next+strcspn(next,OP_HTTP_CTLS);
- next=cdr_end+op_http_lwsspn(cdr_end);
- }
- while(next>cdr_end);
- /*We are not mandating this be present thanks to broken servers.*/
- if(OP_LIKELY(*next=='\r'))next++;
- if(OP_UNLIKELY(*next++!='\n'))return OP_FALSE;
- *header_end='\0';
- *cdr_end='\0';
- /*Field names are case-insensitive.*/
- op_string_tolower(header);
- *_header=header;
- *_cdr=cdr;
- *_s=next;
- return 0;
-}
-
-static opus_int64 op_http_parse_nonnegative_int64(const char **_next,
- const char *_cdr){
- const char *next;
- opus_int64 ret;
- int i;
- next=_cdr+strspn(_cdr,OP_HTTP_DIGIT);
- *_next=next;
- if(OP_UNLIKELY(next<=_cdr))return OP_FALSE;
- while(*_cdr=='0')_cdr++;
- if(OP_UNLIKELY(next-_cdr>19))return OP_EIMPL;
- ret=0;
- for(i=0;i<next-_cdr;i++){
- int digit;
- digit=_cdr[i]-'0';
- /*Check for overflow.*/
- if(OP_UNLIKELY(ret>(OP_INT64_MAX-9)/10+(digit<=7)))return OP_EIMPL;
- ret=ret*10+digit;
- }
- return ret;
-}
-
-static opus_int64 op_http_parse_content_length(const char *_cdr){
- const char *next;
- opus_int64 content_length;
- content_length=op_http_parse_nonnegative_int64(&next,_cdr);
- if(OP_UNLIKELY(*next!='\0'))return OP_FALSE;
- return content_length;
-}
-
-static int op_http_parse_content_range(opus_int64 *_first,opus_int64 *_last,
- opus_int64 *_length,const char *_cdr){
- opus_int64 first;
- opus_int64 last;
- opus_int64 length;
- size_t d;
- if(OP_UNLIKELY(op_strncasecmp(_cdr,"bytes",5)!=0))return OP_FALSE;
- _cdr+=5;
- d=op_http_lwsspn(_cdr);
- if(OP_UNLIKELY(d<=0))return OP_FALSE;
- _cdr+=d;
- if(*_cdr!='*'){
- first=op_http_parse_nonnegative_int64(&_cdr,_cdr);
- if(OP_UNLIKELY(first<0))return (int)first;
- _cdr+=op_http_lwsspn(_cdr);
- if(*_cdr++!='-')return OP_FALSE;
- _cdr+=op_http_lwsspn(_cdr);
- last=op_http_parse_nonnegative_int64(&_cdr,_cdr);
- if(OP_UNLIKELY(last<0))return (int)last;
- _cdr+=op_http_lwsspn(_cdr);
- }
- else{
- /*This is for a 416 response (Requested range not satisfiable).*/
- first=last=-1;
- _cdr++;
- }
- if(OP_UNLIKELY(*_cdr++!='/'))return OP_FALSE;
- if(*_cdr!='*'){
- length=op_http_parse_nonnegative_int64(&_cdr,_cdr);
- if(OP_UNLIKELY(length<0))return (int)length;
- }
- else{
- /*The total length is unspecified.*/
- _cdr++;
- length=-1;
- }
- if(OP_UNLIKELY(*_cdr!='\0'))return OP_FALSE;
- if(OP_UNLIKELY(last<first))return OP_FALSE;
- if(length>=0&&OP_UNLIKELY(last>=length))return OP_FALSE;
- *_first=first;
- *_last=last;
- *_length=length;
- return 0;
-}
-
-/*Parse the Connection response header and look for a "close" token.
- Return: 1 if a "close" token is found, 0 if it's not found, and a negative
- value on error.*/
-static int op_http_parse_connection(char *_cdr){
- size_t d;
- int ret;
- ret=0;
- for(;;){
- d=strcspn(_cdr,OP_HTTP_CTOKEN);
- if(OP_UNLIKELY(d<=0))return OP_FALSE;
- if(op_strncasecmp(_cdr,"close",(int)d)==0)ret=1;
- /*We're supposed to strip and ignore any headers mentioned in the
- Connection header if this response is from an HTTP/1.0 server (to
- work around forwarding of hop-by-hop headers by old proxies), but the
- only hop-by-hop header we look at is Connection itself.
- Everything else is a well-defined end-to-end header, and going back and
- undoing the things we did based on already-examined headers would be
- hard (since we only scan them once, in a destructive manner).
- Therefore we just ignore all the other tokens.*/
- _cdr+=d;
- d=op_http_lwsspn(_cdr);
- if(d<=0)break;
- _cdr+=d;
- }
- return OP_UNLIKELY(*_cdr!='\0')?OP_FALSE:ret;
-}
-
-typedef int (*op_ssl_step_func)(SSL *_ssl_conn);
-
-/*Try to run an SSL function to completion (blocking if necessary).*/
-static int op_do_ssl_step(SSL *_ssl_conn,op_sock _fd,op_ssl_step_func _step){
- struct pollfd fd;
- fd.fd=_fd;
- for(;;){
- int ret;
- int err;
- ret=(*_step)(_ssl_conn);
- if(ret>=0)return ret;
- err=SSL_get_error(_ssl_conn,ret);
- if(err==SSL_ERROR_WANT_READ)fd.events=POLLIN;
- else if(err==SSL_ERROR_WANT_WRITE)fd.events=POLLOUT;
- else return OP_FALSE;
- if(poll(&fd,1,OP_POLL_TIMEOUT_MS)<=0)return OP_FALSE;
- }
-}
-
-/*Implement a BIO type that just indicates every operation should be retried.
- We use this when initializing an SSL connection via a proxy to allow the
- initial handshake to proceed all the way up to the first read attempt, and
- then return.
- This allows the TLS client hello message to be pipelined with the HTTP
- CONNECT request.*/
-
-static int op_bio_retry_write(BIO *_b,const char *_buf,int _num){
- (void)_buf;
- (void)_num;
- BIO_clear_retry_flags(_b);
- BIO_set_retry_write(_b);
- return -1;
-}
-
-static int op_bio_retry_read(BIO *_b,char *_buf,int _num){
- (void)_buf;
- (void)_num;
- BIO_clear_retry_flags(_b);
- BIO_set_retry_read(_b);
- return -1;
-}
-
-static int op_bio_retry_puts(BIO *_b,const char *_str){
- return op_bio_retry_write(_b,_str,0);
-}
-
-static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _num,void *_ptr){
- long ret;
- (void)_b;
- (void)_num;
- (void)_ptr;
- ret=0;
- switch(_cmd){
- case BIO_CTRL_RESET:
- case BIO_C_RESET_READ_REQUEST:{
- BIO_clear_retry_flags(_b);
- /*Fall through.*/
- }
- case BIO_CTRL_EOF:
- case BIO_CTRL_SET:
- case BIO_CTRL_SET_CLOSE:
- case BIO_CTRL_FLUSH:
- case BIO_CTRL_DUP:{
- ret=1;
- }break;
- }
- return ret;
-}
-
-# if OPENSSL_VERSION_NUMBER<0x10100000L
-# define BIO_set_data(_b,_ptr) ((_b)->ptr=(_ptr))
-# define BIO_set_init(_b,_init) ((_b)->init=(_init))
-# endif
-
-static int op_bio_retry_new(BIO *_b){
- BIO_set_init(_b,1);
-# if OPENSSL_VERSION_NUMBER<0x10100000L
- _b->num=0;
-# endif
- BIO_set_data(_b,NULL);
- return 1;
-}
-
-static int op_bio_retry_free(BIO *_b){
- return _b!=NULL;
-}
-
-# if OPENSSL_VERSION_NUMBER<0x10100000L
-/*This is not const because OpenSSL doesn't allow it, even though it won't
- write to it.*/
-static BIO_METHOD op_bio_retry_method={
- BIO_TYPE_NULL,
- "retry",
- op_bio_retry_write,
- op_bio_retry_read,
- op_bio_retry_puts,
- NULL,
- op_bio_retry_ctrl,
- op_bio_retry_new,
- op_bio_retry_free,
- NULL
-};
-# endif
-
-/*Establish a CONNECT tunnel and pipeline the start of the TLS handshake for
- proxying https URL requests.*/
-static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream,
- OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){
-# if OPENSSL_VERSION_NUMBER>=0x10100000L
- BIO_METHOD *bio_retry_method;
-# endif
- BIO *retry_bio;
- char *status_code;
- char *next;
- int ret;
- _conn->ssl_conn=NULL;
- _conn->fd=_fd;
- OP_ASSERT(_stream->proxy_connect.nbuf>0);
- ret=op_http_conn_write_fully(_conn,
- _stream->proxy_connect.buf,_stream->proxy_connect.nbuf);
- if(OP_UNLIKELY(ret<0))return ret;
-# if OPENSSL_VERSION_NUMBER>=0x10100000L
- bio_retry_method=BIO_meth_new(BIO_TYPE_NULL,"retry");
- if(bio_retry_method==NULL)return OP_EFAULT;
- BIO_meth_set_write(bio_retry_method,op_bio_retry_write);
- BIO_meth_set_read(bio_retry_method,op_bio_retry_read);
- BIO_meth_set_puts(bio_retry_method,op_bio_retry_puts);
- BIO_meth_set_ctrl(bio_retry_method,op_bio_retry_ctrl);
- BIO_meth_set_create(bio_retry_method,op_bio_retry_new);
- BIO_meth_set_destroy(bio_retry_method,op_bio_retry_free);
- retry_bio=BIO_new(bio_retry_method);
- if(OP_UNLIKELY(retry_bio==NULL)){
- BIO_meth_free(bio_retry_method);
- return OP_EFAULT;
- }
-# else
- retry_bio=BIO_new(&op_bio_retry_method);
- if(OP_UNLIKELY(retry_bio==NULL))return OP_EFAULT;
-# endif
- SSL_set_bio(_ssl_conn,retry_bio,_ssl_bio);
- SSL_set_connect_state(_ssl_conn);
- /*This shouldn't succeed, since we can't read yet.*/
- OP_ALWAYS_TRUE(SSL_connect(_ssl_conn)<0);
- SSL_set_bio(_ssl_conn,_ssl_bio,_ssl_bio);
-# if OPENSSL_VERSION_NUMBER>=0x10100000L
- BIO_meth_free(bio_retry_method);
-# endif
- /*Only now do we disable write coalescing, to allow the CONNECT
- request and the start of the TLS handshake to be combined.*/
- op_sock_set_tcp_nodelay(_fd,1);
- ret=op_http_conn_read_response(_conn,&_stream->response);
- if(OP_UNLIKELY(ret<0))return ret;
- next=op_http_parse_status_line(NULL,&status_code,_stream->response.buf);
- /*According to RFC 2817, "Any successful (2xx) response to a
- CONNECT request indicates that the proxy has established a
- connection to the requested host and port.*/
- if(OP_UNLIKELY(next==NULL)||OP_UNLIKELY(status_code[0]!='2'))return OP_FALSE;
- return 0;
-}
-
-/*Match a host name against a host with a possible wildcard pattern according
- to the rules of RFC 6125 Section 6.4.3.
- Return: 0 if the pattern doesn't match, and a non-zero value if it does.*/
-static int op_http_hostname_match(const char *_host,size_t _host_len,
- ASN1_STRING *_pattern){
- const char *pattern;
- size_t host_label_len;
- size_t host_suffix_len;
- size_t pattern_len;
- size_t pattern_label_len;
- size_t pattern_prefix_len;
- size_t pattern_suffix_len;
- pattern=(const char *)ASN1_STRING_data(_pattern);
- pattern_len=strlen(pattern);
- /*Check the pattern for embedded NULs.*/
- if(OP_UNLIKELY(pattern_len!=(size_t)ASN1_STRING_length(_pattern)))return 0;
- pattern_label_len=strcspn(pattern,".");
- OP_ASSERT(pattern_label_len<=pattern_len);
- pattern_prefix_len=strcspn(pattern,"*");
- if(pattern_prefix_len>=pattern_label_len){
- /*"The client SHOULD NOT attempt to match a presented identifier in which
- the wildcard character comprises a label other than the left-most label
- (e.g., do not match bar.*.example.net)." [RFC 6125 Section 6.4.3]*/
- if(pattern_prefix_len<pattern_len)return 0;
- /*If the pattern does not contain a wildcard in the first element, do an
- exact match.
- Don't use the system strcasecmp here, as that uses the locale and
- RFC 4343 makes clear that DNS's case-insensitivity only applies to
- the ASCII range.*/
- return _host_len==pattern_len&&op_strncasecmp(_host,pattern,_host_len)==0;
- }
- /*"However, the client SHOULD NOT attempt to match a presented identifier
- where the wildcard character is embedded within an A-label or U-label of
- an internationalized domain name." [RFC 6125 Section 6.4.3]*/
- if(op_strncasecmp(pattern,"xn--",4)==0)return 0;
- host_label_len=strcspn(_host,".");
- /*Make sure the host has at least two dots, to prevent the wildcard match
- from being ridiculously wide.
- We should have already checked to ensure it had at least one.*/
- if(OP_UNLIKELY(_host[host_label_len]!='.')
- ||strchr(_host+host_label_len+1,'.')==NULL){
- return 0;
- }
- OP_ASSERT(host_label_len<_host_len);
- /*"If the wildcard character is the only character of the left-most label in
- the presented identifier, the client SHOULD NOT compare against anything
- but the left-most label of the reference identifier (e.g., *.example.com
- would match foo.example.com but not bar.foo.example.com)." [RFC 6125
- Section 6.4.3]
- This is really confusingly worded, as we check this by actually comparing
- the rest of the pattern for an exact match.
- We also use the fact that the wildcard must match at least one character,
- so the left-most label of the hostname must be at least as large as the
- left-most label of the pattern.*/
- if(host_label_len<pattern_label_len)return 0;
- OP_ASSERT(pattern[pattern_prefix_len]=='*');
- /*"The client MAY match a presented identifier in which the wildcard
- character is not the only character of the label (e.g., baz*.example.net
- and *baz.example.net and b*z.example.net would be taken to match
- baz1.example.net and foobaz.example.net and buzz.example.net,
- respectively)." [RFC 6125 Section 6.4.3]*/
- pattern_suffix_len=pattern_len-pattern_prefix_len-1;
- host_suffix_len=_host_len-host_label_len
- +pattern_label_len-pattern_prefix_len-1;
- return pattern_suffix_len==host_suffix_len
- &&op_strncasecmp(_host,pattern,pattern_prefix_len)==0
- &&op_strncasecmp(_host+_host_len-host_suffix_len,
- pattern+pattern_prefix_len+1,host_suffix_len)==0;
-}
-
-/*Convert a host to a numeric address, if possible.
- Return: A struct addrinfo containing the address, if it was numeric, and NULL
- otherise.*/
-static struct addrinfo *op_inet_pton(const char *_host){
- struct addrinfo *addrs;
- struct addrinfo hints;
- memset(&hints,0,sizeof(hints));
- hints.ai_socktype=SOCK_STREAM;
- hints.ai_flags=AI_NUMERICHOST;
- if(!getaddrinfo(_host,NULL,&hints,&addrs))return addrs;
- return NULL;
-}
-
-/*Verify the server's hostname matches the certificate they presented using
- the procedure from Section 6 of RFC 6125.
- Return: 0 if the certificate doesn't match, and a non-zero value if it does.*/
-static int op_http_verify_hostname(OpusHTTPStream *_stream,SSL *_ssl_conn){
- X509 *peer_cert;
- STACK_OF(GENERAL_NAME) *san_names;
- char *host;
- size_t host_len;
- int ret;
- host=_stream->url.host;
- host_len=strlen(host);
- peer_cert=SSL_get_peer_certificate(_ssl_conn);
- /*We set VERIFY_PEER, so we shouldn't get here without a certificate.*/
- if(OP_UNLIKELY(peer_cert==NULL))return 0;
- ret=0;
- OP_ASSERT(host_len<INT_MAX);
- /*RFC 2818 says (after correcting for Eratta 1077): "If a subjectAltName
- extension of type dNSName is present, that MUST be used as the identity.
- Otherwise, the (most specific) Common Name field in the Subject field of
- the certificate MUST be used.
- Although the use of the Common Name is existing practice, it is deprecated
- and Certification Authorities are encouraged to use the dNSName
- instead."
- "Matching is performed using the matching rules specified by RFC 2459.
- If more than one identity of a given type is present in the certificate
- (e.g., more than one dNSName name), a match in any one of the set is
- considered acceptable.
- Names may contain the wildcard character * which is condered to match any
- single domain name component or component fragment.
- E.g., *.a.com matches foo.a.com but not bar.foo.a.com.
- f*.com matches foo.com but not bar.com."
- "In some cases, the URI is specified as an IP address rather than a
- hostname.
- In this case, the iPAddress subjectAltName must be present in the
- certificate and must exactly match the IP in the URI."*/
- san_names=X509_get_ext_d2i(peer_cert,NID_subject_alt_name,NULL,NULL);
- if(san_names!=NULL){
- struct addrinfo *addr;
- unsigned char *ip;
- int ip_len;
- int nsan_names;
- int sni;
- /*Check to see if the host was specified as a simple IP address.*/
- addr=op_inet_pton(host);
- ip=NULL;
- ip_len=0;
- if(addr!=NULL){
- switch(addr->ai_family){
- case AF_INET:{
- struct sockaddr_in *s;
- s=(struct sockaddr_in *)addr->ai_addr;
- OP_ASSERT(addr->ai_addrlen>=sizeof(*s));
- ip=(unsigned char *)&s->sin_addr;
- ip_len=sizeof(s->sin_addr);
- }break;
- case AF_INET6:{
- struct sockaddr_in6 *s;
- s=(struct sockaddr_in6 *)addr->ai_addr;
- OP_ASSERT(addr->ai_addrlen>=sizeof(*s));
- ip=(unsigned char *)&s->sin6_addr;
- ip_len=sizeof(s->sin6_addr);
- }break;
- }
- }
- /*We can only verify fully-qualified domain names.
- To quote RFC 6125: "The extracted data MUST include only information that
- can be securely parsed out of the inputs (e.g., parsing the fully
- qualified DNS domain name out of the "host" component (or its
- equivalent) of a URI or deriving the application service type from the
- scheme of a URI) ..."
- We don't have a way to check (without relying on DNS records, which might
- be subverted) if this address is fully-qualified.
- This is particularly problematic when using a CONNECT tunnel, as it is
- the server that does DNS lookup, not us.
- However, we are certain that if the hostname has no '.', it is definitely
- not a fully-qualified domain name (with the exception of crazy TLDs that
- actually resolve, like "uz", but I am willing to ignore those).
- RFC 1535 says "...in any event where a '.' exists in a specified name it
- should be assumed to be a fully qualified domain name (FQDN) and SHOULD
- be tried as a rooted name first."
- That doesn't give us any security guarantees, of course (a subverted DNS
- could fail the original query and our resolver might still retry with a
- local domain appended).
- If we don't have a FQDN, just set the number of names to 0, so we'll fail
- and clean up any resources we allocated.*/
- if(ip==NULL&&strchr(host,'.')==NULL)nsan_names=0;
- /*RFC 2459 says there MUST be at least one, but we don't depend on it.*/
- else nsan_names=sk_GENERAL_NAME_num(san_names);
- for(sni=0;sni<nsan_names;sni++){
- const GENERAL_NAME *name;
- name=sk_GENERAL_NAME_value(san_names,sni);
- if(ip==NULL){
- if(name->type==GEN_DNS
- &&op_http_hostname_match(host,host_len,name->d.dNSName)){
- ret=1;
- break;
- }
- }
- else if(name->type==GEN_IPADD){
- unsigned char *cert_ip;
- /*If we do have an IP address, compare it directly.
- RFC 6125: "When the reference identity is an IP address, the identity
- MUST be converted to the 'network byte order' octet string
- representation.
- For IP Version 4, as specified in RFC 791, the octet string will
- contain exactly four octets.
- For IP Version 6, as specified in RFC 2460, the octet string will
- contain exactly sixteen octets.
- This octet string is then compared against subjectAltName values of
- type iPAddress.
- A match occurs if the reference identity octet string and the value
- octet strings are identical."*/
- cert_ip=ASN1_STRING_data(name->d.iPAddress);
- if(ip_len==ASN1_STRING_length(name->d.iPAddress)
- &&memcmp(ip,cert_ip,ip_len)==0){
- ret=1;
- break;
- }
- }
- }
- sk_GENERAL_NAME_pop_free(san_names,GENERAL_NAME_free);
- if(addr!=NULL)freeaddrinfo(addr);
- }
- /*Do the same FQDN check we did above.
- We don't do this once in advance for both cases, because in the
- subjectAltName case we might have an IPv6 address without a dot.*/
- else if(strchr(host,'.')!=NULL){
- int last_cn_loc;
- int cn_loc;
- /*If there is no subjectAltName, match against commonName.
- RFC 6125 says that at least one significant CA is known to issue certs
- with multiple CNs, although it SHOULD NOT.
- It also says: "The server's identity may also be verified by comparing
- the reference identity to the Common Name (CN) value in the last
- Relative Distinguished Name (RDN) of the subject field of the server's
- certificate (where "last" refers to the DER-encoded order...)."
- So find the last one and check it.*/
- cn_loc=-1;
- do{
- last_cn_loc=cn_loc;
- cn_loc=X509_NAME_get_index_by_NID(X509_get_subject_name(peer_cert),
- NID_commonName,last_cn_loc);
- }
- while(cn_loc>=0);
- ret=last_cn_loc>=0
- &&op_http_hostname_match(host,host_len,
- X509_NAME_ENTRY_get_data(
- X509_NAME_get_entry(X509_get_subject_name(peer_cert),last_cn_loc)));
- }
- X509_free(peer_cert);
- return ret;
-}
-
-/*Perform the TLS handshake on a new connection.*/
-static int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
- op_sock _fd,SSL *_ssl_conn){
- SSL_SESSION *ssl_session;
- BIO *ssl_bio;
- int skip_certificate_check;
- int ret;
- ssl_bio=BIO_new_socket(_fd,BIO_NOCLOSE);
- if(OP_LIKELY(ssl_bio==NULL))return OP_FALSE;
-# if !defined(OPENSSL_NO_TLSEXT)
- /*Support for RFC 6066 Server Name Indication.*/
- SSL_set_tlsext_host_name(_ssl_conn,_stream->url.host);
-# endif
- /*Resume a previous session if available.*/
- if(_stream->ssl_session!=NULL){
- SSL_set_session(_ssl_conn,_stream->ssl_session);
- }
- /*If we're proxying, establish the CONNECT tunnel.*/
- if(_stream->proxy_connect.nbuf>0){
- ret=op_http_conn_establish_tunnel(_stream,_conn,
- _fd,_ssl_conn,ssl_bio);
- if(OP_UNLIKELY(ret<0))return ret;
- }
- else{
- /*Otherwise, just use this socket directly.*/
- op_sock_set_tcp_nodelay(_fd,1);
- SSL_set_bio(_ssl_conn,ssl_bio,ssl_bio);
- SSL_set_connect_state(_ssl_conn);
- }
- ret=op_do_ssl_step(_ssl_conn,_fd,SSL_connect);
- if(OP_UNLIKELY(ret<=0))return OP_FALSE;
- ssl_session=_stream->ssl_session;
- skip_certificate_check=_stream->skip_certificate_check;
- if(ssl_session==NULL||!skip_certificate_check){
- ret=op_do_ssl_step(_ssl_conn,_fd,SSL_do_handshake);
- if(OP_UNLIKELY(ret<=0))return OP_FALSE;
- /*OpenSSL does not do hostname verification, despite the fact that we just
- passed it the hostname above in the call to SSL_set_tlsext_host_name(),
- because they are morons.
- Do it for them.*/
- if(!skip_certificate_check&&!op_http_verify_hostname(_stream,_ssl_conn)){
- return OP_FALSE;
- }
- if(ssl_session==NULL){
- /*Save the session for later resumption.*/
- _stream->ssl_session=SSL_get1_session(_ssl_conn);
- }
- }
- _conn->ssl_conn=_ssl_conn;
- _conn->fd=_fd;
- _conn->nrequests_left=OP_PIPELINE_MAX_REQUESTS;
- return 0;
-}
-
-/*Try to start a connection to the next address in the given list of a given
- type.
- _fd: The socket to connect with.
- [inout] _addr: A pointer to the list of addresses.
- This will be advanced to the first one that matches the given
- address family (possibly the current one).
- _ai_family: The address family to connect to.
- Return: 1 If the connection was successful.
- 0 If the connection is in progress.
- OP_FALSE If the connection failed and there were no more addresses
- left to try.
- *_addr will be set to NULL in this case.*/
-static int op_sock_connect_next(op_sock _fd,
- const struct addrinfo **_addr,int _ai_family){
- const struct addrinfo *addr;
- int err;
- addr=*_addr;
- for(;;){
- /*Move to the next address of the requested type.*/
- for(;addr!=NULL&&addr->ai_family!=_ai_family;addr=addr->ai_next);
- *_addr=addr;
- /*No more: failure.*/
- if(addr==NULL)return OP_FALSE;
- if(connect(_fd,addr->ai_addr,addr->ai_addrlen)>=0)return 1;
- err=op_errno();
- /*Winsock will set WSAEWOULDBLOCK.*/
- if(OP_LIKELY(err==EINPROGRESS||err==EWOULDBLOCK))return 0;
- addr=addr->ai_next;
- }
-}
-
-/*The number of address families to try connecting to simultaneously.*/
-# define OP_NPROTOS (2)
-
-static int op_http_connect_impl(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
- const struct addrinfo *_addrs,struct timeb *_start_time){
- const struct addrinfo *addr;
- const struct addrinfo *addrs[OP_NPROTOS];
- struct pollfd fds[OP_NPROTOS];
- int ai_family;
- int nprotos;
- int ret;
- int pi;
- int pj;
- for(pi=0;pi<OP_NPROTOS;pi++)addrs[pi]=NULL;
- /*Try connecting via both IPv4 and IPv6 simultaneously, and keep the first
- one that succeeds.
- Start by finding the first address from each family.
- We order the first connection attempts in the same order the address
- families were returned in the DNS records in accordance with RFC 6555.*/
- for(addr=_addrs,nprotos=0;addr!=NULL&&nprotos<OP_NPROTOS;addr=addr->ai_next){
- if(addr->ai_family==AF_INET6||addr->ai_family==AF_INET){
- OP_ASSERT(addr->ai_addrlen<=sizeof(struct sockaddr_in6));
- OP_ASSERT(addr->ai_addrlen<=sizeof(struct sockaddr_in));
- /*If we've seen this address family before, skip this address for now.*/
- for(pi=0;pi<nprotos;pi++)if(addrs[pi]->ai_family==addr->ai_family)break;
- if(pi<nprotos)continue;
- addrs[nprotos++]=addr;
- }
- }
- /*Pop the connection off the free list and put it on the LRU list.*/
- OP_ASSERT(_stream->free_head==_conn);
- _stream->free_head=_conn->next;
- _conn->next=_stream->lru_head;
- _stream->lru_head=_conn;
- ftime(_start_time);
- *&_conn->read_time=*_start_time;
- _conn->read_bytes=0;
- _conn->read_rate=0;
- /*Try to start a connection to each protocol.
- RFC 6555 says it is RECOMMENDED that connection attempts be paced
- 150...250 ms apart "to balance human factors against network load", but
- that "stateful algorithms" (that's us) "are expected to be more
- aggressive".
- We are definitely more aggressive: we don't pace at all.*/
- for(pi=0;pi<nprotos;pi++){
- ai_family=addrs[pi]->ai_family;
- fds[pi].fd=socket(ai_family,SOCK_STREAM,addrs[pi]->ai_protocol);
- fds[pi].events=POLLOUT;
- if(OP_LIKELY(fds[pi].fd!=OP_INVALID_SOCKET)){
- if(OP_LIKELY(op_sock_set_nonblocking(fds[pi].fd,1)>=0)){
- ret=op_sock_connect_next(fds[pi].fd,addrs+pi,ai_family);
- if(OP_UNLIKELY(ret>0)){
- /*It succeeded right away (technically possible), so stop.*/
- nprotos=pi+1;
- break;
- }
- /*Otherwise go on to the next protocol, and skip the clean-up below.*/
- else if(ret==0)continue;
- /*Tried all the addresses for this protocol.*/
- }
- /*Clean up the socket.*/
- close(fds[pi].fd);
- }
- /*Remove this protocol from the list.*/
- memmove(addrs+pi,addrs+pi+1,sizeof(*addrs)*(nprotos-pi-1));
- nprotos--;
- pi--;
- }
- /*Wait for one of the connections to finish.*/
- while(pi>=nprotos&&nprotos>0&&poll(fds,nprotos,OP_POLL_TIMEOUT_MS)>0){
- for(pi=0;pi<nprotos;pi++){
- socklen_t errlen;
- int err;
- /*Still waiting...*/
- if(!fds[pi].revents)continue;
- errlen=sizeof(err);
- /*Some platforms will return the pending error in &err and return 0.
- Others will put it in errno and return -1.*/
- ret=getsockopt(fds[pi].fd,SOL_SOCKET,SO_ERROR,&err,&errlen);
- if(ret<0)err=op_errno();
- /*Success!*/
- if(err==0||err==EISCONN)break;
- /*Move on to the next address for this protocol.*/
- ai_family=addrs[pi]->ai_family;
- addrs[pi]=addrs[pi]->ai_next;
- ret=op_sock_connect_next(fds[pi].fd,addrs+pi,ai_family);
- /*It succeeded right away, so stop.*/
- if(ret>0)break;
- /*Otherwise go on to the next protocol, and skip the clean-up below.*/
- else if(ret==0)continue;
- /*Tried all the addresses for this protocol.
- Remove it from the list.*/
- close(fds[pi].fd);
- memmove(fds+pi,fds+pi+1,sizeof(*fds)*(nprotos-pi-1));
- memmove(addrs+pi,addrs+pi+1,sizeof(*addrs)*(nprotos-pi-1));
- nprotos--;
- pi--;
- }
- }
- /*Close all the other sockets.*/
- for(pj=0;pj<nprotos;pj++)if(pi!=pj)close(fds[pj].fd);
- /*If none of them succeeded, we're done.*/
- if(pi>=nprotos)return OP_FALSE;
- /*Save this address for future connection attempts.*/
- if(addrs[pi]!=&_stream->addr_info){
- memcpy(&_stream->addr_info,addrs[pi],sizeof(_stream->addr_info));
- _stream->addr_info.ai_addr=&_stream->addr.s;
- _stream->addr_info.ai_next=NULL;
- memcpy(&_stream->addr,addrs[pi]->ai_addr,addrs[pi]->ai_addrlen);
- }
- if(OP_URL_IS_SSL(&_stream->url)){
- SSL *ssl_conn;
- /*Start the SSL connection.*/
- OP_ASSERT(_stream->ssl_ctx!=NULL);
- ssl_conn=SSL_new(_stream->ssl_ctx);
- if(OP_LIKELY(ssl_conn!=NULL)){
- ret=op_http_conn_start_tls(_stream,_conn,fds[pi].fd,ssl_conn);
- if(OP_LIKELY(ret>=0))return ret;
- SSL_free(ssl_conn);
- }
- close(fds[pi].fd);
- _conn->fd=OP_INVALID_SOCKET;
- return OP_FALSE;
- }
- /*Just a normal non-SSL connection.*/
- _conn->ssl_conn=NULL;
- _conn->fd=fds[pi].fd;
- _conn->nrequests_left=OP_PIPELINE_MAX_REQUESTS;
- /*Disable write coalescing.
- We always send whole requests at once and always parse the response headers
- before sending another one.*/
- op_sock_set_tcp_nodelay(fds[pi].fd,1);
- return 0;
-}
-
-static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
- const struct addrinfo *_addrs,struct timeb *_start_time){
- struct timeb resolve_time;
- struct addrinfo *new_addrs;
- int ret;
- /*Re-resolve the host if we need to (RFC 6555 says we MUST do so
- occasionally).*/
- new_addrs=NULL;
- ftime(&resolve_time);
- if(_addrs!=&_stream->addr_info||op_time_diff_ms(&resolve_time,
- &_stream->resolve_time)>=OP_RESOLVE_CACHE_TIMEOUT_MS){
- new_addrs=op_resolve(_stream->connect_host,_stream->connect_port);
- if(OP_LIKELY(new_addrs!=NULL)){
- _addrs=new_addrs;
- *&_stream->resolve_time=*&resolve_time;
- }
- else if(OP_LIKELY(_addrs==NULL))return OP_FALSE;
- }
- ret=op_http_connect_impl(_stream,_conn,_addrs,_start_time);
- if(new_addrs!=NULL)freeaddrinfo(new_addrs);
- return ret;
-}
-
-# define OP_BASE64_LENGTH(_len) (((_len)+2)/3*4)
-
-static const char BASE64_TABLE[64]={
- 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
- 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',
- 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
- 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'
-};
-
-static char *op_base64_encode(char *_dst,const char *_src,int _len){
- unsigned s0;
- unsigned s1;
- unsigned s2;
- int ngroups;
- int i;
- ngroups=_len/3;
- for(i=0;i<ngroups;i++){
- s0=_src[3*i+0];
- s1=_src[3*i+1];
- s2=_src[3*i+2];
- _dst[4*i+0]=BASE64_TABLE[s0>>2];
- _dst[4*i+1]=BASE64_TABLE[(s0&3)<<4|s1>>4];
- _dst[4*i+2]=BASE64_TABLE[(s1&15)<<2|s2>>6];
- _dst[4*i+3]=BASE64_TABLE[s2&63];
- }
- _len-=3*i;
- if(_len==1){
- s0=_src[3*i+0];
- _dst[4*i+0]=BASE64_TABLE[s0>>2];
- _dst[4*i+1]=BASE64_TABLE[(s0&3)<<4];
- _dst[4*i+2]='=';
- _dst[4*i+3]='=';
- i++;
- }
- else if(_len==2){
- s0=_src[3*i+0];
- s1=_src[3*i+1];
- _dst[4*i+0]=BASE64_TABLE[s0>>2];
- _dst[4*i+1]=BASE64_TABLE[(s0&3)<<4|s1>>4];
- _dst[4*i+2]=BASE64_TABLE[(s1&15)<<2];
- _dst[4*i+3]='=';
- i++;
- }
- _dst[4*i]='\0';
- return _dst+4*i;
-}
-
-/*Construct an HTTP authorization header using RFC 2617's Basic Authentication
- Scheme and append it to the given string buffer.*/
-static int op_sb_append_basic_auth_header(OpusStringBuf *_sb,
- const char *_header,const char *_user,const char *_pass){
- int user_len;
- int pass_len;
- int user_pass_len;
- int base64_len;
- int nbuf_total;
- int ret;
- ret=op_sb_append_string(_sb,_header);
- ret|=op_sb_append(_sb,": Basic ",8);
- user_len=strlen(_user);
- pass_len=strlen(_pass);
- if(OP_UNLIKELY(pass_len>INT_MAX-user_len))return OP_EFAULT;
- if(OP_UNLIKELY(user_len+pass_len>(INT_MAX>>2)*3-3))return OP_EFAULT;
- user_pass_len=user_len+1+pass_len;
- base64_len=OP_BASE64_LENGTH(user_pass_len);
- /*Stick "user:pass" at the end of the buffer so we can Base64 encode it
- in-place.*/
- nbuf_total=_sb->nbuf;
- if(OP_UNLIKELY(base64_len>INT_MAX-nbuf_total))return OP_EFAULT;
- nbuf_total+=base64_len;
- ret|=op_sb_ensure_capacity(_sb,nbuf_total);
- if(OP_UNLIKELY(ret<0))return ret;
- _sb->nbuf=nbuf_total-user_pass_len;
- OP_ALWAYS_TRUE(!op_sb_append(_sb,_user,user_len));
- OP_ALWAYS_TRUE(!op_sb_append(_sb,":",1));
- OP_ALWAYS_TRUE(!op_sb_append(_sb,_pass,pass_len));
- op_base64_encode(_sb->buf+nbuf_total-base64_len,
- _sb->buf+nbuf_total-user_pass_len,user_pass_len);
- return op_sb_append(_sb,"\r\n",2);
-}
-
-static int op_http_allow_pipelining(const char *_server){
- /*Servers known to do bad things with pipelined requests.
- This list is taken from Gecko's nsHttpConnection::SupportsPipelining() (in
- netwerk/protocol/http/nsHttpConnection.cpp).*/
- static const char *BAD_SERVERS[]={
- "EFAServer/",
- "Microsoft-IIS/4.",
- "Microsoft-IIS/5.",
- "Netscape-Enterprise/3.",
- "Netscape-Enterprise/4.",
- "Netscape-Enterprise/5.",
- "Netscape-Enterprise/6.",
- "WebLogic 3.",
- "WebLogic 4.",
- "WebLogic 5.",
- "WebLogic 6.",
- "Winstone Servlet Engine v0."
- };
-# define NBAD_SERVERS ((int)(sizeof(BAD_SERVERS)/sizeof(*BAD_SERVERS)))
- if(*_server>='E'&&*_server<='W'){
- int si;
- for(si=0;si<NBAD_SERVERS;si++){
- if(strncmp(_server,BAD_SERVERS[si],strlen(BAD_SERVERS[si]))==0){
- return 0;
- }
- }
- }
- return 1;
-# undef NBAD_SERVERS
-}
-
-static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url,
- int _skip_certificate_check,const char *_proxy_host,unsigned _proxy_port,
- const char *_proxy_user,const char *_proxy_pass,OpusServerInfo *_info){
- struct addrinfo *addrs;
- int nredirs;
- int ret;
-#if defined(_WIN32)
- op_init_winsock();
-#endif
- ret=op_parse_url(&_stream->url,_url);
- if(OP_UNLIKELY(ret<0))return ret;
- if(_proxy_host!=NULL){
- if(OP_UNLIKELY(_proxy_port>65535U))return OP_EINVAL;
- _stream->connect_host=op_string_dup(_proxy_host);
- _stream->connect_port=_proxy_port;
- }
- else{
- _stream->connect_host=_stream->url.host;
- _stream->connect_port=_stream->url.port;
- }
- addrs=NULL;
- for(nredirs=0;nredirs<OP_REDIRECT_LIMIT;nredirs++){
- OpusParsedURL next_url;
- struct timeb start_time;
- struct timeb end_time;
- char *next;
- char *status_code;
- int minor_version_pos;
- int v1_1_compat;
- /*Initialize the SSL library if necessary.*/
- if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){
- SSL_CTX *ssl_ctx;
-# if OPENSSL_VERSION_NUMBER<0x10100000L
-# if !defined(OPENSSL_NO_LOCKING)
- /*The documentation says SSL_library_init() is not reentrant.
- We don't want to add our own depenencies on a threading library, and it
- appears that it's safe to call OpenSSL's locking functions before the
- library is initialized, so that's what we'll do (really OpenSSL should
- do this for us).
- This doesn't guarantee that _other_ threads in the application aren't
- calling SSL_library_init() at the same time, but there's not much we
- can do about that.*/
- CRYPTO_w_lock(CRYPTO_LOCK_SSL);
-# endif
- SSL_library_init();
- /*Needed to get SHA2 algorithms with old OpenSSL versions.*/
- OpenSSL_add_ssl_algorithms();
-# if !defined(OPENSSL_NO_LOCKING)
- CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
-# endif
-# else
- /*Finally, OpenSSL does this for us, but as penance, it can now fail.*/
- if(!OPENSSL_init_ssl(0,NULL))return OP_EFAULT;
-# endif
- ssl_ctx=SSL_CTX_new(SSLv23_client_method());
- if(ssl_ctx==NULL)return OP_EFAULT;
- if(!_skip_certificate_check){
- /*We don't do anything if this fails, since it just means we won't load
- any certificates (and thus all checks will fail).
- However, as that is probably the result of a system
- mis-configuration, assert here to make it easier to identify.*/
- OP_ALWAYS_TRUE(SSL_CTX_set_default_verify_paths(ssl_ctx));
- SSL_CTX_set_verify(ssl_ctx,SSL_VERIFY_PEER,NULL);
- }
- _stream->ssl_ctx=ssl_ctx;
- _stream->skip_certificate_check=_skip_certificate_check;
- if(_proxy_host!=NULL){
- /*We need to establish a CONNECT tunnel to handle https proxying.
- Build the request we'll send to do so.*/
- _stream->proxy_connect.nbuf=0;
- ret=op_sb_append(&_stream->proxy_connect,"CONNECT ",8);
- ret|=op_sb_append_string(&_stream->proxy_connect,_stream->url.host);
- ret|=op_sb_append_port(&_stream->proxy_connect,_stream->url.port);
- /*CONNECT requires at least HTTP 1.1.*/
- ret|=op_sb_append(&_stream->proxy_connect," HTTP/1.1\r\n",11);
- ret|=op_sb_append(&_stream->proxy_connect,"Host: ",6);
- ret|=op_sb_append_string(&_stream->proxy_connect,_stream->url.host);
- /*The example in RFC 2817 Section 5.2 specifies an explicit port even
- when connecting to the default port.
- Given that the proxy doesn't know whether we're trying to connect to
- an http or an https URL except by the port number, this seems like a
- good idea.*/
- ret|=op_sb_append_port(&_stream->proxy_connect,_stream->url.port);
- ret|=op_sb_append(&_stream->proxy_connect,"\r\n",2);
- ret|=op_sb_append(&_stream->proxy_connect,"User-Agent: .\r\n",15);
- if(_proxy_user!=NULL&&_proxy_pass!=NULL){
- ret|=op_sb_append_basic_auth_header(&_stream->proxy_connect,
- "Proxy-Authorization",_proxy_user,_proxy_pass);
- }
- /*For backwards compatibility.*/
- ret|=op_sb_append(&_stream->proxy_connect,
- "Proxy-Connection: keep-alive\r\n",30);
- ret|=op_sb_append(&_stream->proxy_connect,"\r\n",2);
- if(OP_UNLIKELY(ret<0))return ret;
- }
- }
- /*Actually make the connection.*/
- ret=op_http_connect(_stream,_stream->conns+0,addrs,&start_time);
- if(OP_UNLIKELY(ret<0))return ret;
- /*Build the request to send.*/
- _stream->request.nbuf=0;
- ret=op_sb_append(&_stream->request,"GET ",4);
- ret|=op_sb_append_string(&_stream->request,
- _proxy_host!=NULL?_url:_stream->url.path);
- /*Send HTTP/1.0 by default for maximum compatibility (so we don't have to
- re-try if HTTP/1.1 fails, though it shouldn't, even for a 1.0 server).
- This means we aren't conditionally compliant with RFC 2145, because we
- violate the requirement that "An HTTP client SHOULD send a request
- version equal to the highest version for which the client is at least
- conditionally compliant...".
- According to RFC 2145, that means we can't claim any compliance with any
- IETF HTTP specification.*/
- ret|=op_sb_append(&_stream->request," HTTP/1.0\r\n",11);
- /*Remember where this is so we can upgrade to HTTP/1.1 if the server
- supports it.*/
- minor_version_pos=_stream->request.nbuf-3;
- ret|=op_sb_append(&_stream->request,"Host: ",6);
- ret|=op_sb_append_string(&_stream->request,_stream->url.host);
- if(!OP_URL_IS_DEFAULT_PORT(&_stream->url)){
- ret|=op_sb_append_port(&_stream->request,_stream->url.port);
- }
- ret|=op_sb_append(&_stream->request,"\r\n",2);
- /*User-Agents have been a bad idea, so send as little as possible.
- RFC 2616 requires at least one token in the User-Agent, which must have
- at least one character.*/
- ret|=op_sb_append(&_stream->request,"User-Agent: .\r\n",15);
- if(_proxy_host!=NULL&&!OP_URL_IS_SSL(&_stream->url)
- &&_proxy_user!=NULL&&_proxy_pass!=NULL){
- ret|=op_sb_append_basic_auth_header(&_stream->request,
- "Proxy-Authorization",_proxy_user,_proxy_pass);
- }
- if(_stream->url.user!=NULL&&_stream->url.pass!=NULL){
- ret|=op_sb_append_basic_auth_header(&_stream->request,
- "Authorization",_stream->url.user,_stream->url.pass);
- }
- /*Always send a Referer [sic] header.
- It's common to refuse to serve a resource unless one is present.
- We just use the relative "/" URI to suggest we came from the same domain,
- as this is the most common check.
- This might violate RFC 2616's mandate that the field "MUST NOT be sent if
- the Request-URI was obtained from a source that does not have its own
- URI, such as input from the user keyboard," but we don't really have any
- way to know.*/
- /*TODO: Should we update this on redirects?*/
- ret|=op_sb_append(&_stream->request,"Referer: /\r\n",12);
- /*Always send a Range request header to find out if we're seekable.
- This requires an HTTP/1.1 server to succeed, but we'll still get what we
- want with an HTTP/1.0 server that ignores this request header.*/
- ret|=op_sb_append(&_stream->request,"Range: bytes=0-\r\n",17);
- /*Remember where this is so we can append offsets to it later.*/
- _stream->request_tail=_stream->request.nbuf-4;
- ret|=op_sb_append(&_stream->request,"\r\n",2);
- if(OP_UNLIKELY(ret<0))return ret;
- ret=op_http_conn_write_fully(_stream->conns+0,
- _stream->request.buf,_stream->request.nbuf);
- if(OP_UNLIKELY(ret<0))return ret;
- ret=op_http_conn_read_response(_stream->conns+0,&_stream->response);
- if(OP_UNLIKELY(ret<0))return ret;
- ftime(&end_time);
- next=op_http_parse_status_line(&v1_1_compat,&status_code,
- _stream->response.buf);
- if(OP_UNLIKELY(next==NULL))return OP_FALSE;
- if(status_code[0]=='2'){
- opus_int64 content_length;
- opus_int64 range_length;
- int pipeline_supported;
- int pipeline_disabled;
- /*We only understand 20x codes.*/
- if(status_code[1]!='0')return OP_FALSE;
- content_length=-1;
- range_length=-1;
- /*Pipelining must be explicitly enabled.*/
- pipeline_supported=0;
- pipeline_disabled=0;
- for(;;){
- char *header;
- char *cdr;
- ret=op_http_get_next_header(&header,&cdr,&next);
- if(OP_UNLIKELY(ret<0))return ret;
- if(header==NULL)break;
- if(strcmp(header,"content-length")==0){
- /*Two Content-Length headers?*/
- if(OP_UNLIKELY(content_length>=0))return OP_FALSE;
- content_length=op_http_parse_content_length(cdr);
- if(OP_UNLIKELY(content_length<0))return (int)content_length;
- /*Make sure the Content-Length and Content-Range headers match.*/
- if(range_length>=0&&OP_UNLIKELY(content_length!=range_length)){
- return OP_FALSE;
- }
- }
- else if(strcmp(header,"content-range")==0){
- opus_int64 range_first;
- opus_int64 range_last;
- /*Two Content-Range headers?*/
- if(OP_UNLIKELY(range_length>=0))return OP_FALSE;
- ret=op_http_parse_content_range(&range_first,&range_last,
- &range_length,cdr);
- if(OP_UNLIKELY(ret<0))return ret;
- /*"A response with satus code 206 (Partial Content) MUST NOT
- include a Content-Range field with a byte-range-resp-spec of
- '*'."*/
- if(status_code[2]=='6'
- &&(OP_UNLIKELY(range_first<0)||OP_UNLIKELY(range_last<0))){
- return OP_FALSE;
- }
- /*We asked for the entire resource.*/
- if(range_length>=0){
- /*Quit if we didn't get it.*/
- if(range_last>=0&&OP_UNLIKELY(range_last!=range_length-1)){
- return OP_FALSE;
- }
- }
- /*If there was no length, use the end of the range.*/
- else if(range_last>=0)range_length=range_last+1;
- /*Make sure the Content-Length and Content-Range headers match.*/
- if(content_length>=0&&OP_UNLIKELY(content_length!=range_length)){
- return OP_FALSE;
- }
- }
- else if(strcmp(header,"connection")==0){
- /*According to RFC 2616, if an HTTP/1.1 application does not support
- pipelining, it "MUST include the 'close' connection option in
- every message."
- Therefore, if we receive one in the initial response, disable
- pipelining entirely.
- The server still might support it (e.g., we might just have hit the
- request limit for a temporary child process), but if it doesn't
- and we assume it does, every time we cross a chunk boundary we'll
- error out and reconnect, adding lots of latency.*/
- ret=op_http_parse_connection(cdr);
- if(OP_UNLIKELY(ret<0))return ret;
- pipeline_disabled|=ret;
- }
- else if(strcmp(header,"server")==0){
- /*If we got a Server response header, and it wasn't from a known-bad
- server, enable pipelining, as long as it's at least HTTP/1.1.
- According to RFC 2145, the server is supposed to respond with the
- highest minor version number it supports unless it is known or
- suspected that we incorrectly implement the HTTP specification.
- So it should send back at least HTTP/1.1, despite our HTTP/1.0
- request.*/
- pipeline_supported=v1_1_compat;
- if(v1_1_compat)pipeline_disabled|=!op_http_allow_pipelining(cdr);
- if(_info!=NULL&&_info->server==NULL)_info->server=op_string_dup(cdr);
- }
- /*Collect station information headers if the caller requested it.
- If there's more than one copy of a header, the first one wins.*/
- else if(_info!=NULL){
- if(strcmp(header,"content-type")==0){
- if(_info->content_type==NULL){
- _info->content_type=op_string_dup(cdr);
- }
- }
- else if(header[0]=='i'&&header[1]=='c'
- &&(header[2]=='e'||header[2]=='y')&&header[3]=='-'){
- if(strcmp(header+4,"name")==0){
- if(_info->name==NULL)_info->name=op_string_dup(cdr);
- }
- else if(strcmp(header+4,"description")==0){
- if(_info->description==NULL)_info->description=op_string_dup(cdr);
- }
- else if(strcmp(header+4,"genre")==0){
- if(_info->genre==NULL)_info->genre=op_string_dup(cdr);
- }
- else if(strcmp(header+4,"url")==0){
- if(_info->url==NULL)_info->url=op_string_dup(cdr);
- }
- else if(strcmp(header,"icy-br")==0
- ||strcmp(header,"ice-bitrate")==0){
- if(_info->bitrate_kbps<0){
- opus_int64 bitrate_kbps;
- /*Just re-using this function to parse a random unsigned
- integer field.*/
- bitrate_kbps=op_http_parse_content_length(cdr);
- if(bitrate_kbps>=0&&bitrate_kbps<=OP_INT32_MAX){
- _info->bitrate_kbps=(opus_int32)bitrate_kbps;
- }
- }
- }
- else if(strcmp(header,"icy-pub")==0
- ||strcmp(header,"ice-public")==0){
- if(_info->is_public<0&&(cdr[0]=='0'||cdr[0]=='1')&&cdr[1]=='\0'){
- _info->is_public=cdr[0]-'0';
- }
- }
- }
- }
- }
- switch(status_code[2]){
- /*200 OK*/
- case '0':break;
- /*203 Non-Authoritative Information*/
- case '3':break;
- /*204 No Content*/
- case '4':{
- if(content_length>=0&&OP_UNLIKELY(content_length!=0)){
- return OP_FALSE;
- }
- }break;
- /*206 Partial Content*/
- case '6':{
- /*No Content-Range header.*/
- if(OP_UNLIKELY(range_length<0))return OP_FALSE;
- content_length=range_length;
- /*The server supports range requests for this resource.
- We can seek.*/
- _stream->seekable=1;
- }break;
- /*201 Created: the response "SHOULD include an entity containing a list
- of resource characteristics and location(s)," but not an Opus file.
- 202 Accepted: the response "SHOULD include an indication of request's
- current status and either a pointer to a status monitor or some
- estimate of when the user can expect the request to be fulfilled,"
- but not an Opus file.
- 205 Reset Content: this "MUST NOT include an entity," meaning no Opus
- file.
- 207...209 are not yet defined, so we don't know how to handle them.*/
- default:return OP_FALSE;
- }
- _stream->content_length=content_length;
- _stream->pipeline=pipeline_supported&&!pipeline_disabled;
- /*Pipelining requires HTTP/1.1 persistent connections.*/
- if(_stream->pipeline)_stream->request.buf[minor_version_pos]='1';
- _stream->conns[0].pos=0;
- _stream->conns[0].end_pos=_stream->seekable?content_length:-1;
- _stream->conns[0].chunk_size=-1;
- _stream->cur_conni=0;
- _stream->connect_rate=op_time_diff_ms(&end_time,&start_time);
- _stream->connect_rate=OP_MAX(_stream->connect_rate,1);
- if(_info!=NULL)_info->is_ssl=OP_URL_IS_SSL(&_stream->url);
- /*The URL has been successfully opened.*/
- return 0;
- }
- /*Shouldn't get 1xx; 4xx and 5xx are both failures (and we don't retry).
- Everything else is undefined.*/
- else if(status_code[0]!='3')return OP_FALSE;
- /*We have some form of redirect request.*/
- /*We only understand 30x codes.*/
- if(status_code[1]!='0')return OP_FALSE;
- switch(status_code[2]){
- /*300 Multiple Choices: "If the server has a preferred choice of
- representation, it SHOULD include the specific URI for that
- representation in the Location field," otherwise we'll fail.*/
- case '0':
- /*301 Moved Permanently*/
- case '1':
- /*302 Found*/
- case '2':
- /*307 Temporary Redirect*/
- case '7':
- /*308 Permanent Redirect (defined by draft-reschke-http-status-308-07).*/
- case '8':break;
- /*305 Use Proxy: "The Location field gives the URI of the proxy."
- TODO: This shouldn't actually be that hard to do.*/
- case '5':return OP_EIMPL;
- /*303 See Other: "The new URI is not a substitute reference for the
- originally requested resource."
- 304 Not Modified: "The 304 response MUST NOT contain a message-body."
- 306 (Unused)
- 309 is not yet defined, so we don't know how to handle it.*/
- default:return OP_FALSE;
- }
- _url=NULL;
- for(;;){
- char *header;
- char *cdr;
- ret=op_http_get_next_header(&header,&cdr,&next);
- if(OP_UNLIKELY(ret<0))return ret;
- if(header==NULL)break;
- if(strcmp(header,"location")==0&&OP_LIKELY(_url==NULL))_url=cdr;
- }
- if(OP_UNLIKELY(_url==NULL))return OP_FALSE;
- ret=op_parse_url(&next_url,_url);
- if(OP_UNLIKELY(ret<0))return ret;
- if(_proxy_host==NULL||_stream->ssl_session!=NULL){
- if(strcmp(_stream->url.host,next_url.host)==0
- &&_stream->url.port==next_url.port){
- /*Try to skip re-resolve when connecting to the same host.*/
- addrs=&_stream->addr_info;
- }
- else{
- if(_stream->ssl_session!=NULL){
- /*Forget any cached SSL session from the last host.*/
- SSL_SESSION_free(_stream->ssl_session);
- _stream->ssl_session=NULL;
- }
- }
- }
- if(_proxy_host==NULL){
- OP_ASSERT(_stream->connect_host==_stream->url.host);
- _stream->connect_host=next_url.host;
- _stream->connect_port=next_url.port;
- }
- /*Always try to skip re-resolve for proxy connections.*/
- else addrs=&_stream->addr_info;
- op_parsed_url_clear(&_stream->url);
- *&_stream->url=*&next_url;
- /*TODO: On servers/proxies that support pipelining, we might be able to
- re-use this connection.*/
- op_http_conn_close(_stream,_stream->conns+0,&_stream->lru_head,1);
- }
- /*Redirection limit reached.*/
- return OP_FALSE;
-}
-
-static int op_http_conn_send_request(OpusHTTPStream *_stream,
- OpusHTTPConn *_conn,opus_int64 _pos,opus_int32 _chunk_size,
- int _try_not_to_block){
- opus_int64 next_end;
- int ret;
- /*We shouldn't have another request outstanding.*/
- OP_ASSERT(_conn->next_pos<0);
- /*Build the request to send.*/
- OP_ASSERT(_stream->request.nbuf>=_stream->request_tail);
- _stream->request.nbuf=_stream->request_tail;
- ret=op_sb_append_nonnegative_int64(&_stream->request,_pos);
- ret|=op_sb_append(&_stream->request,"-",1);
- if(_chunk_size>0&&OP_ADV_OFFSET(_pos,2*_chunk_size)<_stream->content_length){
- /*We shouldn't be pipelining requests with non-HTTP/1.1 servers.*/
- OP_ASSERT(_stream->pipeline);
- next_end=_pos+_chunk_size;
- ret|=op_sb_append_nonnegative_int64(&_stream->request,next_end-1);
- /*Use a larger chunk size for our next request.*/
- _chunk_size<<=1;
- /*But after a while, just request the rest of the resource.*/
- if(_chunk_size>OP_PIPELINE_CHUNK_SIZE_MAX)_chunk_size=-1;
- }
- else{
- /*Either this was a non-pipelined request or we were close enough to the
- end to just ask for the rest.*/
- next_end=-1;
- _chunk_size=-1;
- }
- ret|=op_sb_append(&_stream->request,"\r\n\r\n",4);
- if(OP_UNLIKELY(ret<0))return ret;
- /*If we don't want to block, check to see if there's enough space in the send
- queue.
- There's still a chance we might block, even if there is enough space, but
- it's a much slimmer one.
- Blocking at all is pretty unlikely, as we won't have any requests queued
- when _try_not_to_block is set, so if FIONSPACE isn't available (e.g., on
- Linux), just skip the test.*/
- if(_try_not_to_block){
-# if defined(FIONSPACE)
- int available;
- ret=ioctl(_conn->fd,FIONSPACE,&available);
- if(ret<0||available<_stream->request.nbuf)return 1;
-# endif
- }
- ret=op_http_conn_write_fully(_conn,
- _stream->request.buf,_stream->request.nbuf);
- if(OP_UNLIKELY(ret<0))return ret;
- _conn->next_pos=_pos;
- _conn->next_end=next_end;
- /*Save the chunk size to use for the next request.*/
- _conn->chunk_size=_chunk_size;
- _conn->nrequests_left--;
- return ret;
-}
-
-/*Handles the response to all requests after the first one.
- Return: 1 if the connection was closed or timed out, 0 on success, or a
- negative value on any other error.*/
-static int op_http_conn_handle_response(OpusHTTPStream *_stream,
- OpusHTTPConn *_conn){
- char *next;
- char *status_code;
- opus_int64 range_length;
- opus_int64 next_pos;
- opus_int64 next_end;
- int ret;
- ret=op_http_conn_read_response(_conn,&_stream->response);
- /*If the server just closed the connection on us, we may have just hit a
- connection re-use limit, so we might want to retry.*/
- if(OP_UNLIKELY(ret<0))return ret==OP_EREAD?1:ret;
- next=op_http_parse_status_line(NULL,&status_code,_stream->response.buf);
- if(OP_UNLIKELY(next==NULL))return OP_FALSE;
- /*We _need_ a 206 Partial Content response.
- Nothing else will do.*/
- if(strncmp(status_code,"206",3)!=0){
- /*But on a 408 Request Timeout, we might want to re-try.*/
- return strncmp(status_code,"408",3)==0?1:OP_FALSE;
- }
- next_pos=_conn->next_pos;
- next_end=_conn->next_end;
- range_length=-1;
- for(;;){
- char *header;
- char *cdr;
- ret=op_http_get_next_header(&header,&cdr,&next);
- if(OP_UNLIKELY(ret<0))return ret;
- if(header==NULL)break;
- if(strcmp(header,"content-range")==0){
- opus_int64 range_first;
- opus_int64 range_last;
- /*Two Content-Range headers?*/
- if(OP_UNLIKELY(range_length>=0))return OP_FALSE;
- ret=op_http_parse_content_range(&range_first,&range_last,
- &range_length,cdr);
- if(OP_UNLIKELY(ret<0))return ret;
- /*"A response with satus code 206 (Partial Content) MUST NOT
- include a Content-Range field with a byte-range-resp-spec of
- '*'."*/
- if(OP_UNLIKELY(range_first<0)||OP_UNLIKELY(range_last<0))return OP_FALSE;
- /*We also don't want range_last to overflow.*/
- if(OP_UNLIKELY(range_last>=OP_INT64_MAX))return OP_FALSE;
- range_last++;
- /*Quit if we didn't get the offset we asked for.*/
- if(range_first!=next_pos)return OP_FALSE;
- if(next_end<0){
- /*We asked for the rest of the resource.*/
- if(range_length>=0){
- /*Quit if we didn't get it.*/
- if(OP_UNLIKELY(range_last!=range_length))return OP_FALSE;
- }
- /*If there was no length, use the end of the range.*/
- else range_length=range_last;
- next_end=range_last;
- }
- else{
- if(range_last!=next_end)return OP_FALSE;
- /*If there was no length, use the larger of the content length or the
- end of this chunk.*/
- if(range_length<0){
- range_length=OP_MAX(range_last,_stream->content_length);
- }
- }
- }
- else if(strcmp(header,"content-length")==0){
- opus_int64 content_length;
- /*Validate the Content-Length header, if present, against the request we
- made.*/
- content_length=op_http_parse_content_length(cdr);
- if(OP_UNLIKELY(content_length<0))return (int)content_length;
- if(next_end<0){
- /*If we haven't seen the Content-Range header yet and we asked for the
- rest of the resource, set next_end, so we can make sure they match
- when we do find the Content-Range header.*/
- if(OP_UNLIKELY(next_pos>OP_INT64_MAX-content_length))return OP_FALSE;
- next_end=next_pos+content_length;
- }
- /*Otherwise, make sure they match now.*/
- else if(OP_UNLIKELY(next_end-next_pos!=content_length))return OP_FALSE;
- }
- else if(strcmp(header,"connection")==0){
- ret=op_http_parse_connection(cdr);
- if(OP_UNLIKELY(ret<0))return ret;
- /*If the server told us it was going to close the connection, don't make
- any more requests.*/
- if(OP_UNLIKELY(ret>0))_conn->nrequests_left=0;
- }
- }
- /*No Content-Range header.*/
- if(OP_UNLIKELY(range_length<0))return OP_FALSE;
- /*Update the content_length if necessary.*/
- _stream->content_length=range_length;
- _conn->pos=next_pos;
- _conn->end_pos=next_end;
- _conn->next_pos=-1;
- return 0;
-}
-
-/*Open a new connection that will start reading at byte offset _pos.
- _pos: The byte offset to start reading from.
- _chunk_size: The number of bytes to ask for in the initial request, or -1 to
- request the rest of the resource.
- This may be more bytes than remain, in which case it will be
- converted into a request for the rest.*/
-static int op_http_conn_open_pos(OpusHTTPStream *_stream,
- OpusHTTPConn *_conn,opus_int64 _pos,opus_int32 _chunk_size){
- struct timeb start_time;
- struct timeb end_time;
- opus_int32 connect_rate;
- opus_int32 connect_time;
- int ret;
- ret=op_http_connect(_stream,_conn,&_stream->addr_info,&start_time);
- if(OP_UNLIKELY(ret<0))return ret;
- ret=op_http_conn_send_request(_stream,_conn,_pos,_chunk_size,0);
- if(OP_UNLIKELY(ret<0))return ret;
- ret=op_http_conn_handle_response(_stream,_conn);
- if(OP_UNLIKELY(ret!=0))return OP_FALSE;
- ftime(&end_time);
- _stream->cur_conni=_conn-_stream->conns;
- OP_ASSERT(_stream->cur_conni>=0&&_stream->cur_conni<OP_NCONNS_MAX);
- /*The connection has been successfully opened.
- Update the connection time estimate.*/
- connect_time=op_time_diff_ms(&end_time,&start_time);
- connect_rate=_stream->connect_rate;
- connect_rate+=OP_MAX(connect_time,1)-connect_rate+8>>4;
- _stream->connect_rate=connect_rate;
- return 0;
-}
-
-/*Read data from the current response body.
- If we're pipelining and we get close to the end of this response, queue
- another request.
- If we've reached the end of this response body, parse the next response and
- keep going.
- [out] _buf: Returns the data read.
- _buf_size: The size of the buffer.
- Return: A positive number of bytes read on success.
- 0: The connection was closed.
- OP_EREAD: There was a fatal read error.*/
-static int op_http_conn_read_body(OpusHTTPStream *_stream,
- OpusHTTPConn *_conn,unsigned char *_buf,int _buf_size){
- opus_int64 pos;
- opus_int64 end_pos;
- opus_int64 next_pos;
- opus_int64 content_length;
- int nread;
- int pipeline;
- int ret;
- /*Currently this function can only be called on the LRU head.
- Otherwise, we'd need a _pnext pointer if we needed to close the connection,
- and re-opening it would re-organize the lists.*/
- OP_ASSERT(_stream->lru_head==_conn);
- /*We should have filtered out empty reads by this point.*/
- OP_ASSERT(_buf_size>0);
- pos=_conn->pos;
- end_pos=_conn->end_pos;
- next_pos=_conn->next_pos;
- pipeline=_stream->pipeline;
- content_length=_stream->content_length;
- if(end_pos>=0){
- /*Have we reached the end of the current response body?*/
- if(pos>=end_pos){
- OP_ASSERT(content_length>=0);
- /*If this was the end of the stream, we're done.
- Also return early if a non-blocking read was requested (regardless of
- whether we might be able to parse the next response without
- blocking).*/
- if(content_length<=end_pos)return 0;
- /*Otherwise, start on the next response.*/
- if(next_pos<0){
- /*We haven't issued another request yet.*/
- if(!pipeline||_conn->nrequests_left<=0){
- /*There are two ways to get here: either the server told us it was
- going to close the connection after the last request, or we
- thought we were reading the whole resource, but it grew while we
- were reading it.
- The only way the latter could have happened is if content_length
- changed while seeking.
- Open a new request to read the rest.*/
- OP_ASSERT(_stream->seekable);
- /*Try to open a new connection to read another chunk.*/
- op_http_conn_close(_stream,_conn,&_stream->lru_head,1);
- /*If we're not pipelining, we should be requesting the rest.*/
- OP_ASSERT(pipeline||_conn->chunk_size==-1);
- ret=op_http_conn_open_pos(_stream,_conn,end_pos,_conn->chunk_size);
- if(OP_UNLIKELY(ret<0))return OP_EREAD;
- }
- else{
- /*Issue the request now (better late than never).*/
- ret=op_http_conn_send_request(_stream,_conn,pos,_conn->chunk_size,0);
- if(OP_UNLIKELY(ret<0))return OP_EREAD;
- next_pos=_conn->next_pos;
- OP_ASSERT(next_pos>=0);
- }
- }
- if(next_pos>=0){
- /*We shouldn't be trying to read past the current request body if we're
- seeking somewhere else.*/
- OP_ASSERT(next_pos==end_pos);
- ret=op_http_conn_handle_response(_stream,_conn);
- if(OP_UNLIKELY(ret<0))return OP_EREAD;
- if(OP_UNLIKELY(ret>0)&&pipeline){
- opus_int64 next_end;
- next_end=_conn->next_end;
- /*Our request timed out or the server closed the connection.
- Try re-connecting.*/
- op_http_conn_close(_stream,_conn,&_stream->lru_head,1);
- /*Unless there's a bug, we should be able to convert
- (next_pos,next_end) into valid (_pos,_chunk_size) parameters.*/
- OP_ASSERT(next_end<0
- ||next_end-next_pos>=0&&next_end-next_pos<=OP_INT32_MAX);
- ret=op_http_conn_open_pos(_stream,_conn,next_pos,
- next_end<0?-1:(opus_int32)(next_end-next_pos));
- if(OP_UNLIKELY(ret<0))return OP_EREAD;
- }
- else if(OP_UNLIKELY(ret!=0))return OP_EREAD;
- }
- pos=_conn->pos;
- end_pos=_conn->end_pos;
- content_length=_stream->content_length;
- }
- OP_ASSERT(end_pos>pos);
- _buf_size=OP_MIN(_buf_size,end_pos-pos);
- }
- nread=op_http_conn_read(_conn,(char *)_buf,_buf_size,1);
- if(OP_UNLIKELY(nread<0))return nread;
- pos+=nread;
- _conn->pos=pos;
- OP_ASSERT(end_pos<0||content_length>=0);
- /*TODO: If nrequests_left<=0, we can't make a new request, and there will be
- a big pause after we hit the end of the chunk while we open a new
- connection.
- It would be nice to be able to start that process now, but we have no way
- to do it in the background without blocking (even if we could start it, we
- have no guarantee the application will return control to us in a
- sufficiently timely manner to allow us to complete it, and this is
- uncommon enough that it's not worth using threads just for this).*/
- if(end_pos>=0&&end_pos<content_length&&next_pos<0
- &&pipeline&&OP_LIKELY(_conn->nrequests_left>0)){
- opus_int64 request_thresh;
- opus_int32 chunk_size;
- /*Are we getting close to the end of the current response body?
- If so, we should request more data.*/
- request_thresh=_stream->connect_rate*_conn->read_rate>>12;
- /*But don't commit ourselves too quickly.*/
- chunk_size=_conn->chunk_size;
- if(chunk_size>=0)request_thresh=OP_MIN(chunk_size>>2,request_thresh);
- if(end_pos-pos<request_thresh){
- ret=op_http_conn_send_request(_stream,_conn,end_pos,_conn->chunk_size,1);
- if(OP_UNLIKELY(ret<0))return OP_EREAD;
- }
- }
- return nread;
-}
-
-static int op_http_stream_read(void *_stream,
- unsigned char *_ptr,int _buf_size){
- OpusHTTPStream *stream;
- ptrdiff_t nread;
- opus_int64 size;
- opus_int64 pos;
- int ci;
- stream=(OpusHTTPStream *)_stream;
- /*Check for an empty read.*/
- if(_buf_size<=0)return 0;
- ci=stream->cur_conni;
- /*No current connection => EOF.*/
- if(ci<0)return 0;
- pos=stream->conns[ci].pos;
- size=stream->content_length;
- /*Check for EOF.*/
- if(size>=0){
- if(pos>=size)return 0;
- /*Check for a short read.*/
- if(_buf_size>size-pos)_buf_size=(int)(size-pos);
- }
- nread=op_http_conn_read_body(stream,stream->conns+ci,_ptr,_buf_size);
- if(OP_UNLIKELY(nread<=0)){
- /*We hit an error or EOF.
- Either way, we're done with this connection.*/
- op_http_conn_close(stream,stream->conns+ci,&stream->lru_head,1);
- stream->cur_conni=-1;
- stream->pos=pos;
- }
- return nread;
-}
-
-/*Discard data until we reach the _target position.
- This destroys the contents of _stream->response.buf, as we need somewhere to
- read this data, and that is a convenient place.
- _just_read_ahead: Whether or not this is a plain fast-forward.
- If 0, we need to issue a new request for a chunk at _target
- and discard all the data from our current request(s).
- Otherwise, we should be able to reach _target without
- issuing any new requests.
- _target: The stream position to which to read ahead.*/
-static int op_http_conn_read_ahead(OpusHTTPStream *_stream,
- OpusHTTPConn *_conn,int _just_read_ahead,opus_int64 _target){
- opus_int64 pos;
- opus_int64 end_pos;
- opus_int64 next_pos;
- opus_int64 next_end;
- ptrdiff_t nread;
- int ret;
- pos=_conn->pos;
- end_pos=_conn->end_pos;
- next_pos=_conn->next_pos;
- next_end=_conn->next_end;
- if(!_just_read_ahead){
- /*We need to issue a new pipelined request.
- This is the only case where we allow more than one outstanding request
- at a time, so we need to reset next_pos (we'll restore it below if we
- did have an outstanding request).*/
- OP_ASSERT(_stream->pipeline);
- _conn->next_pos=-1;
- ret=op_http_conn_send_request(_stream,_conn,_target,
- OP_PIPELINE_CHUNK_SIZE,0);
- if(OP_UNLIKELY(ret<0))return ret;
- }
- /*We can reach the target position by reading forward in the current chunk.*/
- if(_just_read_ahead&&(end_pos<0||_target<end_pos))end_pos=_target;
- else if(next_pos>=0){
- opus_int64 next_next_pos;
- opus_int64 next_next_end;
- /*We already have a request outstanding.
- Finish off the current chunk.*/
- while(pos<end_pos){
- nread=op_http_conn_read(_conn,_stream->response.buf,
- (int)OP_MIN(end_pos-pos,_stream->response.cbuf),1);
- /*We failed to read ahead.*/
- if(nread<=0)return OP_FALSE;
- pos+=nread;
- }
- OP_ASSERT(pos==end_pos);
- if(_just_read_ahead){
- next_next_pos=next_next_end=-1;
- end_pos=_target;
- }
- else{
- OP_ASSERT(_conn->next_pos==_target);
- next_next_pos=_target;
- next_next_end=_conn->next_end;
- _conn->next_pos=next_pos;
- _conn->next_end=next_end;
- end_pos=next_end;
- }
- ret=op_http_conn_handle_response(_stream,_conn);
- if(OP_UNLIKELY(ret!=0))return OP_FALSE;
- _conn->next_pos=next_next_pos;
- _conn->next_end=next_next_end;
- }
- while(pos<end_pos){
- nread=op_http_conn_read(_conn,_stream->response.buf,
- (int)OP_MIN(end_pos-pos,_stream->response.cbuf),1);
- /*We failed to read ahead.*/
- if(nread<=0)return OP_FALSE;
- pos+=nread;
- }
- OP_ASSERT(pos==end_pos);
- if(!_just_read_ahead){
- ret=op_http_conn_handle_response(_stream,_conn);
- if(OP_UNLIKELY(ret!=0))return OP_FALSE;
- }
- else _conn->pos=end_pos;
- OP_ASSERT(_conn->pos==_target);
- return 0;
-}
-
-static int op_http_stream_seek(void *_stream,opus_int64 _offset,int _whence){
- struct timeb seek_time;
- OpusHTTPStream *stream;
- OpusHTTPConn *conn;
- OpusHTTPConn **pnext;
- OpusHTTPConn *close_conn;
- OpusHTTPConn **close_pnext;
- opus_int64 content_length;
- opus_int64 pos;
- int pipeline;
- int ci;
- int ret;
- stream=(OpusHTTPStream *)_stream;
- if(!stream->seekable)return -1;
- content_length=stream->content_length;
- /*If we're seekable, we should have gotten a Content-Length.*/
- OP_ASSERT(content_length>=0);
- ci=stream->cur_conni;
- pos=ci<0?content_length:stream->conns[ci].pos;
- switch(_whence){
- case SEEK_SET:{
- /*Check for overflow:*/
- if(_offset<0)return -1;
- pos=_offset;
- }break;
- case SEEK_CUR:{
- /*Check for overflow:*/
- if(_offset<-pos||_offset>OP_INT64_MAX-pos)return -1;
- pos+=_offset;
- }break;
- case SEEK_END:{
- /*Check for overflow:*/
- if(_offset>content_length||_offset<content_length-OP_INT64_MAX)return -1;
- pos=content_length-_offset;
- }break;
- default:return -1;
- }
- /*Mark when we deactivated the active connection.*/
- if(ci>=0){
- op_http_conn_read_rate_update(stream->conns+ci);
- *&seek_time=*&stream->conns[ci].read_time;
- }
- else ftime(&seek_time);
- /*If we seeked past the end of the stream, just disable the active
- connection.*/
- if(pos>=content_length){
- stream->cur_conni=-1;
- stream->pos=pos;
- return 0;
- }
- /*First try to find a connection we can use without waiting.*/
- pnext=&stream->lru_head;
- conn=stream->lru_head;
- while(conn!=NULL){
- opus_int64 conn_pos;
- opus_int64 end_pos;
- int available;
- /*If this connection has been dormant too long or has made too many
- requests, close it.
- This is to prevent us from hitting server limits/firewall timeouts.*/
- if(op_time_diff_ms(&seek_time,&conn->read_time)>
- OP_CONNECTION_IDLE_TIMEOUT_MS
- ||conn->nrequests_left<OP_PIPELINE_MIN_REQUESTS){
- op_http_conn_close(stream,conn,pnext,1);
- conn=*pnext;
- continue;
- }
- available=op_http_conn_estimate_available(conn);
- conn_pos=conn->pos;
- end_pos=conn->end_pos;
- if(conn->next_pos>=0){
- OP_ASSERT(end_pos>=0);
- OP_ASSERT(conn->next_pos==end_pos);
- end_pos=conn->next_end;
- }
- OP_ASSERT(end_pos<0||conn_pos<=end_pos);
- /*Can we quickly read ahead without issuing a new request or waiting for
- any more data?
- If we have an oustanding request, we'll over-estimate the amount of data
- it has available (because we'll count the response headers, too), but
- that probably doesn't matter.*/
- if(conn_pos<=pos&&pos-conn_pos<=available&&(end_pos<0||pos<end_pos)){
- /*Found a suitable connection to re-use.*/
- ret=op_http_conn_read_ahead(stream,conn,1,pos);
- if(OP_UNLIKELY(ret<0)){
- /*The connection might have become stale, so close it and keep going.*/
- op_http_conn_close(stream,conn,pnext,1);
- conn=*pnext;
- continue;
- }
- /*Sucessfully resurrected this connection.*/
- *pnext=conn->next;
- conn->next=stream->lru_head;
- stream->lru_head=conn;
- stream->cur_conni=conn-stream->conns;
- return 0;
- }
- pnext=&conn->next;
- conn=conn->next;
- }
- /*Chances are that didn't work, so now try to find one we can use by reading
- ahead a reasonable amount and/or by issuing a new request.*/
- close_pnext=NULL;
- close_conn=NULL;
- pnext=&stream->lru_head;
- conn=stream->lru_head;
- pipeline=stream->pipeline;
- while(conn!=NULL){
- opus_int64 conn_pos;
- opus_int64 end_pos;
- opus_int64 read_ahead_thresh;
- int available;
- int just_read_ahead;
- /*Dividing by 2048 instead of 1000 scales this by nearly 1/2, biasing away
- from connection re-use (and roughly compensating for the lag required to
- reopen the TCP window of a connection that's been idle).
- There's no overflow checking here, because it's vanishingly unlikely, and
- all it would do is cause us to make poor decisions.*/
- read_ahead_thresh=OP_MAX(OP_READAHEAD_THRESH_MIN,
- stream->connect_rate*conn->read_rate>>11);
- available=op_http_conn_estimate_available(conn);
- conn_pos=conn->pos;
- end_pos=conn->end_pos;
- if(conn->next_pos>=0){
- OP_ASSERT(end_pos>=0);
- OP_ASSERT(conn->next_pos==end_pos);
- end_pos=conn->next_end;
- }
- OP_ASSERT(end_pos<0||conn_pos<=end_pos);
- /*Can we quickly read ahead without issuing a new request?*/
- just_read_ahead=conn_pos<=pos&&pos-conn_pos-available<=read_ahead_thresh
- &&(end_pos<0||pos<end_pos);
- if(just_read_ahead||pipeline&&end_pos>=0
- &&end_pos-conn_pos-available<=read_ahead_thresh){
- /*Found a suitable connection to re-use.*/
- ret=op_http_conn_read_ahead(stream,conn,just_read_ahead,pos);
- if(OP_UNLIKELY(ret<0)){
- /*The connection might have become stale, so close it and keep going.*/
- op_http_conn_close(stream,conn,pnext,1);
- conn=*pnext;
- continue;
- }
- /*Sucessfully resurrected this connection.*/
- *pnext=conn->next;
- conn->next=stream->lru_head;
- stream->lru_head=conn;
- stream->cur_conni=conn-stream->conns;
- return 0;
- }
- close_pnext=pnext;
- close_conn=conn;
- pnext=&conn->next;
- conn=conn->next;
- }
- /*No suitable connections.
- Open a new one.*/
- if(stream->free_head==NULL){
- /*All connections in use.
- Expire one of them (we should have already picked which one when scanning
- the list).*/
- OP_ASSERT(close_conn!=NULL);
- OP_ASSERT(close_pnext!=NULL);
- op_http_conn_close(stream,close_conn,close_pnext,1);
- }
- OP_ASSERT(stream->free_head!=NULL);
- conn=stream->free_head;
- /*If we can pipeline, only request a chunk of data.
- If we're seeking now, there's a good chance we will want to seek again
- soon, and this avoids committing this connection to reading the rest of
- the stream.
- Particularly with SSL or proxies, issuing a new request on the same
- connection can be substantially faster than opening a new one.
- This also limits the amount of data the server will blast at us on this
- connection if we later seek elsewhere and start reading from a different
- connection.*/
- ret=op_http_conn_open_pos(stream,conn,pos,
- pipeline?OP_PIPELINE_CHUNK_SIZE:-1);
- if(OP_UNLIKELY(ret<0)){
- op_http_conn_close(stream,conn,&stream->lru_head,1);
- return -1;
- }
- return 0;
-}
-
-static opus_int64 op_http_stream_tell(void *_stream){
- OpusHTTPStream *stream;
- int ci;
- stream=(OpusHTTPStream *)_stream;
- ci=stream->cur_conni;
- return ci<0?stream->pos:stream->conns[ci].pos;
-}
-
-static int op_http_stream_close(void *_stream){
- OpusHTTPStream *stream;
- stream=(OpusHTTPStream *)_stream;
- if(OP_LIKELY(stream!=NULL)){
- op_http_stream_clear(stream);
- _ogg_free(stream);
- }
- return 0;
-}
-
-static const OpusFileCallbacks OP_HTTP_CALLBACKS={
- op_http_stream_read,
- op_http_stream_seek,
- op_http_stream_tell,
- op_http_stream_close
-};
-#endif
-
-void opus_server_info_init(OpusServerInfo *_info){
- _info->name=NULL;
- _info->description=NULL;
- _info->genre=NULL;
- _info->url=NULL;
- _info->server=NULL;
- _info->content_type=NULL;
- _info->bitrate_kbps=-1;
- _info->is_public=-1;
- _info->is_ssl=0;
-}
-
-void opus_server_info_clear(OpusServerInfo *_info){
- _ogg_free(_info->content_type);
- _ogg_free(_info->server);
- _ogg_free(_info->url);
- _ogg_free(_info->genre);
- _ogg_free(_info->description);
- _ogg_free(_info->name);
-}
-
-/*The actual URL stream creation function.
- This one isn't extensible like the application-level interface, but because
- it isn't public, we're free to change it in the future.*/
-static void *op_url_stream_create_impl(OpusFileCallbacks *_cb,const char *_url,
- int _skip_certificate_check,const char *_proxy_host,unsigned _proxy_port,
- const char *_proxy_user,const char *_proxy_pass,OpusServerInfo *_info){
- const char *path;
- /*Check to see if this is a valid file: URL.*/
- path=op_parse_file_url(_url);
- if(path!=NULL){
- char *unescaped_path;
- void *ret;
- unescaped_path=op_string_dup(path);
- if(OP_UNLIKELY(unescaped_path==NULL))return NULL;
- ret=op_fopen(_cb,op_unescape_url_component(unescaped_path),"rb");
- _ogg_free(unescaped_path);
- return ret;
- }
-#if defined(OP_ENABLE_HTTP)
- /*If not, try http/https.*/
- else{
- OpusHTTPStream *stream;
- int ret;
- stream=(OpusHTTPStream *)_ogg_malloc(sizeof(*stream));
- if(OP_UNLIKELY(stream==NULL))return NULL;
- op_http_stream_init(stream);
- ret=op_http_stream_open(stream,_url,_skip_certificate_check,
- _proxy_host,_proxy_port,_proxy_user,_proxy_pass,_info);
- if(OP_UNLIKELY(ret<0)){
- op_http_stream_clear(stream);
- _ogg_free(stream);
- return NULL;
- }
- *_cb=*&OP_HTTP_CALLBACKS;
- return stream;
- }
-#else
- (void)_skip_certificate_check;
- (void)_proxy_host;
- (void)_proxy_port;
- (void)_proxy_user;
- (void)_proxy_pass;
- (void)_info;
- return NULL;
-#endif
-}
-
-/*The actual implementation of op_url_stream_vcreate().
- We have to do a careful dance here to avoid potential memory leaks if
- OpusServerInfo is requested, since this function is also used by
- op_vopen_url() and op_vtest_url().
- Even if this function succeeds, those functions might ultimately fail.
- If they do, they should return without having touched the OpusServerInfo
- passed by the application.
- Therefore, if this function succeeds and OpusServerInfo is requested, the
- actual info will be stored in *_info and a pointer to the application's
- storage will be placed in *_pinfo.
- If this function fails or if the application did not request OpusServerInfo,
- *_pinfo will be NULL.
- Our caller is responsible for copying *_info to **_pinfo if it ultimately
- succeeds, or for clearing *_info if it ultimately fails.*/
-void *op_url_stream_vcreate_impl(OpusFileCallbacks *_cb,
- const char *_url,OpusServerInfo *_info,OpusServerInfo **_pinfo,va_list _ap){
- int skip_certificate_check;
- const char *proxy_host;
- opus_int32 proxy_port;
- const char *proxy_user;
- const char *proxy_pass;
- OpusServerInfo *pinfo;
- skip_certificate_check=0;
- proxy_host=NULL;
- proxy_port=8080;
- proxy_user=NULL;
- proxy_pass=NULL;
- pinfo=NULL;
- for(;;){
- ptrdiff_t request;
- request=va_arg(_ap,char *)-(char *)NULL;
- /*If we hit NULL, we're done processing options.*/
- if(!request)break;
- switch(request){
- case OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST:{
- skip_certificate_check=!!va_arg(_ap,opus_int32);
- }break;
- case OP_HTTP_PROXY_HOST_REQUEST:{
- proxy_host=va_arg(_ap,const char *);
- }break;
- case OP_HTTP_PROXY_PORT_REQUEST:{
- proxy_port=va_arg(_ap,opus_int32);
- if(proxy_port<0||proxy_port>(opus_int32)65535)return NULL;
- }break;
- case OP_HTTP_PROXY_USER_REQUEST:{
- proxy_user=va_arg(_ap,const char *);
- }break;
- case OP_HTTP_PROXY_PASS_REQUEST:{
- proxy_pass=va_arg(_ap,const char *);
- }break;
- case OP_GET_SERVER_INFO_REQUEST:{
- pinfo=va_arg(_ap,OpusServerInfo *);
- }break;
- /*Some unknown option.*/
- default:return NULL;
- }
- }
- /*If the caller has requested server information, proxy it to a local copy to
- simplify error handling.*/
- *_pinfo=NULL;
- if(pinfo!=NULL){
- void *ret;
- opus_server_info_init(_info);
- ret=op_url_stream_create_impl(_cb,_url,skip_certificate_check,
- proxy_host,proxy_port,proxy_user,proxy_pass,_info);
- if(ret!=NULL)*_pinfo=pinfo;
- else opus_server_info_clear(_info);
- return ret;
- }
- return op_url_stream_create_impl(_cb,_url,skip_certificate_check,
- proxy_host,proxy_port,proxy_user,proxy_pass,NULL);
-}
-
-void *op_url_stream_vcreate(OpusFileCallbacks *_cb,
- const char *_url,va_list _ap){
- OpusServerInfo info;
- OpusServerInfo *pinfo;
- void *ret;
- ret=op_url_stream_vcreate_impl(_cb,_url,&info,&pinfo,_ap);
- if(pinfo!=NULL)*pinfo=*&info;
- return ret;
-}
-
-void *op_url_stream_create(OpusFileCallbacks *_cb,
- const char *_url,...){
- va_list ap;
- void *ret;
- va_start(ap,_url);
- ret=op_url_stream_vcreate(_cb,_url,ap);
- va_end(ap);
- return ret;
-}
-
-/*Convenience routines to open/test URLs in a single step.*/
-
-OggOpusFile *op_vopen_url(const char *_url,int *_error,va_list _ap){
- OpusFileCallbacks cb;
- OggOpusFile *of;
- OpusServerInfo info;
- OpusServerInfo *pinfo;
- void *source;
- source=op_url_stream_vcreate_impl(&cb,_url,&info,&pinfo,_ap);
- if(OP_UNLIKELY(source==NULL)){
- OP_ASSERT(pinfo==NULL);
- if(_error!=NULL)*_error=OP_EFAULT;
- return NULL;
- }
- of=op_open_callbacks(source,&cb,NULL,0,_error);
- if(OP_UNLIKELY(of==NULL)){
- if(pinfo!=NULL)opus_server_info_clear(&info);
- (*cb.close)(source);
- }
- else if(pinfo!=NULL)*pinfo=*&info;
- return of;
-}
-
-OggOpusFile *op_open_url(const char *_url,int *_error,...){
- OggOpusFile *ret;
- va_list ap;
- va_start(ap,_error);
- ret=op_vopen_url(_url,_error,ap);
- va_end(ap);
- return ret;
-}
-
-OggOpusFile *op_vtest_url(const char *_url,int *_error,va_list _ap){
- OpusFileCallbacks cb;
- OggOpusFile *of;
- OpusServerInfo info;
- OpusServerInfo *pinfo;
- void *source;
- source=op_url_stream_vcreate_impl(&cb,_url,&info,&pinfo,_ap);
- if(OP_UNLIKELY(source==NULL)){
- OP_ASSERT(pinfo==NULL);
- if(_error!=NULL)*_error=OP_EFAULT;
- return NULL;
- }
- of=op_test_callbacks(source,&cb,NULL,0,_error);
- if(OP_UNLIKELY(of==NULL)){
- if(pinfo!=NULL)opus_server_info_clear(&info);
- (*cb.close)(source);
- }
- else if(pinfo!=NULL)*pinfo=*&info;
- return of;
-}
-
-OggOpusFile *op_test_url(const char *_url,int *_error,...){
- OggOpusFile *ret;
- va_list ap;
- va_start(ap,_error);
- ret=op_vtest_url(_url,_error,ap);
- va_end(ap);
- return ret;
-}
diff --git a/thirdparty/opus/wincerts.c b/thirdparty/opus/wincerts.c
deleted file mode 100644
index b0e35aa352..0000000000
--- a/thirdparty/opus/wincerts.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/********************************************************************
- * *
- * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
- * *
- * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2013 *
- * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
- * *
- ********************************************************************/
-
-/*This should really be part of OpenSSL, but there's been a patch [1] sitting
- in their bugtracker for over two years that implements this, without any
- action, so I'm giving up and re-implementing it locally.
-
- [1] <http://rt.openssl.org/Ticket/Display.html?id=2158>*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "internal.h"
-#if defined(OP_ENABLE_HTTP)&&defined(_WIN32)
-/*You must include windows.h before wincrypt.h and x509.h.*/
-# define WIN32_LEAN_AND_MEAN
-# define WIN32_EXTRA_LEAN
-# include <windows.h>
-/*You must include wincrypt.h before x509.h, too, or X509_NAME doesn't get
- defined properly.*/
-# include <wincrypt.h>
-# include <openssl/ssl.h>
-# include <openssl/err.h>
-# include <openssl/x509.h>
-
-static int op_capi_new(X509_LOOKUP *_lu){
- HCERTSTORE h_store;
- h_store=CertOpenStore(CERT_STORE_PROV_SYSTEM_A,0,0,
- CERT_STORE_OPEN_EXISTING_FLAG|CERT_STORE_READONLY_FLAG|
- CERT_SYSTEM_STORE_CURRENT_USER|CERT_STORE_SHARE_CONTEXT_FLAG,"ROOT");
- if(h_store!=NULL){
- _lu->method_data=(char *)h_store;
- return 1;
- }
- return 0;
-}
-
-static void op_capi_free(X509_LOOKUP *_lu){
- HCERTSTORE h_store;
- h_store=(HCERTSTORE)_lu->method_data;
-# if defined(OP_ENABLE_ASSERTIONS)
- OP_ALWAYS_TRUE(CertCloseStore(h_store,CERT_CLOSE_STORE_CHECK_FLAG));
-# else
- CertCloseStore(h_store,0);
-# endif
-}
-
-static int op_capi_retrieve_by_subject(X509_LOOKUP *_lu,int _type,
- X509_NAME *_name,X509_OBJECT *_ret){
- X509_OBJECT *obj;
- CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
- obj=X509_OBJECT_retrieve_by_subject(_lu->store_ctx->objs,_type,_name);
- CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
- if(obj!=NULL){
- _ret->type=obj->type;
- memcpy(&_ret->data,&obj->data,sizeof(_ret->data));
- return 1;
- }
- return 0;
-}
-
-static int op_capi_get_by_subject(X509_LOOKUP *_lu,int _type,X509_NAME *_name,
- X509_OBJECT *_ret){
- HCERTSTORE h_store;
- if(_name==NULL)return 0;
- if(_name->bytes==NULL||_name->bytes->length<=0||_name->modified){
- if(i2d_X509_NAME(_name,NULL)<0)return 0;
- OP_ASSERT(_name->bytes->length>0);
- }
- h_store=(HCERTSTORE)_lu->method_data;
- switch(_type){
- case X509_LU_X509:{
- CERT_NAME_BLOB find_para;
- PCCERT_CONTEXT cert;
- X509 *x;
- int ret;
- /*Although X509_NAME contains a canon_enc field, that "canonical" [1]
- encoding was just made up by OpenSSL.
- It doesn't correspond to any actual standard, and since it drops the
- initial sequence header, won't be recognized by the Crypto API.
- The assumption here is that CertFindCertificateInStore() will allow any
- appropriate variations in the encoding when it does its comparison.
- This is, however, emphatically not true under Wine, which just compares
- the encodings with memcmp().
- Most of the time things work anyway, though, and there isn't really
- anything we can do to make the situation better.
-
- [1] A "canonical form" is defined as the one where, if you locked 10
- mathematicians in a room and asked them to come up with a
- representation for something, it's the answer that 9 of them would
- give you back.
- I don't think OpenSSL's encoding qualifies.*/
- find_para.cbData=_name->bytes->length;
- find_para.pbData=(unsigned char *)_name->bytes->data;
- cert=CertFindCertificateInStore(h_store,X509_ASN_ENCODING,0,
- CERT_FIND_SUBJECT_NAME,&find_para,NULL);
- if(cert==NULL)return 0;
- x=d2i_X509(NULL,(const unsigned char **)&cert->pbCertEncoded,
- cert->cbCertEncoded);
- CertFreeCertificateContext(cert);
- if(x==NULL)return 0;
- ret=X509_STORE_add_cert(_lu->store_ctx,x);
- X509_free(x);
- if(ret)return op_capi_retrieve_by_subject(_lu,_type,_name,_ret);
- }break;
- case X509_LU_CRL:{
- CERT_INFO cert_info;
- CERT_CONTEXT find_para;
- PCCRL_CONTEXT crl;
- X509_CRL *x;
- int ret;
- ret=op_capi_retrieve_by_subject(_lu,_type,_name,_ret);
- if(ret>0)return ret;
- memset(&cert_info,0,sizeof(cert_info));
- cert_info.Issuer.cbData=_name->bytes->length;
- cert_info.Issuer.pbData=(unsigned char *)_name->bytes->data;
- memset(&find_para,0,sizeof(find_para));
- find_para.pCertInfo=&cert_info;
- crl=CertFindCRLInStore(h_store,0,0,CRL_FIND_ISSUED_BY,&find_para,NULL);
- if(crl==NULL)return 0;
- x=d2i_X509_CRL(NULL,(const unsigned char **)&crl->pbCrlEncoded,
- crl->cbCrlEncoded);
- CertFreeCRLContext(crl);
- if(x==NULL)return 0;
- ret=X509_STORE_add_crl(_lu->store_ctx,x);
- X509_CRL_free(x);
- if(ret)return op_capi_retrieve_by_subject(_lu,_type,_name,_ret);
- }break;
- }
- return 0;
-}
-
-/*This is not const because OpenSSL doesn't allow it, even though it won't
- write to it.*/
-static X509_LOOKUP_METHOD X509_LOOKUP_CAPI={
- "Load Crypto API store into cache",
- op_capi_new,
- op_capi_free,
- NULL,
- NULL,
- NULL,
- op_capi_get_by_subject,
- NULL,
- NULL,
- NULL
-};
-
-int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx){
- X509_STORE *store;
- X509_LOOKUP *lu;
- /*We intentionally do not add the normal default paths, as they are usually
- wrong, and are just asking to be used as an exploit vector.*/
- store=SSL_CTX_get_cert_store(_ssl_ctx);
- OP_ASSERT(store!=NULL);
- lu=X509_STORE_add_lookup(store,&X509_LOOKUP_CAPI);
- if(lu==NULL)return 0;
- ERR_clear_error();
- return 1;
-}
-
-#endif
diff --git a/thirdparty/opus/winerrno.h b/thirdparty/opus/winerrno.h
deleted file mode 100644
index 32a90b4ee1..0000000000
--- a/thirdparty/opus/winerrno.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************
- * *
- * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
- * *
- * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 *
- * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
- * *
- ********************************************************************/
-#if !defined(_opusfile_winerrno_h)
-# define _opusfile_winerrno_h (1)
-
-# include <errno.h>
-# include <winerror.h>
-
-/*These conflict with the MSVC errno.h definitions, but we don't need to use
- the original ones in any file that deals with sockets.
- We could map the WSA errors to the errno.h ones (most of which are only
- available on sufficiently new versions of MSVC), but they aren't ordered the
- same, and given how rarely we actually look at the values, I don't think
- it's worth a lookup table.*/
-# undef EWOULDBLOCK
-# undef EINPROGRESS
-# undef EALREADY
-# undef ENOTSOCK
-# undef EDESTADDRREQ
-# undef EMSGSIZE
-# undef EPROTOTYPE
-# undef ENOPROTOOPT
-# undef EPROTONOSUPPORT
-# undef EOPNOTSUPP
-# undef EAFNOSUPPORT
-# undef EADDRINUSE
-# undef EADDRNOTAVAIL
-# undef ENETDOWN
-# undef ENETUNREACH
-# undef ENETRESET
-# undef ECONNABORTED
-# undef ECONNRESET
-# undef ENOBUFS
-# undef EISCONN
-# undef ENOTCONN
-# undef ETIMEDOUT
-# undef ECONNREFUSED
-# undef ELOOP
-# undef ENAMETOOLONG
-# undef EHOSTUNREACH
-# undef ENOTEMPTY
-
-# define EWOULDBLOCK (WSAEWOULDBLOCK-WSABASEERR)
-# define EINPROGRESS (WSAEINPROGRESS-WSABASEERR)
-# define EALREADY (WSAEALREADY-WSABASEERR)
-# define ENOTSOCK (WSAENOTSOCK-WSABASEERR)
-# define EDESTADDRREQ (WSAEDESTADDRREQ-WSABASEERR)
-# define EMSGSIZE (WSAEMSGSIZE-WSABASEERR)
-# define EPROTOTYPE (WSAEPROTOTYPE-WSABASEERR)
-# define ENOPROTOOPT (WSAENOPROTOOPT-WSABASEERR)
-# define EPROTONOSUPPORT (WSAEPROTONOSUPPORT-WSABASEERR)
-# define ESOCKTNOSUPPORT (WSAESOCKTNOSUPPORT-WSABASEERR)
-# define EOPNOTSUPP (WSAEOPNOTSUPP-WSABASEERR)
-# define EPFNOSUPPORT (WSAEPFNOSUPPORT-WSABASEERR)
-# define EAFNOSUPPORT (WSAEAFNOSUPPORT-WSABASEERR)
-# define EADDRINUSE (WSAEADDRINUSE-WSABASEERR)
-# define EADDRNOTAVAIL (WSAEADDRNOTAVAIL-WSABASEERR)
-# define ENETDOWN (WSAENETDOWN-WSABASEERR)
-# define ENETUNREACH (WSAENETUNREACH-WSABASEERR)
-# define ENETRESET (WSAENETRESET-WSABASEERR)
-# define ECONNABORTED (WSAECONNABORTED-WSABASEERR)
-# define ECONNRESET (WSAECONNRESET-WSABASEERR)
-# define ENOBUFS (WSAENOBUFS-WSABASEERR)
-# define EISCONN (WSAEISCONN-WSABASEERR)
-# define ENOTCONN (WSAENOTCONN-WSABASEERR)
-# define ESHUTDOWN (WSAESHUTDOWN-WSABASEERR)
-# define ETOOMANYREFS (WSAETOOMANYREFS-WSABASEERR)
-# define ETIMEDOUT (WSAETIMEDOUT-WSABASEERR)
-# define ECONNREFUSED (WSAECONNREFUSED-WSABASEERR)
-# define ELOOP (WSAELOOP-WSABASEERR)
-# define ENAMETOOLONG (WSAENAMETOOLONG-WSABASEERR)
-# define EHOSTDOWN (WSAEHOSTDOWN-WSABASEERR)
-# define EHOSTUNREACH (WSAEHOSTUNREACH-WSABASEERR)
-# define ENOTEMPTY (WSAENOTEMPTY-WSABASEERR)
-# define EPROCLIM (WSAEPROCLIM-WSABASEERR)
-# define EUSERS (WSAEUSERS-WSABASEERR)
-# define EDQUOT (WSAEDQUOT-WSABASEERR)
-# define ESTALE (WSAESTALE-WSABASEERR)
-# define EREMOTE (WSAEREMOTE-WSABASEERR)
-
-#endif
diff --git a/thirdparty/pcre2/LICENCE b/thirdparty/pcre2/LICENCE
index bfe3c8d528..b0f8804fff 100644
--- a/thirdparty/pcre2/LICENCE
+++ b/thirdparty/pcre2/LICENCE
@@ -4,11 +4,11 @@ PCRE2 LICENCE
PCRE2 is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
-Release 10 of PCRE2 is distributed under the terms of the "BSD" licence, as
-specified below, with one exemption for certain binary redistributions. The
-documentation for PCRE2, supplied in the "doc" directory, is distributed under
-the same terms as the software itself. The data in the testdata directory is
-not copyrighted and is in the public domain.
+Releases 10.00 and above of PCRE2 are distributed under the terms of the "BSD"
+licence, as specified below, with one exemption for certain binary
+redistributions. The documentation for PCRE2, supplied in the "doc" directory,
+is distributed under the same terms as the software itself. The data in the
+testdata directory is not copyrighted and is in the public domain.
The basic library functions are written in C and are freestanding. Also
included in the distribution is a just-in-time compiler that can be used to
@@ -35,7 +35,7 @@ PCRE2 JUST-IN-TIME COMPILATION SUPPORT
Written by: Zoltan Herczeg
Email local part: hzmester
-Emain domain: freemail.hu
+Email domain: freemail.hu
Copyright(c) 2010-2018 Zoltan Herczeg
All rights reserved.
@@ -46,7 +46,7 @@ STACK-LESS JUST-IN-TIME COMPILER
Written by: Zoltan Herczeg
Email local part: hzmester
-Emain domain: freemail.hu
+Email domain: freemail.hu
Copyright(c) 2009-2018 Zoltan Herczeg
All rights reserved.
diff --git a/thirdparty/pcre2/src/config.h b/thirdparty/pcre2/src/config.h
index f738616714..89a52ef848 100644
--- a/thirdparty/pcre2/src/config.h
+++ b/thirdparty/pcre2/src/config.h
@@ -18,10 +18,10 @@ to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
but if you do, default values will be taken from config.h for non-boolean
macros that are not defined on the command line.
-Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE2_8 should either be defined
-(conventionally to 1) for TRUE, and not defined at all for FALSE. All such
-macros are listed as a commented #undef in config.h.generic. Macros such as
-MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
+Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE2_8 should either be
+defined (conventionally to 1) for TRUE, and not defined at all for FALSE. All
+such macros are listed as a commented #undef in config.h.generic. Macros such
+as MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
PCRE2 uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
@@ -132,17 +132,18 @@ sure both macros are undefined; an emulation function will then be used. */
/* Define to 1 if you have the <zlib.h> header file. */
/* #undef HAVE_ZLIB_H */
-/* This limits the amount of memory that pcre2_match() may use while matching
- a pattern. The value is in kilobytes. */
+/* This limits the amount of memory that may be used while matching a pattern.
+ It applies to both pcre2_match() and pcre2_dfa_match(). It does not apply
+ to JIT matching. The value is in kibibytes (units of 1024 bytes). */
#ifndef HEAP_LIMIT
#define HEAP_LIMIT 20000000
#endif
/* The value of LINK_SIZE determines the number of bytes used to store links
as offsets within the compiled regex. The default is 2, which allows for
- compiled patterns up to 64K long. This covers the vast majority of cases.
- However, PCRE2 can also be compiled to use 3 or 4 bytes instead. This
- allows for longer patterns in extreme cases. */
+ compiled patterns up to 65535 code units long. This covers the vast
+ majority of cases. However, PCRE2 can also be compiled to use 3 or 4 bytes
+ instead. This allows for longer patterns in extreme cases. */
#ifndef LINK_SIZE
#define LINK_SIZE 2
#endif
@@ -155,7 +156,8 @@ sure both macros are undefined; an emulation function will then be used. */
/* The value of MATCH_LIMIT determines the default number of times the
pcre2_match() function can record a backtrack position during a single
- matching attempt. There is a runtime interface for setting a different
+ matching attempt. The value is also used to limit a loop counter in
+ pcre2_dfa_match(). There is a runtime interface for setting a different
limit. The limit exists in order to catch runaway regular expressions that
take for ever to determine that they do not match. The default is set very
large so that it does not accidentally catch legitimate cases. */
@@ -170,7 +172,9 @@ sure both macros are undefined; an emulation function will then be used. */
MATCH_LIMIT_DEPTH provides this facility. To have any useful effect, it
must be less than the value of MATCH_LIMIT. The default is to use the same
value as MATCH_LIMIT. There is a runtime method for setting a different
- limit. */
+ limit. In the case of pcre2_dfa_match(), this limit controls the depth of
+ the internal nested function calls that are used for pattern recursions,
+ lookarounds, and atomic groups. */
#ifndef MATCH_LIMIT_DEPTH
#define MATCH_LIMIT_DEPTH MATCH_LIMIT
#endif
@@ -210,7 +214,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_NAME "PCRE2"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE2 10.31"
+#define PACKAGE_STRING "PCRE2 10.32"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre2"
@@ -219,7 +223,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "10.31"
+#define PACKAGE_VERSION "10.32"
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
parentheses (of any kind) in a pattern. This limits the amount of system
@@ -339,7 +343,7 @@ sure both macros are undefined; an emulation function will then be used. */
#endif
/* Version number of package */
-#define VERSION "10.31"
+#define VERSION "10.32"
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
diff --git a/thirdparty/pcre2/src/pcre2.h b/thirdparty/pcre2/src/pcre2.h
index fffcc307d0..3d2feb7a6b 100644
--- a/thirdparty/pcre2/src/pcre2.h
+++ b/thirdparty/pcre2/src/pcre2.h
@@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, second API, to be
#included by applications that call PCRE2 functions.
- Copyright (c) 2016-2017 University of Cambridge
+ Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -41,10 +41,16 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
-#define PCRE2_MAJOR 10
-#define PCRE2_MINOR 31
-#define PCRE2_PRERELEASE
-#define PCRE2_DATE 2018-02-12
+#define PCRE2_MAJOR 10
+#define PCRE2_MINOR 32
+#define PCRE2_PRERELEASE
+#define PCRE2_DATE 2018-09-10
+
+/* For the benefit of systems without stdint.h, an alternative is to use
+inttypes.h. The existence of these headers is checked by configure or CMake. */
+
+#define PCRE2_HAVE_STDINT_H 1
+#define PCRE2_HAVE_INTTYPES_H 1
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE2, the appropriate
@@ -81,12 +87,18 @@ set, we ensure here that it has no effect. */
#define PCRE2_CALL_CONVENTION
#endif
-/* Have to include limits.h, stdlib.h and stdint.h to ensure that size_t and
-uint8_t, UCHAR_MAX, etc are defined. */
+/* Have to include limits.h, stdlib.h and stdint.h (or inttypes.h) to ensure
+that size_t and uint8_t, UCHAR_MAX, etc are defined. If the system has neither
+header, the relevant values must be provided by some other means. */
#include <limits.h>
#include <stdlib.h>
+
+#if PCRE2_HAVE_STDINT_H
#include <stdint.h>
+#elif PCRE2_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
/* Allow for C++ users compiling this directly. */
@@ -269,6 +281,7 @@ pcre2_pattern_convert(). */
#define PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE 156
#define PCRE2_ERROR_BACKSLASH_G_SYNTAX 157
#define PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING 158
+/* Error 159 is obsolete and should now never occur */
#define PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED 159
#define PCRE2_ERROR_VERB_UNKNOWN 160
#define PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG 161
@@ -303,6 +316,8 @@ pcre2_pattern_convert(). */
#define PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP 190
#define PCRE2_ERROR_NO_SURROGATES_IN_UTF16 191
#define PCRE2_ERROR_BAD_LITERAL_OPTIONS 192
+#define PCRE2_ERROR_SUPPORTED_ONLY_IN_UNICODE 193
+#define PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS 194
/* "Expected" matching error codes: no match and partial match. */
@@ -387,6 +402,7 @@ released, the numbers must not be changed. */
#define PCRE2_ERROR_BADSERIALIZEDDATA (-62)
#define PCRE2_ERROR_HEAPLIMIT (-63)
#define PCRE2_ERROR_CONVERT_SYNTAX (-64)
+#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
/* Request types for pcre2_pattern_info() */
diff --git a/thirdparty/pcre2/src/pcre2_auto_possess.c b/thirdparty/pcre2/src/pcre2_auto_possess.c
index 23275a2e39..2ce152e952 100644
--- a/thirdparty/pcre2/src/pcre2_auto_possess.c
+++ b/thirdparty/pcre2/src/pcre2_auto_possess.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -505,7 +505,7 @@ Arguments:
utf TRUE in UTF mode
cb compile data block
base_list the data list of the base opcode
- base_end the end of the data list
+ base_end the end of the base opcode
rec_limit points to recursion depth counter
Returns: TRUE if the auto-possessification is possible
@@ -730,7 +730,7 @@ for(;;)
if ((*xclass_flags & XCL_MAP) == 0)
{
/* No bits are set for characters < 256. */
- if (list[1] == 0) return TRUE;
+ if (list[1] == 0) return (*xclass_flags & XCL_NOT) == 0;
/* Might be an empty repeat. */
continue;
}
@@ -1235,6 +1235,7 @@ for (;;)
#endif
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
diff --git a/thirdparty/pcre2/src/pcre2_chartables.c b/thirdparty/pcre2/src/pcre2_chartables.c
index 203cb1a4ab..4046500c00 100644
--- a/thirdparty/pcre2/src/pcre2_chartables.c
+++ b/thirdparty/pcre2/src/pcre2_chartables.c
@@ -2,23 +2,24 @@
* Perl-Compatible Regular Expressions *
*************************************************/
-/* This file contains character tables that are used when no external tables
-are passed to PCRE2 by the application that calls it. The tables are used only
-for characters whose code values are less than 256.
-
-This is a default version of the tables that assumes ASCII encoding. A program
-called dftables (which is distributed with PCRE2) can be used to build
-alternative versions of this file. This is necessary if you are running in an
-EBCDIC environment, or if you want to default to a different encoding, for
-example ISO-8859-1. When dftables is run, it creates these tables in the
-current locale. If PCRE2 is configured with --enable-rebuild-chartables, this
-happens automatically.
-
-The following #includes are present because without them gcc 4.x may remove the
-array definition from the final binary if PCRE2 is built into a static library
-and dead code stripping is activated. This leads to link errors. Pulling in the
-header ensures that the array gets flagged as "someone outside this compilation
-unit might reference this" and so it will always be supplied to the linker. */
+/* This file was automatically written by the dftables auxiliary
+program. It contains character tables that are used when no external
+tables are passed to PCRE2 by the application that calls it. The tables
+are used only for characters whose code values are less than 256. */
+
+/*The dftables program (which is distributed with PCRE2) can be used to
+build alternative versions of this file. This is necessary if you are
+running in an EBCDIC environment, or if you want to default to a different
+encoding, for example ISO-8859-1. When dftables is run, it creates these
+tables in the current locale. This happens automatically if PCRE2 is
+configured with --enable-rebuild-chartables. */
+
+/* The following #include is present because without it gcc 4.x may remove
+the array definition from the final binary if PCRE2 is built into a static
+library and dead code stripping is activated. This leads to link errors.
+Pulling in the header ensures that the array gets flagged as "someone
+outside this compilation unit might reference this" and so it will always
+be supplied to the linker. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -101,7 +102,7 @@ const uint8_t PRIV(default_tables)[] = {
/* This table contains bit maps for various character classes. Each map is 32
bytes long and the bits run from the least significant end of each byte. The
classes that have their own maps are: space, xdigit, digit, upper, lower, word,
-graph, print, punct, and cntrl. Other classes are built from combinations. */
+graph print, punct, and cntrl. Other classes are built from combinations. */
0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -159,25 +160,24 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */
0x04 decimal digit
0x08 hexadecimal digit
0x10 alphanumeric or '_'
- 0x80 regular expression metacharacter or binary zero
*/
- 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* 8- 15 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */
- 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */
- 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /* ( - / */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - ' */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ( - / */
0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */
- 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /* 8 - ? */
+ 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x00, /* 8 - ? */
0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* @ - G */
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* H - O */
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* P - W */
- 0x12,0x12,0x12,0x80,0x80,0x00,0x80,0x10, /* X - _ */
+ 0x12,0x12,0x12,0x00,0x00,0x00,0x00,0x10, /* X - _ */
0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* ` - g */
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* h - o */
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* p - w */
- 0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /* x -127 */
+ 0x12,0x12,0x12,0x00,0x00,0x00,0x00,0x00, /* x -127 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
diff --git a/thirdparty/pcre2/src/pcre2_compile.c b/thirdparty/pcre2/src/pcre2_compile.c
index 87530fb584..6bb1de3610 100644
--- a/thirdparty/pcre2/src/pcre2_compile.c
+++ b/thirdparty/pcre2/src/pcre2_compile.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -63,8 +63,8 @@ POSSIBILITY OF SUCH DAMAGE.
/* Other debugging code can be enabled by these defines. */
-// #define DEBUG_SHOW_CAPTURES
-// #define DEBUG_SHOW_PARSED
+/* #define DEBUG_SHOW_CAPTURES */
+/* #define DEBUG_SHOW_PARSED */
/* There are a few things that vary with different code unit sizes. Handle them
by defining macros in order to minimize #if usage. */
@@ -250,34 +250,35 @@ is present where expected in a conditional group. */
#define META_LOOKBEHINDNOT 0x80250000u /* (?<! */
/* These must be kept in this order, with consecutive values, and the _ARG
-versions of PRUNE, SKIP, and THEN immediately after their non-argument
+versions of COMMIT, PRUNE, SKIP, and THEN immediately after their non-argument
versions. */
#define META_MARK 0x80260000u /* (*MARK) */
#define META_ACCEPT 0x80270000u /* (*ACCEPT) */
-#define META_COMMIT 0x80280000u /* (*COMMIT) */
-#define META_FAIL 0x80290000u /* (*FAIL) */
-#define META_PRUNE 0x802a0000u /* These pairs must */
-#define META_PRUNE_ARG 0x802b0000u /* be */
-#define META_SKIP 0x802c0000u /* kept */
-#define META_SKIP_ARG 0x802d0000u /* in */
-#define META_THEN 0x802e0000u /* this */
-#define META_THEN_ARG 0x802f0000u /* order */
+#define META_FAIL 0x80280000u /* (*FAIL) */
+#define META_COMMIT 0x80290000u /* These */
+#define META_COMMIT_ARG 0x802a0000u /* pairs */
+#define META_PRUNE 0x802b0000u /* must */
+#define META_PRUNE_ARG 0x802c0000u /* be */
+#define META_SKIP 0x802d0000u /* kept */
+#define META_SKIP_ARG 0x802e0000u /* in */
+#define META_THEN 0x802f0000u /* this */
+#define META_THEN_ARG 0x80300000u /* order */
/* These must be kept in groups of adjacent 3 values, and all together. */
-#define META_ASTERISK 0x80300000u /* * */
-#define META_ASTERISK_PLUS 0x80310000u /* *+ */
-#define META_ASTERISK_QUERY 0x80320000u /* *? */
-#define META_PLUS 0x80330000u /* + */
-#define META_PLUS_PLUS 0x80340000u /* ++ */
-#define META_PLUS_QUERY 0x80350000u /* +? */
-#define META_QUERY 0x80360000u /* ? */
-#define META_QUERY_PLUS 0x80370000u /* ?+ */
-#define META_QUERY_QUERY 0x80380000u /* ?? */
-#define META_MINMAX 0x80390000u /* {n,m} repeat */
-#define META_MINMAX_PLUS 0x803a0000u /* {n,m}+ repeat */
-#define META_MINMAX_QUERY 0x803b0000u /* {n,m}? repeat */
+#define META_ASTERISK 0x80310000u /* * */
+#define META_ASTERISK_PLUS 0x80320000u /* *+ */
+#define META_ASTERISK_QUERY 0x80330000u /* *? */
+#define META_PLUS 0x80340000u /* + */
+#define META_PLUS_PLUS 0x80350000u /* ++ */
+#define META_PLUS_QUERY 0x80360000u /* +? */
+#define META_QUERY 0x80370000u /* ? */
+#define META_QUERY_PLUS 0x80380000u /* ?+ */
+#define META_QUERY_QUERY 0x80390000u /* ?? */
+#define META_MINMAX 0x803a0000u /* {n,m} repeat */
+#define META_MINMAX_PLUS 0x803b0000u /* {n,m}+ repeat */
+#define META_MINMAX_QUERY 0x803c0000u /* {n,m}? repeat */
#define META_FIRST_QUANTIFIER META_ASTERISK
#define META_LAST_QUANTIFIER META_MINMAX_QUERY
@@ -327,8 +328,9 @@ static unsigned char meta_extra_lengths[] = {
SIZEOFFSET, /* META_LOOKBEHINDNOT */
1, /* META_MARK - plus the string length */
0, /* META_ACCEPT */
- 0, /* META_COMMIT */
0, /* META_FAIL */
+ 0, /* META_COMMIT */
+ 1, /* META_COMMIT_ARG - plus the string length */
0, /* META_PRUNE */
1, /* META_PRUNE_ARG - plus the string length */
0, /* META_SKIP */
@@ -510,17 +512,17 @@ static const short int escapes[] = {
-ESC_Z, CHAR_LEFT_SQUARE_BRACKET,
CHAR_BACKSLASH, CHAR_RIGHT_SQUARE_BRACKET,
CHAR_CIRCUMFLEX_ACCENT, CHAR_UNDERSCORE,
- CHAR_GRAVE_ACCENT, ESC_a,
+ CHAR_GRAVE_ACCENT, CHAR_BEL,
-ESC_b, 0,
- -ESC_d, ESC_e,
- ESC_f, 0,
+ -ESC_d, CHAR_ESC,
+ CHAR_FF, 0,
-ESC_h, 0,
0, -ESC_k,
0, 0,
- ESC_n, 0,
+ CHAR_LF, 0,
-ESC_p, 0,
- ESC_r, -ESC_s,
- ESC_tee, 0,
+ CHAR_CR, -ESC_s,
+ CHAR_HT, 0,
-ESC_v, -ESC_w,
0, 0,
-ESC_z
@@ -544,22 +546,22 @@ because it is defined as 'a', which of course picks up the ASCII value. */
#endif
static const short int escapes[] = {
-/* 80 */ ESC_a, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
-/* 88 */-ESC_h, 0, 0, '{', 0, 0, 0, 0,
-/* 90 */ 0, 0, -ESC_k, 0, 0, ESC_n, 0, -ESC_p,
-/* 98 */ 0, ESC_r, 0, '}', 0, 0, 0, 0,
-/* A0 */ 0, '~', -ESC_s, ESC_tee, 0,-ESC_v, -ESC_w, 0,
-/* A8 */ 0,-ESC_z, 0, 0, 0, '[', 0, 0,
-/* B0 */ 0, 0, 0, 0, 0, 0, 0, 0,
-/* B8 */ 0, 0, 0, 0, 0, ']', '=', '-',
-/* C0 */ '{',-ESC_A, -ESC_B, -ESC_C, -ESC_D,-ESC_E, 0, -ESC_G,
-/* C8 */-ESC_H, 0, 0, 0, 0, 0, 0, 0,
-/* D0 */ '}', 0, -ESC_K, 0, 0,-ESC_N, 0, -ESC_P,
-/* D8 */-ESC_Q,-ESC_R, 0, 0, 0, 0, 0, 0,
-/* E0 */ '\\', 0, -ESC_S, 0, 0,-ESC_V, -ESC_W, -ESC_X,
-/* E8 */ 0,-ESC_Z, 0, 0, 0, 0, 0, 0,
-/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0,
-/* F8 */ 0, 0
+/* 80 */ CHAR_BEL, -ESC_b, 0, -ESC_d, CHAR_ESC, CHAR_FF, 0,
+/* 88 */ -ESC_h, 0, 0, '{', 0, 0, 0, 0,
+/* 90 */ 0, 0, -ESC_k, 0, 0, CHAR_LF, 0, -ESC_p,
+/* 98 */ 0, CHAR_CR, 0, '}', 0, 0, 0, 0,
+/* A0 */ 0, '~', -ESC_s, CHAR_HT, 0, -ESC_v, -ESC_w, 0,
+/* A8 */ 0, -ESC_z, 0, 0, 0, '[', 0, 0,
+/* B0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* B8 */ 0, 0, 0, 0, 0, ']', '=', '-',
+/* C0 */ '{', -ESC_A, -ESC_B, -ESC_C, -ESC_D, -ESC_E, 0, -ESC_G,
+/* C8 */ -ESC_H, 0, 0, 0, 0, 0, 0, 0,
+/* D0 */ '}', 0, -ESC_K, 0, 0, -ESC_N, 0, -ESC_P,
+/* D8 */ -ESC_Q, -ESC_R, 0, 0, 0, 0, 0, 0,
+/* E0 */ '\\', 0, -ESC_S, 0, 0, -ESC_V, -ESC_W, -ESC_X,
+/* E8 */ 0, -ESC_Z, 0, 0, 0, 0, 0, 0,
+/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* F8 */ 0, 0
};
/* We also need a table of characters that may follow \c in an EBCDIC
@@ -586,9 +588,9 @@ static const char verbnames[] =
"\0" /* Empty name is a shorthand for MARK */
STRING_MARK0
STRING_ACCEPT0
- STRING_COMMIT0
STRING_F0
STRING_FAIL0
+ STRING_COMMIT0
STRING_PRUNE0
STRING_SKIP0
STRING_THEN;
@@ -596,11 +598,11 @@ static const char verbnames[] =
static const verbitem verbs[] = {
{ 0, META_MARK, +1 }, /* > 0 => must have an argument */
{ 4, META_MARK, +1 },
- { 6, META_ACCEPT, -1 }, /* < 0 => must not have an argument */
- { 6, META_COMMIT, -1 },
+ { 6, META_ACCEPT, -1 }, /* < 0 => Optional argument, convert to pre-MARK */
{ 1, META_FAIL, -1 },
{ 4, META_FAIL, -1 },
- { 5, META_PRUNE, 0 }, /* Argument is optional; bump META code if found */
+ { 6, META_COMMIT, 0 },
+ { 5, META_PRUNE, 0 }, /* Optional argument; bump META code if found */
{ 4, META_SKIP, 0 },
{ 4, META_THEN, 0 }
};
@@ -610,8 +612,8 @@ static const int verbcount = sizeof(verbs)/sizeof(verbitem);
/* Verb opcodes, indexed by their META code offset from META_MARK. */
static const uint32_t verbops[] = {
- OP_MARK, OP_ACCEPT, OP_COMMIT, OP_FAIL, OP_PRUNE, OP_PRUNE_ARG, OP_SKIP,
- OP_SKIP_ARG, OP_THEN, OP_THEN_ARG };
+ OP_MARK, OP_ACCEPT, OP_FAIL, OP_COMMIT, OP_COMMIT_ARG, OP_PRUNE,
+ OP_PRUNE_ARG, OP_SKIP, OP_SKIP_ARG, OP_THEN, OP_THEN_ARG };
/* Offsets from OP_STAR for case-independent and negative repeat opcodes. */
@@ -729,7 +731,7 @@ enum { ERR0 = COMPILE_ERROR_BASE,
ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69, ERR70,
ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79, ERR80,
ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERR87, ERR88, ERR89, ERR90,
- ERR91, ERR92};
+ ERR91, ERR92, ERR93, ERR94 };
/* This is a table of start-of-pattern options such as (*UTF) and settings such
as (*LIMIT_MATCH=nnnn) and (*CRLF). For completeness and backward
@@ -976,8 +978,8 @@ for (;;)
case META_POSIX_NEG: fprintf(stderr, "META_POSIX_NEG %d", *pptr++); break;
case META_ACCEPT: fprintf(stderr, "META (*ACCEPT)"); break;
- case META_COMMIT: fprintf(stderr, "META (*COMMIT)"); break;
case META_FAIL: fprintf(stderr, "META (*FAIL)"); break;
+ case META_COMMIT: fprintf(stderr, "META (*COMMIT)"); break;
case META_PRUNE: fprintf(stderr, "META (*PRUNE)"); break;
case META_SKIP: fprintf(stderr, "META (*SKIP)"); break;
case META_THEN: fprintf(stderr, "META (*THEN)"); break;
@@ -1067,6 +1069,10 @@ for (;;)
fprintf(stderr, "META (*MARK:");
goto SHOWARG;
+ case META_COMMIT_ARG:
+ fprintf(stderr, "META (*COMMIT:");
+ goto SHOWARG;
+
case META_PRUNE_ARG:
fprintf(stderr, "META (*PRUNE:");
goto SHOWARG;
@@ -1435,6 +1441,48 @@ else if ((i = escapes[c - ESCAPES_FIRST]) != 0)
escape = -i; /* Else return a special escape */
if (cb != NULL && (escape == ESC_P || escape == ESC_p || escape == ESC_X))
cb->external_flags |= PCRE2_HASBKPORX; /* Note \P, \p, or \X */
+
+ /* Perl supports \N{name} for character names and \N{U+dddd} for numerical
+ Unicode code points, as well as plain \N for "not newline". PCRE does not
+ support \N{name}. However, it does support quantification such as \N{2,3},
+ so if \N{ is not followed by U+dddd we check for a quantifier. */
+
+ if (escape == ESC_N && ptr < ptrend && *ptr == CHAR_LEFT_CURLY_BRACKET)
+ {
+ PCRE2_SPTR p = ptr + 1;
+
+ /* \N{U+ can be handled by the \x{ code. However, this construction is
+ not valid in EBCDIC environments because it specifies a Unicode
+ character, not a codepoint in the local code. For example \N{U+0041}
+ must be "A" in all environments. Also, in Perl, \N{U+ forces Unicode
+ casing semantics for the entire pattern, so allow it only in UTF (i.e.
+ Unicode) mode. */
+
+ if (ptrend - p > 1 && *p == CHAR_U && p[1] == CHAR_PLUS)
+ {
+#ifdef EBCDIC
+ *errorcodeptr = ERR93;
+#else
+ if (utf)
+ {
+ ptr = p + 1;
+ escape = 0; /* Not a fancy escape after all */
+ goto COME_FROM_NU;
+ }
+ else *errorcodeptr = ERR93;
+#endif
+ }
+
+ /* Give an error if what follows is not a quantifier, but don't override
+ an error set by the quantifier reader (e.g. number overflow). */
+
+ else
+ {
+ if (!read_repeat_counts(&p, ptrend, NULL, NULL, errorcodeptr) &&
+ *errorcodeptr == 0)
+ *errorcodeptr = ERR37;
+ }
+ }
}
}
@@ -1462,6 +1510,7 @@ else
/* A number of Perl escapes are not handled by PCRE. We give an explicit
error. */
+ case CHAR_F:
case CHAR_l:
case CHAR_L:
*errorcodeptr = ERR37;
@@ -1719,6 +1768,9 @@ else
{
if (ptr < ptrend && *ptr == CHAR_LEFT_CURLY_BRACKET)
{
+#ifndef EBCDIC
+ COME_FROM_NU:
+#endif
if (++ptr >= ptrend || *ptr == CHAR_RIGHT_CURLY_BRACKET)
{
*errorcodeptr = ERR78;
@@ -1852,19 +1904,6 @@ else
}
}
-/* Perl supports \N{name} for character names, as well as plain \N for "not
-newline". PCRE does not support \N{name}. However, it does support
-quantification such as \N{2,3}. */
-
-if (escape == ESC_N && ptr < ptrend && *ptr == CHAR_LEFT_CURLY_BRACKET &&
- ptrend - ptr > 2)
- {
- PCRE2_SPTR p = ptr + 1;
- if (!read_repeat_counts(&p, ptrend, NULL, NULL, errorcodeptr) &&
- *errorcodeptr == 0)
- *errorcodeptr = ERR37;
- }
-
/* Set the pointer to the next character before returning. */
*ptrptr = ptr;
@@ -2251,11 +2290,14 @@ typedef struct nest_save {
#define NSF_RESET 0x0001u
#define NSF_CONDASSERT 0x0002u
-/* Of the options that are changeable within the pattern, these are tracked
-during parsing. The rest are used from META_OPTIONS items when compiling. */
+/* Options that are changeable within the pattern must be tracked during
+parsing. Some (e.g. PCRE2_EXTENDED) are implemented entirely during parsing,
+but all must be tracked so that META_OPTIONS items set the correct values for
+the main compiling phase. */
-#define PARSE_TRACKED_OPTIONS \
- (PCRE2_DUPNAMES|PCRE2_EXTENDED|PCRE2_EXTENDED_MORE|PCRE2_NO_AUTO_CAPTURE)
+#define PARSE_TRACKED_OPTIONS (PCRE2_CASELESS|PCRE2_DOTALL|PCRE2_DUPNAMES| \
+ PCRE2_EXTENDED|PCRE2_EXTENDED_MORE|PCRE2_MULTILINE|PCRE2_NO_AUTO_CAPTURE| \
+ PCRE2_UNGREEDY)
/* States used for analyzing ranges in character classes. The two OK values
must be last. */
@@ -2290,6 +2332,7 @@ uint32_t *previous_callout = NULL;
uint32_t *parsed_pattern = cb->parsed_pattern;
uint32_t *parsed_pattern_end = cb->parsed_pattern_end;
uint32_t meta_quantifier = 0;
+uint32_t add_after_mark = 0;
uint16_t nest_depth = 0;
int after_manual_callout = 0;
int expect_cond_assert = 0;
@@ -2434,11 +2477,17 @@ while (ptr < ptrend)
/* EITHER: not both options set */
((options & (PCRE2_EXTENDED | PCRE2_ALT_VERBNAMES)) !=
(PCRE2_EXTENDED | PCRE2_ALT_VERBNAMES)) ||
- /* OR: character > 255 */
- c > 255 ||
- /* OR: not a # comment or white space */
- (c != CHAR_NUMBER_SIGN && (cb->ctypes[c] & ctype_space) == 0)
- ))
+#ifdef SUPPORT_UNICODE
+ /* OR: character > 255 AND not Unicode Pattern White Space */
+ (c > 255 && (c|1) != 0x200f && (c|1) != 0x2029) ||
+#endif
+ /* OR: not a # comment or isspace() white space */
+ (c < 256 && c != CHAR_NUMBER_SIGN && (cb->ctypes[c] & ctype_space) == 0
+#ifdef SUPPORT_UNICODE
+ /* and not CHAR_NEL when Unicode is supported */
+ && c != CHAR_NEL
+#endif
+ )))
{
PCRE2_SIZE verbnamelength;
@@ -2461,6 +2510,16 @@ while (ptr < ptrend)
goto FAILED;
}
*verblengthptr = (uint32_t)verbnamelength;
+
+ /* If this name was on a verb such as (*ACCEPT) which does not continue,
+ a (*MARK) was generated for the name. We now add the original verb as the
+ next item. */
+
+ if (add_after_mark != 0)
+ {
+ *parsed_pattern++ = add_after_mark;
+ add_after_mark = 0;
+ }
break;
case CHAR_BACKSLASH:
@@ -2510,11 +2569,18 @@ while (ptr < ptrend)
/* Skip over whitespace and # comments in extended mode. Note that c is a
character, not a code unit, so we must not use MAX_255 to test its size
- because MAX_255 tests code units and is assumed TRUE in 8-bit mode. */
+ because MAX_255 tests code units and is assumed TRUE in 8-bit mode. The
+ whitespace characters are those designated as "Pattern White Space" by
+ Unicode, which are the isspace() characters plus CHAR_NEL (newline), which is
+ U+0085 in Unicode, plus U+200E, U+200F, U+2028, and U+2029. These are a
+ subset of space characters that match \h and \v. */
if ((options & PCRE2_EXTENDED) != 0)
{
if (c < 256 && (cb->ctypes[c] & ctype_space) != 0) continue;
+#ifdef SUPPORT_UNICODE
+ if (c == CHAR_NEL || (c|1) == 0x200f || (c|1) == 0x2029) continue;
+#endif
if (c == CHAR_NUMBER_SIGN)
{
while (ptr < ptrend)
@@ -3206,7 +3272,6 @@ while (ptr < ptrend)
tempptr = ptr;
escape = PRIV(check_escape)(&ptr, ptrend, &c, &errorcode,
options, TRUE, cb);
-
if (errorcode != 0)
{
CLASS_ESCAPE_FAILED:
@@ -3454,13 +3519,25 @@ while (ptr < ptrend)
if (*ptr++ == CHAR_COLON) /* Skip past : or ) */
{
- if (verbs[i].has_arg < 0) /* Argument is forbidden */
+ /* Some optional arguments can be treated as a preceding (*MARK) */
+
+ if (verbs[i].has_arg < 0)
{
- errorcode = ERR59;
- goto FAILED;
+ add_after_mark = verbs[i].meta;
+ *parsed_pattern++ = META_MARK;
}
- *parsed_pattern++ = verbs[i].meta +
- ((verbs[i].meta != META_MARK)? 0x00010000u:0);
+
+ /* The remaining verbs with arguments (except *MARK) need a different
+ opcode. */
+
+ else
+ {
+ *parsed_pattern++ = verbs[i].meta +
+ ((verbs[i].meta != META_MARK)? 0x00010000u:0);
+ }
+
+ /* Set up for reading the name in the main loop. */
+
verblengthptr = parsed_pattern++;
verbnamestart = ptr;
inverbname = TRUE;
@@ -3521,17 +3598,39 @@ while (ptr < ptrend)
else
{
+ BOOL hyphenok = TRUE;
+ uint32_t oldoptions = options;
+
top_nest->reset_group = 0;
top_nest->max_group = 0;
set = unset = 0;
optset = &set;
+ /* ^ at the start unsets imnsx and disables the subsequent use of - */
+
+ if (ptr < ptrend && *ptr == CHAR_CIRCUMFLEX_ACCENT)
+ {
+ options &= ~(PCRE2_CASELESS|PCRE2_MULTILINE|PCRE2_NO_AUTO_CAPTURE|
+ PCRE2_DOTALL|PCRE2_EXTENDED|PCRE2_EXTENDED_MORE);
+ hyphenok = FALSE;
+ ptr++;
+ }
+
while (ptr < ptrend && *ptr != CHAR_RIGHT_PARENTHESIS &&
*ptr != CHAR_COLON)
{
switch (*ptr++)
{
- case CHAR_MINUS: optset = &unset; break;
+ case CHAR_MINUS:
+ if (!hyphenok)
+ {
+ errorcode = ERR94;
+ ptr--; /* Correct the offset */
+ goto FAILED;
+ }
+ optset = &unset;
+ hyphenok = FALSE;
+ break;
case CHAR_J: /* Record that it changed in the external options */
*optset |= PCRE2_DUPNAMES;
@@ -3591,7 +3690,7 @@ while (ptr < ptrend)
/* If nothing changed, no need to record. */
- if (set != 0 || unset != 0)
+ if (options != oldoptions)
{
*parsed_pattern++ = META_OPTIONS;
*parsed_pattern++ = options;
@@ -3896,9 +3995,8 @@ while (ptr < ptrend)
if (*ptr == CHAR_DOT)
{
if (++ptr >= ptrend || !IS_DIGIT(*ptr)) goto BAD_VERSION_CONDITION;
- if (!read_number(&ptr, ptrend, -1, 99 , ERR79, &minor, &errorcode))
- goto FAILED;
- if (minor < 10) minor *= 10;
+ minor = (*ptr++ - CHAR_0) * 10;
+ if (IS_DIGIT(*ptr)) minor += *ptr++ - CHAR_0;
if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS)
goto BAD_VERSION_CONDITION;
}
@@ -4261,11 +4359,11 @@ goto FAILED;
/*************************************************
-* Find first significant op code *
+* Find first significant opcode *
*************************************************/
/* This is called by several functions that scan a compiled expression looking
-for a fixed first character, or an anchoring op code etc. It skips over things
+for a fixed first character, or an anchoring opcode etc. It skips over things
that do not influence this. For some calls, it makes sense to skip negative
forward and all backward assertions, and also the \b assertion; for others it
does not.
@@ -5472,7 +5570,7 @@ for (;; pptr++)
set xclass = TRUE. Then, in the pre-compile phase, accumulate the length
of the extra data and reset the pointer. This is so that very large
classes that contain a zillion wide characters or Unicode property tests
- do not overwrite the work space (which is on the stack). */
+ do not overwrite the workspace (which is on the stack). */
if (class_uchardata > class_uchardata_base)
{
@@ -5563,7 +5661,7 @@ for (;; pptr++)
if (class_has_8bitchar > 0)
{
*code++ |= XCL_MAP;
- memmove(code + (32 / sizeof(PCRE2_UCHAR)), code,
+ (void)memmove(code + (32 / sizeof(PCRE2_UCHAR)), code,
CU2BYTES(class_uchardata - code));
if (negate_class && !xclass_has_prop)
for (i = 0; i < 32; i++) classbits[i] = ~classbits[i];
@@ -5655,6 +5753,7 @@ for (;; pptr++)
cb->had_pruneorskip = TRUE;
/* Fall through */
case META_MARK:
+ case META_COMMIT_ARG:
VERB_ARG:
*code++ = verbops[(meta - META_MARK) >> 16];
/* The length is in characters. */
@@ -6509,7 +6608,7 @@ for (;; pptr++)
/* Wrap the recursion call in OP_BRA brackets. */
- memmove(previous + 1 + LINK_SIZE, previous, CU2BYTES(1 + LINK_SIZE));
+ (void)memmove(previous + 1 + LINK_SIZE, previous, CU2BYTES(1 + LINK_SIZE));
op_previous = *previous = OP_BRA;
PUT(previous, 1, 2 + 2*LINK_SIZE);
previous[2 + 2*LINK_SIZE] = OP_KET;
@@ -6589,7 +6688,7 @@ for (;; pptr++)
if (repeat_max <= 1 || repeat_max == REPEAT_UNLIMITED)
{
- memmove(previous + 1, previous, CU2BYTES(len));
+ (void)memmove(previous + 1, previous, CU2BYTES(len));
code++;
if (repeat_max == 0)
{
@@ -6610,7 +6709,7 @@ for (;; pptr++)
else
{
int linkoffset;
- memmove(previous + 2 + LINK_SIZE, previous, CU2BYTES(len));
+ (void)memmove(previous + 2 + LINK_SIZE, previous, CU2BYTES(len));
code += 2 + LINK_SIZE;
*previous++ = OP_BRAZERO + repeat_type;
*previous++ = OP_BRA;
@@ -6811,7 +6910,7 @@ for (;; pptr++)
if (*bracode == OP_COND || *bracode == OP_SCOND)
{
int nlen = (int)(code - bracode);
- memmove(bracode + 1 + LINK_SIZE, bracode, CU2BYTES(nlen));
+ (void)memmove(bracode + 1 + LINK_SIZE, bracode, CU2BYTES(nlen));
code += 1 + LINK_SIZE;
nlen += 1 + LINK_SIZE;
*bracode = (*bracode == OP_COND)? OP_BRAPOS : OP_SBRAPOS;
@@ -7082,7 +7181,7 @@ for (;; pptr++)
else
{
- memmove(tempcode + 1 + LINK_SIZE, tempcode, CU2BYTES(len));
+ (void)memmove(tempcode + 1 + LINK_SIZE, tempcode, CU2BYTES(len));
code += 1 + LINK_SIZE;
len += 1 + LINK_SIZE;
tempcode[0] = OP_ONCE;
@@ -7460,7 +7559,7 @@ length of the BRA and KET and any extra code units that are required at the
beginning. We accumulate in a local variable to save frequent testing of
lengthptr for NULL. We cannot do this by looking at the value of 'code' at the
start and end of each alternative, because compiled items are discarded during
-the pre-compile phase so that the work space is not exceeded. */
+the pre-compile phase so that the workspace is not exceeded. */
length = 2 + 2*LINK_SIZE + skipunits;
@@ -7622,7 +7721,7 @@ for (;;)
{
if (cb->open_caps->flag)
{
- memmove(start_bracket + 1 + LINK_SIZE, start_bracket,
+ (void)memmove(start_bracket + 1 + LINK_SIZE, start_bracket,
CU2BYTES(code - start_bracket));
*start_bracket = OP_ONCE;
code += 1 + LINK_SIZE;
@@ -7765,10 +7864,11 @@ do {
if (!is_anchored(scode, bracket_map, cb, atomcount, TRUE)) return FALSE;
}
- /* Condition */
+ /* Condition. If there is no second branch, it can't be anchored. */
- else if (op == OP_COND)
+ else if (op == OP_COND || op == OP_SCOND)
{
+ if (scode[GET(scode,1)] != OP_ALT) return FALSE;
if (!is_anchored(scode, bracket_map, cb, atomcount, inassert))
return FALSE;
}
@@ -8003,6 +8103,7 @@ for (;;)
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
@@ -8221,7 +8322,7 @@ for (i = 0; i < tablecount; i++)
if (crc < 0)
{
- memmove(slot + cb->name_entry_size, slot,
+ (void)memmove(slot + cb->name_entry_size, slot,
CU2BYTES((tablecount - i) * cb->name_entry_size));
break;
}
@@ -8311,6 +8412,7 @@ for (;; pptr++)
break;
case META_MARK: /* Add the length of the name. */
+ case META_COMMIT_ARG:
case META_PRUNE_ARG:
case META_SKIP_ARG:
case META_THEN_ARG:
@@ -8501,6 +8603,7 @@ for (;; pptr++)
goto EXIT;
case META_MARK:
+ case META_COMMIT_ARG:
case META_PRUNE_ARG:
case META_SKIP_ARG:
case META_THEN_ARG:
@@ -8572,6 +8675,32 @@ for (;; pptr++)
case META_LOOKAHEADNOT:
pptr = parsed_skip(pptr + 1, PSKIP_KET);
if (pptr == NULL) goto PARSED_SKIP_FAILED;
+
+ /* Also ignore any qualifiers that follow a lookahead assertion. */
+
+ switch (pptr[1])
+ {
+ case META_ASTERISK:
+ case META_ASTERISK_PLUS:
+ case META_ASTERISK_QUERY:
+ case META_PLUS:
+ case META_PLUS_PLUS:
+ case META_PLUS_QUERY:
+ case META_QUERY:
+ case META_QUERY_PLUS:
+ case META_QUERY_QUERY:
+ pptr++;
+ break;
+
+ case META_MINMAX:
+ case META_MINMAX_PLUS:
+ case META_MINMAX_QUERY:
+ pptr += 3;
+ break;
+
+ default:
+ break;
+ }
break;
/* Lookbehinds can be ignored, but must themselves be checked. */
@@ -8942,6 +9071,7 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++)
break;
case META_MARK:
+ case META_COMMIT_ARG:
case META_PRUNE_ARG:
case META_SKIP_ARG:
case META_THEN_ARG:
diff --git a/thirdparty/pcre2/src/pcre2_convert.c b/thirdparty/pcre2/src/pcre2_convert.c
index bdf9b86df6..1dd5c337dc 100644
--- a/thirdparty/pcre2/src/pcre2_convert.c
+++ b/thirdparty/pcre2/src/pcre2_convert.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -1066,11 +1066,12 @@ BOOL utf = (options & PCRE2_CONVERT_UTF) != 0;
uint32_t pattype = options & TYPE_OPTIONS;
if (pattern == NULL || bufflenptr == NULL) return PCRE2_ERROR_NULL;
+
if ((options & ~ALL_OPTIONS) != 0 || /* Undefined bit set */
(pattype & (~pattype+1)) != pattype || /* More than one type set */
pattype == 0) /* No type set */
{
- *bufflenptr = 0; /* Error offset */
+ *bufflenptr = 0; /* Error offset */
return PCRE2_ERROR_BADOPTION;
}
@@ -1081,7 +1082,11 @@ if (ccontext == NULL) ccontext =
/* Check UTF if required. */
#ifndef SUPPORT_UNICODE
-if (utf) return PCRE2_ERROR_UNICODE_NOT_SUPPORTED;
+if (utf)
+ {
+ *bufflenptr = 0; /* Error offset */
+ return PCRE2_ERROR_UNICODE_NOT_SUPPORTED;
+ }
#else
if (utf && (options & PCRE2_CONVERT_NO_UTF_CHECK) == 0)
{
@@ -1126,6 +1131,7 @@ for (i = 0; i < 2; i++)
break;
default:
+ *bufflenptr = 0; /* Error offset */
return PCRE2_ERROR_INTERNAL;
}
diff --git a/thirdparty/pcre2/src/pcre2_dfa_match.c b/thirdparty/pcre2/src/pcre2_dfa_match.c
index c6184ff5e9..9b43237da7 100644
--- a/thirdparty/pcre2/src/pcre2_dfa_match.c
+++ b/thirdparty/pcre2/src/pcre2_dfa_match.c
@@ -181,7 +181,8 @@ static const uint8_t coptable[] = {
0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */
0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */
0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG */
- 0, 0, 0, 0, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */
+ 0, 0, /* COMMIT, COMMIT_ARG */
+ 0, 0, 0, /* FAIL, ACCEPT, ASSERT_ACCEPT */
0, 0, 0 /* CLOSE, SKIPZERO, DEFINE */
};
@@ -254,7 +255,8 @@ static const uint8_t poptable[] = {
0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */
0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */
0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG */
- 0, 0, 0, 0, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */
+ 0, 0, /* COMMIT, COMMIT_ARG */
+ 0, 0, 0, /* FAIL, ACCEPT, ASSERT_ACCEPT */
0, 0, 0 /* CLOSE, SKIPZERO, DEFINE */
};
@@ -292,6 +294,35 @@ typedef struct stateblock {
#define INTS_PER_STATEBLOCK (int)(sizeof(stateblock)/sizeof(int))
+/* Before version 10.32 the recursive calls of internal_dfa_match() were passed
+local working space and output vectors that were created on the stack. This has
+caused issues for some patterns, especially in small-stack environments such as
+Windows. A new scheme is now in use which sets up a vector on the stack, but if
+this is too small, heap memory is used, up to the heap_limit. The main
+parameters are all numbers of ints because the workspace is a vector of ints.
+
+The size of the starting stack vector, DFA_START_RWS_SIZE, is in bytes, and is
+defined in pcre2_internal.h so as to be available to pcre2test when it is
+finding the minimum heap requirement for a match. */
+
+#define OVEC_UNIT (sizeof(PCRE2_SIZE)/sizeof(int))
+
+#define RWS_BASE_SIZE (DFA_START_RWS_SIZE/sizeof(int)) /* Stack vector */
+#define RWS_RSIZE 1000 /* Work size for recursion */
+#define RWS_OVEC_RSIZE (1000*OVEC_UNIT) /* Ovector for recursion */
+#define RWS_OVEC_OSIZE (2*OVEC_UNIT) /* Ovector in other cases */
+
+/* This structure is at the start of each workspace block. */
+
+typedef struct RWS_anchor {
+ struct RWS_anchor *next;
+ unsigned int size; /* Number of ints */
+ unsigned int free; /* Number of ints */
+} RWS_anchor;
+
+#define RWS_ANCHOR_SIZE (sizeof(RWS_anchor)/sizeof(int))
+
+
/*************************************************
* Process a callout *
@@ -354,6 +385,61 @@ return (mb->callout)(cb, mb->callout_data);
/*************************************************
+* Expand local workspace memory *
+*************************************************/
+
+/* This function is called when internal_dfa_match() is about to be called
+recursively and there is insufficient working space left in the current
+workspace block. If there's an existing next block, use it; otherwise get a new
+block unless the heap limit is reached.
+
+Arguments:
+ rwsptr pointer to block pointer (updated)
+ ovecsize space needed for an ovector
+ mb the match block
+
+Returns: 0 rwsptr has been updated
+ !0 an error code
+*/
+
+static int
+more_workspace(RWS_anchor **rwsptr, unsigned int ovecsize, dfa_match_block *mb)
+{
+RWS_anchor *rws = *rwsptr;
+RWS_anchor *new;
+
+if (rws->next != NULL)
+ {
+ new = rws->next;
+ }
+
+/* All sizes are in units of sizeof(int), except for mb->heaplimit, which is in
+kibibytes. */
+
+else
+ {
+ unsigned int newsize = rws->size * 2;
+ unsigned int heapleft = (unsigned int)
+ (((1024/sizeof(int))*mb->heap_limit - mb->heap_used));
+ if (newsize > heapleft) newsize = heapleft;
+ if (newsize < RWS_RSIZE + ovecsize + RWS_ANCHOR_SIZE)
+ return PCRE2_ERROR_HEAPLIMIT;
+ new = mb->memctl.malloc(newsize*sizeof(int), mb->memctl.memory_data);
+ if (new == NULL) return PCRE2_ERROR_NOMEMORY;
+ mb->heap_used += newsize;
+ new->next = NULL;
+ new->size = newsize;
+ rws->next = new;
+ }
+
+new->free = new->size - RWS_ANCHOR_SIZE;
+*rwsptr = new;
+return 0;
+}
+
+
+
+/*************************************************
* Match a Regular Expression - DFA engine *
*************************************************/
@@ -431,7 +517,8 @@ internal_dfa_match(
uint32_t offsetcount,
int *workspace,
int wscount,
- uint32_t rlevel)
+ uint32_t rlevel,
+ int *RWS)
{
stateblock *active_states, *new_states, *temp_states;
stateblock *next_active_state, *next_new_state;
@@ -788,7 +875,7 @@ for (;;)
else if (match_count > 0 && ++match_count * 2 > (int)offsetcount)
match_count = 0;
count = ((match_count == 0)? (int)offsetcount : match_count * 2) - 2;
- if (count > 0) memmove(offsets + 2, offsets,
+ if (count > 0) (void)memmove(offsets + 2, offsets,
(size_t)count * sizeof(PCRE2_SIZE));
if (offsetcount >= 2)
{
@@ -2587,10 +2674,22 @@ for (;;)
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
{
- PCRE2_SPTR endasscode = code + GET(code, 1);
- PCRE2_SIZE local_offsets[2];
int rc;
- int local_workspace[1000];
+ int *local_workspace;
+ PCRE2_SIZE *local_offsets;
+ PCRE2_SPTR endasscode = code + GET(code, 1);
+ RWS_anchor *rws = (RWS_anchor *)RWS;
+
+ if (rws->free < RWS_RSIZE + RWS_OVEC_OSIZE)
+ {
+ rc = more_workspace(&rws, RWS_OVEC_OSIZE, mb);
+ if (rc != 0) return rc;
+ RWS = (int *)rws;
+ }
+
+ local_offsets = (PCRE2_SIZE *)(RWS + rws->size - rws->free);
+ local_workspace = ((int *)local_offsets) + RWS_OVEC_OSIZE;
+ rws->free -= RWS_RSIZE + RWS_OVEC_OSIZE;
while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1);
@@ -2600,10 +2699,13 @@ for (;;)
ptr, /* where we currently are */
(PCRE2_SIZE)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
- sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ RWS_OVEC_OSIZE/OVEC_UNIT, /* size of same */
local_workspace, /* workspace vector */
- sizeof(local_workspace)/sizeof(int), /* size of same */
- rlevel); /* function recursion level */
+ RWS_RSIZE, /* size of same */
+ rlevel, /* function recursion level */
+ RWS); /* recursion workspace */
+
+ rws->free += RWS_RSIZE + RWS_OVEC_OSIZE;
if (rc < 0 && rc != PCRE2_ERROR_NOMATCH) return rc;
if ((rc >= 0) == (codevalue == OP_ASSERT || codevalue == OP_ASSERTBACK))
@@ -2615,8 +2717,6 @@ for (;;)
case OP_COND:
case OP_SCOND:
{
- PCRE2_SIZE local_offsets[1000];
- int local_workspace[1000];
int codelink = (int)GET(code, 1);
PCRE2_UCHAR condcode;
@@ -2673,8 +2773,22 @@ for (;;)
else
{
int rc;
+ int *local_workspace;
+ PCRE2_SIZE *local_offsets;
PCRE2_SPTR asscode = code + LINK_SIZE + 1;
PCRE2_SPTR endasscode = asscode + GET(asscode, 1);
+ RWS_anchor *rws = (RWS_anchor *)RWS;
+
+ if (rws->free < RWS_RSIZE + RWS_OVEC_OSIZE)
+ {
+ rc = more_workspace(&rws, RWS_OVEC_OSIZE, mb);
+ if (rc != 0) return rc;
+ RWS = (int *)rws;
+ }
+
+ local_offsets = (PCRE2_SIZE *)(RWS + rws->size - rws->free);
+ local_workspace = ((int *)local_offsets) + RWS_OVEC_OSIZE;
+ rws->free -= RWS_RSIZE + RWS_OVEC_OSIZE;
while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1);
@@ -2684,10 +2798,13 @@ for (;;)
ptr, /* where we currently are */
(PCRE2_SIZE)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
- sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ RWS_OVEC_OSIZE/OVEC_UNIT, /* size of same */
local_workspace, /* workspace vector */
- sizeof(local_workspace)/sizeof(int), /* size of same */
- rlevel); /* function recursion level */
+ RWS_RSIZE, /* size of same */
+ rlevel, /* function recursion level */
+ RWS); /* recursion workspace */
+
+ rws->free += RWS_RSIZE + RWS_OVEC_OSIZE;
if (rc < 0 && rc != PCRE2_ERROR_NOMATCH) return rc;
if ((rc >= 0) ==
@@ -2702,13 +2819,25 @@ for (;;)
/*-----------------------------------------------------------------*/
case OP_RECURSE:
{
+ int rc;
+ int *local_workspace;
+ PCRE2_SIZE *local_offsets;
+ RWS_anchor *rws = (RWS_anchor *)RWS;
dfa_recursion_info *ri;
- PCRE2_SIZE local_offsets[1000];
- int local_workspace[1000];
PCRE2_SPTR callpat = start_code + GET(code, 1);
uint32_t recno = (callpat == mb->start_code)? 0 :
GET2(callpat, 1 + LINK_SIZE);
- int rc;
+
+ if (rws->free < RWS_RSIZE + RWS_OVEC_RSIZE)
+ {
+ rc = more_workspace(&rws, RWS_OVEC_RSIZE, mb);
+ if (rc != 0) return rc;
+ RWS = (int *)rws;
+ }
+
+ local_offsets = (PCRE2_SIZE *)(RWS + rws->size - rws->free);
+ local_workspace = ((int *)local_offsets) + RWS_OVEC_RSIZE;
+ rws->free -= RWS_RSIZE + RWS_OVEC_RSIZE;
/* Check for repeating a recursion without advancing the subject
pointer. This should catch convoluted mutual recursions. (Some simple
@@ -2732,11 +2861,13 @@ for (;;)
ptr, /* where we currently are */
(PCRE2_SIZE)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
- sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ RWS_OVEC_RSIZE/OVEC_UNIT, /* size of same */
local_workspace, /* workspace vector */
- sizeof(local_workspace)/sizeof(int), /* size of same */
- rlevel); /* function recursion level */
+ RWS_RSIZE, /* size of same */
+ rlevel, /* function recursion level */
+ RWS); /* recursion workspace */
+ rws->free += RWS_RSIZE + RWS_OVEC_RSIZE;
mb->recursive = new_recursive.prevrec; /* Done this recursion */
/* Ran out of internal offsets */
@@ -2782,10 +2913,25 @@ for (;;)
case OP_SCBRAPOS:
case OP_BRAPOSZERO:
{
+ int rc;
+ int *local_workspace;
+ PCRE2_SIZE *local_offsets;
PCRE2_SIZE charcount, matched_count;
PCRE2_SPTR local_ptr = ptr;
+ RWS_anchor *rws = (RWS_anchor *)RWS;
BOOL allow_zero;
+ if (rws->free < RWS_RSIZE + RWS_OVEC_OSIZE)
+ {
+ rc = more_workspace(&rws, RWS_OVEC_OSIZE, mb);
+ if (rc != 0) return rc;
+ RWS = (int *)rws;
+ }
+
+ local_offsets = (PCRE2_SIZE *)(RWS + rws->size - rws->free);
+ local_workspace = ((int *)local_offsets) + RWS_OVEC_OSIZE;
+ rws->free -= RWS_RSIZE + RWS_OVEC_OSIZE;
+
if (codevalue == OP_BRAPOSZERO)
{
allow_zero = TRUE;
@@ -2798,19 +2944,17 @@ for (;;)
for (matched_count = 0;; matched_count++)
{
- PCRE2_SIZE local_offsets[2];
- int local_workspace[1000];
-
- int rc = internal_dfa_match(
+ rc = internal_dfa_match(
mb, /* fixed match data */
code, /* this subexpression's code */
local_ptr, /* where we currently are */
(PCRE2_SIZE)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
- sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ RWS_OVEC_OSIZE/OVEC_UNIT, /* size of same */
local_workspace, /* workspace vector */
- sizeof(local_workspace)/sizeof(int), /* size of same */
- rlevel); /* function recursion level */
+ RWS_RSIZE, /* size of same */
+ rlevel, /* function recursion level */
+ RWS); /* recursion workspace */
/* Failed to match */
@@ -2827,6 +2971,8 @@ for (;;)
local_ptr += charcount; /* Advance temporary position ptr */
}
+ rws->free += RWS_RSIZE + RWS_OVEC_OSIZE;
+
/* At this point we have matched the subpattern matched_count
times, and local_ptr is pointing to the character after the end of the
last match. */
@@ -2869,19 +3015,35 @@ for (;;)
/*-----------------------------------------------------------------*/
case OP_ONCE:
{
- PCRE2_SIZE local_offsets[2];
- int local_workspace[1000];
+ int rc;
+ int *local_workspace;
+ PCRE2_SIZE *local_offsets;
+ RWS_anchor *rws = (RWS_anchor *)RWS;
- int rc = internal_dfa_match(
+ if (rws->free < RWS_RSIZE + RWS_OVEC_OSIZE)
+ {
+ rc = more_workspace(&rws, RWS_OVEC_OSIZE, mb);
+ if (rc != 0) return rc;
+ RWS = (int *)rws;
+ }
+
+ local_offsets = (PCRE2_SIZE *)(RWS + rws->size - rws->free);
+ local_workspace = ((int *)local_offsets) + RWS_OVEC_OSIZE;
+ rws->free -= RWS_RSIZE + RWS_OVEC_OSIZE;
+
+ rc = internal_dfa_match(
mb, /* fixed match data */
code, /* this subexpression's code */
ptr, /* where we currently are */
(PCRE2_SIZE)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
- sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ RWS_OVEC_OSIZE/OVEC_UNIT, /* size of same */
local_workspace, /* workspace vector */
- sizeof(local_workspace)/sizeof(int), /* size of same */
- rlevel); /* function recursion level */
+ RWS_RSIZE, /* size of same */
+ rlevel, /* function recursion level */
+ RWS); /* recursion workspace */
+
+ rws->free += RWS_RSIZE + RWS_OVEC_OSIZE;
if (rc >= 0)
{
@@ -3063,6 +3225,7 @@ pcre2_dfa_match(const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length,
PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data,
pcre2_match_context *mcontext, int *workspace, PCRE2_SIZE wscount)
{
+int rc;
const pcre2_real_code *re = (const pcre2_real_code *)code;
PCRE2_SPTR start_match;
@@ -3071,9 +3234,9 @@ PCRE2_SPTR bumpalong_limit;
PCRE2_SPTR req_cu_ptr;
BOOL utf, anchored, startline, firstline;
-
BOOL has_first_cu = FALSE;
BOOL has_req_cu = FALSE;
+
PCRE2_UCHAR first_cu = 0;
PCRE2_UCHAR first_cu2 = 0;
PCRE2_UCHAR req_cu = 0;
@@ -3088,6 +3251,17 @@ pcre2_callout_block cb;
dfa_match_block actual_match_block;
dfa_match_block *mb = &actual_match_block;
+/* Set up a starting block of memory for use during recursive calls to
+internal_dfa_match(). By putting this on the stack, it minimizes resource use
+in the case when it is not needed. If this is too small, more memory is
+obtained from the heap. At the start of each block is an anchor structure.*/
+
+int base_recursion_workspace[RWS_BASE_SIZE];
+RWS_anchor *rws = (RWS_anchor *)base_recursion_workspace;
+rws->next = NULL;
+rws->size = RWS_BASE_SIZE;
+rws->free = RWS_BASE_SIZE - RWS_ANCHOR_SIZE;
+
/* A length equal to PCRE2_ZERO_TERMINATED implies a zero-terminated
subject string. */
@@ -3184,6 +3358,7 @@ if (mcontext == NULL)
mb->memctl = re->memctl;
mb->match_limit = PRIV(default_match_context).match_limit;
mb->match_limit_depth = PRIV(default_match_context).depth_limit;
+ mb->heap_limit = PRIV(default_match_context).heap_limit;
}
else
{
@@ -3198,6 +3373,7 @@ else
mb->memctl = mcontext->memctl;
mb->match_limit = mcontext->match_limit;
mb->match_limit_depth = mcontext->depth_limit;
+ mb->heap_limit = mcontext->heap_limit;
}
if (mb->match_limit > re->limit_match)
@@ -3206,6 +3382,9 @@ if (mb->match_limit > re->limit_match)
if (mb->match_limit_depth > re->limit_depth)
mb->match_limit_depth = re->limit_depth;
+if (mb->heap_limit > re->limit_heap)
+ mb->heap_limit = re->limit_heap;
+
mb->start_code = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
re->name_count * re->name_entry_size;
mb->tables = re->tables;
@@ -3215,6 +3394,7 @@ mb->start_offset = start_offset;
mb->moptions = options;
mb->poptions = re->overall_options;
mb->match_call_count = 0;
+mb->heap_used = 0;
/* Process the \R and newline settings. */
@@ -3351,8 +3531,6 @@ a match. */
for (;;)
{
- int rc;
-
/* ----------------- Start of match optimizations ---------------- */
/* There are some optimizations that avoid running the match if a known
@@ -3544,7 +3722,7 @@ for (;;)
in characters, we treat it as code units to avoid spending too much time
in this optimization. */
- if (end_subject - start_match < re->minlength) return PCRE2_ERROR_NOMATCH;
+ if (end_subject - start_match < re->minlength) goto NOMATCH_EXIT;
/* If req_cu is set, we know that that code unit must appear in the
subject for the match to succeed. If the first code unit is set, req_cu
@@ -3621,7 +3799,8 @@ for (;;)
(uint32_t)match_data->oveccount * 2, /* actual size of same */
workspace, /* workspace vector */
(int)wscount, /* size of same */
- 0); /* function recurse level */
+ 0, /* function recurse level */
+ base_recursion_workspace); /* initial workspace for recursion */
/* Anything other than "no match" means we are done, always; otherwise, carry
on only if not anchored. */
@@ -3637,7 +3816,7 @@ for (;;)
match_data->rightchar = (PCRE2_SIZE)( mb->last_used_ptr - subject);
match_data->startchar = (PCRE2_SIZE)(start_match - subject);
match_data->rc = rc;
- return rc;
+ goto EXIT;
}
/* Advance to the next subject character unless we are at the end of a line
@@ -3668,8 +3847,18 @@ for (;;)
} /* "Bumpalong" loop */
+NOMATCH_EXIT:
+rc = PCRE2_ERROR_NOMATCH;
+
+EXIT:
+while (rws->next != NULL)
+ {
+ RWS_anchor *next = rws->next;
+ rws->next = next->next;
+ mb->memctl.free(next, mb->memctl.memory_data);
+ }
-return PCRE2_ERROR_NOMATCH;
+return rc;
}
/* End of pcre2_dfa_match.c */
diff --git a/thirdparty/pcre2/src/pcre2_error.c b/thirdparty/pcre2/src/pcre2_error.c
index d98cae9963..4b3b3f1bc0 100644
--- a/thirdparty/pcre2/src/pcre2_error.c
+++ b/thirdparty/pcre2/src/pcre2_error.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -107,7 +107,7 @@ static const unsigned char compile_error_texts[] =
/* 35 */
"lookbehind is too complicated\0"
"\\C is not allowed in a lookbehind assertion in UTF-" XSTRING(PCRE2_CODE_UNIT_WIDTH) " mode\0"
- "PCRE does not support \\L, \\l, \\N{name}, \\U, or \\u\0"
+ "PCRE2 does not support \\F, \\L, \\l, \\N{name}, \\U, or \\u\0"
"number after (?C is greater than 255\0"
"closing parenthesis for (?C expected\0"
/* 40 */
@@ -133,7 +133,8 @@ static const unsigned char compile_error_texts[] =
"internal error: unknown newline setting\0"
"\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0"
"(?R (recursive pattern call) must be followed by a closing parenthesis\0"
- "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)\0"
+ /* "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)\0" */
+ "obsolete error (should not occur)\0" /* Was the above */
/* 60 */
"(*VERB) not recognized or malformed\0"
"group number is too big\0"
@@ -160,7 +161,7 @@ static const unsigned char compile_error_texts[] =
"using UCP is disabled by the application\0"
"name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"
"character code point value in \\u.... sequence is too large\0"
- "digits missing in \\x{} or \\o{}\0"
+ "digits missing in \\x{} or \\o{} or \\N{U+}\0"
"syntax error or number too big in (?(VERSION condition\0"
/* 80 */
"internal error: unknown opcode in auto_possessify()\0"
@@ -178,6 +179,8 @@ static const unsigned char compile_error_texts[] =
"internal error: bad code value in parsed_skip()\0"
"PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES is not allowed in UTF-16 mode\0"
"invalid option bits with PCRE2_LITERAL\0"
+ "\\N{U+dddd} is supported only in Unicode (UTF) mode\0"
+ "invalid hyphen in option setting\0"
;
/* Match-time and UTF error texts are in the same format. */
@@ -255,11 +258,13 @@ static const unsigned char match_error_texts[] =
"expected closing curly bracket in replacement string\0"
"bad substitution in replacement string\0"
/* 60 */
- "match with end before start is not supported\0"
+ "match with end before start or start moved backwards is not supported\0"
"too many replacements (more than INT_MAX)\0"
"bad serialized data\0"
"heap limit exceeded\0"
"invalid syntax\0"
+ /* 65 */
+ "internal error - duplicate substitution match\0"
;
diff --git a/thirdparty/pcre2/src/pcre2_extuni.c b/thirdparty/pcre2/src/pcre2_extuni.c
index 11a0bfbdd6..237211abf7 100644
--- a/thirdparty/pcre2/src/pcre2_extuni.c
+++ b/thirdparty/pcre2/src/pcre2_extuni.c
@@ -129,11 +129,11 @@ while (eptr < end_subject)
if ((ricount & 1) != 0) break; /* Grapheme break required */
}
- /* If Extend follows E_Base[_GAZ] do not update lgb; this allows
- any number of Extend before a following E_Modifier. */
+ /* If Extend or ZWJ follows Extended_Pictographic, do not update lgb; this
+ allows any number of them before a following Extended_Pictographic. */
- if (rgb != ucp_gbExtend ||
- (lgb != ucp_gbE_Base && lgb != ucp_gbE_Base_GAZ))
+ if ((rgb != ucp_gbExtend && rgb != ucp_gbZWJ) ||
+ lgb != ucp_gbExtended_Pictographic)
lgb = rgb;
eptr += len;
diff --git a/thirdparty/pcre2/src/pcre2_find_bracket.c b/thirdparty/pcre2/src/pcre2_find_bracket.c
index 357385a11c..70baa1394f 100644
--- a/thirdparty/pcre2/src/pcre2_find_bracket.c
+++ b/thirdparty/pcre2/src/pcre2_find_bracket.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -131,6 +131,7 @@ for (;;)
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
diff --git a/thirdparty/pcre2/src/pcre2_internal.h b/thirdparty/pcre2/src/pcre2_internal.h
index 3db9d604f4..8750f2f174 100644
--- a/thirdparty/pcre2/src/pcre2_internal.h
+++ b/thirdparty/pcre2/src/pcre2_internal.h
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -165,6 +165,16 @@ by "configure". */
#define INT64_OR_DOUBLE double
#endif
+/* External (in the C sense) functions and tables that are private to the
+libraries are always referenced using the PRIV macro. This makes it possible
+for pcre2test.c to include some of the source files from the libraries using a
+different PRIV definition to avoid name clashes. It also makes it clear in the
+code that a non-static object is being referenced. */
+
+#ifndef PRIV
+#define PRIV(name) _pcre2_##name
+#endif
+
/* When compiling for use with the Virtual Pascal compiler, these functions
need to have their names changed. PCRE2 must be compiled with the -DVPCOMPAT
option on the command line. */
@@ -178,50 +188,15 @@ option on the command line. */
#define memset(s,c,n) _memset(s,c,n)
#else /* VPCOMPAT */
-/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),
-define a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY
-is set. Otherwise, include an emulating function for those systems that have
-neither (there some non-Unix environments where this is the case). */
+/* Otherwise, to cope with SunOS4 and other systems that lack memmove(), define
+a macro that calls an emulating function. */
#ifndef HAVE_MEMMOVE
-#undef memmove /* some systems may have a macro */
-#ifdef HAVE_BCOPY
-#define memmove(a, b, c) bcopy(b, a, c)
-#else /* HAVE_BCOPY */
-static void *
-pcre2_memmove(void *d, const void *s, size_t n)
-{
-size_t i;
-unsigned char *dest = (unsigned char *)d;
-const unsigned char *src = (const unsigned char *)s;
-if (dest > src)
- {
- dest += n;
- src += n;
- for (i = 0; i < n; ++i) *(--dest) = *(--src);
- return (void *)dest;
- }
-else
- {
- for (i = 0; i < n; ++i) *dest++ = *src++;
- return (void *)(dest - n);
- }
-}
-#define memmove(a, b, c) pcre2_memmove(a, b, c)
-#endif /* not HAVE_BCOPY */
+#undef memmove /* Some systems may have a macro */
+#define memmove(a, b, c) PRIV(memmove)(a, b, c)
#endif /* not HAVE_MEMMOVE */
#endif /* not VPCOMPAT */
-/* External (in the C sense) functions and tables that are private to the
-libraries are always referenced using the PRIV macro. This makes it possible
-for pcre2test.c to include some of the source files from the libraries using a
-different PRIV definition to avoid name clashes. It also makes it clear in the
-code that a non-static object is being referenced. */
-
-#ifndef PRIV
-#define PRIV(name) _pcre2_##name
-#endif
-
/* This is an unsigned int value that no UTF character can ever have, as
Unicode doesn't go beyond 0x0010ffff. */
@@ -247,12 +222,17 @@ not rely on this. */
pcre2_match() is allocated on the system stack, of this size (bytes). The size
must be a multiple of sizeof(PCRE2_SPTR) in all environments, so making it a
multiple of 8 is best. Typical frame sizes are a few hundred bytes (it depends
-on the number of capturing parentheses) so 20K handles quite a few frames. A
+on the number of capturing parentheses) so 20KiB handles quite a few frames. A
larger vector on the heap is obtained for patterns that need more frames. The
maximum size of this can be limited. */
#define START_FRAMES_SIZE 20480
+/* Similarly, for DFA matching, an initial internal workspace vector is
+allocated on the stack. */
+
+#define DFA_START_RWS_SIZE 30720
+
/* Define the default BSR convention. */
#ifdef BSR_ANYCRLF
@@ -585,14 +565,15 @@ these tables. */
#define cbit_cntrl 288 /* [:cntrl:] */
#define cbit_length 320 /* Length of the cbits table */
-/* Bit definitions for entries in the ctypes table. */
+/* Bit definitions for entries in the ctypes table. Do not change these values
+without checking pcre2_jit_compile.c, which has an assertion to ensure that
+ctype_word has the value 16. */
#define ctype_space 0x01
#define ctype_letter 0x02
#define ctype_digit 0x04
-#define ctype_xdigit 0x08
+#define ctype_xdigit 0x08 /* not actually used any more */
#define ctype_word 0x10 /* alphanumeric or '_' */
-#define ctype_meta 0x80 /* regexp meta char or zero (end pattern) */
/* Offsets of the various tables from the base tables pointer, and
total length of the tables. */
@@ -1267,36 +1248,6 @@ contain characters with values greater than 255. */
#define XCL_PROP 3 /* Unicode property (2-byte property code follows) */
#define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */
-/* Escape items that are just an encoding of a particular data value. These
-appear in the escapes[] table in pcre2_compile.c as positive numbers. */
-
-#ifndef ESC_a
-#define ESC_a CHAR_BEL
-#endif
-
-#ifndef ESC_e
-#define ESC_e CHAR_ESC
-#endif
-
-#ifndef ESC_f
-#define ESC_f CHAR_FF
-#endif
-
-#ifndef ESC_n
-#define ESC_n CHAR_LF
-#endif
-
-#ifndef ESC_r
-#define ESC_r CHAR_CR
-#endif
-
-/* We can't officially use ESC_t because it is a POSIX reserved identifier
-(presumably because of all the others like size_t). */
-
-#ifndef ESC_tee
-#define ESC_tee CHAR_HT
-#endif
-
/* These are escaped items that aren't just an encoding of a particular data
value such as \n. They must have non-zero values, as check_escape() returns 0
for a data character. In the escapes[] table in pcre2_compile.c their values
@@ -1578,23 +1529,26 @@ enum {
OP_THEN, /* 155 */
OP_THEN_ARG, /* 156 same, but with argument */
OP_COMMIT, /* 157 */
+ OP_COMMIT_ARG, /* 158 same, but with argument */
- /* These are forced failure and success verbs */
+ /* These are forced failure and success verbs. FAIL and ACCEPT do accept an
+ argument, but these cases can be compiled as, for example, (*MARK:X)(*FAIL)
+ without the need for a special opcode. */
- OP_FAIL, /* 158 */
- OP_ACCEPT, /* 159 */
- OP_ASSERT_ACCEPT, /* 160 Used inside assertions */
- OP_CLOSE, /* 161 Used before OP_ACCEPT to close open captures */
+ OP_FAIL, /* 159 */
+ OP_ACCEPT, /* 160 */
+ OP_ASSERT_ACCEPT, /* 161 Used inside assertions */
+ OP_CLOSE, /* 162 Used before OP_ACCEPT to close open captures */
/* This is used to skip a subpattern with a {0} quantifier */
- OP_SKIPZERO, /* 162 */
+ OP_SKIPZERO, /* 163 */
/* This is used to identify a DEFINE group during compilation so that it can
be checked for having only one branch. It is changed to OP_FALSE before
compilation finishes. */
- OP_DEFINE, /* 163 */
+ OP_DEFINE, /* 164 */
/* This is not an opcode, but is used to check that tables indexed by opcode
are the correct length, in order to catch updating errors - there have been
@@ -1650,7 +1604,7 @@ some cases doesn't actually use these names at all). */
"Cond false", "Cond true", \
"Brazero", "Braminzero", "Braposzero", \
"*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP", \
- "*THEN", "*THEN", "*COMMIT", "*FAIL", \
+ "*THEN", "*THEN", "*COMMIT", "*COMMIT", "*FAIL", \
"*ACCEPT", "*ASSERT_ACCEPT", \
"Close", "Skip zero", "Define"
@@ -1742,7 +1696,8 @@ in UTF-8 mode. The code that uses this table must know about such things. */
3, 1, 3, /* MARK, PRUNE, PRUNE_ARG */ \
1, 3, /* SKIP, SKIP_ARG */ \
1, 3, /* THEN, THEN_ARG */ \
- 1, 1, 1, 1, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */ \
+ 1, 3, /* COMMIT, COMMIT_ARG */ \
+ 1, 1, 1, /* FAIL, ACCEPT, ASSERT_ACCEPT */ \
1+IMM2_SIZE, 1, /* CLOSE, SKIPZERO */ \
1 /* DEFINE */
@@ -1896,7 +1851,7 @@ extern const ucd_record PRIV(ucd_records)[];
#if PCRE2_CODE_UNIT_WIDTH == 32
extern const ucd_record PRIV(dummy_ucd_record)[];
#endif
-extern const uint8_t PRIV(ucd_stage1)[];
+extern const uint16_t PRIV(ucd_stage1)[];
extern const uint16_t PRIV(ucd_stage2)[];
extern const uint32_t PRIV(ucp_gbtable)[];
extern const uint32_t PRIV(ucp_gentype)[];
@@ -1976,6 +1931,14 @@ extern int _pcre2_valid_utf(PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE *);
extern BOOL _pcre2_was_newline(PCRE2_SPTR, uint32_t, PCRE2_SPTR,
uint32_t *, BOOL);
extern BOOL _pcre2_xclass(uint32_t, PCRE2_SPTR, BOOL);
+
+/* This function is needed only when memmove() is not available. */
+
+#if !defined(VPCOMPAT) && !defined(HAVE_MEMMOVE)
+#define _pcre2_memmove PCRE2_SUFFIX(_pcre2_memmove)
+extern void * _pcre2_memmove(void *, const void *, size_t);
+#endif
+
#endif /* PCRE2_CODE_UNIT_WIDTH */
#endif /* PCRE2_INTERNAL_H_IDEMPOTENT_GUARD */
diff --git a/thirdparty/pcre2/src/pcre2_intmodedep.h b/thirdparty/pcre2/src/pcre2_intmodedep.h
index c4c4c3adb9..62626d0a8a 100644
--- a/thirdparty/pcre2/src/pcre2_intmodedep.h
+++ b/thirdparty/pcre2/src/pcre2_intmodedep.h
@@ -793,11 +793,23 @@ typedef struct heapframe {
uint8_t return_id; /* Where to go on in internal "return" */
uint8_t op; /* Processing opcode */
+ /* At this point, the structure is 16-bit aligned. On most architectures
+ the alignment requirement for a pointer will ensure that the eptr field below
+ is 32-bit or 64-bit aligned. However, on m68k it is fine to have a pointer
+ that is 16-bit aligned. We must therefore ensure that what comes between here
+ and eptr is an odd multiple of 16 bits so as to get back into 32-bit
+ alignment. This happens naturally when PCRE2_UCHAR is 8 bits wide, but needs
+ fudges in the other cases. In the 32-bit case the padding comes first so that
+ the occu field itself is 32-bit aligned. Without the padding, this structure
+ is no longer a multiple of PCRE2_SIZE on m68k, and the check below fails. */
+
#if PCRE2_CODE_UNIT_WIDTH == 8
PCRE2_UCHAR occu[6]; /* Used for other case code units */
#elif PCRE2_CODE_UNIT_WIDTH == 16
PCRE2_UCHAR occu[2]; /* Used for other case code units */
+ uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
#else
+ uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
PCRE2_UCHAR occu[1]; /* Used for other case code units */
#endif
@@ -818,6 +830,9 @@ typedef struct heapframe {
PCRE2_SIZE ovector[131072]; /* Must be last in the structure */
} heapframe;
+/* This typedef is a check that the size of the heapframe structure is a
+multiple of PCRE2_SIZE. See various comments above. */
+
typedef char check_heapframe_size[
((sizeof(heapframe) % sizeof(PCRE2_SIZE)) == 0)? (+1):(-1)];
@@ -881,6 +896,8 @@ typedef struct dfa_match_block {
PCRE2_SPTR last_used_ptr; /* Latest consulted character */
const uint8_t *tables; /* Character tables */
PCRE2_SIZE start_offset; /* The start offset value */
+ PCRE2_SIZE heap_limit; /* As it says */
+ PCRE2_SIZE heap_used; /* As it says */
uint32_t match_limit; /* As it says */
uint32_t match_limit_depth; /* As it says */
uint32_t match_call_count; /* Number of calls of internal function */
diff --git a/thirdparty/pcre2/src/pcre2_jit_compile.c b/thirdparty/pcre2/src/pcre2_jit_compile.c
index 80ed1c4ca6..32e985b793 100644
--- a/thirdparty/pcre2/src/pcre2_jit_compile.c
+++ b/thirdparty/pcre2/src/pcre2_jit_compile.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -839,6 +839,7 @@ switch(*cc)
#endif
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
@@ -939,6 +940,7 @@ while (cc < ccend)
common->control_head_ptr = 1;
/* Fall through. */
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_MARK:
if (common->mark_ptr == 0)
@@ -1553,6 +1555,7 @@ while (cc < ccend)
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_THEN_ARG:
SLJIT_ASSERT(common->mark_ptr != 0);
@@ -1733,6 +1736,7 @@ while (cc < ccend)
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_THEN_ARG:
SLJIT_ASSERT(common->mark_ptr != 0);
@@ -2041,6 +2045,7 @@ while (cc < ccend)
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_THEN_ARG:
SLJIT_ASSERT(common->mark_ptr != 0);
@@ -2428,6 +2433,7 @@ while (cc < ccend)
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_THEN_ARG:
SLJIT_ASSERT(common->mark_ptr != 0);
@@ -3666,7 +3672,8 @@ if (!common->utf)
#endif
OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
-OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
+OP1(SLJIT_MOV_U16, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK);
OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
@@ -5894,6 +5901,8 @@ for (i = 0; i < 32; i++)
}
}
+if (len == 0) return FALSE; /* Should never occur, but stops analyzers complaining. */
+
i = 0;
j = 0;
@@ -6627,7 +6636,8 @@ if (needstype || needsscript)
#endif
OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
- OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV_U16, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK);
OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
@@ -7254,10 +7264,11 @@ while (cc < end_subject)
if ((ricount & 1) != 0) break; /* Grapheme break required */
}
- /* If Extend follows E_Base[_GAZ] do not update lgb; this allows
- any number of Extend before a following E_Modifier. */
+ /* If Extend or ZWJ follows Extended_Pictographic, do not update lgb; this
+ allows any number of them before a following Extended_Pictographic. */
- if (rgb != ucp_gbExtend || (lgb != ucp_gbE_Base && lgb != ucp_gbE_Base_GAZ))
+ if ((rgb != ucp_gbExtend && rgb != ucp_gbZWJ) ||
+ lgb != ucp_gbExtended_Pictographic)
lgb = rgb;
prevcc = cc;
@@ -7309,10 +7320,11 @@ while (cc < end_subject)
if ((ricount & 1) != 0) break; /* Grapheme break required */
}
- /* If Extend follows E_Base[_GAZ] do not update lgb; this allows
- any number of Extend before a following E_Modifier. */
+ /* If Extend or ZWJ follows Extended_Pictographic, do not update lgb; this
+ allows any number of them before a following Extended_Pictographic. */
- if (rgb != ucp_gbExtend || (lgb != ucp_gbE_Base && lgb != ucp_gbE_Base_GAZ))
+ if ((rgb != ucp_gbExtend && rgb != ucp_gbZWJ) ||
+ lgb != ucp_gbExtended_Pictographic)
lgb = rgb;
cc++;
@@ -10346,7 +10358,8 @@ backtrack_common *backtrack;
PCRE2_UCHAR opcode = *cc;
PCRE2_SPTR ccend = cc + 1;
-if (opcode == OP_PRUNE_ARG || opcode == OP_SKIP_ARG || opcode == OP_THEN_ARG)
+if (opcode == OP_COMMIT_ARG || opcode == OP_PRUNE_ARG ||
+ opcode == OP_SKIP_ARG || opcode == OP_THEN_ARG)
ccend += 2 + cc[1];
PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
@@ -10358,7 +10371,7 @@ if (opcode == OP_SKIP)
return ccend;
}
-if (opcode == OP_PRUNE_ARG || opcode == OP_THEN_ARG)
+if (opcode == OP_COMMIT_ARG || opcode == OP_PRUNE_ARG || opcode == OP_THEN_ARG)
{
OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
@@ -10677,6 +10690,7 @@ while (cc < ccend)
case OP_THEN:
case OP_THEN_ARG:
case OP_COMMIT:
+ case OP_COMMIT_ARG:
cc = compile_control_verb_matchingpath(common, cc, parent);
break;
@@ -11751,6 +11765,7 @@ while (current)
break;
case OP_COMMIT:
+ case OP_COMMIT_ARG:
if (!common->local_quit_available)
OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
if (common->quit_label == NULL)
diff --git a/thirdparty/pcre2/src/pcre2_maketables.c b/thirdparty/pcre2/src/pcre2_maketables.c
index 2c7ae84d86..537edba8c3 100644
--- a/thirdparty/pcre2/src/pcre2_maketables.c
+++ b/thirdparty/pcre2/src/pcre2_maketables.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -141,13 +141,6 @@ for (i = 0; i < 256; i++)
if (isdigit(i)) x += ctype_digit;
if (isxdigit(i)) x += ctype_xdigit;
if (isalnum(i) || i == '_') x += ctype_word;
-
- /* Note: strchr includes the terminating zero in the characters it considers.
- In this instance, that is ok because we want binary zero to be flagged as a
- meta-character, which in this sense is any character that terminates a run
- of data characters. */
-
- if (strchr("\\*+?{^.$|()[", i) != 0) x += ctype_meta;
*p++ = x;
}
diff --git a/thirdparty/pcre2/src/pcre2_match.c b/thirdparty/pcre2/src/pcre2_match.c
index 79cc93f918..8741e1432d 100644
--- a/thirdparty/pcre2/src/pcre2_match.c
+++ b/thirdparty/pcre2/src/pcre2_match.c
@@ -43,11 +43,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include "config.h"
#endif
-/* These defines enables debugging code */
+/* These defines enable debugging code */
-//#define DEBUG_FRAMES_DISPLAY
-//#define DEBUG_SHOW_OPS
-//#define DEBUG_SHOW_RMATCH
+/* #define DEBUG_FRAMES_DISPLAY */
+/* #define DEBUG_SHOW_OPS */
+/* #define DEBUG_SHOW_RMATCH */
#ifdef DEBUG_FRAME_DISPLAY
#include <stdarg.h>
@@ -149,7 +149,7 @@ changed, the code at RETURN_SWITCH below must be updated in sync. */
enum { RM1=1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, RM10,
RM11, RM12, RM13, RM14, RM15, RM16, RM17, RM18, RM19, RM20,
RM21, RM22, RM23, RM24, RM25, RM26, RM27, RM28, RM29, RM30,
- RM31, RM32, RM33, RM34, RM35 };
+ RM31, RM32, RM33, RM34, RM35, RM36 };
#ifdef SUPPORT_WIDE_CHARS
enum { RM100=100, RM101 };
@@ -770,7 +770,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
/* ===================================================================== */
/* Real or forced end of the pattern, assertion, or recursion. In an
assertion ACCEPT, update the last used pointer and remember the current
- frame so that the captures can be fished out of it. */
+ frame so that the captures and mark can be fished out of it. */
case OP_ASSERT_ACCEPT:
if (Feptr > mb->last_used_ptr) mb->last_used_ptr = Feptr;
@@ -1776,7 +1776,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
/* ===================================================================== */
- /* Match a bit-mapped character class, possibly repeatedly. These op codes
+ /* Match a bit-mapped character class, possibly repeatedly. These opcodes
are used when all the characters in the class have values in the range
0-255, and either the matching is caseful, or the characters are in the
range 0-127 when UTF processing is enabled. The only difference between
@@ -1962,11 +1962,15 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
if (reptype == REPTYPE_POS) continue; /* No backtracking */
+ /* After \C in UTF mode, Lstart_eptr might be in the middle of a
+ Unicode character. Use <= Lstart_eptr to ensure backtracking doesn't
+ go too far. */
+
for (;;)
{
RMATCH(Fecode, RM201);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (Feptr-- == Lstart_eptr) break; /* Tried at original position */
+ if (Feptr-- <= Lstart_eptr) break; /* Tried at original position */
BACKCHAR(Feptr);
}
}
@@ -2126,11 +2130,15 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
if (reptype == REPTYPE_POS) continue; /* No backtracking */
+ /* After \C in UTF mode, Lstart_eptr might be in the middle of a
+ Unicode character. Use <= Lstart_eptr to ensure backtracking doesn't
+ go too far. */
+
for(;;)
{
RMATCH(Fecode, RM101);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (Feptr-- == Lstart_eptr) break; /* Tried at original position */
+ if (Feptr-- <= Lstart_eptr) break; /* Tried at original position */
#ifdef SUPPORT_UNICODE
if (utf) BACKCHAR(Feptr);
#endif
@@ -2456,7 +2464,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
/* ===================================================================== */
/* Match a single character type repeatedly. Note that the property type
- does not need to be in a stack frame as it not used within an RMATCH()
+ does not need to be in a stack frame as it is not used within an RMATCH()
loop. */
#define Lstart_eptr F->temp_sptr[0]
@@ -4002,8 +4010,8 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
if (reptype == REPTYPE_POS) continue; /* No backtracking */
/* After \C in UTF mode, Lstart_eptr might be in the middle of a
- Unicode character. Use <= pp to ensure backtracking doesn't go too far.
- */
+ Unicode character. Use <= Lstart_eptr to ensure backtracking doesn't
+ go too far. */
for(;;)
{
@@ -4135,7 +4143,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
}
break;
- /* The "byte" (i.e. "code unit") case is the same as non-UTF */
+ /* The "byte" (i.e. "code unit") case is the same as non-UTF */
case OP_ANYBYTE:
fc = Lmax - Lmin;
@@ -5111,7 +5119,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
/* Positive assertions are like other groups except that PCRE doesn't allow
the effect of (*THEN) to escape beyond an assertion; it is therefore
treated as NOMATCH. (*ACCEPT) is treated as successful assertion, with its
- captures retained. Any other return is an error. */
+ captures and mark retained. Any other return is an error. */
#define Lframe_type F->temp_32[0]
@@ -5128,6 +5136,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
(char *)assert_accept_frame + offsetof(heapframe, ovector),
assert_accept_frame->offset_top * sizeof(PCRE2_SIZE));
Foffset_top = assert_accept_frame->offset_top;
+ Fmark = assert_accept_frame->mark;
break;
}
if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
@@ -5416,7 +5425,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
Feptr -= number;
}
- /* Save the earliest consulted character, then skip to next op code */
+ /* Save the earliest consulted character, then skip to next opcode */
if (Feptr < mb->start_used_ptr) mb->start_used_ptr = Feptr;
Fecode += 1 + LINK_SIZE;
@@ -5501,7 +5510,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
frame so that it points to the final branch. */
case OP_ONCE:
- Fback_frame = ((char *)F - (char *)P) + frame_size;
+ Fback_frame = ((char *)F - (char *)P);
for (;;)
{
uint32_t y = GET(P->ecode,1);
@@ -5829,6 +5838,13 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
mb->verb_current_recurse = Fcurrent_recurse;
RRETURN(MATCH_COMMIT);
+ case OP_COMMIT_ARG:
+ Fmark = mb->nomatch_mark = Fecode + 2;
+ RMATCH(Fecode + PRIV(OP_lengths)[*Fecode] + Fecode[1], RM36);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->verb_current_recurse = Fcurrent_recurse;
+ RRETURN(MATCH_COMMIT);
+
case OP_PRUNE:
RMATCH(Fecode + PRIV(OP_lengths)[*Fecode], RM14);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
@@ -5921,7 +5937,7 @@ in rrc. */
RETURN_SWITCH:
if (Frdepth == 0) return rrc; /* Exit from the top level */
-F = (heapframe *)((char *)F - Fback_frame); /* Back track */
+F = (heapframe *)((char *)F - Fback_frame); /* Backtrack */
mb->cb->callout_flags |= PCRE2_CALLOUT_BACKTRACK; /* Note for callouts */
#ifdef DEBUG_SHOW_RMATCH
@@ -5934,7 +5950,7 @@ switch (Freturn_id)
LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(16)
LBL(17) LBL(18) LBL(19) LBL(20) LBL(21) LBL(22) LBL(23) LBL(24)
LBL(25) LBL(26) LBL(27) LBL(28) LBL(29) LBL(30) LBL(31) LBL(32)
- LBL(33) LBL(34) LBL(35)
+ LBL(33) LBL(34) LBL(35) LBL(36)
#ifdef SUPPORT_WIDE_CHARS
LBL(100) LBL(101)
@@ -6275,7 +6291,7 @@ mb->match_limit_depth = (mcontext->depth_limit < re->limit_depth)?
/* If a pattern has very many capturing parentheses, the frame size may be very
large. Ensure that there are at least 10 available frames by getting an initial
vector on the heap if necessary, except when the heap limit prevents this. Get
-fewer if possible. (The heap limit is in kilobytes.) */
+fewer if possible. (The heap limit is in kibibytes.) */
if (frame_size <= START_FRAMES_SIZE/10)
{
diff --git a/thirdparty/pcre2/src/pcre2_pattern_info.c b/thirdparty/pcre2/src/pcre2_pattern_info.c
index 906e9198f5..a29f5eff67 100644
--- a/thirdparty/pcre2/src/pcre2_pattern_info.c
+++ b/thirdparty/pcre2/src/pcre2_pattern_info.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -390,6 +390,7 @@ while (TRUE)
#endif
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
diff --git a/thirdparty/pcre2/src/pcre2_serialize.c b/thirdparty/pcre2/src/pcre2_serialize.c
index d2cc603cbb..cec1a035d1 100644
--- a/thirdparty/pcre2/src/pcre2_serialize.c
+++ b/thirdparty/pcre2/src/pcre2_serialize.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -127,7 +127,25 @@ dst_bytes += tables_length;
for (i = 0; i < number_of_codes; i++)
{
re = (const pcre2_real_code *)(codes[i]);
- memcpy(dst_bytes, (char *)re, re->blocksize);
+ (void)memcpy(dst_bytes, (char *)re, re->blocksize);
+
+ /* Certain fields in the compiled code block are re-set during
+ deserialization. In order to ensure that the serialized data stream is always
+ the same for the same pattern, set them to zero here. We can't assume the
+ copy of the pattern is correctly aligned for accessing the fields as part of
+ a structure. Note the use of sizeof(void *) in the second of these, to
+ specify the size of a pointer. If sizeof(uint8_t *) is used (tables is a
+ pointer to uint8_t), gcc gives a warning because the first argument is also a
+ pointer to uint8_t. Casting the first argument to (void *) can stop this, but
+ it didn't stop Coverity giving the same complaint. */
+
+ (void)memset(dst_bytes + offsetof(pcre2_real_code, memctl), 0,
+ sizeof(pcre2_memctl));
+ (void)memset(dst_bytes + offsetof(pcre2_real_code, tables), 0,
+ sizeof(void *));
+ (void)memset(dst_bytes + offsetof(pcre2_real_code, executable_jit), 0,
+ sizeof(void *));
+
dst_bytes += re->blocksize;
}
diff --git a/thirdparty/pcre2/src/pcre2_string_utils.c b/thirdparty/pcre2/src/pcre2_string_utils.c
index 2a1f282629..d6be01acf5 100644
--- a/thirdparty/pcre2/src/pcre2_string_utils.c
+++ b/thirdparty/pcre2/src/pcre2_string_utils.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016 University of Cambridge
+ New API code Copyright (c) 2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,42 @@ functions work only on 8-bit data. */
/*************************************************
+* Emulated memmove() for systems without it *
+*************************************************/
+
+/* This function can make use of bcopy() if it is available. Otherwise do it by
+steam, as there some non-Unix environments that lack both memmove() and
+bcopy(). */
+
+#if !defined(VPCOMPAT) && !defined(HAVE_MEMMOVE)
+void *
+PRIV(memmove)(void *d, const void *s, size_t n)
+{
+#ifdef HAVE_BCOPY
+bcopy(s, d, n);
+return d;
+#else
+size_t i;
+unsigned char *dest = (unsigned char *)d;
+const unsigned char *src = (const unsigned char *)s;
+if (dest > src)
+ {
+ dest += n;
+ src += n;
+ for (i = 0; i < n; ++i) *(--dest) = *(--src);
+ return (void *)dest;
+ }
+else
+ {
+ for (i = 0; i < n; ++i) *dest++ = *src++;
+ return (void *)(dest - n);
+ }
+#endif /* not HAVE_BCOPY */
+}
+#endif /* not VPCOMPAT && not HAVE_MEMMOVE */
+
+
+/*************************************************
* Compare two zero-terminated PCRE2 strings *
*************************************************/
diff --git a/thirdparty/pcre2/src/pcre2_study.c b/thirdparty/pcre2/src/pcre2_study.c
index b92686759d..acbf98b41b 100644
--- a/thirdparty/pcre2/src/pcre2_study.c
+++ b/thirdparty/pcre2/src/pcre2_study.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -707,6 +707,7 @@ for (;;)
/* Skip these, but we need to add in the name length. */
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
@@ -956,6 +957,7 @@ do
case OP_CIRCM:
case OP_CLOSE:
case OP_COMMIT:
+ case OP_COMMIT_ARG:
case OP_COND:
case OP_CREF:
case OP_FALSE:
@@ -1274,7 +1276,7 @@ do
break;
/* Single character types set the bits and stop. Note that if PCRE2_UCP
- is set, we do not see these op codes because \d etc are converted to
+ is set, we do not see these opcodes because \d etc are converted to
properties. Therefore, these apply in the case when only characters less
than 256 are recognized to match the types. */
diff --git a/thirdparty/pcre2/src/pcre2_substitute.c b/thirdparty/pcre2/src/pcre2_substitute.c
index 8da951fc6e..ab8d10908a 100644
--- a/thirdparty/pcre2/src/pcre2_substitute.c
+++ b/thirdparty/pcre2/src/pcre2_substitute.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -238,10 +238,12 @@ PCRE2_SPTR repend;
PCRE2_SIZE extra_needed = 0;
PCRE2_SIZE buff_offset, buff_length, lengthleft, fraglength;
PCRE2_SIZE *ovector;
+PCRE2_SIZE ovecsave[3];
buff_offset = 0;
lengthleft = buff_length = *blength;
*blength = PCRE2_UNSET;
+ovecsave[0] = ovecsave[1] = ovecsave[2] = PCRE2_UNSET;
/* Partial matching is not valid. */
@@ -361,13 +363,33 @@ do
}
/* Handle a successful match. Matches that use \K to end before they start
- are not supported. */
-
- if (ovector[1] < ovector[0])
+ or start before the current point in the subject are not supported. */
+
+ if (ovector[1] < ovector[0] || ovector[0] < start_offset)
{
rc = PCRE2_ERROR_BADSUBSPATTERN;
goto EXIT;
}
+
+ /* Check for the same match as previous. This is legitimate after matching an
+ empty string that starts after the initial match offset. We have tried again
+ at the match point in case the pattern is one like /(?<=\G.)/ which can never
+ match at its starting point, so running the match achieves the bumpalong. If
+ we do get the same (null) match at the original match point, it isn't such a
+ pattern, so we now do the empty string magic. In all other cases, a repeat
+ match should never occur. */
+
+ if (ovecsave[0] == ovector[0] && ovecsave[1] == ovector[1])
+ {
+ if (ovector[0] == ovector[1] && ovecsave[2] != start_offset)
+ {
+ goptions = PCRE2_NOTEMPTY_ATSTART | PCRE2_ANCHORED;
+ ovecsave[2] = start_offset;
+ continue; /* Back to the top of the loop */
+ }
+ rc = PCRE2_ERROR_INTERNAL_DUPMATCH;
+ goto EXIT;
+ }
/* Count substitutions with a paranoid check for integer overflow; surely no
real call to this function would ever hit this! */
@@ -799,13 +821,18 @@ do
} /* End handling a literal code unit */
} /* End of loop for scanning the replacement. */
- /* The replacement has been copied to the output. Update the start offset to
- point to the rest of the subject string. If we matched an empty string,
- do the magic for global matches. */
-
- start_offset = ovector[1];
- goptions = (ovector[0] != ovector[1])? 0 :
+ /* The replacement has been copied to the output. Save the details of this
+ match. See above for how this data is used. If we matched an empty string, do
+ the magic for global matches. Finally, update the start offset to point to
+ the rest of the subject string. */
+
+ ovecsave[0] = ovector[0];
+ ovecsave[1] = ovector[1];
+ ovecsave[2] = start_offset;
+
+ goptions = (ovector[0] != ovector[1] || ovector[0] > start_offset)? 0 :
PCRE2_ANCHORED|PCRE2_NOTEMPTY_ATSTART;
+ start_offset = ovector[1];
} while ((suboptions & PCRE2_SUBSTITUTE_GLOBAL) != 0); /* Repeat "do" loop */
/* Copy the rest of the subject. */
diff --git a/thirdparty/pcre2/src/pcre2_tables.c b/thirdparty/pcre2/src/pcre2_tables.c
index 9f8dc293aa..83d6f9de55 100644
--- a/thirdparty/pcre2/src/pcre2_tables.c
+++ b/thirdparty/pcre2/src/pcre2_tables.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -137,9 +137,10 @@ const uint32_t PRIV(ucp_gentype)[] = {
/* This table encodes the rules for finding the end of an extended grapheme
cluster. Every code point has a grapheme break property which is one of the
-ucp_gbXX values defined in pcre2_ucp.h. The 2-dimensional table is indexed by
-the properties of two adjacent code points. The left property selects a word
-from the table, and the right property selects a bit from that word like this:
+ucp_gbXX values defined in pcre2_ucp.h. These changed between Unicode versions
+10 and 11. The 2-dimensional table is indexed by the properties of two adjacent
+code points. The left property selects a word from the table, and the right
+property selects a bit from that word like this:
PRIV(ucp_gbtable)[left-property] & (1 << right-property)
@@ -166,49 +167,41 @@ are implementing).
6. Do not break after Prepend characters.
-7. Do not break within emoji modifier sequences (E_Base or E_Base_GAZ followed
- by E_Modifier). Extend characters are allowed before the modifier; this
- cannot be represented in this table, the code has to deal with it.
+7. Do not break within emoji modifier sequences or emoji zwj sequences. That
+ is, do not break between characters with the Extended_Pictographic property.
+ Extend and ZWJ characters are allowed between the characters; this cannot be
+ represented in this table, the code has to deal with it.
-8. Do not break within emoji zwj sequences (ZWJ followed by Glue_After_Zwj or
- E_Base_GAZ).
-
-9. Do not break within emoji flag sequences. That is, do not break between
+8. Do not break within emoji flag sequences. That is, do not break between
regional indicator (RI) symbols if there are an odd number of RI characters
before the break point. This table encodes "join RI characters"; the code
has to deal with checking for previous adjoining RIs.
-10. Otherwise, break everywhere.
+9. Otherwise, break everywhere.
*/
#define ESZ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbZWJ)
const uint32_t PRIV(ucp_gbtable)[] = {
- (1<<ucp_gbLF), /* 0 CR */
- 0, /* 1 LF */
- 0, /* 2 Control */
- ESZ, /* 3 Extend */
- ESZ|(1<<ucp_gbPrepend)| /* 4 Prepend */
+ (1<<ucp_gbLF), /* 0 CR */
+ 0, /* 1 LF */
+ 0, /* 2 Control */
+ ESZ, /* 3 Extend */
+ ESZ|(1<<ucp_gbPrepend)| /* 4 Prepend */
(1<<ucp_gbL)|(1<<ucp_gbV)|(1<<ucp_gbT)|
(1<<ucp_gbLV)|(1<<ucp_gbLVT)|(1<<ucp_gbOther)|
- (1<<ucp_gbRegionalIndicator)|
- (1<<ucp_gbE_Base)|(1<<ucp_gbE_Modifier)|
- (1<<ucp_gbE_Base_GAZ)|
- (1<<ucp_gbZWJ)|(1<<ucp_gbGlue_After_Zwj),
- ESZ, /* 5 SpacingMark */
- ESZ|(1<<ucp_gbL)|(1<<ucp_gbV)|(1<<ucp_gbLV)| /* 6 L */
+ (1<<ucp_gbRegionalIndicator),
+ ESZ, /* 5 SpacingMark */
+ ESZ|(1<<ucp_gbL)|(1<<ucp_gbV)|(1<<ucp_gbLV)| /* 6 L */
(1<<ucp_gbLVT),
- ESZ|(1<<ucp_gbV)|(1<<ucp_gbT), /* 7 V */
- ESZ|(1<<ucp_gbT), /* 8 T */
- ESZ|(1<<ucp_gbV)|(1<<ucp_gbT), /* 9 LV */
- ESZ|(1<<ucp_gbT), /* 10 LVT */
- (1<<ucp_gbRegionalIndicator), /* 11 RegionalIndicator */
- ESZ, /* 12 Other */
- ESZ|(1<<ucp_gbE_Modifier), /* 13 E_Base */
- ESZ, /* 14 E_Modifier */
- ESZ|(1<<ucp_gbE_Modifier), /* 15 E_Base_GAZ */
- ESZ|(1<<ucp_gbGlue_After_Zwj)|(1<<ucp_gbE_Base_GAZ), /* 16 ZWJ */
- ESZ /* 12 Glue_After_Zwj */
+ ESZ|(1<<ucp_gbV)|(1<<ucp_gbT), /* 7 V */
+ ESZ|(1<<ucp_gbT), /* 8 T */
+ ESZ|(1<<ucp_gbV)|(1<<ucp_gbT), /* 9 LV */
+ ESZ|(1<<ucp_gbT), /* 10 LVT */
+ (1<<ucp_gbRegionalIndicator), /* 11 RegionalIndicator */
+ ESZ, /* 12 Other */
+ ESZ, /* 13 ZWJ */
+ ESZ|(1<<ucp_gbExtended_Pictographic) /* 14 Extended Pictographic */
};
#undef ESZ
@@ -282,6 +275,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Cyrillic0 STR_C STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0"
#define STRING_Deseret0 STR_D STR_e STR_s STR_e STR_r STR_e STR_t "\0"
#define STRING_Devanagari0 STR_D STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0"
+#define STRING_Dogra0 STR_D STR_o STR_g STR_r STR_a "\0"
#define STRING_Duployan0 STR_D STR_u STR_p STR_l STR_o STR_y STR_a STR_n "\0"
#define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
#define STRING_Elbasan0 STR_E STR_l STR_b STR_a STR_s STR_a STR_n "\0"
@@ -292,9 +286,11 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Grantha0 STR_G STR_r STR_a STR_n STR_t STR_h STR_a "\0"
#define STRING_Greek0 STR_G STR_r STR_e STR_e STR_k "\0"
#define STRING_Gujarati0 STR_G STR_u STR_j STR_a STR_r STR_a STR_t STR_i "\0"
+#define STRING_Gunjala_Gondi0 STR_G STR_u STR_n STR_j STR_a STR_l STR_a STR_UNDERSCORE STR_G STR_o STR_n STR_d STR_i "\0"
#define STRING_Gurmukhi0 STR_G STR_u STR_r STR_m STR_u STR_k STR_h STR_i "\0"
#define STRING_Han0 STR_H STR_a STR_n "\0"
#define STRING_Hangul0 STR_H STR_a STR_n STR_g STR_u STR_l "\0"
+#define STRING_Hanifi_Rohingya0 STR_H STR_a STR_n STR_i STR_f STR_i STR_UNDERSCORE STR_R STR_o STR_h STR_i STR_n STR_g STR_y STR_a "\0"
#define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0"
#define STRING_Hatran0 STR_H STR_a STR_t STR_r STR_a STR_n "\0"
#define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0"
@@ -330,6 +326,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Lydian0 STR_L STR_y STR_d STR_i STR_a STR_n "\0"
#define STRING_M0 STR_M "\0"
#define STRING_Mahajani0 STR_M STR_a STR_h STR_a STR_j STR_a STR_n STR_i "\0"
+#define STRING_Makasar0 STR_M STR_a STR_k STR_a STR_s STR_a STR_r "\0"
#define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0"
#define STRING_Mandaic0 STR_M STR_a STR_n STR_d STR_a STR_i STR_c "\0"
#define STRING_Manichaean0 STR_M STR_a STR_n STR_i STR_c STR_h STR_a STR_e STR_a STR_n "\0"
@@ -337,6 +334,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Masaram_Gondi0 STR_M STR_a STR_s STR_a STR_r STR_a STR_m STR_UNDERSCORE STR_G STR_o STR_n STR_d STR_i "\0"
#define STRING_Mc0 STR_M STR_c "\0"
#define STRING_Me0 STR_M STR_e "\0"
+#define STRING_Medefaidrin0 STR_M STR_e STR_d STR_e STR_f STR_a STR_i STR_d STR_r STR_i STR_n "\0"
#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0"
#define STRING_Mende_Kikakui0 STR_M STR_e STR_n STR_d STR_e STR_UNDERSCORE STR_K STR_i STR_k STR_a STR_k STR_u STR_i "\0"
#define STRING_Meroitic_Cursive0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_C STR_u STR_r STR_s STR_i STR_v STR_e "\0"
@@ -364,6 +362,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Old_North_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_N STR_o STR_r STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0"
#define STRING_Old_Permic0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_m STR_i STR_c "\0"
#define STRING_Old_Persian0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_s STR_i STR_a STR_n "\0"
+#define STRING_Old_Sogdian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_g STR_d STR_i STR_a STR_n "\0"
#define STRING_Old_South_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_u STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0"
#define STRING_Old_Turkic0 STR_O STR_l STR_d STR_UNDERSCORE STR_T STR_u STR_r STR_k STR_i STR_c "\0"
#define STRING_Oriya0 STR_O STR_r STR_i STR_y STR_a "\0"
@@ -397,6 +396,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Sk0 STR_S STR_k "\0"
#define STRING_Sm0 STR_S STR_m "\0"
#define STRING_So0 STR_S STR_o "\0"
+#define STRING_Sogdian0 STR_S STR_o STR_g STR_d STR_i STR_a STR_n "\0"
#define STRING_Sora_Sompeng0 STR_S STR_o STR_r STR_a STR_UNDERSCORE STR_S STR_o STR_m STR_p STR_e STR_n STR_g "\0"
#define STRING_Soyombo0 STR_S STR_o STR_y STR_o STR_m STR_b STR_o "\0"
#define STRING_Sundanese0 STR_S STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0"
@@ -469,6 +469,7 @@ const char PRIV(utt_names)[] =
STRING_Cyrillic0
STRING_Deseret0
STRING_Devanagari0
+ STRING_Dogra0
STRING_Duployan0
STRING_Egyptian_Hieroglyphs0
STRING_Elbasan0
@@ -479,9 +480,11 @@ const char PRIV(utt_names)[] =
STRING_Grantha0
STRING_Greek0
STRING_Gujarati0
+ STRING_Gunjala_Gondi0
STRING_Gurmukhi0
STRING_Han0
STRING_Hangul0
+ STRING_Hanifi_Rohingya0
STRING_Hanunoo0
STRING_Hatran0
STRING_Hebrew0
@@ -517,6 +520,7 @@ const char PRIV(utt_names)[] =
STRING_Lydian0
STRING_M0
STRING_Mahajani0
+ STRING_Makasar0
STRING_Malayalam0
STRING_Mandaic0
STRING_Manichaean0
@@ -524,6 +528,7 @@ const char PRIV(utt_names)[] =
STRING_Masaram_Gondi0
STRING_Mc0
STRING_Me0
+ STRING_Medefaidrin0
STRING_Meetei_Mayek0
STRING_Mende_Kikakui0
STRING_Meroitic_Cursive0
@@ -551,6 +556,7 @@ const char PRIV(utt_names)[] =
STRING_Old_North_Arabian0
STRING_Old_Permic0
STRING_Old_Persian0
+ STRING_Old_Sogdian0
STRING_Old_South_Arabian0
STRING_Old_Turkic0
STRING_Oriya0
@@ -584,6 +590,7 @@ const char PRIV(utt_names)[] =
STRING_Sk0
STRING_Sm0
STRING_So0
+ STRING_Sogdian0
STRING_Sora_Sompeng0
STRING_Soyombo0
STRING_Sundanese0
@@ -656,154 +663,161 @@ const ucp_type_table PRIV(utt)[] = {
{ 265, PT_SC, ucp_Cyrillic },
{ 274, PT_SC, ucp_Deseret },
{ 282, PT_SC, ucp_Devanagari },
- { 293, PT_SC, ucp_Duployan },
- { 302, PT_SC, ucp_Egyptian_Hieroglyphs },
- { 323, PT_SC, ucp_Elbasan },
- { 331, PT_SC, ucp_Ethiopic },
- { 340, PT_SC, ucp_Georgian },
- { 349, PT_SC, ucp_Glagolitic },
- { 360, PT_SC, ucp_Gothic },
- { 367, PT_SC, ucp_Grantha },
- { 375, PT_SC, ucp_Greek },
- { 381, PT_SC, ucp_Gujarati },
- { 390, PT_SC, ucp_Gurmukhi },
- { 399, PT_SC, ucp_Han },
- { 403, PT_SC, ucp_Hangul },
- { 410, PT_SC, ucp_Hanunoo },
- { 418, PT_SC, ucp_Hatran },
- { 425, PT_SC, ucp_Hebrew },
- { 432, PT_SC, ucp_Hiragana },
- { 441, PT_SC, ucp_Imperial_Aramaic },
- { 458, PT_SC, ucp_Inherited },
- { 468, PT_SC, ucp_Inscriptional_Pahlavi },
- { 490, PT_SC, ucp_Inscriptional_Parthian },
- { 513, PT_SC, ucp_Javanese },
- { 522, PT_SC, ucp_Kaithi },
- { 529, PT_SC, ucp_Kannada },
- { 537, PT_SC, ucp_Katakana },
- { 546, PT_SC, ucp_Kayah_Li },
- { 555, PT_SC, ucp_Kharoshthi },
- { 566, PT_SC, ucp_Khmer },
- { 572, PT_SC, ucp_Khojki },
- { 579, PT_SC, ucp_Khudawadi },
- { 589, PT_GC, ucp_L },
- { 591, PT_LAMP, 0 },
- { 594, PT_SC, ucp_Lao },
- { 598, PT_SC, ucp_Latin },
- { 604, PT_SC, ucp_Lepcha },
- { 611, PT_SC, ucp_Limbu },
- { 617, PT_SC, ucp_Linear_A },
- { 626, PT_SC, ucp_Linear_B },
- { 635, PT_SC, ucp_Lisu },
- { 640, PT_PC, ucp_Ll },
- { 643, PT_PC, ucp_Lm },
- { 646, PT_PC, ucp_Lo },
- { 649, PT_PC, ucp_Lt },
- { 652, PT_PC, ucp_Lu },
- { 655, PT_SC, ucp_Lycian },
- { 662, PT_SC, ucp_Lydian },
- { 669, PT_GC, ucp_M },
- { 671, PT_SC, ucp_Mahajani },
- { 680, PT_SC, ucp_Malayalam },
- { 690, PT_SC, ucp_Mandaic },
- { 698, PT_SC, ucp_Manichaean },
- { 709, PT_SC, ucp_Marchen },
- { 717, PT_SC, ucp_Masaram_Gondi },
- { 731, PT_PC, ucp_Mc },
- { 734, PT_PC, ucp_Me },
- { 737, PT_SC, ucp_Meetei_Mayek },
- { 750, PT_SC, ucp_Mende_Kikakui },
- { 764, PT_SC, ucp_Meroitic_Cursive },
- { 781, PT_SC, ucp_Meroitic_Hieroglyphs },
- { 802, PT_SC, ucp_Miao },
- { 807, PT_PC, ucp_Mn },
- { 810, PT_SC, ucp_Modi },
- { 815, PT_SC, ucp_Mongolian },
- { 825, PT_SC, ucp_Mro },
- { 829, PT_SC, ucp_Multani },
- { 837, PT_SC, ucp_Myanmar },
- { 845, PT_GC, ucp_N },
- { 847, PT_SC, ucp_Nabataean },
- { 857, PT_PC, ucp_Nd },
- { 860, PT_SC, ucp_New_Tai_Lue },
- { 872, PT_SC, ucp_Newa },
- { 877, PT_SC, ucp_Nko },
- { 881, PT_PC, ucp_Nl },
- { 884, PT_PC, ucp_No },
- { 887, PT_SC, ucp_Nushu },
- { 893, PT_SC, ucp_Ogham },
- { 899, PT_SC, ucp_Ol_Chiki },
- { 908, PT_SC, ucp_Old_Hungarian },
- { 922, PT_SC, ucp_Old_Italic },
- { 933, PT_SC, ucp_Old_North_Arabian },
- { 951, PT_SC, ucp_Old_Permic },
- { 962, PT_SC, ucp_Old_Persian },
- { 974, PT_SC, ucp_Old_South_Arabian },
- { 992, PT_SC, ucp_Old_Turkic },
- { 1003, PT_SC, ucp_Oriya },
- { 1009, PT_SC, ucp_Osage },
- { 1015, PT_SC, ucp_Osmanya },
- { 1023, PT_GC, ucp_P },
- { 1025, PT_SC, ucp_Pahawh_Hmong },
- { 1038, PT_SC, ucp_Palmyrene },
- { 1048, PT_SC, ucp_Pau_Cin_Hau },
- { 1060, PT_PC, ucp_Pc },
- { 1063, PT_PC, ucp_Pd },
- { 1066, PT_PC, ucp_Pe },
- { 1069, PT_PC, ucp_Pf },
- { 1072, PT_SC, ucp_Phags_Pa },
- { 1081, PT_SC, ucp_Phoenician },
- { 1092, PT_PC, ucp_Pi },
- { 1095, PT_PC, ucp_Po },
- { 1098, PT_PC, ucp_Ps },
- { 1101, PT_SC, ucp_Psalter_Pahlavi },
- { 1117, PT_SC, ucp_Rejang },
- { 1124, PT_SC, ucp_Runic },
- { 1130, PT_GC, ucp_S },
- { 1132, PT_SC, ucp_Samaritan },
- { 1142, PT_SC, ucp_Saurashtra },
- { 1153, PT_PC, ucp_Sc },
- { 1156, PT_SC, ucp_Sharada },
- { 1164, PT_SC, ucp_Shavian },
- { 1172, PT_SC, ucp_Siddham },
- { 1180, PT_SC, ucp_SignWriting },
- { 1192, PT_SC, ucp_Sinhala },
- { 1200, PT_PC, ucp_Sk },
- { 1203, PT_PC, ucp_Sm },
- { 1206, PT_PC, ucp_So },
- { 1209, PT_SC, ucp_Sora_Sompeng },
- { 1222, PT_SC, ucp_Soyombo },
- { 1230, PT_SC, ucp_Sundanese },
- { 1240, PT_SC, ucp_Syloti_Nagri },
- { 1253, PT_SC, ucp_Syriac },
- { 1260, PT_SC, ucp_Tagalog },
- { 1268, PT_SC, ucp_Tagbanwa },
- { 1277, PT_SC, ucp_Tai_Le },
- { 1284, PT_SC, ucp_Tai_Tham },
- { 1293, PT_SC, ucp_Tai_Viet },
- { 1302, PT_SC, ucp_Takri },
- { 1308, PT_SC, ucp_Tamil },
- { 1314, PT_SC, ucp_Tangut },
- { 1321, PT_SC, ucp_Telugu },
- { 1328, PT_SC, ucp_Thaana },
- { 1335, PT_SC, ucp_Thai },
- { 1340, PT_SC, ucp_Tibetan },
- { 1348, PT_SC, ucp_Tifinagh },
- { 1357, PT_SC, ucp_Tirhuta },
- { 1365, PT_SC, ucp_Ugaritic },
- { 1374, PT_SC, ucp_Vai },
- { 1378, PT_SC, ucp_Warang_Citi },
- { 1390, PT_ALNUM, 0 },
- { 1394, PT_PXSPACE, 0 },
- { 1398, PT_SPACE, 0 },
- { 1402, PT_UCNC, 0 },
- { 1406, PT_WORD, 0 },
- { 1410, PT_SC, ucp_Yi },
- { 1413, PT_GC, ucp_Z },
- { 1415, PT_SC, ucp_Zanabazar_Square },
- { 1432, PT_PC, ucp_Zl },
- { 1435, PT_PC, ucp_Zp },
- { 1438, PT_PC, ucp_Zs }
+ { 293, PT_SC, ucp_Dogra },
+ { 299, PT_SC, ucp_Duployan },
+ { 308, PT_SC, ucp_Egyptian_Hieroglyphs },
+ { 329, PT_SC, ucp_Elbasan },
+ { 337, PT_SC, ucp_Ethiopic },
+ { 346, PT_SC, ucp_Georgian },
+ { 355, PT_SC, ucp_Glagolitic },
+ { 366, PT_SC, ucp_Gothic },
+ { 373, PT_SC, ucp_Grantha },
+ { 381, PT_SC, ucp_Greek },
+ { 387, PT_SC, ucp_Gujarati },
+ { 396, PT_SC, ucp_Gunjala_Gondi },
+ { 410, PT_SC, ucp_Gurmukhi },
+ { 419, PT_SC, ucp_Han },
+ { 423, PT_SC, ucp_Hangul },
+ { 430, PT_SC, ucp_Hanifi_Rohingya },
+ { 446, PT_SC, ucp_Hanunoo },
+ { 454, PT_SC, ucp_Hatran },
+ { 461, PT_SC, ucp_Hebrew },
+ { 468, PT_SC, ucp_Hiragana },
+ { 477, PT_SC, ucp_Imperial_Aramaic },
+ { 494, PT_SC, ucp_Inherited },
+ { 504, PT_SC, ucp_Inscriptional_Pahlavi },
+ { 526, PT_SC, ucp_Inscriptional_Parthian },
+ { 549, PT_SC, ucp_Javanese },
+ { 558, PT_SC, ucp_Kaithi },
+ { 565, PT_SC, ucp_Kannada },
+ { 573, PT_SC, ucp_Katakana },
+ { 582, PT_SC, ucp_Kayah_Li },
+ { 591, PT_SC, ucp_Kharoshthi },
+ { 602, PT_SC, ucp_Khmer },
+ { 608, PT_SC, ucp_Khojki },
+ { 615, PT_SC, ucp_Khudawadi },
+ { 625, PT_GC, ucp_L },
+ { 627, PT_LAMP, 0 },
+ { 630, PT_SC, ucp_Lao },
+ { 634, PT_SC, ucp_Latin },
+ { 640, PT_SC, ucp_Lepcha },
+ { 647, PT_SC, ucp_Limbu },
+ { 653, PT_SC, ucp_Linear_A },
+ { 662, PT_SC, ucp_Linear_B },
+ { 671, PT_SC, ucp_Lisu },
+ { 676, PT_PC, ucp_Ll },
+ { 679, PT_PC, ucp_Lm },
+ { 682, PT_PC, ucp_Lo },
+ { 685, PT_PC, ucp_Lt },
+ { 688, PT_PC, ucp_Lu },
+ { 691, PT_SC, ucp_Lycian },
+ { 698, PT_SC, ucp_Lydian },
+ { 705, PT_GC, ucp_M },
+ { 707, PT_SC, ucp_Mahajani },
+ { 716, PT_SC, ucp_Makasar },
+ { 724, PT_SC, ucp_Malayalam },
+ { 734, PT_SC, ucp_Mandaic },
+ { 742, PT_SC, ucp_Manichaean },
+ { 753, PT_SC, ucp_Marchen },
+ { 761, PT_SC, ucp_Masaram_Gondi },
+ { 775, PT_PC, ucp_Mc },
+ { 778, PT_PC, ucp_Me },
+ { 781, PT_SC, ucp_Medefaidrin },
+ { 793, PT_SC, ucp_Meetei_Mayek },
+ { 806, PT_SC, ucp_Mende_Kikakui },
+ { 820, PT_SC, ucp_Meroitic_Cursive },
+ { 837, PT_SC, ucp_Meroitic_Hieroglyphs },
+ { 858, PT_SC, ucp_Miao },
+ { 863, PT_PC, ucp_Mn },
+ { 866, PT_SC, ucp_Modi },
+ { 871, PT_SC, ucp_Mongolian },
+ { 881, PT_SC, ucp_Mro },
+ { 885, PT_SC, ucp_Multani },
+ { 893, PT_SC, ucp_Myanmar },
+ { 901, PT_GC, ucp_N },
+ { 903, PT_SC, ucp_Nabataean },
+ { 913, PT_PC, ucp_Nd },
+ { 916, PT_SC, ucp_New_Tai_Lue },
+ { 928, PT_SC, ucp_Newa },
+ { 933, PT_SC, ucp_Nko },
+ { 937, PT_PC, ucp_Nl },
+ { 940, PT_PC, ucp_No },
+ { 943, PT_SC, ucp_Nushu },
+ { 949, PT_SC, ucp_Ogham },
+ { 955, PT_SC, ucp_Ol_Chiki },
+ { 964, PT_SC, ucp_Old_Hungarian },
+ { 978, PT_SC, ucp_Old_Italic },
+ { 989, PT_SC, ucp_Old_North_Arabian },
+ { 1007, PT_SC, ucp_Old_Permic },
+ { 1018, PT_SC, ucp_Old_Persian },
+ { 1030, PT_SC, ucp_Old_Sogdian },
+ { 1042, PT_SC, ucp_Old_South_Arabian },
+ { 1060, PT_SC, ucp_Old_Turkic },
+ { 1071, PT_SC, ucp_Oriya },
+ { 1077, PT_SC, ucp_Osage },
+ { 1083, PT_SC, ucp_Osmanya },
+ { 1091, PT_GC, ucp_P },
+ { 1093, PT_SC, ucp_Pahawh_Hmong },
+ { 1106, PT_SC, ucp_Palmyrene },
+ { 1116, PT_SC, ucp_Pau_Cin_Hau },
+ { 1128, PT_PC, ucp_Pc },
+ { 1131, PT_PC, ucp_Pd },
+ { 1134, PT_PC, ucp_Pe },
+ { 1137, PT_PC, ucp_Pf },
+ { 1140, PT_SC, ucp_Phags_Pa },
+ { 1149, PT_SC, ucp_Phoenician },
+ { 1160, PT_PC, ucp_Pi },
+ { 1163, PT_PC, ucp_Po },
+ { 1166, PT_PC, ucp_Ps },
+ { 1169, PT_SC, ucp_Psalter_Pahlavi },
+ { 1185, PT_SC, ucp_Rejang },
+ { 1192, PT_SC, ucp_Runic },
+ { 1198, PT_GC, ucp_S },
+ { 1200, PT_SC, ucp_Samaritan },
+ { 1210, PT_SC, ucp_Saurashtra },
+ { 1221, PT_PC, ucp_Sc },
+ { 1224, PT_SC, ucp_Sharada },
+ { 1232, PT_SC, ucp_Shavian },
+ { 1240, PT_SC, ucp_Siddham },
+ { 1248, PT_SC, ucp_SignWriting },
+ { 1260, PT_SC, ucp_Sinhala },
+ { 1268, PT_PC, ucp_Sk },
+ { 1271, PT_PC, ucp_Sm },
+ { 1274, PT_PC, ucp_So },
+ { 1277, PT_SC, ucp_Sogdian },
+ { 1285, PT_SC, ucp_Sora_Sompeng },
+ { 1298, PT_SC, ucp_Soyombo },
+ { 1306, PT_SC, ucp_Sundanese },
+ { 1316, PT_SC, ucp_Syloti_Nagri },
+ { 1329, PT_SC, ucp_Syriac },
+ { 1336, PT_SC, ucp_Tagalog },
+ { 1344, PT_SC, ucp_Tagbanwa },
+ { 1353, PT_SC, ucp_Tai_Le },
+ { 1360, PT_SC, ucp_Tai_Tham },
+ { 1369, PT_SC, ucp_Tai_Viet },
+ { 1378, PT_SC, ucp_Takri },
+ { 1384, PT_SC, ucp_Tamil },
+ { 1390, PT_SC, ucp_Tangut },
+ { 1397, PT_SC, ucp_Telugu },
+ { 1404, PT_SC, ucp_Thaana },
+ { 1411, PT_SC, ucp_Thai },
+ { 1416, PT_SC, ucp_Tibetan },
+ { 1424, PT_SC, ucp_Tifinagh },
+ { 1433, PT_SC, ucp_Tirhuta },
+ { 1441, PT_SC, ucp_Ugaritic },
+ { 1450, PT_SC, ucp_Vai },
+ { 1454, PT_SC, ucp_Warang_Citi },
+ { 1466, PT_ALNUM, 0 },
+ { 1470, PT_PXSPACE, 0 },
+ { 1474, PT_SPACE, 0 },
+ { 1478, PT_UCNC, 0 },
+ { 1482, PT_WORD, 0 },
+ { 1486, PT_SC, ucp_Yi },
+ { 1489, PT_GC, ucp_Z },
+ { 1491, PT_SC, ucp_Zanabazar_Square },
+ { 1508, PT_PC, ucp_Zl },
+ { 1511, PT_PC, ucp_Zp },
+ { 1514, PT_PC, ucp_Zs }
};
const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
diff --git a/thirdparty/pcre2/src/pcre2_ucd.c b/thirdparty/pcre2/src/pcre2_ucd.c
index ac7649b99e..275a4be2fe 100644
--- a/thirdparty/pcre2/src/pcre2_ucd.c
+++ b/thirdparty/pcre2/src/pcre2_ucd.c
@@ -20,7 +20,7 @@ needed. */
/* Unicode character database. */
/* This file was autogenerated by the MultiStage2.py script. */
-/* Total size: 80808 bytes, block size: 128. */
+/* Total size: 92592 bytes, block size: 128. */
/* The tables herein are needed only when UCP support is built,
and in PCRE2 that happens automatically with UTF support.
@@ -34,12 +34,12 @@ Instead, just supply small dummy tables. */
#ifndef SUPPORT_UNICODE
const ucd_record PRIV(ucd_records)[] = {{0,0,0,0,0 }};
-const uint8_t PRIV(ucd_stage1)[] = {0};
+const uint16_t PRIV(ucd_stage1)[] = {0};
const uint16_t PRIV(ucd_stage2)[] = {0};
const uint32_t PRIV(ucd_caseless_sets)[] = {0};
#else
-const char *PRIV(unicode_version) = "10.0.0";
+const char *PRIV(unicode_version) = "11.0.0";
/* If the 32-bit library is run in non-32-bit mode, character values
greater than 0x10ffff may be encountered. For these we set up a
@@ -104,7 +104,7 @@ const uint32_t PRIV(ucd_caseless_sets)[] = {
#ifndef PCRE2_PCRE2TEST
-const ucd_record PRIV(ucd_records)[] = { /* 6568 bytes, record size 8 */
+const ucd_record PRIV(ucd_records)[] = { /* 6832 bytes, record size 8 */
{ 9, 0, 2, 0, 0, }, /* 0 */
{ 9, 0, 1, 0, 0, }, /* 1 */
{ 9, 0, 0, 0, 0, }, /* 2 */
@@ -125,1357 +125,1390 @@ const ucd_record PRIV(ucd_records)[] = { /* 6568 bytes, record size 8 */
{ 33, 5, 12, 100, -32, }, /* 17 */
{ 33, 5, 12, 1, -32, }, /* 18 */
{ 9, 26, 12, 0, 0, }, /* 19 */
- { 33, 7, 12, 0, 0, }, /* 20 */
- { 9, 20, 12, 0, 0, }, /* 21 */
- { 9, 1, 2, 0, 0, }, /* 22 */
- { 9, 15, 12, 0, 0, }, /* 23 */
- { 9, 5, 12, 26, 775, }, /* 24 */
- { 9, 19, 12, 0, 0, }, /* 25 */
- { 33, 9, 12, 104, 32, }, /* 26 */
- { 33, 5, 12, 0, 7615, }, /* 27 */
- { 33, 5, 12, 104, -32, }, /* 28 */
- { 33, 5, 12, 0, 121, }, /* 29 */
- { 33, 9, 12, 0, 1, }, /* 30 */
- { 33, 5, 12, 0, -1, }, /* 31 */
- { 33, 9, 12, 0, 0, }, /* 32 */
- { 33, 5, 12, 0, 0, }, /* 33 */
- { 33, 9, 12, 0, -121, }, /* 34 */
- { 33, 5, 12, 1, -268, }, /* 35 */
- { 33, 5, 12, 0, 195, }, /* 36 */
- { 33, 9, 12, 0, 210, }, /* 37 */
- { 33, 9, 12, 0, 206, }, /* 38 */
- { 33, 9, 12, 0, 205, }, /* 39 */
- { 33, 9, 12, 0, 79, }, /* 40 */
- { 33, 9, 12, 0, 202, }, /* 41 */
- { 33, 9, 12, 0, 203, }, /* 42 */
- { 33, 9, 12, 0, 207, }, /* 43 */
- { 33, 5, 12, 0, 97, }, /* 44 */
- { 33, 9, 12, 0, 211, }, /* 45 */
- { 33, 9, 12, 0, 209, }, /* 46 */
- { 33, 5, 12, 0, 163, }, /* 47 */
- { 33, 9, 12, 0, 213, }, /* 48 */
- { 33, 5, 12, 0, 130, }, /* 49 */
- { 33, 9, 12, 0, 214, }, /* 50 */
- { 33, 9, 12, 0, 218, }, /* 51 */
- { 33, 9, 12, 0, 217, }, /* 52 */
- { 33, 9, 12, 0, 219, }, /* 53 */
- { 33, 5, 12, 0, 56, }, /* 54 */
- { 33, 9, 12, 5, 2, }, /* 55 */
- { 33, 8, 12, 5, 1, }, /* 56 */
- { 33, 5, 12, 5, -2, }, /* 57 */
- { 33, 9, 12, 9, 2, }, /* 58 */
- { 33, 8, 12, 9, 1, }, /* 59 */
- { 33, 5, 12, 9, -2, }, /* 60 */
- { 33, 9, 12, 13, 2, }, /* 61 */
- { 33, 8, 12, 13, 1, }, /* 62 */
- { 33, 5, 12, 13, -2, }, /* 63 */
- { 33, 5, 12, 0, -79, }, /* 64 */
- { 33, 9, 12, 17, 2, }, /* 65 */
- { 33, 8, 12, 17, 1, }, /* 66 */
- { 33, 5, 12, 17, -2, }, /* 67 */
- { 33, 9, 12, 0, -97, }, /* 68 */
- { 33, 9, 12, 0, -56, }, /* 69 */
- { 33, 9, 12, 0, -130, }, /* 70 */
- { 33, 9, 12, 0, 10795, }, /* 71 */
- { 33, 9, 12, 0, -163, }, /* 72 */
- { 33, 9, 12, 0, 10792, }, /* 73 */
- { 33, 5, 12, 0, 10815, }, /* 74 */
- { 33, 9, 12, 0, -195, }, /* 75 */
- { 33, 9, 12, 0, 69, }, /* 76 */
- { 33, 9, 12, 0, 71, }, /* 77 */
- { 33, 5, 12, 0, 10783, }, /* 78 */
- { 33, 5, 12, 0, 10780, }, /* 79 */
- { 33, 5, 12, 0, 10782, }, /* 80 */
- { 33, 5, 12, 0, -210, }, /* 81 */
- { 33, 5, 12, 0, -206, }, /* 82 */
- { 33, 5, 12, 0, -205, }, /* 83 */
- { 33, 5, 12, 0, -202, }, /* 84 */
- { 33, 5, 12, 0, -203, }, /* 85 */
- { 33, 5, 12, 0, 42319, }, /* 86 */
- { 33, 5, 12, 0, 42315, }, /* 87 */
- { 33, 5, 12, 0, -207, }, /* 88 */
- { 33, 5, 12, 0, 42280, }, /* 89 */
- { 33, 5, 12, 0, 42308, }, /* 90 */
- { 33, 5, 12, 0, -209, }, /* 91 */
- { 33, 5, 12, 0, -211, }, /* 92 */
- { 33, 5, 12, 0, 10743, }, /* 93 */
- { 33, 5, 12, 0, 42305, }, /* 94 */
- { 33, 5, 12, 0, 10749, }, /* 95 */
- { 33, 5, 12, 0, -213, }, /* 96 */
- { 33, 5, 12, 0, -214, }, /* 97 */
- { 33, 5, 12, 0, 10727, }, /* 98 */
- { 33, 5, 12, 0, -218, }, /* 99 */
- { 33, 5, 12, 0, 42282, }, /* 100 */
- { 33, 5, 12, 0, -69, }, /* 101 */
- { 33, 5, 12, 0, -217, }, /* 102 */
- { 33, 5, 12, 0, -71, }, /* 103 */
- { 33, 5, 12, 0, -219, }, /* 104 */
- { 33, 5, 12, 0, 42261, }, /* 105 */
- { 33, 5, 12, 0, 42258, }, /* 106 */
- { 33, 6, 12, 0, 0, }, /* 107 */
- { 9, 6, 12, 0, 0, }, /* 108 */
- { 3, 24, 12, 0, 0, }, /* 109 */
- { 27, 12, 3, 0, 0, }, /* 110 */
- { 27, 12, 3, 21, 116, }, /* 111 */
- { 19, 9, 12, 0, 1, }, /* 112 */
- { 19, 5, 12, 0, -1, }, /* 113 */
- { 19, 24, 12, 0, 0, }, /* 114 */
- { 9, 2, 12, 0, 0, }, /* 115 */
- { 19, 6, 12, 0, 0, }, /* 116 */
- { 19, 5, 12, 0, 130, }, /* 117 */
- { 19, 9, 12, 0, 116, }, /* 118 */
- { 19, 9, 12, 0, 38, }, /* 119 */
- { 19, 9, 12, 0, 37, }, /* 120 */
- { 19, 9, 12, 0, 64, }, /* 121 */
- { 19, 9, 12, 0, 63, }, /* 122 */
- { 19, 5, 12, 0, 0, }, /* 123 */
- { 19, 9, 12, 0, 32, }, /* 124 */
- { 19, 9, 12, 34, 32, }, /* 125 */
- { 19, 9, 12, 59, 32, }, /* 126 */
- { 19, 9, 12, 38, 32, }, /* 127 */
- { 19, 9, 12, 21, 32, }, /* 128 */
- { 19, 9, 12, 51, 32, }, /* 129 */
- { 19, 9, 12, 26, 32, }, /* 130 */
- { 19, 9, 12, 47, 32, }, /* 131 */
- { 19, 9, 12, 55, 32, }, /* 132 */
- { 19, 9, 12, 30, 32, }, /* 133 */
- { 19, 9, 12, 43, 32, }, /* 134 */
- { 19, 9, 12, 96, 32, }, /* 135 */
- { 19, 5, 12, 0, -38, }, /* 136 */
- { 19, 5, 12, 0, -37, }, /* 137 */
- { 19, 5, 12, 0, -32, }, /* 138 */
- { 19, 5, 12, 34, -32, }, /* 139 */
- { 19, 5, 12, 59, -32, }, /* 140 */
- { 19, 5, 12, 38, -32, }, /* 141 */
- { 19, 5, 12, 21, -116, }, /* 142 */
- { 19, 5, 12, 51, -32, }, /* 143 */
- { 19, 5, 12, 26, -775, }, /* 144 */
- { 19, 5, 12, 47, -32, }, /* 145 */
- { 19, 5, 12, 55, -32, }, /* 146 */
- { 19, 5, 12, 30, 1, }, /* 147 */
- { 19, 5, 12, 30, -32, }, /* 148 */
- { 19, 5, 12, 43, -32, }, /* 149 */
- { 19, 5, 12, 96, -32, }, /* 150 */
- { 19, 5, 12, 0, -64, }, /* 151 */
- { 19, 5, 12, 0, -63, }, /* 152 */
- { 19, 9, 12, 0, 8, }, /* 153 */
- { 19, 5, 12, 34, -30, }, /* 154 */
- { 19, 5, 12, 38, -25, }, /* 155 */
- { 19, 9, 12, 0, 0, }, /* 156 */
- { 19, 5, 12, 43, -15, }, /* 157 */
- { 19, 5, 12, 47, -22, }, /* 158 */
- { 19, 5, 12, 0, -8, }, /* 159 */
- { 10, 9, 12, 0, 1, }, /* 160 */
- { 10, 5, 12, 0, -1, }, /* 161 */
- { 19, 5, 12, 51, -54, }, /* 162 */
- { 19, 5, 12, 55, -48, }, /* 163 */
- { 19, 5, 12, 0, 7, }, /* 164 */
- { 19, 5, 12, 0, -116, }, /* 165 */
- { 19, 9, 12, 38, -60, }, /* 166 */
- { 19, 5, 12, 59, -64, }, /* 167 */
- { 19, 25, 12, 0, 0, }, /* 168 */
- { 19, 9, 12, 0, -7, }, /* 169 */
- { 19, 9, 12, 0, -130, }, /* 170 */
- { 12, 9, 12, 0, 80, }, /* 171 */
- { 12, 9, 12, 0, 32, }, /* 172 */
- { 12, 9, 12, 63, 32, }, /* 173 */
- { 12, 9, 12, 67, 32, }, /* 174 */
- { 12, 9, 12, 71, 32, }, /* 175 */
- { 12, 9, 12, 75, 32, }, /* 176 */
- { 12, 9, 12, 79, 32, }, /* 177 */
- { 12, 9, 12, 84, 32, }, /* 178 */
- { 12, 5, 12, 0, -32, }, /* 179 */
- { 12, 5, 12, 63, -32, }, /* 180 */
- { 12, 5, 12, 67, -32, }, /* 181 */
- { 12, 5, 12, 71, -32, }, /* 182 */
- { 12, 5, 12, 75, -32, }, /* 183 */
- { 12, 5, 12, 79, -32, }, /* 184 */
- { 12, 5, 12, 84, -32, }, /* 185 */
- { 12, 5, 12, 0, -80, }, /* 186 */
- { 12, 9, 12, 0, 1, }, /* 187 */
- { 12, 5, 12, 0, -1, }, /* 188 */
- { 12, 9, 12, 88, 1, }, /* 189 */
- { 12, 5, 12, 88, -1, }, /* 190 */
- { 12, 26, 12, 0, 0, }, /* 191 */
- { 12, 12, 3, 0, 0, }, /* 192 */
- { 12, 11, 3, 0, 0, }, /* 193 */
- { 12, 9, 12, 0, 15, }, /* 194 */
- { 12, 5, 12, 0, -15, }, /* 195 */
- { 1, 9, 12, 0, 48, }, /* 196 */
- { 1, 6, 12, 0, 0, }, /* 197 */
- { 1, 21, 12, 0, 0, }, /* 198 */
- { 1, 5, 12, 0, -48, }, /* 199 */
+ { 9, 26, 14, 0, 0, }, /* 20 */
+ { 33, 7, 12, 0, 0, }, /* 21 */
+ { 9, 20, 12, 0, 0, }, /* 22 */
+ { 9, 1, 2, 0, 0, }, /* 23 */
+ { 9, 15, 12, 0, 0, }, /* 24 */
+ { 9, 5, 12, 26, 775, }, /* 25 */
+ { 9, 19, 12, 0, 0, }, /* 26 */
+ { 33, 9, 12, 104, 32, }, /* 27 */
+ { 33, 5, 12, 0, 7615, }, /* 28 */
+ { 33, 5, 12, 104, -32, }, /* 29 */
+ { 33, 5, 12, 0, 121, }, /* 30 */
+ { 33, 9, 12, 0, 1, }, /* 31 */
+ { 33, 5, 12, 0, -1, }, /* 32 */
+ { 33, 9, 12, 0, 0, }, /* 33 */
+ { 33, 5, 12, 0, 0, }, /* 34 */
+ { 33, 9, 12, 0, -121, }, /* 35 */
+ { 33, 5, 12, 1, -268, }, /* 36 */
+ { 33, 5, 12, 0, 195, }, /* 37 */
+ { 33, 9, 12, 0, 210, }, /* 38 */
+ { 33, 9, 12, 0, 206, }, /* 39 */
+ { 33, 9, 12, 0, 205, }, /* 40 */
+ { 33, 9, 12, 0, 79, }, /* 41 */
+ { 33, 9, 12, 0, 202, }, /* 42 */
+ { 33, 9, 12, 0, 203, }, /* 43 */
+ { 33, 9, 12, 0, 207, }, /* 44 */
+ { 33, 5, 12, 0, 97, }, /* 45 */
+ { 33, 9, 12, 0, 211, }, /* 46 */
+ { 33, 9, 12, 0, 209, }, /* 47 */
+ { 33, 5, 12, 0, 163, }, /* 48 */
+ { 33, 9, 12, 0, 213, }, /* 49 */
+ { 33, 5, 12, 0, 130, }, /* 50 */
+ { 33, 9, 12, 0, 214, }, /* 51 */
+ { 33, 9, 12, 0, 218, }, /* 52 */
+ { 33, 9, 12, 0, 217, }, /* 53 */
+ { 33, 9, 12, 0, 219, }, /* 54 */
+ { 33, 5, 12, 0, 56, }, /* 55 */
+ { 33, 9, 12, 5, 2, }, /* 56 */
+ { 33, 8, 12, 5, 1, }, /* 57 */
+ { 33, 5, 12, 5, -2, }, /* 58 */
+ { 33, 9, 12, 9, 2, }, /* 59 */
+ { 33, 8, 12, 9, 1, }, /* 60 */
+ { 33, 5, 12, 9, -2, }, /* 61 */
+ { 33, 9, 12, 13, 2, }, /* 62 */
+ { 33, 8, 12, 13, 1, }, /* 63 */
+ { 33, 5, 12, 13, -2, }, /* 64 */
+ { 33, 5, 12, 0, -79, }, /* 65 */
+ { 33, 9, 12, 17, 2, }, /* 66 */
+ { 33, 8, 12, 17, 1, }, /* 67 */
+ { 33, 5, 12, 17, -2, }, /* 68 */
+ { 33, 9, 12, 0, -97, }, /* 69 */
+ { 33, 9, 12, 0, -56, }, /* 70 */
+ { 33, 9, 12, 0, -130, }, /* 71 */
+ { 33, 9, 12, 0, 10795, }, /* 72 */
+ { 33, 9, 12, 0, -163, }, /* 73 */
+ { 33, 9, 12, 0, 10792, }, /* 74 */
+ { 33, 5, 12, 0, 10815, }, /* 75 */
+ { 33, 9, 12, 0, -195, }, /* 76 */
+ { 33, 9, 12, 0, 69, }, /* 77 */
+ { 33, 9, 12, 0, 71, }, /* 78 */
+ { 33, 5, 12, 0, 10783, }, /* 79 */
+ { 33, 5, 12, 0, 10780, }, /* 80 */
+ { 33, 5, 12, 0, 10782, }, /* 81 */
+ { 33, 5, 12, 0, -210, }, /* 82 */
+ { 33, 5, 12, 0, -206, }, /* 83 */
+ { 33, 5, 12, 0, -205, }, /* 84 */
+ { 33, 5, 12, 0, -202, }, /* 85 */
+ { 33, 5, 12, 0, -203, }, /* 86 */
+ { 33, 5, 12, 0, 42319, }, /* 87 */
+ { 33, 5, 12, 0, 42315, }, /* 88 */
+ { 33, 5, 12, 0, -207, }, /* 89 */
+ { 33, 5, 12, 0, 42280, }, /* 90 */
+ { 33, 5, 12, 0, 42308, }, /* 91 */
+ { 33, 5, 12, 0, -209, }, /* 92 */
+ { 33, 5, 12, 0, -211, }, /* 93 */
+ { 33, 5, 12, 0, 10743, }, /* 94 */
+ { 33, 5, 12, 0, 42305, }, /* 95 */
+ { 33, 5, 12, 0, 10749, }, /* 96 */
+ { 33, 5, 12, 0, -213, }, /* 97 */
+ { 33, 5, 12, 0, -214, }, /* 98 */
+ { 33, 5, 12, 0, 10727, }, /* 99 */
+ { 33, 5, 12, 0, -218, }, /* 100 */
+ { 33, 5, 12, 0, 42282, }, /* 101 */
+ { 33, 5, 12, 0, -69, }, /* 102 */
+ { 33, 5, 12, 0, -217, }, /* 103 */
+ { 33, 5, 12, 0, -71, }, /* 104 */
+ { 33, 5, 12, 0, -219, }, /* 105 */
+ { 33, 5, 12, 0, 42261, }, /* 106 */
+ { 33, 5, 12, 0, 42258, }, /* 107 */
+ { 33, 6, 12, 0, 0, }, /* 108 */
+ { 9, 6, 12, 0, 0, }, /* 109 */
+ { 3, 24, 12, 0, 0, }, /* 110 */
+ { 27, 12, 3, 0, 0, }, /* 111 */
+ { 27, 12, 3, 21, 116, }, /* 112 */
+ { 19, 9, 12, 0, 1, }, /* 113 */
+ { 19, 5, 12, 0, -1, }, /* 114 */
+ { 19, 24, 12, 0, 0, }, /* 115 */
+ { 9, 2, 12, 0, 0, }, /* 116 */
+ { 19, 6, 12, 0, 0, }, /* 117 */
+ { 19, 5, 12, 0, 130, }, /* 118 */
+ { 19, 9, 12, 0, 116, }, /* 119 */
+ { 19, 9, 12, 0, 38, }, /* 120 */
+ { 19, 9, 12, 0, 37, }, /* 121 */
+ { 19, 9, 12, 0, 64, }, /* 122 */
+ { 19, 9, 12, 0, 63, }, /* 123 */
+ { 19, 5, 12, 0, 0, }, /* 124 */
+ { 19, 9, 12, 0, 32, }, /* 125 */
+ { 19, 9, 12, 34, 32, }, /* 126 */
+ { 19, 9, 12, 59, 32, }, /* 127 */
+ { 19, 9, 12, 38, 32, }, /* 128 */
+ { 19, 9, 12, 21, 32, }, /* 129 */
+ { 19, 9, 12, 51, 32, }, /* 130 */
+ { 19, 9, 12, 26, 32, }, /* 131 */
+ { 19, 9, 12, 47, 32, }, /* 132 */
+ { 19, 9, 12, 55, 32, }, /* 133 */
+ { 19, 9, 12, 30, 32, }, /* 134 */
+ { 19, 9, 12, 43, 32, }, /* 135 */
+ { 19, 9, 12, 96, 32, }, /* 136 */
+ { 19, 5, 12, 0, -38, }, /* 137 */
+ { 19, 5, 12, 0, -37, }, /* 138 */
+ { 19, 5, 12, 0, -32, }, /* 139 */
+ { 19, 5, 12, 34, -32, }, /* 140 */
+ { 19, 5, 12, 59, -32, }, /* 141 */
+ { 19, 5, 12, 38, -32, }, /* 142 */
+ { 19, 5, 12, 21, -116, }, /* 143 */
+ { 19, 5, 12, 51, -32, }, /* 144 */
+ { 19, 5, 12, 26, -775, }, /* 145 */
+ { 19, 5, 12, 47, -32, }, /* 146 */
+ { 19, 5, 12, 55, -32, }, /* 147 */
+ { 19, 5, 12, 30, 1, }, /* 148 */
+ { 19, 5, 12, 30, -32, }, /* 149 */
+ { 19, 5, 12, 43, -32, }, /* 150 */
+ { 19, 5, 12, 96, -32, }, /* 151 */
+ { 19, 5, 12, 0, -64, }, /* 152 */
+ { 19, 5, 12, 0, -63, }, /* 153 */
+ { 19, 9, 12, 0, 8, }, /* 154 */
+ { 19, 5, 12, 34, -30, }, /* 155 */
+ { 19, 5, 12, 38, -25, }, /* 156 */
+ { 19, 9, 12, 0, 0, }, /* 157 */
+ { 19, 5, 12, 43, -15, }, /* 158 */
+ { 19, 5, 12, 47, -22, }, /* 159 */
+ { 19, 5, 12, 0, -8, }, /* 160 */
+ { 10, 9, 12, 0, 1, }, /* 161 */
+ { 10, 5, 12, 0, -1, }, /* 162 */
+ { 19, 5, 12, 51, -54, }, /* 163 */
+ { 19, 5, 12, 55, -48, }, /* 164 */
+ { 19, 5, 12, 0, 7, }, /* 165 */
+ { 19, 5, 12, 0, -116, }, /* 166 */
+ { 19, 9, 12, 38, -60, }, /* 167 */
+ { 19, 5, 12, 59, -64, }, /* 168 */
+ { 19, 25, 12, 0, 0, }, /* 169 */
+ { 19, 9, 12, 0, -7, }, /* 170 */
+ { 19, 9, 12, 0, -130, }, /* 171 */
+ { 12, 9, 12, 0, 80, }, /* 172 */
+ { 12, 9, 12, 0, 32, }, /* 173 */
+ { 12, 9, 12, 63, 32, }, /* 174 */
+ { 12, 9, 12, 67, 32, }, /* 175 */
+ { 12, 9, 12, 71, 32, }, /* 176 */
+ { 12, 9, 12, 75, 32, }, /* 177 */
+ { 12, 9, 12, 79, 32, }, /* 178 */
+ { 12, 9, 12, 84, 32, }, /* 179 */
+ { 12, 5, 12, 0, -32, }, /* 180 */
+ { 12, 5, 12, 63, -32, }, /* 181 */
+ { 12, 5, 12, 67, -32, }, /* 182 */
+ { 12, 5, 12, 71, -32, }, /* 183 */
+ { 12, 5, 12, 75, -32, }, /* 184 */
+ { 12, 5, 12, 79, -32, }, /* 185 */
+ { 12, 5, 12, 84, -32, }, /* 186 */
+ { 12, 5, 12, 0, -80, }, /* 187 */
+ { 12, 9, 12, 0, 1, }, /* 188 */
+ { 12, 5, 12, 0, -1, }, /* 189 */
+ { 12, 9, 12, 88, 1, }, /* 190 */
+ { 12, 5, 12, 88, -1, }, /* 191 */
+ { 12, 26, 12, 0, 0, }, /* 192 */
+ { 12, 12, 3, 0, 0, }, /* 193 */
+ { 12, 11, 3, 0, 0, }, /* 194 */
+ { 12, 9, 12, 0, 15, }, /* 195 */
+ { 12, 5, 12, 0, -15, }, /* 196 */
+ { 1, 9, 12, 0, 48, }, /* 197 */
+ { 1, 6, 12, 0, 0, }, /* 198 */
+ { 1, 21, 12, 0, 0, }, /* 199 */
{ 1, 5, 12, 0, 0, }, /* 200 */
- { 1, 17, 12, 0, 0, }, /* 201 */
- { 1, 26, 12, 0, 0, }, /* 202 */
- { 1, 23, 12, 0, 0, }, /* 203 */
- { 25, 12, 3, 0, 0, }, /* 204 */
- { 25, 17, 12, 0, 0, }, /* 205 */
- { 25, 21, 12, 0, 0, }, /* 206 */
- { 25, 7, 12, 0, 0, }, /* 207 */
- { 0, 1, 4, 0, 0, }, /* 208 */
- { 9, 1, 4, 0, 0, }, /* 209 */
- { 0, 25, 12, 0, 0, }, /* 210 */
- { 0, 21, 12, 0, 0, }, /* 211 */
- { 0, 23, 12, 0, 0, }, /* 212 */
- { 0, 26, 12, 0, 0, }, /* 213 */
- { 0, 12, 3, 0, 0, }, /* 214 */
- { 0, 1, 2, 0, 0, }, /* 215 */
- { 0, 7, 12, 0, 0, }, /* 216 */
- { 0, 13, 12, 0, 0, }, /* 217 */
- { 0, 6, 12, 0, 0, }, /* 218 */
- { 49, 21, 12, 0, 0, }, /* 219 */
- { 49, 1, 4, 0, 0, }, /* 220 */
- { 49, 7, 12, 0, 0, }, /* 221 */
- { 49, 12, 3, 0, 0, }, /* 222 */
- { 55, 7, 12, 0, 0, }, /* 223 */
- { 55, 12, 3, 0, 0, }, /* 224 */
- { 63, 13, 12, 0, 0, }, /* 225 */
- { 63, 7, 12, 0, 0, }, /* 226 */
- { 63, 12, 3, 0, 0, }, /* 227 */
- { 63, 6, 12, 0, 0, }, /* 228 */
- { 63, 26, 12, 0, 0, }, /* 229 */
- { 63, 21, 12, 0, 0, }, /* 230 */
- { 89, 7, 12, 0, 0, }, /* 231 */
- { 89, 12, 3, 0, 0, }, /* 232 */
- { 89, 6, 12, 0, 0, }, /* 233 */
- { 89, 21, 12, 0, 0, }, /* 234 */
- { 94, 7, 12, 0, 0, }, /* 235 */
- { 94, 12, 3, 0, 0, }, /* 236 */
- { 94, 21, 12, 0, 0, }, /* 237 */
- { 14, 12, 3, 0, 0, }, /* 238 */
- { 14, 10, 5, 0, 0, }, /* 239 */
- { 14, 7, 12, 0, 0, }, /* 240 */
- { 14, 13, 12, 0, 0, }, /* 241 */
- { 14, 21, 12, 0, 0, }, /* 242 */
- { 14, 6, 12, 0, 0, }, /* 243 */
- { 2, 7, 12, 0, 0, }, /* 244 */
- { 2, 12, 3, 0, 0, }, /* 245 */
- { 2, 10, 5, 0, 0, }, /* 246 */
- { 2, 10, 3, 0, 0, }, /* 247 */
- { 2, 13, 12, 0, 0, }, /* 248 */
- { 2, 23, 12, 0, 0, }, /* 249 */
- { 2, 15, 12, 0, 0, }, /* 250 */
- { 2, 26, 12, 0, 0, }, /* 251 */
- { 2, 21, 12, 0, 0, }, /* 252 */
- { 21, 12, 3, 0, 0, }, /* 253 */
- { 21, 10, 5, 0, 0, }, /* 254 */
- { 21, 7, 12, 0, 0, }, /* 255 */
- { 21, 13, 12, 0, 0, }, /* 256 */
- { 20, 12, 3, 0, 0, }, /* 257 */
- { 20, 10, 5, 0, 0, }, /* 258 */
- { 20, 7, 12, 0, 0, }, /* 259 */
- { 20, 13, 12, 0, 0, }, /* 260 */
- { 20, 21, 12, 0, 0, }, /* 261 */
- { 20, 23, 12, 0, 0, }, /* 262 */
- { 43, 12, 3, 0, 0, }, /* 263 */
- { 43, 10, 5, 0, 0, }, /* 264 */
- { 43, 7, 12, 0, 0, }, /* 265 */
- { 43, 10, 3, 0, 0, }, /* 266 */
- { 43, 13, 12, 0, 0, }, /* 267 */
- { 43, 26, 12, 0, 0, }, /* 268 */
- { 43, 15, 12, 0, 0, }, /* 269 */
- { 53, 12, 3, 0, 0, }, /* 270 */
- { 53, 7, 12, 0, 0, }, /* 271 */
- { 53, 10, 3, 0, 0, }, /* 272 */
- { 53, 10, 5, 0, 0, }, /* 273 */
- { 53, 13, 12, 0, 0, }, /* 274 */
- { 53, 15, 12, 0, 0, }, /* 275 */
- { 53, 26, 12, 0, 0, }, /* 276 */
- { 53, 23, 12, 0, 0, }, /* 277 */
- { 54, 12, 3, 0, 0, }, /* 278 */
- { 54, 10, 5, 0, 0, }, /* 279 */
- { 54, 7, 12, 0, 0, }, /* 280 */
- { 54, 13, 12, 0, 0, }, /* 281 */
- { 54, 15, 12, 0, 0, }, /* 282 */
- { 54, 26, 12, 0, 0, }, /* 283 */
- { 28, 7, 12, 0, 0, }, /* 284 */
- { 28, 12, 3, 0, 0, }, /* 285 */
- { 28, 10, 5, 0, 0, }, /* 286 */
- { 28, 10, 3, 0, 0, }, /* 287 */
- { 28, 13, 12, 0, 0, }, /* 288 */
- { 36, 12, 3, 0, 0, }, /* 289 */
- { 36, 10, 5, 0, 0, }, /* 290 */
- { 36, 7, 12, 0, 0, }, /* 291 */
- { 36, 10, 3, 0, 0, }, /* 292 */
- { 36, 7, 4, 0, 0, }, /* 293 */
- { 36, 26, 12, 0, 0, }, /* 294 */
- { 36, 15, 12, 0, 0, }, /* 295 */
- { 36, 13, 12, 0, 0, }, /* 296 */
- { 47, 10, 5, 0, 0, }, /* 297 */
- { 47, 7, 12, 0, 0, }, /* 298 */
- { 47, 12, 3, 0, 0, }, /* 299 */
- { 47, 10, 3, 0, 0, }, /* 300 */
- { 47, 13, 12, 0, 0, }, /* 301 */
- { 47, 21, 12, 0, 0, }, /* 302 */
- { 56, 7, 12, 0, 0, }, /* 303 */
- { 56, 12, 3, 0, 0, }, /* 304 */
- { 56, 7, 5, 0, 0, }, /* 305 */
- { 56, 6, 12, 0, 0, }, /* 306 */
- { 56, 21, 12, 0, 0, }, /* 307 */
- { 56, 13, 12, 0, 0, }, /* 308 */
- { 32, 7, 12, 0, 0, }, /* 309 */
- { 32, 12, 3, 0, 0, }, /* 310 */
- { 32, 7, 5, 0, 0, }, /* 311 */
- { 32, 6, 12, 0, 0, }, /* 312 */
- { 32, 13, 12, 0, 0, }, /* 313 */
- { 57, 7, 12, 0, 0, }, /* 314 */
- { 57, 26, 12, 0, 0, }, /* 315 */
- { 57, 21, 12, 0, 0, }, /* 316 */
- { 57, 12, 3, 0, 0, }, /* 317 */
- { 57, 13, 12, 0, 0, }, /* 318 */
- { 57, 15, 12, 0, 0, }, /* 319 */
- { 57, 22, 12, 0, 0, }, /* 320 */
- { 57, 18, 12, 0, 0, }, /* 321 */
- { 57, 10, 5, 0, 0, }, /* 322 */
- { 38, 7, 12, 0, 0, }, /* 323 */
- { 38, 10, 12, 0, 0, }, /* 324 */
- { 38, 12, 3, 0, 0, }, /* 325 */
- { 38, 10, 5, 0, 0, }, /* 326 */
- { 38, 13, 12, 0, 0, }, /* 327 */
- { 38, 21, 12, 0, 0, }, /* 328 */
- { 38, 26, 12, 0, 0, }, /* 329 */
- { 16, 9, 12, 0, 7264, }, /* 330 */
- { 16, 7, 12, 0, 0, }, /* 331 */
- { 16, 6, 12, 0, 0, }, /* 332 */
- { 23, 7, 6, 0, 0, }, /* 333 */
- { 23, 7, 7, 0, 0, }, /* 334 */
- { 23, 7, 8, 0, 0, }, /* 335 */
- { 15, 7, 12, 0, 0, }, /* 336 */
- { 15, 12, 3, 0, 0, }, /* 337 */
- { 15, 21, 12, 0, 0, }, /* 338 */
- { 15, 15, 12, 0, 0, }, /* 339 */
- { 15, 26, 12, 0, 0, }, /* 340 */
- { 8, 9, 12, 0, 38864, }, /* 341 */
- { 8, 9, 12, 0, 8, }, /* 342 */
- { 8, 5, 12, 0, -8, }, /* 343 */
- { 7, 17, 12, 0, 0, }, /* 344 */
- { 7, 7, 12, 0, 0, }, /* 345 */
- { 7, 21, 12, 0, 0, }, /* 346 */
- { 40, 29, 12, 0, 0, }, /* 347 */
- { 40, 7, 12, 0, 0, }, /* 348 */
- { 40, 22, 12, 0, 0, }, /* 349 */
- { 40, 18, 12, 0, 0, }, /* 350 */
- { 45, 7, 12, 0, 0, }, /* 351 */
- { 45, 14, 12, 0, 0, }, /* 352 */
- { 50, 7, 12, 0, 0, }, /* 353 */
- { 50, 12, 3, 0, 0, }, /* 354 */
- { 24, 7, 12, 0, 0, }, /* 355 */
- { 24, 12, 3, 0, 0, }, /* 356 */
- { 6, 7, 12, 0, 0, }, /* 357 */
- { 6, 12, 3, 0, 0, }, /* 358 */
- { 51, 7, 12, 0, 0, }, /* 359 */
- { 51, 12, 3, 0, 0, }, /* 360 */
- { 31, 7, 12, 0, 0, }, /* 361 */
- { 31, 12, 3, 0, 0, }, /* 362 */
- { 31, 10, 5, 0, 0, }, /* 363 */
- { 31, 21, 12, 0, 0, }, /* 364 */
- { 31, 6, 12, 0, 0, }, /* 365 */
- { 31, 23, 12, 0, 0, }, /* 366 */
- { 31, 13, 12, 0, 0, }, /* 367 */
- { 31, 15, 12, 0, 0, }, /* 368 */
- { 37, 21, 12, 0, 0, }, /* 369 */
- { 37, 17, 12, 0, 0, }, /* 370 */
- { 37, 12, 3, 0, 0, }, /* 371 */
- { 37, 1, 2, 0, 0, }, /* 372 */
- { 37, 13, 12, 0, 0, }, /* 373 */
- { 37, 7, 12, 0, 0, }, /* 374 */
- { 37, 6, 12, 0, 0, }, /* 375 */
- { 34, 7, 12, 0, 0, }, /* 376 */
- { 34, 12, 3, 0, 0, }, /* 377 */
- { 34, 10, 5, 0, 0, }, /* 378 */
- { 34, 26, 12, 0, 0, }, /* 379 */
- { 34, 21, 12, 0, 0, }, /* 380 */
- { 34, 13, 12, 0, 0, }, /* 381 */
- { 52, 7, 12, 0, 0, }, /* 382 */
- { 39, 7, 12, 0, 0, }, /* 383 */
- { 39, 13, 12, 0, 0, }, /* 384 */
- { 39, 15, 12, 0, 0, }, /* 385 */
- { 39, 26, 12, 0, 0, }, /* 386 */
- { 31, 26, 12, 0, 0, }, /* 387 */
- { 5, 7, 12, 0, 0, }, /* 388 */
- { 5, 12, 3, 0, 0, }, /* 389 */
- { 5, 10, 5, 0, 0, }, /* 390 */
- { 5, 21, 12, 0, 0, }, /* 391 */
- { 90, 7, 12, 0, 0, }, /* 392 */
- { 90, 10, 5, 0, 0, }, /* 393 */
- { 90, 12, 3, 0, 0, }, /* 394 */
- { 90, 10, 12, 0, 0, }, /* 395 */
- { 90, 13, 12, 0, 0, }, /* 396 */
- { 90, 21, 12, 0, 0, }, /* 397 */
- { 90, 6, 12, 0, 0, }, /* 398 */
- { 27, 11, 3, 0, 0, }, /* 399 */
- { 61, 12, 3, 0, 0, }, /* 400 */
- { 61, 10, 5, 0, 0, }, /* 401 */
- { 61, 7, 12, 0, 0, }, /* 402 */
- { 61, 13, 12, 0, 0, }, /* 403 */
- { 61, 21, 12, 0, 0, }, /* 404 */
- { 61, 26, 12, 0, 0, }, /* 405 */
- { 75, 12, 3, 0, 0, }, /* 406 */
- { 75, 10, 5, 0, 0, }, /* 407 */
- { 75, 7, 12, 0, 0, }, /* 408 */
- { 75, 13, 12, 0, 0, }, /* 409 */
- { 92, 7, 12, 0, 0, }, /* 410 */
- { 92, 12, 3, 0, 0, }, /* 411 */
- { 92, 10, 5, 0, 0, }, /* 412 */
- { 92, 21, 12, 0, 0, }, /* 413 */
- { 69, 7, 12, 0, 0, }, /* 414 */
- { 69, 10, 5, 0, 0, }, /* 415 */
- { 69, 12, 3, 0, 0, }, /* 416 */
- { 69, 21, 12, 0, 0, }, /* 417 */
- { 69, 13, 12, 0, 0, }, /* 418 */
- { 72, 13, 12, 0, 0, }, /* 419 */
- { 72, 7, 12, 0, 0, }, /* 420 */
- { 72, 6, 12, 0, 0, }, /* 421 */
- { 72, 21, 12, 0, 0, }, /* 422 */
- { 12, 5, 12, 63, -6222, }, /* 423 */
- { 12, 5, 12, 67, -6221, }, /* 424 */
- { 12, 5, 12, 71, -6212, }, /* 425 */
- { 12, 5, 12, 75, -6210, }, /* 426 */
- { 12, 5, 12, 79, -6210, }, /* 427 */
- { 12, 5, 12, 79, -6211, }, /* 428 */
- { 12, 5, 12, 84, -6204, }, /* 429 */
- { 12, 5, 12, 88, -6180, }, /* 430 */
- { 12, 5, 12, 108, 35267, }, /* 431 */
- { 75, 21, 12, 0, 0, }, /* 432 */
- { 9, 10, 5, 0, 0, }, /* 433 */
- { 9, 7, 12, 0, 0, }, /* 434 */
- { 12, 5, 12, 0, 0, }, /* 435 */
- { 12, 6, 12, 0, 0, }, /* 436 */
- { 33, 5, 12, 0, 35332, }, /* 437 */
- { 33, 5, 12, 0, 3814, }, /* 438 */
- { 33, 9, 12, 92, 1, }, /* 439 */
- { 33, 5, 12, 92, -1, }, /* 440 */
- { 33, 5, 12, 92, -58, }, /* 441 */
- { 33, 9, 12, 0, -7615, }, /* 442 */
- { 19, 5, 12, 0, 8, }, /* 443 */
- { 19, 9, 12, 0, -8, }, /* 444 */
- { 19, 5, 12, 0, 74, }, /* 445 */
- { 19, 5, 12, 0, 86, }, /* 446 */
- { 19, 5, 12, 0, 100, }, /* 447 */
- { 19, 5, 12, 0, 128, }, /* 448 */
- { 19, 5, 12, 0, 112, }, /* 449 */
- { 19, 5, 12, 0, 126, }, /* 450 */
- { 19, 8, 12, 0, -8, }, /* 451 */
- { 19, 5, 12, 0, 9, }, /* 452 */
- { 19, 9, 12, 0, -74, }, /* 453 */
- { 19, 8, 12, 0, -9, }, /* 454 */
- { 19, 5, 12, 21, -7173, }, /* 455 */
- { 19, 9, 12, 0, -86, }, /* 456 */
- { 19, 9, 12, 0, -100, }, /* 457 */
- { 19, 9, 12, 0, -112, }, /* 458 */
- { 19, 9, 12, 0, -128, }, /* 459 */
- { 19, 9, 12, 0, -126, }, /* 460 */
- { 27, 1, 3, 0, 0, }, /* 461 */
- { 27, 1, 16, 0, 0, }, /* 462 */
- { 9, 27, 2, 0, 0, }, /* 463 */
- { 9, 28, 2, 0, 0, }, /* 464 */
- { 9, 2, 2, 0, 0, }, /* 465 */
- { 9, 9, 12, 0, 0, }, /* 466 */
- { 9, 5, 12, 0, 0, }, /* 467 */
- { 19, 9, 12, 96, -7517, }, /* 468 */
- { 33, 9, 12, 100, -8383, }, /* 469 */
- { 33, 9, 12, 104, -8262, }, /* 470 */
- { 33, 9, 12, 0, 28, }, /* 471 */
- { 33, 5, 12, 0, -28, }, /* 472 */
- { 33, 14, 12, 0, 16, }, /* 473 */
- { 33, 14, 12, 0, -16, }, /* 474 */
- { 33, 14, 12, 0, 0, }, /* 475 */
- { 9, 26, 12, 0, 26, }, /* 476 */
- { 9, 26, 12, 0, -26, }, /* 477 */
- { 9, 26, 13, 0, 0, }, /* 478 */
- { 9, 26, 17, 0, 0, }, /* 479 */
- { 4, 26, 12, 0, 0, }, /* 480 */
- { 17, 9, 12, 0, 48, }, /* 481 */
- { 17, 5, 12, 0, -48, }, /* 482 */
- { 33, 9, 12, 0, -10743, }, /* 483 */
- { 33, 9, 12, 0, -3814, }, /* 484 */
- { 33, 9, 12, 0, -10727, }, /* 485 */
- { 33, 5, 12, 0, -10795, }, /* 486 */
- { 33, 5, 12, 0, -10792, }, /* 487 */
- { 33, 9, 12, 0, -10780, }, /* 488 */
- { 33, 9, 12, 0, -10749, }, /* 489 */
- { 33, 9, 12, 0, -10783, }, /* 490 */
- { 33, 9, 12, 0, -10782, }, /* 491 */
- { 33, 9, 12, 0, -10815, }, /* 492 */
- { 10, 5, 12, 0, 0, }, /* 493 */
- { 10, 26, 12, 0, 0, }, /* 494 */
- { 10, 12, 3, 0, 0, }, /* 495 */
- { 10, 21, 12, 0, 0, }, /* 496 */
- { 10, 15, 12, 0, 0, }, /* 497 */
- { 16, 5, 12, 0, -7264, }, /* 498 */
- { 58, 7, 12, 0, 0, }, /* 499 */
- { 58, 6, 12, 0, 0, }, /* 500 */
- { 58, 21, 12, 0, 0, }, /* 501 */
- { 58, 12, 3, 0, 0, }, /* 502 */
- { 22, 26, 12, 0, 0, }, /* 503 */
- { 22, 6, 12, 0, 0, }, /* 504 */
- { 22, 14, 12, 0, 0, }, /* 505 */
- { 23, 10, 3, 0, 0, }, /* 506 */
- { 26, 7, 12, 0, 0, }, /* 507 */
- { 26, 6, 12, 0, 0, }, /* 508 */
- { 29, 7, 12, 0, 0, }, /* 509 */
- { 29, 6, 12, 0, 0, }, /* 510 */
- { 3, 7, 12, 0, 0, }, /* 511 */
- { 23, 7, 12, 0, 0, }, /* 512 */
- { 23, 26, 12, 0, 0, }, /* 513 */
- { 29, 26, 12, 0, 0, }, /* 514 */
- { 22, 7, 12, 0, 0, }, /* 515 */
- { 60, 7, 12, 0, 0, }, /* 516 */
- { 60, 6, 12, 0, 0, }, /* 517 */
- { 60, 26, 12, 0, 0, }, /* 518 */
- { 85, 7, 12, 0, 0, }, /* 519 */
- { 85, 6, 12, 0, 0, }, /* 520 */
- { 85, 21, 12, 0, 0, }, /* 521 */
- { 76, 7, 12, 0, 0, }, /* 522 */
- { 76, 6, 12, 0, 0, }, /* 523 */
- { 76, 21, 12, 0, 0, }, /* 524 */
- { 76, 13, 12, 0, 0, }, /* 525 */
- { 12, 9, 12, 108, 1, }, /* 526 */
- { 12, 5, 12, 108, -35267, }, /* 527 */
- { 12, 7, 12, 0, 0, }, /* 528 */
- { 12, 21, 12, 0, 0, }, /* 529 */
- { 78, 7, 12, 0, 0, }, /* 530 */
- { 78, 14, 12, 0, 0, }, /* 531 */
- { 78, 12, 3, 0, 0, }, /* 532 */
- { 78, 21, 12, 0, 0, }, /* 533 */
- { 33, 9, 12, 0, -35332, }, /* 534 */
- { 33, 9, 12, 0, -42280, }, /* 535 */
- { 33, 9, 12, 0, -42308, }, /* 536 */
- { 33, 9, 12, 0, -42319, }, /* 537 */
- { 33, 9, 12, 0, -42315, }, /* 538 */
- { 33, 9, 12, 0, -42305, }, /* 539 */
- { 33, 9, 12, 0, -42258, }, /* 540 */
- { 33, 9, 12, 0, -42282, }, /* 541 */
- { 33, 9, 12, 0, -42261, }, /* 542 */
- { 33, 9, 12, 0, 928, }, /* 543 */
- { 48, 7, 12, 0, 0, }, /* 544 */
- { 48, 12, 3, 0, 0, }, /* 545 */
- { 48, 10, 5, 0, 0, }, /* 546 */
- { 48, 26, 12, 0, 0, }, /* 547 */
- { 64, 7, 12, 0, 0, }, /* 548 */
- { 64, 21, 12, 0, 0, }, /* 549 */
- { 74, 10, 5, 0, 0, }, /* 550 */
- { 74, 7, 12, 0, 0, }, /* 551 */
- { 74, 12, 3, 0, 0, }, /* 552 */
- { 74, 21, 12, 0, 0, }, /* 553 */
- { 74, 13, 12, 0, 0, }, /* 554 */
- { 68, 13, 12, 0, 0, }, /* 555 */
- { 68, 7, 12, 0, 0, }, /* 556 */
- { 68, 12, 3, 0, 0, }, /* 557 */
- { 68, 21, 12, 0, 0, }, /* 558 */
- { 73, 7, 12, 0, 0, }, /* 559 */
- { 73, 12, 3, 0, 0, }, /* 560 */
- { 73, 10, 5, 0, 0, }, /* 561 */
- { 73, 21, 12, 0, 0, }, /* 562 */
- { 83, 12, 3, 0, 0, }, /* 563 */
- { 83, 10, 5, 0, 0, }, /* 564 */
- { 83, 7, 12, 0, 0, }, /* 565 */
- { 83, 21, 12, 0, 0, }, /* 566 */
- { 83, 13, 12, 0, 0, }, /* 567 */
- { 38, 6, 12, 0, 0, }, /* 568 */
- { 67, 7, 12, 0, 0, }, /* 569 */
- { 67, 12, 3, 0, 0, }, /* 570 */
- { 67, 10, 5, 0, 0, }, /* 571 */
- { 67, 13, 12, 0, 0, }, /* 572 */
- { 67, 21, 12, 0, 0, }, /* 573 */
- { 91, 7, 12, 0, 0, }, /* 574 */
- { 91, 12, 3, 0, 0, }, /* 575 */
- { 91, 6, 12, 0, 0, }, /* 576 */
- { 91, 21, 12, 0, 0, }, /* 577 */
- { 86, 7, 12, 0, 0, }, /* 578 */
- { 86, 10, 5, 0, 0, }, /* 579 */
- { 86, 12, 3, 0, 0, }, /* 580 */
- { 86, 21, 12, 0, 0, }, /* 581 */
- { 86, 6, 12, 0, 0, }, /* 582 */
- { 33, 5, 12, 0, -928, }, /* 583 */
- { 8, 5, 12, 0, -38864, }, /* 584 */
- { 86, 13, 12, 0, 0, }, /* 585 */
- { 23, 7, 9, 0, 0, }, /* 586 */
- { 23, 7, 10, 0, 0, }, /* 587 */
- { 9, 4, 2, 0, 0, }, /* 588 */
- { 9, 3, 12, 0, 0, }, /* 589 */
- { 25, 25, 12, 0, 0, }, /* 590 */
- { 0, 24, 12, 0, 0, }, /* 591 */
- { 9, 6, 3, 0, 0, }, /* 592 */
- { 35, 7, 12, 0, 0, }, /* 593 */
- { 19, 14, 12, 0, 0, }, /* 594 */
- { 19, 15, 12, 0, 0, }, /* 595 */
- { 19, 26, 12, 0, 0, }, /* 596 */
- { 70, 7, 12, 0, 0, }, /* 597 */
- { 66, 7, 12, 0, 0, }, /* 598 */
- { 41, 7, 12, 0, 0, }, /* 599 */
- { 41, 15, 12, 0, 0, }, /* 600 */
- { 18, 7, 12, 0, 0, }, /* 601 */
- { 18, 14, 12, 0, 0, }, /* 602 */
- { 117, 7, 12, 0, 0, }, /* 603 */
- { 117, 12, 3, 0, 0, }, /* 604 */
- { 59, 7, 12, 0, 0, }, /* 605 */
- { 59, 21, 12, 0, 0, }, /* 606 */
- { 42, 7, 12, 0, 0, }, /* 607 */
- { 42, 21, 12, 0, 0, }, /* 608 */
- { 42, 14, 12, 0, 0, }, /* 609 */
- { 13, 9, 12, 0, 40, }, /* 610 */
- { 13, 5, 12, 0, -40, }, /* 611 */
- { 46, 7, 12, 0, 0, }, /* 612 */
- { 44, 7, 12, 0, 0, }, /* 613 */
- { 44, 13, 12, 0, 0, }, /* 614 */
- { 135, 9, 12, 0, 40, }, /* 615 */
- { 135, 5, 12, 0, -40, }, /* 616 */
- { 105, 7, 12, 0, 0, }, /* 617 */
- { 103, 7, 12, 0, 0, }, /* 618 */
- { 103, 21, 12, 0, 0, }, /* 619 */
- { 109, 7, 12, 0, 0, }, /* 620 */
- { 11, 7, 12, 0, 0, }, /* 621 */
- { 80, 7, 12, 0, 0, }, /* 622 */
- { 80, 21, 12, 0, 0, }, /* 623 */
- { 80, 15, 12, 0, 0, }, /* 624 */
- { 119, 7, 12, 0, 0, }, /* 625 */
- { 119, 26, 12, 0, 0, }, /* 626 */
- { 119, 15, 12, 0, 0, }, /* 627 */
- { 115, 7, 12, 0, 0, }, /* 628 */
- { 115, 15, 12, 0, 0, }, /* 629 */
- { 127, 7, 12, 0, 0, }, /* 630 */
- { 127, 15, 12, 0, 0, }, /* 631 */
- { 65, 7, 12, 0, 0, }, /* 632 */
- { 65, 15, 12, 0, 0, }, /* 633 */
- { 65, 21, 12, 0, 0, }, /* 634 */
- { 71, 7, 12, 0, 0, }, /* 635 */
- { 71, 21, 12, 0, 0, }, /* 636 */
- { 97, 7, 12, 0, 0, }, /* 637 */
- { 96, 7, 12, 0, 0, }, /* 638 */
- { 96, 15, 12, 0, 0, }, /* 639 */
- { 30, 7, 12, 0, 0, }, /* 640 */
- { 30, 12, 3, 0, 0, }, /* 641 */
- { 30, 15, 12, 0, 0, }, /* 642 */
- { 30, 21, 12, 0, 0, }, /* 643 */
- { 87, 7, 12, 0, 0, }, /* 644 */
- { 87, 15, 12, 0, 0, }, /* 645 */
- { 87, 21, 12, 0, 0, }, /* 646 */
- { 116, 7, 12, 0, 0, }, /* 647 */
- { 116, 15, 12, 0, 0, }, /* 648 */
- { 111, 7, 12, 0, 0, }, /* 649 */
- { 111, 26, 12, 0, 0, }, /* 650 */
- { 111, 12, 3, 0, 0, }, /* 651 */
- { 111, 15, 12, 0, 0, }, /* 652 */
- { 111, 21, 12, 0, 0, }, /* 653 */
- { 77, 7, 12, 0, 0, }, /* 654 */
- { 77, 21, 12, 0, 0, }, /* 655 */
- { 82, 7, 12, 0, 0, }, /* 656 */
- { 82, 15, 12, 0, 0, }, /* 657 */
- { 81, 7, 12, 0, 0, }, /* 658 */
- { 81, 15, 12, 0, 0, }, /* 659 */
- { 120, 7, 12, 0, 0, }, /* 660 */
- { 120, 21, 12, 0, 0, }, /* 661 */
- { 120, 15, 12, 0, 0, }, /* 662 */
- { 88, 7, 12, 0, 0, }, /* 663 */
- { 129, 9, 12, 0, 64, }, /* 664 */
- { 129, 5, 12, 0, -64, }, /* 665 */
- { 129, 15, 12, 0, 0, }, /* 666 */
- { 0, 15, 12, 0, 0, }, /* 667 */
- { 93, 10, 5, 0, 0, }, /* 668 */
- { 93, 12, 3, 0, 0, }, /* 669 */
- { 93, 7, 12, 0, 0, }, /* 670 */
- { 93, 21, 12, 0, 0, }, /* 671 */
- { 93, 15, 12, 0, 0, }, /* 672 */
- { 93, 13, 12, 0, 0, }, /* 673 */
- { 84, 12, 3, 0, 0, }, /* 674 */
- { 84, 10, 5, 0, 0, }, /* 675 */
- { 84, 7, 12, 0, 0, }, /* 676 */
- { 84, 21, 12, 0, 0, }, /* 677 */
- { 84, 1, 4, 0, 0, }, /* 678 */
- { 100, 7, 12, 0, 0, }, /* 679 */
- { 100, 13, 12, 0, 0, }, /* 680 */
- { 95, 12, 3, 0, 0, }, /* 681 */
- { 95, 7, 12, 0, 0, }, /* 682 */
- { 95, 10, 5, 0, 0, }, /* 683 */
- { 95, 13, 12, 0, 0, }, /* 684 */
- { 95, 21, 12, 0, 0, }, /* 685 */
- { 110, 7, 12, 0, 0, }, /* 686 */
- { 110, 12, 3, 0, 0, }, /* 687 */
- { 110, 21, 12, 0, 0, }, /* 688 */
- { 99, 12, 3, 0, 0, }, /* 689 */
- { 99, 10, 5, 0, 0, }, /* 690 */
- { 99, 7, 12, 0, 0, }, /* 691 */
- { 99, 7, 4, 0, 0, }, /* 692 */
- { 99, 21, 12, 0, 0, }, /* 693 */
- { 99, 13, 12, 0, 0, }, /* 694 */
- { 47, 15, 12, 0, 0, }, /* 695 */
- { 107, 7, 12, 0, 0, }, /* 696 */
- { 107, 10, 5, 0, 0, }, /* 697 */
- { 107, 12, 3, 0, 0, }, /* 698 */
- { 107, 21, 12, 0, 0, }, /* 699 */
- { 128, 7, 12, 0, 0, }, /* 700 */
- { 128, 21, 12, 0, 0, }, /* 701 */
- { 108, 7, 12, 0, 0, }, /* 702 */
- { 108, 12, 3, 0, 0, }, /* 703 */
- { 108, 10, 5, 0, 0, }, /* 704 */
- { 108, 13, 12, 0, 0, }, /* 705 */
- { 106, 12, 3, 0, 0, }, /* 706 */
- { 106, 10, 5, 0, 0, }, /* 707 */
- { 106, 7, 12, 0, 0, }, /* 708 */
- { 106, 10, 3, 0, 0, }, /* 709 */
- { 134, 7, 12, 0, 0, }, /* 710 */
- { 134, 10, 5, 0, 0, }, /* 711 */
- { 134, 12, 3, 0, 0, }, /* 712 */
- { 134, 21, 12, 0, 0, }, /* 713 */
- { 134, 13, 12, 0, 0, }, /* 714 */
- { 123, 7, 12, 0, 0, }, /* 715 */
- { 123, 10, 3, 0, 0, }, /* 716 */
- { 123, 10, 5, 0, 0, }, /* 717 */
- { 123, 12, 3, 0, 0, }, /* 718 */
- { 123, 21, 12, 0, 0, }, /* 719 */
- { 123, 13, 12, 0, 0, }, /* 720 */
- { 122, 7, 12, 0, 0, }, /* 721 */
- { 122, 10, 3, 0, 0, }, /* 722 */
- { 122, 10, 5, 0, 0, }, /* 723 */
- { 122, 12, 3, 0, 0, }, /* 724 */
- { 122, 21, 12, 0, 0, }, /* 725 */
- { 113, 7, 12, 0, 0, }, /* 726 */
- { 113, 10, 5, 0, 0, }, /* 727 */
- { 113, 12, 3, 0, 0, }, /* 728 */
- { 113, 21, 12, 0, 0, }, /* 729 */
- { 113, 13, 12, 0, 0, }, /* 730 */
- { 101, 7, 12, 0, 0, }, /* 731 */
- { 101, 12, 3, 0, 0, }, /* 732 */
- { 101, 10, 5, 0, 0, }, /* 733 */
- { 101, 13, 12, 0, 0, }, /* 734 */
- { 125, 7, 12, 0, 0, }, /* 735 */
- { 125, 12, 3, 0, 0, }, /* 736 */
- { 125, 10, 5, 0, 0, }, /* 737 */
- { 125, 13, 12, 0, 0, }, /* 738 */
- { 125, 15, 12, 0, 0, }, /* 739 */
- { 125, 21, 12, 0, 0, }, /* 740 */
- { 125, 26, 12, 0, 0, }, /* 741 */
- { 124, 9, 12, 0, 32, }, /* 742 */
- { 124, 5, 12, 0, -32, }, /* 743 */
- { 124, 13, 12, 0, 0, }, /* 744 */
- { 124, 15, 12, 0, 0, }, /* 745 */
- { 124, 7, 12, 0, 0, }, /* 746 */
- { 140, 7, 12, 0, 0, }, /* 747 */
- { 140, 12, 3, 0, 0, }, /* 748 */
- { 140, 10, 5, 0, 0, }, /* 749 */
- { 140, 7, 4, 0, 0, }, /* 750 */
- { 140, 21, 12, 0, 0, }, /* 751 */
- { 139, 7, 12, 0, 0, }, /* 752 */
- { 139, 12, 3, 0, 0, }, /* 753 */
- { 139, 10, 5, 0, 0, }, /* 754 */
- { 139, 7, 4, 0, 0, }, /* 755 */
- { 139, 21, 12, 0, 0, }, /* 756 */
- { 121, 7, 12, 0, 0, }, /* 757 */
- { 132, 7, 12, 0, 0, }, /* 758 */
- { 132, 10, 5, 0, 0, }, /* 759 */
- { 132, 12, 3, 0, 0, }, /* 760 */
- { 132, 21, 12, 0, 0, }, /* 761 */
- { 132, 13, 12, 0, 0, }, /* 762 */
- { 132, 15, 12, 0, 0, }, /* 763 */
- { 133, 21, 12, 0, 0, }, /* 764 */
- { 133, 7, 12, 0, 0, }, /* 765 */
- { 133, 12, 3, 0, 0, }, /* 766 */
- { 133, 10, 5, 0, 0, }, /* 767 */
- { 137, 7, 12, 0, 0, }, /* 768 */
- { 137, 12, 3, 0, 0, }, /* 769 */
- { 137, 7, 4, 0, 0, }, /* 770 */
- { 137, 13, 12, 0, 0, }, /* 771 */
- { 62, 7, 12, 0, 0, }, /* 772 */
- { 62, 14, 12, 0, 0, }, /* 773 */
- { 62, 21, 12, 0, 0, }, /* 774 */
- { 79, 7, 12, 0, 0, }, /* 775 */
- { 126, 7, 12, 0, 0, }, /* 776 */
- { 114, 7, 12, 0, 0, }, /* 777 */
- { 114, 13, 12, 0, 0, }, /* 778 */
- { 114, 21, 12, 0, 0, }, /* 779 */
- { 102, 7, 12, 0, 0, }, /* 780 */
- { 102, 12, 3, 0, 0, }, /* 781 */
- { 102, 21, 12, 0, 0, }, /* 782 */
- { 118, 7, 12, 0, 0, }, /* 783 */
- { 118, 12, 3, 0, 0, }, /* 784 */
- { 118, 21, 12, 0, 0, }, /* 785 */
- { 118, 26, 12, 0, 0, }, /* 786 */
- { 118, 6, 12, 0, 0, }, /* 787 */
- { 118, 13, 12, 0, 0, }, /* 788 */
- { 118, 15, 12, 0, 0, }, /* 789 */
- { 98, 7, 12, 0, 0, }, /* 790 */
- { 98, 10, 5, 0, 0, }, /* 791 */
- { 98, 12, 3, 0, 0, }, /* 792 */
- { 98, 6, 12, 0, 0, }, /* 793 */
- { 136, 6, 12, 0, 0, }, /* 794 */
- { 138, 6, 12, 0, 0, }, /* 795 */
- { 136, 7, 12, 0, 0, }, /* 796 */
- { 138, 7, 12, 0, 0, }, /* 797 */
- { 104, 7, 12, 0, 0, }, /* 798 */
- { 104, 26, 12, 0, 0, }, /* 799 */
- { 104, 12, 3, 0, 0, }, /* 800 */
- { 104, 21, 12, 0, 0, }, /* 801 */
- { 9, 10, 3, 0, 0, }, /* 802 */
- { 19, 12, 3, 0, 0, }, /* 803 */
- { 130, 26, 12, 0, 0, }, /* 804 */
- { 130, 12, 3, 0, 0, }, /* 805 */
- { 130, 21, 12, 0, 0, }, /* 806 */
- { 17, 12, 3, 0, 0, }, /* 807 */
- { 112, 7, 12, 0, 0, }, /* 808 */
- { 112, 15, 12, 0, 0, }, /* 809 */
- { 112, 12, 3, 0, 0, }, /* 810 */
- { 131, 9, 12, 0, 34, }, /* 811 */
- { 131, 5, 12, 0, -34, }, /* 812 */
- { 131, 12, 3, 0, 0, }, /* 813 */
- { 131, 13, 12, 0, 0, }, /* 814 */
- { 131, 21, 12, 0, 0, }, /* 815 */
- { 9, 26, 11, 0, 0, }, /* 816 */
- { 26, 26, 12, 0, 0, }, /* 817 */
- { 9, 24, 14, 0, 0, }, /* 818 */
- { 9, 26, 15, 0, 0, }, /* 819 */
- { 9, 1, 3, 0, 0, }, /* 820 */
+ { 1, 5, 12, 0, -48, }, /* 201 */
+ { 1, 17, 12, 0, 0, }, /* 202 */
+ { 1, 26, 12, 0, 0, }, /* 203 */
+ { 1, 23, 12, 0, 0, }, /* 204 */
+ { 25, 12, 3, 0, 0, }, /* 205 */
+ { 25, 17, 12, 0, 0, }, /* 206 */
+ { 25, 21, 12, 0, 0, }, /* 207 */
+ { 25, 7, 12, 0, 0, }, /* 208 */
+ { 0, 1, 4, 0, 0, }, /* 209 */
+ { 9, 1, 4, 0, 0, }, /* 210 */
+ { 0, 25, 12, 0, 0, }, /* 211 */
+ { 0, 21, 12, 0, 0, }, /* 212 */
+ { 0, 23, 12, 0, 0, }, /* 213 */
+ { 0, 26, 12, 0, 0, }, /* 214 */
+ { 0, 12, 3, 0, 0, }, /* 215 */
+ { 0, 1, 2, 0, 0, }, /* 216 */
+ { 0, 7, 12, 0, 0, }, /* 217 */
+ { 0, 13, 12, 0, 0, }, /* 218 */
+ { 0, 6, 12, 0, 0, }, /* 219 */
+ { 49, 21, 12, 0, 0, }, /* 220 */
+ { 49, 1, 4, 0, 0, }, /* 221 */
+ { 49, 7, 12, 0, 0, }, /* 222 */
+ { 49, 12, 3, 0, 0, }, /* 223 */
+ { 55, 7, 12, 0, 0, }, /* 224 */
+ { 55, 12, 3, 0, 0, }, /* 225 */
+ { 63, 13, 12, 0, 0, }, /* 226 */
+ { 63, 7, 12, 0, 0, }, /* 227 */
+ { 63, 12, 3, 0, 0, }, /* 228 */
+ { 63, 6, 12, 0, 0, }, /* 229 */
+ { 63, 26, 12, 0, 0, }, /* 230 */
+ { 63, 21, 12, 0, 0, }, /* 231 */
+ { 63, 23, 12, 0, 0, }, /* 232 */
+ { 89, 7, 12, 0, 0, }, /* 233 */
+ { 89, 12, 3, 0, 0, }, /* 234 */
+ { 89, 6, 12, 0, 0, }, /* 235 */
+ { 89, 21, 12, 0, 0, }, /* 236 */
+ { 94, 7, 12, 0, 0, }, /* 237 */
+ { 94, 12, 3, 0, 0, }, /* 238 */
+ { 94, 21, 12, 0, 0, }, /* 239 */
+ { 14, 12, 3, 0, 0, }, /* 240 */
+ { 14, 10, 5, 0, 0, }, /* 241 */
+ { 14, 7, 12, 0, 0, }, /* 242 */
+ { 14, 13, 12, 0, 0, }, /* 243 */
+ { 14, 21, 12, 0, 0, }, /* 244 */
+ { 14, 6, 12, 0, 0, }, /* 245 */
+ { 2, 7, 12, 0, 0, }, /* 246 */
+ { 2, 12, 3, 0, 0, }, /* 247 */
+ { 2, 10, 5, 0, 0, }, /* 248 */
+ { 2, 10, 3, 0, 0, }, /* 249 */
+ { 2, 13, 12, 0, 0, }, /* 250 */
+ { 2, 23, 12, 0, 0, }, /* 251 */
+ { 2, 15, 12, 0, 0, }, /* 252 */
+ { 2, 26, 12, 0, 0, }, /* 253 */
+ { 2, 21, 12, 0, 0, }, /* 254 */
+ { 21, 12, 3, 0, 0, }, /* 255 */
+ { 21, 10, 5, 0, 0, }, /* 256 */
+ { 21, 7, 12, 0, 0, }, /* 257 */
+ { 21, 13, 12, 0, 0, }, /* 258 */
+ { 21, 21, 12, 0, 0, }, /* 259 */
+ { 20, 12, 3, 0, 0, }, /* 260 */
+ { 20, 10, 5, 0, 0, }, /* 261 */
+ { 20, 7, 12, 0, 0, }, /* 262 */
+ { 20, 13, 12, 0, 0, }, /* 263 */
+ { 20, 21, 12, 0, 0, }, /* 264 */
+ { 20, 23, 12, 0, 0, }, /* 265 */
+ { 43, 12, 3, 0, 0, }, /* 266 */
+ { 43, 10, 5, 0, 0, }, /* 267 */
+ { 43, 7, 12, 0, 0, }, /* 268 */
+ { 43, 10, 3, 0, 0, }, /* 269 */
+ { 43, 13, 12, 0, 0, }, /* 270 */
+ { 43, 26, 12, 0, 0, }, /* 271 */
+ { 43, 15, 12, 0, 0, }, /* 272 */
+ { 53, 12, 3, 0, 0, }, /* 273 */
+ { 53, 7, 12, 0, 0, }, /* 274 */
+ { 53, 10, 3, 0, 0, }, /* 275 */
+ { 53, 10, 5, 0, 0, }, /* 276 */
+ { 53, 13, 12, 0, 0, }, /* 277 */
+ { 53, 15, 12, 0, 0, }, /* 278 */
+ { 53, 26, 12, 0, 0, }, /* 279 */
+ { 53, 23, 12, 0, 0, }, /* 280 */
+ { 54, 12, 3, 0, 0, }, /* 281 */
+ { 54, 10, 5, 0, 0, }, /* 282 */
+ { 54, 7, 12, 0, 0, }, /* 283 */
+ { 54, 13, 12, 0, 0, }, /* 284 */
+ { 54, 15, 12, 0, 0, }, /* 285 */
+ { 54, 26, 12, 0, 0, }, /* 286 */
+ { 28, 7, 12, 0, 0, }, /* 287 */
+ { 28, 12, 3, 0, 0, }, /* 288 */
+ { 28, 10, 5, 0, 0, }, /* 289 */
+ { 28, 21, 12, 0, 0, }, /* 290 */
+ { 28, 10, 3, 0, 0, }, /* 291 */
+ { 28, 13, 12, 0, 0, }, /* 292 */
+ { 36, 12, 3, 0, 0, }, /* 293 */
+ { 36, 10, 5, 0, 0, }, /* 294 */
+ { 36, 7, 12, 0, 0, }, /* 295 */
+ { 36, 10, 3, 0, 0, }, /* 296 */
+ { 36, 7, 4, 0, 0, }, /* 297 */
+ { 36, 26, 12, 0, 0, }, /* 298 */
+ { 36, 15, 12, 0, 0, }, /* 299 */
+ { 36, 13, 12, 0, 0, }, /* 300 */
+ { 47, 10, 5, 0, 0, }, /* 301 */
+ { 47, 7, 12, 0, 0, }, /* 302 */
+ { 47, 12, 3, 0, 0, }, /* 303 */
+ { 47, 10, 3, 0, 0, }, /* 304 */
+ { 47, 13, 12, 0, 0, }, /* 305 */
+ { 47, 21, 12, 0, 0, }, /* 306 */
+ { 56, 7, 12, 0, 0, }, /* 307 */
+ { 56, 12, 3, 0, 0, }, /* 308 */
+ { 56, 7, 5, 0, 0, }, /* 309 */
+ { 56, 6, 12, 0, 0, }, /* 310 */
+ { 56, 21, 12, 0, 0, }, /* 311 */
+ { 56, 13, 12, 0, 0, }, /* 312 */
+ { 32, 7, 12, 0, 0, }, /* 313 */
+ { 32, 12, 3, 0, 0, }, /* 314 */
+ { 32, 7, 5, 0, 0, }, /* 315 */
+ { 32, 6, 12, 0, 0, }, /* 316 */
+ { 32, 13, 12, 0, 0, }, /* 317 */
+ { 57, 7, 12, 0, 0, }, /* 318 */
+ { 57, 26, 12, 0, 0, }, /* 319 */
+ { 57, 21, 12, 0, 0, }, /* 320 */
+ { 57, 12, 3, 0, 0, }, /* 321 */
+ { 57, 13, 12, 0, 0, }, /* 322 */
+ { 57, 15, 12, 0, 0, }, /* 323 */
+ { 57, 22, 12, 0, 0, }, /* 324 */
+ { 57, 18, 12, 0, 0, }, /* 325 */
+ { 57, 10, 5, 0, 0, }, /* 326 */
+ { 38, 7, 12, 0, 0, }, /* 327 */
+ { 38, 10, 12, 0, 0, }, /* 328 */
+ { 38, 12, 3, 0, 0, }, /* 329 */
+ { 38, 10, 5, 0, 0, }, /* 330 */
+ { 38, 13, 12, 0, 0, }, /* 331 */
+ { 38, 21, 12, 0, 0, }, /* 332 */
+ { 38, 26, 12, 0, 0, }, /* 333 */
+ { 16, 9, 12, 0, 7264, }, /* 334 */
+ { 16, 5, 12, 0, 3008, }, /* 335 */
+ { 16, 6, 12, 0, 0, }, /* 336 */
+ { 23, 7, 6, 0, 0, }, /* 337 */
+ { 23, 7, 7, 0, 0, }, /* 338 */
+ { 23, 7, 8, 0, 0, }, /* 339 */
+ { 15, 7, 12, 0, 0, }, /* 340 */
+ { 15, 12, 3, 0, 0, }, /* 341 */
+ { 15, 21, 12, 0, 0, }, /* 342 */
+ { 15, 15, 12, 0, 0, }, /* 343 */
+ { 15, 26, 12, 0, 0, }, /* 344 */
+ { 8, 9, 12, 0, 38864, }, /* 345 */
+ { 8, 9, 12, 0, 8, }, /* 346 */
+ { 8, 5, 12, 0, -8, }, /* 347 */
+ { 7, 17, 12, 0, 0, }, /* 348 */
+ { 7, 7, 12, 0, 0, }, /* 349 */
+ { 7, 21, 12, 0, 0, }, /* 350 */
+ { 40, 29, 12, 0, 0, }, /* 351 */
+ { 40, 7, 12, 0, 0, }, /* 352 */
+ { 40, 22, 12, 0, 0, }, /* 353 */
+ { 40, 18, 12, 0, 0, }, /* 354 */
+ { 45, 7, 12, 0, 0, }, /* 355 */
+ { 45, 14, 12, 0, 0, }, /* 356 */
+ { 50, 7, 12, 0, 0, }, /* 357 */
+ { 50, 12, 3, 0, 0, }, /* 358 */
+ { 24, 7, 12, 0, 0, }, /* 359 */
+ { 24, 12, 3, 0, 0, }, /* 360 */
+ { 6, 7, 12, 0, 0, }, /* 361 */
+ { 6, 12, 3, 0, 0, }, /* 362 */
+ { 51, 7, 12, 0, 0, }, /* 363 */
+ { 51, 12, 3, 0, 0, }, /* 364 */
+ { 31, 7, 12, 0, 0, }, /* 365 */
+ { 31, 12, 3, 0, 0, }, /* 366 */
+ { 31, 10, 5, 0, 0, }, /* 367 */
+ { 31, 21, 12, 0, 0, }, /* 368 */
+ { 31, 6, 12, 0, 0, }, /* 369 */
+ { 31, 23, 12, 0, 0, }, /* 370 */
+ { 31, 13, 12, 0, 0, }, /* 371 */
+ { 31, 15, 12, 0, 0, }, /* 372 */
+ { 37, 21, 12, 0, 0, }, /* 373 */
+ { 37, 17, 12, 0, 0, }, /* 374 */
+ { 37, 12, 3, 0, 0, }, /* 375 */
+ { 37, 1, 2, 0, 0, }, /* 376 */
+ { 37, 13, 12, 0, 0, }, /* 377 */
+ { 37, 7, 12, 0, 0, }, /* 378 */
+ { 37, 6, 12, 0, 0, }, /* 379 */
+ { 34, 7, 12, 0, 0, }, /* 380 */
+ { 34, 12, 3, 0, 0, }, /* 381 */
+ { 34, 10, 5, 0, 0, }, /* 382 */
+ { 34, 26, 12, 0, 0, }, /* 383 */
+ { 34, 21, 12, 0, 0, }, /* 384 */
+ { 34, 13, 12, 0, 0, }, /* 385 */
+ { 52, 7, 12, 0, 0, }, /* 386 */
+ { 39, 7, 12, 0, 0, }, /* 387 */
+ { 39, 13, 12, 0, 0, }, /* 388 */
+ { 39, 15, 12, 0, 0, }, /* 389 */
+ { 39, 26, 12, 0, 0, }, /* 390 */
+ { 31, 26, 12, 0, 0, }, /* 391 */
+ { 5, 7, 12, 0, 0, }, /* 392 */
+ { 5, 12, 3, 0, 0, }, /* 393 */
+ { 5, 10, 5, 0, 0, }, /* 394 */
+ { 5, 21, 12, 0, 0, }, /* 395 */
+ { 90, 7, 12, 0, 0, }, /* 396 */
+ { 90, 10, 5, 0, 0, }, /* 397 */
+ { 90, 12, 3, 0, 0, }, /* 398 */
+ { 90, 10, 12, 0, 0, }, /* 399 */
+ { 90, 13, 12, 0, 0, }, /* 400 */
+ { 90, 21, 12, 0, 0, }, /* 401 */
+ { 90, 6, 12, 0, 0, }, /* 402 */
+ { 27, 11, 3, 0, 0, }, /* 403 */
+ { 61, 12, 3, 0, 0, }, /* 404 */
+ { 61, 10, 5, 0, 0, }, /* 405 */
+ { 61, 7, 12, 0, 0, }, /* 406 */
+ { 61, 13, 12, 0, 0, }, /* 407 */
+ { 61, 21, 12, 0, 0, }, /* 408 */
+ { 61, 26, 12, 0, 0, }, /* 409 */
+ { 75, 12, 3, 0, 0, }, /* 410 */
+ { 75, 10, 5, 0, 0, }, /* 411 */
+ { 75, 7, 12, 0, 0, }, /* 412 */
+ { 75, 13, 12, 0, 0, }, /* 413 */
+ { 92, 7, 12, 0, 0, }, /* 414 */
+ { 92, 12, 3, 0, 0, }, /* 415 */
+ { 92, 10, 5, 0, 0, }, /* 416 */
+ { 92, 21, 12, 0, 0, }, /* 417 */
+ { 69, 7, 12, 0, 0, }, /* 418 */
+ { 69, 10, 5, 0, 0, }, /* 419 */
+ { 69, 12, 3, 0, 0, }, /* 420 */
+ { 69, 21, 12, 0, 0, }, /* 421 */
+ { 69, 13, 12, 0, 0, }, /* 422 */
+ { 72, 13, 12, 0, 0, }, /* 423 */
+ { 72, 7, 12, 0, 0, }, /* 424 */
+ { 72, 6, 12, 0, 0, }, /* 425 */
+ { 72, 21, 12, 0, 0, }, /* 426 */
+ { 12, 5, 12, 63, -6222, }, /* 427 */
+ { 12, 5, 12, 67, -6221, }, /* 428 */
+ { 12, 5, 12, 71, -6212, }, /* 429 */
+ { 12, 5, 12, 75, -6210, }, /* 430 */
+ { 12, 5, 12, 79, -6210, }, /* 431 */
+ { 12, 5, 12, 79, -6211, }, /* 432 */
+ { 12, 5, 12, 84, -6204, }, /* 433 */
+ { 12, 5, 12, 88, -6180, }, /* 434 */
+ { 12, 5, 12, 108, 35267, }, /* 435 */
+ { 16, 9, 12, 0, -3008, }, /* 436 */
+ { 75, 21, 12, 0, 0, }, /* 437 */
+ { 9, 10, 5, 0, 0, }, /* 438 */
+ { 9, 7, 12, 0, 0, }, /* 439 */
+ { 12, 5, 12, 0, 0, }, /* 440 */
+ { 12, 6, 12, 0, 0, }, /* 441 */
+ { 33, 5, 12, 0, 35332, }, /* 442 */
+ { 33, 5, 12, 0, 3814, }, /* 443 */
+ { 33, 9, 12, 92, 1, }, /* 444 */
+ { 33, 5, 12, 92, -1, }, /* 445 */
+ { 33, 5, 12, 92, -58, }, /* 446 */
+ { 33, 9, 12, 0, -7615, }, /* 447 */
+ { 19, 5, 12, 0, 8, }, /* 448 */
+ { 19, 9, 12, 0, -8, }, /* 449 */
+ { 19, 5, 12, 0, 74, }, /* 450 */
+ { 19, 5, 12, 0, 86, }, /* 451 */
+ { 19, 5, 12, 0, 100, }, /* 452 */
+ { 19, 5, 12, 0, 128, }, /* 453 */
+ { 19, 5, 12, 0, 112, }, /* 454 */
+ { 19, 5, 12, 0, 126, }, /* 455 */
+ { 19, 8, 12, 0, -8, }, /* 456 */
+ { 19, 5, 12, 0, 9, }, /* 457 */
+ { 19, 9, 12, 0, -74, }, /* 458 */
+ { 19, 8, 12, 0, -9, }, /* 459 */
+ { 19, 5, 12, 21, -7173, }, /* 460 */
+ { 19, 9, 12, 0, -86, }, /* 461 */
+ { 19, 9, 12, 0, -100, }, /* 462 */
+ { 19, 9, 12, 0, -112, }, /* 463 */
+ { 19, 9, 12, 0, -128, }, /* 464 */
+ { 19, 9, 12, 0, -126, }, /* 465 */
+ { 27, 1, 3, 0, 0, }, /* 466 */
+ { 27, 1, 13, 0, 0, }, /* 467 */
+ { 9, 27, 2, 0, 0, }, /* 468 */
+ { 9, 28, 2, 0, 0, }, /* 469 */
+ { 9, 21, 14, 0, 0, }, /* 470 */
+ { 9, 2, 2, 0, 0, }, /* 471 */
+ { 9, 9, 12, 0, 0, }, /* 472 */
+ { 9, 5, 12, 0, 0, }, /* 473 */
+ { 19, 9, 12, 96, -7517, }, /* 474 */
+ { 33, 9, 12, 100, -8383, }, /* 475 */
+ { 33, 9, 12, 104, -8262, }, /* 476 */
+ { 33, 9, 12, 0, 28, }, /* 477 */
+ { 9, 5, 14, 0, 0, }, /* 478 */
+ { 33, 5, 12, 0, -28, }, /* 479 */
+ { 33, 14, 12, 0, 16, }, /* 480 */
+ { 33, 14, 12, 0, -16, }, /* 481 */
+ { 33, 14, 12, 0, 0, }, /* 482 */
+ { 9, 25, 14, 0, 0, }, /* 483 */
+ { 9, 26, 12, 0, 26, }, /* 484 */
+ { 9, 26, 14, 0, 26, }, /* 485 */
+ { 9, 26, 12, 0, -26, }, /* 486 */
+ { 4, 26, 12, 0, 0, }, /* 487 */
+ { 17, 9, 12, 0, 48, }, /* 488 */
+ { 17, 5, 12, 0, -48, }, /* 489 */
+ { 33, 9, 12, 0, -10743, }, /* 490 */
+ { 33, 9, 12, 0, -3814, }, /* 491 */
+ { 33, 9, 12, 0, -10727, }, /* 492 */
+ { 33, 5, 12, 0, -10795, }, /* 493 */
+ { 33, 5, 12, 0, -10792, }, /* 494 */
+ { 33, 9, 12, 0, -10780, }, /* 495 */
+ { 33, 9, 12, 0, -10749, }, /* 496 */
+ { 33, 9, 12, 0, -10783, }, /* 497 */
+ { 33, 9, 12, 0, -10782, }, /* 498 */
+ { 33, 9, 12, 0, -10815, }, /* 499 */
+ { 10, 5, 12, 0, 0, }, /* 500 */
+ { 10, 26, 12, 0, 0, }, /* 501 */
+ { 10, 12, 3, 0, 0, }, /* 502 */
+ { 10, 21, 12, 0, 0, }, /* 503 */
+ { 10, 15, 12, 0, 0, }, /* 504 */
+ { 16, 5, 12, 0, -7264, }, /* 505 */
+ { 58, 7, 12, 0, 0, }, /* 506 */
+ { 58, 6, 12, 0, 0, }, /* 507 */
+ { 58, 21, 12, 0, 0, }, /* 508 */
+ { 58, 12, 3, 0, 0, }, /* 509 */
+ { 22, 26, 12, 0, 0, }, /* 510 */
+ { 22, 6, 12, 0, 0, }, /* 511 */
+ { 22, 14, 12, 0, 0, }, /* 512 */
+ { 23, 10, 3, 0, 0, }, /* 513 */
+ { 9, 17, 14, 0, 0, }, /* 514 */
+ { 26, 7, 12, 0, 0, }, /* 515 */
+ { 26, 6, 12, 0, 0, }, /* 516 */
+ { 29, 7, 12, 0, 0, }, /* 517 */
+ { 29, 6, 12, 0, 0, }, /* 518 */
+ { 3, 7, 12, 0, 0, }, /* 519 */
+ { 23, 7, 12, 0, 0, }, /* 520 */
+ { 23, 26, 12, 0, 0, }, /* 521 */
+ { 29, 26, 12, 0, 0, }, /* 522 */
+ { 22, 7, 12, 0, 0, }, /* 523 */
+ { 60, 7, 12, 0, 0, }, /* 524 */
+ { 60, 6, 12, 0, 0, }, /* 525 */
+ { 60, 26, 12, 0, 0, }, /* 526 */
+ { 85, 7, 12, 0, 0, }, /* 527 */
+ { 85, 6, 12, 0, 0, }, /* 528 */
+ { 85, 21, 12, 0, 0, }, /* 529 */
+ { 76, 7, 12, 0, 0, }, /* 530 */
+ { 76, 6, 12, 0, 0, }, /* 531 */
+ { 76, 21, 12, 0, 0, }, /* 532 */
+ { 76, 13, 12, 0, 0, }, /* 533 */
+ { 12, 9, 12, 108, 1, }, /* 534 */
+ { 12, 5, 12, 108, -35267, }, /* 535 */
+ { 12, 7, 12, 0, 0, }, /* 536 */
+ { 12, 21, 12, 0, 0, }, /* 537 */
+ { 78, 7, 12, 0, 0, }, /* 538 */
+ { 78, 14, 12, 0, 0, }, /* 539 */
+ { 78, 12, 3, 0, 0, }, /* 540 */
+ { 78, 21, 12, 0, 0, }, /* 541 */
+ { 33, 9, 12, 0, -35332, }, /* 542 */
+ { 33, 9, 12, 0, -42280, }, /* 543 */
+ { 33, 9, 12, 0, -42308, }, /* 544 */
+ { 33, 9, 12, 0, -42319, }, /* 545 */
+ { 33, 9, 12, 0, -42315, }, /* 546 */
+ { 33, 9, 12, 0, -42305, }, /* 547 */
+ { 33, 9, 12, 0, -42258, }, /* 548 */
+ { 33, 9, 12, 0, -42282, }, /* 549 */
+ { 33, 9, 12, 0, -42261, }, /* 550 */
+ { 33, 9, 12, 0, 928, }, /* 551 */
+ { 48, 7, 12, 0, 0, }, /* 552 */
+ { 48, 12, 3, 0, 0, }, /* 553 */
+ { 48, 10, 5, 0, 0, }, /* 554 */
+ { 48, 26, 12, 0, 0, }, /* 555 */
+ { 64, 7, 12, 0, 0, }, /* 556 */
+ { 64, 21, 12, 0, 0, }, /* 557 */
+ { 74, 10, 5, 0, 0, }, /* 558 */
+ { 74, 7, 12, 0, 0, }, /* 559 */
+ { 74, 12, 3, 0, 0, }, /* 560 */
+ { 74, 21, 12, 0, 0, }, /* 561 */
+ { 74, 13, 12, 0, 0, }, /* 562 */
+ { 68, 13, 12, 0, 0, }, /* 563 */
+ { 68, 7, 12, 0, 0, }, /* 564 */
+ { 68, 12, 3, 0, 0, }, /* 565 */
+ { 68, 21, 12, 0, 0, }, /* 566 */
+ { 73, 7, 12, 0, 0, }, /* 567 */
+ { 73, 12, 3, 0, 0, }, /* 568 */
+ { 73, 10, 5, 0, 0, }, /* 569 */
+ { 73, 21, 12, 0, 0, }, /* 570 */
+ { 83, 12, 3, 0, 0, }, /* 571 */
+ { 83, 10, 5, 0, 0, }, /* 572 */
+ { 83, 7, 12, 0, 0, }, /* 573 */
+ { 83, 21, 12, 0, 0, }, /* 574 */
+ { 83, 13, 12, 0, 0, }, /* 575 */
+ { 38, 6, 12, 0, 0, }, /* 576 */
+ { 67, 7, 12, 0, 0, }, /* 577 */
+ { 67, 12, 3, 0, 0, }, /* 578 */
+ { 67, 10, 5, 0, 0, }, /* 579 */
+ { 67, 13, 12, 0, 0, }, /* 580 */
+ { 67, 21, 12, 0, 0, }, /* 581 */
+ { 91, 7, 12, 0, 0, }, /* 582 */
+ { 91, 12, 3, 0, 0, }, /* 583 */
+ { 91, 6, 12, 0, 0, }, /* 584 */
+ { 91, 21, 12, 0, 0, }, /* 585 */
+ { 86, 7, 12, 0, 0, }, /* 586 */
+ { 86, 10, 5, 0, 0, }, /* 587 */
+ { 86, 12, 3, 0, 0, }, /* 588 */
+ { 86, 21, 12, 0, 0, }, /* 589 */
+ { 86, 6, 12, 0, 0, }, /* 590 */
+ { 33, 5, 12, 0, -928, }, /* 591 */
+ { 8, 5, 12, 0, -38864, }, /* 592 */
+ { 86, 13, 12, 0, 0, }, /* 593 */
+ { 23, 7, 9, 0, 0, }, /* 594 */
+ { 23, 7, 10, 0, 0, }, /* 595 */
+ { 9, 4, 2, 0, 0, }, /* 596 */
+ { 9, 3, 12, 0, 0, }, /* 597 */
+ { 25, 25, 12, 0, 0, }, /* 598 */
+ { 0, 24, 12, 0, 0, }, /* 599 */
+ { 9, 6, 3, 0, 0, }, /* 600 */
+ { 35, 7, 12, 0, 0, }, /* 601 */
+ { 19, 14, 12, 0, 0, }, /* 602 */
+ { 19, 15, 12, 0, 0, }, /* 603 */
+ { 19, 26, 12, 0, 0, }, /* 604 */
+ { 70, 7, 12, 0, 0, }, /* 605 */
+ { 66, 7, 12, 0, 0, }, /* 606 */
+ { 41, 7, 12, 0, 0, }, /* 607 */
+ { 41, 15, 12, 0, 0, }, /* 608 */
+ { 18, 7, 12, 0, 0, }, /* 609 */
+ { 18, 14, 12, 0, 0, }, /* 610 */
+ { 117, 7, 12, 0, 0, }, /* 611 */
+ { 117, 12, 3, 0, 0, }, /* 612 */
+ { 59, 7, 12, 0, 0, }, /* 613 */
+ { 59, 21, 12, 0, 0, }, /* 614 */
+ { 42, 7, 12, 0, 0, }, /* 615 */
+ { 42, 21, 12, 0, 0, }, /* 616 */
+ { 42, 14, 12, 0, 0, }, /* 617 */
+ { 13, 9, 12, 0, 40, }, /* 618 */
+ { 13, 5, 12, 0, -40, }, /* 619 */
+ { 46, 7, 12, 0, 0, }, /* 620 */
+ { 44, 7, 12, 0, 0, }, /* 621 */
+ { 44, 13, 12, 0, 0, }, /* 622 */
+ { 135, 9, 12, 0, 40, }, /* 623 */
+ { 135, 5, 12, 0, -40, }, /* 624 */
+ { 105, 7, 12, 0, 0, }, /* 625 */
+ { 103, 7, 12, 0, 0, }, /* 626 */
+ { 103, 21, 12, 0, 0, }, /* 627 */
+ { 109, 7, 12, 0, 0, }, /* 628 */
+ { 11, 7, 12, 0, 0, }, /* 629 */
+ { 80, 7, 12, 0, 0, }, /* 630 */
+ { 80, 21, 12, 0, 0, }, /* 631 */
+ { 80, 15, 12, 0, 0, }, /* 632 */
+ { 119, 7, 12, 0, 0, }, /* 633 */
+ { 119, 26, 12, 0, 0, }, /* 634 */
+ { 119, 15, 12, 0, 0, }, /* 635 */
+ { 115, 7, 12, 0, 0, }, /* 636 */
+ { 115, 15, 12, 0, 0, }, /* 637 */
+ { 127, 7, 12, 0, 0, }, /* 638 */
+ { 127, 15, 12, 0, 0, }, /* 639 */
+ { 65, 7, 12, 0, 0, }, /* 640 */
+ { 65, 15, 12, 0, 0, }, /* 641 */
+ { 65, 21, 12, 0, 0, }, /* 642 */
+ { 71, 7, 12, 0, 0, }, /* 643 */
+ { 71, 21, 12, 0, 0, }, /* 644 */
+ { 97, 7, 12, 0, 0, }, /* 645 */
+ { 96, 7, 12, 0, 0, }, /* 646 */
+ { 96, 15, 12, 0, 0, }, /* 647 */
+ { 30, 7, 12, 0, 0, }, /* 648 */
+ { 30, 12, 3, 0, 0, }, /* 649 */
+ { 30, 15, 12, 0, 0, }, /* 650 */
+ { 30, 21, 12, 0, 0, }, /* 651 */
+ { 87, 7, 12, 0, 0, }, /* 652 */
+ { 87, 15, 12, 0, 0, }, /* 653 */
+ { 87, 21, 12, 0, 0, }, /* 654 */
+ { 116, 7, 12, 0, 0, }, /* 655 */
+ { 116, 15, 12, 0, 0, }, /* 656 */
+ { 111, 7, 12, 0, 0, }, /* 657 */
+ { 111, 26, 12, 0, 0, }, /* 658 */
+ { 111, 12, 3, 0, 0, }, /* 659 */
+ { 111, 15, 12, 0, 0, }, /* 660 */
+ { 111, 21, 12, 0, 0, }, /* 661 */
+ { 77, 7, 12, 0, 0, }, /* 662 */
+ { 77, 21, 12, 0, 0, }, /* 663 */
+ { 82, 7, 12, 0, 0, }, /* 664 */
+ { 82, 15, 12, 0, 0, }, /* 665 */
+ { 81, 7, 12, 0, 0, }, /* 666 */
+ { 81, 15, 12, 0, 0, }, /* 667 */
+ { 120, 7, 12, 0, 0, }, /* 668 */
+ { 120, 21, 12, 0, 0, }, /* 669 */
+ { 120, 15, 12, 0, 0, }, /* 670 */
+ { 88, 7, 12, 0, 0, }, /* 671 */
+ { 129, 9, 12, 0, 64, }, /* 672 */
+ { 129, 5, 12, 0, -64, }, /* 673 */
+ { 129, 15, 12, 0, 0, }, /* 674 */
+ { 143, 7, 12, 0, 0, }, /* 675 */
+ { 143, 12, 3, 0, 0, }, /* 676 */
+ { 143, 13, 12, 0, 0, }, /* 677 */
+ { 0, 15, 12, 0, 0, }, /* 678 */
+ { 146, 7, 12, 0, 0, }, /* 679 */
+ { 146, 15, 12, 0, 0, }, /* 680 */
+ { 147, 7, 12, 0, 0, }, /* 681 */
+ { 147, 12, 3, 0, 0, }, /* 682 */
+ { 147, 15, 12, 0, 0, }, /* 683 */
+ { 147, 21, 12, 0, 0, }, /* 684 */
+ { 93, 10, 5, 0, 0, }, /* 685 */
+ { 93, 12, 3, 0, 0, }, /* 686 */
+ { 93, 7, 12, 0, 0, }, /* 687 */
+ { 93, 21, 12, 0, 0, }, /* 688 */
+ { 93, 15, 12, 0, 0, }, /* 689 */
+ { 93, 13, 12, 0, 0, }, /* 690 */
+ { 84, 12, 3, 0, 0, }, /* 691 */
+ { 84, 10, 5, 0, 0, }, /* 692 */
+ { 84, 7, 12, 0, 0, }, /* 693 */
+ { 84, 21, 12, 0, 0, }, /* 694 */
+ { 84, 1, 4, 0, 0, }, /* 695 */
+ { 100, 7, 12, 0, 0, }, /* 696 */
+ { 100, 13, 12, 0, 0, }, /* 697 */
+ { 95, 12, 3, 0, 0, }, /* 698 */
+ { 95, 7, 12, 0, 0, }, /* 699 */
+ { 95, 10, 5, 0, 0, }, /* 700 */
+ { 95, 13, 12, 0, 0, }, /* 701 */
+ { 95, 21, 12, 0, 0, }, /* 702 */
+ { 110, 7, 12, 0, 0, }, /* 703 */
+ { 110, 12, 3, 0, 0, }, /* 704 */
+ { 110, 21, 12, 0, 0, }, /* 705 */
+ { 99, 12, 3, 0, 0, }, /* 706 */
+ { 99, 10, 5, 0, 0, }, /* 707 */
+ { 99, 7, 12, 0, 0, }, /* 708 */
+ { 99, 7, 4, 0, 0, }, /* 709 */
+ { 99, 21, 12, 0, 0, }, /* 710 */
+ { 99, 13, 12, 0, 0, }, /* 711 */
+ { 47, 15, 12, 0, 0, }, /* 712 */
+ { 107, 7, 12, 0, 0, }, /* 713 */
+ { 107, 10, 5, 0, 0, }, /* 714 */
+ { 107, 12, 3, 0, 0, }, /* 715 */
+ { 107, 21, 12, 0, 0, }, /* 716 */
+ { 128, 7, 12, 0, 0, }, /* 717 */
+ { 128, 21, 12, 0, 0, }, /* 718 */
+ { 108, 7, 12, 0, 0, }, /* 719 */
+ { 108, 12, 3, 0, 0, }, /* 720 */
+ { 108, 10, 5, 0, 0, }, /* 721 */
+ { 108, 13, 12, 0, 0, }, /* 722 */
+ { 106, 12, 3, 0, 0, }, /* 723 */
+ { 106, 10, 5, 0, 0, }, /* 724 */
+ { 106, 7, 12, 0, 0, }, /* 725 */
+ { 106, 10, 3, 0, 0, }, /* 726 */
+ { 134, 7, 12, 0, 0, }, /* 727 */
+ { 134, 10, 5, 0, 0, }, /* 728 */
+ { 134, 12, 3, 0, 0, }, /* 729 */
+ { 134, 21, 12, 0, 0, }, /* 730 */
+ { 134, 13, 12, 0, 0, }, /* 731 */
+ { 123, 7, 12, 0, 0, }, /* 732 */
+ { 123, 10, 3, 0, 0, }, /* 733 */
+ { 123, 10, 5, 0, 0, }, /* 734 */
+ { 123, 12, 3, 0, 0, }, /* 735 */
+ { 123, 21, 12, 0, 0, }, /* 736 */
+ { 123, 13, 12, 0, 0, }, /* 737 */
+ { 122, 7, 12, 0, 0, }, /* 738 */
+ { 122, 10, 3, 0, 0, }, /* 739 */
+ { 122, 10, 5, 0, 0, }, /* 740 */
+ { 122, 12, 3, 0, 0, }, /* 741 */
+ { 122, 21, 12, 0, 0, }, /* 742 */
+ { 113, 7, 12, 0, 0, }, /* 743 */
+ { 113, 10, 5, 0, 0, }, /* 744 */
+ { 113, 12, 3, 0, 0, }, /* 745 */
+ { 113, 21, 12, 0, 0, }, /* 746 */
+ { 113, 13, 12, 0, 0, }, /* 747 */
+ { 101, 7, 12, 0, 0, }, /* 748 */
+ { 101, 12, 3, 0, 0, }, /* 749 */
+ { 101, 10, 5, 0, 0, }, /* 750 */
+ { 101, 13, 12, 0, 0, }, /* 751 */
+ { 125, 7, 12, 0, 0, }, /* 752 */
+ { 125, 12, 3, 0, 0, }, /* 753 */
+ { 125, 10, 5, 0, 0, }, /* 754 */
+ { 125, 13, 12, 0, 0, }, /* 755 */
+ { 125, 15, 12, 0, 0, }, /* 756 */
+ { 125, 21, 12, 0, 0, }, /* 757 */
+ { 125, 26, 12, 0, 0, }, /* 758 */
+ { 141, 7, 12, 0, 0, }, /* 759 */
+ { 141, 10, 5, 0, 0, }, /* 760 */
+ { 141, 12, 3, 0, 0, }, /* 761 */
+ { 141, 21, 12, 0, 0, }, /* 762 */
+ { 124, 9, 12, 0, 32, }, /* 763 */
+ { 124, 5, 12, 0, -32, }, /* 764 */
+ { 124, 13, 12, 0, 0, }, /* 765 */
+ { 124, 15, 12, 0, 0, }, /* 766 */
+ { 124, 7, 12, 0, 0, }, /* 767 */
+ { 140, 7, 12, 0, 0, }, /* 768 */
+ { 140, 12, 3, 0, 0, }, /* 769 */
+ { 140, 10, 5, 0, 0, }, /* 770 */
+ { 140, 7, 4, 0, 0, }, /* 771 */
+ { 140, 21, 12, 0, 0, }, /* 772 */
+ { 139, 7, 12, 0, 0, }, /* 773 */
+ { 139, 12, 3, 0, 0, }, /* 774 */
+ { 139, 10, 5, 0, 0, }, /* 775 */
+ { 139, 7, 4, 0, 0, }, /* 776 */
+ { 139, 21, 12, 0, 0, }, /* 777 */
+ { 121, 7, 12, 0, 0, }, /* 778 */
+ { 132, 7, 12, 0, 0, }, /* 779 */
+ { 132, 10, 5, 0, 0, }, /* 780 */
+ { 132, 12, 3, 0, 0, }, /* 781 */
+ { 132, 21, 12, 0, 0, }, /* 782 */
+ { 132, 13, 12, 0, 0, }, /* 783 */
+ { 132, 15, 12, 0, 0, }, /* 784 */
+ { 133, 21, 12, 0, 0, }, /* 785 */
+ { 133, 7, 12, 0, 0, }, /* 786 */
+ { 133, 12, 3, 0, 0, }, /* 787 */
+ { 133, 10, 5, 0, 0, }, /* 788 */
+ { 137, 7, 12, 0, 0, }, /* 789 */
+ { 137, 12, 3, 0, 0, }, /* 790 */
+ { 137, 7, 4, 0, 0, }, /* 791 */
+ { 137, 13, 12, 0, 0, }, /* 792 */
+ { 142, 7, 12, 0, 0, }, /* 793 */
+ { 142, 10, 5, 0, 0, }, /* 794 */
+ { 142, 12, 3, 0, 0, }, /* 795 */
+ { 142, 13, 12, 0, 0, }, /* 796 */
+ { 144, 7, 12, 0, 0, }, /* 797 */
+ { 144, 12, 3, 0, 0, }, /* 798 */
+ { 144, 10, 5, 0, 0, }, /* 799 */
+ { 144, 21, 12, 0, 0, }, /* 800 */
+ { 62, 7, 12, 0, 0, }, /* 801 */
+ { 62, 14, 12, 0, 0, }, /* 802 */
+ { 62, 21, 12, 0, 0, }, /* 803 */
+ { 79, 7, 12, 0, 0, }, /* 804 */
+ { 126, 7, 12, 0, 0, }, /* 805 */
+ { 114, 7, 12, 0, 0, }, /* 806 */
+ { 114, 13, 12, 0, 0, }, /* 807 */
+ { 114, 21, 12, 0, 0, }, /* 808 */
+ { 102, 7, 12, 0, 0, }, /* 809 */
+ { 102, 12, 3, 0, 0, }, /* 810 */
+ { 102, 21, 12, 0, 0, }, /* 811 */
+ { 118, 7, 12, 0, 0, }, /* 812 */
+ { 118, 12, 3, 0, 0, }, /* 813 */
+ { 118, 21, 12, 0, 0, }, /* 814 */
+ { 118, 26, 12, 0, 0, }, /* 815 */
+ { 118, 6, 12, 0, 0, }, /* 816 */
+ { 118, 13, 12, 0, 0, }, /* 817 */
+ { 118, 15, 12, 0, 0, }, /* 818 */
+ { 145, 9, 12, 0, 32, }, /* 819 */
+ { 145, 5, 12, 0, -32, }, /* 820 */
+ { 145, 15, 12, 0, 0, }, /* 821 */
+ { 145, 21, 12, 0, 0, }, /* 822 */
+ { 98, 7, 12, 0, 0, }, /* 823 */
+ { 98, 10, 5, 0, 0, }, /* 824 */
+ { 98, 12, 3, 0, 0, }, /* 825 */
+ { 98, 6, 12, 0, 0, }, /* 826 */
+ { 136, 6, 12, 0, 0, }, /* 827 */
+ { 138, 6, 12, 0, 0, }, /* 828 */
+ { 136, 7, 12, 0, 0, }, /* 829 */
+ { 138, 7, 12, 0, 0, }, /* 830 */
+ { 104, 7, 12, 0, 0, }, /* 831 */
+ { 104, 26, 12, 0, 0, }, /* 832 */
+ { 104, 12, 3, 0, 0, }, /* 833 */
+ { 104, 21, 12, 0, 0, }, /* 834 */
+ { 9, 10, 3, 0, 0, }, /* 835 */
+ { 19, 12, 3, 0, 0, }, /* 836 */
+ { 130, 26, 12, 0, 0, }, /* 837 */
+ { 130, 12, 3, 0, 0, }, /* 838 */
+ { 130, 21, 12, 0, 0, }, /* 839 */
+ { 17, 12, 3, 0, 0, }, /* 840 */
+ { 112, 7, 12, 0, 0, }, /* 841 */
+ { 112, 15, 12, 0, 0, }, /* 842 */
+ { 112, 12, 3, 0, 0, }, /* 843 */
+ { 131, 9, 12, 0, 34, }, /* 844 */
+ { 131, 5, 12, 0, -34, }, /* 845 */
+ { 131, 12, 3, 0, 0, }, /* 846 */
+ { 131, 13, 12, 0, 0, }, /* 847 */
+ { 131, 21, 12, 0, 0, }, /* 848 */
+ { 9, 2, 14, 0, 0, }, /* 849 */
+ { 9, 26, 11, 0, 0, }, /* 850 */
+ { 26, 26, 12, 0, 0, }, /* 851 */
+ { 9, 24, 3, 0, 0, }, /* 852 */
+ { 9, 1, 3, 0, 0, }, /* 853 */
};
-const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
+const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* U+0000 */
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 41, 42, 43, 44, 45, /* U+1000 */
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, /* U+1800 */
62, 63, 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, /* U+2000 */
- 77, 77, 66, 78, 66, 66, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, /* U+2800 */
- 89, 90, 91, 92, 93, 94, 95, 71, 96, 96, 96, 96, 96, 96, 96, 96, /* U+3000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+3800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+4000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 96, 96, 96, 96, /* U+4800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+5000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+5800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+6000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+6800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+7000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+7800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+8000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+8800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+9000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 98, /* U+9800 */
- 99,100,100,100,100,100,100,100,100,101,102,102,103,104,105,106, /* U+A000 */
-107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,115, /* U+A800 */
-116,117,118,119,120,121,115,116,117,118,119,120,121,115,116,117, /* U+B000 */
-118,119,120,121,115,116,117,118,119,120,121,115,116,117,118,119, /* U+B800 */
-120,121,115,116,117,118,119,120,121,115,116,117,118,119,120,121, /* U+C000 */
-115,116,117,118,119,120,121,115,116,117,118,119,120,121,115,116, /* U+C800 */
-117,118,119,120,121,115,116,117,118,119,120,121,115,116,117,122, /* U+D000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+D800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+E000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+E800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F000 */
-124,124, 96, 96,125,126,127,128,129,129,130,131,132,133,134,135, /* U+F800 */
-136,137,138,139,140,141,142,143,144,145,146,140,147,147,148,140, /* U+10000 */
-149,150,151,152,153,154,155,156,157,158,140,140,159,140,140,140, /* U+10800 */
-160,161,162,163,164,165,166,140,167,168,140,169,170,171,172,140, /* U+11000 */
-140,173,140,140,174,175,140,140,176,177,178,140,140,140,140,140, /* U+11800 */
-179,179,179,179,179,179,179,180,181,179,182,140,140,140,140,140, /* U+12000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+12800 */
-183,183,183,183,183,183,183,183,184,140,140,140,140,140,140,140, /* U+13000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+13800 */
-140,140,140,140,140,140,140,140,185,185,185,185,186,140,140,140, /* U+14000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+14800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+15000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+15800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+16000 */
-187,187,187,187,188,189,190,191,140,140,140,140,140,140,192,193, /* U+16800 */
-194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194, /* U+17000 */
-194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194, /* U+17800 */
-194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195, /* U+18000 */
-194,194,194,194,194,196,140,140,140,140,140,140,140,140,140,140, /* U+18800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+19000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+19800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+1A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+1A800 */
-197,198,199,200,200,201,140,140,140,140,140,140,140,140,140,140, /* U+1B000 */
-140,140,140,140,140,140,140,140,202,203,140,140,140,140,140,140, /* U+1B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+1C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+1C800 */
- 71,204,205,206,207,140,208,140,209,210,211,212,213,214,215,216, /* U+1D000 */
-217,217,217,217,218,219,140,140,140,140,140,140,140,140,140,140, /* U+1D800 */
-220,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+1E000 */
-221,222,223,140,140,140,140,140,140,140,140,140,224,225,140,140, /* U+1E800 */
-226,227,228,229,230,140,231,232,233,234,235,236,237,238,239,240, /* U+1F000 */
-241,242,243,244,140,140,140,140,140,140,140,140,140,140,140,140, /* U+1F800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+20000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+20800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+21000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+21800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+22000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+22800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+23000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+23800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+24000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+24800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+25000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+25800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+26000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+26800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+27000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+27800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+28000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+28800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+29000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+29800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,245, 96, 96, /* U+2A000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+2A800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,246, 96, /* U+2B000 */
-247, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+2B800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+2C000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,248, 96, 96, /* U+2C800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+2D000 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+2D800 */
- 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, /* U+2E000 */
- 96, 96, 96, 96, 96, 96, 96,249,140,140,140,140,140,140,140,140, /* U+2E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+2F000 */
- 96, 96, 96, 96,250,140,140,140,140,140,140,140,140,140,140,140, /* U+2F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+30000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+30800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+31000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+31800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+32000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+32800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+33000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+33800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+34000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+34800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+35000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+35800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+36000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+36800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+37000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+37800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+38000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+38800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+39000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+39800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3A800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3B000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3C800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3D000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3D800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3E000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3F000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+3F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+40000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+40800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+41000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+41800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+42000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+42800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+43000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+43800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+44000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+44800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+45000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+45800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+46000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+46800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+47000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+47800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+48000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+48800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+49000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+49800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4A800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4B000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4C800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4D000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4D800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4E000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4F000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+4F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+50000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+50800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+51000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+51800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+52000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+52800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+53000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+53800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+54000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+54800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+55000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+55800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+56000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+56800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+57000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+57800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+58000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+58800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+59000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+59800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5A800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5B000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5C800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5D000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5D800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5E000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5F000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+5F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+60000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+60800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+61000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+61800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+62000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+62800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+63000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+63800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+64000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+64800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+65000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+65800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+66000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+66800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+67000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+67800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+68000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+68800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+69000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+69800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6A800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6B000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6C800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6D000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6D800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6E000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6F000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+6F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+70000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+70800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+71000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+71800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+72000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+72800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+73000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+73800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+74000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+74800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+75000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+75800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+76000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+76800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+77000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+77800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+78000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+78800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+79000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+79800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7A800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7B000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7C800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7D000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7D800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7E000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7F000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+7F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+80000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+80800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+81000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+81800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+82000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+82800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+83000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+83800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+84000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+84800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+85000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+85800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+86000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+86800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+87000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+87800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+88000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+88800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+89000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+89800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8A800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8B000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8C800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8D000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8D800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8E000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8F000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+8F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+90000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+90800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+91000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+91800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+92000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+92800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+93000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+93800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+94000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+94800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+95000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+95800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+96000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+96800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+97000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+97800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+98000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+98800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+99000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+99800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9A000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9A800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9B000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9B800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9C000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9C800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9D000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9D800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9E000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9E800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9F000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+9F800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A0000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A0800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A1000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A1800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A2000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A2800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A3000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A3800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A4000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A4800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A5000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A5800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A6000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A6800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A7000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A7800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A8000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A8800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A9000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+A9800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AA000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AA800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AB000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AB800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AC000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AC800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AD000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AD800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AE000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AE800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AF000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+AF800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B0000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B0800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B1000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B1800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B2000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B2800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B3000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B3800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B4000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B4800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B5000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B5800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B6000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B6800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B7000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B7800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B8000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B8800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B9000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+B9800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BA000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BA800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BB000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BB800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BC000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BC800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BD000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BD800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BE000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BE800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BF000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+BF800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C0000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C0800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C1000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C1800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C2000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C2800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C3000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C3800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C4000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C4800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C5000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C5800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C6000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C6800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C7000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C7800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C8000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C8800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C9000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+C9800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CA000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CA800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CB000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CB800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CC000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CC800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CD000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CD800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CE000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CE800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CF000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+CF800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D0000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D0800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D1000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D1800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D2000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D2800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D3000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D3800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D4000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D4800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D5000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D5800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D6000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D6800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D7000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D7800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D8000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D8800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D9000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+D9800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DA000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DA800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DB000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DB800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DC000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DC800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DD000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DD800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DE000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DE800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DF000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+DF800 */
-251,252,253,254,252,252,252,252,252,252,252,252,252,252,252,252, /* U+E0000 */
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, /* U+E0800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E1000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E1800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E2000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E2800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E3000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E3800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E4000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E4800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E5000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E5800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E6000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E6800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E7000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E7800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E8000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E8800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E9000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+E9800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EA000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EA800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EB000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EB800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EC000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EC800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+ED000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+ED800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EE000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EE800 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EF000 */
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, /* U+EF800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F0000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F0800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F1000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F1800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F2000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F2800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F3000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F3800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F4000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F4800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F5000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F5800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F6000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F6800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F7000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F7800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F8000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F8800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F9000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+F9800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FA000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FA800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FB000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FB800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FC000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FC800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FD000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FD800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FE000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FE800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+FF000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,255, /* U+FF800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+100000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+100800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+101000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+101800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+102000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+102800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+103000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+103800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+104000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+104800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+105000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+105800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+106000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+106800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+107000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+107800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+108000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+108800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+109000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+109800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10A000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10A800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10B000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10B800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10C000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10C800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10D000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10D800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10E000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10E800 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+10F000 */
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,255, /* U+10F800 */
+ 77, 77, 78, 79, 66, 66, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, /* U+2800 */
+ 90, 91, 92, 93, 94, 95, 96, 71, 97, 97, 97, 97, 97, 97, 97, 97, /* U+3000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+3800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+4000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, 97, 97, 97, 97, /* U+4800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+5000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+5800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+6000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+6800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+7000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+7800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+8000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+8800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+9000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 99, /* U+9800 */
+100,101,101,101,101,101,101,101,101,102,103,103,104,105,106,107, /* U+A000 */
+108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,116, /* U+A800 */
+117,118,119,120,121,122,116,117,118,119,120,121,122,116,117,118, /* U+B000 */
+119,120,121,122,116,117,118,119,120,121,122,116,117,118,119,120, /* U+B800 */
+121,122,116,117,118,119,120,121,122,116,117,118,119,120,121,122, /* U+C000 */
+116,117,118,119,120,121,122,116,117,118,119,120,121,122,116,117, /* U+C800 */
+118,119,120,121,122,116,117,118,119,120,121,122,116,117,118,123, /* U+D000 */
+124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+D800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+E000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+E800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F000 */
+125,125, 97, 97,126,127,128,129,130,130,131,132,133,134,135,136, /* U+F800 */
+137,138,139,140,141,142,143,144,145,146,147,141,148,148,149,141, /* U+10000 */
+150,151,152,153,154,155,156,157,158,159,160,141,161,141,162,141, /* U+10800 */
+163,164,165,166,167,168,169,141,170,171,141,172,173,174,175,141, /* U+11000 */
+176,177,141,141,178,179,141,141,180,181,182,183,141,184,141,141, /* U+11800 */
+185,185,185,185,185,185,185,186,187,185,188,141,141,141,141,141, /* U+12000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+12800 */
+189,189,189,189,189,189,189,189,190,141,141,141,141,141,141,141, /* U+13000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+13800 */
+141,141,141,141,141,141,141,141,191,191,191,191,192,141,141,141, /* U+14000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+14800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+15000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+15800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+16000 */
+193,193,193,193,194,195,196,197,141,141,141,141,198,199,200,201, /* U+16800 */
+202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202, /* U+17000 */
+202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202, /* U+17800 */
+202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,203, /* U+18000 */
+202,202,202,202,202,204,141,141,141,141,141,141,141,141,141,141, /* U+18800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+19000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+19800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+1A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+1A800 */
+205,206,207,208,208,209,141,141,141,141,141,141,141,141,141,141, /* U+1B000 */
+141,141,141,141,141,141,141,141,210,211,141,141,141,141,141,141, /* U+1B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+1C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+1C800 */
+ 71,212,213,214,215,216,217,141,218,219,220,221,222,223,224,225, /* U+1D000 */
+226,226,226,226,227,228,141,141,141,141,141,141,141,141,141,141, /* U+1D800 */
+229,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+1E000 */
+230,231,232,141,141,141,141,141,233,234,141,141,235,236,141,141, /* U+1E800 */
+237,238,239,240,241,242,243,244,243,243,245,243,246,247,248,249, /* U+1F000 */
+250,251,252,253,254,242,242,242,242,242,242,242,242,242,242,255, /* U+1F800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+20000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+20800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+21000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+21800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+22000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+22800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+23000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+23800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+24000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+24800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+25000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+25800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+26000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+26800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+27000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+27800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+28000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+28800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+29000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+29800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,256, 97, 97, /* U+2A000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+2A800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,257, 97, /* U+2B000 */
+258, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+2B800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+2C000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,259, 97, 97, /* U+2C800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+2D000 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+2D800 */
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* U+2E000 */
+ 97, 97, 97, 97, 97, 97, 97,260,141,141,141,141,141,141,141,141, /* U+2E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+2F000 */
+ 97, 97, 97, 97,261,141,141,141,141,141,141,141,141,141,141,141, /* U+2F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+30000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+30800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+31000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+31800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+32000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+32800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+33000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+33800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+34000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+34800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+35000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+35800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+36000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+36800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+37000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+37800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+38000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+38800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+39000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+39800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3A800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3B000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3C800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3D000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3D800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3E000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3F000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+40000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+40800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+41000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+41800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+42000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+42800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+43000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+43800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+44000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+44800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+45000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+45800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+46000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+46800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+47000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+47800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+48000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+48800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+49000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+49800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4A800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4B000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4C800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4D000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4D800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4E000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4F000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+50000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+50800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+51000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+51800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+52000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+52800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+53000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+53800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+54000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+54800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+55000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+55800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+56000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+56800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+57000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+57800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+58000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+58800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+59000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+59800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5A800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5B000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5C800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5D000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5D800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5E000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5F000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+60000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+60800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+61000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+61800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+62000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+62800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+63000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+63800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+64000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+64800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+65000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+65800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+66000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+66800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+67000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+67800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+68000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+68800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+69000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+69800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6A800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6B000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6C800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6D000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6D800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6E000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6F000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+70000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+70800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+71000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+71800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+72000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+72800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+73000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+73800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+74000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+74800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+75000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+75800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+76000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+76800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+77000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+77800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+78000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+78800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+79000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+79800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7A800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7B000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7C800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7D000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7D800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7E000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7F000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+80000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+80800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+81000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+81800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+82000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+82800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+83000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+83800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+84000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+84800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+85000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+85800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+86000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+86800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+87000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+87800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+88000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+88800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+89000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+89800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8A800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8B000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8C800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8D000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8D800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8E000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8F000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+90000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+90800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+91000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+91800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+92000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+92800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+93000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+93800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+94000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+94800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+95000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+95800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+96000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+96800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+97000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+97800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+98000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+98800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+99000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+99800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9A000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9A800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9B000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9B800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9C000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9C800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9D000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9D800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9E000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9E800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9F000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9F800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A0000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A0800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A1000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A1800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A2000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A2800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A3000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A3800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A4000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A4800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A5000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A5800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A6000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A6800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A7000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A7800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A8000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A8800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A9000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A9800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AA000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AA800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AB000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AB800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AC000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AC800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AD000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AD800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AE000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AE800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AF000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AF800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B0000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B0800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B1000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B1800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B2000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B2800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B3000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B3800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B4000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B4800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B5000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B5800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B6000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B6800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B7000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B7800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B8000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B8800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B9000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B9800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BA000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BA800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BB000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BB800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BC000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BC800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BD000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BD800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BE000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BE800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BF000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BF800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C0000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C0800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C1000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C1800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C2000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C2800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C3000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C3800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C4000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C4800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C5000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C5800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C6000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C6800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C7000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C7800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C8000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C8800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C9000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C9800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CA000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CA800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CB000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CB800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CC000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CC800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CD000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CD800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CE000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CE800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CF000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CF800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D0000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D0800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D1000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D1800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D2000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D2800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D3000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D3800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D4000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D4800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D5000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D5800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D6000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D6800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D7000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D7800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D8000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D8800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D9000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D9800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DA000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DA800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DB000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DB800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DC000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DC800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DD000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DD800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DE000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DE800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DF000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DF800 */
+262,263,264,265,263,263,263,263,263,263,263,263,263,263,263,263, /* U+E0000 */
+263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263, /* U+E0800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E1000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E1800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E2000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E2800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E3000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E3800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E4000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E4800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E5000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E5800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E6000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E6800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E7000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E7800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E8000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E8800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E9000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E9800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EA000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EA800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EB000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EB800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EC000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EC800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+ED000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+ED800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EE000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EE800 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EF000 */
+141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EF800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F0000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F0800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F1000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F1800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F2000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F2800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F3000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F3800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F4000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F4800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F5000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F5800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F6000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F6800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F7000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F7800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F8000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F8800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F9000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F9800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FA000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FA800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FB000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FB800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FC000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FC800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FD000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FD800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FE000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FE800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FF000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,266, /* U+FF800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+100000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+100800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+101000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+101800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+102000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+102800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+103000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+103800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+104000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+104800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+105000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+105800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+106000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+106800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+107000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+107800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+108000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+108800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+109000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+109800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10A000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10A800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10B000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10B800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10C000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10C800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10D000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10D800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10E000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10E800 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10F000 */
+125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,266, /* U+10F800 */
};
-const uint16_t PRIV(ucd_stage2)[] = { /* 65536 bytes, block = 128 */
+const uint16_t PRIV(ucd_stage2)[] = { /* 68352 bytes, block = 128 */
/* block 0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1489,647 +1522,647 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 65536 bytes, block = 128 */
/* block 1 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 3, 4, 5, 5, 5, 5, 19, 4, 14, 19, 20, 21, 8, 22, 19, 14,
- 19, 8, 23, 23, 14, 24, 4, 4, 14, 23, 20, 25, 23, 23, 23, 4,
- 11, 11, 11, 11, 11, 26, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 8, 11, 11, 11, 11, 11, 11, 11, 27,
- 16, 16, 16, 16, 16, 28, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 8, 16, 16, 16, 16, 16, 16, 16, 29,
+ 3, 4, 5, 5, 5, 5, 19, 4, 14, 20, 21, 22, 8, 23, 20, 14,
+ 19, 8, 24, 24, 14, 25, 4, 4, 14, 24, 21, 26, 24, 24, 24, 4,
+ 11, 11, 11, 11, 11, 27, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 8, 11, 11, 11, 11, 11, 11, 11, 28,
+ 16, 16, 16, 16, 16, 29, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 8, 16, 16, 16, 16, 16, 16, 16, 30,
/* block 2 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 32, 33, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 34, 30, 31, 30, 31, 30, 31, 35,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 33, 34, 31, 32, 31, 32, 31, 32, 34, 31, 32, 31, 32, 31, 32, 31,
+ 32, 31, 32, 31, 32, 31, 32, 31, 32, 34, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 35, 31, 32, 31, 32, 31, 32, 36,
/* block 3 */
- 36, 37, 30, 31, 30, 31, 38, 30, 31, 39, 39, 30, 31, 33, 40, 41,
- 42, 30, 31, 39, 43, 44, 45, 46, 30, 31, 47, 33, 45, 48, 49, 50,
- 30, 31, 30, 31, 30, 31, 51, 30, 31, 51, 33, 33, 30, 31, 51, 30,
- 31, 52, 52, 30, 31, 30, 31, 53, 30, 31, 33, 20, 30, 31, 33, 54,
- 20, 20, 20, 20, 55, 56, 57, 58, 59, 60, 61, 62, 63, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 64, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 33, 65, 66, 67, 30, 31, 68, 69, 30, 31, 30, 31, 30, 31, 30, 31,
+ 37, 38, 31, 32, 31, 32, 39, 31, 32, 40, 40, 31, 32, 34, 41, 42,
+ 43, 31, 32, 40, 44, 45, 46, 47, 31, 32, 48, 34, 46, 49, 50, 51,
+ 31, 32, 31, 32, 31, 32, 52, 31, 32, 52, 34, 34, 31, 32, 52, 31,
+ 32, 53, 53, 31, 32, 31, 32, 54, 31, 32, 34, 21, 31, 32, 34, 55,
+ 21, 21, 21, 21, 56, 57, 58, 59, 60, 61, 62, 63, 64, 31, 32, 31,
+ 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 65, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 34, 66, 67, 68, 31, 32, 69, 70, 31, 32, 31, 32, 31, 32, 31, 32,
/* block 4 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 70, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 33, 33, 33, 33, 33, 33, 71, 30, 31, 72, 73, 74,
- 74, 30, 31, 75, 76, 77, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 78, 79, 80, 81, 82, 33, 83, 83, 33, 84, 33, 85, 86, 33, 33, 33,
- 83, 87, 33, 88, 33, 89, 90, 33, 91, 92, 90, 93, 94, 33, 33, 92,
- 33, 95, 96, 33, 33, 97, 33, 33, 33, 33, 33, 33, 33, 98, 33, 33,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 71, 34, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 34, 34, 34, 34, 34, 34, 72, 31, 32, 73, 74, 75,
+ 75, 31, 32, 76, 77, 78, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 79, 80, 81, 82, 83, 34, 84, 84, 34, 85, 34, 86, 87, 34, 34, 34,
+ 84, 88, 34, 89, 34, 90, 91, 34, 92, 93, 91, 94, 95, 34, 34, 93,
+ 34, 96, 97, 34, 34, 98, 34, 34, 34, 34, 34, 34, 34, 99, 34, 34,
/* block 5 */
- 99, 33, 33, 99, 33, 33, 33,100, 99,101,102,102,103, 33, 33, 33,
- 33, 33,104, 33, 20, 33, 33, 33, 33, 33, 33, 33, 33,105,106, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
-107,107,107,107,107,107,107,107,107,108,108,108,108,108,108,108,
-108,108, 14, 14, 14, 14,108,108,108,108,108,108,108,108,108,108,
-108,108, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-107,107,107,107,107, 14, 14, 14, 14, 14,109,109,108, 14,108, 14,
+100, 34, 34,100, 34, 34, 34,101,100,102,103,103,104, 34, 34, 34,
+ 34, 34,105, 34, 21, 34, 34, 34, 34, 34, 34, 34, 34,106,107, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+108,108,108,108,108,108,108,108,108,109,109,109,109,109,109,109,
+109,109, 14, 14, 14, 14,109,109,109,109,109,109,109,109,109,109,
+109,109, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+108,108,108,108,108, 14, 14, 14, 14, 14,110,110,109, 14,109, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
/* block 6 */
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,111,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-112,113,112,113,108,114,112,113,115,115,116,117,117,117, 4,118,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,112,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+113,114,113,114,109,115,113,114,116,116,117,118,118,118, 4,119,
/* block 7 */
-115,115,115,115,114, 14,119, 4,120,120,120,115,121,115,122,122,
-123,124,125,124,124,126,124,124,127,128,129,124,130,124,124,124,
-131,132,115,133,124,124,134,124,124,135,124,124,136,137,137,137,
-123,138,139,138,138,140,138,138,141,142,143,138,144,138,138,138,
-145,146,147,148,138,138,149,138,138,150,138,138,151,152,152,153,
-154,155,156,156,156,157,158,159,112,113,112,113,112,113,112,113,
-112,113,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
-162,163,164,165,166,167,168,112,113,169,112,113,123,170,170,170,
+116,116,116,116,115, 14,120, 4,121,121,121,116,122,116,123,123,
+124,125,126,125,125,127,125,125,128,129,130,125,131,125,125,125,
+132,133,116,134,125,125,135,125,125,136,125,125,137,138,138,138,
+124,139,140,139,139,141,139,139,142,143,144,139,145,139,139,139,
+146,147,148,149,139,139,150,139,139,151,139,139,152,153,153,154,
+155,156,157,157,157,158,159,160,113,114,113,114,113,114,113,114,
+113,114,161,162,161,162,161,162,161,162,161,162,161,162,161,162,
+163,164,165,166,167,168,169,113,114,170,113,114,124,171,171,171,
/* block 8 */
-171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
-172,172,173,172,174,172,172,172,172,172,172,172,172,172,175,172,
-172,176,177,172,172,172,172,172,172,172,178,172,172,172,172,172,
-179,179,180,179,181,179,179,179,179,179,179,179,179,179,182,179,
-179,183,184,179,179,179,179,179,179,179,185,179,179,179,179,179,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-187,188,189,190,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
+172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+173,173,174,173,175,173,173,173,173,173,173,173,173,173,176,173,
+173,177,178,173,173,173,173,173,173,173,179,173,173,173,173,173,
+180,180,181,180,182,180,180,180,180,180,180,180,180,180,183,180,
+180,184,185,180,180,180,180,180,180,180,186,180,180,180,180,180,
+187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
+188,189,190,191,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
/* block 9 */
-187,188,191,192,192,110,110,192,193,193,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-194,187,188,187,188,187,188,187,188,187,188,187,188,187,188,195,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
+188,189,192,193,193,111,111,193,194,194,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+195,188,189,188,189,188,189,188,189,188,189,188,189,188,189,196,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
/* block 10 */
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-115,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,
-196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,
-196,196,196,196,196,196,196,115,115,197,198,198,198,198,198,198,
-115,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+116,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,
+197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,
+197,197,197,197,197,197,197,116,116,198,199,199,199,199,199,199,
+200,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
+201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
/* block 11 */
-199,199,199,199,199,199,199,200,115, 4,201,115,115,202,202,203,
-115,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,
-204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,
-204,204,204,204,204,204,204,204,204,204,204,204,204,204,205,204,
-206,204,204,206,204,204,206,204,115,115,115,115,115,115,115,115,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,115,115,115,115,115,
-207,207,207,206,206,115,115,115,115,115,115,115,115,115,115,115,
+201,201,201,201,201,201,201,200,200, 4,202,116,116,203,203,204,
+116,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
+205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
+205,205,205,205,205,205,205,205,205,205,205,205,205,205,206,205,
+207,205,205,207,205,205,207,205,116,116,116,116,116,116,116,116,
+208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,
+208,208,208,208,208,208,208,208,208,208,208,116,116,116,116,208,
+208,208,208,207,207,116,116,116,116,116,116,116,116,116,116,116,
/* block 12 */
-208,208,208,208,208,209,210,210,210,211,211,212, 4,211,213,213,
-214,214,214,214,214,214,214,214,214,214,214, 4,215,115,211, 4,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-108,216,216,216,216,216,216,216,216,216,216,110,110,110,110,110,
-110,110,110,110,110,110,214,214,214,214,214,214,214,214,214,214,
-217,217,217,217,217,217,217,217,217,217,211,211,211,211,216,216,
-110,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
+209,209,209,209,209,210,211,211,211,212,212,213, 4,212,214,214,
+215,215,215,215,215,215,215,215,215,215,215, 4,216,116,212, 4,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+109,217,217,217,217,217,217,217,217,217,217,111,111,111,111,111,
+111,111,111,111,111,111,215,215,215,215,215,215,215,215,215,215,
+218,218,218,218,218,218,218,218,218,218,212,212,212,212,217,217,
+111,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
/* block 13 */
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,211,216,214,214,214,214,214,214,214,209,213,214,
-214,214,214,214,214,218,218,214,214,213,214,214,214,214,216,216,
-217,217,217,217,217,217,217,217,217,217,216,216,216,213,213,216,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,212,217,215,215,215,215,215,215,215,210,214,215,
+215,215,215,215,215,219,219,215,215,214,215,215,215,215,217,217,
+218,218,218,218,218,218,218,218,218,218,217,217,217,214,214,217,
/* block 14 */
-219,219,219,219,219,219,219,219,219,219,219,219,219,219,115,220,
-221,222,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
-221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
+220,220,220,220,220,220,220,220,220,220,220,220,220,220,116,221,
+222,223,222,222,222,222,222,222,222,222,222,222,222,222,222,222,
222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,
-222,222,222,222,222,222,222,222,222,222,222,115,115,221,221,221,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
+223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
+223,223,223,223,223,223,223,223,223,223,223,116,116,222,222,222,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
/* block 15 */
-223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
-223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
-223,223,223,223,223,223,224,224,224,224,224,224,224,224,224,224,
-224,223,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-225,225,225,225,225,225,225,225,225,225,226,226,226,226,226,226,
-226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,
-226,226,226,226,226,226,226,226,226,226,226,227,227,227,227,227,
-227,227,227,227,228,228,229,230,230,230,228,115,115,115,115,115,
+224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,225,225,225,225,225,225,225,225,225,225,
+225,224,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+226,226,226,226,226,226,226,226,226,226,227,227,227,227,227,227,
+227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,
+227,227,227,227,227,227,227,227,227,227,227,228,228,228,228,228,
+228,228,228,228,229,229,230,231,231,231,229,116,116,228,232,232,
/* block 16 */
-231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,
-231,231,231,231,231,231,232,232,232,232,233,232,232,232,232,232,
-232,232,232,232,233,232,232,232,233,232,232,232,232,232,115,115,
-234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,115,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,236,236,236,115,115,237,115,
-221,221,221,221,221,221,221,221,221,221,221,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
+233,233,233,233,233,233,234,234,234,234,235,234,234,234,234,234,
+234,234,234,234,235,234,234,234,235,234,234,234,234,234,116,116,
+236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,116,
+237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
+237,237,237,237,237,237,237,237,237,238,238,238,116,116,239,116,
+222,222,222,222,222,222,222,222,222,222,222,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 17 */
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,115,216,216,216,216,216,216,216,216,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,214,214,214,214,214,214,214,214,214,214,214,214,
-214,214,209,214,214,214,214,214,214,214,214,214,214,214,214,214,
-214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,116,217,217,217,217,217,217,217,217,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,215,215,215,215,215,215,215,215,215,215,215,215,215,
+215,215,210,215,215,215,215,215,215,215,215,215,215,215,215,215,
+215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,
/* block 18 */
-238,238,238,239,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,238,239,238,240,239,239,
-239,238,238,238,238,238,238,238,238,239,239,239,239,238,239,239,
-240,110,110,238,238,238,238,238,240,240,240,240,240,240,240,240,
-240,240,238,238, 4, 4,241,241,241,241,241,241,241,241,241,241,
-242,243,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
+240,240,240,241,242,242,242,242,242,242,242,242,242,242,242,242,
+242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
+242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
+242,242,242,242,242,242,242,242,242,242,240,241,240,242,241,241,
+241,240,240,240,240,240,240,240,240,241,241,241,241,240,241,241,
+242,111,111,240,240,240,240,240,242,242,242,242,242,242,242,242,
+242,242,240,240, 4, 4,243,243,243,243,243,243,243,243,243,243,
+244,245,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
/* block 19 */
-244,245,246,246,115,244,244,244,244,244,244,244,244,115,115,244,
-244,115,115,244,244,244,244,244,244,244,244,244,244,244,244,244,
-244,244,244,244,244,244,244,244,244,115,244,244,244,244,244,244,
-244,115,244,115,115,115,244,244,244,244,115,115,245,244,247,246,
-246,245,245,245,245,115,115,246,246,115,115,246,246,245,244,115,
-115,115,115,115,115,115,115,247,115,115,115,115,244,244,115,244,
-244,244,245,245,115,115,248,248,248,248,248,248,248,248,248,248,
-244,244,249,249,250,250,250,250,250,250,251,249,244,252,115,115,
+246,247,248,248,116,246,246,246,246,246,246,246,246,116,116,246,
+246,116,116,246,246,246,246,246,246,246,246,246,246,246,246,246,
+246,246,246,246,246,246,246,246,246,116,246,246,246,246,246,246,
+246,116,246,116,116,116,246,246,246,246,116,116,247,246,249,248,
+248,247,247,247,247,116,116,248,248,116,116,248,248,247,246,116,
+116,116,116,116,116,116,116,249,116,116,116,116,246,246,116,246,
+246,246,247,247,116,116,250,250,250,250,250,250,250,250,250,250,
+246,246,251,251,252,252,252,252,252,252,253,251,246,254,247,116,
/* block 20 */
-115,253,253,254,115,255,255,255,255,255,255,115,115,115,115,255,
-255,115,115,255,255,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,115,255,255,255,255,255,255,
-255,115,255,255,115,255,255,115,255,255,115,115,253,115,254,254,
-254,253,253,115,115,115,115,253,253,115,115,253,253,253,115,115,
-115,253,115,115,115,115,115,115,115,255,255,255,255,115,255,115,
-115,115,115,115,115,115,256,256,256,256,256,256,256,256,256,256,
-253,253,255,255,255,253,115,115,115,115,115,115,115,115,115,115,
+116,255,255,256,116,257,257,257,257,257,257,116,116,116,116,257,
+257,116,116,257,257,257,257,257,257,257,257,257,257,257,257,257,
+257,257,257,257,257,257,257,257,257,116,257,257,257,257,257,257,
+257,116,257,257,116,257,257,116,257,257,116,116,255,116,256,256,
+256,255,255,116,116,116,116,255,255,116,116,255,255,255,116,116,
+116,255,116,116,116,116,116,116,116,257,257,257,257,116,257,116,
+116,116,116,116,116,116,258,258,258,258,258,258,258,258,258,258,
+255,255,257,257,257,255,259,116,116,116,116,116,116,116,116,116,
/* block 21 */
-115,257,257,258,115,259,259,259,259,259,259,259,259,259,115,259,
-259,259,115,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,115,259,259,259,259,259,259,
-259,115,259,259,115,259,259,259,259,259,115,115,257,259,258,258,
-258,257,257,257,257,257,115,257,257,258,115,258,258,257,115,115,
-259,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-259,259,257,257,115,115,260,260,260,260,260,260,260,260,260,260,
-261,262,115,115,115,115,115,115,115,259,257,257,257,257,257,257,
+116,260,260,261,116,262,262,262,262,262,262,262,262,262,116,262,
+262,262,116,262,262,262,262,262,262,262,262,262,262,262,262,262,
+262,262,262,262,262,262,262,262,262,116,262,262,262,262,262,262,
+262,116,262,262,116,262,262,262,262,262,116,116,260,262,261,261,
+261,260,260,260,260,260,116,260,260,261,116,261,261,260,116,116,
+262,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+262,262,260,260,116,116,263,263,263,263,263,263,263,263,263,263,
+264,265,116,116,116,116,116,116,116,262,260,260,260,260,260,260,
/* block 22 */
-115,263,264,264,115,265,265,265,265,265,265,265,265,115,115,265,
-265,115,115,265,265,265,265,265,265,265,265,265,265,265,265,265,
-265,265,265,265,265,265,265,265,265,115,265,265,265,265,265,265,
-265,115,265,265,115,265,265,265,265,265,115,115,263,265,266,263,
-264,263,263,263,263,115,115,264,264,115,115,264,264,263,115,115,
-115,115,115,115,115,115,263,266,115,115,115,115,265,265,115,265,
-265,265,263,263,115,115,267,267,267,267,267,267,267,267,267,267,
-268,265,269,269,269,269,269,269,115,115,115,115,115,115,115,115,
+116,266,267,267,116,268,268,268,268,268,268,268,268,116,116,268,
+268,116,116,268,268,268,268,268,268,268,268,268,268,268,268,268,
+268,268,268,268,268,268,268,268,268,116,268,268,268,268,268,268,
+268,116,268,268,116,268,268,268,268,268,116,116,266,268,269,266,
+267,266,266,266,266,116,116,267,267,116,116,267,267,266,116,116,
+116,116,116,116,116,116,266,269,116,116,116,116,268,268,116,268,
+268,268,266,266,116,116,270,270,270,270,270,270,270,270,270,270,
+271,268,272,272,272,272,272,272,116,116,116,116,116,116,116,116,
/* block 23 */
-115,115,270,271,115,271,271,271,271,271,271,115,115,115,271,271,
-271,115,271,271,271,271,115,115,115,271,271,115,271,115,271,271,
-115,115,115,271,271,115,115,115,271,271,271,115,115,115,271,271,
-271,271,271,271,271,271,271,271,271,271,115,115,115,115,272,273,
-270,273,273,115,115,115,273,273,273,115,273,273,273,270,115,115,
-271,115,115,115,115,115,115,272,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,274,274,274,274,274,274,274,274,274,274,
-275,275,275,276,276,276,276,276,276,277,276,115,115,115,115,115,
+116,116,273,274,116,274,274,274,274,274,274,116,116,116,274,274,
+274,116,274,274,274,274,116,116,116,274,274,116,274,116,274,274,
+116,116,116,274,274,116,116,116,274,274,274,116,116,116,274,274,
+274,274,274,274,274,274,274,274,274,274,116,116,116,116,275,276,
+273,276,276,116,116,116,276,276,276,116,276,276,276,273,116,116,
+274,116,116,116,116,116,116,275,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,277,277,277,277,277,277,277,277,277,277,
+278,278,278,279,279,279,279,279,279,280,279,116,116,116,116,116,
/* block 24 */
-278,279,279,279,115,280,280,280,280,280,280,280,280,115,280,280,
-280,115,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
-280,280,280,280,280,280,280,280,280,115,280,280,280,280,280,280,
-280,280,280,280,280,280,280,280,280,280,115,115,115,280,278,278,
-278,279,279,279,279,115,278,278,278,115,278,278,278,278,115,115,
-115,115,115,115,115,278,278,115,280,280,280,115,115,115,115,115,
-280,280,278,278,115,115,281,281,281,281,281,281,281,281,281,281,
-115,115,115,115,115,115,115,115,282,282,282,282,282,282,282,283,
+281,282,282,282,281,283,283,283,283,283,283,283,283,116,283,283,
+283,116,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
+283,283,283,283,283,283,283,283,283,116,283,283,283,283,283,283,
+283,283,283,283,283,283,283,283,283,283,116,116,116,283,281,281,
+281,282,282,282,282,116,281,281,281,116,281,281,281,281,116,116,
+116,116,116,116,116,281,281,116,283,283,283,116,116,116,116,116,
+283,283,281,281,116,116,284,284,284,284,284,284,284,284,284,284,
+116,116,116,116,116,116,116,116,285,285,285,285,285,285,285,286,
/* block 25 */
-284,285,286,286,115,284,284,284,284,284,284,284,284,115,284,284,
-284,115,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
-284,284,284,284,284,284,284,284,284,115,284,284,284,284,284,284,
-284,284,284,284,115,284,284,284,284,284,115,115,285,284,286,285,
-286,286,287,286,286,115,285,286,286,115,286,286,285,285,115,115,
-115,115,115,115,115,287,287,115,115,115,115,115,115,115,284,115,
-284,284,285,285,115,115,288,288,288,288,288,288,288,288,288,288,
-115,284,284,115,115,115,115,115,115,115,115,115,115,115,115,115,
+287,288,289,289,290,287,287,287,287,287,287,287,287,116,287,287,
+287,116,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
+287,287,287,287,287,287,287,287,287,116,287,287,287,287,287,287,
+287,287,287,287,116,287,287,287,287,287,116,116,288,287,289,288,
+289,289,291,289,289,116,288,289,289,116,289,289,288,288,116,116,
+116,116,116,116,116,291,291,116,116,116,116,116,116,116,287,116,
+287,287,288,288,116,116,292,292,292,292,292,292,292,292,292,292,
+116,287,287,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 26 */
-289,289,290,290,115,291,291,291,291,291,291,291,291,115,291,291,
-291,115,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,289,289,291,292,290,
-290,289,289,289,289,115,290,290,290,115,290,290,290,289,293,294,
-115,115,115,115,291,291,291,292,295,295,295,295,295,295,295,291,
-291,291,289,289,115,115,296,296,296,296,296,296,296,296,296,296,
-295,295,295,295,295,295,295,295,295,294,291,291,291,291,291,291,
+293,293,294,294,116,295,295,295,295,295,295,295,295,116,295,295,
+295,116,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
+295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
+295,295,295,295,295,295,295,295,295,295,295,293,293,295,296,294,
+294,293,293,293,293,116,294,294,294,116,294,294,294,293,297,298,
+116,116,116,116,295,295,295,296,299,299,299,299,299,299,299,295,
+295,295,293,293,116,116,300,300,300,300,300,300,300,300,300,300,
+299,299,299,299,299,299,299,299,299,298,295,295,295,295,295,295,
/* block 27 */
-115,115,297,297,115,298,298,298,298,298,298,298,298,298,298,298,
-298,298,298,298,298,298,298,115,115,115,298,298,298,298,298,298,
-298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,
-298,298,115,298,298,298,298,298,298,298,298,298,115,298,115,115,
-298,298,298,298,298,298,298,115,115,115,299,115,115,115,115,300,
-297,297,299,299,299,115,299,115,297,297,297,297,297,297,297,300,
-115,115,115,115,115,115,301,301,301,301,301,301,301,301,301,301,
-115,115,297,297,302,115,115,115,115,115,115,115,115,115,115,115,
+116,116,301,301,116,302,302,302,302,302,302,302,302,302,302,302,
+302,302,302,302,302,302,302,116,116,116,302,302,302,302,302,302,
+302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
+302,302,116,302,302,302,302,302,302,302,302,302,116,302,116,116,
+302,302,302,302,302,302,302,116,116,116,303,116,116,116,116,304,
+301,301,303,303,303,116,303,116,301,301,301,301,301,301,301,304,
+116,116,116,116,116,116,305,305,305,305,305,305,305,305,305,305,
+116,116,301,301,306,116,116,116,116,116,116,116,116,116,116,116,
/* block 28 */
-115,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
-303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
-303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
-303,304,303,305,304,304,304,304,304,304,304,115,115,115,115, 5,
-303,303,303,303,303,303,306,304,304,304,304,304,304,304,304,307,
-308,308,308,308,308,308,308,308,308,308,307,307,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+116,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,308,307,309,308,308,308,308,308,308,308,116,116,116,116, 5,
+307,307,307,307,307,307,310,308,308,308,308,308,308,308,308,311,
+312,312,312,312,312,312,312,312,312,312,311,311,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 29 */
-115,309,309,115,309,115,115,309,309,115,309,115,115,309,115,115,
-115,115,115,115,309,309,309,309,115,309,309,309,309,309,309,309,
-115,309,309,309,115,309,115,309,115,115,309,309,115,309,309,309,
-309,310,309,311,310,310,310,310,310,310,115,310,310,309,115,115,
-309,309,309,309,309,115,312,115,310,310,310,310,310,310,115,115,
-313,313,313,313,313,313,313,313,313,313,115,115,309,309,309,309,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+116,313,313,116,313,116,116,313,313,116,313,116,116,313,116,116,
+116,116,116,116,313,313,313,313,116,313,313,313,313,313,313,313,
+116,313,313,313,116,313,116,313,116,116,313,313,116,313,313,313,
+313,314,313,315,314,314,314,314,314,314,116,314,314,313,116,116,
+313,313,313,313,313,116,316,116,314,314,314,314,314,314,116,116,
+317,317,317,317,317,317,317,317,317,317,116,116,313,313,313,313,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 30 */
-314,315,315,315,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,315,316,315,315,315,317,317,315,315,315,315,315,315,
-318,318,318,318,318,318,318,318,318,318,319,319,319,319,319,319,
-319,319,319,319,315,317,315,317,315,317,320,321,320,321,322,322,
-314,314,314,314,314,314,314,314,115,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,115,115,115,
-115,317,317,317,317,317,317,317,317,317,317,317,317,317,317,322,
+318,319,319,319,320,320,320,320,320,320,320,320,320,320,320,320,
+320,320,320,319,320,319,319,319,321,321,319,319,319,319,319,319,
+322,322,322,322,322,322,322,322,322,322,323,323,323,323,323,323,
+323,323,323,323,319,321,319,321,319,321,324,325,324,325,326,326,
+318,318,318,318,318,318,318,318,116,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,116,116,116,
+116,321,321,321,321,321,321,321,321,321,321,321,321,321,321,326,
/* block 31 */
-317,317,317,317,317,316,317,317,314,314,314,314,314,317,317,317,
-317,317,317,317,317,317,317,317,115,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,115,315,315,
-315,315,315,315,315,315,317,315,315,315,315,315,315,115,315,315,
-316,316,316,316,316, 19, 19, 19, 19,316,316,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+321,321,321,321,321,320,321,321,318,318,318,318,318,321,321,321,
+321,321,321,321,321,321,321,321,116,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,116,319,319,
+319,319,319,319,319,319,321,319,319,319,319,319,319,116,319,319,
+320,320,320,320,320, 19, 19, 19, 19,320,320,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 32 */
-323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
-323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
-323,323,323,323,323,323,323,323,323,323,323,324,324,325,325,325,
-325,326,325,325,325,325,325,325,324,325,325,326,326,325,325,323,
-327,327,327,327,327,327,327,327,327,327,328,328,328,328,328,328,
-323,323,323,323,323,323,326,326,325,325,323,323,323,323,325,325,
-325,323,324,324,324,323,323,324,324,324,324,324,324,324,323,323,
-323,325,325,325,325,323,323,323,323,323,323,323,323,323,323,323,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,328,328,329,329,329,
+329,330,329,329,329,329,329,329,328,329,329,330,330,329,329,327,
+331,331,331,331,331,331,331,331,331,331,332,332,332,332,332,332,
+327,327,327,327,327,327,330,330,329,329,327,327,327,327,329,329,
+329,327,328,328,328,327,327,328,328,328,328,328,328,328,327,327,
+327,329,329,329,329,327,327,327,327,327,327,327,327,327,327,327,
/* block 33 */
-323,323,325,324,326,325,325,324,324,324,324,324,324,325,323,324,
-327,327,327,327,327,327,327,327,327,327,324,324,324,325,329,329,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,115,330,115,115,115,115,115,330,115,115,
-331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
-331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
-331,331,331,331,331,331,331,331,331,331,331, 4,332,331,331,331,
-
-/* block 34 */
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
+327,327,329,328,330,329,329,328,328,328,328,328,328,329,327,328,
+331,331,331,331,331,331,331,331,331,331,328,328,328,329,333,333,
334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
-
-/* block 35 */
334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
-334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
-334,334,334,334,334,334,334,334,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
+334,334,334,334,334,334,116,334,116,116,116,116,116,334,116,116,
335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
+335,335,335,335,335,335,335,335,335,335,335, 4,336,335,335,335,
+
+/* block 34 */
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,
+338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,
+
+/* block 35 */
+338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,
+338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,
+338,338,338,338,338,338,338,338,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
/* block 36 */
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,115,336,336,336,336,115,115,
-336,336,336,336,336,336,336,115,336,115,336,336,336,336,115,115,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,116,340,340,340,340,116,116,
+340,340,340,340,340,340,340,116,340,116,340,340,340,340,116,116,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
/* block 37 */
-336,336,336,336,336,336,336,336,336,115,336,336,336,336,115,115,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,115,336,336,336,336,115,115,336,336,336,336,336,336,336,115,
-336,115,336,336,336,336,115,115,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,115,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
+340,340,340,340,340,340,340,340,340,116,340,340,340,340,116,116,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,116,340,340,340,340,116,116,340,340,340,340,340,340,340,116,
+340,116,340,340,340,340,116,116,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,116,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
/* block 38 */
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,115,336,336,336,336,115,115,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,336,336,336,336,115,115,337,337,337,
-338,338,338,338,338,338,338,338,338,339,339,339,339,339,339,339,
-339,339,339,339,339,339,339,339,339,339,339,339,339,115,115,115,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,116,340,340,340,340,116,116,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,340,340,340,340,116,116,341,341,341,
+342,342,342,342,342,342,342,342,342,343,343,343,343,343,343,343,
+343,343,343,343,343,343,343,343,343,343,343,343,343,116,116,116,
/* block 39 */
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-340,340,340,340,340,340,340,340,340,340,115,115,115,115,115,115,
-341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,
-341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,
-341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,
-341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,
-341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,
-342,342,342,342,342,342,115,115,343,343,343,343,343,343,115,115,
-
-/* block 40 */
-344,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+344,344,344,344,344,344,344,344,344,344,116,116,116,116,116,116,
345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
+346,346,346,346,346,346,116,116,347,347,347,347,347,347,116,116,
+
+/* block 40 */
+348,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
/* block 41 */
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
/* block 42 */
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,346,346,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,350,350,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
/* block 43 */
-347,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,
-348,348,348,348,348,348,348,348,348,348,348,349,350,115,115,115,
-351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,
-351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,
-351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,
-351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,
-351,351,351,351,351,351,351,351,351,351,351, 4, 4, 4,352,352,
-352,351,351,351,351,351,351,351,351,115,115,115,115,115,115,115,
+351,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,
+352,352,352,352,352,352,352,352,352,352,352,353,354,116,116,116,
+355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,
+355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,
+355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,
+355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,
+355,355,355,355,355,355,355,355,355,355,355, 4, 4, 4,356,356,
+356,355,355,355,355,355,355,355,355,116,116,116,116,116,116,116,
/* block 44 */
-353,353,353,353,353,353,353,353,353,353,353,353,353,115,353,353,
-353,353,354,354,354,115,115,115,115,115,115,115,115,115,115,115,
-355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,
-355,355,356,356,356, 4, 4,115,115,115,115,115,115,115,115,115,
-357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,
-357,357,358,358,115,115,115,115,115,115,115,115,115,115,115,115,
-359,359,359,359,359,359,359,359,359,359,359,359,359,115,359,359,
-359,115,360,360,115,115,115,115,115,115,115,115,115,115,115,115,
+357,357,357,357,357,357,357,357,357,357,357,357,357,116,357,357,
+357,357,358,358,358,116,116,116,116,116,116,116,116,116,116,116,
+359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
+359,359,360,360,360, 4, 4,116,116,116,116,116,116,116,116,116,
+361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,
+361,361,362,362,116,116,116,116,116,116,116,116,116,116,116,116,
+363,363,363,363,363,363,363,363,363,363,363,363,363,116,363,363,
+363,116,364,364,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 45 */
-361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,
-361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,
-361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,
-361,361,361,361,362,362,363,362,362,362,362,362,362,362,363,363,
-363,363,363,363,363,363,362,363,363,362,362,362,362,362,362,362,
-362,362,362,362,364,364,364,365,364,364,364,366,361,362,115,115,
-367,367,367,367,367,367,367,367,367,367,115,115,115,115,115,115,
-368,368,368,368,368,368,368,368,368,368,115,115,115,115,115,115,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,366,366,367,366,366,366,366,366,366,366,367,367,
+367,367,367,367,367,367,366,367,367,366,366,366,366,366,366,366,
+366,366,366,366,368,368,368,369,368,368,368,370,365,366,116,116,
+371,371,371,371,371,371,371,371,371,371,116,116,116,116,116,116,
+372,372,372,372,372,372,372,372,372,372,116,116,116,116,116,116,
/* block 46 */
-369,369, 4, 4,369, 4,370,369,369,369,369,371,371,371,372,115,
-373,373,373,373,373,373,373,373,373,373,115,115,115,115,115,115,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,375,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,115,115,115,115,115,115,115,115,
+373,373, 4, 4,373, 4,374,373,373,373,373,375,375,375,376,116,
+377,377,377,377,377,377,377,377,377,377,116,116,116,116,116,116,
+378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
+378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
+378,378,378,379,378,378,378,378,378,378,378,378,378,378,378,378,
+378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
+378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
+378,378,378,378,378,378,378,378,378,116,116,116,116,116,116,116,
/* block 47 */
-374,374,374,374,374,371,371,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,371,374,115,115,115,115,115,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
-345,345,345,345,345,345,115,115,115,115,115,115,115,115,115,115,
+378,378,378,378,378,375,375,378,378,378,378,378,378,378,378,378,
+378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
+378,378,378,378,378,378,378,378,378,375,378,116,116,116,116,116,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
+349,349,349,349,349,349,116,116,116,116,116,116,116,116,116,116,
/* block 48 */
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,115,
-377,377,377,378,378,378,378,377,377,378,378,378,115,115,115,115,
-378,378,377,378,378,378,378,378,378,377,377,377,115,115,115,115,
-379,115,115,115,380,380,381,381,381,381,381,381,381,381,381,381,
-382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,
-382,382,382,382,382,382,382,382,382,382,382,382,382,382,115,115,
-382,382,382,382,382,115,115,115,115,115,115,115,115,115,115,115,
+380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,
+380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,116,
+381,381,381,382,382,382,382,381,381,382,382,382,116,116,116,116,
+382,382,381,382,382,382,382,382,382,381,381,381,116,116,116,116,
+383,116,116,116,384,384,385,385,385,385,385,385,385,385,385,385,
+386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,
+386,386,386,386,386,386,386,386,386,386,386,386,386,386,116,116,
+386,386,386,386,386,116,116,116,116,116,116,116,116,116,116,116,
/* block 49 */
-383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,
-383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,
-383,383,383,383,383,383,383,383,383,383,383,383,115,115,115,115,
-383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,
-383,383,383,383,383,383,383,383,383,383,115,115,115,115,115,115,
-384,384,384,384,384,384,384,384,384,384,385,115,115,115,386,386,
387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,
387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,
+387,387,387,387,387,387,387,387,387,387,387,387,116,116,116,116,
+387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,
+387,387,387,387,387,387,387,387,387,387,116,116,116,116,116,116,
+388,388,388,388,388,388,388,388,388,388,389,116,116,116,390,390,
+391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
+391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
/* block 50 */
-388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,
-388,388,388,388,388,388,388,389,389,390,390,389,115,115,391,391,
392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
-392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
-392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
-392,392,392,392,392,393,394,393,394,394,394,394,394,394,394,115,
-394,395,394,395,395,394,394,394,394,394,394,394,394,393,393,393,
-393,393,393,394,394,394,394,394,394,394,394,394,394,115,115,394,
+392,392,392,392,392,392,392,393,393,394,394,393,116,116,395,395,
+396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+396,396,396,396,396,397,398,397,398,398,398,398,398,398,398,116,
+398,399,398,399,399,398,398,398,398,398,398,398,398,397,397,397,
+397,397,397,398,398,398,398,398,398,398,398,398,398,116,116,398,
/* block 51 */
-396,396,396,396,396,396,396,396,396,396,115,115,115,115,115,115,
-396,396,396,396,396,396,396,396,396,396,115,115,115,115,115,115,
-397,397,397,397,397,397,397,398,397,397,397,397,397,397,115,115,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,399,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+400,400,400,400,400,400,400,400,400,400,116,116,116,116,116,116,
+400,400,400,400,400,400,400,400,400,400,116,116,116,116,116,116,
+401,401,401,401,401,401,401,402,401,401,401,401,401,401,116,116,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,403,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 52 */
-400,400,400,400,401,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
-402,402,402,402,400,401,400,400,400,400,400,401,400,401,401,401,
-401,401,400,401,401,402,402,402,402,402,402,402,115,115,115,115,
-403,403,403,403,403,403,403,403,403,403,404,404,404,404,404,404,
-404,405,405,405,405,405,405,405,405,405,405,400,400,400,400,400,
-400,400,400,400,405,405,405,405,405,405,405,405,405,115,115,115,
+404,404,404,404,405,406,406,406,406,406,406,406,406,406,406,406,
+406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,
+406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,
+406,406,406,406,404,405,404,404,404,404,404,405,404,405,405,405,
+405,405,404,405,405,406,406,406,406,406,406,406,116,116,116,116,
+407,407,407,407,407,407,407,407,407,407,408,408,408,408,408,408,
+408,409,409,409,409,409,409,409,409,409,409,404,404,404,404,404,
+404,404,404,404,409,409,409,409,409,409,409,409,409,116,116,116,
/* block 53 */
-406,406,407,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-408,407,406,406,406,406,407,407,406,406,407,406,406,406,408,408,
-409,409,409,409,409,409,409,409,409,409,408,408,408,408,408,408,
-410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,
-410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,
-410,410,410,410,410,410,411,412,411,411,412,412,412,411,412,411,
-411,411,412,412,115,115,115,115,115,115,115,115,413,413,413,413,
-
-/* block 54 */
+410,410,411,412,412,412,412,412,412,412,412,412,412,412,412,412,
+412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
+412,411,410,410,410,410,411,411,410,410,411,410,410,410,412,412,
+413,413,413,413,413,413,413,413,413,413,412,412,412,412,412,412,
414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,415,415,415,415,415,415,415,415,416,416,416,416,
-416,416,416,416,415,415,416,416,115,115,115,417,417,417,417,417,
-418,418,418,418,418,418,418,418,418,418,115,115,115,414,414,414,
-419,419,419,419,419,419,419,419,419,419,420,420,420,420,420,420,
-420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,
-420,420,420,420,420,420,420,420,421,421,421,421,421,421,422,422,
+414,414,414,414,414,414,415,416,415,415,416,416,416,415,416,415,
+415,415,416,416,116,116,116,116,116,116,116,116,417,417,417,417,
+
+/* block 54 */
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
+418,418,418,418,419,419,419,419,419,419,419,419,420,420,420,420,
+420,420,420,420,419,419,420,420,116,116,116,421,421,421,421,421,
+422,422,422,422,422,422,422,422,422,422,116,116,116,418,418,418,
+423,423,423,423,423,423,423,423,423,423,424,424,424,424,424,424,
+424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,
+424,424,424,424,424,424,424,424,425,425,425,425,425,425,426,426,
/* block 55 */
-423,424,425,426,427,428,429,430,431,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-432,432,432,432,432,432,432,432,115,115,115,115,115,115,115,115,
-110,110,110, 4,110,110,110,110,110,110,110,110,110,110,110,110,
-110,433,110,110,110,110,110,110,110,434,434,434,434,110,434,434,
-434,434,433,433,110,434,434,433,110,110,115,115,115,115,115,115,
+427,428,429,430,431,432,433,434,435,116,116,116,116,116,116,116,
+436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
+436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
+436,436,436,436,436,436,436,436,436,436,436,116,116,436,436,436,
+437,437,437,437,437,437,437,437,116,116,116,116,116,116,116,116,
+111,111,111, 4,111,111,111,111,111,111,111,111,111,111,111,111,
+111,438,111,111,111,111,111,111,111,439,439,439,439,111,439,439,
+439,439,438,438,111,439,439,438,111,111,116,116,116,116,116,116,
/* block 56 */
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33,123,123,123,123,123,435,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,116,116,116,
-116,116,107,107,107,107,116,116,116,116,116, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33,436,437, 33, 33, 33,438, 33, 33,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34,124,124,124,124,124,440,108,108,108,108,
+108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,
+108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,
+108,108,108,108,108,108,108,108,108,108,108,108,108,117,117,117,
+117,117,108,108,108,108,117,117,117,117,117, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34,441,442, 34, 34, 34,443, 34, 34,
/* block 57 */
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,116,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,115,110,110,110,110,110,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,108,108,108,108,108,
+108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,
+108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,117,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,116,111,111,111,111,111,
/* block 58 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-439,440, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+444,445, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
/* block 59 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 33, 33, 33, 33, 33,441, 33, 33,442, 33,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 34, 34, 34, 34, 34,446, 34, 34,447, 34,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
/* block 60 */
-443,443,443,443,443,443,443,443,444,444,444,444,444,444,444,444,
-443,443,443,443,443,443,115,115,444,444,444,444,444,444,115,115,
-443,443,443,443,443,443,443,443,444,444,444,444,444,444,444,444,
-443,443,443,443,443,443,443,443,444,444,444,444,444,444,444,444,
-443,443,443,443,443,443,115,115,444,444,444,444,444,444,115,115,
-123,443,123,443,123,443,123,443,115,444,115,444,115,444,115,444,
-443,443,443,443,443,443,443,443,444,444,444,444,444,444,444,444,
-445,445,446,446,446,446,447,447,448,448,449,449,450,450,115,115,
+448,448,448,448,448,448,448,448,449,449,449,449,449,449,449,449,
+448,448,448,448,448,448,116,116,449,449,449,449,449,449,116,116,
+448,448,448,448,448,448,448,448,449,449,449,449,449,449,449,449,
+448,448,448,448,448,448,448,448,449,449,449,449,449,449,449,449,
+448,448,448,448,448,448,116,116,449,449,449,449,449,449,116,116,
+124,448,124,448,124,448,124,448,116,449,116,449,116,449,116,449,
+448,448,448,448,448,448,448,448,449,449,449,449,449,449,449,449,
+450,450,451,451,451,451,452,452,453,453,454,454,455,455,116,116,
/* block 61 */
-443,443,443,443,443,443,443,443,451,451,451,451,451,451,451,451,
-443,443,443,443,443,443,443,443,451,451,451,451,451,451,451,451,
-443,443,443,443,443,443,443,443,451,451,451,451,451,451,451,451,
-443,443,123,452,123,115,123,123,444,444,453,453,454,114,455,114,
-114,114,123,452,123,115,123,123,456,456,456,456,454,114,114,114,
-443,443,123,123,115,115,123,123,444,444,457,457,115,114,114,114,
-443,443,123,123,123,164,123,123,444,444,458,458,169,114,114,114,
-115,115,123,452,123,115,123,123,459,459,460,460,454,114,114,115,
+448,448,448,448,448,448,448,448,456,456,456,456,456,456,456,456,
+448,448,448,448,448,448,448,448,456,456,456,456,456,456,456,456,
+448,448,448,448,448,448,448,448,456,456,456,456,456,456,456,456,
+448,448,124,457,124,116,124,124,449,449,458,458,459,115,460,115,
+115,115,124,457,124,116,124,124,461,461,461,461,459,115,115,115,
+448,448,124,124,116,116,124,124,449,449,462,462,116,115,115,115,
+448,448,124,124,124,165,124,124,449,449,463,463,170,115,115,115,
+116,116,124,457,124,116,124,124,464,464,465,465,459,115,115,116,
/* block 62 */
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 22,461,462, 22, 22,
- 9, 9, 9, 9, 9, 9, 4, 4, 21, 25, 6, 21, 21, 25, 6, 21,
- 4, 4, 4, 4, 4, 4, 4, 4,463,464, 22, 22, 22, 22, 22, 3,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 21, 25, 4, 4, 4, 4, 15,
- 15, 4, 4, 4, 8, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 23,466,467, 23, 23,
+ 9, 9, 9, 9, 9, 9, 4, 4, 22, 26, 6, 22, 22, 26, 6, 22,
+ 4, 4, 4, 4, 4, 4, 4, 4,468,469, 23, 23, 23, 23, 23, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 22, 26, 4,470, 4, 4, 15,
+ 15, 4, 4, 4, 8, 6, 7, 4, 4,470, 4, 4, 4, 4, 4, 4,
4, 4, 8, 4, 15, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3,
- 22, 22, 22, 22, 22,465, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 23,107,115,115, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,107,
+ 23, 23, 23, 23, 23,471, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 24,108,116,116, 24, 24, 24, 24, 24, 24, 8, 8, 8, 6, 7,108,
/* block 63 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,115,
-107,107,107,107,107,107,107,107,107,107,107,107,107,115,115,115,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 6, 7,116,
+108,108,108,108,108,108,108,108,108,108,108,108,108,116,116,116,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-110,110,110,110,110,110,110,110,110,110,110,110,110,399,399,399,
-399,110,399,399,399,110,110,110,110,110,110,110,110,110,110,110,
-110,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+111,111,111,111,111,111,111,111,111,111,111,111,111,403,403,403,
+403,111,403,403,403,111,111,111,111,111,111,111,111,111,111,111,
+111,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 64 */
- 19, 19,466, 19, 19, 19, 19,466, 19, 19,467,466,466,466,467,467,
-466,466,466,467, 19,466, 19, 19, 8,466,466,466,466,466, 19, 19,
- 19, 19, 19, 19,466, 19,468, 19,466, 19,469,470,466,466, 19,467,
-466,466,471,466,467,434,434,434,434,467, 19, 19,467,467,466,466,
- 8, 8, 8, 8, 8,466,467,467,467,467, 19, 8, 19, 19,472, 19,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+ 19, 19,472, 19, 19, 19, 19,472, 19, 19,473,472,472,472,473,473,
+472,472,472,473, 19,472, 19, 19, 8,472,472,472,472,472, 19, 19,
+ 19, 19, 20, 19,472, 19,474, 19,472, 19,475,476,472,472, 19,473,
+472,472,477,472,473,439,439,439,439,478, 19, 19,473,473,472,472,
+ 8, 8, 8, 8, 8,472,473,473,473,473, 19, 8, 19, 19,479, 19,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
/* block 65 */
-475,475,475, 30, 31,475,475,475,475, 23, 19, 19,115,115,115,115,
- 8, 8, 8, 8, 8, 19, 19, 19, 19, 19, 8, 8, 19, 19, 19, 19,
- 8, 19, 19, 8, 19, 19, 8, 19, 19, 19, 19, 19, 19, 19, 8, 19,
+482,482,482, 31, 32,482,482,482,482, 24, 19, 19,116,116,116,116,
+ 8, 8, 8, 8,483, 20, 20, 20, 20, 20, 8, 8, 19, 19, 19, 19,
+ 8, 19, 19, 8, 19, 19, 8, 19, 19, 20, 20, 19, 19, 19, 8, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8,
19, 19, 8, 19, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
@@ -2148,8 +2181,8 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 65536 bytes, block = 128 */
/* block 67 */
19, 19, 19, 19, 19, 19, 19, 19, 6, 7, 6, 7, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 8, 8, 19, 19, 19, 19, 19, 19, 19, 6, 7, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 19, 19, 19, 19,
+ 8, 8, 19, 19, 19, 19, 19, 19, 20, 6, 7, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
@@ -2157,34 +2190,34 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 65536 bytes, block = 128 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 19, 19, 19,
/* block 68 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 20, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8,
- 8, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 8, 8, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 19, 19, 19, 19, 20, 20, 20, 19, 19, 19, 19, 19,
/* block 69 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 19, 19, 19, 19, 19, 19, 19,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
/* block 70 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
-477,477,477,477,477,477,477,477,477,477, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 19, 19, 19, 19, 19, 19,484,484,484,484,484,484,484,484,484,484,
+484,484,485,484,484,484,484,484,484,484,484,484,484,484,484,484,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
/* block 71 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
@@ -2199,64 +2232,74 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 65536 bytes, block = 128 */
/* block 72 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 20, 8, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 8, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 8, 8, 8, 8,
+ 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8,483,483,483,483, 8,
/* block 73 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,478, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-479, 19,479, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 20, 20, 20, 20, 20, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,483,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
/* block 74 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,479,479, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,478, 19, 19, 19, 19, 19, 19,
+ 20, 20, 20, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
/* block 75 */
- 19, 19, 19, 19, 19, 19, 19, 19,479, 19,478,478,478,478, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,479, 19, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7,
- 6, 7, 6, 7, 6, 7, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 20, 20, 20, 20, 20, 20, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 19, 20, 19, 20, 19, 19, 19, 19, 19, 19, 20, 19, 19,
+ 19, 20, 19, 19, 19, 19, 19, 19, 20, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 20, 19, 19, 20, 19, 19, 19, 19, 20, 19, 20, 19,
+ 19, 19, 19, 20, 20, 20, 19, 20, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 20, 20, 20, 20, 20, 6, 7, 6, 7, 6, 7, 6, 7,
+ 6, 7, 6, 7, 6, 7, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
/* block 76 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 19, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20,
8, 8, 8, 8, 8, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
/* block 77 */
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
+487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
/* block 78 */
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8,483,483, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 79 */
8, 8, 8, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
7, 6, 7, 6, 7, 6, 7, 6, 7, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
@@ -2266,1775 +2309,1875 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 65536 bytes, block = 128 */
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 8,
-/* block 79 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+/* block 80 */
+ 19, 19, 19, 19, 19, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 19, 19, 8, 8, 8, 8, 8, 8, 19, 19, 19,
+ 20, 19, 19, 19, 19, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,116,116, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-/* block 80 */
+/* block 81 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,116,116, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,115, 19, 19, 19, 19, 19, 19,
- 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115, 19, 19, 19, 19,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-
-/* block 81 */
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,115,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,115,
- 30, 31,483,484,485,486,487, 30, 31, 30, 31, 30, 31,488,489,490,
-491, 33, 30, 31, 33, 30, 31, 33, 33, 33, 33, 33,107,107,492,492,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,116, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,116,
/* block 82 */
-160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
-160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
-160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
-160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
-160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
-160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
-160,161,160,161,493,494,494,494,494,494,494,160,161,160,161,495,
-495,495,160,161,115,115,115,115,115,496,496,496,496,497,496,496,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,116,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,116,
+ 31, 32,490,491,492,493,494, 31, 32, 31, 32, 31, 32,495,496,497,
+498, 34, 31, 32, 34, 31, 32, 34, 34, 34, 34, 34,108,108,499,499,
/* block 83 */
-498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
-498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
-498,498,498,498,498,498,115,498,115,115,115,115,115,498,115,115,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499,499,499,115,115,115,115,115,115,115,500,
-501,115,115,115,115,115,115,115,115,115,115,115,115,115,115,502,
+161,162,161,162,161,162,161,162,161,162,161,162,161,162,161,162,
+161,162,161,162,161,162,161,162,161,162,161,162,161,162,161,162,
+161,162,161,162,161,162,161,162,161,162,161,162,161,162,161,162,
+161,162,161,162,161,162,161,162,161,162,161,162,161,162,161,162,
+161,162,161,162,161,162,161,162,161,162,161,162,161,162,161,162,
+161,162,161,162,161,162,161,162,161,162,161,162,161,162,161,162,
+161,162,161,162,500,501,501,501,501,501,501,161,162,161,162,502,
+502,502,161,162,116,116,116,116,116,503,503,503,503,504,503,503,
/* block 84 */
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,336,336,336,336,336,115,115,115,115,115,115,115,115,115,
-336,336,336,336,336,336,336,115,336,336,336,336,336,336,336,115,
-336,336,336,336,336,336,336,115,336,336,336,336,336,336,336,115,
-336,336,336,336,336,336,336,115,336,336,336,336,336,336,336,115,
-336,336,336,336,336,336,336,115,336,336,336,336,336,336,336,115,
-192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
-192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
+505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
+505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
+505,505,505,505,505,505,116,505,116,116,116,116,116,505,116,116,
+506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,
+506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,
+506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,
+506,506,506,506,506,506,506,506,116,116,116,116,116,116,116,507,
+508,116,116,116,116,116,116,116,116,116,116,116,116,116,116,509,
/* block 85 */
- 4, 4, 21, 25, 21, 25, 4, 4, 4, 21, 25, 4, 21, 25, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 9, 4, 21, 25, 4, 4,
- 21, 25, 6, 7, 6, 7, 6, 7, 6, 7, 4, 4, 4, 4, 4,108,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 9, 4, 4, 4, 4,
- 9, 4, 6, 4, 4, 4, 4, 4, 4, 4,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
+340,340,340,340,340,340,340,116,116,116,116,116,116,116,116,116,
+340,340,340,340,340,340,340,116,340,340,340,340,340,340,340,116,
+340,340,340,340,340,340,340,116,340,340,340,340,340,340,340,116,
+340,340,340,340,340,340,340,116,340,340,340,340,340,340,340,116,
+340,340,340,340,340,340,340,116,340,340,340,340,340,340,340,116,
+193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,
+193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,
/* block 86 */
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,115,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,115,115,115,115,115,115,115,115,115,115,115,115,
+ 4, 4, 22, 26, 22, 26, 4, 4, 4, 22, 26, 4, 22, 26, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 9, 4, 22, 26, 4, 4,
+ 22, 26, 6, 7, 6, 7, 6, 7, 6, 7, 4, 4, 4, 4, 4,109,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 9, 4, 4, 4, 4,
+ 9, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 87 */
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,116,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 88 */
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
-503,503,503,503,503,503,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
/* block 89 */
- 3, 4, 4, 4, 19,504,434,505, 6, 7, 6, 7, 6, 7, 6, 7,
- 6, 7, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7, 9, 6, 7, 7,
- 19,505,505,505,505,505,505,505,505,505,110,110,110,110,506,506,
- 9,108,108,108,108,108, 19, 19,505,505,505,504,434, 4, 19, 19,
-115,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,116,116,116,116,
/* block 90 */
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,115,115,110,110, 14, 14,508,508,507,
- 9,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509, 4,108,510,510,509,
+ 3, 4, 4, 4, 19,511,439,512, 6, 7, 6, 7, 6, 7, 6, 7,
+ 6, 7, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7, 9, 6, 7, 7,
+ 19,512,512,512,512,512,512,512,512,512,111,111,111,111,513,513,
+514,109,109,109,109,109, 19, 19,512,512,512,511,439,470, 19, 19,
+116,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
/* block 91 */
-115,115,115,115,115,511,511,511,511,511,511,511,511,511,511,511,
-511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,
-511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,115,
-115,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,116,116,111,111, 14, 14,516,516,515,
+ 9,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
+517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
+517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
+517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
+517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
+517,517,517,517,517,517,517,517,517,517,517, 4,109,518,518,517,
/* block 92 */
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,115,
- 19, 19, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,
-511,511,511,511,511,511,511,511,511,511,511,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
+116,116,116,116,116,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+116,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
/* block 93 */
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,115,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,116,
+ 19, 19, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,116,116,116,116,116,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23,
- 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, 19,
+ 19, 19, 19, 19,116,116,116,116,116,116,116,116,116,116,116,116,
+517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
/* block 94 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,
+521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,116,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 24, 24, 24, 24, 24, 24, 24, 24,
+ 19, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,
+521,521,521,521,521,521,521,521,521,521,521,521,521,521,521, 19,
/* block 95 */
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
-514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
-514,514,514,514,514,514,514,514, 19, 19, 19, 19, 19, 19, 19, 19,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 20, 19, 20, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,116,
/* block 96 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+522,522,522,522,522,522,522,522, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
/* block 97 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,115,115,115,115,115,115,115,115,115,115,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+
+/* block 98 */
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,116,116,116,116,116,116,116,116,116,116,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-/* block 98 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-
/* block 99 */
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,517,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 100 */
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,525,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
/* block 101 */
-516,516,516,516,516,516,516,516,516,516,516,516,516,115,115,115,
-518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,
-518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,
-518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,
-518,518,518,518,518,518,518,115,115,115,115,115,115,115,115,115,
-519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
-519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
-519,519,519,519,519,519,519,519,520,520,520,520,520,520,521,521,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
/* block 102 */
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
+524,524,524,524,524,524,524,524,524,524,524,524,524,116,116,116,
+526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
+526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
+526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
+526,526,526,526,526,526,526,116,116,116,116,116,116,116,116,116,
+527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,
+527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,
+527,527,527,527,527,527,527,527,528,528,528,528,528,528,529,529,
/* block 103 */
-522,522,522,522,522,522,522,522,522,522,522,522,523,524,524,524,
-522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
-525,525,525,525,525,525,525,525,525,525,522,522,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-187,188,187,188,187,188,187,188,187,188,526,527,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,528,192,
-193,193,193,529,192,192,192,192,192,192,192,192,192,192,529,436,
-
-/* block 104 */
-187,188,187,188,187,188,187,188,187,188,187,188,187,188,187,188,
-187,188,187,188,187,188,187,188,187,188,187,188,436,436,192,192,
530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,531,531,531,531,531,531,531,531,531,531,
-532,532,533,533,533,533,533,533,115,115,115,115,115,115,115,115,
+530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+
+/* block 104 */
+530,530,530,530,530,530,530,530,530,530,530,530,531,532,532,532,
+530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+533,533,533,533,533,533,533,533,533,533,530,530,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+188,189,188,189,188,189,188,189,188,189,534,535,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,536,193,
+194,194,194,537,193,193,193,193,193,193,193,193,193,193,537,441,
/* block 105 */
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14,108,108,108,108,108,108,108,108,108,
- 14, 14, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-107, 33, 33, 33, 33, 33, 33, 33, 33, 30, 31, 30, 31,534, 30, 31,
+188,189,188,189,188,189,188,189,188,189,188,189,188,189,188,189,
+188,189,188,189,188,189,188,189,188,189,188,189,441,441,193,193,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,539,539,539,539,539,539,539,539,539,539,
+540,540,541,541,541,541,541,541,116,116,116,116,116,116,116,116,
/* block 106 */
- 30, 31, 30, 31, 30, 31, 30, 31,108, 14, 14, 30, 31,535, 33, 20,
- 30, 31, 30, 31, 33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,536,537,538,539,536,115,
-540,541,542,543, 30, 31, 30, 31,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115, 20,107,107, 33, 20, 20, 20, 20, 20,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14,109,109,109,109,109,109,109,109,109,
+ 14, 14, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 34, 34, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+108, 34, 34, 34, 34, 34, 34, 34, 34, 31, 32, 31, 32,542, 31, 32,
/* block 107 */
-544,544,545,544,544,544,545,544,544,544,544,545,544,544,544,544,
-544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,
-544,544,544,546,546,545,545,546,547,547,547,547,115,115,115,115,
- 23, 23, 23, 23, 23, 23, 19, 19, 5, 19,115,115,115,115,115,115,
-548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
-548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
-548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
-548,548,548,548,549,549,549,549,115,115,115,115,115,115,115,115,
+ 31, 32, 31, 32, 31, 32, 31, 32,109, 14, 14, 31, 32,543, 34, 21,
+ 31, 32, 31, 32, 34, 34, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,
+ 31, 32, 31, 32, 31, 32, 31, 32, 31, 32,544,545,546,547,544, 34,
+548,549,550,551, 31, 32, 31, 32, 31, 32,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116, 21,108,108, 34, 21, 21, 21, 21, 21,
/* block 108 */
-550,550,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,552,552,115,115,115,115,115,115,115,115,553,553,
-554,554,554,554,554,554,554,554,554,554,115,115,115,115,115,115,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,240,240,240,240,240,240,242,242,242,240,242,240,115,115,
+552,552,553,552,552,552,553,552,552,552,552,553,552,552,552,552,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+552,552,552,554,554,553,553,554,555,555,555,555,116,116,116,116,
+ 24, 24, 24, 24, 24, 24, 19, 19, 5, 19,116,116,116,116,116,116,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,557,557,557,557,116,116,116,116,116,116,116,116,
/* block 109 */
-555,555,555,555,555,555,555,555,555,555,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,557,557,557,557,557,557,557,557, 4,558,
+558,558,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-559,559,559,559,559,559,559,560,560,560,560,560,560,560,560,560,
-560,560,561,561,115,115,115,115,115,115,115,115,115,115,115,562,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,115,115,115,
+559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
+559,559,559,559,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,560,560,116,116,116,116,116,116,116,116,561,561,
+562,562,562,562,562,562,562,562,562,562,116,116,116,116,116,116,
+240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
+240,240,242,242,242,242,242,242,244,244,244,242,244,242,242,240,
/* block 110 */
-563,563,563,564,565,565,565,565,565,565,565,565,565,565,565,565,
-565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,
-565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,
-565,565,565,563,564,564,563,563,563,563,564,564,563,564,564,564,
-564,566,566,566,566,566,566,566,566,566,566,566,566,566,115,108,
-567,567,567,567,567,567,567,567,567,567,115,115,115,115,566,566,
-323,323,323,323,323,325,568,323,323,323,323,323,323,323,323,323,
-327,327,327,327,327,327,327,327,327,327,323,323,323,323,323,115,
+563,563,563,563,563,563,563,563,563,563,564,564,564,564,564,564,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,565,565,565,565,565,565,565,565, 4,566,
+567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,
+567,567,567,567,567,567,567,568,568,568,568,568,568,568,568,568,
+568,568,569,569,116,116,116,116,116,116,116,116,116,116,116,570,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,337,337,337,337,337,337,337,337,337,337,337,116,116,116,
/* block 111 */
-569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,
-569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,
-569,569,569,569,569,569,569,569,569,570,570,570,570,570,570,571,
-571,570,570,571,571,570,570,115,115,115,115,115,115,115,115,115,
-569,569,569,570,569,569,569,569,569,569,569,569,570,571,115,115,
-572,572,572,572,572,572,572,572,572,572,115,115,573,573,573,573,
-323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
-568,323,323,323,323,323,323,329,329,329,323,324,325,324,323,323,
+571,571,571,572,573,573,573,573,573,573,573,573,573,573,573,573,
+573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
+573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
+573,573,573,571,572,572,571,571,571,571,572,572,571,572,572,572,
+572,574,574,574,574,574,574,574,574,574,574,574,574,574,116,109,
+575,575,575,575,575,575,575,575,575,575,116,116,116,116,574,574,
+327,327,327,327,327,329,576,327,327,327,327,327,327,327,327,327,
+331,331,331,331,331,331,331,331,331,331,327,327,327,327,327,116,
/* block 112 */
-574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,
-574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,
-574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,
-575,574,575,575,575,574,574,575,575,574,574,574,574,574,575,575,
-574,575,574,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,574,574,576,577,577,
-578,578,578,578,578,578,578,578,578,578,578,579,580,580,579,579,
-581,581,578,582,582,579,580,115,115,115,115,115,115,115,115,115,
+577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,
+577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,
+577,577,577,577,577,577,577,577,577,578,578,578,578,578,578,579,
+579,578,578,579,579,578,578,116,116,116,116,116,116,116,116,116,
+577,577,577,578,577,577,577,577,577,577,577,577,578,579,116,116,
+580,580,580,580,580,580,580,580,580,580,116,116,581,581,581,581,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+576,327,327,327,327,327,327,333,333,333,327,328,329,328,327,327,
/* block 113 */
-115,336,336,336,336,336,336,115,115,336,336,336,336,336,336,115,
-115,336,336,336,336,336,336,115,115,115,115,115,115,115,115,115,
-336,336,336,336,336,336,336,115,336,336,336,336,336,336,336,115,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33,583, 33, 33, 33, 33, 33, 33, 33, 14,107,107,107,107,
- 33, 33, 33, 33, 33,123,115,115,115,115,115,115,115,115,115,115,
-584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
+582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,
+582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,
+582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,
+583,582,583,583,583,582,582,583,583,582,582,582,582,582,583,583,
+582,583,582,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,582,582,584,585,585,
+586,586,586,586,586,586,586,586,586,586,586,587,588,588,587,587,
+589,589,586,590,590,587,588,116,116,116,116,116,116,116,116,116,
/* block 114 */
-584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
-584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
-584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
-584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
-578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
-578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
-578,578,578,579,579,580,579,579,580,579,579,581,579,580,115,115,
-585,585,585,585,585,585,585,585,585,585,115,115,115,115,115,115,
+116,340,340,340,340,340,340,116,116,340,340,340,340,340,340,116,
+116,340,340,340,340,340,340,116,116,116,116,116,116,116,116,116,
+340,340,340,340,340,340,340,116,340,340,340,340,340,340,340,116,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34,591, 34, 34, 34, 34, 34, 34, 34, 14,108,108,108,108,
+ 34, 34, 34, 34, 34,124,116,116,116,116,116,116,116,116,116,116,
+592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,
/* block 115 */
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,
+592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,
+592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,
+592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,587,587,588,587,587,588,587,587,589,587,588,116,116,
+593,593,593,593,593,593,593,593,593,593,116,116,116,116,116,116,
/* block 116 */
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
/* block 117 */
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
/* block 118 */
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
/* block 119 */
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
/* block 120 */
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
/* block 121 */
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-586,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,586,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,586,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
/* block 122 */
-587,587,587,587,587,587,587,587,586,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,115,115,115,115,115,115,115,115,115,115,115,115,
-334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
-334,334,334,334,334,334,334,115,115,115,115,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,115,115,115,115,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+594,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,594,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,594,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
/* block 123 */
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
-588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
+595,595,595,595,595,595,595,595,594,595,595,595,595,595,595,595,
+595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
+595,595,595,595,116,116,116,116,116,116,116,116,116,116,116,116,
+338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,
+338,338,338,338,338,338,338,116,116,116,116,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,339,339,339,339,339,339,339,339,339,339,116,116,116,116,
/* block 124 */
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
/* block 125 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,115,115,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
/* block 126 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,116,116,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
/* block 127 */
- 33, 33, 33, 33, 33, 33, 33,115,115,115,115,115,115,115,115,115,
-115,115,115,200,200,200,200,200,115,115,115,115,115,207,204,207,
-207,207,207,207,207,207,207,207,207,590,207,207,207,207,207,207,
-207,207,207,207,207,207,207,115,207,207,207,207,207,115,207,115,
-207,207,115,207,207,115,207,207,207,207,207,207,207,207,207,207,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 128 */
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,591,591,591,591,591,591,591,591,591,591,591,591,591,591,
-591,591,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
+ 34, 34, 34, 34, 34, 34, 34,116,116,116,116,116,116,116,116,116,
+116,116,116,200,200,200,200,200,116,116,116,116,116,208,205,208,
+208,208,208,208,208,208,208,208,208,598,208,208,208,208,208,208,
+208,208,208,208,208,208,208,116,208,208,208,208,208,116,208,116,
+208,208,116,208,208,116,208,208,208,208,208,208,208,208,208,208,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
/* block 129 */
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,599,599,599,599,599,599,599,599,599,599,599,599,599,599,
+599,599,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
/* block 130 */
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216, 7, 6,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
/* block 131 */
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-115,115,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-216,216,216,216,216,216,216,216,216,216,216,216,212,213,115,115,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217, 7, 6,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
/* block 132 */
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
- 4, 4, 4, 4, 4, 4, 4, 6, 7, 4,115,115,115,115,115,115,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,192,192,
- 4, 9, 9, 15, 15, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
- 7, 6, 7, 6, 7, 4, 4, 6, 7, 4, 4, 4, 4, 15, 15, 15,
- 4, 4, 4,115, 4, 4, 4, 4, 9, 6, 7, 6, 7, 6, 7, 4,
- 4, 4, 8, 9, 8, 8, 8,115, 4, 5, 4, 4,115,115,115,115,
-216,216,216,216,216,115,216,216,216,216,216,216,216,216,216,216,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+116,116,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+217,217,217,217,217,217,217,217,217,217,217,217,213,214,116,116,
/* block 133 */
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,115,115, 22,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+ 4, 4, 4, 4, 4, 4, 4, 6, 7, 4,116,116,116,116,116,116,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,193,193,
+ 4, 9, 9, 15, 15, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
+ 7, 6, 7, 6, 7, 4, 4, 6, 7, 4, 4, 4, 4, 15, 15, 15,
+ 4, 4, 4,116, 4, 4, 4, 4, 9, 6, 7, 6, 7, 6, 7, 4,
+ 4, 4, 8, 9, 8, 8, 8,116, 4, 5, 4, 4,116,116,116,116,
+217,217,217,217,217,116,217,217,217,217,217,217,217,217,217,217,
/* block 134 */
-115, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,116,116, 23,
+
+/* block 135 */
+116, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 4, 8, 8, 8, 4,
4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 6, 4, 7, 14, 15,
14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 6, 8, 7, 8, 6,
- 7, 4, 6, 7, 4, 4,509,509,509,509,509,509,509,509,509,509,
-108,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-
-/* block 135 */
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,592,592,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
-512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,115,
-115,115,512,512,512,512,512,512,115,115,512,512,512,512,512,512,
-115,115,512,512,512,512,512,512,115,115,512,512,512,115,115,115,
- 5, 5, 8, 14, 19, 5, 5,115, 19, 8, 8, 8, 8, 19, 19,115,
-465,465,465,465,465,465,465,465,465, 22, 22, 22, 19, 19,115,115,
+ 7, 4, 6, 7, 4, 4,517,517,517,517,517,517,517,517,517,517,
+109,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
/* block 136 */
-593,593,593,593,593,593,593,593,593,593,593,593,115,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,115,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,115,593,593,115,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,115,115,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
+517,517,517,517,517,517,517,517,517,517,517,517,517,517,600,600,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,116,
+116,116,520,520,520,520,520,520,116,116,520,520,520,520,520,520,
+116,116,520,520,520,520,520,520,116,116,520,520,520,116,116,116,
+ 5, 5, 8, 14, 19, 5, 5,116, 19, 8, 8, 8, 8, 19, 19,116,
+471,471,471,471,471,471,471,471,471, 23, 23, 23, 19, 19,116,116,
/* block 137 */
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
-593,593,593,593,593,593,593,593,593,593,593,115,115,115,115,115,
+601,601,601,601,601,601,601,601,601,601,601,601,116,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,116,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,116,601,601,116,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,116,116,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 138 */
- 4, 4, 4,115,115,115,115, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23,115,115,115, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,
-594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,
-594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,
-594,594,594,594,594,595,595,595,595,596,596,596,596,596,596,596,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,601,116,116,116,116,116,
/* block 139 */
-596,596,596,596,596,596,596,596,596,596,595,595,596,596,596,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
-596,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,110,115,115,
+ 4, 4, 4,116,116,116,116, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24,116,116,116, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,
+602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,
+602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,
+602,602,602,602,602,603,603,603,603,604,604,604,604,604,604,604,
/* block 140 */
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+604,604,604,604,604,604,604,604,604,604,603,603,604,604,604,116,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,116,116,116,116,
+604,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,111,116,116,
/* block 141 */
-597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
-597,597,597,597,597,597,597,597,597,597,597,597,597,115,115,115,
-598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,
-598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,
-598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,
-598,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-110, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,115,115,115,115,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 142 */
-599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,
-599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,
-600,600,600,600,115,115,115,115,115,115,115,115,115,599,599,599,
-601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
-601,602,601,601,601,601,601,601,601,601,602,115,115,115,115,115,
-603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
-603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
-603,603,603,603,603,603,604,604,604,604,604,115,115,115,115,115,
+605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+605,605,605,605,605,605,605,605,605,605,605,605,605,116,116,116,
+606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,
+606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,
+606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,
+606,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+111, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,116,116,116,116,
/* block 143 */
-605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
-605,605,605,605,605,605,605,605,605,605,605,605,605,605,115,606,
607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,
607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,
-607,607,607,607,115,115,115,115,607,607,607,607,607,607,607,607,
-608,609,609,609,609,609,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-
-/* block 144 */
-610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,
-610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,
-610,610,610,610,610,610,610,610,611,611,611,611,611,611,611,611,
+608,608,608,608,116,116,116,116,116,116,116,116,116,607,607,607,
+609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,
+609,610,609,609,609,609,609,609,609,609,610,116,116,116,116,116,
611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,
611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,
-612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
-612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
-612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
+611,611,611,611,611,611,612,612,612,612,612,116,116,116,116,116,
-/* block 145 */
+/* block 144 */
613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,
-613,613,613,613,613,613,613,613,613,613,613,613,613,613,115,115,
-614,614,614,614,614,614,614,614,614,614,115,115,115,115,115,115,
+613,613,613,613,613,613,613,613,613,613,613,613,613,613,116,614,
615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,115,115,115,115,616,616,616,616,616,616,616,616,
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,616,616,616,616,616,616,616,616,616,115,115,115,115,
+615,615,615,615,116,116,116,116,615,615,615,615,615,615,615,615,
+616,617,617,617,617,617,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-/* block 146 */
-617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
-617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
-617,617,617,617,617,617,617,617,115,115,115,115,115,115,115,115,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
+/* block 145 */
618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,115,115,115,115,115,115,115,115,115,115,115,619,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-
-/* block 147 */
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+618,618,618,618,618,618,618,618,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+/* block 146 */
+621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
+621,621,621,621,621,621,621,621,621,621,621,621,621,621,116,116,
+622,622,622,622,622,622,622,622,622,622,116,116,116,116,116,116,
+623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,
+623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,
+623,623,623,623,116,116,116,116,624,624,624,624,624,624,624,624,
+624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,
+624,624,624,624,624,624,624,624,624,624,624,624,116,116,116,116,
+
+/* block 147 */
+625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,
+625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,
+625,625,625,625,625,625,625,625,116,116,116,116,116,116,116,116,
+626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,
+626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,
+626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,
+626,626,626,626,116,116,116,116,116,116,116,116,116,116,116,627,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+
/* block 148 */
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,115,115,115,115,115,115,115,115,115,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,115,115,115,115,115,115,115,115,115,115,
-620,620,620,620,620,620,620,620,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
/* block 149 */
-621,621,621,621,621,621,115,115,621,115,621,621,621,621,621,621,
-621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
-621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
-621,621,621,621,621,621,115,621,621,115,115,115,621,115,115,621,
-622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,
-622,622,622,622,622,622,115,623,624,624,624,624,624,624,624,624,
-625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,
-625,625,625,625,625,625,625,626,626,627,627,627,627,627,627,627,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,628,116,116,116,116,116,116,116,116,116,
+628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
+628,628,628,628,628,628,116,116,116,116,116,116,116,116,116,116,
+628,628,628,628,628,628,628,628,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 150 */
-628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
-628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,115,
-115,115,115,115,115,115,115,629,629,629,629,629,629,629,629,629,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+629,629,629,629,629,629,116,116,629,116,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,116,629,629,116,116,116,629,116,116,629,
630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
-630,630,630,115,630,630,115,115,115,115,115,631,631,631,631,631,
+630,630,630,630,630,630,116,631,632,632,632,632,632,632,632,632,
+633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,
+633,633,633,633,633,633,633,634,634,635,635,635,635,635,635,635,
/* block 151 */
-632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,
-632,632,632,632,632,632,633,633,633,633,633,633,115,115,115,634,
-635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,
-635,635,635,635,635,635,635,635,635,635,115,115,115,115,115,636,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,
+636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,116,
+116,116,116,116,116,116,116,637,637,637,637,637,637,637,637,637,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,
+638,638,638,116,638,638,116,116,116,116,116,639,639,639,639,639,
/* block 152 */
-637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,
-637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,
-638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,
-638,638,638,638,638,638,638,638,115,115,115,115,639,639,638,638,
-639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,
-115,115,639,639,639,639,639,639,639,639,639,639,639,639,639,639,
-639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,
-639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,
+640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,
+640,640,640,640,640,640,641,641,641,641,641,641,116,116,116,642,
+643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,
+643,643,643,643,643,643,643,643,643,643,116,116,116,116,116,644,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 153 */
-640,641,641,641,115,641,641,115,115,115,115,115,641,641,641,641,
-640,640,640,640,115,640,640,640,115,640,640,640,640,640,640,640,
-640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,
-640,640,640,640,115,115,115,115,641,641,641,115,115,115,115,641,
-642,642,642,642,642,642,642,642,115,115,115,115,115,115,115,115,
-643,643,643,643,643,643,643,643,643,115,115,115,115,115,115,115,
-644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,
-644,644,644,644,644,644,644,644,644,644,644,644,644,645,645,646,
+645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,
+645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,
+646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,
+646,646,646,646,646,646,646,646,116,116,116,116,647,647,646,646,
+647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,
+116,116,647,647,647,647,647,647,647,647,647,647,647,647,647,647,
+647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,
+647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,
/* block 154 */
-647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,
-647,647,647,647,647,647,647,647,647,647,647,647,647,648,648,648,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-649,649,649,649,649,649,649,649,650,649,649,649,649,649,649,649,
-649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,
-649,649,649,649,649,651,651,115,115,115,115,652,652,652,652,652,
-653,653,653,653,653,653,653,115,115,115,115,115,115,115,115,115,
+648,649,649,649,116,649,649,116,116,116,116,116,649,649,649,649,
+648,648,648,648,116,648,648,648,116,648,648,648,648,648,648,648,
+648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,
+648,648,648,648,648,648,116,116,649,649,649,116,116,116,116,649,
+650,650,650,650,650,650,650,650,650,116,116,116,116,116,116,116,
+651,651,651,651,651,651,651,651,651,116,116,116,116,116,116,116,
+652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,
+652,652,652,652,652,652,652,652,652,652,652,652,652,653,653,654,
/* block 155 */
-654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,
-654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,
-654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,
-654,654,654,654,654,654,115,115,115,655,655,655,655,655,655,655,
-656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,
-656,656,656,656,656,656,115,115,657,657,657,657,657,657,657,657,
-658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,
-658,658,658,115,115,115,115,115,659,659,659,659,659,659,659,659,
+655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,
+655,655,655,655,655,655,655,655,655,655,655,655,655,656,656,656,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+657,657,657,657,657,657,657,657,658,657,657,657,657,657,657,657,
+657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,
+657,657,657,657,657,659,659,116,116,116,116,660,660,660,660,660,
+661,661,661,661,661,661,661,116,116,116,116,116,116,116,116,116,
/* block 156 */
-660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,
-660,660,115,115,115,115,115,115,115,661,661,661,661,115,115,115,
-115,115,115,115,115,115,115,115,115,662,662,662,662,662,662,662,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,
+662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,
+662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,
+662,662,662,662,662,662,116,116,116,663,663,663,663,663,663,663,
+664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,
+664,664,664,664,664,664,116,116,665,665,665,665,665,665,665,665,
+666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,
+666,666,666,116,116,116,116,116,667,667,667,667,667,667,667,667,
/* block 157 */
-663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,
-663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,
-663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,
-663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,
-663,663,663,663,663,663,663,663,663,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,
+668,668,116,116,116,116,116,116,116,669,669,669,669,116,116,116,
+116,116,116,116,116,116,116,116,116,670,670,670,670,670,670,670,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 158 */
-664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,
-664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,
-664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,
-664,664,664,115,115,115,115,115,115,115,115,115,115,115,115,115,
-665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,
-665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,
-665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,
-665,665,665,115,115,115,115,115,115,115,666,666,666,666,666,666,
+671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,
+671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,
+671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,
+671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,
+671,671,671,671,671,671,671,671,671,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 159 */
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,
-667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,115,
+672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,
+672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,
+672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,
+672,672,672,116,116,116,116,116,116,116,116,116,116,116,116,116,
+673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
+673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
+673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
+673,673,673,116,116,116,116,116,116,116,674,674,674,674,674,674,
/* block 160 */
-668,669,668,670,670,670,670,670,670,670,670,670,670,670,670,670,
-670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,
-670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,
-670,670,670,670,670,670,670,670,669,669,669,669,669,669,669,669,
-669,669,669,669,669,669,669,671,671,671,671,671,671,671,115,115,
-115,115,672,672,672,672,672,672,672,672,672,672,672,672,672,672,
-672,672,672,672,672,672,673,673,673,673,673,673,673,673,673,673,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,669,
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+675,675,675,675,676,676,676,676,116,116,116,116,116,116,116,116,
+677,677,677,677,677,677,677,677,677,677,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 161 */
-674,674,675,676,676,676,676,676,676,676,676,676,676,676,676,676,
-676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,
-676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,
-675,675,675,674,674,674,674,675,675,674,674,677,677,678,677,677,
-677,677,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,
-679,679,679,679,679,679,679,679,679,115,115,115,115,115,115,115,
-680,680,680,680,680,680,680,680,680,680,115,115,115,115,115,115,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,
+678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,116,
/* block 162 */
-681,681,681,682,682,682,682,682,682,682,682,682,682,682,682,682,
-682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,
-682,682,682,682,682,682,682,681,681,681,681,681,683,681,681,681,
-681,681,681,681,681,115,684,684,684,684,684,684,684,684,684,684,
-685,685,685,685,115,115,115,115,115,115,115,115,115,115,115,115,
-686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
-686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
-686,686,686,687,688,688,686,115,115,115,115,115,115,115,115,115,
+679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,
+679,679,679,679,679,679,679,679,679,679,679,679,679,680,680,680,
+680,680,680,680,680,680,680,679,116,116,116,116,116,116,116,116,
+681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,
+681,681,681,681,681,681,682,682,682,682,682,682,682,682,682,682,
+682,683,683,683,683,684,684,684,684,684,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 163 */
-689,689,690,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,690,690,690,689,689,689,689,689,689,689,689,689,690,
-690,691,692,692,691,693,693,693,693,693,689,689,689,693,115,115,
-694,694,694,694,694,694,694,694,694,694,691,693,691,693,693,693,
-115,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,
-695,695,695,695,695,115,115,115,115,115,115,115,115,115,115,115,
+685,686,685,687,687,687,687,687,687,687,687,687,687,687,687,687,
+687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,
+687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,
+687,687,687,687,687,687,687,687,686,686,686,686,686,686,686,686,
+686,686,686,686,686,686,686,688,688,688,688,688,688,688,116,116,
+116,116,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
+689,689,689,689,689,689,690,690,690,690,690,690,690,690,690,690,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,686,
/* block 164 */
+691,691,692,693,693,693,693,693,693,693,693,693,693,693,693,693,
+693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,
+693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,
+692,692,692,691,691,691,691,692,692,691,691,694,694,695,694,694,
+694,694,116,116,116,116,116,116,116,116,116,116,116,695,116,116,
696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,
-696,696,115,696,696,696,696,696,696,696,696,696,696,696,696,696,
-696,696,696,696,696,696,696,696,696,696,696,696,697,697,697,698,
-698,698,697,697,698,697,698,698,699,699,699,699,699,699,698,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+696,696,696,696,696,696,696,696,696,116,116,116,116,116,116,116,
+697,697,697,697,697,697,697,697,697,697,116,116,116,116,116,116,
/* block 165 */
-700,700,700,700,700,700,700,115,700,115,700,700,700,700,115,700,
-700,700,700,700,700,700,700,700,700,700,700,700,700,700,115,700,
-700,700,700,700,700,700,700,700,700,701,115,115,115,115,115,115,
-702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,
-702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,
-702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,703,
-704,704,704,703,703,703,703,703,703,703,703,115,115,115,115,115,
-705,705,705,705,705,705,705,705,705,705,115,115,115,115,115,115,
+698,698,698,699,699,699,699,699,699,699,699,699,699,699,699,699,
+699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,
+699,699,699,699,699,699,699,698,698,698,698,698,700,698,698,698,
+698,698,698,698,698,116,701,701,701,701,701,701,701,701,701,701,
+702,702,702,702,699,700,700,116,116,116,116,116,116,116,116,116,
+703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,
+703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,
+703,703,703,704,705,705,703,116,116,116,116,116,116,116,116,116,
/* block 166 */
-706,706,707,707,115,708,708,708,708,708,708,708,708,115,115,708,
-708,115,115,708,708,708,708,708,708,708,708,708,708,708,708,708,
-708,708,708,708,708,708,708,708,708,115,708,708,708,708,708,708,
-708,115,708,708,115,708,708,708,708,708,115,115,706,708,709,707,
-706,707,707,707,707,115,115,707,707,115,115,707,707,707,115,115,
-708,115,115,115,115,115,115,709,115,115,115,115,115,708,708,708,
-708,708,707,707,115,115,706,706,706,706,706,706,706,115,115,115,
-706,706,706,706,706,115,115,115,115,115,115,115,115,115,115,115,
+706,706,707,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,707,707,707,706,706,706,706,706,706,706,706,706,707,
+707,708,709,709,708,710,710,710,710,706,706,706,706,710,116,116,
+711,711,711,711,711,711,711,711,711,711,708,710,708,710,710,710,
+116,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,116,116,116,116,116,116,116,116,116,116,116,
/* block 167 */
-710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,
-710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,
-710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,
-710,710,710,710,710,711,711,711,712,712,712,712,712,712,712,712,
-711,711,712,712,712,711,712,710,710,710,710,713,713,713,713,713,
-714,714,714,714,714,714,714,714,714,714,115,713,115,713,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,
+713,713,116,713,713,713,713,713,713,713,713,713,713,713,713,713,
+713,713,713,713,713,713,713,713,713,713,713,713,714,714,714,715,
+715,715,714,714,715,714,715,715,716,716,716,716,716,716,715,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 168 */
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-716,717,717,718,718,718,718,718,718,717,718,717,717,716,717,718,
-718,717,718,718,715,715,719,715,115,115,115,115,115,115,115,115,
-720,720,720,720,720,720,720,720,720,720,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+717,717,717,717,717,717,717,116,717,116,717,717,717,717,116,717,
+717,717,717,717,717,717,717,717,717,717,717,717,717,717,116,717,
+717,717,717,717,717,717,717,717,717,718,116,116,116,116,116,116,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,720,
+721,721,721,720,720,720,720,720,720,720,720,116,116,116,116,116,
+722,722,722,722,722,722,722,722,722,722,116,116,116,116,116,116,
/* block 169 */
-721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,
-721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,
-721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,722,
-723,723,724,724,724,724,115,115,723,723,723,723,724,724,723,724,
-724,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,
-725,725,725,725,725,725,725,725,721,721,721,721,724,724,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+723,723,724,724,116,725,725,725,725,725,725,725,725,116,116,725,
+725,116,116,725,725,725,725,725,725,725,725,725,725,725,725,725,
+725,725,725,725,725,725,725,725,725,116,725,725,725,725,725,725,
+725,116,725,725,116,725,725,725,725,725,116,111,723,725,726,724,
+723,724,724,724,724,116,116,724,724,116,116,724,724,724,116,116,
+725,116,116,116,116,116,116,726,116,116,116,116,116,725,725,725,
+725,725,724,724,116,116,723,723,723,723,723,723,723,116,116,116,
+723,723,723,723,723,116,116,116,116,116,116,116,116,116,116,116,
/* block 170 */
-726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
-726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
-726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
-727,727,727,728,728,728,728,728,728,728,728,727,727,728,727,728,
-728,729,729,729,726,115,115,115,115,115,115,115,115,115,115,115,
-730,730,730,730,730,730,730,730,730,730,115,115,115,115,115,115,
-369,369,369,369,369,369,369,369,369,369,369,369,369,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
+727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
+727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
+727,727,727,727,727,728,728,728,729,729,729,729,729,729,729,729,
+728,728,729,729,729,728,729,727,727,727,727,730,730,730,730,730,
+731,731,731,731,731,731,731,731,731,731,116,730,116,730,729,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 171 */
-731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,
-731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,
-731,731,731,731,731,731,731,731,731,731,731,732,733,732,733,733,
-732,732,732,732,732,732,733,732,115,115,115,115,115,115,115,115,
-734,734,734,734,734,734,734,734,734,734,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,
+732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,
+732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,
+733,734,734,735,735,735,735,735,735,734,735,734,734,733,734,735,
+735,734,735,735,732,732,736,732,116,116,116,116,116,116,116,116,
+737,737,737,737,737,737,737,737,737,737,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 172 */
-735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,
-735,735,735,735,735,735,735,735,735,735,115,115,115,736,736,736,
-737,737,736,736,736,736,737,736,736,736,736,736,115,115,115,115,
-738,738,738,738,738,738,738,738,738,738,739,739,740,740,740,741,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,
+738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,
+738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,739,
+740,740,741,741,741,741,116,116,740,740,740,740,741,741,740,741,
+741,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,
+742,742,742,742,742,742,742,742,738,738,738,738,741,741,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 173 */
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,
-742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,
743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,
743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,
-744,744,744,744,744,744,744,744,744,744,745,745,745,745,745,745,
-745,745,745,115,115,115,115,115,115,115,115,115,115,115,115,746,
+743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,
+744,744,744,745,745,745,745,745,745,745,745,744,744,745,744,745,
+745,746,746,746,743,116,116,116,116,116,116,116,116,116,116,116,
+747,747,747,747,747,747,747,747,747,747,116,116,116,116,116,116,
+373,373,373,373,373,373,373,373,373,373,373,373,373,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 174 */
-747,748,748,748,748,748,748,749,749,748,748,747,747,747,747,747,
-747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,
-747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,
-747,747,747,748,748,748,748,748,748,749,750,748,748,748,748,751,
-751,751,751,751,751,751,751,748,115,115,115,115,115,115,115,115,
-752,753,753,753,753,753,753,754,754,753,753,753,752,752,752,752,
-752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,
-752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,
+748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,
+748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,
+748,748,748,748,748,748,748,748,748,748,748,749,750,749,750,750,
+749,749,749,749,749,749,750,749,116,116,116,116,116,116,116,116,
+751,751,751,751,751,751,751,751,751,751,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 175 */
-752,752,752,752,115,115,755,755,755,755,753,753,753,753,753,753,
-753,753,753,753,753,753,753,754,753,753,756,756,756,115,756,756,
-756,756,756,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,
-757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,
-757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,
-757,757,757,757,757,757,757,757,757,115,115,115,115,115,115,115,
+752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,
+752,752,752,752,752,752,752,752,752,752,752,116,116,753,753,753,
+754,754,753,753,753,753,754,753,753,753,753,753,116,116,116,116,
+755,755,755,755,755,755,755,755,755,755,756,756,757,757,757,758,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 176 */
-758,758,758,758,758,758,758,758,758,115,758,758,758,758,758,758,
-758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,
-758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,759,
-760,760,760,760,760,760,760,115,760,760,760,760,760,760,759,760,
-758,761,761,761,761,761,115,115,115,115,115,115,115,115,115,115,
-762,762,762,762,762,762,762,762,762,762,763,763,763,763,763,763,
-763,763,763,763,763,763,763,763,763,763,763,763,763,115,115,115,
-764,764,765,765,765,765,765,765,765,765,765,765,765,765,765,765,
+759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,
+759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,
+759,759,759,759,759,759,759,759,759,759,759,759,760,760,760,761,
+761,761,761,761,761,761,761,761,760,761,761,762,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 177 */
-765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,
-115,115,766,766,766,766,766,766,766,766,766,766,766,766,766,766,
-766,766,766,766,766,766,766,766,115,767,766,766,766,766,766,766,
-766,767,766,766,767,766,766,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,
+763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,
+764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,
+764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,
+765,765,765,765,765,765,765,765,765,765,766,766,766,766,766,766,
+766,766,766,116,116,116,116,116,116,116,116,116,116,116,116,767,
/* block 178 */
-768,768,768,768,768,768,768,115,768,768,115,768,768,768,768,768,
+768,769,769,769,769,769,769,769,769,769,769,768,768,768,768,768,
768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,
768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,
-768,769,769,769,769,769,769,115,115,115,769,115,769,769,115,769,
-769,769,769,769,769,769,770,769,115,115,115,115,115,115,115,115,
-771,771,771,771,771,771,771,771,771,771,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+768,768,768,769,769,769,769,769,769,770,771,769,769,769,769,772,
+772,772,772,772,772,772,772,769,116,116,116,116,116,116,116,116,
+773,774,774,774,774,774,774,775,775,774,774,774,773,773,773,773,
+773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
+773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
/* block 179 */
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
+773,773,773,773,116,116,776,776,776,776,774,774,774,774,774,774,
+774,774,774,774,774,774,774,775,774,774,777,777,777,773,777,777,
+777,777,777,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,
+778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,
+778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,
+778,778,778,778,778,778,778,778,778,116,116,116,116,116,116,116,
/* block 180 */
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+779,779,779,779,779,779,779,779,779,116,779,779,779,779,779,779,
+779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,
+779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,780,
+781,781,781,781,781,781,781,116,781,781,781,781,781,781,780,781,
+779,782,782,782,782,782,116,116,116,116,116,116,116,116,116,116,
+783,783,783,783,783,783,783,783,783,783,784,784,784,784,784,784,
+784,784,784,784,784,784,784,784,784,784,784,784,784,116,116,116,
+785,785,786,786,786,786,786,786,786,786,786,786,786,786,786,786,
/* block 181 */
-773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
-773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
-773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
-773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
-773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
-773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
-773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,115,
-774,774,774,774,774,115,115,115,115,115,115,115,115,115,115,115,
+786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,
+116,116,787,787,787,787,787,787,787,787,787,787,787,787,787,787,
+787,787,787,787,787,787,787,787,116,788,787,787,787,787,787,787,
+787,788,787,787,788,787,787,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 182 */
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
-772,772,772,772,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+789,789,789,789,789,789,789,116,789,789,116,789,789,789,789,789,
+789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,
+789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,
+789,790,790,790,790,790,790,116,116,116,790,116,790,790,116,790,
+790,790,790,790,790,790,791,790,116,116,116,116,116,116,116,116,
+792,792,792,792,792,792,792,792,792,792,116,116,116,116,116,116,
+793,793,793,793,793,793,116,793,793,116,793,793,793,793,793,793,
+793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,
/* block 183 */
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
+793,793,793,793,793,793,793,793,793,793,794,794,794,794,794,116,
+795,795,116,794,794,795,794,795,793,116,116,116,116,116,116,116,
+796,796,796,796,796,796,796,796,796,796,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 184 */
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
-775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
+797,797,797,798,798,799,799,800,800,116,116,116,116,116,116,116,
/* block 185 */
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
/* block 186 */
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
-776,776,776,776,776,776,776,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 187 */
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,
+802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,
+802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,
+802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,
+802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,
+802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,
+802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,116,
+803,803,803,803,803,116,116,116,116,116,116,116,116,116,116,116,
/* block 188 */
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,115,115,115,115,115,115,115,
-777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,
-777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,115,
-778,778,778,778,778,778,778,778,778,778,115,115,115,115,779,779,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
+801,801,801,801,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 189 */
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,
-780,780,780,780,780,780,780,780,780,780,780,780,780,780,115,115,
-781,781,781,781,781,782,115,115,115,115,115,115,115,115,115,115,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
/* block 190 */
-783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,
-783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,
-783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,
-784,784,784,784,784,784,784,785,785,785,785,785,786,786,786,786,
-787,787,787,787,785,786,115,115,115,115,115,115,115,115,115,115,
-788,788,788,788,788,788,788,788,788,788,115,789,789,789,789,789,
-789,789,115,783,783,783,783,783,783,783,783,783,783,783,783,783,
-783,783,783,783,783,783,783,783,115,115,115,115,115,783,783,783,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 191 */
-783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
/* block 192 */
-790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,
-790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,
-790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,
-790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,
-790,790,790,790,790,115,115,115,115,115,115,115,115,115,115,115,
-790,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,
-791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,
-791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,115,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
+805,805,805,805,805,805,805,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 193 */
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,792,
-792,792,792,793,793,793,793,793,793,793,793,793,793,793,793,793,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-794,795,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
/* block 194 */
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,116,116,116,116,116,116,116,
+806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,
+806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,116,
+807,807,807,807,807,807,807,807,807,807,116,116,116,116,808,808,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 195 */
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,
+809,809,809,809,809,809,809,809,809,809,809,809,809,809,116,116,
+810,810,810,810,810,811,116,116,116,116,116,116,116,116,116,116,
/* block 196 */
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
-796,796,796,115,115,115,115,115,115,115,115,115,115,115,115,115,
+812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,
+812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,
+812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,
+813,813,813,813,813,813,813,814,814,814,814,814,815,815,815,815,
+816,816,816,816,814,815,116,116,116,116,116,116,116,116,116,116,
+817,817,817,817,817,817,817,817,817,817,116,818,818,818,818,818,
+818,818,116,812,812,812,812,812,812,812,812,812,812,812,812,812,
+812,812,812,812,812,812,812,812,116,116,116,116,116,812,812,812,
/* block 197 */
-509,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
+812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 198 */
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,
+819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,
+820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
+820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
/* block 199 */
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
+821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,
+821,821,821,821,821,821,821,822,822,822,822,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 200 */
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
+823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,
+823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,
+823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,
+823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,
+823,823,823,823,823,116,116,116,116,116,116,116,116,116,116,116,
+823,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,
+824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,
+824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,116,
/* block 201 */
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
-797,797,797,797,797,797,797,797,797,797,797,797,115,115,115,115,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,825,
+825,825,825,826,826,826,826,826,826,826,826,826,826,826,826,826,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+827,828,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 202 */
-798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,
-798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,
-798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,
-798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,
-798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,
-798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,
-798,798,798,798,798,798,798,798,798,798,798,115,115,115,115,115,
-798,798,798,798,798,798,798,798,798,798,798,798,798,115,115,115,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
/* block 203 */
-798,798,798,798,798,798,798,798,798,115,115,115,115,115,115,115,
-798,798,798,798,798,798,798,798,798,798,115,115,799,800,800,801,
- 22, 22, 22, 22,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 204 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
+829,829,829,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 205 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,802,433,110,110,110, 19, 19, 19,433,802,802,
-802,802,802, 22, 22, 22, 22, 22, 22, 22, 22,110,110,110,110,110,
+517,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
/* block 206 */
-110,110,110, 19, 19,110,110,110,110,110,110,110, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,110,110,110,110, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
/* block 207 */
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-596,596,803,803,803,596,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
/* block 208 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
/* block 209 */
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,467,467,
-467,467,467,467,467,115,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
+830,830,830,830,830,830,830,830,830,830,830,830,116,116,116,116,
/* block 210 */
-466,466,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,466,115,466,466,
-115,115,466,115,115,466,466,115,115,466,466,466,466,115,466,466,
-466,466,466,466,466,466,467,467,467,467,115,467,115,467,467,467,
-467,467,467,467,115,467,467,467,467,467,467,467,467,467,467,467,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,
+831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,
+831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,
+831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,
+831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,
+831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,
+831,831,831,831,831,831,831,831,831,831,831,116,116,116,116,116,
+831,831,831,831,831,831,831,831,831,831,831,831,831,116,116,116,
/* block 211 */
-467,467,467,467,466,466,115,466,466,466,466,115,115,466,466,466,
-466,466,466,466,466,115,466,466,466,466,466,466,466,115,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,466,466,115,466,466,466,466,115,
-466,466,466,466,466,115,466,115,115,115,466,466,466,466,466,466,
-466,115,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
+831,831,831,831,831,831,831,831,831,116,116,116,116,116,116,116,
+831,831,831,831,831,831,831,831,831,831,116,116,832,833,833,834,
+ 23, 23, 23, 23,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 212 */
-466,466,466,466,466,466,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,116,116,116,116,116,116,116,116,116,116,
/* block 213 */
-467,467,467,467,467,467,467,467,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,116,116, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19,835,438,111,111,111, 19, 19, 19,438,835,835,
+835,835,835, 23, 23, 23, 23, 23, 23, 23, 23,111,111,111,111,111,
/* block 214 */
-466,466,466,466,466,466,466,466,466,466,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,115,115,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466, 8,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467, 8,467,467,467,467,
-467,467,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466, 8,467,467,467,467,
+111,111,111, 19, 19,111,111,111,111,111,111,111, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,111,111,111,111, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 215 */
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467, 8,467,467,467,467,467,467,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466, 8,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467, 8,
-467,467,467,467,467,467,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466, 8,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,
+604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,
+604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,
+604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,
+604,604,836,836,836,604,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 216 */
-467,467,467,467,467,467,467,467,467, 8,467,467,467,467,467,467,
-466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
-466,466,466,466,466,466,466,466,466, 8,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467, 8,467,467,467,467,467,467,466,467,115,115, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 217 */
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
-804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,116,116,116,116,116,116,116,116,116,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24,116,116,116,116,116,116,116,
/* block 218 */
-805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
-805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
-805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
-805,805,805,805,805,805,805,804,804,804,804,805,805,805,805,805,
-805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
-805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
-805,805,805,805,805,805,805,805,805,805,805,805,805,804,804,804,
-804,804,804,804,804,805,804,804,804,804,804,804,804,804,804,804,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,473,473,
+473,473,473,473,473,116,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
/* block 219 */
-804,804,804,804,805,804,804,806,806,806,806,806,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,805,805,805,805,805,
-115,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+472,472,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,472,116,472,472,
+116,116,472,116,116,472,472,116,116,472,472,472,472,116,472,472,
+472,472,472,472,472,472,473,473,473,473,116,473,116,473,473,473,
+473,473,473,473,116,473,473,473,473,473,473,473,473,473,473,473,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
/* block 220 */
-807,807,807,807,807,807,807,115,807,807,807,807,807,807,807,807,
-807,807,807,807,807,807,807,807,807,115,115,807,807,807,807,807,
-807,807,115,807,807,115,807,807,807,807,807,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+473,473,473,473,472,472,116,472,472,472,472,116,116,472,472,472,
+472,472,472,472,472,116,472,472,472,472,472,472,472,116,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,472,472,116,472,472,472,472,116,
+472,472,472,472,472,116,472,116,116,116,472,472,472,472,472,472,
+472,116,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
/* block 221 */
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
+472,472,472,472,472,472,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
/* block 222 */
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
-808,808,808,808,808,115,115,809,809,809,809,809,809,809,809,809,
-810,810,810,810,810,810,810,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+473,473,473,473,473,473,473,473,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
/* block 223 */
-811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,
-811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,
-811,811,812,812,812,812,812,812,812,812,812,812,812,812,812,812,
-812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,
-812,812,812,812,813,813,813,813,813,813,813,115,115,115,115,115,
-814,814,814,814,814,814,814,814,814,814,115,115,115,115,815,815,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+472,472,472,472,472,472,472,472,472,472,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,116,116,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472, 8,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473, 8,473,473,473,473,
+473,473,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472, 8,473,473,473,473,
/* block 224 */
-216,216,216,216,115,216,216,216,216,216,216,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,
-115,216,216,115,216,115,115,216,115,216,216,216,216,216,216,216,
-216,216,216,115,216,216,216,216,115,216,115,216,115,115,115,115,
-115,115,216,115,115,115,115,216,115,216,115,216,115,216,216,216,
-115,216,216,115,216,115,115,216,115,216,115,216,115,216,115,216,
-115,216,216,115,216,115,115,216,216,216,216,115,216,216,216,216,
-216,216,216,115,216,216,216,216,115,216,216,216,216,115,216,115,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473, 8,473,473,473,473,473,473,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472, 8,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473, 8,
+473,473,473,473,473,473,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472, 8,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
/* block 225 */
-216,216,216,216,216,216,216,216,216,216,115,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,115,115,115,115,
-115,216,216,216,115,216,216,216,216,216,115,216,216,216,216,216,
-216,216,216,216,216,216,216,216,216,216,216,216,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-210,210,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+473,473,473,473,473,473,473,473,473, 8,473,473,473,473,473,473,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472, 8,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473, 8,473,473,473,473,473,473,472,473,116,116, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
/* block 226 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
+837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
/* block 227 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,
-115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,
+838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,
+838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,
+838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,
+838,838,838,838,838,838,838,837,837,837,837,838,838,838,838,838,
+838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,
+838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,
+838,838,838,838,838,838,838,838,838,838,838,838,838,837,837,837,
+837,837,837,837,837,838,837,837,837,837,837,837,837,837,837,837,
/* block 228 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+837,837,837,837,838,837,837,839,839,839,839,839,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,838,838,838,838,838,
+116,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 229 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,816,816,816,816,816,816,816,816,816,816,
-816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,
+840,840,840,840,840,840,840,116,840,840,840,840,840,840,840,840,
+840,840,840,840,840,840,840,840,840,116,116,840,840,840,840,840,
+840,840,116,840,840,116,840,840,840,840,840,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 230 */
-817, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
- 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
/* block 231 */
- 19, 19, 19, 19, 19, 19, 19, 19,479, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,479, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19,479, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
+841,841,841,841,841,116,116,842,842,842,842,842,842,842,842,842,
+843,843,843,843,843,843,843,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 232 */
- 19, 19, 19, 19, 19,478, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19,479, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,479, 19, 19, 19,479, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19,478,478,478, 19, 19,478, 19, 19,478,478,478, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,479, 19,479, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,818,818,818,818,818,
+844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,
+844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,
+844,844,845,845,845,845,845,845,845,845,845,845,845,845,845,845,
+845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,
+845,845,845,845,846,846,846,846,846,846,846,116,116,116,116,116,
+847,847,847,847,847,847,847,847,847,847,116,116,116,116,848,848,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 233 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19,478,478, 19, 19,478,478,478,478,478,478,478,478,478,478,
-478, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,819,819,819,819, 19, 19, 19, 19,478, 19,
-478,478,478,478,478,478,478,478,478, 19, 19, 19,478, 19, 19, 19,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
/* block 234 */
- 19,478,478,478, 19,478,478,478, 19, 19, 19,479, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,478, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,479,479, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 19, 24, 24, 24,
+ 5, 24, 24, 24, 24,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 235 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,479, 19, 19, 19, 19,479, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,478,478, 19, 19, 19, 19,478, 19, 19, 19, 19, 19,
+217,217,217,217,116,217,217,217,217,217,217,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,
+116,217,217,116,217,116,116,217,116,217,217,217,217,217,217,217,
+217,217,217,116,217,217,217,217,116,217,116,217,116,116,116,116,
+116,116,217,116,116,116,116,217,116,217,116,217,116,217,217,217,
+116,217,217,116,217,116,116,217,116,217,116,217,116,217,116,217,
+116,217,217,116,217,116,116,217,217,217,217,116,217,217,217,217,
+217,217,217,116,217,217,217,217,116,217,217,217,217,116,217,116,
/* block 236 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-478, 19, 19, 19, 19,478,478, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,479, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+217,217,217,217,217,217,217,217,217,217,116,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,116,116,116,116,
+116,217,217,217,116,217,217,217,217,217,116,217,217,217,217,217,
+217,217,217,217,217,217,217,217,217,217,217,217,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+211,211,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
/* block 237 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,478,478,478, 19, 19, 19,478,478,478,478,478,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,849,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
/* block 238 */
-479, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19,479, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19,478, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,478,478,478, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-478, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,478, 19, 19, 19,
- 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20,849,849,849,849,849,849,849,849,849,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,849,
+849, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+849, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+849, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20,849,849,849,849,849,849,849,849,849,849,
/* block 239 */
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,849,849,849,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,849,
+ 20, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20,
/* block 240 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 19,
+ 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,850,850,850,850,850,850,850,850,850,850,
+850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,
/* block 241 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+851, 20, 20,849,849,849,849,849,849,849,849,849,849,849,849,849,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20,
+ 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 19,849,849,849,849,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,849,849,849,849,
+ 20, 20,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+ 20, 20, 20, 20, 20, 20,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
/* block 242 */
- 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
/* block 243 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19,478,478,478,478,478, 19,478,478,
- 19, 19, 19, 19, 19, 19,478, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-478,478,478,478,478,478,478,478,478,478, 19, 19, 19,478,478,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
/* block 244 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
- 19,478,478,478,478,478,478,478,478,478,478,478,478,478, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,852,852,852,852,852,
/* block 245 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 19, 19,
+ 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
/* block 246 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,115,115,115,115,115,115,115,115,115,115,115,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
/* block 247 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,115,115,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20,849,849,849,849,849,849,849,849,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,849,849,849,849,849,849,
/* block 248 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,849,849,849,849,849,849,849,849,849,849,849,849,
/* block 249 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 20, 20, 20, 20,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
/* block 250 */
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,515,515,515,515,515,515,515,515,515,515,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,849,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,849,849,849,849,849,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,849,849,849,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
/* block 251 */
-465, 22,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
-820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
-820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
-820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
-820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
-820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
+ 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,849,849,849,849,849,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
/* block 252 */
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,849,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 19, 20, 20, 20,849,
+ 20, 20, 20, 20, 20, 20, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20,849,849, 20, 20, 20, 20,849,849,849, 20,849, 20, 20, 20, 20,
/* block 253 */
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20,849,849,849,849,849,849,849,849,849,849,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,849,849,849,849,849,849,
+ 20, 20, 20,849,849,849,849,849,849,849,849,849,849,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
/* block 254 */
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
/* block 255 */
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,115,115,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
+849,849,849,849,849,849,849,849,849,849,849,849,849,849,116,116,
+
+/* block 256 */
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+
+/* block 257 */
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,116,116,116,116,116,116,116,116,116,116,116,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+
+/* block 258 */
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,116,116,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+
+/* block 259 */
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+
+/* block 260 */
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+
+/* block 261 */
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
+523,523,523,523,523,523,523,523,523,523,523,523,523,523,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
+
+/* block 262 */
+471, 23,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
+853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
+853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
+853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
+853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
+853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
+
+/* block 263 */
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+
+/* block 264 */
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+
+/* block 265 */
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+
+/* block 266 */
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,116,116,
};
diff --git a/thirdparty/pcre2/src/pcre2_ucp.h b/thirdparty/pcre2/src/pcre2_ucp.h
index defba4c10e..0c330edcb2 100644
--- a/thirdparty/pcre2/src/pcre2_ucp.h
+++ b/thirdparty/pcre2/src/pcre2_ucp.h
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -100,27 +100,25 @@ enum {
ucp_Zs /* Space separator */
};
-/* These are grapheme break properties. */
+/* These are grapheme break properties. The Extended Pictographic property
+comes from the emoji-data.txt file. */
enum {
- ucp_gbCR, /* 0 */
- ucp_gbLF, /* 1 */
- ucp_gbControl, /* 2 */
- ucp_gbExtend, /* 3 */
- ucp_gbPrepend, /* 4 */
- ucp_gbSpacingMark, /* 5 */
- ucp_gbL, /* 6 Hangul syllable type L */
- ucp_gbV, /* 7 Hangul syllable type V */
- ucp_gbT, /* 8 Hangul syllable type T */
- ucp_gbLV, /* 9 Hangul syllable type LV */
- ucp_gbLVT, /* 10 Hangul syllable type LVT */
- ucp_gbRegionalIndicator, /* 11 */
- ucp_gbOther, /* 12 */
- ucp_gbE_Base, /* 13 */
- ucp_gbE_Modifier, /* 14 */
- ucp_gbE_Base_GAZ, /* 15 */
- ucp_gbZWJ, /* 16 */
- ucp_gbGlue_After_Zwj /* 17 */
+ ucp_gbCR, /* 0 */
+ ucp_gbLF, /* 1 */
+ ucp_gbControl, /* 2 */
+ ucp_gbExtend, /* 3 */
+ ucp_gbPrepend, /* 4 */
+ ucp_gbSpacingMark, /* 5 */
+ ucp_gbL, /* 6 Hangul syllable type L */
+ ucp_gbV, /* 7 Hangul syllable type V */
+ ucp_gbT, /* 8 Hangul syllable type T */
+ ucp_gbLV, /* 9 Hangul syllable type LV */
+ ucp_gbLVT, /* 10 Hangul syllable type LVT */
+ ucp_gbRegionalIndicator, /* 11 */
+ ucp_gbOther, /* 12 */
+ ucp_gbZWJ, /* 13 */
+ ucp_gbExtended_Pictographic /* 14 */
};
/* These are the script identifications. */
@@ -274,7 +272,15 @@ enum {
ucp_Masaram_Gondi,
ucp_Nushu,
ucp_Soyombo,
- ucp_Zanabazar_Square
+ ucp_Zanabazar_Square,
+ /* New for Unicode 11.0.0 */
+ ucp_Dogra,
+ ucp_Gunjala_Gondi,
+ ucp_Hanifi_Rohingya,
+ ucp_Makasar,
+ ucp_Medefaidrin,
+ ucp_Old_Sogdian,
+ ucp_Sogdian
};
#endif /* PCRE2_UCP_H_IDEMPOTENT_GUARD */
diff --git a/thirdparty/pcre2/src/sljit/sljitConfigInternal.h b/thirdparty/pcre2/src/sljit/sljitConfigInternal.h
index e13282c842..f5703e8e7f 100644
--- a/thirdparty/pcre2/src/sljit/sljitConfigInternal.h
+++ b/thirdparty/pcre2/src/sljit/sljitConfigInternal.h
@@ -66,7 +66,7 @@
SLJIT_RETURN_ADDRESS_OFFSET : a return instruction always adds this offset to the return address
Other macros:
- SLJIT_FUNC : calling convention attribute for both calling JIT form C and C calling back from JIT
+ SLJIT_FUNC : calling convention attribute for both calling JIT from C and C calling back from JIT
SLJIT_W(number) : defining 64 bit constants on 64 bit architectures (compiler independent helper)
*/
@@ -147,17 +147,23 @@
#define SLJIT_CONFIG_UNSUPPORTED 1
#endif
-#else /* !_WIN32 */
+#else /* _WIN32 */
#if defined(_M_X64) || defined(__x86_64__)
#define SLJIT_CONFIG_X86_64 1
+#elif (defined(_M_ARM) && _M_ARM >= 7 && defined(_M_ARMT)) || defined(__thumb2__)
+#define SLJIT_CONFIG_ARM_THUMB2 1
+#elif (defined(_M_ARM) && _M_ARM >= 7)
+#define SLJIT_CONFIG_ARM_V7 1
#elif defined(_ARM_)
#define SLJIT_CONFIG_ARM_V5 1
+#elif defined(_M_ARM64) || defined(__aarch64__)
+#define SLJIT_CONFIG_ARM_64 1
#else
#define SLJIT_CONFIG_X86_32 1
#endif
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
#endif /* SLJIT_CONFIG_AUTO */
#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
@@ -324,6 +330,11 @@
sparc_cache_flush((from), (to))
#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
+#elif defined _WIN32
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+ FlushInstructionCache(GetCurrentProcess(), (char*)(from), (char*)(to) - (char*)(from))
+
#else
/* Calls __ARM_NR_cacheflush on ARM-Linux. */
@@ -371,12 +382,18 @@ typedef int sljit_sw;
#define SLJIT_64BIT_ARCHITECTURE 1
#define SLJIT_WORD_SHIFT 3
#ifdef _WIN32
+#ifdef __GNUC__
+/* These types do not require windows.h */
+typedef unsigned long long sljit_uw;
+typedef long long sljit_sw;
+#else
typedef unsigned __int64 sljit_uw;
typedef __int64 sljit_sw;
-#else
+#endif
+#else /* !_WIN32 */
typedef unsigned long int sljit_uw;
typedef long int sljit_sw;
-#endif
+#endif /* _WIN32 */
#endif
typedef sljit_uw sljit_p;
@@ -590,7 +607,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr);
#define SLJIT_NUMBER_OF_REGISTERS 26
#define SLJIT_NUMBER_OF_SAVED_REGISTERS 10
-#define SLJIT_LOCALS_OFFSET_BASE (2 * sizeof(sljit_sw))
+#define SLJIT_LOCALS_OFFSET_BASE 0
#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
diff --git a/thirdparty/pcre2/src/sljit/sljitExecAllocator.c b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
index f5009788f6..7c18578618 100644
--- a/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
+++ b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
@@ -99,7 +99,14 @@ static SLJIT_INLINE void* alloc_chunk(sljit_uw size)
void *retval;
#ifdef MAP_ANON
- retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
+
+ int flags = MAP_PRIVATE | MAP_ANON;
+
+#ifdef MAP_JIT
+ flags |= MAP_JIT;
+#endif
+
+ retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, flags, -1, 0);
#else
if (dev_zero < 0) {
if (open_dev_zero())
diff --git a/thirdparty/pcre2/src/sljit/sljitLir.c b/thirdparty/pcre2/src/sljit/sljitLir.c
index 5e435f0154..5bdddc10cf 100644
--- a/thirdparty/pcre2/src/sljit/sljitLir.c
+++ b/thirdparty/pcre2/src/sljit/sljitLir.c
@@ -26,6 +26,13 @@
#include "sljitLir.h"
+#ifdef _WIN32
+
+/* For SLJIT_CACHE_FLUSH, which can expand to FlushInstructionCache. */
+#include <windows.h>
+
+#endif /* _WIN32 */
+
#if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
/* These libraries are needed for the macros below. */
@@ -2178,7 +2185,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compil
#endif
-#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \
+ && !(defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
{
diff --git a/thirdparty/pcre2/src/sljit/sljitLir.h b/thirdparty/pcre2/src/sljit/sljitLir.h
index 920f6d4f78..e71890cf7b 100644
--- a/thirdparty/pcre2/src/sljit/sljitLir.h
+++ b/thirdparty/pcre2/src/sljit/sljitLir.h
@@ -138,7 +138,7 @@ of sljitConfigInternal.h */
be specified as scratch registers and the fifth one as saved register
on the CPU above and any user code which requires four scratch
registers can run unmodified. The SLJIT compiler automatically saves
- the content of the two extra scrath register on the stack. Scratch
+ the content of the two extra scratch register on the stack. Scratch
registers can also be preserved by saving their value on the stack
but this needs to be done manually.
@@ -746,7 +746,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler
be mixed. The only exception is SLJIT_MOV32 and SLJIT_MOVU32 whose source
register can hold any 32 or 64 bit value, and it is converted to a 32 bit
compatible format first. This conversion is free (no instructions are
- emitted) on most CPUs. A 32 bit value can also be coverted to a 64 bit
+ emitted) on most CPUs. A 32 bit value can also be converted to a 64 bit
value by SLJIT_MOV_S32 (sign extension) or SLJIT_MOV_U32 (zero extension).
Note: memory addressing always uses 64 bit values on 64 bit systems so
@@ -773,8 +773,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler
*/
#define SLJIT_F32_OP SLJIT_I32_OP
-/* Many CPUs (x86, ARM, PPC) has status flags which can be set according
- to the result of an operation. Other CPUs (MIPS) does not have status
+/* Many CPUs (x86, ARM, PPC) have status flags which can be set according
+ to the result of an operation. Other CPUs (MIPS) do not have status
flags, and results must be stored in registers. To cover both architecture
types efficiently only two flags are defined by SLJIT:
@@ -810,14 +810,14 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler
Using these flags can reduce the number of emitted instructions. E.g. a
fast loop can be implemented by decreasing a counter register and set the
- zero flag to jump back if the counter register is not reached zero.
+ zero flag to jump back if the counter register has not reached zero.
Motivation: although CPUs can set a large number of flags, usually their
values are ignored or only one of them is used. Emulating a large number
of flags on systems without flag register is complicated so SLJIT
instructions must specify the flag they want to use and only that flag
will be emulated. The last arithmetic instruction can be repeated if
- multiple flags needs to be checked.
+ multiple flags need to be checked.
*/
/* Set Zero status flag. */
@@ -884,7 +884,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
/* Starting index of opcodes for sljit_emit_op1. */
#define SLJIT_OP1_BASE 32
-/* The MOV instruction transfer data from source to destination.
+/* The MOV instruction transfers data from source to destination.
MOV instruction suffixes:
@@ -1156,7 +1156,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compi
#define SLJIT_FAST_CALL 25
/* Called function must be declared with the SLJIT_FUNC attribute. */
#define SLJIT_CALL 26
- /* Called function must be decalred with cdecl attribute.
+ /* Called function must be declared with cdecl attribute.
This is the default attribute for C functions. */
#define SLJIT_CALL_CDECL 27
@@ -1210,7 +1210,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sl
/* Set the destination address of the jump to this label. */
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target);
-/* Emit an indirect jump or fast call. Both direct and indirect form
+/* Emit an indirect jump or fast call.
Direct form: set src to SLJIT_IMM() and srcw to the address
Indirect form: any other valid addressing mode
type must be between SLJIT_JUMP and SLJIT_FAST_CALL
@@ -1274,7 +1274,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil
#define SLJIT_MEM_POST 0x1000
/* Emit a single memory load or store with update instruction. When the
- requested instruction from is not supported by the CPU, it returns
+ requested instruction form is not supported by the CPU, it returns
with SLJIT_ERR_UNSUPPORTED instead of emulating the instruction. This
allows specializing tight loops based on the supported instruction
forms (see SLJIT_MEM_SUPP flag).
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c
index 8a437bd6a0..27af741487 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c
@@ -37,14 +37,14 @@ typedef sljit_u32 sljit_ins;
#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
#define TMP_LR (SLJIT_NUMBER_OF_REGISTERS + 4)
-#define TMP_SP (SLJIT_NUMBER_OF_REGISTERS + 5)
+#define TMP_FP (SLJIT_NUMBER_OF_REGISTERS + 5)
#define TMP_FREG1 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
#define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2)
/* r18 - platform register, currently not used */
static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 8] = {
- 31, 0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 8, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 29, 9, 10, 30, 31
+ 31, 0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 8, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 31, 9, 10, 30, 29
};
static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
@@ -68,6 +68,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
#define ADC 0x9a000000
#define ADD 0x8b000000
+#define ADDE 0x8b200000
#define ADDI 0x91000000
#define AND 0x8a000000
#define ANDI 0x92000000
@@ -96,7 +97,8 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
#define FSUB 0x1e603800
#define LDRI 0xf9400000
#define LDP 0xa9400000
-#define LDP_PST 0xa8c00000
+#define LDP_PRE 0xa9c00000
+#define LDR_PRE 0xf8400c00
#define LSLV 0x9ac02000
#define LSRV 0x9ac02400
#define MADD 0x9b000000
@@ -873,73 +875,51 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size);
- saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 0);
- local_size += saved_regs_size + SLJIT_LOCALS_OFFSET;
+ saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 2);
+ if (saved_regs_size & 0x8)
+ saved_regs_size += sizeof(sljit_sw);
+
local_size = (local_size + 15) & ~0xf;
- compiler->local_size = local_size;
-
- if (local_size <= (63 * sizeof(sljit_sw))) {
- FAIL_IF(push_inst(compiler, STP_PRE | 29 | RT2(TMP_LR)
- | RN(TMP_SP) | ((-(local_size >> 3) & 0x7f) << 15)));
- FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_SP) | (0 << 10)));
- offs = (local_size - saved_regs_size) << (15 - 3);
- } else {
- offs = 0 << 15;
- if (saved_regs_size & 0x8) {
- offs = 1 << 15;
- saved_regs_size += sizeof(sljit_sw);
- }
- local_size -= saved_regs_size + SLJIT_LOCALS_OFFSET;
- if (saved_regs_size > 0)
- FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
- }
+ compiler->local_size = local_size + saved_regs_size;
+
+ FAIL_IF(push_inst(compiler, STP_PRE | RT(TMP_FP) | RT2(TMP_LR)
+ | RN(SLJIT_SP) | ((-(saved_regs_size >> 3) & 0x7f) << 15)));
+
+#ifdef _WIN32
+ if (local_size >= 4096)
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(SLJIT_SP) | (1 << 10) | (1 << 22)));
+ else if (local_size > 256)
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(SLJIT_SP) | (local_size << 10)));
+#endif
tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
prev = -1;
+ offs = 2 << 15;
for (i = SLJIT_S0; i >= tmp; i--) {
if (prev == -1) {
- if (!(offs & (1 << 15))) {
- prev = i;
- continue;
- }
- FAIL_IF(push_inst(compiler, STRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
- offs += 1 << 15;
+ prev = i;
continue;
}
- FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs));
offs += 2 << 15;
prev = -1;
}
for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
if (prev == -1) {
- if (!(offs & (1 << 15))) {
- prev = i;
- continue;
- }
- FAIL_IF(push_inst(compiler, STRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
- offs += 1 << 15;
+ prev = i;
continue;
}
- FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs));
offs += 2 << 15;
prev = -1;
}
- SLJIT_ASSERT(prev == -1);
+ if (prev != -1)
+ FAIL_IF(push_inst(compiler, STRI | RT(prev) | RN(SLJIT_SP) | (offs >> 5)));
- if (compiler->local_size > (63 * sizeof(sljit_sw))) {
- /* The local_size is already adjusted by the saved registers. */
- if (local_size > 0xfff) {
- FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | ((local_size >> 12) << 10) | (1 << 22)));
- local_size &= 0xfff;
- }
- if (local_size)
- FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (local_size << 10)));
- FAIL_IF(push_inst(compiler, STP_PRE | 29 | RT2(TMP_LR)
- | RN(TMP_SP) | ((-(16 >> 3) & 0x7f) << 15)));
- FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_SP) | (0 << 10)));
- }
+
+ FAIL_IF(push_inst(compiler, ADDI | RD(TMP_FP) | RN(SLJIT_SP) | (0 << 10)));
args = get_arg_count(arg_types);
@@ -950,6 +930,64 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
if (args >= 3)
FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S2) | RN(TMP_ZERO) | RM(SLJIT_R2)));
+#ifdef _WIN32
+ if (local_size >= 4096) {
+ if (local_size < 4 * 4096) {
+ /* No need for a loop. */
+ if (local_size >= 2 * 4096) {
+ FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (1 << 10) | (1 << 22)));
+ local_size -= 4096;
+ }
+
+ if (local_size >= 2 * 4096) {
+ FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (1 << 10) | (1 << 22)));
+ local_size -= 4096;
+ }
+
+ FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1)));
+ local_size -= 4096;
+ }
+ else {
+ FAIL_IF(push_inst(compiler, MOVZ | RD(TMP_REG2) | (((local_size >> 12) - 1) << 5)));
+ FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (1 << 10) | (1 << 22)));
+ FAIL_IF(push_inst(compiler, SUBI | (1 << 29) | RD(TMP_REG2) | RN(TMP_REG2) | (1 << 10)));
+ FAIL_IF(push_inst(compiler, B_CC | ((((sljit_ins) -3) & 0x7ffff) << 5) | 0x1 /* not-equal */));
+ FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1)));
+
+ local_size &= 0xfff;
+ }
+
+ if (local_size > 256) {
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (local_size << 10)));
+ FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1)));
+ }
+ else if (local_size > 0)
+ FAIL_IF(push_inst(compiler, LDR_PRE | RT(TMP_ZERO) | RN(TMP_REG1) | ((-local_size & 0x1ff) << 12)));
+
+ FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_REG1) | (0 << 10)));
+ }
+ else if (local_size > 256) {
+ FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_REG1) | (0 << 10)));
+ }
+ else if (local_size > 0)
+ FAIL_IF(push_inst(compiler, LDR_PRE | RT(TMP_ZERO) | RN(SLJIT_SP) | ((-local_size & 0x1ff) << 12)));
+
+#else /* !_WIN32 */
+
+ /* The local_size does not include saved registers size. */
+ if (local_size > 0xfff) {
+ FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((local_size >> 12) << 10) | (1 << 22)));
+ local_size &= 0xfff;
+ }
+ if (local_size != 0)
+ FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | (local_size << 10)));
+
+#endif /* _WIN32 */
+
return SLJIT_SUCCESS;
}
@@ -957,13 +995,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp
sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds,
sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
{
+ sljit_s32 saved_regs_size;
+
CHECK_ERROR();
CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size);
- local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 0) + SLJIT_LOCALS_OFFSET;
- local_size = (local_size + 15) & ~0xf;
- compiler->local_size = local_size;
+ saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 2);
+ if (saved_regs_size & 0x8)
+ saved_regs_size += sizeof(sljit_sw);
+
+ compiler->local_size = saved_regs_size + ((local_size + 15) & ~0xf);
return SLJIT_SUCCESS;
}
@@ -977,71 +1019,59 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp
FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
- local_size = compiler->local_size;
+ saved_regs_size = GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 2);
+ if (saved_regs_size & 0x8)
+ saved_regs_size += sizeof(sljit_sw);
- saved_regs_size = GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 0);
- if (local_size <= (63 * sizeof(sljit_sw)))
- offs = (local_size - saved_regs_size) << (15 - 3);
+ local_size = compiler->local_size - saved_regs_size;
+
+ /* Load LR as early as possible. */
+ if (local_size == 0)
+ FAIL_IF(push_inst(compiler, LDP | RT(TMP_FP) | RT2(TMP_LR) | RN(SLJIT_SP)));
+ else if (local_size < 63 * sizeof(sljit_sw)) {
+ FAIL_IF(push_inst(compiler, LDP_PRE | RT(TMP_FP) | RT2(TMP_LR)
+ | RN(SLJIT_SP) | (local_size << (15 - 3))));
+ }
else {
- FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
- | RN(TMP_SP) | (((16 >> 3) & 0x7f) << 15)));
- offs = 0 << 15;
- if (saved_regs_size & 0x8) {
- offs = 1 << 15;
- saved_regs_size += sizeof(sljit_sw);
- }
- local_size -= saved_regs_size + SLJIT_LOCALS_OFFSET;
if (local_size > 0xfff) {
- FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | ((local_size >> 12) << 10) | (1 << 22)));
+ FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((local_size >> 12) << 10) | (1 << 22)));
local_size &= 0xfff;
}
if (local_size)
- FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | (local_size << 10)));
+ FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | (local_size << 10)));
+
+ FAIL_IF(push_inst(compiler, LDP | RT(TMP_FP) | RT2(TMP_LR) | RN(SLJIT_SP)));
}
tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
prev = -1;
+ offs = 2 << 15;
for (i = SLJIT_S0; i >= tmp; i--) {
if (prev == -1) {
- if (!(offs & (1 << 15))) {
- prev = i;
- continue;
- }
- FAIL_IF(push_inst(compiler, LDRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
- offs += 1 << 15;
+ prev = i;
continue;
}
- FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs));
offs += 2 << 15;
prev = -1;
}
for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
if (prev == -1) {
- if (!(offs & (1 << 15))) {
- prev = i;
- continue;
- }
- FAIL_IF(push_inst(compiler, LDRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
- offs += 1 << 15;
+ prev = i;
continue;
}
- FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs));
offs += 2 << 15;
prev = -1;
}
- SLJIT_ASSERT(prev == -1);
+ if (prev != -1)
+ FAIL_IF(push_inst(compiler, LDRI | RT(prev) | RN(SLJIT_SP) | (offs >> 5)));
- if (compiler->local_size <= (63 * sizeof(sljit_sw))) {
- FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
- | RN(TMP_SP) | (((local_size >> 3) & 0x7f) << 15)));
- } else if (saved_regs_size > 0) {
- FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
- }
-
- FAIL_IF(push_inst(compiler, RET | RN(TMP_LR)));
- return SLJIT_SUCCESS;
+ /* These two can be executed in parallel. */
+ FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | (saved_regs_size << 10)));
+ return push_inst(compiler, RET | RN(TMP_LR));
}
/* --------------------------------------------------------------------- */
@@ -1856,6 +1886,46 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compil
return push_inst(compiler, inst | VT(freg) | RN(mem & REG_MASK) | ((memw & 0x1ff) << 12));
}
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
+{
+ sljit_s32 dst_reg;
+ sljit_ins ins;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
+
+ SLJIT_ASSERT (SLJIT_LOCALS_OFFSET_BASE == 0);
+
+ dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1;
+
+ if (offset <= 0xffffff && offset >= -0xffffff) {
+ ins = ADDI;
+ if (offset < 0) {
+ offset = -offset;
+ ins = SUBI;
+ }
+
+ if (offset <= 0xfff)
+ FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(SLJIT_SP) | (offset << 10)));
+ else {
+ FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(SLJIT_SP) | ((offset & 0xfff000) >> (12 - 10)) | (1 << 22)));
+
+ offset &= 0xfff;
+ if (offset != 0)
+ FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(dst_reg) | (offset << 10)));
+ }
+ }
+ else {
+ FAIL_IF(load_immediate (compiler, dst_reg, offset));
+ /* Add extended register form. */
+ FAIL_IF(push_inst(compiler, ADDE | (0x3 << 13) | RD(dst_reg) | RN(SLJIT_SP) | RM(dst_reg)));
+ }
+
+ if (SLJIT_UNLIKELY(dst & SLJIT_MEM))
+ return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG1);
+ return SLJIT_SUCCESS;
+}
+
SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
{
struct sljit_const *const_;
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c
index 75e7a38b5f..d7024b6d7d 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c
@@ -110,6 +110,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
#define ASRSI 0x1000
#define ASR_W 0xfa40f000
#define ASR_WI 0xea4f0020
+#define BCC 0xd000
#define BICI 0xf0200000
#define BKPT 0xbe00
#define BLX 0x4780
@@ -125,6 +126,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
#define EORS 0x4040
#define EOR_W 0xea800000
#define IT 0xbf00
+#define LDRI 0xf8500800
#define LSLS 0x4080
#define LSLSI 0x0000
#define LSL_W 0xfa00f000
@@ -158,6 +160,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
#define SBCI 0xf1600000
#define SBCS 0x4180
#define SBC_W 0xeb600000
+#define SDIV 0xfb90f0f0
#define SMULL 0xfb800000
#define STR_SP 0x9000
#define SUBS 0x1a00
@@ -172,6 +175,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = {
#define SXTH 0xb200
#define SXTH_W 0xfa0ff080
#define TST 0x4200
+#define UDIV 0xfbb0f0f0
#define UMULL 0xfba00000
#define UXTB 0xb2c0
#define UXTB_W 0xfa5ff080
@@ -339,8 +343,8 @@ static SLJIT_INLINE void set_jump_instruction(struct sljit_jump *jump, sljit_sw
/* Really complex instruction form for branches. */
s = (diff >> 23) & 0x1;
- j1 = (~(diff >> 21) ^ s) & 0x1;
- j2 = (~(diff >> 22) ^ s) & 0x1;
+ j1 = (~(diff >> 22) ^ s) & 0x1;
+ j2 = (~(diff >> 21) ^ s) & 0x1;
jump_inst[0] = 0xf000 | (s << 10) | COPY_BITS(diff, 11, 0, 10);
jump_inst[1] = (j1 << 13) | (j2 << 11) | (diff & 0x7ff);
@@ -520,6 +524,8 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst,
{
sljit_uw tmp;
+ /* MOVS cannot be used since it destroy flags. */
+
if (imm >= 0x10000) {
tmp = get_imm(imm);
if (tmp != INVALID_IMM)
@@ -1032,6 +1038,9 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
{
sljit_s32 args, size, i, tmp;
sljit_ins push = 0;
+#ifdef _WIN32
+ sljit_uw imm;
+#endif
CHECK_ERROR();
CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
@@ -1052,12 +1061,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
local_size = ((size + local_size + 7) & ~7) - size;
compiler->local_size = local_size;
+
+#ifdef _WIN32
+ if (local_size >= 256) {
+ if (local_size > 4096)
+ imm = get_imm(4096);
+ else
+ imm = get_imm(local_size & ~0xff);
+
+ SLJIT_ASSERT(imm != INVALID_IMM);
+ FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(SLJIT_SP) | imm));
+ }
+#else
if (local_size > 0) {
if (local_size <= (127 << 2))
FAIL_IF(push_inst16(compiler, SUB_SP | (local_size >> 2)));
else
FAIL_IF(emit_op_imm(compiler, SLJIT_SUB | ARG2_IMM, SLJIT_SP, SLJIT_SP, local_size));
}
+#endif
args = get_arg_count(arg_types);
@@ -1068,6 +1090,61 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
if (args >= 3)
FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S2, SLJIT_R2)));
+#ifdef _WIN32
+ if (local_size >= 256) {
+ if (local_size > 4096) {
+ imm = get_imm(4096);
+ SLJIT_ASSERT(imm != INVALID_IMM);
+
+ if (local_size < 4 * 4096) {
+ if (local_size > 2 * 4096) {
+ FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1)));
+ FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm));
+ local_size -= 4096;
+ }
+
+ if (local_size > 2 * 4096) {
+ FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1)));
+ FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm));
+ local_size -= 4096;
+ }
+
+ FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1)));
+ local_size -= 4096;
+
+ SLJIT_ASSERT(local_size > 0);
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, SLJIT_R3, (local_size >> 12) - 1));
+ FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1)));
+ FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm));
+ SLJIT_ASSERT(reg_map[SLJIT_R3] < 7);
+ FAIL_IF(push_inst16(compiler, SUBSI8 | RDN3(SLJIT_R3) | 1));
+ FAIL_IF(push_inst16(compiler, BCC | (0x1 << 8) /* not-equal */ | (-7 & 0xff)));
+
+ local_size &= 0xfff;
+
+ if (local_size != 0)
+ FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1)));
+ }
+
+ if (local_size >= 256) {
+ imm = get_imm(local_size & ~0xff);
+ SLJIT_ASSERT(imm != INVALID_IMM);
+
+ FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm));
+ }
+ }
+
+ local_size &= 0xff;
+ FAIL_IF(push_inst32(compiler, LDRI | 0x400 | (local_size > 0 ? 0x100 : 0) | RT4(TMP_REG2) | RN4(TMP_REG1) | local_size));
+
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_SP, TMP_REG1)));
+ }
+ else if (local_size > 0)
+ FAIL_IF(push_inst32(compiler, LDRI | 0x500 | RT4(TMP_REG1) | RN4(SLJIT_SP) | local_size));
+#endif
+
return SLJIT_SUCCESS;
}
@@ -1119,11 +1196,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp
/* Operators */
/* --------------------------------------------------------------------- */
+#if !(defined __ARM_FEATURE_IDIV) && !(defined __ARM_ARCH_EXT_IDIV__)
+
#ifdef __cplusplus
extern "C" {
#endif
-#if defined(__GNUC__)
+#ifdef _WIN32
+extern unsigned long long __rt_udiv(unsigned int denominator, unsigned int numerator);
+extern long long __rt_sdiv(int denominator, int numerator);
+#elif defined(__GNUC__)
extern unsigned int __aeabi_uidivmod(unsigned int numerator, int unsigned denominator);
extern int __aeabi_idivmod(int numerator, int denominator);
#else
@@ -1134,10 +1216,14 @@ extern int __aeabi_idivmod(int numerator, int denominator);
}
#endif
+#endif /* !__ARM_FEATURE_IDIV && !__ARM_ARCH_EXT_IDIV__ */
+
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
{
+#if !(defined __ARM_FEATURE_IDIV) && !(defined __ARM_ARCH_EXT_IDIV__)
sljit_sw saved_reg_list[3];
sljit_sw saved_reg_count;
+#endif
CHECK_ERROR();
CHECK(check_sljit_emit_op0(compiler, op));
@@ -1155,6 +1241,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
| (reg_map[SLJIT_R0] << 12)
| (reg_map[SLJIT_R0] << 16)
| reg_map[SLJIT_R1]);
+#if (defined __ARM_FEATURE_IDIV) || (defined __ARM_ARCH_EXT_IDIV__)
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG1, SLJIT_R0)));
+ FAIL_IF(push_inst32(compiler, (op == SLJIT_DIVMOD_UW ? UDIV : SDIV) | RD4(SLJIT_R0) | RN4(SLJIT_R0) | RM4(SLJIT_R1)));
+ FAIL_IF(push_inst32(compiler, MUL | RD4(SLJIT_R1) | RN4(SLJIT_R0) | RM4(SLJIT_R1)));
+ return push_inst32(compiler, SUB_W | RD4(SLJIT_R1) | RN4(TMP_REG1) | RM4(SLJIT_R1));
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ return push_inst32(compiler, (op == SLJIT_DIV_UW ? UDIV : SDIV) | RD4(SLJIT_R0) | RN4(SLJIT_R0) | RM4(SLJIT_R1));
+#else /* !__ARM_FEATURE_IDIV && !__ARM_ARCH_EXT_IDIV__ */
case SLJIT_DIVMOD_UW:
case SLJIT_DIVMOD_SW:
case SLJIT_DIV_UW:
@@ -1183,7 +1280,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
}
}
-#if defined(__GNUC__)
+#ifdef _WIN32
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG1, SLJIT_R0)));
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_R0, SLJIT_R1)));
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_R1, TMP_REG1)));
+ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
+ ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__rt_udiv) : SLJIT_FUNC_OFFSET(__rt_sdiv))));
+#elif defined(__GNUC__)
FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
#else
@@ -1203,6 +1306,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
| (saved_reg_list[0] << 12) /* ldr rX, [sp], #8/16 */);
}
return SLJIT_SUCCESS;
+#endif /* __ARM_FEATURE_IDIV || __ARM_ARCH_EXT_IDIV__ */
}
return SLJIT_SUCCESS;
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c
index 9f9e157a05..094c9923bc 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c
@@ -448,7 +448,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t
sljit_ins ins = NOP;
sljit_u8 offsets[4];
- SLJIT_ASSERT(reg_map[TMP_REG3] == 4 && freg_map[TMP_FREG1] == 12);
+ SLJIT_ASSERT(reg_map[TMP_REG1] == 4 && freg_map[TMP_FREG1] == 12);
arg_types >>= SLJIT_DEF_SHIFT;
@@ -516,7 +516,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t
else if (arg_count != word_arg_count)
ins = ADDU | S(word_arg_count) | TA(0) | DA(4 + (offsets[arg_count - 1] >> 2));
else if (arg_count == 1)
- ins = ADDU | S(SLJIT_R0) | TA(0) | D(TMP_REG3);
+ ins = ADDU | S(SLJIT_R0) | TA(0) | DA(4);
arg_count--;
word_arg_count--;
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c
index ff6f048659..f841aef5dd 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c
@@ -547,7 +547,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t
sljit_ins prev_ins = NOP;
sljit_ins ins = NOP;
- SLJIT_ASSERT(reg_map[TMP_REG3] == 4 && freg_map[TMP_FREG1] == 12);
+ SLJIT_ASSERT(reg_map[TMP_REG1] == 4 && freg_map[TMP_FREG1] == 12);
arg_types >>= SLJIT_DEF_SHIFT;
@@ -591,7 +591,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t
if (arg_count != word_arg_count)
ins = DADDU | S(word_arg_count) | TA(0) | D(arg_count);
else if (arg_count == 1)
- ins = DADDU | S(SLJIT_R0) | TA(0) | D(TMP_REG3);
+ ins = DADDU | S(SLJIT_R0) | TA(0) | DA(4);
arg_count--;
word_arg_count--;
break;
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c
index e108433f70..894e21304b 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c
@@ -57,14 +57,14 @@ typedef sljit_u32 sljit_ins;
#define RETURN_ADDR_REG 31
/* Flags are kept in volatile registers. */
-#define EQUAL_FLAG 31
+#define EQUAL_FLAG 3
#define OTHER_FLAG 1
#define TMP_FREG1 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
#define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2)
static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = {
- 0, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29, 3, 25, 4
+ 0, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29, 4, 25, 31
};
#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
@@ -612,16 +612,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
/* Frequent case. */
FAIL_IF(push_inst(compiler, ADDIU_W | S(SLJIT_SP) | T(SLJIT_SP) | IMM(-local_size), DR(SLJIT_SP)));
base = S(SLJIT_SP);
+ offs = local_size - (sljit_sw)sizeof(sljit_sw);
}
else {
- FAIL_IF(load_immediate(compiler, DR(TMP_REG1), local_size));
+ FAIL_IF(load_immediate(compiler, DR(OTHER_FLAG), local_size));
FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_SP) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
- FAIL_IF(push_inst(compiler, SUBU_W | S(SLJIT_SP) | T(TMP_REG1) | D(SLJIT_SP), DR(SLJIT_SP)));
+ FAIL_IF(push_inst(compiler, SUBU_W | S(SLJIT_SP) | T(OTHER_FLAG) | D(SLJIT_SP), DR(SLJIT_SP)));
base = S(TMP_REG2);
local_size = 0;
+ offs = -(sljit_sw)sizeof(sljit_sw);
}
- offs = local_size - (sljit_sw)(sizeof(sljit_sw));
FAIL_IF(push_inst(compiler, STACK_STORE | base | TA(RETURN_ADDR_REG) | IMM(offs), MOVABLE_INS));
tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
@@ -805,7 +806,8 @@ static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sl
if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) {
tmp_ar = reg_ar;
delay_slot = reg_ar;
- } else {
+ }
+ else {
tmp_ar = DR(TMP_REG1);
delay_slot = MOVABLE_INS;
}
@@ -881,11 +883,39 @@ static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sl
static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw)
{
+ sljit_s32 tmp_ar, base, delay_slot;
+
if (getput_arg_fast(compiler, flags, reg_ar, arg, argw))
return compiler->error;
- compiler->cache_arg = 0;
- compiler->cache_argw = 0;
- return getput_arg(compiler, flags, reg_ar, arg, argw, 0, 0);
+
+ if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) {
+ tmp_ar = reg_ar;
+ delay_slot = reg_ar;
+ }
+ else {
+ tmp_ar = DR(TMP_REG1);
+ delay_slot = MOVABLE_INS;
+ }
+ base = arg & REG_MASK;
+
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ argw &= 0x3;
+
+ if (SLJIT_UNLIKELY(argw)) {
+ FAIL_IF(push_inst(compiler, SLL_W | T(OFFS_REG(arg)) | DA(tmp_ar) | SH_IMM(argw), tmp_ar));
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | TA(tmp_ar) | DA(tmp_ar), tmp_ar));
+ }
+ else
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(OFFS_REG(arg)) | DA(tmp_ar), tmp_ar));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_slot);
+ }
+
+ FAIL_IF(load_immediate(compiler, tmp_ar, argw));
+
+ if (base != 0)
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | TA(tmp_ar) | DA(tmp_ar), tmp_ar));
+
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_slot);
}
static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c
index 8a83e273a4..074e64b9f2 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c
@@ -123,34 +123,38 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
if (args > 0) {
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | reg_map[SLJIT_R2];
+ inst[0] = MOV_r_rm;
+ inst[1] = MOD_REG | (reg_map[SLJIT_S0] << 3) | reg_map[SLJIT_R2];
+ inst += 2;
}
if (args > 1) {
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_map[SLJIT_S1] << 3) | reg_map[SLJIT_R1];
+ inst[0] = MOV_r_rm;
+ inst[1] = MOD_REG | (reg_map[SLJIT_S1] << 3) | reg_map[SLJIT_R1];
+ inst += 2;
}
if (args > 2) {
- *inst++ = MOV_r_rm;
- *inst++ = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | 0x4 /* esp */;
- *inst++ = 0x24;
- *inst++ = sizeof(sljit_sw) * (3 + 2); /* saveds >= 3 as well. */
+ inst[0] = MOV_r_rm;
+ inst[1] = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | 0x4 /* esp */;
+ inst[2] = 0x24;
+ inst[3] = sizeof(sljit_sw) * (3 + 2); /* saveds >= 3 as well. */
}
#else
if (args > 0) {
- *inst++ = MOV_r_rm;
- *inst++ = MOD_DISP8 | (reg_map[SLJIT_S0] << 3) | reg_map[TMP_REG1];
- *inst++ = sizeof(sljit_sw) * 2;
+ inst[0] = MOV_r_rm;
+ inst[1] = MOD_DISP8 | (reg_map[SLJIT_S0] << 3) | reg_map[TMP_REG1];
+ inst[2] = sizeof(sljit_sw) * 2;
+ inst += 3;
}
if (args > 1) {
- *inst++ = MOV_r_rm;
- *inst++ = MOD_DISP8 | (reg_map[SLJIT_S1] << 3) | reg_map[TMP_REG1];
- *inst++ = sizeof(sljit_sw) * 3;
+ inst[0] = MOV_r_rm;
+ inst[1] = MOD_DISP8 | (reg_map[SLJIT_S1] << 3) | reg_map[TMP_REG1];
+ inst[2] = sizeof(sljit_sw) * 3;
+ inst += 3;
}
if (args > 2) {
- *inst++ = MOV_r_rm;
- *inst++ = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | reg_map[TMP_REG1];
- *inst++ = sizeof(sljit_sw) * 4;
+ inst[0] = MOV_r_rm;
+ inst[1] = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | reg_map[TMP_REG1];
+ inst[2] = sizeof(sljit_sw) * 4;
}
#endif
@@ -170,17 +174,36 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
compiler->local_size = local_size;
#ifdef _WIN32
- if (local_size > 1024) {
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
- FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size));
-#else
- /* Space for a single argument. This amount is excluded when the stack is allocated below. */
- local_size -= sizeof(sljit_sw);
- FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size));
- FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB),
- SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, sizeof(sljit_sw)));
-#endif
- FAIL_IF(sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARG1(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
+ if (local_size > 0) {
+ if (local_size <= 4 * 4096) {
+ if (local_size > 4096)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096);
+ if (local_size > 2 * 4096)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 2);
+ if (local_size > 3 * 4096)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 3);
+ }
+ else {
+ EMIT_MOV(compiler, SLJIT_R0, 0, SLJIT_SP, 0);
+ EMIT_MOV(compiler, SLJIT_R1, 0, SLJIT_IMM, (local_size - 1) >> 12);
+
+ SLJIT_ASSERT (reg_map[SLJIT_R0] == 0);
+
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_R0), -4096);
+ FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB),
+ SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 4096));
+ FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB),
+ SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1));
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2);
+ FAIL_IF(!inst);
+
+ INC_SIZE(2);
+ inst[0] = JNE_i8;
+ inst[1] = (sljit_s8) -16;
+ }
+
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -local_size);
}
#endif
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c
index 635ebd087c..8506565614 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c
@@ -83,6 +83,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size);
+ compiler->mode32 = 0;
+
#ifdef _WIN64
/* Two/four register slots for parameters plus space for xmm6 register if needed. */
if (fscratches >= 6 || fsaveds >= 1)
@@ -126,35 +128,39 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
#ifndef _WIN64
if (args > 0) {
- *inst++ = REX_W;
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x7 /* rdi */;
+ inst[0] = REX_W;
+ inst[1] = MOV_r_rm;
+ inst[2] = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x7 /* rdi */;
+ inst += 3;
}
if (args > 1) {
- *inst++ = REX_W | REX_R;
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_lmap[SLJIT_S1] << 3) | 0x6 /* rsi */;
+ inst[0] = REX_W | REX_R;
+ inst[1] = MOV_r_rm;
+ inst[2] = MOD_REG | (reg_lmap[SLJIT_S1] << 3) | 0x6 /* rsi */;
+ inst += 3;
}
if (args > 2) {
- *inst++ = REX_W | REX_R;
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_lmap[SLJIT_S2] << 3) | 0x2 /* rdx */;
+ inst[0] = REX_W | REX_R;
+ inst[1] = MOV_r_rm;
+ inst[2] = MOD_REG | (reg_lmap[SLJIT_S2] << 3) | 0x2 /* rdx */;
}
#else
if (args > 0) {
- *inst++ = REX_W;
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x1 /* rcx */;
+ inst[0] = REX_W;
+ inst[1] = MOV_r_rm;
+ inst[2] = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x1 /* rcx */;
+ inst += 3;
}
if (args > 1) {
- *inst++ = REX_W;
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_map[SLJIT_S1] << 3) | 0x2 /* rdx */;
+ inst[0] = REX_W;
+ inst[1] = MOV_r_rm;
+ inst[2] = MOD_REG | (reg_map[SLJIT_S1] << 3) | 0x2 /* rdx */;
+ inst += 3;
}
if (args > 2) {
- *inst++ = REX_W | REX_B;
- *inst++ = MOV_r_rm;
- *inst++ = MOD_REG | (reg_map[SLJIT_S2] << 3) | 0x0 /* r8 */;
+ inst[0] = REX_W | REX_B;
+ inst[1] = MOV_r_rm;
+ inst[2] = MOD_REG | (reg_map[SLJIT_S2] << 3) | 0x0 /* r8 */;
}
#endif
}
@@ -163,58 +169,42 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
compiler->local_size = local_size;
#ifdef _WIN64
- if (local_size > 1024) {
- /* Allocate stack for the callback, which grows the stack. */
- inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + (3 + sizeof(sljit_s32)));
- FAIL_IF(!inst);
- INC_SIZE(4 + (3 + sizeof(sljit_s32)));
- *inst++ = REX_W;
- *inst++ = GROUP_BINARY_83;
- *inst++ = MOD_REG | SUB | reg_map[SLJIT_SP];
- /* Allocated size for registers must be divisible by 8. */
- SLJIT_ASSERT(!(saved_register_size & 0x7));
- /* Aligned to 16 byte. */
- if (saved_register_size & 0x8) {
- *inst++ = 5 * sizeof(sljit_sw);
- local_size -= 5 * sizeof(sljit_sw);
- } else {
- *inst++ = 4 * sizeof(sljit_sw);
- local_size -= 4 * sizeof(sljit_sw);
- }
- /* Second instruction */
- SLJIT_ASSERT(reg_map[SLJIT_R0] < 8);
- *inst++ = REX_W;
- *inst++ = MOV_rm_i32;
- *inst++ = MOD_REG | reg_lmap[SLJIT_R0];
- sljit_unaligned_store_s32(inst, local_size);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
- || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
- compiler->skip_checks = 1;
-#endif
- FAIL_IF(sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARG1(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
- }
-#endif
-
if (local_size > 0) {
- if (local_size <= 127) {
- inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
- FAIL_IF(!inst);
- INC_SIZE(4);
- *inst++ = REX_W;
- *inst++ = GROUP_BINARY_83;
- *inst++ = MOD_REG | SUB | reg_map[SLJIT_SP];
- *inst++ = local_size;
+ if (local_size <= 4 * 4096) {
+ if (local_size > 4096)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096);
+ if (local_size > 2 * 4096)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 2);
+ if (local_size > 3 * 4096)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 3);
}
else {
- inst = (sljit_u8*)ensure_buf(compiler, 1 + 7);
+ EMIT_MOV(compiler, SLJIT_R0, 0, SLJIT_SP, 0);
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, (local_size - 1) >> 12);
+
+ SLJIT_ASSERT (reg_map[SLJIT_R0] == 0);
+
+ EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_MEM1(SLJIT_R0), -4096);
+ FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB),
+ SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 4096));
+ FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB),
+ TMP_REG1, 0, TMP_REG1, 0, SLJIT_IMM, 1));
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2);
FAIL_IF(!inst);
- INC_SIZE(7);
- *inst++ = REX_W;
- *inst++ = GROUP_BINARY_81;
- *inst++ = MOD_REG | SUB | reg_map[SLJIT_SP];
- sljit_unaligned_store_s32(inst, local_size);
- inst += sizeof(sljit_s32);
+
+ INC_SIZE(2);
+ inst[0] = JNE_i8;
+ inst[1] = (sljit_s8) -19;
}
+
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -local_size);
+ }
+#endif
+
+ if (local_size > 0) {
+ FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB),
+ SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size));
}
#ifdef _WIN64
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c
index ab7b36adb2..6f02ee3e8b 100644
--- a/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c
+++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c
@@ -669,23 +669,6 @@ static SLJIT_INLINE sljit_s32 emit_sse2_store(struct sljit_compiler *compiler,
static SLJIT_INLINE sljit_s32 emit_sse2_load(struct sljit_compiler *compiler,
sljit_s32 single, sljit_s32 dst, sljit_s32 src, sljit_sw srcw);
-#ifdef _WIN32
-#include <malloc.h>
-
-static void SLJIT_FUNC sljit_grow_stack(sljit_sw local_size)
-{
- /* Workaround for calling the internal _chkstk() function on Windows.
- This function touches all 4k pages belongs to the requested stack space,
- which size is passed in local_size. This is necessary on Windows where
- the stack can only grow in 4k steps. However, this function just burn
- CPU cycles if the stack is large enough. However, you don't know it in
- advance, so it must always be called. I think this is a bad design in
- general even if it has some reasons. */
- *(volatile sljit_s32*)alloca(local_size) = 0;
-}
-
-#endif
-
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
#include "sljitNativeX86_32.c"
#else
diff --git a/thirdparty/rtaudio/RtAudio.cpp b/thirdparty/rtaudio/RtAudio.cpp
deleted file mode 100644
index 04159776f7..0000000000
--- a/thirdparty/rtaudio/RtAudio.cpp
+++ /dev/null
@@ -1,10232 +0,0 @@
-#ifdef RTAUDIO_ENABLED // -GODOT-
-
-/************************************************************************/
-/*! \class RtAudio
- \brief Realtime audio i/o C++ classes.
-
- RtAudio provides a common API (Application Programming Interface)
- for realtime audio input/output across Linux (native ALSA, Jack,
- and OSS), Macintosh OS X (CoreAudio and Jack), and Windows
- (DirectSound, ASIO and WASAPI) operating systems.
-
- RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/
-
- RtAudio: realtime audio i/o C++ classes
- Copyright (c) 2001-2016 Gary P. Scavone
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- Any person wishing to distribute modifications to the Software is
- asked to send the modifications to the original developer so that
- they can be incorporated into the canonical version. This is,
- however, not a binding provision of this license.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-/************************************************************************/
-
-// RtAudio: Version 4.1.2
-
-#include "RtAudio.h"
-#include <iostream>
-#include <cstdlib>
-#include <cstring>
-#include <climits>
-#include <algorithm>
-
-// Static variable definitions.
-const unsigned int RtApi::MAX_SAMPLE_RATES = 14;
-const unsigned int RtApi::SAMPLE_RATES[] = {
- 4000, 5512, 8000, 9600, 11025, 16000, 22050,
- 32000, 44100, 48000, 88200, 96000, 176400, 192000
-};
-
-#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__)
- #define MUTEX_INITIALIZE(A) InitializeCriticalSection(A)
- #define MUTEX_DESTROY(A) DeleteCriticalSection(A)
- #define MUTEX_LOCK(A) EnterCriticalSection(A)
- #define MUTEX_UNLOCK(A) LeaveCriticalSection(A)
-
- #include "tchar.h"
-
- static std::string convertCharPointerToStdString(const char *text)
- {
- return std::string(text);
- }
-
- static std::string convertCharPointerToStdString(const wchar_t *text)
- {
- int length = WideCharToMultiByte(CP_UTF8, 0, text, -1, NULL, 0, NULL, NULL);
- std::string s( length-1, '\0' );
- WideCharToMultiByte(CP_UTF8, 0, text, -1, &s[0], length, NULL, NULL);
- return s;
- }
-
-#elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)
- // pthread API
- #define MUTEX_INITIALIZE(A) pthread_mutex_init(A, NULL)
- #define MUTEX_DESTROY(A) pthread_mutex_destroy(A)
- #define MUTEX_LOCK(A) pthread_mutex_lock(A)
- #define MUTEX_UNLOCK(A) pthread_mutex_unlock(A)
-#else
- #define MUTEX_INITIALIZE(A) abs(*A) // dummy definitions
- #define MUTEX_DESTROY(A) abs(*A) // dummy definitions
-#endif
-
-// *************************************************** //
-//
-// RtAudio definitions.
-//
-// *************************************************** //
-
-std::string RtAudio :: getVersion( void ) throw()
-{
- return RTAUDIO_VERSION;
-}
-
-void RtAudio :: getCompiledApi( std::vector<RtAudio::Api> &apis ) throw()
-{
- apis.clear();
-
- // The order here will control the order of RtAudio's API search in
- // the constructor.
-#if defined(__UNIX_JACK__)
- apis.push_back( UNIX_JACK );
-#endif
-#if defined(__LINUX_ALSA__)
- apis.push_back( LINUX_ALSA );
-#endif
-#if defined(__LINUX_PULSE__)
- apis.push_back( LINUX_PULSE );
-#endif
-#if defined(__LINUX_OSS__)
- apis.push_back( LINUX_OSS );
-#endif
-#if defined(__WINDOWS_ASIO__)
- apis.push_back( WINDOWS_ASIO );
-#endif
-#if defined(__WINDOWS_WASAPI__)
- apis.push_back( WINDOWS_WASAPI );
-#endif
-#if defined(__WINDOWS_DS__)
- apis.push_back( WINDOWS_DS );
-#endif
-#if defined(__MACOSX_CORE__)
- apis.push_back( MACOSX_CORE );
-#endif
-#if defined(__RTAUDIO_DUMMY__)
- apis.push_back( RTAUDIO_DUMMY );
-#endif
-}
-
-void RtAudio :: openRtApi( RtAudio::Api api )
-{
- if ( rtapi_ )
- delete rtapi_;
- rtapi_ = 0;
-
-#if defined(__UNIX_JACK__)
- if ( api == UNIX_JACK )
- rtapi_ = new RtApiJack();
-#endif
-#if defined(__LINUX_ALSA__)
- if ( api == LINUX_ALSA )
- rtapi_ = new RtApiAlsa();
-#endif
-#if defined(__LINUX_PULSE__)
- if ( api == LINUX_PULSE )
- rtapi_ = new RtApiPulse();
-#endif
-#if defined(__LINUX_OSS__)
- if ( api == LINUX_OSS )
- rtapi_ = new RtApiOss();
-#endif
-#if defined(__WINDOWS_ASIO__)
- if ( api == WINDOWS_ASIO )
- rtapi_ = new RtApiAsio();
-#endif
-#if defined(__WINDOWS_WASAPI__)
- if ( api == WINDOWS_WASAPI )
- rtapi_ = new RtApiWasapi();
-#endif
-#if defined(__WINDOWS_DS__)
- if ( api == WINDOWS_DS )
- rtapi_ = new RtApiDs();
-#endif
-#if defined(__MACOSX_CORE__)
- if ( api == MACOSX_CORE )
- rtapi_ = new RtApiCore();
-#endif
-#if defined(__RTAUDIO_DUMMY__)
- if ( api == RTAUDIO_DUMMY )
- rtapi_ = new RtApiDummy();
-#endif
-}
-
-RtAudio :: RtAudio( RtAudio::Api api )
-{
- rtapi_ = 0;
-
- if ( api != UNSPECIFIED ) {
- // Attempt to open the specified API.
- openRtApi( api );
- if ( rtapi_ ) return;
-
- // No compiled support for specified API value. Issue a debug
- // warning and continue as if no API was specified.
- std::cerr << "\nRtAudio: no compiled support for specified API argument!\n" << std::endl;
- }
-
- // Iterate through the compiled APIs and return as soon as we find
- // one with at least one device or we reach the end of the list.
- std::vector< RtAudio::Api > apis;
- getCompiledApi( apis );
- for ( unsigned int i=0; i<apis.size(); i++ ) {
- openRtApi( apis[i] );
- if ( rtapi_ && rtapi_->getDeviceCount() ) break;
- }
-
- if ( rtapi_ ) return;
-
- // It should not be possible to get here because the preprocessor
- // definition __RTAUDIO_DUMMY__ is automatically defined if no
- // API-specific definitions are passed to the compiler. But just in
- // case something weird happens, we'll thow an error.
- std::string errorText = "\nRtAudio: no compiled API support found ... critical error!!\n\n";
- throw( RtAudioError( errorText, RtAudioError::UNSPECIFIED ) );
-}
-
-RtAudio :: ~RtAudio() throw()
-{
- if ( rtapi_ )
- delete rtapi_;
-}
-
-void RtAudio :: openStream( RtAudio::StreamParameters *outputParameters,
- RtAudio::StreamParameters *inputParameters,
- RtAudioFormat format, unsigned int sampleRate,
- unsigned int *bufferFrames,
- RtAudioCallback callback, void *userData,
- RtAudio::StreamOptions *options,
- RtAudioErrorCallback errorCallback )
-{
- return rtapi_->openStream( outputParameters, inputParameters, format,
- sampleRate, bufferFrames, callback,
- userData, options, errorCallback );
-}
-
-// *************************************************** //
-//
-// Public RtApi definitions (see end of file for
-// private or protected utility functions).
-//
-// *************************************************** //
-
-RtApi :: RtApi()
-{
- stream_.state = STREAM_CLOSED;
- stream_.mode = UNINITIALIZED;
- stream_.apiHandle = 0;
- stream_.userBuffer[0] = 0;
- stream_.userBuffer[1] = 0;
- MUTEX_INITIALIZE( &stream_.mutex );
- showWarnings_ = true;
- firstErrorOccurred_ = false;
-}
-
-RtApi :: ~RtApi()
-{
- MUTEX_DESTROY( &stream_.mutex );
-}
-
-void RtApi :: openStream( RtAudio::StreamParameters *oParams,
- RtAudio::StreamParameters *iParams,
- RtAudioFormat format, unsigned int sampleRate,
- unsigned int *bufferFrames,
- RtAudioCallback callback, void *userData,
- RtAudio::StreamOptions *options,
- RtAudioErrorCallback errorCallback )
-{
- if ( stream_.state != STREAM_CLOSED ) {
- errorText_ = "RtApi::openStream: a stream is already open!";
- error( RtAudioError::INVALID_USE );
- return;
- }
-
- // Clear stream information potentially left from a previously open stream.
- clearStreamInfo();
-
- if ( oParams && oParams->nChannels < 1 ) {
- errorText_ = "RtApi::openStream: a non-NULL output StreamParameters structure cannot have an nChannels value less than one.";
- error( RtAudioError::INVALID_USE );
- return;
- }
-
- if ( iParams && iParams->nChannels < 1 ) {
- errorText_ = "RtApi::openStream: a non-NULL input StreamParameters structure cannot have an nChannels value less than one.";
- error( RtAudioError::INVALID_USE );
- return;
- }
-
- if ( oParams == NULL && iParams == NULL ) {
- errorText_ = "RtApi::openStream: input and output StreamParameters structures are both NULL!";
- error( RtAudioError::INVALID_USE );
- return;
- }
-
- if ( formatBytes(format) == 0 ) {
- errorText_ = "RtApi::openStream: 'format' parameter value is undefined.";
- error( RtAudioError::INVALID_USE );
- return;
- }
-
- unsigned int nDevices = getDeviceCount();
- unsigned int oChannels = 0;
- if ( oParams ) {
- oChannels = oParams->nChannels;
- if ( oParams->deviceId >= nDevices ) {
- errorText_ = "RtApi::openStream: output device parameter value is invalid.";
- error( RtAudioError::INVALID_USE );
- return;
- }
- }
-
- unsigned int iChannels = 0;
- if ( iParams ) {
- iChannels = iParams->nChannels;
- if ( iParams->deviceId >= nDevices ) {
- errorText_ = "RtApi::openStream: input device parameter value is invalid.";
- error( RtAudioError::INVALID_USE );
- return;
- }
- }
-
- bool result;
-
- if ( oChannels > 0 ) {
-
- result = probeDeviceOpen( oParams->deviceId, OUTPUT, oChannels, oParams->firstChannel,
- sampleRate, format, bufferFrames, options );
- if ( result == false ) {
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- }
-
- if ( iChannels > 0 ) {
-
- result = probeDeviceOpen( iParams->deviceId, INPUT, iChannels, iParams->firstChannel,
- sampleRate, format, bufferFrames, options );
- if ( result == false ) {
- if ( oChannels > 0 ) closeStream();
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- }
-
- stream_.callbackInfo.callback = (void *) callback;
- stream_.callbackInfo.userData = userData;
- stream_.callbackInfo.errorCallback = (void *) errorCallback;
-
- if ( options ) options->numberOfBuffers = stream_.nBuffers;
- stream_.state = STREAM_STOPPED;
-}
-
-unsigned int RtApi :: getDefaultInputDevice( void )
-{
- // Should be implemented in subclasses if possible.
- return 0;
-}
-
-unsigned int RtApi :: getDefaultOutputDevice( void )
-{
- // Should be implemented in subclasses if possible.
- return 0;
-}
-
-void RtApi :: closeStream( void )
-{
- // MUST be implemented in subclasses!
- return;
-}
-
-bool RtApi :: probeDeviceOpen( unsigned int /*device*/, StreamMode /*mode*/, unsigned int /*channels*/,
- unsigned int /*firstChannel*/, unsigned int /*sampleRate*/,
- RtAudioFormat /*format*/, unsigned int * /*bufferSize*/,
- RtAudio::StreamOptions * /*options*/ )
-{
- // MUST be implemented in subclasses!
- return FAILURE;
-}
-
-void RtApi :: tickStreamTime( void )
-{
- // Subclasses that do not provide their own implementation of
- // getStreamTime should call this function once per buffer I/O to
- // provide basic stream time support.
-
- stream_.streamTime += ( stream_.bufferSize * 1.0 / stream_.sampleRate );
-
-#if defined( HAVE_GETTIMEOFDAY )
- gettimeofday( &stream_.lastTickTimestamp, NULL );
-#endif
-}
-
-long RtApi :: getStreamLatency( void )
-{
- verifyStream();
-
- long totalLatency = 0;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX )
- totalLatency = stream_.latency[0];
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX )
- totalLatency += stream_.latency[1];
-
- return totalLatency;
-}
-
-double RtApi :: getStreamTime( void )
-{
- verifyStream();
-
-#if defined( HAVE_GETTIMEOFDAY )
- // Return a very accurate estimate of the stream time by
- // adding in the elapsed time since the last tick.
- struct timeval then;
- struct timeval now;
-
- if ( stream_.state != STREAM_RUNNING || stream_.streamTime == 0.0 )
- return stream_.streamTime;
-
- gettimeofday( &now, NULL );
- then = stream_.lastTickTimestamp;
- return stream_.streamTime +
- ((now.tv_sec + 0.000001 * now.tv_usec) -
- (then.tv_sec + 0.000001 * then.tv_usec));
-#else
- return stream_.streamTime;
-#endif
-}
-
-void RtApi :: setStreamTime( double time )
-{
- verifyStream();
-
- if ( time >= 0.0 )
- stream_.streamTime = time;
-}
-
-unsigned int RtApi :: getStreamSampleRate( void )
-{
- verifyStream();
-
- return stream_.sampleRate;
-}
-
-
-// *************************************************** //
-//
-// OS/API-specific methods.
-//
-// *************************************************** //
-
-#if defined(__MACOSX_CORE__)
-
-// The OS X CoreAudio API is designed to use a separate callback
-// procedure for each of its audio devices. A single RtAudio duplex
-// stream using two different devices is supported here, though it
-// cannot be guaranteed to always behave correctly because we cannot
-// synchronize these two callbacks.
-//
-// A property listener is installed for over/underrun information.
-// However, no functionality is currently provided to allow property
-// listeners to trigger user handlers because it is unclear what could
-// be done if a critical stream parameter (buffer size, sample rate,
-// device disconnect) notification arrived. The listeners entail
-// quite a bit of extra code and most likely, a user program wouldn't
-// be prepared for the result anyway. However, we do provide a flag
-// to the client callback function to inform of an over/underrun.
-
-// A structure to hold various information related to the CoreAudio API
-// implementation.
-struct CoreHandle {
- AudioDeviceID id[2]; // device ids
-#if defined( MAC_OS_X_VERSION_10_5 ) && ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 )
- AudioDeviceIOProcID procId[2];
-#endif
- UInt32 iStream[2]; // device stream index (or first if using multiple)
- UInt32 nStreams[2]; // number of streams to use
- bool xrun[2];
- char *deviceBuffer;
- pthread_cond_t condition;
- int drainCounter; // Tracks callback counts when draining
- bool internalDrain; // Indicates if stop is initiated from callback or not.
-
- CoreHandle()
- :deviceBuffer(0), drainCounter(0), internalDrain(false) { nStreams[0] = 1; nStreams[1] = 1; id[0] = 0; id[1] = 0; xrun[0] = false; xrun[1] = false; }
-};
-
-RtApiCore:: RtApiCore()
-{
-#if defined( AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER )
- // This is a largely undocumented but absolutely necessary
- // requirement starting with OS-X 10.6. If not called, queries and
- // updates to various audio device properties are not handled
- // correctly.
- CFRunLoopRef theRunLoop = NULL;
- AudioObjectPropertyAddress property = { kAudioHardwarePropertyRunLoop,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster };
- OSStatus result = AudioObjectSetPropertyData( kAudioObjectSystemObject, &property, 0, NULL, sizeof(CFRunLoopRef), &theRunLoop);
- if ( result != noErr ) {
- errorText_ = "RtApiCore::RtApiCore: error setting run loop property!";
- error( RtAudioError::WARNING );
- }
-#endif
-}
-
-RtApiCore :: ~RtApiCore()
-{
- // The subclass destructor gets called before the base class
- // destructor, so close an existing stream before deallocating
- // apiDeviceId memory.
- if ( stream_.state != STREAM_CLOSED ) closeStream();
-}
-
-unsigned int RtApiCore :: getDeviceCount( void )
-{
- // Find out how many audio devices there are, if any.
- UInt32 dataSize;
- AudioObjectPropertyAddress propertyAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
- OSStatus result = AudioObjectGetPropertyDataSize( kAudioObjectSystemObject, &propertyAddress, 0, NULL, &dataSize );
- if ( result != noErr ) {
- errorText_ = "RtApiCore::getDeviceCount: OS-X error getting device info!";
- error( RtAudioError::WARNING );
- return 0;
- }
-
- return dataSize / sizeof( AudioDeviceID );
-}
-
-unsigned int RtApiCore :: getDefaultInputDevice( void )
-{
- unsigned int nDevices = getDeviceCount();
- if ( nDevices <= 1 ) return 0;
-
- AudioDeviceID id;
- UInt32 dataSize = sizeof( AudioDeviceID );
- AudioObjectPropertyAddress property = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
- OSStatus result = AudioObjectGetPropertyData( kAudioObjectSystemObject, &property, 0, NULL, &dataSize, &id );
- if ( result != noErr ) {
- errorText_ = "RtApiCore::getDefaultInputDevice: OS-X system error getting device.";
- error( RtAudioError::WARNING );
- return 0;
- }
-
- dataSize *= nDevices;
- AudioDeviceID deviceList[ nDevices ];
- property.mSelector = kAudioHardwarePropertyDevices;
- result = AudioObjectGetPropertyData( kAudioObjectSystemObject, &property, 0, NULL, &dataSize, (void *) &deviceList );
- if ( result != noErr ) {
- errorText_ = "RtApiCore::getDefaultInputDevice: OS-X system error getting device IDs.";
- error( RtAudioError::WARNING );
- return 0;
- }
-
- for ( unsigned int i=0; i<nDevices; i++ )
- if ( id == deviceList[i] ) return i;
-
- errorText_ = "RtApiCore::getDefaultInputDevice: No default device found!";
- error( RtAudioError::WARNING );
- return 0;
-}
-
-unsigned int RtApiCore :: getDefaultOutputDevice( void )
-{
- unsigned int nDevices = getDeviceCount();
- if ( nDevices <= 1 ) return 0;
-
- AudioDeviceID id;
- UInt32 dataSize = sizeof( AudioDeviceID );
- AudioObjectPropertyAddress property = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
- OSStatus result = AudioObjectGetPropertyData( kAudioObjectSystemObject, &property, 0, NULL, &dataSize, &id );
- if ( result != noErr ) {
- errorText_ = "RtApiCore::getDefaultOutputDevice: OS-X system error getting device.";
- error( RtAudioError::WARNING );
- return 0;
- }
-
- dataSize = sizeof( AudioDeviceID ) * nDevices;
- AudioDeviceID deviceList[ nDevices ];
- property.mSelector = kAudioHardwarePropertyDevices;
- result = AudioObjectGetPropertyData( kAudioObjectSystemObject, &property, 0, NULL, &dataSize, (void *) &deviceList );
- if ( result != noErr ) {
- errorText_ = "RtApiCore::getDefaultOutputDevice: OS-X system error getting device IDs.";
- error( RtAudioError::WARNING );
- return 0;
- }
-
- for ( unsigned int i=0; i<nDevices; i++ )
- if ( id == deviceList[i] ) return i;
-
- errorText_ = "RtApiCore::getDefaultOutputDevice: No default device found!";
- error( RtAudioError::WARNING );
- return 0;
-}
-
-RtAudio::DeviceInfo RtApiCore :: getDeviceInfo( unsigned int device )
-{
- RtAudio::DeviceInfo info;
- info.probed = false;
-
- // Get device ID
- unsigned int nDevices = getDeviceCount();
- if ( nDevices == 0 ) {
- errorText_ = "RtApiCore::getDeviceInfo: no devices found!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- if ( device >= nDevices ) {
- errorText_ = "RtApiCore::getDeviceInfo: device ID is invalid!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- AudioDeviceID deviceList[ nDevices ];
- UInt32 dataSize = sizeof( AudioDeviceID ) * nDevices;
- AudioObjectPropertyAddress property = { kAudioHardwarePropertyDevices,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster };
- OSStatus result = AudioObjectGetPropertyData( kAudioObjectSystemObject, &property,
- 0, NULL, &dataSize, (void *) &deviceList );
- if ( result != noErr ) {
- errorText_ = "RtApiCore::getDeviceInfo: OS-X system error getting device IDs.";
- error( RtAudioError::WARNING );
- return info;
- }
-
- AudioDeviceID id = deviceList[ device ];
-
- // Get the device name.
- info.name.erase();
- CFStringRef cfname;
- dataSize = sizeof( CFStringRef );
- property.mSelector = kAudioObjectPropertyManufacturer;
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &cfname );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceInfo: system error (" << getErrorCode( result ) << ") getting device manufacturer.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- //const char *mname = CFStringGetCStringPtr( cfname, CFStringGetSystemEncoding() );
- int length = CFStringGetLength(cfname);
- char *mname = (char *)malloc(length * 3 + 1);
-#if defined( UNICODE ) || defined( _UNICODE )
- CFStringGetCString(cfname, mname, length * 3 + 1, kCFStringEncodingUTF8);
-#else
- CFStringGetCString(cfname, mname, length * 3 + 1, CFStringGetSystemEncoding());
-#endif
- info.name.append( (const char *)mname, strlen(mname) );
- info.name.append( ": " );
- CFRelease( cfname );
- free(mname);
-
- property.mSelector = kAudioObjectPropertyName;
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &cfname );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceInfo: system error (" << getErrorCode( result ) << ") getting device name.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- //const char *name = CFStringGetCStringPtr( cfname, CFStringGetSystemEncoding() );
- length = CFStringGetLength(cfname);
- char *name = (char *)malloc(length * 3 + 1);
-#if defined( UNICODE ) || defined( _UNICODE )
- CFStringGetCString(cfname, name, length * 3 + 1, kCFStringEncodingUTF8);
-#else
- CFStringGetCString(cfname, name, length * 3 + 1, CFStringGetSystemEncoding());
-#endif
- info.name.append( (const char *)name, strlen(name) );
- CFRelease( cfname );
- free(name);
-
- // Get the output stream "configuration".
- AudioBufferList *bufferList = nil;
- property.mSelector = kAudioDevicePropertyStreamConfiguration;
- property.mScope = kAudioDevicePropertyScopeOutput;
- // property.mElement = kAudioObjectPropertyElementWildcard;
- dataSize = 0;
- result = AudioObjectGetPropertyDataSize( id, &property, 0, NULL, &dataSize );
- if ( result != noErr || dataSize == 0 ) {
- errorStream_ << "RtApiCore::getDeviceInfo: system error (" << getErrorCode( result ) << ") getting output stream configuration info for device (" << device << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Allocate the AudioBufferList.
- bufferList = (AudioBufferList *) malloc( dataSize );
- if ( bufferList == NULL ) {
- errorText_ = "RtApiCore::getDeviceInfo: memory error allocating output AudioBufferList.";
- error( RtAudioError::WARNING );
- return info;
- }
-
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, bufferList );
- if ( result != noErr || dataSize == 0 ) {
- free( bufferList );
- errorStream_ << "RtApiCore::getDeviceInfo: system error (" << getErrorCode( result ) << ") getting output stream configuration for device (" << device << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Get output channel information.
- unsigned int i, nStreams = bufferList->mNumberBuffers;
- for ( i=0; i<nStreams; i++ )
- info.outputChannels += bufferList->mBuffers[i].mNumberChannels;
- free( bufferList );
-
- // Get the input stream "configuration".
- property.mScope = kAudioDevicePropertyScopeInput;
- result = AudioObjectGetPropertyDataSize( id, &property, 0, NULL, &dataSize );
- if ( result != noErr || dataSize == 0 ) {
- errorStream_ << "RtApiCore::getDeviceInfo: system error (" << getErrorCode( result ) << ") getting input stream configuration info for device (" << device << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Allocate the AudioBufferList.
- bufferList = (AudioBufferList *) malloc( dataSize );
- if ( bufferList == NULL ) {
- errorText_ = "RtApiCore::getDeviceInfo: memory error allocating input AudioBufferList.";
- error( RtAudioError::WARNING );
- return info;
- }
-
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, bufferList );
- if (result != noErr || dataSize == 0) {
- free( bufferList );
- errorStream_ << "RtApiCore::getDeviceInfo: system error (" << getErrorCode( result ) << ") getting input stream configuration for device (" << device << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Get input channel information.
- nStreams = bufferList->mNumberBuffers;
- for ( i=0; i<nStreams; i++ )
- info.inputChannels += bufferList->mBuffers[i].mNumberChannels;
- free( bufferList );
-
- // If device opens for both playback and capture, we determine the channels.
- if ( info.outputChannels > 0 && info.inputChannels > 0 )
- info.duplexChannels = (info.outputChannels > info.inputChannels) ? info.inputChannels : info.outputChannels;
-
- // Probe the device sample rates.
- bool isInput = false;
- if ( info.outputChannels == 0 ) isInput = true;
-
- // Determine the supported sample rates.
- property.mSelector = kAudioDevicePropertyAvailableNominalSampleRates;
- if ( isInput == false ) property.mScope = kAudioDevicePropertyScopeOutput;
- result = AudioObjectGetPropertyDataSize( id, &property, 0, NULL, &dataSize );
- if ( result != kAudioHardwareNoError || dataSize == 0 ) {
- errorStream_ << "RtApiCore::getDeviceInfo: system error (" << getErrorCode( result ) << ") getting sample rate info.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- UInt32 nRanges = dataSize / sizeof( AudioValueRange );
- AudioValueRange rangeList[ nRanges ];
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &rangeList );
- if ( result != kAudioHardwareNoError ) {
- errorStream_ << "RtApiCore::getDeviceInfo: system error (" << getErrorCode( result ) << ") getting sample rates.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // The sample rate reporting mechanism is a bit of a mystery. It
- // seems that it can either return individual rates or a range of
- // rates. I assume that if the min / max range values are the same,
- // then that represents a single supported rate and if the min / max
- // range values are different, the device supports an arbitrary
- // range of values (though there might be multiple ranges, so we'll
- // use the most conservative range).
- Float64 minimumRate = 1.0, maximumRate = 10000000000.0;
- bool haveValueRange = false;
- info.sampleRates.clear();
- for ( UInt32 i=0; i<nRanges; i++ ) {
- if ( rangeList[i].mMinimum == rangeList[i].mMaximum ) {
- unsigned int tmpSr = (unsigned int) rangeList[i].mMinimum;
- info.sampleRates.push_back( tmpSr );
-
- if ( !info.preferredSampleRate || ( tmpSr <= 48000 && tmpSr > info.preferredSampleRate ) )
- info.preferredSampleRate = tmpSr;
-
- } else {
- haveValueRange = true;
- if ( rangeList[i].mMinimum > minimumRate ) minimumRate = rangeList[i].mMinimum;
- if ( rangeList[i].mMaximum < maximumRate ) maximumRate = rangeList[i].mMaximum;
- }
- }
-
- if ( haveValueRange ) {
- for ( unsigned int k=0; k<MAX_SAMPLE_RATES; k++ ) {
- if ( SAMPLE_RATES[k] >= (unsigned int) minimumRate && SAMPLE_RATES[k] <= (unsigned int) maximumRate ) {
- info.sampleRates.push_back( SAMPLE_RATES[k] );
-
- if ( !info.preferredSampleRate || ( SAMPLE_RATES[k] <= 48000 && SAMPLE_RATES[k] > info.preferredSampleRate ) )
- info.preferredSampleRate = SAMPLE_RATES[k];
- }
- }
- }
-
- // Sort and remove any redundant values
- std::sort( info.sampleRates.begin(), info.sampleRates.end() );
- info.sampleRates.erase( unique( info.sampleRates.begin(), info.sampleRates.end() ), info.sampleRates.end() );
-
- if ( info.sampleRates.size() == 0 ) {
- errorStream_ << "RtApiCore::probeDeviceInfo: No supported sample rates found for device (" << device << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // CoreAudio always uses 32-bit floating point data for PCM streams.
- // Thus, any other "physical" formats supported by the device are of
- // no interest to the client.
- info.nativeFormats = RTAUDIO_FLOAT32;
-
- if ( info.outputChannels > 0 )
- if ( getDefaultOutputDevice() == device ) info.isDefaultOutput = true;
- if ( info.inputChannels > 0 )
- if ( getDefaultInputDevice() == device ) info.isDefaultInput = true;
-
- info.probed = true;
- return info;
-}
-
-static OSStatus callbackHandler( AudioDeviceID inDevice,
- const AudioTimeStamp* /*inNow*/,
- const AudioBufferList* inInputData,
- const AudioTimeStamp* /*inInputTime*/,
- AudioBufferList* outOutputData,
- const AudioTimeStamp* /*inOutputTime*/,
- void* infoPointer )
-{
- CallbackInfo *info = (CallbackInfo *) infoPointer;
-
- RtApiCore *object = (RtApiCore *) info->object;
- if ( object->callbackEvent( inDevice, inInputData, outOutputData ) == false )
- return kAudioHardwareUnspecifiedError;
- else
- return kAudioHardwareNoError;
-}
-
-static OSStatus xrunListener( AudioObjectID /*inDevice*/,
- UInt32 nAddresses,
- const AudioObjectPropertyAddress properties[],
- void* handlePointer )
-{
- CoreHandle *handle = (CoreHandle *) handlePointer;
- for ( UInt32 i=0; i<nAddresses; i++ ) {
- if ( properties[i].mSelector == kAudioDeviceProcessorOverload ) {
- if ( properties[i].mScope == kAudioDevicePropertyScopeInput )
- handle->xrun[1] = true;
- else
- handle->xrun[0] = true;
- }
- }
-
- return kAudioHardwareNoError;
-}
-
-static OSStatus rateListener( AudioObjectID inDevice,
- UInt32 /*nAddresses*/,
- const AudioObjectPropertyAddress /*properties*/[],
- void* ratePointer )
-{
- Float64 *rate = (Float64 *) ratePointer;
- UInt32 dataSize = sizeof( Float64 );
- AudioObjectPropertyAddress property = { kAudioDevicePropertyNominalSampleRate,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster };
- AudioObjectGetPropertyData( inDevice, &property, 0, NULL, &dataSize, rate );
- return kAudioHardwareNoError;
-}
-
-bool RtApiCore :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options )
-{
- // Get device ID
- unsigned int nDevices = getDeviceCount();
- if ( nDevices == 0 ) {
- // This should not happen because a check is made before this function is called.
- errorText_ = "RtApiCore::probeDeviceOpen: no devices found!";
- return FAILURE;
- }
-
- if ( device >= nDevices ) {
- // This should not happen because a check is made before this function is called.
- errorText_ = "RtApiCore::probeDeviceOpen: device ID is invalid!";
- return FAILURE;
- }
-
- AudioDeviceID deviceList[ nDevices ];
- UInt32 dataSize = sizeof( AudioDeviceID ) * nDevices;
- AudioObjectPropertyAddress property = { kAudioHardwarePropertyDevices,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster };
- OSStatus result = AudioObjectGetPropertyData( kAudioObjectSystemObject, &property,
- 0, NULL, &dataSize, (void *) &deviceList );
- if ( result != noErr ) {
- errorText_ = "RtApiCore::probeDeviceOpen: OS-X system error getting device IDs.";
- return FAILURE;
- }
-
- AudioDeviceID id = deviceList[ device ];
-
- // Setup for stream mode.
- bool isInput = false;
- if ( mode == INPUT ) {
- isInput = true;
- property.mScope = kAudioDevicePropertyScopeInput;
- }
- else
- property.mScope = kAudioDevicePropertyScopeOutput;
-
- // Get the stream "configuration".
- AudioBufferList *bufferList = nil;
- dataSize = 0;
- property.mSelector = kAudioDevicePropertyStreamConfiguration;
- result = AudioObjectGetPropertyDataSize( id, &property, 0, NULL, &dataSize );
- if ( result != noErr || dataSize == 0 ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting stream configuration info for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Allocate the AudioBufferList.
- bufferList = (AudioBufferList *) malloc( dataSize );
- if ( bufferList == NULL ) {
- errorText_ = "RtApiCore::probeDeviceOpen: memory error allocating AudioBufferList.";
- return FAILURE;
- }
-
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, bufferList );
- if (result != noErr || dataSize == 0) {
- free( bufferList );
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting stream configuration for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Search for one or more streams that contain the desired number of
- // channels. CoreAudio devices can have an arbitrary number of
- // streams and each stream can have an arbitrary number of channels.
- // For each stream, a single buffer of interleaved samples is
- // provided. RtAudio prefers the use of one stream of interleaved
- // data or multiple consecutive single-channel streams. However, we
- // now support multiple consecutive multi-channel streams of
- // interleaved data as well.
- UInt32 iStream, offsetCounter = firstChannel;
- UInt32 nStreams = bufferList->mNumberBuffers;
- bool monoMode = false;
- bool foundStream = false;
-
- // First check that the device supports the requested number of
- // channels.
- UInt32 deviceChannels = 0;
- for ( iStream=0; iStream<nStreams; iStream++ )
- deviceChannels += bufferList->mBuffers[iStream].mNumberChannels;
-
- if ( deviceChannels < ( channels + firstChannel ) ) {
- free( bufferList );
- errorStream_ << "RtApiCore::probeDeviceOpen: the device (" << device << ") does not support the requested channel count.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Look for a single stream meeting our needs.
- UInt32 firstStream, streamCount = 1, streamChannels = 0, channelOffset = 0;
- for ( iStream=0; iStream<nStreams; iStream++ ) {
- streamChannels = bufferList->mBuffers[iStream].mNumberChannels;
- if ( streamChannels >= channels + offsetCounter ) {
- firstStream = iStream;
- channelOffset = offsetCounter;
- foundStream = true;
- break;
- }
- if ( streamChannels > offsetCounter ) break;
- offsetCounter -= streamChannels;
- }
-
- // If we didn't find a single stream above, then we should be able
- // to meet the channel specification with multiple streams.
- if ( foundStream == false ) {
- monoMode = true;
- offsetCounter = firstChannel;
- for ( iStream=0; iStream<nStreams; iStream++ ) {
- streamChannels = bufferList->mBuffers[iStream].mNumberChannels;
- if ( streamChannels > offsetCounter ) break;
- offsetCounter -= streamChannels;
- }
-
- firstStream = iStream;
- channelOffset = offsetCounter;
- Int32 channelCounter = channels + offsetCounter - streamChannels;
-
- if ( streamChannels > 1 ) monoMode = false;
- while ( channelCounter > 0 ) {
- streamChannels = bufferList->mBuffers[++iStream].mNumberChannels;
- if ( streamChannels > 1 ) monoMode = false;
- channelCounter -= streamChannels;
- streamCount++;
- }
- }
-
- free( bufferList );
-
- // Determine the buffer size.
- AudioValueRange bufferRange;
- dataSize = sizeof( AudioValueRange );
- property.mSelector = kAudioDevicePropertyBufferFrameSizeRange;
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &bufferRange );
-
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting buffer size range for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- if ( bufferRange.mMinimum > *bufferSize ) *bufferSize = (unsigned long) bufferRange.mMinimum;
- else if ( bufferRange.mMaximum < *bufferSize ) *bufferSize = (unsigned long) bufferRange.mMaximum;
- if ( options && options->flags & RTAUDIO_MINIMIZE_LATENCY ) *bufferSize = (unsigned long) bufferRange.mMinimum;
-
- // Set the buffer size. For multiple streams, I'm assuming we only
- // need to make this setting for the master channel.
- UInt32 theSize = (UInt32) *bufferSize;
- dataSize = sizeof( UInt32 );
- property.mSelector = kAudioDevicePropertyBufferFrameSize;
- result = AudioObjectSetPropertyData( id, &property, 0, NULL, dataSize, &theSize );
-
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") setting the buffer size for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // If attempting to setup a duplex stream, the bufferSize parameter
- // MUST be the same in both directions!
- *bufferSize = theSize;
- if ( stream_.mode == OUTPUT && mode == INPUT && *bufferSize != stream_.bufferSize ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error setting buffer size for duplex stream on device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- stream_.bufferSize = *bufferSize;
- stream_.nBuffers = 1;
-
- // Try to set "hog" mode ... it's not clear to me this is working.
- if ( options && options->flags & RTAUDIO_HOG_DEVICE ) {
- pid_t hog_pid;
- dataSize = sizeof( hog_pid );
- property.mSelector = kAudioDevicePropertyHogMode;
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &hog_pid );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting 'hog' state!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- if ( hog_pid != getpid() ) {
- hog_pid = getpid();
- result = AudioObjectSetPropertyData( id, &property, 0, NULL, dataSize, &hog_pid );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") setting 'hog' state!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
- }
-
- // Check and if necessary, change the sample rate for the device.
- Float64 nominalRate;
- dataSize = sizeof( Float64 );
- property.mSelector = kAudioDevicePropertyNominalSampleRate;
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &nominalRate );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting current sample rate.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Only change the sample rate if off by more than 1 Hz.
- if ( fabs( nominalRate - (double)sampleRate ) > 1.0 ) {
-
- // Set a property listener for the sample rate change
- Float64 reportedRate = 0.0;
- AudioObjectPropertyAddress tmp = { kAudioDevicePropertyNominalSampleRate, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
- result = AudioObjectAddPropertyListener( id, &tmp, rateListener, (void *) &reportedRate );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") setting sample rate property listener for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- nominalRate = (Float64) sampleRate;
- result = AudioObjectSetPropertyData( id, &property, 0, NULL, dataSize, &nominalRate );
- if ( result != noErr ) {
- AudioObjectRemovePropertyListener( id, &tmp, rateListener, (void *) &reportedRate );
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") setting sample rate for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Now wait until the reported nominal rate is what we just set.
- UInt32 microCounter = 0;
- while ( reportedRate != nominalRate ) {
- microCounter += 5000;
- if ( microCounter > 5000000 ) break;
- usleep( 5000 );
- }
-
- // Remove the property listener.
- AudioObjectRemovePropertyListener( id, &tmp, rateListener, (void *) &reportedRate );
-
- if ( microCounter > 5000000 ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: timeout waiting for sample rate update for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
-
- // Now set the stream format for all streams. Also, check the
- // physical format of the device and change that if necessary.
- AudioStreamBasicDescription description;
- dataSize = sizeof( AudioStreamBasicDescription );
- property.mSelector = kAudioStreamPropertyVirtualFormat;
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &description );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting stream format for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Set the sample rate and data format id. However, only make the
- // change if the sample rate is not within 1.0 of the desired
- // rate and the format is not linear pcm.
- bool updateFormat = false;
- if ( fabs( description.mSampleRate - (Float64)sampleRate ) > 1.0 ) {
- description.mSampleRate = (Float64) sampleRate;
- updateFormat = true;
- }
-
- if ( description.mFormatID != kAudioFormatLinearPCM ) {
- description.mFormatID = kAudioFormatLinearPCM;
- updateFormat = true;
- }
-
- if ( updateFormat ) {
- result = AudioObjectSetPropertyData( id, &property, 0, NULL, dataSize, &description );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") setting sample rate or data format for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
-
- // Now check the physical format.
- property.mSelector = kAudioStreamPropertyPhysicalFormat;
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &description );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting stream physical format for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- //std::cout << "Current physical stream format:" << std::endl;
- //std::cout << " mBitsPerChan = " << description.mBitsPerChannel << std::endl;
- //std::cout << " aligned high = " << (description.mFormatFlags & kAudioFormatFlagIsAlignedHigh) << ", isPacked = " << (description.mFormatFlags & kAudioFormatFlagIsPacked) << std::endl;
- //std::cout << " bytesPerFrame = " << description.mBytesPerFrame << std::endl;
- //std::cout << " sample rate = " << description.mSampleRate << std::endl;
-
- if ( description.mFormatID != kAudioFormatLinearPCM || description.mBitsPerChannel < 16 ) {
- description.mFormatID = kAudioFormatLinearPCM;
- //description.mSampleRate = (Float64) sampleRate;
- AudioStreamBasicDescription testDescription = description;
- UInt32 formatFlags;
-
- // We'll try higher bit rates first and then work our way down.
- std::vector< std::pair<UInt32, UInt32> > physicalFormats;
- formatFlags = (description.mFormatFlags | kLinearPCMFormatFlagIsFloat) & ~kLinearPCMFormatFlagIsSignedInteger;
- physicalFormats.push_back( std::pair<Float32, UInt32>( 32, formatFlags ) );
- formatFlags = (description.mFormatFlags | kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked) & ~kLinearPCMFormatFlagIsFloat;
- physicalFormats.push_back( std::pair<Float32, UInt32>( 32, formatFlags ) );
- physicalFormats.push_back( std::pair<Float32, UInt32>( 24, formatFlags ) ); // 24-bit packed
- formatFlags &= ~( kAudioFormatFlagIsPacked | kAudioFormatFlagIsAlignedHigh );
- physicalFormats.push_back( std::pair<Float32, UInt32>( 24.2, formatFlags ) ); // 24-bit in 4 bytes, aligned low
- formatFlags |= kAudioFormatFlagIsAlignedHigh;
- physicalFormats.push_back( std::pair<Float32, UInt32>( 24.4, formatFlags ) ); // 24-bit in 4 bytes, aligned high
- formatFlags = (description.mFormatFlags | kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked) & ~kLinearPCMFormatFlagIsFloat;
- physicalFormats.push_back( std::pair<Float32, UInt32>( 16, formatFlags ) );
- physicalFormats.push_back( std::pair<Float32, UInt32>( 8, formatFlags ) );
-
- bool setPhysicalFormat = false;
- for( unsigned int i=0; i<physicalFormats.size(); i++ ) {
- testDescription = description;
- testDescription.mBitsPerChannel = (UInt32) physicalFormats[i].first;
- testDescription.mFormatFlags = physicalFormats[i].second;
- if ( (24 == (UInt32)physicalFormats[i].first) && ~( physicalFormats[i].second & kAudioFormatFlagIsPacked ) )
- testDescription.mBytesPerFrame = 4 * testDescription.mChannelsPerFrame;
- else
- testDescription.mBytesPerFrame = testDescription.mBitsPerChannel/8 * testDescription.mChannelsPerFrame;
- testDescription.mBytesPerPacket = testDescription.mBytesPerFrame * testDescription.mFramesPerPacket;
- result = AudioObjectSetPropertyData( id, &property, 0, NULL, dataSize, &testDescription );
- if ( result == noErr ) {
- setPhysicalFormat = true;
- //std::cout << "Updated physical stream format:" << std::endl;
- //std::cout << " mBitsPerChan = " << testDescription.mBitsPerChannel << std::endl;
- //std::cout << " aligned high = " << (testDescription.mFormatFlags & kAudioFormatFlagIsAlignedHigh) << ", isPacked = " << (testDescription.mFormatFlags & kAudioFormatFlagIsPacked) << std::endl;
- //std::cout << " bytesPerFrame = " << testDescription.mBytesPerFrame << std::endl;
- //std::cout << " sample rate = " << testDescription.mSampleRate << std::endl;
- break;
- }
- }
-
- if ( !setPhysicalFormat ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") setting physical data format for device (" << device << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- } // done setting virtual/physical formats.
-
- // Get the stream / device latency.
- UInt32 latency;
- dataSize = sizeof( UInt32 );
- property.mSelector = kAudioDevicePropertyLatency;
- if ( AudioObjectHasProperty( id, &property ) == true ) {
- result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &latency );
- if ( result == kAudioHardwareNoError ) stream_.latency[ mode ] = latency;
- else {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error (" << getErrorCode( result ) << ") getting device latency for device (" << device << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- }
- }
-
- // Byte-swapping: According to AudioHardware.h, the stream data will
- // always be presented in native-endian format, so we should never
- // need to byte swap.
- stream_.doByteSwap[mode] = false;
-
- // From the CoreAudio documentation, PCM data must be supplied as
- // 32-bit floats.
- stream_.userFormat = format;
- stream_.deviceFormat[mode] = RTAUDIO_FLOAT32;
-
- if ( streamCount == 1 )
- stream_.nDeviceChannels[mode] = description.mChannelsPerFrame;
- else // multiple streams
- stream_.nDeviceChannels[mode] = channels;
- stream_.nUserChannels[mode] = channels;
- stream_.channelOffset[mode] = channelOffset; // offset within a CoreAudio stream
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED ) stream_.userInterleaved = false;
- else stream_.userInterleaved = true;
- stream_.deviceInterleaved[mode] = true;
- if ( monoMode == true ) stream_.deviceInterleaved[mode] = false;
-
- // Set flags for buffer conversion.
- stream_.doConvertBuffer[mode] = false;
- if ( stream_.userFormat != stream_.deviceFormat[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.nUserChannels[mode] < stream_.nDeviceChannels[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( streamCount == 1 ) {
- if ( stream_.nUserChannels[mode] > 1 &&
- stream_.userInterleaved != stream_.deviceInterleaved[mode] )
- stream_.doConvertBuffer[mode] = true;
- }
- else if ( monoMode && stream_.userInterleaved )
- stream_.doConvertBuffer[mode] = true;
-
- // Allocate our CoreHandle structure for the stream.
- CoreHandle *handle = 0;
- if ( stream_.apiHandle == 0 ) {
- try {
- handle = new CoreHandle;
- }
- catch ( std::bad_alloc& ) {
- errorText_ = "RtApiCore::probeDeviceOpen: error allocating CoreHandle memory.";
- goto error;
- }
-
- if ( pthread_cond_init( &handle->condition, NULL ) ) {
- errorText_ = "RtApiCore::probeDeviceOpen: error initializing pthread condition variable.";
- goto error;
- }
- stream_.apiHandle = (void *) handle;
- }
- else
- handle = (CoreHandle *) stream_.apiHandle;
- handle->iStream[mode] = firstStream;
- handle->nStreams[mode] = streamCount;
- handle->id[mode] = id;
-
- // Allocate necessary internal buffers.
- unsigned long bufferBytes;
- bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
- // stream_.userBuffer[mode] = (char *) calloc( bufferBytes, 1 );
- stream_.userBuffer[mode] = (char *) malloc( bufferBytes * sizeof(char) );
- memset( stream_.userBuffer[mode], 0, bufferBytes * sizeof(char) );
- if ( stream_.userBuffer[mode] == NULL ) {
- errorText_ = "RtApiCore::probeDeviceOpen: error allocating user buffer memory.";
- goto error;
- }
-
- // If possible, we will make use of the CoreAudio stream buffers as
- // "device buffers". However, we can't do this if using multiple
- // streams.
- if ( stream_.doConvertBuffer[mode] && handle->nStreams[mode] > 1 ) {
-
- bool makeBuffer = true;
- bufferBytes = stream_.nDeviceChannels[mode] * formatBytes( stream_.deviceFormat[mode] );
- if ( mode == INPUT ) {
- if ( stream_.mode == OUTPUT && stream_.deviceBuffer ) {
- unsigned long bytesOut = stream_.nDeviceChannels[0] * formatBytes( stream_.deviceFormat[0] );
- if ( bufferBytes <= bytesOut ) makeBuffer = false;
- }
- }
-
- if ( makeBuffer ) {
- bufferBytes *= *bufferSize;
- if ( stream_.deviceBuffer ) free( stream_.deviceBuffer );
- stream_.deviceBuffer = (char *) calloc( bufferBytes, 1 );
- if ( stream_.deviceBuffer == NULL ) {
- errorText_ = "RtApiCore::probeDeviceOpen: error allocating device buffer memory.";
- goto error;
- }
- }
- }
-
- stream_.sampleRate = sampleRate;
- stream_.device[mode] = device;
- stream_.state = STREAM_STOPPED;
- stream_.callbackInfo.object = (void *) this;
-
- // Setup the buffer conversion information structure.
- if ( stream_.doConvertBuffer[mode] ) {
- if ( streamCount > 1 ) setConvertInfo( mode, 0 );
- else setConvertInfo( mode, channelOffset );
- }
-
- if ( mode == INPUT && stream_.mode == OUTPUT && stream_.device[0] == device )
- // Only one callback procedure per device.
- stream_.mode = DUPLEX;
- else {
-#if defined( MAC_OS_X_VERSION_10_5 ) && ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 )
- result = AudioDeviceCreateIOProcID( id, callbackHandler, (void *) &stream_.callbackInfo, &handle->procId[mode] );
-#else
- // deprecated in favor of AudioDeviceCreateIOProcID()
- result = AudioDeviceAddIOProc( id, callbackHandler, (void *) &stream_.callbackInfo );
-#endif
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::probeDeviceOpen: system error setting callback for device (" << device << ").";
- errorText_ = errorStream_.str();
- goto error;
- }
- if ( stream_.mode == OUTPUT && mode == INPUT )
- stream_.mode = DUPLEX;
- else
- stream_.mode = mode;
- }
-
- // Setup the device property listener for over/underload.
- property.mSelector = kAudioDeviceProcessorOverload;
- property.mScope = kAudioObjectPropertyScopeGlobal;
- result = AudioObjectAddPropertyListener( id, &property, xrunListener, (void *) handle );
-
- return SUCCESS;
-
- error:
- if ( handle ) {
- pthread_cond_destroy( &handle->condition );
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.state = STREAM_CLOSED;
- return FAILURE;
-}
-
-void RtApiCore :: closeStream( void )
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiCore::closeStream(): no open stream to close!";
- error( RtAudioError::WARNING );
- return;
- }
-
- CoreHandle *handle = (CoreHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- if (handle) {
- AudioObjectPropertyAddress property = { kAudioHardwarePropertyDevices,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster };
-
- property.mSelector = kAudioDeviceProcessorOverload;
- property.mScope = kAudioObjectPropertyScopeGlobal;
- if (AudioObjectRemovePropertyListener( handle->id[0], &property, xrunListener, (void *) handle ) != noErr) {
- errorText_ = "RtApiCore::closeStream(): error removing property listener!";
- error( RtAudioError::WARNING );
- }
- }
- if ( stream_.state == STREAM_RUNNING )
- AudioDeviceStop( handle->id[0], callbackHandler );
-#if defined( MAC_OS_X_VERSION_10_5 ) && ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 )
- AudioDeviceDestroyIOProcID( handle->id[0], handle->procId[0] );
-#else
- // deprecated in favor of AudioDeviceDestroyIOProcID()
- AudioDeviceRemoveIOProc( handle->id[0], callbackHandler );
-#endif
- }
-
- if ( stream_.mode == INPUT || ( stream_.mode == DUPLEX && stream_.device[0] != stream_.device[1] ) ) {
- if (handle) {
- AudioObjectPropertyAddress property = { kAudioHardwarePropertyDevices,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster };
-
- property.mSelector = kAudioDeviceProcessorOverload;
- property.mScope = kAudioObjectPropertyScopeGlobal;
- if (AudioObjectRemovePropertyListener( handle->id[1], &property, xrunListener, (void *) handle ) != noErr) {
- errorText_ = "RtApiCore::closeStream(): error removing property listener!";
- error( RtAudioError::WARNING );
- }
- }
- if ( stream_.state == STREAM_RUNNING )
- AudioDeviceStop( handle->id[1], callbackHandler );
-#if defined( MAC_OS_X_VERSION_10_5 ) && ( MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 )
- AudioDeviceDestroyIOProcID( handle->id[1], handle->procId[1] );
-#else
- // deprecated in favor of AudioDeviceDestroyIOProcID()
- AudioDeviceRemoveIOProc( handle->id[1], callbackHandler );
-#endif
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- // Destroy pthread condition variable.
- pthread_cond_destroy( &handle->condition );
- delete handle;
- stream_.apiHandle = 0;
-
- stream_.mode = UNINITIALIZED;
- stream_.state = STREAM_CLOSED;
-}
-
-void RtApiCore :: startStream( void )
-{
- verifyStream();
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiCore::startStream(): the stream is already running!";
- error( RtAudioError::WARNING );
- return;
- }
-
- OSStatus result = noErr;
- CoreHandle *handle = (CoreHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- result = AudioDeviceStart( handle->id[0], callbackHandler );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::startStream: system error (" << getErrorCode( result ) << ") starting callback procedure on device (" << stream_.device[0] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- if ( stream_.mode == INPUT ||
- ( stream_.mode == DUPLEX && stream_.device[0] != stream_.device[1] ) ) {
-
- result = AudioDeviceStart( handle->id[1], callbackHandler );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::startStream: system error starting input callback procedure on device (" << stream_.device[1] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- handle->drainCounter = 0;
- handle->internalDrain = false;
- stream_.state = STREAM_RUNNING;
-
- unlock:
- if ( result == noErr ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiCore :: stopStream( void )
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiCore::stopStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- OSStatus result = noErr;
- CoreHandle *handle = (CoreHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- if ( handle->drainCounter == 0 ) {
- handle->drainCounter = 2;
- pthread_cond_wait( &handle->condition, &stream_.mutex ); // block until signaled
- }
-
- result = AudioDeviceStop( handle->id[0], callbackHandler );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::stopStream: system error (" << getErrorCode( result ) << ") stopping callback procedure on device (" << stream_.device[0] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- if ( stream_.mode == INPUT || ( stream_.mode == DUPLEX && stream_.device[0] != stream_.device[1] ) ) {
-
- result = AudioDeviceStop( handle->id[1], callbackHandler );
- if ( result != noErr ) {
- errorStream_ << "RtApiCore::stopStream: system error (" << getErrorCode( result ) << ") stopping input callback procedure on device (" << stream_.device[1] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- stream_.state = STREAM_STOPPED;
-
- unlock:
- if ( result == noErr ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiCore :: abortStream( void )
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiCore::abortStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- CoreHandle *handle = (CoreHandle *) stream_.apiHandle;
- handle->drainCounter = 2;
-
- stopStream();
-}
-
-// This function will be called by a spawned thread when the user
-// callback function signals that the stream should be stopped or
-// aborted. It is better to handle it this way because the
-// callbackEvent() function probably should return before the AudioDeviceStop()
-// function is called.
-static void *coreStopStream( void *ptr )
-{
- CallbackInfo *info = (CallbackInfo *) ptr;
- RtApiCore *object = (RtApiCore *) info->object;
-
- object->stopStream();
- pthread_exit( NULL );
-}
-
-bool RtApiCore :: callbackEvent( AudioDeviceID deviceId,
- const AudioBufferList *inBufferList,
- const AudioBufferList *outBufferList )
-{
- if ( stream_.state == STREAM_STOPPED || stream_.state == STREAM_STOPPING ) return SUCCESS;
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiCore::callbackEvent(): the stream is closed ... this shouldn't happen!";
- error( RtAudioError::WARNING );
- return FAILURE;
- }
-
- CallbackInfo *info = (CallbackInfo *) &stream_.callbackInfo;
- CoreHandle *handle = (CoreHandle *) stream_.apiHandle;
-
- // Check if we were draining the stream and signal is finished.
- if ( handle->drainCounter > 3 ) {
- ThreadHandle threadId;
-
- stream_.state = STREAM_STOPPING;
- if ( handle->internalDrain == true )
- pthread_create( &threadId, NULL, coreStopStream, info );
- else // external call to stopStream()
- pthread_cond_signal( &handle->condition );
- return SUCCESS;
- }
-
- AudioDeviceID outputDevice = handle->id[0];
-
- // Invoke user callback to get fresh output data UNLESS we are
- // draining stream or duplex mode AND the input/output devices are
- // different AND this function is called for the input device.
- if ( handle->drainCounter == 0 && ( stream_.mode != DUPLEX || deviceId == outputDevice ) ) {
- RtAudioCallback callback = (RtAudioCallback) info->callback;
- double streamTime = getStreamTime();
- RtAudioStreamStatus status = 0;
- if ( stream_.mode != INPUT && handle->xrun[0] == true ) {
- status |= RTAUDIO_OUTPUT_UNDERFLOW;
- handle->xrun[0] = false;
- }
- if ( stream_.mode != OUTPUT && handle->xrun[1] == true ) {
- status |= RTAUDIO_INPUT_OVERFLOW;
- handle->xrun[1] = false;
- }
-
- int cbReturnValue = callback( stream_.userBuffer[0], stream_.userBuffer[1],
- stream_.bufferSize, streamTime, status, info->userData );
- if ( cbReturnValue == 2 ) {
- stream_.state = STREAM_STOPPING;
- handle->drainCounter = 2;
- abortStream();
- return SUCCESS;
- }
- else if ( cbReturnValue == 1 ) {
- handle->drainCounter = 1;
- handle->internalDrain = true;
- }
- }
-
- if ( stream_.mode == OUTPUT || ( stream_.mode == DUPLEX && deviceId == outputDevice ) ) {
-
- if ( handle->drainCounter > 1 ) { // write zeros to the output stream
-
- if ( handle->nStreams[0] == 1 ) {
- memset( outBufferList->mBuffers[handle->iStream[0]].mData,
- 0,
- outBufferList->mBuffers[handle->iStream[0]].mDataByteSize );
- }
- else { // fill multiple streams with zeros
- for ( unsigned int i=0; i<handle->nStreams[0]; i++ ) {
- memset( outBufferList->mBuffers[handle->iStream[0]+i].mData,
- 0,
- outBufferList->mBuffers[handle->iStream[0]+i].mDataByteSize );
- }
- }
- }
- else if ( handle->nStreams[0] == 1 ) {
- if ( stream_.doConvertBuffer[0] ) { // convert directly to CoreAudio stream buffer
- convertBuffer( (char *) outBufferList->mBuffers[handle->iStream[0]].mData,
- stream_.userBuffer[0], stream_.convertInfo[0] );
- }
- else { // copy from user buffer
- memcpy( outBufferList->mBuffers[handle->iStream[0]].mData,
- stream_.userBuffer[0],
- outBufferList->mBuffers[handle->iStream[0]].mDataByteSize );
- }
- }
- else { // fill multiple streams
- Float32 *inBuffer = (Float32 *) stream_.userBuffer[0];
- if ( stream_.doConvertBuffer[0] ) {
- convertBuffer( stream_.deviceBuffer, stream_.userBuffer[0], stream_.convertInfo[0] );
- inBuffer = (Float32 *) stream_.deviceBuffer;
- }
-
- if ( stream_.deviceInterleaved[0] == false ) { // mono mode
- UInt32 bufferBytes = outBufferList->mBuffers[handle->iStream[0]].mDataByteSize;
- for ( unsigned int i=0; i<stream_.nUserChannels[0]; i++ ) {
- memcpy( outBufferList->mBuffers[handle->iStream[0]+i].mData,
- (void *)&inBuffer[i*stream_.bufferSize], bufferBytes );
- }
- }
- else { // fill multiple multi-channel streams with interleaved data
- UInt32 streamChannels, channelsLeft, inJump, outJump, inOffset;
- Float32 *out, *in;
-
- bool inInterleaved = ( stream_.userInterleaved ) ? true : false;
- UInt32 inChannels = stream_.nUserChannels[0];
- if ( stream_.doConvertBuffer[0] ) {
- inInterleaved = true; // device buffer will always be interleaved for nStreams > 1 and not mono mode
- inChannels = stream_.nDeviceChannels[0];
- }
-
- if ( inInterleaved ) inOffset = 1;
- else inOffset = stream_.bufferSize;
-
- channelsLeft = inChannels;
- for ( unsigned int i=0; i<handle->nStreams[0]; i++ ) {
- in = inBuffer;
- out = (Float32 *) outBufferList->mBuffers[handle->iStream[0]+i].mData;
- streamChannels = outBufferList->mBuffers[handle->iStream[0]+i].mNumberChannels;
-
- outJump = 0;
- // Account for possible channel offset in first stream
- if ( i == 0 && stream_.channelOffset[0] > 0 ) {
- streamChannels -= stream_.channelOffset[0];
- outJump = stream_.channelOffset[0];
- out += outJump;
- }
-
- // Account for possible unfilled channels at end of the last stream
- if ( streamChannels > channelsLeft ) {
- outJump = streamChannels - channelsLeft;
- streamChannels = channelsLeft;
- }
-
- // Determine input buffer offsets and skips
- if ( inInterleaved ) {
- inJump = inChannels;
- in += inChannels - channelsLeft;
- }
- else {
- inJump = 1;
- in += (inChannels - channelsLeft) * inOffset;
- }
-
- for ( unsigned int i=0; i<stream_.bufferSize; i++ ) {
- for ( unsigned int j=0; j<streamChannels; j++ ) {
- *out++ = in[j*inOffset];
- }
- out += outJump;
- in += inJump;
- }
- channelsLeft -= streamChannels;
- }
- }
- }
- }
-
- // Don't bother draining input
- if ( handle->drainCounter ) {
- handle->drainCounter++;
- goto unlock;
- }
-
- AudioDeviceID inputDevice;
- inputDevice = handle->id[1];
- if ( stream_.mode == INPUT || ( stream_.mode == DUPLEX && deviceId == inputDevice ) ) {
-
- if ( handle->nStreams[1] == 1 ) {
- if ( stream_.doConvertBuffer[1] ) { // convert directly from CoreAudio stream buffer
- convertBuffer( stream_.userBuffer[1],
- (char *) inBufferList->mBuffers[handle->iStream[1]].mData,
- stream_.convertInfo[1] );
- }
- else { // copy to user buffer
- memcpy( stream_.userBuffer[1],
- inBufferList->mBuffers[handle->iStream[1]].mData,
- inBufferList->mBuffers[handle->iStream[1]].mDataByteSize );
- }
- }
- else { // read from multiple streams
- Float32 *outBuffer = (Float32 *) stream_.userBuffer[1];
- if ( stream_.doConvertBuffer[1] ) outBuffer = (Float32 *) stream_.deviceBuffer;
-
- if ( stream_.deviceInterleaved[1] == false ) { // mono mode
- UInt32 bufferBytes = inBufferList->mBuffers[handle->iStream[1]].mDataByteSize;
- for ( unsigned int i=0; i<stream_.nUserChannels[1]; i++ ) {
- memcpy( (void *)&outBuffer[i*stream_.bufferSize],
- inBufferList->mBuffers[handle->iStream[1]+i].mData, bufferBytes );
- }
- }
- else { // read from multiple multi-channel streams
- UInt32 streamChannels, channelsLeft, inJump, outJump, outOffset;
- Float32 *out, *in;
-
- bool outInterleaved = ( stream_.userInterleaved ) ? true : false;
- UInt32 outChannels = stream_.nUserChannels[1];
- if ( stream_.doConvertBuffer[1] ) {
- outInterleaved = true; // device buffer will always be interleaved for nStreams > 1 and not mono mode
- outChannels = stream_.nDeviceChannels[1];
- }
-
- if ( outInterleaved ) outOffset = 1;
- else outOffset = stream_.bufferSize;
-
- channelsLeft = outChannels;
- for ( unsigned int i=0; i<handle->nStreams[1]; i++ ) {
- out = outBuffer;
- in = (Float32 *) inBufferList->mBuffers[handle->iStream[1]+i].mData;
- streamChannels = inBufferList->mBuffers[handle->iStream[1]+i].mNumberChannels;
-
- inJump = 0;
- // Account for possible channel offset in first stream
- if ( i == 0 && stream_.channelOffset[1] > 0 ) {
- streamChannels -= stream_.channelOffset[1];
- inJump = stream_.channelOffset[1];
- in += inJump;
- }
-
- // Account for possible unread channels at end of the last stream
- if ( streamChannels > channelsLeft ) {
- inJump = streamChannels - channelsLeft;
- streamChannels = channelsLeft;
- }
-
- // Determine output buffer offsets and skips
- if ( outInterleaved ) {
- outJump = outChannels;
- out += outChannels - channelsLeft;
- }
- else {
- outJump = 1;
- out += (outChannels - channelsLeft) * outOffset;
- }
-
- for ( unsigned int i=0; i<stream_.bufferSize; i++ ) {
- for ( unsigned int j=0; j<streamChannels; j++ ) {
- out[j*outOffset] = *in++;
- }
- out += outJump;
- in += inJump;
- }
- channelsLeft -= streamChannels;
- }
- }
-
- if ( stream_.doConvertBuffer[1] ) { // convert from our internal "device" buffer
- convertBuffer( stream_.userBuffer[1],
- stream_.deviceBuffer,
- stream_.convertInfo[1] );
- }
- }
- }
-
- unlock:
- //MUTEX_UNLOCK( &stream_.mutex );
-
- RtApi::tickStreamTime();
- return SUCCESS;
-}
-
-const char* RtApiCore :: getErrorCode( OSStatus code )
-{
- switch( code ) {
-
- case kAudioHardwareNotRunningError:
- return "kAudioHardwareNotRunningError";
-
- case kAudioHardwareUnspecifiedError:
- return "kAudioHardwareUnspecifiedError";
-
- case kAudioHardwareUnknownPropertyError:
- return "kAudioHardwareUnknownPropertyError";
-
- case kAudioHardwareBadPropertySizeError:
- return "kAudioHardwareBadPropertySizeError";
-
- case kAudioHardwareIllegalOperationError:
- return "kAudioHardwareIllegalOperationError";
-
- case kAudioHardwareBadObjectError:
- return "kAudioHardwareBadObjectError";
-
- case kAudioHardwareBadDeviceError:
- return "kAudioHardwareBadDeviceError";
-
- case kAudioHardwareBadStreamError:
- return "kAudioHardwareBadStreamError";
-
- case kAudioHardwareUnsupportedOperationError:
- return "kAudioHardwareUnsupportedOperationError";
-
- case kAudioDeviceUnsupportedFormatError:
- return "kAudioDeviceUnsupportedFormatError";
-
- case kAudioDevicePermissionsError:
- return "kAudioDevicePermissionsError";
-
- default:
- return "CoreAudio unknown error";
- }
-}
-
- //******************** End of __MACOSX_CORE__ *********************//
-#endif
-
-#if defined(__UNIX_JACK__)
-
-// JACK is a low-latency audio server, originally written for the
-// GNU/Linux operating system and now also ported to OS-X. It can
-// connect a number of different applications to an audio device, as
-// well as allowing them to share audio between themselves.
-//
-// When using JACK with RtAudio, "devices" refer to JACK clients that
-// have ports connected to the server. The JACK server is typically
-// started in a terminal as follows:
-//
-// .jackd -d alsa -d hw:0
-//
-// or through an interface program such as qjackctl. Many of the
-// parameters normally set for a stream are fixed by the JACK server
-// and can be specified when the JACK server is started. In
-// particular,
-//
-// .jackd -d alsa -d hw:0 -r 44100 -p 512 -n 4
-//
-// specifies a sample rate of 44100 Hz, a buffer size of 512 sample
-// frames, and number of buffers = 4. Once the server is running, it
-// is not possible to override these values. If the values are not
-// specified in the command-line, the JACK server uses default values.
-//
-// The JACK server does not have to be running when an instance of
-// RtApiJack is created, though the function getDeviceCount() will
-// report 0 devices found until JACK has been started. When no
-// devices are available (i.e., the JACK server is not running), a
-// stream cannot be opened.
-
-#include <jack/jack.h>
-#include <unistd.h>
-#include <cstdio>
-
-// A structure to hold various information related to the Jack API
-// implementation.
-struct JackHandle {
- jack_client_t *client;
- jack_port_t **ports[2];
- std::string deviceName[2];
- bool xrun[2];
- pthread_cond_t condition;
- int drainCounter; // Tracks callback counts when draining
- bool internalDrain; // Indicates if stop is initiated from callback or not.
-
- JackHandle()
- :client(0), drainCounter(0), internalDrain(false) { ports[0] = 0; ports[1] = 0; xrun[0] = false; xrun[1] = false; }
-};
-
-static void jackSilentError( const char * ) {};
-
-RtApiJack :: RtApiJack()
-{
- // Nothing to do here.
-#if !defined(__RTAUDIO_DEBUG__)
- // Turn off Jack's internal error reporting.
- jack_set_error_function( &jackSilentError );
-#endif
-}
-
-RtApiJack :: ~RtApiJack()
-{
- if ( stream_.state != STREAM_CLOSED ) closeStream();
-}
-
-unsigned int RtApiJack :: getDeviceCount( void )
-{
- // See if we can become a jack client.
- jack_options_t options = (jack_options_t) ( JackNoStartServer ); //JackNullOption;
- jack_status_t *status = NULL;
- jack_client_t *client = jack_client_open( "RtApiJackCount", options, status );
- if ( client == 0 ) return 0;
-
- const char **ports;
- std::string port, previousPort;
- unsigned int nChannels = 0, nDevices = 0;
- ports = jack_get_ports( client, NULL, NULL, 0 );
- if ( ports ) {
- // Parse the port names up to the first colon (:).
- size_t iColon = 0;
- do {
- port = (char *) ports[ nChannels ];
- iColon = port.find(":");
- if ( iColon != std::string::npos ) {
- port = port.substr( 0, iColon + 1 );
- if ( port != previousPort ) {
- nDevices++;
- previousPort = port;
- }
- }
- } while ( ports[++nChannels] );
- free( ports );
- }
-
- jack_client_close( client );
- return nDevices;
-}
-
-RtAudio::DeviceInfo RtApiJack :: getDeviceInfo( unsigned int device )
-{
- RtAudio::DeviceInfo info;
- info.probed = false;
-
- jack_options_t options = (jack_options_t) ( JackNoStartServer ); //JackNullOption
- jack_status_t *status = NULL;
- jack_client_t *client = jack_client_open( "RtApiJackInfo", options, status );
- if ( client == 0 ) {
- errorText_ = "RtApiJack::getDeviceInfo: Jack server not found or connection error!";
- error( RtAudioError::WARNING );
- return info;
- }
-
- const char **ports;
- std::string port, previousPort;
- unsigned int nPorts = 0, nDevices = 0;
- ports = jack_get_ports( client, NULL, NULL, 0 );
- if ( ports ) {
- // Parse the port names up to the first colon (:).
- size_t iColon = 0;
- do {
- port = (char *) ports[ nPorts ];
- iColon = port.find(":");
- if ( iColon != std::string::npos ) {
- port = port.substr( 0, iColon );
- if ( port != previousPort ) {
- if ( nDevices == device ) info.name = port;
- nDevices++;
- previousPort = port;
- }
- }
- } while ( ports[++nPorts] );
- free( ports );
- }
-
- if ( device >= nDevices ) {
- jack_client_close( client );
- errorText_ = "RtApiJack::getDeviceInfo: device ID is invalid!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- // Get the current jack server sample rate.
- info.sampleRates.clear();
-
- info.preferredSampleRate = jack_get_sample_rate( client );
- info.sampleRates.push_back( info.preferredSampleRate );
-
- // Count the available ports containing the client name as device
- // channels. Jack "input ports" equal RtAudio output channels.
- unsigned int nChannels = 0;
- ports = jack_get_ports( client, info.name.c_str(), NULL, JackPortIsInput );
- if ( ports ) {
- while ( ports[ nChannels ] ) nChannels++;
- free( ports );
- info.outputChannels = nChannels;
- }
-
- // Jack "output ports" equal RtAudio input channels.
- nChannels = 0;
- ports = jack_get_ports( client, info.name.c_str(), NULL, JackPortIsOutput );
- if ( ports ) {
- while ( ports[ nChannels ] ) nChannels++;
- free( ports );
- info.inputChannels = nChannels;
- }
-
- if ( info.outputChannels == 0 && info.inputChannels == 0 ) {
- jack_client_close(client);
- errorText_ = "RtApiJack::getDeviceInfo: error determining Jack input/output channels!";
- error( RtAudioError::WARNING );
- return info;
- }
-
- // If device opens for both playback and capture, we determine the channels.
- if ( info.outputChannels > 0 && info.inputChannels > 0 )
- info.duplexChannels = (info.outputChannels > info.inputChannels) ? info.inputChannels : info.outputChannels;
-
- // Jack always uses 32-bit floats.
- info.nativeFormats = RTAUDIO_FLOAT32;
-
- // Jack doesn't provide default devices so we'll use the first available one.
- if ( device == 0 && info.outputChannels > 0 )
- info.isDefaultOutput = true;
- if ( device == 0 && info.inputChannels > 0 )
- info.isDefaultInput = true;
-
- jack_client_close(client);
- info.probed = true;
- return info;
-}
-
-static int jackCallbackHandler( jack_nframes_t nframes, void *infoPointer )
-{
- CallbackInfo *info = (CallbackInfo *) infoPointer;
-
- RtApiJack *object = (RtApiJack *) info->object;
- if ( object->callbackEvent( (unsigned long) nframes ) == false ) return 1;
-
- return 0;
-}
-
-// This function will be called by a spawned thread when the Jack
-// server signals that it is shutting down. It is necessary to handle
-// it this way because the jackShutdown() function must return before
-// the jack_deactivate() function (in closeStream()) will return.
-static void *jackCloseStream( void *ptr )
-{
- CallbackInfo *info = (CallbackInfo *) ptr;
- RtApiJack *object = (RtApiJack *) info->object;
-
- object->closeStream();
-
- pthread_exit( NULL );
-}
-static void jackShutdown( void *infoPointer )
-{
- CallbackInfo *info = (CallbackInfo *) infoPointer;
- RtApiJack *object = (RtApiJack *) info->object;
-
- // Check current stream state. If stopped, then we'll assume this
- // was called as a result of a call to RtApiJack::stopStream (the
- // deactivation of a client handle causes this function to be called).
- // If not, we'll assume the Jack server is shutting down or some
- // other problem occurred and we should close the stream.
- if ( object->isStreamRunning() == false ) return;
-
- ThreadHandle threadId;
- pthread_create( &threadId, NULL, jackCloseStream, info );
- std::cerr << "\nRtApiJack: the Jack server is shutting down this client ... stream stopped and closed!!\n" << std::endl;
-}
-
-static int jackXrun( void *infoPointer )
-{
- JackHandle *handle = (JackHandle *) infoPointer;
-
- if ( handle->ports[0] ) handle->xrun[0] = true;
- if ( handle->ports[1] ) handle->xrun[1] = true;
-
- return 0;
-}
-
-bool RtApiJack :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options )
-{
- JackHandle *handle = (JackHandle *) stream_.apiHandle;
-
- // Look for jack server and try to become a client (only do once per stream).
- jack_client_t *client = 0;
- if ( mode == OUTPUT || ( mode == INPUT && stream_.mode != OUTPUT ) ) {
- jack_options_t jackoptions = (jack_options_t) ( JackNoStartServer ); //JackNullOption;
- jack_status_t *status = NULL;
- if ( options && !options->streamName.empty() )
- client = jack_client_open( options->streamName.c_str(), jackoptions, status );
- else
- client = jack_client_open( "RtApiJack", jackoptions, status );
- if ( client == 0 ) {
- errorText_ = "RtApiJack::probeDeviceOpen: Jack server not found or connection error!";
- error( RtAudioError::WARNING );
- return FAILURE;
- }
- }
- else {
- // The handle must have been created on an earlier pass.
- client = handle->client;
- }
-
- const char **ports;
- std::string port, previousPort, deviceName;
- unsigned int nPorts = 0, nDevices = 0;
- ports = jack_get_ports( client, NULL, NULL, 0 );
- if ( ports ) {
- // Parse the port names up to the first colon (:).
- size_t iColon = 0;
- do {
- port = (char *) ports[ nPorts ];
- iColon = port.find(":");
- if ( iColon != std::string::npos ) {
- port = port.substr( 0, iColon );
- if ( port != previousPort ) {
- if ( nDevices == device ) deviceName = port;
- nDevices++;
- previousPort = port;
- }
- }
- } while ( ports[++nPorts] );
- free( ports );
- }
-
- if ( device >= nDevices ) {
- errorText_ = "RtApiJack::probeDeviceOpen: device ID is invalid!";
- return FAILURE;
- }
-
- // Count the available ports containing the client name as device
- // channels. Jack "input ports" equal RtAudio output channels.
- unsigned int nChannels = 0;
- unsigned long flag = JackPortIsInput;
- if ( mode == INPUT ) flag = JackPortIsOutput;
- ports = jack_get_ports( client, deviceName.c_str(), NULL, flag );
- if ( ports ) {
- while ( ports[ nChannels ] ) nChannels++;
- free( ports );
- }
-
- // Compare the jack ports for specified client to the requested number of channels.
- if ( nChannels < (channels + firstChannel) ) {
- errorStream_ << "RtApiJack::probeDeviceOpen: requested number of channels (" << channels << ") + offset (" << firstChannel << ") not found for specified device (" << device << ":" << deviceName << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Check the jack server sample rate.
- unsigned int jackRate = jack_get_sample_rate( client );
- if ( sampleRate != jackRate ) {
- jack_client_close( client );
- errorStream_ << "RtApiJack::probeDeviceOpen: the requested sample rate (" << sampleRate << ") is different than the JACK server rate (" << jackRate << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- stream_.sampleRate = jackRate;
-
- // Get the latency of the JACK port.
- ports = jack_get_ports( client, deviceName.c_str(), NULL, flag );
- if ( ports[ firstChannel ] ) {
- // Added by Ge Wang
- jack_latency_callback_mode_t cbmode = (mode == INPUT ? JackCaptureLatency : JackPlaybackLatency);
- // the range (usually the min and max are equal)
- jack_latency_range_t latrange; latrange.min = latrange.max = 0;
- // get the latency range
- jack_port_get_latency_range( jack_port_by_name( client, ports[firstChannel] ), cbmode, &latrange );
- // be optimistic, use the min!
- stream_.latency[mode] = latrange.min;
- //stream_.latency[mode] = jack_port_get_latency( jack_port_by_name( client, ports[ firstChannel ] ) );
- }
- free( ports );
-
- // The jack server always uses 32-bit floating-point data.
- stream_.deviceFormat[mode] = RTAUDIO_FLOAT32;
- stream_.userFormat = format;
-
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED ) stream_.userInterleaved = false;
- else stream_.userInterleaved = true;
-
- // Jack always uses non-interleaved buffers.
- stream_.deviceInterleaved[mode] = false;
-
- // Jack always provides host byte-ordered data.
- stream_.doByteSwap[mode] = false;
-
- // Get the buffer size. The buffer size and number of buffers
- // (periods) is set when the jack server is started.
- stream_.bufferSize = (int) jack_get_buffer_size( client );
- *bufferSize = stream_.bufferSize;
-
- stream_.nDeviceChannels[mode] = channels;
- stream_.nUserChannels[mode] = channels;
-
- // Set flags for buffer conversion.
- stream_.doConvertBuffer[mode] = false;
- if ( stream_.userFormat != stream_.deviceFormat[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.userInterleaved != stream_.deviceInterleaved[mode] &&
- stream_.nUserChannels[mode] > 1 )
- stream_.doConvertBuffer[mode] = true;
-
- // Allocate our JackHandle structure for the stream.
- if ( handle == 0 ) {
- try {
- handle = new JackHandle;
- }
- catch ( std::bad_alloc& ) {
- errorText_ = "RtApiJack::probeDeviceOpen: error allocating JackHandle memory.";
- goto error;
- }
-
- if ( pthread_cond_init(&handle->condition, NULL) ) {
- errorText_ = "RtApiJack::probeDeviceOpen: error initializing pthread condition variable.";
- goto error;
- }
- stream_.apiHandle = (void *) handle;
- handle->client = client;
- }
- handle->deviceName[mode] = deviceName;
-
- // Allocate necessary internal buffers.
- unsigned long bufferBytes;
- bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
- stream_.userBuffer[mode] = (char *) calloc( bufferBytes, 1 );
- if ( stream_.userBuffer[mode] == NULL ) {
- errorText_ = "RtApiJack::probeDeviceOpen: error allocating user buffer memory.";
- goto error;
- }
-
- if ( stream_.doConvertBuffer[mode] ) {
-
- bool makeBuffer = true;
- if ( mode == OUTPUT )
- bufferBytes = stream_.nDeviceChannels[0] * formatBytes( stream_.deviceFormat[0] );
- else { // mode == INPUT
- bufferBytes = stream_.nDeviceChannels[1] * formatBytes( stream_.deviceFormat[1] );
- if ( stream_.mode == OUTPUT && stream_.deviceBuffer ) {
- unsigned long bytesOut = stream_.nDeviceChannels[0] * formatBytes(stream_.deviceFormat[0]);
- if ( bufferBytes < bytesOut ) makeBuffer = false;
- }
- }
-
- if ( makeBuffer ) {
- bufferBytes *= *bufferSize;
- if ( stream_.deviceBuffer ) free( stream_.deviceBuffer );
- stream_.deviceBuffer = (char *) calloc( bufferBytes, 1 );
- if ( stream_.deviceBuffer == NULL ) {
- errorText_ = "RtApiJack::probeDeviceOpen: error allocating device buffer memory.";
- goto error;
- }
- }
- }
-
- // Allocate memory for the Jack ports (channels) identifiers.
- handle->ports[mode] = (jack_port_t **) malloc ( sizeof (jack_port_t *) * channels );
- if ( handle->ports[mode] == NULL ) {
- errorText_ = "RtApiJack::probeDeviceOpen: error allocating port memory.";
- goto error;
- }
-
- stream_.device[mode] = device;
- stream_.channelOffset[mode] = firstChannel;
- stream_.state = STREAM_STOPPED;
- stream_.callbackInfo.object = (void *) this;
-
- if ( stream_.mode == OUTPUT && mode == INPUT )
- // We had already set up the stream for output.
- stream_.mode = DUPLEX;
- else {
- stream_.mode = mode;
- jack_set_process_callback( handle->client, jackCallbackHandler, (void *) &stream_.callbackInfo );
- jack_set_xrun_callback( handle->client, jackXrun, (void *) &handle );
- jack_on_shutdown( handle->client, jackShutdown, (void *) &stream_.callbackInfo );
- }
-
- // Register our ports.
- char label[64];
- if ( mode == OUTPUT ) {
- for ( unsigned int i=0; i<stream_.nUserChannels[0]; i++ ) {
- snprintf( label, 64, "outport %d", i );
- handle->ports[0][i] = jack_port_register( handle->client, (const char *)label,
- JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 );
- }
- }
- else {
- for ( unsigned int i=0; i<stream_.nUserChannels[1]; i++ ) {
- snprintf( label, 64, "inport %d", i );
- handle->ports[1][i] = jack_port_register( handle->client, (const char *)label,
- JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0 );
- }
- }
-
- // Setup the buffer conversion information structure. We don't use
- // buffers to do channel offsets, so we override that parameter
- // here.
- if ( stream_.doConvertBuffer[mode] ) setConvertInfo( mode, 0 );
-
- return SUCCESS;
-
- error:
- if ( handle ) {
- pthread_cond_destroy( &handle->condition );
- jack_client_close( handle->client );
-
- if ( handle->ports[0] ) free( handle->ports[0] );
- if ( handle->ports[1] ) free( handle->ports[1] );
-
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- return FAILURE;
-}
-
-void RtApiJack :: closeStream( void )
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiJack::closeStream(): no open stream to close!";
- error( RtAudioError::WARNING );
- return;
- }
-
- JackHandle *handle = (JackHandle *) stream_.apiHandle;
- if ( handle ) {
-
- if ( stream_.state == STREAM_RUNNING )
- jack_deactivate( handle->client );
-
- jack_client_close( handle->client );
- }
-
- if ( handle ) {
- if ( handle->ports[0] ) free( handle->ports[0] );
- if ( handle->ports[1] ) free( handle->ports[1] );
- pthread_cond_destroy( &handle->condition );
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.mode = UNINITIALIZED;
- stream_.state = STREAM_CLOSED;
-}
-
-void RtApiJack :: startStream( void )
-{
- verifyStream();
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiJack::startStream(): the stream is already running!";
- error( RtAudioError::WARNING );
- return;
- }
-
- JackHandle *handle = (JackHandle *) stream_.apiHandle;
- int result = jack_activate( handle->client );
- if ( result ) {
- errorText_ = "RtApiJack::startStream(): unable to activate JACK client!";
- goto unlock;
- }
-
- const char **ports;
-
- // Get the list of available ports.
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- result = 1;
- ports = jack_get_ports( handle->client, handle->deviceName[0].c_str(), NULL, JackPortIsInput);
- if ( ports == NULL) {
- errorText_ = "RtApiJack::startStream(): error determining available JACK input ports!";
- goto unlock;
- }
-
- // Now make the port connections. Since RtAudio wasn't designed to
- // allow the user to select particular channels of a device, we'll
- // just open the first "nChannels" ports with offset.
- for ( unsigned int i=0; i<stream_.nUserChannels[0]; i++ ) {
- result = 1;
- if ( ports[ stream_.channelOffset[0] + i ] )
- result = jack_connect( handle->client, jack_port_name( handle->ports[0][i] ), ports[ stream_.channelOffset[0] + i ] );
- if ( result ) {
- free( ports );
- errorText_ = "RtApiJack::startStream(): error connecting output ports!";
- goto unlock;
- }
- }
- free(ports);
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
- result = 1;
- ports = jack_get_ports( handle->client, handle->deviceName[1].c_str(), NULL, JackPortIsOutput );
- if ( ports == NULL) {
- errorText_ = "RtApiJack::startStream(): error determining available JACK output ports!";
- goto unlock;
- }
-
- // Now make the port connections. See note above.
- for ( unsigned int i=0; i<stream_.nUserChannels[1]; i++ ) {
- result = 1;
- if ( ports[ stream_.channelOffset[1] + i ] )
- result = jack_connect( handle->client, ports[ stream_.channelOffset[1] + i ], jack_port_name( handle->ports[1][i] ) );
- if ( result ) {
- free( ports );
- errorText_ = "RtApiJack::startStream(): error connecting input ports!";
- goto unlock;
- }
- }
- free(ports);
- }
-
- handle->drainCounter = 0;
- handle->internalDrain = false;
- stream_.state = STREAM_RUNNING;
-
- unlock:
- if ( result == 0 ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiJack :: stopStream( void )
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiJack::stopStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- JackHandle *handle = (JackHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- if ( handle->drainCounter == 0 ) {
- handle->drainCounter = 2;
- pthread_cond_wait( &handle->condition, &stream_.mutex ); // block until signaled
- }
- }
-
- jack_deactivate( handle->client );
- stream_.state = STREAM_STOPPED;
-}
-
-void RtApiJack :: abortStream( void )
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiJack::abortStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- JackHandle *handle = (JackHandle *) stream_.apiHandle;
- handle->drainCounter = 2;
-
- stopStream();
-}
-
-// This function will be called by a spawned thread when the user
-// callback function signals that the stream should be stopped or
-// aborted. It is necessary to handle it this way because the
-// callbackEvent() function must return before the jack_deactivate()
-// function will return.
-static void *jackStopStream( void *ptr )
-{
- CallbackInfo *info = (CallbackInfo *) ptr;
- RtApiJack *object = (RtApiJack *) info->object;
-
- object->stopStream();
- pthread_exit( NULL );
-}
-
-bool RtApiJack :: callbackEvent( unsigned long nframes )
-{
- if ( stream_.state == STREAM_STOPPED || stream_.state == STREAM_STOPPING ) return SUCCESS;
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiCore::callbackEvent(): the stream is closed ... this shouldn't happen!";
- error( RtAudioError::WARNING );
- return FAILURE;
- }
- if ( stream_.bufferSize != nframes ) {
- errorText_ = "RtApiCore::callbackEvent(): the JACK buffer size has changed ... cannot process!";
- error( RtAudioError::WARNING );
- return FAILURE;
- }
-
- CallbackInfo *info = (CallbackInfo *) &stream_.callbackInfo;
- JackHandle *handle = (JackHandle *) stream_.apiHandle;
-
- // Check if we were draining the stream and signal is finished.
- if ( handle->drainCounter > 3 ) {
- ThreadHandle threadId;
-
- stream_.state = STREAM_STOPPING;
- if ( handle->internalDrain == true )
- pthread_create( &threadId, NULL, jackStopStream, info );
- else
- pthread_cond_signal( &handle->condition );
- return SUCCESS;
- }
-
- // Invoke user callback first, to get fresh output data.
- if ( handle->drainCounter == 0 ) {
- RtAudioCallback callback = (RtAudioCallback) info->callback;
- double streamTime = getStreamTime();
- RtAudioStreamStatus status = 0;
- if ( stream_.mode != INPUT && handle->xrun[0] == true ) {
- status |= RTAUDIO_OUTPUT_UNDERFLOW;
- handle->xrun[0] = false;
- }
- if ( stream_.mode != OUTPUT && handle->xrun[1] == true ) {
- status |= RTAUDIO_INPUT_OVERFLOW;
- handle->xrun[1] = false;
- }
- int cbReturnValue = callback( stream_.userBuffer[0], stream_.userBuffer[1],
- stream_.bufferSize, streamTime, status, info->userData );
- if ( cbReturnValue == 2 ) {
- stream_.state = STREAM_STOPPING;
- handle->drainCounter = 2;
- ThreadHandle id;
- pthread_create( &id, NULL, jackStopStream, info );
- return SUCCESS;
- }
- else if ( cbReturnValue == 1 ) {
- handle->drainCounter = 1;
- handle->internalDrain = true;
- }
- }
-
- jack_default_audio_sample_t *jackbuffer;
- unsigned long bufferBytes = nframes * sizeof( jack_default_audio_sample_t );
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- if ( handle->drainCounter > 1 ) { // write zeros to the output stream
-
- for ( unsigned int i=0; i<stream_.nDeviceChannels[0]; i++ ) {
- jackbuffer = (jack_default_audio_sample_t *) jack_port_get_buffer( handle->ports[0][i], (jack_nframes_t) nframes );
- memset( jackbuffer, 0, bufferBytes );
- }
-
- }
- else if ( stream_.doConvertBuffer[0] ) {
-
- convertBuffer( stream_.deviceBuffer, stream_.userBuffer[0], stream_.convertInfo[0] );
-
- for ( unsigned int i=0; i<stream_.nDeviceChannels[0]; i++ ) {
- jackbuffer = (jack_default_audio_sample_t *) jack_port_get_buffer( handle->ports[0][i], (jack_nframes_t) nframes );
- memcpy( jackbuffer, &stream_.deviceBuffer[i*bufferBytes], bufferBytes );
- }
- }
- else { // no buffer conversion
- for ( unsigned int i=0; i<stream_.nUserChannels[0]; i++ ) {
- jackbuffer = (jack_default_audio_sample_t *) jack_port_get_buffer( handle->ports[0][i], (jack_nframes_t) nframes );
- memcpy( jackbuffer, &stream_.userBuffer[0][i*bufferBytes], bufferBytes );
- }
- }
- }
-
- // Don't bother draining input
- if ( handle->drainCounter ) {
- handle->drainCounter++;
- goto unlock;
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
-
- if ( stream_.doConvertBuffer[1] ) {
- for ( unsigned int i=0; i<stream_.nDeviceChannels[1]; i++ ) {
- jackbuffer = (jack_default_audio_sample_t *) jack_port_get_buffer( handle->ports[1][i], (jack_nframes_t) nframes );
- memcpy( &stream_.deviceBuffer[i*bufferBytes], jackbuffer, bufferBytes );
- }
- convertBuffer( stream_.userBuffer[1], stream_.deviceBuffer, stream_.convertInfo[1] );
- }
- else { // no buffer conversion
- for ( unsigned int i=0; i<stream_.nUserChannels[1]; i++ ) {
- jackbuffer = (jack_default_audio_sample_t *) jack_port_get_buffer( handle->ports[1][i], (jack_nframes_t) nframes );
- memcpy( &stream_.userBuffer[1][i*bufferBytes], jackbuffer, bufferBytes );
- }
- }
- }
-
- unlock:
- RtApi::tickStreamTime();
- return SUCCESS;
-}
- //******************** End of __UNIX_JACK__ *********************//
-#endif
-
-#if defined(__WINDOWS_ASIO__) // ASIO API on Windows
-
-// The ASIO API is designed around a callback scheme, so this
-// implementation is similar to that used for OS-X CoreAudio and Linux
-// Jack. The primary constraint with ASIO is that it only allows
-// access to a single driver at a time. Thus, it is not possible to
-// have more than one simultaneous RtAudio stream.
-//
-// This implementation also requires a number of external ASIO files
-// and a few global variables. The ASIO callback scheme does not
-// allow for the passing of user data, so we must create a global
-// pointer to our callbackInfo structure.
-//
-// On unix systems, we make use of a pthread condition variable.
-// Since there is no equivalent in Windows, I hacked something based
-// on information found in
-// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html.
-
-#include "asiosys.h"
-#include "asio.h"
-#include "iasiothiscallresolver.h"
-#include "asiodrivers.h"
-#include <cmath>
-
-static AsioDrivers drivers;
-static ASIOCallbacks asioCallbacks;
-static ASIODriverInfo driverInfo;
-static CallbackInfo *asioCallbackInfo;
-static bool asioXRun;
-
-struct AsioHandle {
- int drainCounter; // Tracks callback counts when draining
- bool internalDrain; // Indicates if stop is initiated from callback or not.
- ASIOBufferInfo *bufferInfos;
- HANDLE condition;
-
- AsioHandle()
- :drainCounter(0), internalDrain(false), bufferInfos(0) {}
-};
-
-// Function declarations (definitions at end of section)
-static const char* getAsioErrorString( ASIOError result );
-static void sampleRateChanged( ASIOSampleRate sRate );
-static long asioMessages( long selector, long value, void* message, double* opt );
-
-RtApiAsio :: RtApiAsio()
-{
- // ASIO cannot run on a multi-threaded appartment. You can call
- // CoInitialize beforehand, but it must be for appartment threading
- // (in which case, CoInitilialize will return S_FALSE here).
- coInitialized_ = false;
- HRESULT hr = CoInitialize( NULL );
- if ( FAILED(hr) ) {
- errorText_ = "RtApiAsio::ASIO requires a single-threaded appartment. Call CoInitializeEx(0,COINIT_APARTMENTTHREADED)";
- error( RtAudioError::WARNING );
- }
- coInitialized_ = true;
-
- drivers.removeCurrentDriver();
- driverInfo.asioVersion = 2;
-
- // See note in DirectSound implementation about GetDesktopWindow().
- driverInfo.sysRef = GetForegroundWindow();
-}
-
-RtApiAsio :: ~RtApiAsio()
-{
- if ( stream_.state != STREAM_CLOSED ) closeStream();
- if ( coInitialized_ ) CoUninitialize();
-}
-
-unsigned int RtApiAsio :: getDeviceCount( void )
-{
- return (unsigned int) drivers.asioGetNumDev();
-}
-
-RtAudio::DeviceInfo RtApiAsio :: getDeviceInfo( unsigned int device )
-{
- RtAudio::DeviceInfo info;
- info.probed = false;
-
- // Get device ID
- unsigned int nDevices = getDeviceCount();
- if ( nDevices == 0 ) {
- errorText_ = "RtApiAsio::getDeviceInfo: no devices found!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- if ( device >= nDevices ) {
- errorText_ = "RtApiAsio::getDeviceInfo: device ID is invalid!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- // If a stream is already open, we cannot probe other devices. Thus, use the saved results.
- if ( stream_.state != STREAM_CLOSED ) {
- if ( device >= devices_.size() ) {
- errorText_ = "RtApiAsio::getDeviceInfo: device ID was not present before stream was opened.";
- error( RtAudioError::WARNING );
- return info;
- }
- return devices_[ device ];
- }
-
- char driverName[32];
- ASIOError result = drivers.asioGetDriverName( (int) device, driverName, 32 );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::getDeviceInfo: unable to get driver name (" << getAsioErrorString( result ) << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- info.name = driverName;
-
- if ( !drivers.loadDriver( driverName ) ) {
- errorStream_ << "RtApiAsio::getDeviceInfo: unable to load driver (" << driverName << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- result = ASIOInit( &driverInfo );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::getDeviceInfo: error (" << getAsioErrorString( result ) << ") initializing driver (" << driverName << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Determine the device channel information.
- long inputChannels, outputChannels;
- result = ASIOGetChannels( &inputChannels, &outputChannels );
- if ( result != ASE_OK ) {
- drivers.removeCurrentDriver();
- errorStream_ << "RtApiAsio::getDeviceInfo: error (" << getAsioErrorString( result ) << ") getting channel count (" << driverName << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- info.outputChannels = outputChannels;
- info.inputChannels = inputChannels;
- if ( info.outputChannels > 0 && info.inputChannels > 0 )
- info.duplexChannels = (info.outputChannels > info.inputChannels) ? info.inputChannels : info.outputChannels;
-
- // Determine the supported sample rates.
- info.sampleRates.clear();
- for ( unsigned int i=0; i<MAX_SAMPLE_RATES; i++ ) {
- result = ASIOCanSampleRate( (ASIOSampleRate) SAMPLE_RATES[i] );
- if ( result == ASE_OK ) {
- info.sampleRates.push_back( SAMPLE_RATES[i] );
-
- if ( !info.preferredSampleRate || ( SAMPLE_RATES[i] <= 48000 && SAMPLE_RATES[i] > info.preferredSampleRate ) )
- info.preferredSampleRate = SAMPLE_RATES[i];
- }
- }
-
- // Determine supported data types ... just check first channel and assume rest are the same.
- ASIOChannelInfo channelInfo;
- channelInfo.channel = 0;
- channelInfo.isInput = true;
- if ( info.inputChannels <= 0 ) channelInfo.isInput = false;
- result = ASIOGetChannelInfo( &channelInfo );
- if ( result != ASE_OK ) {
- drivers.removeCurrentDriver();
- errorStream_ << "RtApiAsio::getDeviceInfo: error (" << getAsioErrorString( result ) << ") getting driver channel info (" << driverName << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- info.nativeFormats = 0;
- if ( channelInfo.type == ASIOSTInt16MSB || channelInfo.type == ASIOSTInt16LSB )
- info.nativeFormats |= RTAUDIO_SINT16;
- else if ( channelInfo.type == ASIOSTInt32MSB || channelInfo.type == ASIOSTInt32LSB )
- info.nativeFormats |= RTAUDIO_SINT32;
- else if ( channelInfo.type == ASIOSTFloat32MSB || channelInfo.type == ASIOSTFloat32LSB )
- info.nativeFormats |= RTAUDIO_FLOAT32;
- else if ( channelInfo.type == ASIOSTFloat64MSB || channelInfo.type == ASIOSTFloat64LSB )
- info.nativeFormats |= RTAUDIO_FLOAT64;
- else if ( channelInfo.type == ASIOSTInt24MSB || channelInfo.type == ASIOSTInt24LSB )
- info.nativeFormats |= RTAUDIO_SINT24;
-
- if ( info.outputChannels > 0 )
- if ( getDefaultOutputDevice() == device ) info.isDefaultOutput = true;
- if ( info.inputChannels > 0 )
- if ( getDefaultInputDevice() == device ) info.isDefaultInput = true;
-
- info.probed = true;
- drivers.removeCurrentDriver();
- return info;
-}
-
-static void bufferSwitch( long index, ASIOBool /*processNow*/ )
-{
- RtApiAsio *object = (RtApiAsio *) asioCallbackInfo->object;
- object->callbackEvent( index );
-}
-
-void RtApiAsio :: saveDeviceInfo( void )
-{
- devices_.clear();
-
- unsigned int nDevices = getDeviceCount();
- devices_.resize( nDevices );
- for ( unsigned int i=0; i<nDevices; i++ )
- devices_[i] = getDeviceInfo( i );
-}
-
-bool RtApiAsio :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options )
-{////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- bool isDuplexInput = mode == INPUT && stream_.mode == OUTPUT;
-
- // For ASIO, a duplex stream MUST use the same driver.
- if ( isDuplexInput && stream_.device[0] != device ) {
- errorText_ = "RtApiAsio::probeDeviceOpen: an ASIO duplex stream must use the same device for input and output!";
- return FAILURE;
- }
-
- char driverName[32];
- ASIOError result = drivers.asioGetDriverName( (int) device, driverName, 32 );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: unable to get driver name (" << getAsioErrorString( result ) << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Only load the driver once for duplex stream.
- if ( !isDuplexInput ) {
- // The getDeviceInfo() function will not work when a stream is open
- // because ASIO does not allow multiple devices to run at the same
- // time. Thus, we'll probe the system before opening a stream and
- // save the results for use by getDeviceInfo().
- this->saveDeviceInfo();
-
- if ( !drivers.loadDriver( driverName ) ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: unable to load driver (" << driverName << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- result = ASIOInit( &driverInfo );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: error (" << getAsioErrorString( result ) << ") initializing driver (" << driverName << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
-
- // keep them before any "goto error", they are used for error cleanup + goto device boundary checks
- bool buffersAllocated = false;
- AsioHandle *handle = (AsioHandle *) stream_.apiHandle;
- unsigned int nChannels;
-
-
- // Check the device channel count.
- long inputChannels, outputChannels;
- result = ASIOGetChannels( &inputChannels, &outputChannels );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: error (" << getAsioErrorString( result ) << ") getting channel count (" << driverName << ").";
- errorText_ = errorStream_.str();
- goto error;
- }
-
- if ( ( mode == OUTPUT && (channels+firstChannel) > (unsigned int) outputChannels) ||
- ( mode == INPUT && (channels+firstChannel) > (unsigned int) inputChannels) ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") does not support requested channel count (" << channels << ") + offset (" << firstChannel << ").";
- errorText_ = errorStream_.str();
- goto error;
- }
- stream_.nDeviceChannels[mode] = channels;
- stream_.nUserChannels[mode] = channels;
- stream_.channelOffset[mode] = firstChannel;
-
- // Verify the sample rate is supported.
- result = ASIOCanSampleRate( (ASIOSampleRate) sampleRate );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") does not support requested sample rate (" << sampleRate << ").";
- errorText_ = errorStream_.str();
- goto error;
- }
-
- // Get the current sample rate
- ASIOSampleRate currentRate;
- result = ASIOGetSampleRate( &currentRate );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") error getting sample rate.";
- errorText_ = errorStream_.str();
- goto error;
- }
-
- // Set the sample rate only if necessary
- if ( currentRate != sampleRate ) {
- result = ASIOSetSampleRate( (ASIOSampleRate) sampleRate );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") error setting sample rate (" << sampleRate << ").";
- errorText_ = errorStream_.str();
- goto error;
- }
- }
-
- // Determine the driver data type.
- ASIOChannelInfo channelInfo;
- channelInfo.channel = 0;
- if ( mode == OUTPUT ) channelInfo.isInput = false;
- else channelInfo.isInput = true;
- result = ASIOGetChannelInfo( &channelInfo );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") error (" << getAsioErrorString( result ) << ") getting data format.";
- errorText_ = errorStream_.str();
- goto error;
- }
-
- // Assuming WINDOWS host is always little-endian.
- stream_.doByteSwap[mode] = false;
- stream_.userFormat = format;
- stream_.deviceFormat[mode] = 0;
- if ( channelInfo.type == ASIOSTInt16MSB || channelInfo.type == ASIOSTInt16LSB ) {
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- if ( channelInfo.type == ASIOSTInt16MSB ) stream_.doByteSwap[mode] = true;
- }
- else if ( channelInfo.type == ASIOSTInt32MSB || channelInfo.type == ASIOSTInt32LSB ) {
- stream_.deviceFormat[mode] = RTAUDIO_SINT32;
- if ( channelInfo.type == ASIOSTInt32MSB ) stream_.doByteSwap[mode] = true;
- }
- else if ( channelInfo.type == ASIOSTFloat32MSB || channelInfo.type == ASIOSTFloat32LSB ) {
- stream_.deviceFormat[mode] = RTAUDIO_FLOAT32;
- if ( channelInfo.type == ASIOSTFloat32MSB ) stream_.doByteSwap[mode] = true;
- }
- else if ( channelInfo.type == ASIOSTFloat64MSB || channelInfo.type == ASIOSTFloat64LSB ) {
- stream_.deviceFormat[mode] = RTAUDIO_FLOAT64;
- if ( channelInfo.type == ASIOSTFloat64MSB ) stream_.doByteSwap[mode] = true;
- }
- else if ( channelInfo.type == ASIOSTInt24MSB || channelInfo.type == ASIOSTInt24LSB ) {
- stream_.deviceFormat[mode] = RTAUDIO_SINT24;
- if ( channelInfo.type == ASIOSTInt24MSB ) stream_.doByteSwap[mode] = true;
- }
-
- if ( stream_.deviceFormat[mode] == 0 ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") data format not supported by RtAudio.";
- errorText_ = errorStream_.str();
- goto error;
- }
-
- // Set the buffer size. For a duplex stream, this will end up
- // setting the buffer size based on the input constraints, which
- // should be ok.
- long minSize, maxSize, preferSize, granularity;
- result = ASIOGetBufferSize( &minSize, &maxSize, &preferSize, &granularity );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") error (" << getAsioErrorString( result ) << ") getting buffer size.";
- errorText_ = errorStream_.str();
- goto error;
- }
-
- if ( isDuplexInput ) {
- // When this is the duplex input (output was opened before), then we have to use the same
- // buffersize as the output, because it might use the preferred buffer size, which most
- // likely wasn't passed as input to this. The buffer sizes have to be identically anyway,
- // So instead of throwing an error, make them equal. The caller uses the reference
- // to the "bufferSize" param as usual to set up processing buffers.
-
- *bufferSize = stream_.bufferSize;
-
- } else {
- if ( *bufferSize == 0 ) *bufferSize = preferSize;
- else if ( *bufferSize < (unsigned int) minSize ) *bufferSize = (unsigned int) minSize;
- else if ( *bufferSize > (unsigned int) maxSize ) *bufferSize = (unsigned int) maxSize;
- else if ( granularity == -1 ) {
- // Make sure bufferSize is a power of two.
- int log2_of_min_size = 0;
- int log2_of_max_size = 0;
-
- for ( unsigned int i = 0; i < sizeof(long) * 8; i++ ) {
- if ( minSize & ((long)1 << i) ) log2_of_min_size = i;
- if ( maxSize & ((long)1 << i) ) log2_of_max_size = i;
- }
-
- long min_delta = std::abs( (long)*bufferSize - ((long)1 << log2_of_min_size) );
- int min_delta_num = log2_of_min_size;
-
- for (int i = log2_of_min_size + 1; i <= log2_of_max_size; i++) {
- long current_delta = std::abs( (long)*bufferSize - ((long)1 << i) );
- if (current_delta < min_delta) {
- min_delta = current_delta;
- min_delta_num = i;
- }
- }
-
- *bufferSize = ( (unsigned int)1 << min_delta_num );
- if ( *bufferSize < (unsigned int) minSize ) *bufferSize = (unsigned int) minSize;
- else if ( *bufferSize > (unsigned int) maxSize ) *bufferSize = (unsigned int) maxSize;
- }
- else if ( granularity != 0 ) {
- // Set to an even multiple of granularity, rounding up.
- *bufferSize = (*bufferSize + granularity-1) / granularity * granularity;
- }
- }
-
- /*
- // we don't use it anymore, see above!
- // Just left it here for the case...
- if ( isDuplexInput && stream_.bufferSize != *bufferSize ) {
- errorText_ = "RtApiAsio::probeDeviceOpen: input/output buffersize discrepancy!";
- goto error;
- }
- */
-
- stream_.bufferSize = *bufferSize;
- stream_.nBuffers = 2;
-
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED ) stream_.userInterleaved = false;
- else stream_.userInterleaved = true;
-
- // ASIO always uses non-interleaved buffers.
- stream_.deviceInterleaved[mode] = false;
-
- // Allocate, if necessary, our AsioHandle structure for the stream.
- if ( handle == 0 ) {
- try {
- handle = new AsioHandle;
- }
- catch ( std::bad_alloc& ) {
- errorText_ = "RtApiAsio::probeDeviceOpen: error allocating AsioHandle memory.";
- goto error;
- }
- handle->bufferInfos = 0;
-
- // Create a manual-reset event.
- handle->condition = CreateEvent( NULL, // no security
- TRUE, // manual-reset
- FALSE, // non-signaled initially
- NULL ); // unnamed
- stream_.apiHandle = (void *) handle;
- }
-
- // Create the ASIO internal buffers. Since RtAudio sets up input
- // and output separately, we'll have to dispose of previously
- // created output buffers for a duplex stream.
- if ( mode == INPUT && stream_.mode == OUTPUT ) {
- ASIODisposeBuffers();
- if ( handle->bufferInfos ) free( handle->bufferInfos );
- }
-
- // Allocate, initialize, and save the bufferInfos in our stream callbackInfo structure.
- unsigned int i;
- nChannels = stream_.nDeviceChannels[0] + stream_.nDeviceChannels[1];
- handle->bufferInfos = (ASIOBufferInfo *) malloc( nChannels * sizeof(ASIOBufferInfo) );
- if ( handle->bufferInfos == NULL ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: error allocating bufferInfo memory for driver (" << driverName << ").";
- errorText_ = errorStream_.str();
- goto error;
- }
-
- ASIOBufferInfo *infos;
- infos = handle->bufferInfos;
- for ( i=0; i<stream_.nDeviceChannels[0]; i++, infos++ ) {
- infos->isInput = ASIOFalse;
- infos->channelNum = i + stream_.channelOffset[0];
- infos->buffers[0] = infos->buffers[1] = 0;
- }
- for ( i=0; i<stream_.nDeviceChannels[1]; i++, infos++ ) {
- infos->isInput = ASIOTrue;
- infos->channelNum = i + stream_.channelOffset[1];
- infos->buffers[0] = infos->buffers[1] = 0;
- }
-
- // prepare for callbacks
- stream_.sampleRate = sampleRate;
- stream_.device[mode] = device;
- stream_.mode = isDuplexInput ? DUPLEX : mode;
-
- // store this class instance before registering callbacks, that are going to use it
- asioCallbackInfo = &stream_.callbackInfo;
- stream_.callbackInfo.object = (void *) this;
-
- // Set up the ASIO callback structure and create the ASIO data buffers.
- asioCallbacks.bufferSwitch = &bufferSwitch;
- asioCallbacks.sampleRateDidChange = &sampleRateChanged;
- asioCallbacks.asioMessage = &asioMessages;
- asioCallbacks.bufferSwitchTimeInfo = NULL;
- result = ASIOCreateBuffers( handle->bufferInfos, nChannels, stream_.bufferSize, &asioCallbacks );
- if ( result != ASE_OK ) {
- // Standard method failed. This can happen with strict/misbehaving drivers that return valid buffer size ranges
- // but only accept the preferred buffer size as parameter for ASIOCreateBuffers. eg. Creatives ASIO driver
- // in that case, let's be naïve and try that instead
- *bufferSize = preferSize;
- stream_.bufferSize = *bufferSize;
- result = ASIOCreateBuffers( handle->bufferInfos, nChannels, stream_.bufferSize, &asioCallbacks );
- }
-
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") error (" << getAsioErrorString( result ) << ") creating buffers.";
- errorText_ = errorStream_.str();
- goto error;
- }
- buffersAllocated = true;
- stream_.state = STREAM_STOPPED;
-
- // Set flags for buffer conversion.
- stream_.doConvertBuffer[mode] = false;
- if ( stream_.userFormat != stream_.deviceFormat[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.userInterleaved != stream_.deviceInterleaved[mode] &&
- stream_.nUserChannels[mode] > 1 )
- stream_.doConvertBuffer[mode] = true;
-
- // Allocate necessary internal buffers
- unsigned long bufferBytes;
- bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
- stream_.userBuffer[mode] = (char *) calloc( bufferBytes, 1 );
- if ( stream_.userBuffer[mode] == NULL ) {
- errorText_ = "RtApiAsio::probeDeviceOpen: error allocating user buffer memory.";
- goto error;
- }
-
- if ( stream_.doConvertBuffer[mode] ) {
-
- bool makeBuffer = true;
- bufferBytes = stream_.nDeviceChannels[mode] * formatBytes( stream_.deviceFormat[mode] );
- if ( isDuplexInput && stream_.deviceBuffer ) {
- unsigned long bytesOut = stream_.nDeviceChannels[0] * formatBytes( stream_.deviceFormat[0] );
- if ( bufferBytes <= bytesOut ) makeBuffer = false;
- }
-
- if ( makeBuffer ) {
- bufferBytes *= *bufferSize;
- if ( stream_.deviceBuffer ) free( stream_.deviceBuffer );
- stream_.deviceBuffer = (char *) calloc( bufferBytes, 1 );
- if ( stream_.deviceBuffer == NULL ) {
- errorText_ = "RtApiAsio::probeDeviceOpen: error allocating device buffer memory.";
- goto error;
- }
- }
- }
-
- // Determine device latencies
- long inputLatency, outputLatency;
- result = ASIOGetLatencies( &inputLatency, &outputLatency );
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::probeDeviceOpen: driver (" << driverName << ") error (" << getAsioErrorString( result ) << ") getting latency.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING); // warn but don't fail
- }
- else {
- stream_.latency[0] = outputLatency;
- stream_.latency[1] = inputLatency;
- }
-
- // Setup the buffer conversion information structure. We don't use
- // buffers to do channel offsets, so we override that parameter
- // here.
- if ( stream_.doConvertBuffer[mode] ) setConvertInfo( mode, 0 );
-
- return SUCCESS;
-
- error:
- if ( !isDuplexInput ) {
- // the cleanup for error in the duplex input, is done by RtApi::openStream
- // So we clean up for single channel only
-
- if ( buffersAllocated )
- ASIODisposeBuffers();
-
- drivers.removeCurrentDriver();
-
- if ( handle ) {
- CloseHandle( handle->condition );
- if ( handle->bufferInfos )
- free( handle->bufferInfos );
-
- delete handle;
- stream_.apiHandle = 0;
- }
-
-
- if ( stream_.userBuffer[mode] ) {
- free( stream_.userBuffer[mode] );
- stream_.userBuffer[mode] = 0;
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
- }
-
- return FAILURE;
-}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void RtApiAsio :: closeStream()
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiAsio::closeStream(): no open stream to close!";
- error( RtAudioError::WARNING );
- return;
- }
-
- if ( stream_.state == STREAM_RUNNING ) {
- stream_.state = STREAM_STOPPED;
- ASIOStop();
- }
- ASIODisposeBuffers();
- drivers.removeCurrentDriver();
-
- AsioHandle *handle = (AsioHandle *) stream_.apiHandle;
- if ( handle ) {
- CloseHandle( handle->condition );
- if ( handle->bufferInfos )
- free( handle->bufferInfos );
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.mode = UNINITIALIZED;
- stream_.state = STREAM_CLOSED;
-}
-
-bool stopThreadCalled = false;
-
-void RtApiAsio :: startStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiAsio::startStream(): the stream is already running!";
- error( RtAudioError::WARNING );
- return;
- }
-
- AsioHandle *handle = (AsioHandle *) stream_.apiHandle;
- ASIOError result = ASIOStart();
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::startStream: error (" << getAsioErrorString( result ) << ") starting device.";
- errorText_ = errorStream_.str();
- goto unlock;
- }
-
- handle->drainCounter = 0;
- handle->internalDrain = false;
- ResetEvent( handle->condition );
- stream_.state = STREAM_RUNNING;
- asioXRun = false;
-
- unlock:
- stopThreadCalled = false;
-
- if ( result == ASE_OK ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiAsio :: stopStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiAsio::stopStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- AsioHandle *handle = (AsioHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- if ( handle->drainCounter == 0 ) {
- handle->drainCounter = 2;
- WaitForSingleObject( handle->condition, INFINITE ); // block until signaled
- }
- }
-
- stream_.state = STREAM_STOPPED;
-
- ASIOError result = ASIOStop();
- if ( result != ASE_OK ) {
- errorStream_ << "RtApiAsio::stopStream: error (" << getAsioErrorString( result ) << ") stopping device.";
- errorText_ = errorStream_.str();
- }
-
- if ( result == ASE_OK ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiAsio :: abortStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiAsio::abortStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- // The following lines were commented-out because some behavior was
- // noted where the device buffers need to be zeroed to avoid
- // continuing sound, even when the device buffers are completely
- // disposed. So now, calling abort is the same as calling stop.
- // AsioHandle *handle = (AsioHandle *) stream_.apiHandle;
- // handle->drainCounter = 2;
- stopStream();
-}
-
-// This function will be called by a spawned thread when the user
-// callback function signals that the stream should be stopped or
-// aborted. It is necessary to handle it this way because the
-// callbackEvent() function must return before the ASIOStop()
-// function will return.
-static unsigned __stdcall asioStopStream( void *ptr )
-{
- CallbackInfo *info = (CallbackInfo *) ptr;
- RtApiAsio *object = (RtApiAsio *) info->object;
-
- object->stopStream();
- _endthreadex( 0 );
- return 0;
-}
-
-bool RtApiAsio :: callbackEvent( long bufferIndex )
-{
- if ( stream_.state == STREAM_STOPPED || stream_.state == STREAM_STOPPING ) return SUCCESS;
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiAsio::callbackEvent(): the stream is closed ... this shouldn't happen!";
- error( RtAudioError::WARNING );
- return FAILURE;
- }
-
- CallbackInfo *info = (CallbackInfo *) &stream_.callbackInfo;
- AsioHandle *handle = (AsioHandle *) stream_.apiHandle;
-
- // Check if we were draining the stream and signal if finished.
- if ( handle->drainCounter > 3 ) {
-
- stream_.state = STREAM_STOPPING;
- if ( handle->internalDrain == false )
- SetEvent( handle->condition );
- else { // spawn a thread to stop the stream
- unsigned threadId;
- stream_.callbackInfo.thread = _beginthreadex( NULL, 0, &asioStopStream,
- &stream_.callbackInfo, 0, &threadId );
- }
- return SUCCESS;
- }
-
- // Invoke user callback to get fresh output data UNLESS we are
- // draining stream.
- if ( handle->drainCounter == 0 ) {
- RtAudioCallback callback = (RtAudioCallback) info->callback;
- double streamTime = getStreamTime();
- RtAudioStreamStatus status = 0;
- if ( stream_.mode != INPUT && asioXRun == true ) {
- status |= RTAUDIO_OUTPUT_UNDERFLOW;
- asioXRun = false;
- }
- if ( stream_.mode != OUTPUT && asioXRun == true ) {
- status |= RTAUDIO_INPUT_OVERFLOW;
- asioXRun = false;
- }
- int cbReturnValue = callback( stream_.userBuffer[0], stream_.userBuffer[1],
- stream_.bufferSize, streamTime, status, info->userData );
- if ( cbReturnValue == 2 ) {
- stream_.state = STREAM_STOPPING;
- handle->drainCounter = 2;
- unsigned threadId;
- stream_.callbackInfo.thread = _beginthreadex( NULL, 0, &asioStopStream,
- &stream_.callbackInfo, 0, &threadId );
- return SUCCESS;
- }
- else if ( cbReturnValue == 1 ) {
- handle->drainCounter = 1;
- handle->internalDrain = true;
- }
- }
-
- unsigned int nChannels, bufferBytes, i, j;
- nChannels = stream_.nDeviceChannels[0] + stream_.nDeviceChannels[1];
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- bufferBytes = stream_.bufferSize * formatBytes( stream_.deviceFormat[0] );
-
- if ( handle->drainCounter > 1 ) { // write zeros to the output stream
-
- for ( i=0, j=0; i<nChannels; i++ ) {
- if ( handle->bufferInfos[i].isInput != ASIOTrue )
- memset( handle->bufferInfos[i].buffers[bufferIndex], 0, bufferBytes );
- }
-
- }
- else if ( stream_.doConvertBuffer[0] ) {
-
- convertBuffer( stream_.deviceBuffer, stream_.userBuffer[0], stream_.convertInfo[0] );
- if ( stream_.doByteSwap[0] )
- byteSwapBuffer( stream_.deviceBuffer,
- stream_.bufferSize * stream_.nDeviceChannels[0],
- stream_.deviceFormat[0] );
-
- for ( i=0, j=0; i<nChannels; i++ ) {
- if ( handle->bufferInfos[i].isInput != ASIOTrue )
- memcpy( handle->bufferInfos[i].buffers[bufferIndex],
- &stream_.deviceBuffer[j++*bufferBytes], bufferBytes );
- }
-
- }
- else {
-
- if ( stream_.doByteSwap[0] )
- byteSwapBuffer( stream_.userBuffer[0],
- stream_.bufferSize * stream_.nUserChannels[0],
- stream_.userFormat );
-
- for ( i=0, j=0; i<nChannels; i++ ) {
- if ( handle->bufferInfos[i].isInput != ASIOTrue )
- memcpy( handle->bufferInfos[i].buffers[bufferIndex],
- &stream_.userBuffer[0][bufferBytes*j++], bufferBytes );
- }
-
- }
- }
-
- // Don't bother draining input
- if ( handle->drainCounter ) {
- handle->drainCounter++;
- goto unlock;
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
-
- bufferBytes = stream_.bufferSize * formatBytes(stream_.deviceFormat[1]);
-
- if (stream_.doConvertBuffer[1]) {
-
- // Always interleave ASIO input data.
- for ( i=0, j=0; i<nChannels; i++ ) {
- if ( handle->bufferInfos[i].isInput == ASIOTrue )
- memcpy( &stream_.deviceBuffer[j++*bufferBytes],
- handle->bufferInfos[i].buffers[bufferIndex],
- bufferBytes );
- }
-
- if ( stream_.doByteSwap[1] )
- byteSwapBuffer( stream_.deviceBuffer,
- stream_.bufferSize * stream_.nDeviceChannels[1],
- stream_.deviceFormat[1] );
- convertBuffer( stream_.userBuffer[1], stream_.deviceBuffer, stream_.convertInfo[1] );
-
- }
- else {
- for ( i=0, j=0; i<nChannels; i++ ) {
- if ( handle->bufferInfos[i].isInput == ASIOTrue ) {
- memcpy( &stream_.userBuffer[1][bufferBytes*j++],
- handle->bufferInfos[i].buffers[bufferIndex],
- bufferBytes );
- }
- }
-
- if ( stream_.doByteSwap[1] )
- byteSwapBuffer( stream_.userBuffer[1],
- stream_.bufferSize * stream_.nUserChannels[1],
- stream_.userFormat );
- }
- }
-
- unlock:
- // The following call was suggested by Malte Clasen. While the API
- // documentation indicates it should not be required, some device
- // drivers apparently do not function correctly without it.
- ASIOOutputReady();
-
- RtApi::tickStreamTime();
- return SUCCESS;
-}
-
-static void sampleRateChanged( ASIOSampleRate sRate )
-{
- // The ASIO documentation says that this usually only happens during
- // external sync. Audio processing is not stopped by the driver,
- // actual sample rate might not have even changed, maybe only the
- // sample rate status of an AES/EBU or S/PDIF digital input at the
- // audio device.
-
- RtApi *object = (RtApi *) asioCallbackInfo->object;
- try {
- object->stopStream();
- }
- catch ( RtAudioError &exception ) {
- std::cerr << "\nRtApiAsio: sampleRateChanged() error (" << exception.getMessage() << ")!\n" << std::endl;
- return;
- }
-
- std::cerr << "\nRtApiAsio: driver reports sample rate changed to " << sRate << " ... stream stopped!!!\n" << std::endl;
-}
-
-static long asioMessages( long selector, long value, void* /*message*/, double* /*opt*/ )
-{
- long ret = 0;
-
- switch( selector ) {
- case kAsioSelectorSupported:
- if ( value == kAsioResetRequest
- || value == kAsioEngineVersion
- || value == kAsioResyncRequest
- || value == kAsioLatenciesChanged
- // The following three were added for ASIO 2.0, you don't
- // necessarily have to support them.
- || value == kAsioSupportsTimeInfo
- || value == kAsioSupportsTimeCode
- || value == kAsioSupportsInputMonitor)
- ret = 1L;
- break;
- case kAsioResetRequest:
- // Defer the task and perform the reset of the driver during the
- // next "safe" situation. You cannot reset the driver right now,
- // as this code is called from the driver. Reset the driver is
- // done by completely destruct is. I.e. ASIOStop(),
- // ASIODisposeBuffers(), Destruction Afterwards you initialize the
- // driver again.
- std::cerr << "\nRtApiAsio: driver reset requested!!!" << std::endl;
- ret = 1L;
- break;
- case kAsioResyncRequest:
- // This informs the application that the driver encountered some
- // non-fatal data loss. It is used for synchronization purposes
- // of different media. Added mainly to work around the Win16Mutex
- // problems in Windows 95/98 with the Windows Multimedia system,
- // which could lose data because the Mutex was held too long by
- // another thread. However a driver can issue it in other
- // situations, too.
- // std::cerr << "\nRtApiAsio: driver resync requested!!!" << std::endl;
- asioXRun = true;
- ret = 1L;
- break;
- case kAsioLatenciesChanged:
- // This will inform the host application that the drivers were
- // latencies changed. Beware, it this does not mean that the
- // buffer sizes have changed! You might need to update internal
- // delay data.
- std::cerr << "\nRtApiAsio: driver latency may have changed!!!" << std::endl;
- ret = 1L;
- break;
- case kAsioEngineVersion:
- // Return the supported ASIO version of the host application. If
- // a host application does not implement this selector, ASIO 1.0
- // is assumed by the driver.
- ret = 2L;
- break;
- case kAsioSupportsTimeInfo:
- // Informs the driver whether the
- // asioCallbacks.bufferSwitchTimeInfo() callback is supported.
- // For compatibility with ASIO 1.0 drivers the host application
- // should always support the "old" bufferSwitch method, too.
- ret = 0;
- break;
- case kAsioSupportsTimeCode:
- // Informs the driver whether application is interested in time
- // code info. If an application does not need to know about time
- // code, the driver has less work to do.
- ret = 0;
- break;
- }
- return ret;
-}
-
-static const char* getAsioErrorString( ASIOError result )
-{
- struct Messages
- {
- ASIOError value;
- const char*message;
- };
-
- static const Messages m[] =
- {
- { ASE_NotPresent, "Hardware input or output is not present or available." },
- { ASE_HWMalfunction, "Hardware is malfunctioning." },
- { ASE_InvalidParameter, "Invalid input parameter." },
- { ASE_InvalidMode, "Invalid mode." },
- { ASE_SPNotAdvancing, "Sample position not advancing." },
- { ASE_NoClock, "Sample clock or rate cannot be determined or is not present." },
- { ASE_NoMemory, "Not enough memory to complete the request." }
- };
-
- for ( unsigned int i = 0; i < sizeof(m)/sizeof(m[0]); ++i )
- if ( m[i].value == result ) return m[i].message;
-
- return "Unknown error.";
-}
-
-//******************** End of __WINDOWS_ASIO__ *********************//
-#endif
-
-
-#if defined(__WINDOWS_WASAPI__) // Windows WASAPI API
-
-// Authored by Marcus Tomlinson <themarcustomlinson@gmail.com>, April 2014
-// - Introduces support for the Windows WASAPI API
-// - Aims to deliver bit streams to and from hardware at the lowest possible latency, via the absolute minimum buffer sizes required
-// - Provides flexible stream configuration to an otherwise strict and inflexible WASAPI interface
-// - Includes automatic internal conversion of sample rate and buffer size between hardware and the user
-
-#ifndef INITGUID
- #define INITGUID
-#endif
-#include <audioclient.h>
-#include <avrt.h>
-#include <mmdeviceapi.h>
-#include <functiondiscoverykeys_devpkey.h>
-
-//=============================================================================
-
-#define SAFE_RELEASE( objectPtr )\
-if ( objectPtr )\
-{\
- objectPtr->Release();\
- objectPtr = NULL;\
-}
-
-typedef HANDLE ( __stdcall *TAvSetMmThreadCharacteristicsPtr )( LPCWSTR TaskName, LPDWORD TaskIndex );
-
-//-----------------------------------------------------------------------------
-
-// WASAPI dictates stream sample rate, format, channel count, and in some cases, buffer size.
-// Therefore we must perform all necessary conversions to user buffers in order to satisfy these
-// requirements. WasapiBuffer ring buffers are used between HwIn->UserIn and UserOut->HwOut to
-// provide intermediate storage for read / write synchronization.
-class WasapiBuffer
-{
-public:
- WasapiBuffer()
- : buffer_( NULL ),
- bufferSize_( 0 ),
- inIndex_( 0 ),
- outIndex_( 0 ) {}
-
- ~WasapiBuffer() {
- free( buffer_ );
- }
-
- // sets the length of the internal ring buffer
- void setBufferSize( unsigned int bufferSize, unsigned int formatBytes ) {
- free( buffer_ );
-
- buffer_ = ( char* ) calloc( bufferSize, formatBytes );
-
- bufferSize_ = bufferSize;
- inIndex_ = 0;
- outIndex_ = 0;
- }
-
- // attempt to push a buffer into the ring buffer at the current "in" index
- bool pushBuffer( char* buffer, unsigned int bufferSize, RtAudioFormat format )
- {
- if ( !buffer || // incoming buffer is NULL
- bufferSize == 0 || // incoming buffer has no data
- bufferSize > bufferSize_ ) // incoming buffer too large
- {
- return false;
- }
-
- unsigned int relOutIndex = outIndex_;
- unsigned int inIndexEnd = inIndex_ + bufferSize;
- if ( relOutIndex < inIndex_ && inIndexEnd >= bufferSize_ ) {
- relOutIndex += bufferSize_;
- }
-
- // "in" index can end on the "out" index but cannot begin at it
- if ( inIndex_ <= relOutIndex && inIndexEnd > relOutIndex ) {
- return false; // not enough space between "in" index and "out" index
- }
-
- // copy buffer from external to internal
- int fromZeroSize = inIndex_ + bufferSize - bufferSize_;
- fromZeroSize = fromZeroSize < 0 ? 0 : fromZeroSize;
- int fromInSize = bufferSize - fromZeroSize;
-
- switch( format )
- {
- case RTAUDIO_SINT8:
- memcpy( &( ( char* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( char ) );
- memcpy( buffer_, &( ( char* ) buffer )[fromInSize], fromZeroSize * sizeof( char ) );
- break;
- case RTAUDIO_SINT16:
- memcpy( &( ( short* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( short ) );
- memcpy( buffer_, &( ( short* ) buffer )[fromInSize], fromZeroSize * sizeof( short ) );
- break;
- case RTAUDIO_SINT24:
- memcpy( &( ( S24* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( S24 ) );
- memcpy( buffer_, &( ( S24* ) buffer )[fromInSize], fromZeroSize * sizeof( S24 ) );
- break;
- case RTAUDIO_SINT32:
- memcpy( &( ( int* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( int ) );
- memcpy( buffer_, &( ( int* ) buffer )[fromInSize], fromZeroSize * sizeof( int ) );
- break;
- case RTAUDIO_FLOAT32:
- memcpy( &( ( float* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( float ) );
- memcpy( buffer_, &( ( float* ) buffer )[fromInSize], fromZeroSize * sizeof( float ) );
- break;
- case RTAUDIO_FLOAT64:
- memcpy( &( ( double* ) buffer_ )[inIndex_], buffer, fromInSize * sizeof( double ) );
- memcpy( buffer_, &( ( double* ) buffer )[fromInSize], fromZeroSize * sizeof( double ) );
- break;
- }
-
- // update "in" index
- inIndex_ += bufferSize;
- inIndex_ %= bufferSize_;
-
- return true;
- }
-
- // attempt to pull a buffer from the ring buffer from the current "out" index
- bool pullBuffer( char* buffer, unsigned int bufferSize, RtAudioFormat format )
- {
- if ( !buffer || // incoming buffer is NULL
- bufferSize == 0 || // incoming buffer has no data
- bufferSize > bufferSize_ ) // incoming buffer too large
- {
- return false;
- }
-
- unsigned int relInIndex = inIndex_;
- unsigned int outIndexEnd = outIndex_ + bufferSize;
- if ( relInIndex < outIndex_ && outIndexEnd >= bufferSize_ ) {
- relInIndex += bufferSize_;
- }
-
- // "out" index can begin at and end on the "in" index
- if ( outIndex_ < relInIndex && outIndexEnd > relInIndex ) {
- return false; // not enough space between "out" index and "in" index
- }
-
- // copy buffer from internal to external
- int fromZeroSize = outIndex_ + bufferSize - bufferSize_;
- fromZeroSize = fromZeroSize < 0 ? 0 : fromZeroSize;
- int fromOutSize = bufferSize - fromZeroSize;
-
- switch( format )
- {
- case RTAUDIO_SINT8:
- memcpy( buffer, &( ( char* ) buffer_ )[outIndex_], fromOutSize * sizeof( char ) );
- memcpy( &( ( char* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( char ) );
- break;
- case RTAUDIO_SINT16:
- memcpy( buffer, &( ( short* ) buffer_ )[outIndex_], fromOutSize * sizeof( short ) );
- memcpy( &( ( short* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( short ) );
- break;
- case RTAUDIO_SINT24:
- memcpy( buffer, &( ( S24* ) buffer_ )[outIndex_], fromOutSize * sizeof( S24 ) );
- memcpy( &( ( S24* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( S24 ) );
- break;
- case RTAUDIO_SINT32:
- memcpy( buffer, &( ( int* ) buffer_ )[outIndex_], fromOutSize * sizeof( int ) );
- memcpy( &( ( int* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( int ) );
- break;
- case RTAUDIO_FLOAT32:
- memcpy( buffer, &( ( float* ) buffer_ )[outIndex_], fromOutSize * sizeof( float ) );
- memcpy( &( ( float* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( float ) );
- break;
- case RTAUDIO_FLOAT64:
- memcpy( buffer, &( ( double* ) buffer_ )[outIndex_], fromOutSize * sizeof( double ) );
- memcpy( &( ( double* ) buffer )[fromOutSize], buffer_, fromZeroSize * sizeof( double ) );
- break;
- }
-
- // update "out" index
- outIndex_ += bufferSize;
- outIndex_ %= bufferSize_;
-
- return true;
- }
-
-private:
- char* buffer_;
- unsigned int bufferSize_;
- unsigned int inIndex_;
- unsigned int outIndex_;
-};
-
-//-----------------------------------------------------------------------------
-
-// In order to satisfy WASAPI's buffer requirements, we need a means of converting sample rate
-// between HW and the user. The convertBufferWasapi function is used to perform this conversion
-// between HwIn->UserIn and UserOut->HwOut during the stream callback loop.
-// This sample rate converter favors speed over quality, and works best with conversions between
-// one rate and its multiple.
-void convertBufferWasapi( char* outBuffer,
- const char* inBuffer,
- const unsigned int& channelCount,
- const unsigned int& inSampleRate,
- const unsigned int& outSampleRate,
- const unsigned int& inSampleCount,
- unsigned int& outSampleCount,
- const RtAudioFormat& format )
-{
- // calculate the new outSampleCount and relative sampleStep
- float sampleRatio = ( float ) outSampleRate / inSampleRate;
- float sampleStep = 1.0f / sampleRatio;
- float inSampleFraction = 0.0f;
-
- outSampleCount = ( unsigned int ) roundf( inSampleCount * sampleRatio );
-
- // frame-by-frame, copy each relative input sample into it's corresponding output sample
- for ( unsigned int outSample = 0; outSample < outSampleCount; outSample++ )
- {
- unsigned int inSample = ( unsigned int ) inSampleFraction;
-
- switch ( format )
- {
- case RTAUDIO_SINT8:
- memcpy( &( ( char* ) outBuffer )[ outSample * channelCount ], &( ( char* ) inBuffer )[ inSample * channelCount ], channelCount * sizeof( char ) );
- break;
- case RTAUDIO_SINT16:
- memcpy( &( ( short* ) outBuffer )[ outSample * channelCount ], &( ( short* ) inBuffer )[ inSample * channelCount ], channelCount * sizeof( short ) );
- break;
- case RTAUDIO_SINT24:
- memcpy( &( ( S24* ) outBuffer )[ outSample * channelCount ], &( ( S24* ) inBuffer )[ inSample * channelCount ], channelCount * sizeof( S24 ) );
- break;
- case RTAUDIO_SINT32:
- memcpy( &( ( int* ) outBuffer )[ outSample * channelCount ], &( ( int* ) inBuffer )[ inSample * channelCount ], channelCount * sizeof( int ) );
- break;
- case RTAUDIO_FLOAT32:
- memcpy( &( ( float* ) outBuffer )[ outSample * channelCount ], &( ( float* ) inBuffer )[ inSample * channelCount ], channelCount * sizeof( float ) );
- break;
- case RTAUDIO_FLOAT64:
- memcpy( &( ( double* ) outBuffer )[ outSample * channelCount ], &( ( double* ) inBuffer )[ inSample * channelCount ], channelCount * sizeof( double ) );
- break;
- }
-
- // jump to next in sample
- inSampleFraction += sampleStep;
- }
-}
-
-//-----------------------------------------------------------------------------
-
-// A structure to hold various information related to the WASAPI implementation.
-struct WasapiHandle
-{
- IAudioClient* captureAudioClient;
- IAudioClient* renderAudioClient;
- IAudioCaptureClient* captureClient;
- IAudioRenderClient* renderClient;
- HANDLE captureEvent;
- HANDLE renderEvent;
-
- WasapiHandle()
- : captureAudioClient( NULL ),
- renderAudioClient( NULL ),
- captureClient( NULL ),
- renderClient( NULL ),
- captureEvent( NULL ),
- renderEvent( NULL ) {}
-};
-
-//=============================================================================
-
-RtApiWasapi::RtApiWasapi()
- : coInitialized_( false ), deviceEnumerator_( NULL )
-{
- // WASAPI can run either apartment or multi-threaded
- HRESULT hr = CoInitialize( NULL );
- if ( !FAILED( hr ) )
- coInitialized_ = true;
-
- // Instantiate device enumerator
- hr = CoCreateInstance( __uuidof( MMDeviceEnumerator ), NULL,
- CLSCTX_ALL, __uuidof( IMMDeviceEnumerator ),
- ( void** ) &deviceEnumerator_ );
-
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::RtApiWasapi: Unable to instantiate device enumerator";
- error( RtAudioError::DRIVER_ERROR );
- }
-}
-
-//-----------------------------------------------------------------------------
-
-RtApiWasapi::~RtApiWasapi()
-{
- if ( stream_.state != STREAM_CLOSED )
- closeStream();
-
- SAFE_RELEASE( deviceEnumerator_ );
-
- // If this object previously called CoInitialize()
- if ( coInitialized_ )
- CoUninitialize();
-}
-
-//=============================================================================
-
-unsigned int RtApiWasapi::getDeviceCount( void )
-{
- unsigned int captureDeviceCount = 0;
- unsigned int renderDeviceCount = 0;
-
- IMMDeviceCollection* captureDevices = NULL;
- IMMDeviceCollection* renderDevices = NULL;
-
- // Count capture devices
- errorText_.clear();
- HRESULT hr = deviceEnumerator_->EnumAudioEndpoints( eCapture, DEVICE_STATE_ACTIVE, &captureDevices );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceCount: Unable to retrieve capture device collection.";
- goto Exit;
- }
-
- hr = captureDevices->GetCount( &captureDeviceCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceCount: Unable to retrieve capture device count.";
- goto Exit;
- }
-
- // Count render devices
- hr = deviceEnumerator_->EnumAudioEndpoints( eRender, DEVICE_STATE_ACTIVE, &renderDevices );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceCount: Unable to retrieve render device collection.";
- goto Exit;
- }
-
- hr = renderDevices->GetCount( &renderDeviceCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceCount: Unable to retrieve render device count.";
- goto Exit;
- }
-
-Exit:
- // release all references
- SAFE_RELEASE( captureDevices );
- SAFE_RELEASE( renderDevices );
-
- if ( errorText_.empty() )
- return captureDeviceCount + renderDeviceCount;
-
- error( RtAudioError::DRIVER_ERROR );
- return 0;
-}
-
-//-----------------------------------------------------------------------------
-
-RtAudio::DeviceInfo RtApiWasapi::getDeviceInfo( unsigned int device )
-{
- RtAudio::DeviceInfo info;
- unsigned int captureDeviceCount = 0;
- unsigned int renderDeviceCount = 0;
- std::string defaultDeviceName;
- bool isCaptureDevice = false;
-
- PROPVARIANT deviceNameProp;
- PROPVARIANT defaultDeviceNameProp;
-
- IMMDeviceCollection* captureDevices = NULL;
- IMMDeviceCollection* renderDevices = NULL;
- IMMDevice* devicePtr = NULL;
- IMMDevice* defaultDevicePtr = NULL;
- IAudioClient* audioClient = NULL;
- IPropertyStore* devicePropStore = NULL;
- IPropertyStore* defaultDevicePropStore = NULL;
-
- WAVEFORMATEX* deviceFormat = NULL;
- WAVEFORMATEX* closestMatchFormat = NULL;
-
- // probed
- info.probed = false;
-
- // Count capture devices
- errorText_.clear();
- RtAudioError::Type errorType = RtAudioError::DRIVER_ERROR;
- HRESULT hr = deviceEnumerator_->EnumAudioEndpoints( eCapture, DEVICE_STATE_ACTIVE, &captureDevices );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve capture device collection.";
- goto Exit;
- }
-
- hr = captureDevices->GetCount( &captureDeviceCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve capture device count.";
- goto Exit;
- }
-
- // Count render devices
- hr = deviceEnumerator_->EnumAudioEndpoints( eRender, DEVICE_STATE_ACTIVE, &renderDevices );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve render device collection.";
- goto Exit;
- }
-
- hr = renderDevices->GetCount( &renderDeviceCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve render device count.";
- goto Exit;
- }
-
- // validate device index
- if ( device >= captureDeviceCount + renderDeviceCount ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Invalid device index.";
- errorType = RtAudioError::INVALID_USE;
- goto Exit;
- }
-
- // determine whether index falls within capture or render devices
- if ( device >= renderDeviceCount ) {
- hr = captureDevices->Item( device - renderDeviceCount, &devicePtr );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve capture device handle.";
- goto Exit;
- }
- isCaptureDevice = true;
- }
- else {
- hr = renderDevices->Item( device, &devicePtr );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve render device handle.";
- goto Exit;
- }
- isCaptureDevice = false;
- }
-
- // get default device name
- if ( isCaptureDevice ) {
- hr = deviceEnumerator_->GetDefaultAudioEndpoint( eCapture, eConsole, &defaultDevicePtr );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve default capture device handle.";
- goto Exit;
- }
- }
- else {
- hr = deviceEnumerator_->GetDefaultAudioEndpoint( eRender, eConsole, &defaultDevicePtr );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve default render device handle.";
- goto Exit;
- }
- }
-
- hr = defaultDevicePtr->OpenPropertyStore( STGM_READ, &defaultDevicePropStore );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to open default device property store.";
- goto Exit;
- }
- PropVariantInit( &defaultDeviceNameProp );
-
- hr = defaultDevicePropStore->GetValue( PKEY_Device_FriendlyName, &defaultDeviceNameProp );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve default device property: PKEY_Device_FriendlyName.";
- goto Exit;
- }
-
- defaultDeviceName = convertCharPointerToStdString(defaultDeviceNameProp.pwszVal);
-
- // name
- hr = devicePtr->OpenPropertyStore( STGM_READ, &devicePropStore );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to open device property store.";
- goto Exit;
- }
-
- PropVariantInit( &deviceNameProp );
-
- hr = devicePropStore->GetValue( PKEY_Device_FriendlyName, &deviceNameProp );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve device property: PKEY_Device_FriendlyName.";
- goto Exit;
- }
-
- info.name =convertCharPointerToStdString(deviceNameProp.pwszVal);
-
- // is default
- if ( isCaptureDevice ) {
- info.isDefaultInput = info.name == defaultDeviceName;
- info.isDefaultOutput = false;
- }
- else {
- info.isDefaultInput = false;
- info.isDefaultOutput = info.name == defaultDeviceName;
- }
-
- // channel count
- hr = devicePtr->Activate( __uuidof( IAudioClient ), CLSCTX_ALL, NULL, ( void** ) &audioClient );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve device audio client.";
- goto Exit;
- }
-
- hr = audioClient->GetMixFormat( &deviceFormat );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::getDeviceInfo: Unable to retrieve device mix format.";
- goto Exit;
- }
-
- if ( isCaptureDevice ) {
- info.inputChannels = deviceFormat->nChannels;
- info.outputChannels = 0;
- info.duplexChannels = 0;
- }
- else {
- info.inputChannels = 0;
- info.outputChannels = deviceFormat->nChannels;
- info.duplexChannels = 0;
- }
-
- // sample rates
- info.sampleRates.clear();
-
- // allow support for all sample rates as we have a built-in sample rate converter
- for ( unsigned int i = 0; i < MAX_SAMPLE_RATES; i++ ) {
- info.sampleRates.push_back( SAMPLE_RATES[i] );
- }
- info.preferredSampleRate = deviceFormat->nSamplesPerSec;
-
- // native format
- info.nativeFormats = 0;
-
- if ( deviceFormat->wFormatTag == WAVE_FORMAT_IEEE_FLOAT ||
- ( deviceFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
- ( ( WAVEFORMATEXTENSIBLE* ) deviceFormat )->SubFormat == KSDATAFORMAT_SUBTYPE_IEEE_FLOAT ) )
- {
- if ( deviceFormat->wBitsPerSample == 32 ) {
- info.nativeFormats |= RTAUDIO_FLOAT32;
- }
- else if ( deviceFormat->wBitsPerSample == 64 ) {
- info.nativeFormats |= RTAUDIO_FLOAT64;
- }
- }
- else if ( deviceFormat->wFormatTag == WAVE_FORMAT_PCM ||
- ( deviceFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
- ( ( WAVEFORMATEXTENSIBLE* ) deviceFormat )->SubFormat == KSDATAFORMAT_SUBTYPE_PCM ) )
- {
- if ( deviceFormat->wBitsPerSample == 8 ) {
- info.nativeFormats |= RTAUDIO_SINT8;
- }
- else if ( deviceFormat->wBitsPerSample == 16 ) {
- info.nativeFormats |= RTAUDIO_SINT16;
- }
- else if ( deviceFormat->wBitsPerSample == 24 ) {
- info.nativeFormats |= RTAUDIO_SINT24;
- }
- else if ( deviceFormat->wBitsPerSample == 32 ) {
- info.nativeFormats |= RTAUDIO_SINT32;
- }
- }
-
- // probed
- info.probed = true;
-
-Exit:
- // release all references
- PropVariantClear( &deviceNameProp );
- PropVariantClear( &defaultDeviceNameProp );
-
- SAFE_RELEASE( captureDevices );
- SAFE_RELEASE( renderDevices );
- SAFE_RELEASE( devicePtr );
- SAFE_RELEASE( defaultDevicePtr );
- SAFE_RELEASE( audioClient );
- SAFE_RELEASE( devicePropStore );
- SAFE_RELEASE( defaultDevicePropStore );
-
- CoTaskMemFree( deviceFormat );
- CoTaskMemFree( closestMatchFormat );
-
- if ( !errorText_.empty() )
- error( errorType );
- return info;
-}
-
-//-----------------------------------------------------------------------------
-
-unsigned int RtApiWasapi::getDefaultOutputDevice( void )
-{
- for ( unsigned int i = 0; i < getDeviceCount(); i++ ) {
- if ( getDeviceInfo( i ).isDefaultOutput ) {
- return i;
- }
- }
-
- return 0;
-}
-
-//-----------------------------------------------------------------------------
-
-unsigned int RtApiWasapi::getDefaultInputDevice( void )
-{
- for ( unsigned int i = 0; i < getDeviceCount(); i++ ) {
- if ( getDeviceInfo( i ).isDefaultInput ) {
- return i;
- }
- }
-
- return 0;
-}
-
-//-----------------------------------------------------------------------------
-
-void RtApiWasapi::closeStream( void )
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiWasapi::closeStream: No open stream to close.";
- error( RtAudioError::WARNING );
- return;
- }
-
- if ( stream_.state != STREAM_STOPPED )
- stopStream();
-
- // clean up stream memory
- SAFE_RELEASE( ( ( WasapiHandle* ) stream_.apiHandle )->captureAudioClient )
- SAFE_RELEASE( ( ( WasapiHandle* ) stream_.apiHandle )->renderAudioClient )
-
- SAFE_RELEASE( ( ( WasapiHandle* ) stream_.apiHandle )->captureClient )
- SAFE_RELEASE( ( ( WasapiHandle* ) stream_.apiHandle )->renderClient )
-
- if ( ( ( WasapiHandle* ) stream_.apiHandle )->captureEvent )
- CloseHandle( ( ( WasapiHandle* ) stream_.apiHandle )->captureEvent );
-
- if ( ( ( WasapiHandle* ) stream_.apiHandle )->renderEvent )
- CloseHandle( ( ( WasapiHandle* ) stream_.apiHandle )->renderEvent );
-
- delete ( WasapiHandle* ) stream_.apiHandle;
- stream_.apiHandle = NULL;
-
- for ( int i = 0; i < 2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- // update stream state
- stream_.state = STREAM_CLOSED;
-}
-
-//-----------------------------------------------------------------------------
-
-void RtApiWasapi::startStream( void )
-{
- verifyStream();
-
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiWasapi::startStream: The stream is already running.";
- error( RtAudioError::WARNING );
- return;
- }
-
- // update stream state
- stream_.state = STREAM_RUNNING;
-
- // create WASAPI stream thread
- stream_.callbackInfo.thread = ( ThreadHandle ) CreateThread( NULL, 0, runWasapiThread, this, CREATE_SUSPENDED, NULL );
-
- if ( !stream_.callbackInfo.thread ) {
- errorText_ = "RtApiWasapi::startStream: Unable to instantiate callback thread.";
- error( RtAudioError::THREAD_ERROR );
- }
- else {
- SetThreadPriority( ( void* ) stream_.callbackInfo.thread, stream_.callbackInfo.priority );
- ResumeThread( ( void* ) stream_.callbackInfo.thread );
- }
-}
-
-//-----------------------------------------------------------------------------
-
-void RtApiWasapi::stopStream( void )
-{
- verifyStream();
-
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiWasapi::stopStream: The stream is already stopped.";
- error( RtAudioError::WARNING );
- return;
- }
-
- // inform stream thread by setting stream state to STREAM_STOPPING
- stream_.state = STREAM_STOPPING;
-
- // wait until stream thread is stopped
- while( stream_.state != STREAM_STOPPED ) {
- Sleep( 1 );
- }
-
- // Wait for the last buffer to play before stopping.
- Sleep( 1000 * stream_.bufferSize / stream_.sampleRate );
-
- // stop capture client if applicable
- if ( ( ( WasapiHandle* ) stream_.apiHandle )->captureAudioClient ) {
- HRESULT hr = ( ( WasapiHandle* ) stream_.apiHandle )->captureAudioClient->Stop();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::stopStream: Unable to stop capture stream.";
- error( RtAudioError::DRIVER_ERROR );
- return;
- }
- }
-
- // stop render client if applicable
- if ( ( ( WasapiHandle* ) stream_.apiHandle )->renderAudioClient ) {
- HRESULT hr = ( ( WasapiHandle* ) stream_.apiHandle )->renderAudioClient->Stop();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::stopStream: Unable to stop render stream.";
- error( RtAudioError::DRIVER_ERROR );
- return;
- }
- }
-
- // close thread handle
- if ( stream_.callbackInfo.thread && !CloseHandle( ( void* ) stream_.callbackInfo.thread ) ) {
- errorText_ = "RtApiWasapi::stopStream: Unable to close callback thread.";
- error( RtAudioError::THREAD_ERROR );
- return;
- }
-
- stream_.callbackInfo.thread = (ThreadHandle) NULL;
-}
-
-//-----------------------------------------------------------------------------
-
-void RtApiWasapi::abortStream( void )
-{
- verifyStream();
-
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiWasapi::abortStream: The stream is already stopped.";
- error( RtAudioError::WARNING );
- return;
- }
-
- // inform stream thread by setting stream state to STREAM_STOPPING
- stream_.state = STREAM_STOPPING;
-
- // wait until stream thread is stopped
- while ( stream_.state != STREAM_STOPPED ) {
- Sleep( 1 );
- }
-
- // stop capture client if applicable
- if ( ( ( WasapiHandle* ) stream_.apiHandle )->captureAudioClient ) {
- HRESULT hr = ( ( WasapiHandle* ) stream_.apiHandle )->captureAudioClient->Stop();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::abortStream: Unable to stop capture stream.";
- error( RtAudioError::DRIVER_ERROR );
- return;
- }
- }
-
- // stop render client if applicable
- if ( ( ( WasapiHandle* ) stream_.apiHandle )->renderAudioClient ) {
- HRESULT hr = ( ( WasapiHandle* ) stream_.apiHandle )->renderAudioClient->Stop();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::abortStream: Unable to stop render stream.";
- error( RtAudioError::DRIVER_ERROR );
- return;
- }
- }
-
- // close thread handle
- if ( stream_.callbackInfo.thread && !CloseHandle( ( void* ) stream_.callbackInfo.thread ) ) {
- errorText_ = "RtApiWasapi::abortStream: Unable to close callback thread.";
- error( RtAudioError::THREAD_ERROR );
- return;
- }
-
- stream_.callbackInfo.thread = (ThreadHandle) NULL;
-}
-
-//-----------------------------------------------------------------------------
-
-bool RtApiWasapi::probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int* bufferSize,
- RtAudio::StreamOptions* options )
-{
- bool methodResult = FAILURE;
- unsigned int captureDeviceCount = 0;
- unsigned int renderDeviceCount = 0;
-
- IMMDeviceCollection* captureDevices = NULL;
- IMMDeviceCollection* renderDevices = NULL;
- IMMDevice* devicePtr = NULL;
- WAVEFORMATEX* deviceFormat = NULL;
- unsigned int bufferBytes;
- stream_.state = STREAM_STOPPED;
-
- // create API Handle if not already created
- if ( !stream_.apiHandle )
- stream_.apiHandle = ( void* ) new WasapiHandle();
-
- // Count capture devices
- errorText_.clear();
- RtAudioError::Type errorType = RtAudioError::DRIVER_ERROR;
- HRESULT hr = deviceEnumerator_->EnumAudioEndpoints( eCapture, DEVICE_STATE_ACTIVE, &captureDevices );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve capture device collection.";
- goto Exit;
- }
-
- hr = captureDevices->GetCount( &captureDeviceCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve capture device count.";
- goto Exit;
- }
-
- // Count render devices
- hr = deviceEnumerator_->EnumAudioEndpoints( eRender, DEVICE_STATE_ACTIVE, &renderDevices );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve render device collection.";
- goto Exit;
- }
-
- hr = renderDevices->GetCount( &renderDeviceCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve render device count.";
- goto Exit;
- }
-
- // validate device index
- if ( device >= captureDeviceCount + renderDeviceCount ) {
- errorType = RtAudioError::INVALID_USE;
- errorText_ = "RtApiWasapi::probeDeviceOpen: Invalid device index.";
- goto Exit;
- }
-
- // determine whether index falls within capture or render devices
- if ( device >= renderDeviceCount ) {
- if ( mode != INPUT ) {
- errorType = RtAudioError::INVALID_USE;
- errorText_ = "RtApiWasapi::probeDeviceOpen: Capture device selected as output device.";
- goto Exit;
- }
-
- // retrieve captureAudioClient from devicePtr
- IAudioClient*& captureAudioClient = ( ( WasapiHandle* ) stream_.apiHandle )->captureAudioClient;
-
- hr = captureDevices->Item( device - renderDeviceCount, &devicePtr );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve capture device handle.";
- goto Exit;
- }
-
- hr = devicePtr->Activate( __uuidof( IAudioClient ), CLSCTX_ALL,
- NULL, ( void** ) &captureAudioClient );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve device audio client.";
- goto Exit;
- }
-
- hr = captureAudioClient->GetMixFormat( &deviceFormat );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve device mix format.";
- goto Exit;
- }
-
- stream_.nDeviceChannels[mode] = deviceFormat->nChannels;
- captureAudioClient->GetStreamLatency( ( long long* ) &stream_.latency[mode] );
- }
- else {
- if ( mode != OUTPUT ) {
- errorType = RtAudioError::INVALID_USE;
- errorText_ = "RtApiWasapi::probeDeviceOpen: Render device selected as input device.";
- goto Exit;
- }
-
- // retrieve renderAudioClient from devicePtr
- IAudioClient*& renderAudioClient = ( ( WasapiHandle* ) stream_.apiHandle )->renderAudioClient;
-
- hr = renderDevices->Item( device, &devicePtr );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve render device handle.";
- goto Exit;
- }
-
- hr = devicePtr->Activate( __uuidof( IAudioClient ), CLSCTX_ALL,
- NULL, ( void** ) &renderAudioClient );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve device audio client.";
- goto Exit;
- }
-
- hr = renderAudioClient->GetMixFormat( &deviceFormat );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::probeDeviceOpen: Unable to retrieve device mix format.";
- goto Exit;
- }
-
- stream_.nDeviceChannels[mode] = deviceFormat->nChannels;
- renderAudioClient->GetStreamLatency( ( long long* ) &stream_.latency[mode] );
- }
-
- // fill stream data
- if ( ( stream_.mode == OUTPUT && mode == INPUT ) ||
- ( stream_.mode == INPUT && mode == OUTPUT ) ) {
- stream_.mode = DUPLEX;
- }
- else {
- stream_.mode = mode;
- }
-
- stream_.device[mode] = device;
- stream_.doByteSwap[mode] = false;
- stream_.sampleRate = sampleRate;
- stream_.bufferSize = *bufferSize;
- stream_.nBuffers = 1;
- stream_.nUserChannels[mode] = channels;
- stream_.channelOffset[mode] = firstChannel;
- stream_.userFormat = format;
- stream_.deviceFormat[mode] = getDeviceInfo( device ).nativeFormats;
-
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED )
- stream_.userInterleaved = false;
- else
- stream_.userInterleaved = true;
- stream_.deviceInterleaved[mode] = true;
-
- // Set flags for buffer conversion.
- stream_.doConvertBuffer[mode] = false;
- if ( stream_.userFormat != stream_.deviceFormat[mode] ||
- stream_.nUserChannels != stream_.nDeviceChannels )
- stream_.doConvertBuffer[mode] = true;
- else if ( stream_.userInterleaved != stream_.deviceInterleaved[mode] &&
- stream_.nUserChannels[mode] > 1 )
- stream_.doConvertBuffer[mode] = true;
-
- if ( stream_.doConvertBuffer[mode] )
- setConvertInfo( mode, 0 );
-
- // Allocate necessary internal buffers
- bufferBytes = stream_.nUserChannels[mode] * stream_.bufferSize * formatBytes( stream_.userFormat );
-
- stream_.userBuffer[mode] = ( char* ) calloc( bufferBytes, 1 );
- if ( !stream_.userBuffer[mode] ) {
- errorType = RtAudioError::MEMORY_ERROR;
- errorText_ = "RtApiWasapi::probeDeviceOpen: Error allocating user buffer memory.";
- goto Exit;
- }
-
- if ( options && options->flags & RTAUDIO_SCHEDULE_REALTIME )
- stream_.callbackInfo.priority = 15;
- else
- stream_.callbackInfo.priority = 0;
-
- ///! TODO: RTAUDIO_MINIMIZE_LATENCY // Provide stream buffers directly to callback
- ///! TODO: RTAUDIO_HOG_DEVICE // Exclusive mode
-
- methodResult = SUCCESS;
-
-Exit:
- //clean up
- SAFE_RELEASE( captureDevices );
- SAFE_RELEASE( renderDevices );
- SAFE_RELEASE( devicePtr );
- CoTaskMemFree( deviceFormat );
-
- // if method failed, close the stream
- if ( methodResult == FAILURE )
- closeStream();
-
- if ( !errorText_.empty() )
- error( errorType );
- return methodResult;
-}
-
-//=============================================================================
-
-DWORD WINAPI RtApiWasapi::runWasapiThread( void* wasapiPtr )
-{
- if ( wasapiPtr )
- ( ( RtApiWasapi* ) wasapiPtr )->wasapiThread();
-
- return 0;
-}
-
-DWORD WINAPI RtApiWasapi::stopWasapiThread( void* wasapiPtr )
-{
- if ( wasapiPtr )
- ( ( RtApiWasapi* ) wasapiPtr )->stopStream();
-
- return 0;
-}
-
-DWORD WINAPI RtApiWasapi::abortWasapiThread( void* wasapiPtr )
-{
- if ( wasapiPtr )
- ( ( RtApiWasapi* ) wasapiPtr )->abortStream();
-
- return 0;
-}
-
-//-----------------------------------------------------------------------------
-
-void RtApiWasapi::wasapiThread()
-{
- // as this is a new thread, we must CoInitialize it
- CoInitialize( NULL );
-
- HRESULT hr;
-
- IAudioClient* captureAudioClient = ( ( WasapiHandle* ) stream_.apiHandle )->captureAudioClient;
- IAudioClient* renderAudioClient = ( ( WasapiHandle* ) stream_.apiHandle )->renderAudioClient;
- IAudioCaptureClient* captureClient = ( ( WasapiHandle* ) stream_.apiHandle )->captureClient;
- IAudioRenderClient* renderClient = ( ( WasapiHandle* ) stream_.apiHandle )->renderClient;
- HANDLE captureEvent = ( ( WasapiHandle* ) stream_.apiHandle )->captureEvent;
- HANDLE renderEvent = ( ( WasapiHandle* ) stream_.apiHandle )->renderEvent;
-
- WAVEFORMATEX* captureFormat = NULL;
- WAVEFORMATEX* renderFormat = NULL;
- float captureSrRatio = 0.0f;
- float renderSrRatio = 0.0f;
- WasapiBuffer captureBuffer;
- WasapiBuffer renderBuffer;
-
- // declare local stream variables
- RtAudioCallback callback = ( RtAudioCallback ) stream_.callbackInfo.callback;
- BYTE* streamBuffer = NULL;
- unsigned long captureFlags = 0;
- unsigned int bufferFrameCount = 0;
- unsigned int numFramesPadding = 0;
- unsigned int convBufferSize = 0;
- bool callbackPushed = false;
- bool callbackPulled = false;
- bool callbackStopped = false;
- int callbackResult = 0;
-
- // convBuffer is used to store converted buffers between WASAPI and the user
- char* convBuffer = NULL;
- unsigned int convBuffSize = 0;
- unsigned int deviceBuffSize = 0;
-
- errorText_.clear();
- RtAudioError::Type errorType = RtAudioError::DRIVER_ERROR;
-
- // Attempt to assign "Pro Audio" characteristic to thread
- HMODULE AvrtDll = LoadLibrary( (LPCTSTR) "AVRT.dll" );
- if ( AvrtDll ) {
- DWORD taskIndex = 0;
- TAvSetMmThreadCharacteristicsPtr AvSetMmThreadCharacteristicsPtr = ( TAvSetMmThreadCharacteristicsPtr ) GetProcAddress( AvrtDll, "AvSetMmThreadCharacteristicsW" );
- AvSetMmThreadCharacteristicsPtr( L"Pro Audio", &taskIndex );
- FreeLibrary( AvrtDll );
- }
-
- // start capture stream if applicable
- if ( captureAudioClient ) {
- hr = captureAudioClient->GetMixFormat( &captureFormat );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve device mix format.";
- goto Exit;
- }
-
- captureSrRatio = ( ( float ) captureFormat->nSamplesPerSec / stream_.sampleRate );
-
- // initialize capture stream according to desire buffer size
- float desiredBufferSize = stream_.bufferSize * captureSrRatio;
- REFERENCE_TIME desiredBufferPeriod = ( REFERENCE_TIME ) ( ( float ) desiredBufferSize * 10000000 / captureFormat->nSamplesPerSec );
-
- if ( !captureClient ) {
- hr = captureAudioClient->Initialize( AUDCLNT_SHAREMODE_SHARED,
- AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
- desiredBufferPeriod,
- desiredBufferPeriod,
- captureFormat,
- NULL );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to initialize capture audio client.";
- goto Exit;
- }
-
- hr = captureAudioClient->GetService( __uuidof( IAudioCaptureClient ),
- ( void** ) &captureClient );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve capture client handle.";
- goto Exit;
- }
-
- // configure captureEvent to trigger on every available capture buffer
- captureEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
- if ( !captureEvent ) {
- errorType = RtAudioError::SYSTEM_ERROR;
- errorText_ = "RtApiWasapi::wasapiThread: Unable to create capture event.";
- goto Exit;
- }
-
- hr = captureAudioClient->SetEventHandle( captureEvent );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to set capture event handle.";
- goto Exit;
- }
-
- ( ( WasapiHandle* ) stream_.apiHandle )->captureClient = captureClient;
- ( ( WasapiHandle* ) stream_.apiHandle )->captureEvent = captureEvent;
- }
-
- unsigned int inBufferSize = 0;
- hr = captureAudioClient->GetBufferSize( &inBufferSize );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to get capture buffer size.";
- goto Exit;
- }
-
- // scale outBufferSize according to stream->user sample rate ratio
- unsigned int outBufferSize = ( unsigned int ) ( stream_.bufferSize * captureSrRatio ) * stream_.nDeviceChannels[INPUT];
- inBufferSize *= stream_.nDeviceChannels[INPUT];
-
- // set captureBuffer size
- captureBuffer.setBufferSize( inBufferSize + outBufferSize, formatBytes( stream_.deviceFormat[INPUT] ) );
-
- // reset the capture stream
- hr = captureAudioClient->Reset();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to reset capture stream.";
- goto Exit;
- }
-
- // start the capture stream
- hr = captureAudioClient->Start();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to start capture stream.";
- goto Exit;
- }
- }
-
- // start render stream if applicable
- if ( renderAudioClient ) {
- hr = renderAudioClient->GetMixFormat( &renderFormat );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve device mix format.";
- goto Exit;
- }
-
- renderSrRatio = ( ( float ) renderFormat->nSamplesPerSec / stream_.sampleRate );
-
- // initialize render stream according to desire buffer size
- float desiredBufferSize = stream_.bufferSize * renderSrRatio;
- REFERENCE_TIME desiredBufferPeriod = ( REFERENCE_TIME ) ( ( float ) desiredBufferSize * 10000000 / renderFormat->nSamplesPerSec );
-
- if ( !renderClient ) {
- hr = renderAudioClient->Initialize( AUDCLNT_SHAREMODE_SHARED,
- AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
- desiredBufferPeriod,
- desiredBufferPeriod,
- renderFormat,
- NULL );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to initialize render audio client.";
- goto Exit;
- }
-
- hr = renderAudioClient->GetService( __uuidof( IAudioRenderClient ),
- ( void** ) &renderClient );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve render client handle.";
- goto Exit;
- }
-
- // configure renderEvent to trigger on every available render buffer
- renderEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
- if ( !renderEvent ) {
- errorType = RtAudioError::SYSTEM_ERROR;
- errorText_ = "RtApiWasapi::wasapiThread: Unable to create render event.";
- goto Exit;
- }
-
- hr = renderAudioClient->SetEventHandle( renderEvent );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to set render event handle.";
- goto Exit;
- }
-
- ( ( WasapiHandle* ) stream_.apiHandle )->renderClient = renderClient;
- ( ( WasapiHandle* ) stream_.apiHandle )->renderEvent = renderEvent;
- }
-
- unsigned int outBufferSize = 0;
- hr = renderAudioClient->GetBufferSize( &outBufferSize );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to get render buffer size.";
- goto Exit;
- }
-
- // scale inBufferSize according to user->stream sample rate ratio
- unsigned int inBufferSize = ( unsigned int ) ( stream_.bufferSize * renderSrRatio ) * stream_.nDeviceChannels[OUTPUT];
- outBufferSize *= stream_.nDeviceChannels[OUTPUT];
-
- // set renderBuffer size
- renderBuffer.setBufferSize( inBufferSize + outBufferSize, formatBytes( stream_.deviceFormat[OUTPUT] ) );
-
- // reset the render stream
- hr = renderAudioClient->Reset();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to reset render stream.";
- goto Exit;
- }
-
- // start the render stream
- hr = renderAudioClient->Start();
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to start render stream.";
- goto Exit;
- }
- }
-
- if ( stream_.mode == INPUT ) {
- convBuffSize = ( size_t ) ( stream_.bufferSize * captureSrRatio ) * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] );
- deviceBuffSize = stream_.bufferSize * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] );
- }
- else if ( stream_.mode == OUTPUT ) {
- convBuffSize = ( size_t ) ( stream_.bufferSize * renderSrRatio ) * stream_.nDeviceChannels[OUTPUT] * formatBytes( stream_.deviceFormat[OUTPUT] );
- deviceBuffSize = stream_.bufferSize * stream_.nDeviceChannels[OUTPUT] * formatBytes( stream_.deviceFormat[OUTPUT] );
- }
- else if ( stream_.mode == DUPLEX ) {
- convBuffSize = std::max( ( size_t ) ( stream_.bufferSize * captureSrRatio ) * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] ),
- ( size_t ) ( stream_.bufferSize * renderSrRatio ) * stream_.nDeviceChannels[OUTPUT] * formatBytes( stream_.deviceFormat[OUTPUT] ) );
- deviceBuffSize = std::max( stream_.bufferSize * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] ),
- stream_.bufferSize * stream_.nDeviceChannels[OUTPUT] * formatBytes( stream_.deviceFormat[OUTPUT] ) );
- }
-
- convBuffer = ( char* ) malloc( convBuffSize );
- stream_.deviceBuffer = ( char* ) malloc( deviceBuffSize );
- if ( !convBuffer || !stream_.deviceBuffer ) {
- errorType = RtAudioError::MEMORY_ERROR;
- errorText_ = "RtApiWasapi::wasapiThread: Error allocating device buffer memory.";
- goto Exit;
- }
-
- // stream process loop
- while ( stream_.state != STREAM_STOPPING ) {
- if ( !callbackPulled ) {
- // Callback Input
- // ==============
- // 1. Pull callback buffer from inputBuffer
- // 2. If 1. was successful: Convert callback buffer to user sample rate and channel count
- // Convert callback buffer to user format
-
- if ( captureAudioClient ) {
- // Pull callback buffer from inputBuffer
- callbackPulled = captureBuffer.pullBuffer( convBuffer,
- ( unsigned int ) ( stream_.bufferSize * captureSrRatio ) * stream_.nDeviceChannels[INPUT],
- stream_.deviceFormat[INPUT] );
-
- if ( callbackPulled ) {
- // Convert callback buffer to user sample rate
- convertBufferWasapi( stream_.deviceBuffer,
- convBuffer,
- stream_.nDeviceChannels[INPUT],
- captureFormat->nSamplesPerSec,
- stream_.sampleRate,
- ( unsigned int ) ( stream_.bufferSize * captureSrRatio ),
- convBufferSize,
- stream_.deviceFormat[INPUT] );
-
- if ( stream_.doConvertBuffer[INPUT] ) {
- // Convert callback buffer to user format
- convertBuffer( stream_.userBuffer[INPUT],
- stream_.deviceBuffer,
- stream_.convertInfo[INPUT] );
- }
- else {
- // no further conversion, simple copy deviceBuffer to userBuffer
- memcpy( stream_.userBuffer[INPUT],
- stream_.deviceBuffer,
- stream_.bufferSize * stream_.nUserChannels[INPUT] * formatBytes( stream_.userFormat ) );
- }
- }
- }
- else {
- // if there is no capture stream, set callbackPulled flag
- callbackPulled = true;
- }
-
- // Execute Callback
- // ================
- // 1. Execute user callback method
- // 2. Handle return value from callback
-
- // if callback has not requested the stream to stop
- if ( callbackPulled && !callbackStopped ) {
- // Execute user callback method
- callbackResult = callback( stream_.userBuffer[OUTPUT],
- stream_.userBuffer[INPUT],
- stream_.bufferSize,
- getStreamTime(),
- captureFlags & AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY ? RTAUDIO_INPUT_OVERFLOW : 0,
- stream_.callbackInfo.userData );
-
- // Handle return value from callback
- if ( callbackResult == 1 ) {
- // instantiate a thread to stop this thread
- HANDLE threadHandle = CreateThread( NULL, 0, stopWasapiThread, this, 0, NULL );
- if ( !threadHandle ) {
- errorType = RtAudioError::THREAD_ERROR;
- errorText_ = "RtApiWasapi::wasapiThread: Unable to instantiate stream stop thread.";
- goto Exit;
- }
- else if ( !CloseHandle( threadHandle ) ) {
- errorType = RtAudioError::THREAD_ERROR;
- errorText_ = "RtApiWasapi::wasapiThread: Unable to close stream stop thread handle.";
- goto Exit;
- }
-
- callbackStopped = true;
- }
- else if ( callbackResult == 2 ) {
- // instantiate a thread to stop this thread
- HANDLE threadHandle = CreateThread( NULL, 0, abortWasapiThread, this, 0, NULL );
- if ( !threadHandle ) {
- errorType = RtAudioError::THREAD_ERROR;
- errorText_ = "RtApiWasapi::wasapiThread: Unable to instantiate stream abort thread.";
- goto Exit;
- }
- else if ( !CloseHandle( threadHandle ) ) {
- errorType = RtAudioError::THREAD_ERROR;
- errorText_ = "RtApiWasapi::wasapiThread: Unable to close stream abort thread handle.";
- goto Exit;
- }
-
- callbackStopped = true;
- }
- }
- }
-
- // Callback Output
- // ===============
- // 1. Convert callback buffer to stream format
- // 2. Convert callback buffer to stream sample rate and channel count
- // 3. Push callback buffer into outputBuffer
-
- if ( renderAudioClient && callbackPulled ) {
- if ( stream_.doConvertBuffer[OUTPUT] ) {
- // Convert callback buffer to stream format
- convertBuffer( stream_.deviceBuffer,
- stream_.userBuffer[OUTPUT],
- stream_.convertInfo[OUTPUT] );
-
- }
-
- // Convert callback buffer to stream sample rate
- convertBufferWasapi( convBuffer,
- stream_.deviceBuffer,
- stream_.nDeviceChannels[OUTPUT],
- stream_.sampleRate,
- renderFormat->nSamplesPerSec,
- stream_.bufferSize,
- convBufferSize,
- stream_.deviceFormat[OUTPUT] );
-
- // Push callback buffer into outputBuffer
- callbackPushed = renderBuffer.pushBuffer( convBuffer,
- convBufferSize * stream_.nDeviceChannels[OUTPUT],
- stream_.deviceFormat[OUTPUT] );
- }
- else {
- // if there is no render stream, set callbackPushed flag
- callbackPushed = true;
- }
-
- // Stream Capture
- // ==============
- // 1. Get capture buffer from stream
- // 2. Push capture buffer into inputBuffer
- // 3. If 2. was successful: Release capture buffer
-
- if ( captureAudioClient ) {
- // if the callback input buffer was not pulled from captureBuffer, wait for next capture event
- if ( !callbackPulled ) {
- WaitForSingleObject( captureEvent, INFINITE );
- }
-
- // Get capture buffer from stream
- hr = captureClient->GetBuffer( &streamBuffer,
- &bufferFrameCount,
- &captureFlags, NULL, NULL );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve capture buffer.";
- goto Exit;
- }
-
- if ( bufferFrameCount != 0 ) {
- // Push capture buffer into inputBuffer
- if ( captureBuffer.pushBuffer( ( char* ) streamBuffer,
- bufferFrameCount * stream_.nDeviceChannels[INPUT],
- stream_.deviceFormat[INPUT] ) )
- {
- // Release capture buffer
- hr = captureClient->ReleaseBuffer( bufferFrameCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to release capture buffer.";
- goto Exit;
- }
- }
- else
- {
- // Inform WASAPI that capture was unsuccessful
- hr = captureClient->ReleaseBuffer( 0 );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to release capture buffer.";
- goto Exit;
- }
- }
- }
- else
- {
- // Inform WASAPI that capture was unsuccessful
- hr = captureClient->ReleaseBuffer( 0 );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to release capture buffer.";
- goto Exit;
- }
- }
- }
-
- // Stream Render
- // =============
- // 1. Get render buffer from stream
- // 2. Pull next buffer from outputBuffer
- // 3. If 2. was successful: Fill render buffer with next buffer
- // Release render buffer
-
- if ( renderAudioClient ) {
- // if the callback output buffer was not pushed to renderBuffer, wait for next render event
- if ( callbackPulled && !callbackPushed ) {
- WaitForSingleObject( renderEvent, INFINITE );
- }
-
- // Get render buffer from stream
- hr = renderAudioClient->GetBufferSize( &bufferFrameCount );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve render buffer size.";
- goto Exit;
- }
-
- hr = renderAudioClient->GetCurrentPadding( &numFramesPadding );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve render buffer padding.";
- goto Exit;
- }
-
- bufferFrameCount -= numFramesPadding;
-
- if ( bufferFrameCount != 0 ) {
- hr = renderClient->GetBuffer( bufferFrameCount, &streamBuffer );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to retrieve render buffer.";
- goto Exit;
- }
-
- // Pull next buffer from outputBuffer
- // Fill render buffer with next buffer
- if ( renderBuffer.pullBuffer( ( char* ) streamBuffer,
- bufferFrameCount * stream_.nDeviceChannels[OUTPUT],
- stream_.deviceFormat[OUTPUT] ) )
- {
- // Release render buffer
- hr = renderClient->ReleaseBuffer( bufferFrameCount, 0 );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to release render buffer.";
- goto Exit;
- }
- }
- else
- {
- // Inform WASAPI that render was unsuccessful
- hr = renderClient->ReleaseBuffer( 0, 0 );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to release render buffer.";
- goto Exit;
- }
- }
- }
- else
- {
- // Inform WASAPI that render was unsuccessful
- hr = renderClient->ReleaseBuffer( 0, 0 );
- if ( FAILED( hr ) ) {
- errorText_ = "RtApiWasapi::wasapiThread: Unable to release render buffer.";
- goto Exit;
- }
- }
- }
-
- // if the callback buffer was pushed renderBuffer reset callbackPulled flag
- if ( callbackPushed ) {
- callbackPulled = false;
- // tick stream time
- RtApi::tickStreamTime();
- }
-
- }
-
-Exit:
- // clean up
- CoTaskMemFree( captureFormat );
- CoTaskMemFree( renderFormat );
-
- free ( convBuffer );
-
- CoUninitialize();
-
- // update stream state
- stream_.state = STREAM_STOPPED;
-
- if ( errorText_.empty() )
- return;
- else
- error( errorType );
-}
-
-//******************** End of __WINDOWS_WASAPI__ *********************//
-#endif
-
-
-#if defined(__WINDOWS_DS__) // Windows DirectSound API
-
-// Modified by Robin Davies, October 2005
-// - Improvements to DirectX pointer chasing.
-// - Bug fix for non-power-of-two Asio granularity used by Edirol PCR-A30.
-// - Auto-call CoInitialize for DSOUND and ASIO platforms.
-// Various revisions for RtAudio 4.0 by Gary Scavone, April 2007
-// Changed device query structure for RtAudio 4.0.7, January 2010
-
-#include <dsound.h>
-#include <assert.h>
-#include <algorithm>
-
-#if defined(__MINGW32__)
- // missing from latest mingw winapi
-#define WAVE_FORMAT_96M08 0x00010000 /* 96 kHz, Mono, 8-bit */
-#define WAVE_FORMAT_96S08 0x00020000 /* 96 kHz, Stereo, 8-bit */
-#define WAVE_FORMAT_96M16 0x00040000 /* 96 kHz, Mono, 16-bit */
-#define WAVE_FORMAT_96S16 0x00080000 /* 96 kHz, Stereo, 16-bit */
-#endif
-
-#define MINIMUM_DEVICE_BUFFER_SIZE 32768
-
-#ifdef _MSC_VER // if Microsoft Visual C++
-#pragma comment( lib, "winmm.lib" ) // then, auto-link winmm.lib. Otherwise, it has to be added manually.
-#endif
-
-static inline DWORD dsPointerBetween( DWORD pointer, DWORD laterPointer, DWORD earlierPointer, DWORD bufferSize )
-{
- if ( pointer > bufferSize ) pointer -= bufferSize;
- if ( laterPointer < earlierPointer ) laterPointer += bufferSize;
- if ( pointer < earlierPointer ) pointer += bufferSize;
- return pointer >= earlierPointer && pointer < laterPointer;
-}
-
-// A structure to hold various information related to the DirectSound
-// API implementation.
-struct DsHandle {
- unsigned int drainCounter; // Tracks callback counts when draining
- bool internalDrain; // Indicates if stop is initiated from callback or not.
- void *id[2];
- void *buffer[2];
- bool xrun[2];
- UINT bufferPointer[2];
- DWORD dsBufferSize[2];
- DWORD dsPointerLeadTime[2]; // the number of bytes ahead of the safe pointer to lead by.
- HANDLE condition;
-
- DsHandle()
- :drainCounter(0), internalDrain(false) { id[0] = 0; id[1] = 0; buffer[0] = 0; buffer[1] = 0; xrun[0] = false; xrun[1] = false; bufferPointer[0] = 0; bufferPointer[1] = 0; }
-};
-
-// Declarations for utility functions, callbacks, and structures
-// specific to the DirectSound implementation.
-static BOOL CALLBACK deviceQueryCallback( LPGUID lpguid,
- LPCTSTR description,
- LPCTSTR module,
- LPVOID lpContext );
-
-static const char* getErrorString( int code );
-
-static unsigned __stdcall callbackHandler( void *ptr );
-
-struct DsDevice {
- LPGUID id[2];
- bool validId[2];
- bool found;
- std::string name;
-
- DsDevice()
- : found(false) { validId[0] = false; validId[1] = false; }
-};
-
-struct DsProbeData {
- bool isInput;
- std::vector<struct DsDevice>* dsDevices;
-};
-
-RtApiDs :: RtApiDs()
-{
- // Dsound will run both-threaded. If CoInitialize fails, then just
- // accept whatever the mainline chose for a threading model.
- coInitialized_ = false;
- HRESULT hr = CoInitialize( NULL );
- if ( !FAILED( hr ) ) coInitialized_ = true;
-}
-
-RtApiDs :: ~RtApiDs()
-{
- if ( coInitialized_ ) CoUninitialize(); // balanced call.
- if ( stream_.state != STREAM_CLOSED ) closeStream();
-}
-
-// The DirectSound default output is always the first device.
-unsigned int RtApiDs :: getDefaultOutputDevice( void )
-{
- return 0;
-}
-
-// The DirectSound default input is always the first input device,
-// which is the first capture device enumerated.
-unsigned int RtApiDs :: getDefaultInputDevice( void )
-{
- return 0;
-}
-
-unsigned int RtApiDs :: getDeviceCount( void )
-{
- // Set query flag for previously found devices to false, so that we
- // can check for any devices that have disappeared.
- for ( unsigned int i=0; i<dsDevices.size(); i++ )
- dsDevices[i].found = false;
-
- // Query DirectSound devices.
- struct DsProbeData probeInfo;
- probeInfo.isInput = false;
- probeInfo.dsDevices = &dsDevices;
- HRESULT result = DirectSoundEnumerate( (LPDSENUMCALLBACK) deviceQueryCallback, &probeInfo );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::getDeviceCount: error (" << getErrorString( result ) << ") enumerating output devices!";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- }
-
- // Query DirectSoundCapture devices.
- probeInfo.isInput = true;
- result = DirectSoundCaptureEnumerate( (LPDSENUMCALLBACK) deviceQueryCallback, &probeInfo );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::getDeviceCount: error (" << getErrorString( result ) << ") enumerating input devices!";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- }
-
- // Clean out any devices that may have disappeared (code update submitted by Eli Zehngut).
- for ( unsigned int i=0; i<dsDevices.size(); ) {
- if ( dsDevices[i].found == false ) dsDevices.erase( dsDevices.begin() + i );
- else i++;
- }
-
- return static_cast<unsigned int>(dsDevices.size());
-}
-
-RtAudio::DeviceInfo RtApiDs :: getDeviceInfo( unsigned int device )
-{
- RtAudio::DeviceInfo info;
- info.probed = false;
-
- if ( dsDevices.size() == 0 ) {
- // Force a query of all devices
- getDeviceCount();
- if ( dsDevices.size() == 0 ) {
- errorText_ = "RtApiDs::getDeviceInfo: no devices found!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
- }
-
- if ( device >= dsDevices.size() ) {
- errorText_ = "RtApiDs::getDeviceInfo: device ID is invalid!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- HRESULT result;
- if ( dsDevices[ device ].validId[0] == false ) goto probeInput;
-
- LPDIRECTSOUND output;
- DSCAPS outCaps;
- result = DirectSoundCreate( dsDevices[ device ].id[0], &output, NULL );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::getDeviceInfo: error (" << getErrorString( result ) << ") opening output device (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- goto probeInput;
- }
-
- outCaps.dwSize = sizeof( outCaps );
- result = output->GetCaps( &outCaps );
- if ( FAILED( result ) ) {
- output->Release();
- errorStream_ << "RtApiDs::getDeviceInfo: error (" << getErrorString( result ) << ") getting capabilities!";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- goto probeInput;
- }
-
- // Get output channel information.
- info.outputChannels = ( outCaps.dwFlags & DSCAPS_PRIMARYSTEREO ) ? 2 : 1;
-
- // Get sample rate information.
- info.sampleRates.clear();
- for ( unsigned int k=0; k<MAX_SAMPLE_RATES; k++ ) {
- if ( SAMPLE_RATES[k] >= (unsigned int) outCaps.dwMinSecondarySampleRate &&
- SAMPLE_RATES[k] <= (unsigned int) outCaps.dwMaxSecondarySampleRate ) {
- info.sampleRates.push_back( SAMPLE_RATES[k] );
-
- if ( !info.preferredSampleRate || ( SAMPLE_RATES[k] <= 48000 && SAMPLE_RATES[k] > info.preferredSampleRate ) )
- info.preferredSampleRate = SAMPLE_RATES[k];
- }
- }
-
- // Get format information.
- if ( outCaps.dwFlags & DSCAPS_PRIMARY16BIT ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( outCaps.dwFlags & DSCAPS_PRIMARY8BIT ) info.nativeFormats |= RTAUDIO_SINT8;
-
- output->Release();
-
- if ( getDefaultOutputDevice() == device )
- info.isDefaultOutput = true;
-
- if ( dsDevices[ device ].validId[1] == false ) {
- info.name = dsDevices[ device ].name;
- info.probed = true;
- return info;
- }
-
- probeInput:
-
- LPDIRECTSOUNDCAPTURE input;
- result = DirectSoundCaptureCreate( dsDevices[ device ].id[1], &input, NULL );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::getDeviceInfo: error (" << getErrorString( result ) << ") opening input device (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- DSCCAPS inCaps;
- inCaps.dwSize = sizeof( inCaps );
- result = input->GetCaps( &inCaps );
- if ( FAILED( result ) ) {
- input->Release();
- errorStream_ << "RtApiDs::getDeviceInfo: error (" << getErrorString( result ) << ") getting object capabilities (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Get input channel information.
- info.inputChannels = inCaps.dwChannels;
-
- // Get sample rate and format information.
- std::vector<unsigned int> rates;
- if ( inCaps.dwChannels >= 2 ) {
- if ( inCaps.dwFormats & WAVE_FORMAT_1S16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_2S16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_4S16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_96S16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_1S08 ) info.nativeFormats |= RTAUDIO_SINT8;
- if ( inCaps.dwFormats & WAVE_FORMAT_2S08 ) info.nativeFormats |= RTAUDIO_SINT8;
- if ( inCaps.dwFormats & WAVE_FORMAT_4S08 ) info.nativeFormats |= RTAUDIO_SINT8;
- if ( inCaps.dwFormats & WAVE_FORMAT_96S08 ) info.nativeFormats |= RTAUDIO_SINT8;
-
- if ( info.nativeFormats & RTAUDIO_SINT16 ) {
- if ( inCaps.dwFormats & WAVE_FORMAT_1S16 ) rates.push_back( 11025 );
- if ( inCaps.dwFormats & WAVE_FORMAT_2S16 ) rates.push_back( 22050 );
- if ( inCaps.dwFormats & WAVE_FORMAT_4S16 ) rates.push_back( 44100 );
- if ( inCaps.dwFormats & WAVE_FORMAT_96S16 ) rates.push_back( 96000 );
- }
- else if ( info.nativeFormats & RTAUDIO_SINT8 ) {
- if ( inCaps.dwFormats & WAVE_FORMAT_1S08 ) rates.push_back( 11025 );
- if ( inCaps.dwFormats & WAVE_FORMAT_2S08 ) rates.push_back( 22050 );
- if ( inCaps.dwFormats & WAVE_FORMAT_4S08 ) rates.push_back( 44100 );
- if ( inCaps.dwFormats & WAVE_FORMAT_96S08 ) rates.push_back( 96000 );
- }
- }
- else if ( inCaps.dwChannels == 1 ) {
- if ( inCaps.dwFormats & WAVE_FORMAT_1M16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_2M16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_4M16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_96M16 ) info.nativeFormats |= RTAUDIO_SINT16;
- if ( inCaps.dwFormats & WAVE_FORMAT_1M08 ) info.nativeFormats |= RTAUDIO_SINT8;
- if ( inCaps.dwFormats & WAVE_FORMAT_2M08 ) info.nativeFormats |= RTAUDIO_SINT8;
- if ( inCaps.dwFormats & WAVE_FORMAT_4M08 ) info.nativeFormats |= RTAUDIO_SINT8;
- if ( inCaps.dwFormats & WAVE_FORMAT_96M08 ) info.nativeFormats |= RTAUDIO_SINT8;
-
- if ( info.nativeFormats & RTAUDIO_SINT16 ) {
- if ( inCaps.dwFormats & WAVE_FORMAT_1M16 ) rates.push_back( 11025 );
- if ( inCaps.dwFormats & WAVE_FORMAT_2M16 ) rates.push_back( 22050 );
- if ( inCaps.dwFormats & WAVE_FORMAT_4M16 ) rates.push_back( 44100 );
- if ( inCaps.dwFormats & WAVE_FORMAT_96M16 ) rates.push_back( 96000 );
- }
- else if ( info.nativeFormats & RTAUDIO_SINT8 ) {
- if ( inCaps.dwFormats & WAVE_FORMAT_1M08 ) rates.push_back( 11025 );
- if ( inCaps.dwFormats & WAVE_FORMAT_2M08 ) rates.push_back( 22050 );
- if ( inCaps.dwFormats & WAVE_FORMAT_4M08 ) rates.push_back( 44100 );
- if ( inCaps.dwFormats & WAVE_FORMAT_96M08 ) rates.push_back( 96000 );
- }
- }
- else info.inputChannels = 0; // technically, this would be an error
-
- input->Release();
-
- if ( info.inputChannels == 0 ) return info;
-
- // Copy the supported rates to the info structure but avoid duplication.
- bool found;
- for ( unsigned int i=0; i<rates.size(); i++ ) {
- found = false;
- for ( unsigned int j=0; j<info.sampleRates.size(); j++ ) {
- if ( rates[i] == info.sampleRates[j] ) {
- found = true;
- break;
- }
- }
- if ( found == false ) info.sampleRates.push_back( rates[i] );
- }
- std::sort( info.sampleRates.begin(), info.sampleRates.end() );
-
- // If device opens for both playback and capture, we determine the channels.
- if ( info.outputChannels > 0 && info.inputChannels > 0 )
- info.duplexChannels = (info.outputChannels > info.inputChannels) ? info.inputChannels : info.outputChannels;
-
- if ( device == 0 ) info.isDefaultInput = true;
-
- // Copy name and return.
- info.name = dsDevices[ device ].name;
- info.probed = true;
- return info;
-}
-
-bool RtApiDs :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options )
-{
- if ( channels + firstChannel > 2 ) {
- errorText_ = "RtApiDs::probeDeviceOpen: DirectSound does not support more than 2 channels per device.";
- return FAILURE;
- }
-
- size_t nDevices = dsDevices.size();
- if ( nDevices == 0 ) {
- // This should not happen because a check is made before this function is called.
- errorText_ = "RtApiDs::probeDeviceOpen: no devices found!";
- return FAILURE;
- }
-
- if ( device >= nDevices ) {
- // This should not happen because a check is made before this function is called.
- errorText_ = "RtApiDs::probeDeviceOpen: device ID is invalid!";
- return FAILURE;
- }
-
- if ( mode == OUTPUT ) {
- if ( dsDevices[ device ].validId[0] == false ) {
- errorStream_ << "RtApiDs::probeDeviceOpen: device (" << device << ") does not support output!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
- else { // mode == INPUT
- if ( dsDevices[ device ].validId[1] == false ) {
- errorStream_ << "RtApiDs::probeDeviceOpen: device (" << device << ") does not support input!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
-
- // According to a note in PortAudio, using GetDesktopWindow()
- // instead of GetForegroundWindow() is supposed to avoid problems
- // that occur when the application's window is not the foreground
- // window. Also, if the application window closes before the
- // DirectSound buffer, DirectSound can crash. In the past, I had
- // problems when using GetDesktopWindow() but it seems fine now
- // (January 2010). I'll leave it commented here.
- // HWND hWnd = GetForegroundWindow();
- HWND hWnd = GetDesktopWindow();
-
- // Check the numberOfBuffers parameter and limit the lowest value to
- // two. This is a judgement call and a value of two is probably too
- // low for capture, but it should work for playback.
- int nBuffers = 0;
- if ( options ) nBuffers = options->numberOfBuffers;
- if ( options && options->flags & RTAUDIO_MINIMIZE_LATENCY ) nBuffers = 2;
- if ( nBuffers < 2 ) nBuffers = 3;
-
- // Check the lower range of the user-specified buffer size and set
- // (arbitrarily) to a lower bound of 32.
- if ( *bufferSize < 32 ) *bufferSize = 32;
-
- // Create the wave format structure. The data format setting will
- // be determined later.
- WAVEFORMATEX waveFormat;
- ZeroMemory( &waveFormat, sizeof(WAVEFORMATEX) );
- waveFormat.wFormatTag = WAVE_FORMAT_PCM;
- waveFormat.nChannels = channels + firstChannel;
- waveFormat.nSamplesPerSec = (unsigned long) sampleRate;
-
- // Determine the device buffer size. By default, we'll use the value
- // defined above (32K), but we will grow it to make allowances for
- // very large software buffer sizes.
- DWORD dsBufferSize = MINIMUM_DEVICE_BUFFER_SIZE;
- DWORD dsPointerLeadTime = 0;
-
- void *ohandle = 0, *bhandle = 0;
- HRESULT result;
- if ( mode == OUTPUT ) {
-
- LPDIRECTSOUND output;
- result = DirectSoundCreate( dsDevices[ device ].id[0], &output, NULL );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") opening output device (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- DSCAPS outCaps;
- outCaps.dwSize = sizeof( outCaps );
- result = output->GetCaps( &outCaps );
- if ( FAILED( result ) ) {
- output->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") getting capabilities (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Check channel information.
- if ( channels + firstChannel == 2 && !( outCaps.dwFlags & DSCAPS_PRIMARYSTEREO ) ) {
- errorStream_ << "RtApiDs::getDeviceInfo: the output device (" << dsDevices[ device ].name << ") does not support stereo playback.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Check format information. Use 16-bit format unless not
- // supported or user requests 8-bit.
- if ( outCaps.dwFlags & DSCAPS_PRIMARY16BIT &&
- !( format == RTAUDIO_SINT8 && outCaps.dwFlags & DSCAPS_PRIMARY8BIT ) ) {
- waveFormat.wBitsPerSample = 16;
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- }
- else {
- waveFormat.wBitsPerSample = 8;
- stream_.deviceFormat[mode] = RTAUDIO_SINT8;
- }
- stream_.userFormat = format;
-
- // Update wave format structure and buffer information.
- waveFormat.nBlockAlign = waveFormat.nChannels * waveFormat.wBitsPerSample / 8;
- waveFormat.nAvgBytesPerSec = waveFormat.nSamplesPerSec * waveFormat.nBlockAlign;
- dsPointerLeadTime = nBuffers * (*bufferSize) * (waveFormat.wBitsPerSample / 8) * channels;
-
- // If the user wants an even bigger buffer, increase the device buffer size accordingly.
- while ( dsPointerLeadTime * 2U > dsBufferSize )
- dsBufferSize *= 2;
-
- // Set cooperative level to DSSCL_EXCLUSIVE ... sound stops when window focus changes.
- // result = output->SetCooperativeLevel( hWnd, DSSCL_EXCLUSIVE );
- // Set cooperative level to DSSCL_PRIORITY ... sound remains when window focus changes.
- result = output->SetCooperativeLevel( hWnd, DSSCL_PRIORITY );
- if ( FAILED( result ) ) {
- output->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") setting cooperative level (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Even though we will write to the secondary buffer, we need to
- // access the primary buffer to set the correct output format
- // (since the default is 8-bit, 22 kHz!). Setup the DS primary
- // buffer description.
- DSBUFFERDESC bufferDescription;
- ZeroMemory( &bufferDescription, sizeof( DSBUFFERDESC ) );
- bufferDescription.dwSize = sizeof( DSBUFFERDESC );
- bufferDescription.dwFlags = DSBCAPS_PRIMARYBUFFER;
-
- // Obtain the primary buffer
- LPDIRECTSOUNDBUFFER buffer;
- result = output->CreateSoundBuffer( &bufferDescription, &buffer, NULL );
- if ( FAILED( result ) ) {
- output->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") accessing primary buffer (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Set the primary DS buffer sound format.
- result = buffer->SetFormat( &waveFormat );
- if ( FAILED( result ) ) {
- output->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") setting primary buffer format (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Setup the secondary DS buffer description.
- ZeroMemory( &bufferDescription, sizeof( DSBUFFERDESC ) );
- bufferDescription.dwSize = sizeof( DSBUFFERDESC );
- bufferDescription.dwFlags = ( DSBCAPS_STICKYFOCUS |
- DSBCAPS_GLOBALFOCUS |
- DSBCAPS_GETCURRENTPOSITION2 |
- DSBCAPS_LOCHARDWARE ); // Force hardware mixing
- bufferDescription.dwBufferBytes = dsBufferSize;
- bufferDescription.lpwfxFormat = &waveFormat;
-
- // Try to create the secondary DS buffer. If that doesn't work,
- // try to use software mixing. Otherwise, there's a problem.
- result = output->CreateSoundBuffer( &bufferDescription, &buffer, NULL );
- if ( FAILED( result ) ) {
- bufferDescription.dwFlags = ( DSBCAPS_STICKYFOCUS |
- DSBCAPS_GLOBALFOCUS |
- DSBCAPS_GETCURRENTPOSITION2 |
- DSBCAPS_LOCSOFTWARE ); // Force software mixing
- result = output->CreateSoundBuffer( &bufferDescription, &buffer, NULL );
- if ( FAILED( result ) ) {
- output->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") creating secondary buffer (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
-
- // Get the buffer size ... might be different from what we specified.
- DSBCAPS dsbcaps;
- dsbcaps.dwSize = sizeof( DSBCAPS );
- result = buffer->GetCaps( &dsbcaps );
- if ( FAILED( result ) ) {
- output->Release();
- buffer->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") getting buffer settings (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- dsBufferSize = dsbcaps.dwBufferBytes;
-
- // Lock the DS buffer
- LPVOID audioPtr;
- DWORD dataLen;
- result = buffer->Lock( 0, dsBufferSize, &audioPtr, &dataLen, NULL, NULL, 0 );
- if ( FAILED( result ) ) {
- output->Release();
- buffer->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") locking buffer (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Zero the DS buffer
- ZeroMemory( audioPtr, dataLen );
-
- // Unlock the DS buffer
- result = buffer->Unlock( audioPtr, dataLen, NULL, 0 );
- if ( FAILED( result ) ) {
- output->Release();
- buffer->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") unlocking buffer (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- ohandle = (void *) output;
- bhandle = (void *) buffer;
- }
-
- if ( mode == INPUT ) {
-
- LPDIRECTSOUNDCAPTURE input;
- result = DirectSoundCaptureCreate( dsDevices[ device ].id[1], &input, NULL );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") opening input device (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- DSCCAPS inCaps;
- inCaps.dwSize = sizeof( inCaps );
- result = input->GetCaps( &inCaps );
- if ( FAILED( result ) ) {
- input->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") getting input capabilities (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Check channel information.
- if ( inCaps.dwChannels < channels + firstChannel ) {
- errorText_ = "RtApiDs::getDeviceInfo: the input device does not support requested input channels.";
- return FAILURE;
- }
-
- // Check format information. Use 16-bit format unless user
- // requests 8-bit.
- DWORD deviceFormats;
- if ( channels + firstChannel == 2 ) {
- deviceFormats = WAVE_FORMAT_1S08 | WAVE_FORMAT_2S08 | WAVE_FORMAT_4S08 | WAVE_FORMAT_96S08;
- if ( format == RTAUDIO_SINT8 && inCaps.dwFormats & deviceFormats ) {
- waveFormat.wBitsPerSample = 8;
- stream_.deviceFormat[mode] = RTAUDIO_SINT8;
- }
- else { // assume 16-bit is supported
- waveFormat.wBitsPerSample = 16;
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- }
- }
- else { // channel == 1
- deviceFormats = WAVE_FORMAT_1M08 | WAVE_FORMAT_2M08 | WAVE_FORMAT_4M08 | WAVE_FORMAT_96M08;
- if ( format == RTAUDIO_SINT8 && inCaps.dwFormats & deviceFormats ) {
- waveFormat.wBitsPerSample = 8;
- stream_.deviceFormat[mode] = RTAUDIO_SINT8;
- }
- else { // assume 16-bit is supported
- waveFormat.wBitsPerSample = 16;
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- }
- }
- stream_.userFormat = format;
-
- // Update wave format structure and buffer information.
- waveFormat.nBlockAlign = waveFormat.nChannels * waveFormat.wBitsPerSample / 8;
- waveFormat.nAvgBytesPerSec = waveFormat.nSamplesPerSec * waveFormat.nBlockAlign;
- dsPointerLeadTime = nBuffers * (*bufferSize) * (waveFormat.wBitsPerSample / 8) * channels;
-
- // If the user wants an even bigger buffer, increase the device buffer size accordingly.
- while ( dsPointerLeadTime * 2U > dsBufferSize )
- dsBufferSize *= 2;
-
- // Setup the secondary DS buffer description.
- DSCBUFFERDESC bufferDescription;
- ZeroMemory( &bufferDescription, sizeof( DSCBUFFERDESC ) );
- bufferDescription.dwSize = sizeof( DSCBUFFERDESC );
- bufferDescription.dwFlags = 0;
- bufferDescription.dwReserved = 0;
- bufferDescription.dwBufferBytes = dsBufferSize;
- bufferDescription.lpwfxFormat = &waveFormat;
-
- // Create the capture buffer.
- LPDIRECTSOUNDCAPTUREBUFFER buffer;
- result = input->CreateCaptureBuffer( &bufferDescription, &buffer, NULL );
- if ( FAILED( result ) ) {
- input->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") creating input buffer (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Get the buffer size ... might be different from what we specified.
- DSCBCAPS dscbcaps;
- dscbcaps.dwSize = sizeof( DSCBCAPS );
- result = buffer->GetCaps( &dscbcaps );
- if ( FAILED( result ) ) {
- input->Release();
- buffer->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") getting buffer settings (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- dsBufferSize = dscbcaps.dwBufferBytes;
-
- // NOTE: We could have a problem here if this is a duplex stream
- // and the play and capture hardware buffer sizes are different
- // (I'm actually not sure if that is a problem or not).
- // Currently, we are not verifying that.
-
- // Lock the capture buffer
- LPVOID audioPtr;
- DWORD dataLen;
- result = buffer->Lock( 0, dsBufferSize, &audioPtr, &dataLen, NULL, NULL, 0 );
- if ( FAILED( result ) ) {
- input->Release();
- buffer->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") locking input buffer (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Zero the buffer
- ZeroMemory( audioPtr, dataLen );
-
- // Unlock the buffer
- result = buffer->Unlock( audioPtr, dataLen, NULL, 0 );
- if ( FAILED( result ) ) {
- input->Release();
- buffer->Release();
- errorStream_ << "RtApiDs::probeDeviceOpen: error (" << getErrorString( result ) << ") unlocking input buffer (" << dsDevices[ device ].name << ")!";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- ohandle = (void *) input;
- bhandle = (void *) buffer;
- }
-
- // Set various stream parameters
- DsHandle *handle = 0;
- stream_.nDeviceChannels[mode] = channels + firstChannel;
- stream_.nUserChannels[mode] = channels;
- stream_.bufferSize = *bufferSize;
- stream_.channelOffset[mode] = firstChannel;
- stream_.deviceInterleaved[mode] = true;
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED ) stream_.userInterleaved = false;
- else stream_.userInterleaved = true;
-
- // Set flag for buffer conversion
- stream_.doConvertBuffer[mode] = false;
- if (stream_.nUserChannels[mode] != stream_.nDeviceChannels[mode])
- stream_.doConvertBuffer[mode] = true;
- if (stream_.userFormat != stream_.deviceFormat[mode])
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.userInterleaved != stream_.deviceInterleaved[mode] &&
- stream_.nUserChannels[mode] > 1 )
- stream_.doConvertBuffer[mode] = true;
-
- // Allocate necessary internal buffers
- long bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
- stream_.userBuffer[mode] = (char *) calloc( bufferBytes, 1 );
- if ( stream_.userBuffer[mode] == NULL ) {
- errorText_ = "RtApiDs::probeDeviceOpen: error allocating user buffer memory.";
- goto error;
- }
-
- if ( stream_.doConvertBuffer[mode] ) {
-
- bool makeBuffer = true;
- bufferBytes = stream_.nDeviceChannels[mode] * formatBytes( stream_.deviceFormat[mode] );
- if ( mode == INPUT ) {
- if ( stream_.mode == OUTPUT && stream_.deviceBuffer ) {
- unsigned long bytesOut = stream_.nDeviceChannels[0] * formatBytes( stream_.deviceFormat[0] );
- if ( bufferBytes <= (long) bytesOut ) makeBuffer = false;
- }
- }
-
- if ( makeBuffer ) {
- bufferBytes *= *bufferSize;
- if ( stream_.deviceBuffer ) free( stream_.deviceBuffer );
- stream_.deviceBuffer = (char *) calloc( bufferBytes, 1 );
- if ( stream_.deviceBuffer == NULL ) {
- errorText_ = "RtApiDs::probeDeviceOpen: error allocating device buffer memory.";
- goto error;
- }
- }
- }
-
- // Allocate our DsHandle structures for the stream.
- if ( stream_.apiHandle == 0 ) {
- try {
- handle = new DsHandle;
- }
- catch ( std::bad_alloc& ) {
- errorText_ = "RtApiDs::probeDeviceOpen: error allocating AsioHandle memory.";
- goto error;
- }
-
- // Create a manual-reset event.
- handle->condition = CreateEvent( NULL, // no security
- TRUE, // manual-reset
- FALSE, // non-signaled initially
- NULL ); // unnamed
- stream_.apiHandle = (void *) handle;
- }
- else
- handle = (DsHandle *) stream_.apiHandle;
- handle->id[mode] = ohandle;
- handle->buffer[mode] = bhandle;
- handle->dsBufferSize[mode] = dsBufferSize;
- handle->dsPointerLeadTime[mode] = dsPointerLeadTime;
-
- stream_.device[mode] = device;
- stream_.state = STREAM_STOPPED;
- if ( stream_.mode == OUTPUT && mode == INPUT )
- // We had already set up an output stream.
- stream_.mode = DUPLEX;
- else
- stream_.mode = mode;
- stream_.nBuffers = nBuffers;
- stream_.sampleRate = sampleRate;
-
- // Setup the buffer conversion information structure.
- if ( stream_.doConvertBuffer[mode] ) setConvertInfo( mode, firstChannel );
-
- // Setup the callback thread.
- if ( stream_.callbackInfo.isRunning == false ) {
- unsigned threadId;
- stream_.callbackInfo.isRunning = true;
- stream_.callbackInfo.object = (void *) this;
- stream_.callbackInfo.thread = _beginthreadex( NULL, 0, &callbackHandler,
- &stream_.callbackInfo, 0, &threadId );
- if ( stream_.callbackInfo.thread == 0 ) {
- errorText_ = "RtApiDs::probeDeviceOpen: error creating callback thread!";
- goto error;
- }
-
- // Boost DS thread priority
- SetThreadPriority( (HANDLE) stream_.callbackInfo.thread, THREAD_PRIORITY_HIGHEST );
- }
- return SUCCESS;
-
- error:
- if ( handle ) {
- if ( handle->buffer[0] ) { // the object pointer can be NULL and valid
- LPDIRECTSOUND object = (LPDIRECTSOUND) handle->id[0];
- LPDIRECTSOUNDBUFFER buffer = (LPDIRECTSOUNDBUFFER) handle->buffer[0];
- if ( buffer ) buffer->Release();
- object->Release();
- }
- if ( handle->buffer[1] ) {
- LPDIRECTSOUNDCAPTURE object = (LPDIRECTSOUNDCAPTURE) handle->id[1];
- LPDIRECTSOUNDCAPTUREBUFFER buffer = (LPDIRECTSOUNDCAPTUREBUFFER) handle->buffer[1];
- if ( buffer ) buffer->Release();
- object->Release();
- }
- CloseHandle( handle->condition );
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.state = STREAM_CLOSED;
- return FAILURE;
-}
-
-void RtApiDs :: closeStream()
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiDs::closeStream(): no open stream to close!";
- error( RtAudioError::WARNING );
- return;
- }
-
- // Stop the callback thread.
- stream_.callbackInfo.isRunning = false;
- WaitForSingleObject( (HANDLE) stream_.callbackInfo.thread, INFINITE );
- CloseHandle( (HANDLE) stream_.callbackInfo.thread );
-
- DsHandle *handle = (DsHandle *) stream_.apiHandle;
- if ( handle ) {
- if ( handle->buffer[0] ) { // the object pointer can be NULL and valid
- LPDIRECTSOUND object = (LPDIRECTSOUND) handle->id[0];
- LPDIRECTSOUNDBUFFER buffer = (LPDIRECTSOUNDBUFFER) handle->buffer[0];
- if ( buffer ) {
- buffer->Stop();
- buffer->Release();
- }
- object->Release();
- }
- if ( handle->buffer[1] ) {
- LPDIRECTSOUNDCAPTURE object = (LPDIRECTSOUNDCAPTURE) handle->id[1];
- LPDIRECTSOUNDCAPTUREBUFFER buffer = (LPDIRECTSOUNDCAPTUREBUFFER) handle->buffer[1];
- if ( buffer ) {
- buffer->Stop();
- buffer->Release();
- }
- object->Release();
- }
- CloseHandle( handle->condition );
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.mode = UNINITIALIZED;
- stream_.state = STREAM_CLOSED;
-}
-
-void RtApiDs :: startStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiDs::startStream(): the stream is already running!";
- error( RtAudioError::WARNING );
- return;
- }
-
- DsHandle *handle = (DsHandle *) stream_.apiHandle;
-
- // Increase scheduler frequency on lesser windows (a side-effect of
- // increasing timer accuracy). On greater windows (Win2K or later),
- // this is already in effect.
- timeBeginPeriod( 1 );
-
- buffersRolling = false;
- duplexPrerollBytes = 0;
-
- if ( stream_.mode == DUPLEX ) {
- // 0.5 seconds of silence in DUPLEX mode while the devices spin up and synchronize.
- duplexPrerollBytes = (int) ( 0.5 * stream_.sampleRate * formatBytes( stream_.deviceFormat[1] ) * stream_.nDeviceChannels[1] );
- }
-
- HRESULT result = 0;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- LPDIRECTSOUNDBUFFER buffer = (LPDIRECTSOUNDBUFFER) handle->buffer[0];
- result = buffer->Play( 0, 0, DSBPLAY_LOOPING );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::startStream: error (" << getErrorString( result ) << ") starting output buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
-
- LPDIRECTSOUNDCAPTUREBUFFER buffer = (LPDIRECTSOUNDCAPTUREBUFFER) handle->buffer[1];
- result = buffer->Start( DSCBSTART_LOOPING );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::startStream: error (" << getErrorString( result ) << ") starting input buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- handle->drainCounter = 0;
- handle->internalDrain = false;
- ResetEvent( handle->condition );
- stream_.state = STREAM_RUNNING;
-
- unlock:
- if ( FAILED( result ) ) error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiDs :: stopStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiDs::stopStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- HRESULT result = 0;
- LPVOID audioPtr;
- DWORD dataLen;
- DsHandle *handle = (DsHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- if ( handle->drainCounter == 0 ) {
- handle->drainCounter = 2;
- WaitForSingleObject( handle->condition, INFINITE ); // block until signaled
- }
-
- stream_.state = STREAM_STOPPED;
-
- MUTEX_LOCK( &stream_.mutex );
-
- // Stop the buffer and clear memory
- LPDIRECTSOUNDBUFFER buffer = (LPDIRECTSOUNDBUFFER) handle->buffer[0];
- result = buffer->Stop();
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::stopStream: error (" << getErrorString( result ) << ") stopping output buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
-
- // Lock the buffer and clear it so that if we start to play again,
- // we won't have old data playing.
- result = buffer->Lock( 0, handle->dsBufferSize[0], &audioPtr, &dataLen, NULL, NULL, 0 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::stopStream: error (" << getErrorString( result ) << ") locking output buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
-
- // Zero the DS buffer
- ZeroMemory( audioPtr, dataLen );
-
- // Unlock the DS buffer
- result = buffer->Unlock( audioPtr, dataLen, NULL, 0 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::stopStream: error (" << getErrorString( result ) << ") unlocking output buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
-
- // If we start playing again, we must begin at beginning of buffer.
- handle->bufferPointer[0] = 0;
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
- LPDIRECTSOUNDCAPTUREBUFFER buffer = (LPDIRECTSOUNDCAPTUREBUFFER) handle->buffer[1];
- audioPtr = NULL;
- dataLen = 0;
-
- stream_.state = STREAM_STOPPED;
-
- if ( stream_.mode != DUPLEX )
- MUTEX_LOCK( &stream_.mutex );
-
- result = buffer->Stop();
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::stopStream: error (" << getErrorString( result ) << ") stopping input buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
-
- // Lock the buffer and clear it so that if we start to play again,
- // we won't have old data playing.
- result = buffer->Lock( 0, handle->dsBufferSize[1], &audioPtr, &dataLen, NULL, NULL, 0 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::stopStream: error (" << getErrorString( result ) << ") locking input buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
-
- // Zero the DS buffer
- ZeroMemory( audioPtr, dataLen );
-
- // Unlock the DS buffer
- result = buffer->Unlock( audioPtr, dataLen, NULL, 0 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::stopStream: error (" << getErrorString( result ) << ") unlocking input buffer!";
- errorText_ = errorStream_.str();
- goto unlock;
- }
-
- // If we start recording again, we must begin at beginning of buffer.
- handle->bufferPointer[1] = 0;
- }
-
- unlock:
- timeEndPeriod( 1 ); // revert to normal scheduler frequency on lesser windows.
- MUTEX_UNLOCK( &stream_.mutex );
-
- if ( FAILED( result ) ) error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiDs :: abortStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiDs::abortStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- DsHandle *handle = (DsHandle *) stream_.apiHandle;
- handle->drainCounter = 2;
-
- stopStream();
-}
-
-void RtApiDs :: callbackEvent()
-{
- if ( stream_.state == STREAM_STOPPED || stream_.state == STREAM_STOPPING ) {
- Sleep( 50 ); // sleep 50 milliseconds
- return;
- }
-
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiDs::callbackEvent(): the stream is closed ... this shouldn't happen!";
- error( RtAudioError::WARNING );
- return;
- }
-
- CallbackInfo *info = (CallbackInfo *) &stream_.callbackInfo;
- DsHandle *handle = (DsHandle *) stream_.apiHandle;
-
- // Check if we were draining the stream and signal is finished.
- if ( handle->drainCounter > stream_.nBuffers + 2 ) {
-
- stream_.state = STREAM_STOPPING;
- if ( handle->internalDrain == false )
- SetEvent( handle->condition );
- else
- stopStream();
- return;
- }
-
- // Invoke user callback to get fresh output data UNLESS we are
- // draining stream.
- if ( handle->drainCounter == 0 ) {
- RtAudioCallback callback = (RtAudioCallback) info->callback;
- double streamTime = getStreamTime();
- RtAudioStreamStatus status = 0;
- if ( stream_.mode != INPUT && handle->xrun[0] == true ) {
- status |= RTAUDIO_OUTPUT_UNDERFLOW;
- handle->xrun[0] = false;
- }
- if ( stream_.mode != OUTPUT && handle->xrun[1] == true ) {
- status |= RTAUDIO_INPUT_OVERFLOW;
- handle->xrun[1] = false;
- }
- int cbReturnValue = callback( stream_.userBuffer[0], stream_.userBuffer[1],
- stream_.bufferSize, streamTime, status, info->userData );
- if ( cbReturnValue == 2 ) {
- stream_.state = STREAM_STOPPING;
- handle->drainCounter = 2;
- abortStream();
- return;
- }
- else if ( cbReturnValue == 1 ) {
- handle->drainCounter = 1;
- handle->internalDrain = true;
- }
- }
-
- HRESULT result;
- DWORD currentWritePointer, safeWritePointer;
- DWORD currentReadPointer, safeReadPointer;
- UINT nextWritePointer;
-
- LPVOID buffer1 = NULL;
- LPVOID buffer2 = NULL;
- DWORD bufferSize1 = 0;
- DWORD bufferSize2 = 0;
-
- char *buffer;
- long bufferBytes;
-
- MUTEX_LOCK( &stream_.mutex );
- if ( stream_.state == STREAM_STOPPED ) {
- MUTEX_UNLOCK( &stream_.mutex );
- return;
- }
-
- if ( buffersRolling == false ) {
- if ( stream_.mode == DUPLEX ) {
- //assert( handle->dsBufferSize[0] == handle->dsBufferSize[1] );
-
- // It takes a while for the devices to get rolling. As a result,
- // there's no guarantee that the capture and write device pointers
- // will move in lockstep. Wait here for both devices to start
- // rolling, and then set our buffer pointers accordingly.
- // e.g. Crystal Drivers: the capture buffer starts up 5700 to 9600
- // bytes later than the write buffer.
-
- // Stub: a serious risk of having a pre-emptive scheduling round
- // take place between the two GetCurrentPosition calls... but I'm
- // really not sure how to solve the problem. Temporarily boost to
- // Realtime priority, maybe; but I'm not sure what priority the
- // DirectSound service threads run at. We *should* be roughly
- // within a ms or so of correct.
-
- LPDIRECTSOUNDBUFFER dsWriteBuffer = (LPDIRECTSOUNDBUFFER) handle->buffer[0];
- LPDIRECTSOUNDCAPTUREBUFFER dsCaptureBuffer = (LPDIRECTSOUNDCAPTUREBUFFER) handle->buffer[1];
-
- DWORD startSafeWritePointer, startSafeReadPointer;
-
- result = dsWriteBuffer->GetCurrentPosition( NULL, &startSafeWritePointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current write position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- result = dsCaptureBuffer->GetCurrentPosition( NULL, &startSafeReadPointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current read position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- while ( true ) {
- result = dsWriteBuffer->GetCurrentPosition( NULL, &safeWritePointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current write position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- result = dsCaptureBuffer->GetCurrentPosition( NULL, &safeReadPointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current read position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- if ( safeWritePointer != startSafeWritePointer && safeReadPointer != startSafeReadPointer ) break;
- Sleep( 1 );
- }
-
- //assert( handle->dsBufferSize[0] == handle->dsBufferSize[1] );
-
- handle->bufferPointer[0] = safeWritePointer + handle->dsPointerLeadTime[0];
- if ( handle->bufferPointer[0] >= handle->dsBufferSize[0] ) handle->bufferPointer[0] -= handle->dsBufferSize[0];
- handle->bufferPointer[1] = safeReadPointer;
- }
- else if ( stream_.mode == OUTPUT ) {
-
- // Set the proper nextWritePosition after initial startup.
- LPDIRECTSOUNDBUFFER dsWriteBuffer = (LPDIRECTSOUNDBUFFER) handle->buffer[0];
- result = dsWriteBuffer->GetCurrentPosition( &currentWritePointer, &safeWritePointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current write position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- handle->bufferPointer[0] = safeWritePointer + handle->dsPointerLeadTime[0];
- if ( handle->bufferPointer[0] >= handle->dsBufferSize[0] ) handle->bufferPointer[0] -= handle->dsBufferSize[0];
- }
-
- buffersRolling = true;
- }
-
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- LPDIRECTSOUNDBUFFER dsBuffer = (LPDIRECTSOUNDBUFFER) handle->buffer[0];
-
- if ( handle->drainCounter > 1 ) { // write zeros to the output stream
- bufferBytes = stream_.bufferSize * stream_.nUserChannels[0];
- bufferBytes *= formatBytes( stream_.userFormat );
- memset( stream_.userBuffer[0], 0, bufferBytes );
- }
-
- // Setup parameters and do buffer conversion if necessary.
- if ( stream_.doConvertBuffer[0] ) {
- buffer = stream_.deviceBuffer;
- convertBuffer( buffer, stream_.userBuffer[0], stream_.convertInfo[0] );
- bufferBytes = stream_.bufferSize * stream_.nDeviceChannels[0];
- bufferBytes *= formatBytes( stream_.deviceFormat[0] );
- }
- else {
- buffer = stream_.userBuffer[0];
- bufferBytes = stream_.bufferSize * stream_.nUserChannels[0];
- bufferBytes *= formatBytes( stream_.userFormat );
- }
-
- // No byte swapping necessary in DirectSound implementation.
-
- // Ahhh ... windoze. 16-bit data is signed but 8-bit data is
- // unsigned. So, we need to convert our signed 8-bit data here to
- // unsigned.
- if ( stream_.deviceFormat[0] == RTAUDIO_SINT8 )
- for ( int i=0; i<bufferBytes; i++ ) buffer[i] = (unsigned char) ( buffer[i] + 128 );
-
- DWORD dsBufferSize = handle->dsBufferSize[0];
- nextWritePointer = handle->bufferPointer[0];
-
- DWORD endWrite, leadPointer;
- while ( true ) {
- // Find out where the read and "safe write" pointers are.
- result = dsBuffer->GetCurrentPosition( &currentWritePointer, &safeWritePointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current write position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
-
- // We will copy our output buffer into the region between
- // safeWritePointer and leadPointer. If leadPointer is not
- // beyond the next endWrite position, wait until it is.
- leadPointer = safeWritePointer + handle->dsPointerLeadTime[0];
- //std::cout << "safeWritePointer = " << safeWritePointer << ", leadPointer = " << leadPointer << ", nextWritePointer = " << nextWritePointer << std::endl;
- if ( leadPointer > dsBufferSize ) leadPointer -= dsBufferSize;
- if ( leadPointer < nextWritePointer ) leadPointer += dsBufferSize; // unwrap offset
- endWrite = nextWritePointer + bufferBytes;
-
- // Check whether the entire write region is behind the play pointer.
- if ( leadPointer >= endWrite ) break;
-
- // If we are here, then we must wait until the leadPointer advances
- // beyond the end of our next write region. We use the
- // Sleep() function to suspend operation until that happens.
- double millis = ( endWrite - leadPointer ) * 1000.0;
- millis /= ( formatBytes( stream_.deviceFormat[0]) * stream_.nDeviceChannels[0] * stream_.sampleRate);
- if ( millis < 1.0 ) millis = 1.0;
- Sleep( (DWORD) millis );
- }
-
- if ( dsPointerBetween( nextWritePointer, safeWritePointer, currentWritePointer, dsBufferSize )
- || dsPointerBetween( endWrite, safeWritePointer, currentWritePointer, dsBufferSize ) ) {
- // We've strayed into the forbidden zone ... resync the read pointer.
- handle->xrun[0] = true;
- nextWritePointer = safeWritePointer + handle->dsPointerLeadTime[0] - bufferBytes;
- if ( nextWritePointer >= dsBufferSize ) nextWritePointer -= dsBufferSize;
- handle->bufferPointer[0] = nextWritePointer;
- endWrite = nextWritePointer + bufferBytes;
- }
-
- // Lock free space in the buffer
- result = dsBuffer->Lock( nextWritePointer, bufferBytes, &buffer1,
- &bufferSize1, &buffer2, &bufferSize2, 0 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") locking buffer during playback!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
-
- // Copy our buffer into the DS buffer
- CopyMemory( buffer1, buffer, bufferSize1 );
- if ( buffer2 != NULL ) CopyMemory( buffer2, buffer+bufferSize1, bufferSize2 );
-
- // Update our buffer offset and unlock sound buffer
- dsBuffer->Unlock( buffer1, bufferSize1, buffer2, bufferSize2 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") unlocking buffer during playback!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- nextWritePointer = ( nextWritePointer + bufferSize1 + bufferSize2 ) % dsBufferSize;
- handle->bufferPointer[0] = nextWritePointer;
- }
-
- // Don't bother draining input
- if ( handle->drainCounter ) {
- handle->drainCounter++;
- goto unlock;
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
-
- // Setup parameters.
- if ( stream_.doConvertBuffer[1] ) {
- buffer = stream_.deviceBuffer;
- bufferBytes = stream_.bufferSize * stream_.nDeviceChannels[1];
- bufferBytes *= formatBytes( stream_.deviceFormat[1] );
- }
- else {
- buffer = stream_.userBuffer[1];
- bufferBytes = stream_.bufferSize * stream_.nUserChannels[1];
- bufferBytes *= formatBytes( stream_.userFormat );
- }
-
- LPDIRECTSOUNDCAPTUREBUFFER dsBuffer = (LPDIRECTSOUNDCAPTUREBUFFER) handle->buffer[1];
- long nextReadPointer = handle->bufferPointer[1];
- DWORD dsBufferSize = handle->dsBufferSize[1];
-
- // Find out where the write and "safe read" pointers are.
- result = dsBuffer->GetCurrentPosition( &currentReadPointer, &safeReadPointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current read position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
-
- if ( safeReadPointer < (DWORD)nextReadPointer ) safeReadPointer += dsBufferSize; // unwrap offset
- DWORD endRead = nextReadPointer + bufferBytes;
-
- // Handling depends on whether we are INPUT or DUPLEX.
- // If we're in INPUT mode then waiting is a good thing. If we're in DUPLEX mode,
- // then a wait here will drag the write pointers into the forbidden zone.
- //
- // In DUPLEX mode, rather than wait, we will back off the read pointer until
- // it's in a safe position. This causes dropouts, but it seems to be the only
- // practical way to sync up the read and write pointers reliably, given the
- // the very complex relationship between phase and increment of the read and write
- // pointers.
- //
- // In order to minimize audible dropouts in DUPLEX mode, we will
- // provide a pre-roll period of 0.5 seconds in which we return
- // zeros from the read buffer while the pointers sync up.
-
- if ( stream_.mode == DUPLEX ) {
- if ( safeReadPointer < endRead ) {
- if ( duplexPrerollBytes <= 0 ) {
- // Pre-roll time over. Be more agressive.
- int adjustment = endRead-safeReadPointer;
-
- handle->xrun[1] = true;
- // Two cases:
- // - large adjustments: we've probably run out of CPU cycles, so just resync exactly,
- // and perform fine adjustments later.
- // - small adjustments: back off by twice as much.
- if ( adjustment >= 2*bufferBytes )
- nextReadPointer = safeReadPointer-2*bufferBytes;
- else
- nextReadPointer = safeReadPointer-bufferBytes-adjustment;
-
- if ( nextReadPointer < 0 ) nextReadPointer += dsBufferSize;
-
- }
- else {
- // In pre=roll time. Just do it.
- nextReadPointer = safeReadPointer - bufferBytes;
- while ( nextReadPointer < 0 ) nextReadPointer += dsBufferSize;
- }
- endRead = nextReadPointer + bufferBytes;
- }
- }
- else { // mode == INPUT
- while ( safeReadPointer < endRead && stream_.callbackInfo.isRunning ) {
- // See comments for playback.
- double millis = (endRead - safeReadPointer) * 1000.0;
- millis /= ( formatBytes(stream_.deviceFormat[1]) * stream_.nDeviceChannels[1] * stream_.sampleRate);
- if ( millis < 1.0 ) millis = 1.0;
- Sleep( (DWORD) millis );
-
- // Wake up and find out where we are now.
- result = dsBuffer->GetCurrentPosition( &currentReadPointer, &safeReadPointer );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current read position!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
-
- if ( safeReadPointer < (DWORD)nextReadPointer ) safeReadPointer += dsBufferSize; // unwrap offset
- }
- }
-
- // Lock free space in the buffer
- result = dsBuffer->Lock( nextReadPointer, bufferBytes, &buffer1,
- &bufferSize1, &buffer2, &bufferSize2, 0 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") locking capture buffer!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
-
- if ( duplexPrerollBytes <= 0 ) {
- // Copy our buffer into the DS buffer
- CopyMemory( buffer, buffer1, bufferSize1 );
- if ( buffer2 != NULL ) CopyMemory( buffer+bufferSize1, buffer2, bufferSize2 );
- }
- else {
- memset( buffer, 0, bufferSize1 );
- if ( buffer2 != NULL ) memset( buffer + bufferSize1, 0, bufferSize2 );
- duplexPrerollBytes -= bufferSize1 + bufferSize2;
- }
-
- // Update our buffer offset and unlock sound buffer
- nextReadPointer = ( nextReadPointer + bufferSize1 + bufferSize2 ) % dsBufferSize;
- dsBuffer->Unlock( buffer1, bufferSize1, buffer2, bufferSize2 );
- if ( FAILED( result ) ) {
- errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") unlocking capture buffer!";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- handle->bufferPointer[1] = nextReadPointer;
-
- // No byte swapping necessary in DirectSound implementation.
-
- // If necessary, convert 8-bit data from unsigned to signed.
- if ( stream_.deviceFormat[1] == RTAUDIO_SINT8 )
- for ( int j=0; j<bufferBytes; j++ ) buffer[j] = (signed char) ( buffer[j] - 128 );
-
- // Do buffer conversion if necessary.
- if ( stream_.doConvertBuffer[1] )
- convertBuffer( stream_.userBuffer[1], stream_.deviceBuffer, stream_.convertInfo[1] );
- }
-
- unlock:
- MUTEX_UNLOCK( &stream_.mutex );
- RtApi::tickStreamTime();
-}
-
-// Definitions for utility functions and callbacks
-// specific to the DirectSound implementation.
-
-static unsigned __stdcall callbackHandler( void *ptr )
-{
- CallbackInfo *info = (CallbackInfo *) ptr;
- RtApiDs *object = (RtApiDs *) info->object;
- bool* isRunning = &info->isRunning;
-
- while ( *isRunning == true ) {
- object->callbackEvent();
- }
-
- _endthreadex( 0 );
- return 0;
-}
-
-static BOOL CALLBACK deviceQueryCallback( LPGUID lpguid,
- LPCTSTR description,
- LPCTSTR /*module*/,
- LPVOID lpContext )
-{
- struct DsProbeData& probeInfo = *(struct DsProbeData*) lpContext;
- std::vector<struct DsDevice>& dsDevices = *probeInfo.dsDevices;
-
- HRESULT hr;
- bool validDevice = false;
- if ( probeInfo.isInput == true ) {
- DSCCAPS caps;
- LPDIRECTSOUNDCAPTURE object;
-
- hr = DirectSoundCaptureCreate( lpguid, &object, NULL );
- if ( hr != DS_OK ) return TRUE;
-
- caps.dwSize = sizeof(caps);
- hr = object->GetCaps( &caps );
- if ( hr == DS_OK ) {
- if ( caps.dwChannels > 0 && caps.dwFormats > 0 )
- validDevice = true;
- }
- object->Release();
- }
- else {
- DSCAPS caps;
- LPDIRECTSOUND object;
- hr = DirectSoundCreate( lpguid, &object, NULL );
- if ( hr != DS_OK ) return TRUE;
-
- caps.dwSize = sizeof(caps);
- hr = object->GetCaps( &caps );
- if ( hr == DS_OK ) {
- if ( caps.dwFlags & DSCAPS_PRIMARYMONO || caps.dwFlags & DSCAPS_PRIMARYSTEREO )
- validDevice = true;
- }
- object->Release();
- }
-
- // If good device, then save its name and guid.
- std::string name = convertCharPointerToStdString( description );
- //if ( name == "Primary Sound Driver" || name == "Primary Sound Capture Driver" )
- if ( lpguid == NULL )
- name = "Default Device";
- if ( validDevice ) {
- for ( unsigned int i=0; i<dsDevices.size(); i++ ) {
- if ( dsDevices[i].name == name ) {
- dsDevices[i].found = true;
- if ( probeInfo.isInput ) {
- dsDevices[i].id[1] = lpguid;
- dsDevices[i].validId[1] = true;
- }
- else {
- dsDevices[i].id[0] = lpguid;
- dsDevices[i].validId[0] = true;
- }
- return TRUE;
- }
- }
-
- DsDevice device;
- device.name = name;
- device.found = true;
- if ( probeInfo.isInput ) {
- device.id[1] = lpguid;
- device.validId[1] = true;
- }
- else {
- device.id[0] = lpguid;
- device.validId[0] = true;
- }
- dsDevices.push_back( device );
- }
-
- return TRUE;
-}
-
-static const char* getErrorString( int code )
-{
- switch ( code ) {
-
- case DSERR_ALLOCATED:
- return "Already allocated";
-
- case DSERR_CONTROLUNAVAIL:
- return "Control unavailable";
-
- case DSERR_INVALIDPARAM:
- return "Invalid parameter";
-
- case DSERR_INVALIDCALL:
- return "Invalid call";
-
- case DSERR_GENERIC:
- return "Generic error";
-
- case DSERR_PRIOLEVELNEEDED:
- return "Priority level needed";
-
- case DSERR_OUTOFMEMORY:
- return "Out of memory";
-
- case DSERR_BADFORMAT:
- return "The sample rate or the channel format is not supported";
-
- case DSERR_UNSUPPORTED:
- return "Not supported";
-
- case DSERR_NODRIVER:
- return "No driver";
-
- case DSERR_ALREADYINITIALIZED:
- return "Already initialized";
-
- case DSERR_NOAGGREGATION:
- return "No aggregation";
-
- case DSERR_BUFFERLOST:
- return "Buffer lost";
-
- case DSERR_OTHERAPPHASPRIO:
- return "Another application already has priority";
-
- case DSERR_UNINITIALIZED:
- return "Uninitialized";
-
- default:
- return "DirectSound unknown error";
- }
-}
-//******************** End of __WINDOWS_DS__ *********************//
-#endif
-
-
-#if defined(__LINUX_ALSA__)
-
-#include <alsa/asoundlib.h>
-#include <unistd.h>
-
- // A structure to hold various information related to the ALSA API
- // implementation.
-struct AlsaHandle {
- snd_pcm_t *handles[2];
- bool synchronized;
- bool xrun[2];
- pthread_cond_t runnable_cv;
- bool runnable;
-
- AlsaHandle()
- :synchronized(false), runnable(false) { xrun[0] = false; xrun[1] = false; }
-};
-
-static void *alsaCallbackHandler( void * ptr );
-
-RtApiAlsa :: RtApiAlsa()
-{
- // Nothing to do here.
-}
-
-RtApiAlsa :: ~RtApiAlsa()
-{
- if ( stream_.state != STREAM_CLOSED ) closeStream();
-}
-
-unsigned int RtApiAlsa :: getDeviceCount( void )
-{
- unsigned nDevices = 0;
- int result, subdevice, card;
- char name[64];
- snd_ctl_t *handle;
-
- // Count cards and devices
- card = -1;
- snd_card_next( &card );
- while ( card >= 0 ) {
- sprintf( name, "hw:%d", card );
- result = snd_ctl_open( &handle, name, 0 );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::getDeviceCount: control open, card = " << card << ", " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- goto nextcard;
- }
- subdevice = -1;
- while( 1 ) {
- result = snd_ctl_pcm_next_device( handle, &subdevice );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::getDeviceCount: control next device, card = " << card << ", " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- break;
- }
- if ( subdevice < 0 )
- break;
- nDevices++;
- }
- nextcard:
- snd_ctl_close( handle );
- snd_card_next( &card );
- }
-
- result = snd_ctl_open( &handle, "default", 0 );
- if (result == 0) {
- nDevices++;
- snd_ctl_close( handle );
- }
-
- return nDevices;
-}
-
-RtAudio::DeviceInfo RtApiAlsa :: getDeviceInfo( unsigned int device )
-{
- RtAudio::DeviceInfo info;
- info.probed = false;
-
- unsigned nDevices = 0;
- int result, subdevice, card;
- char name[64];
- snd_ctl_t *chandle;
-
- // Count cards and devices
- card = -1;
- subdevice = -1;
- snd_card_next( &card );
- while ( card >= 0 ) {
- sprintf( name, "hw:%d", card );
- result = snd_ctl_open( &chandle, name, SND_CTL_NONBLOCK );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::getDeviceInfo: control open, card = " << card << ", " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- goto nextcard;
- }
- subdevice = -1;
- while( 1 ) {
- result = snd_ctl_pcm_next_device( chandle, &subdevice );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::getDeviceInfo: control next device, card = " << card << ", " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- break;
- }
- if ( subdevice < 0 ) break;
- if ( nDevices == device ) {
- sprintf( name, "hw:%d,%d", card, subdevice );
- goto foundDevice;
- }
- nDevices++;
- }
- nextcard:
- snd_ctl_close( chandle );
- snd_card_next( &card );
- }
-
- result = snd_ctl_open( &chandle, "default", SND_CTL_NONBLOCK );
- if ( result == 0 ) {
- if ( nDevices == device ) {
- strcpy( name, "default" );
- goto foundDevice;
- }
- nDevices++;
- }
-
- if ( nDevices == 0 ) {
- errorText_ = "RtApiAlsa::getDeviceInfo: no devices found!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- if ( device >= nDevices ) {
- errorText_ = "RtApiAlsa::getDeviceInfo: device ID is invalid!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- foundDevice:
-
- // If a stream is already open, we cannot probe the stream devices.
- // Thus, use the saved results.
- if ( stream_.state != STREAM_CLOSED &&
- ( stream_.device[0] == device || stream_.device[1] == device ) ) {
- snd_ctl_close( chandle );
- if ( device >= devices_.size() ) {
- errorText_ = "RtApiAlsa::getDeviceInfo: device ID was not present before stream was opened.";
- error( RtAudioError::WARNING );
- return info;
- }
- return devices_[ device ];
- }
-
- int openMode = SND_PCM_ASYNC;
- snd_pcm_stream_t stream;
- snd_pcm_info_t *pcminfo;
- snd_pcm_info_alloca( &pcminfo );
- snd_pcm_t *phandle;
- snd_pcm_hw_params_t *params;
- snd_pcm_hw_params_alloca( &params );
-
- // First try for playback unless default device (which has subdev -1)
- stream = SND_PCM_STREAM_PLAYBACK;
- snd_pcm_info_set_stream( pcminfo, stream );
- if ( subdevice != -1 ) {
- snd_pcm_info_set_device( pcminfo, subdevice );
- snd_pcm_info_set_subdevice( pcminfo, 0 );
-
- result = snd_ctl_pcm_info( chandle, pcminfo );
- if ( result < 0 ) {
- // Device probably doesn't support playback.
- goto captureProbe;
- }
- }
-
- result = snd_pcm_open( &phandle, name, stream, openMode | SND_PCM_NONBLOCK );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- goto captureProbe;
- }
-
- // The device is open ... fill the parameter structure.
- result = snd_pcm_hw_params_any( phandle, params );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::getDeviceInfo: snd_pcm_hw_params error for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- goto captureProbe;
- }
-
- // Get output channel information.
- unsigned int value;
- result = snd_pcm_hw_params_get_channels_max( params, &value );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::getDeviceInfo: error getting device (" << name << ") output channels, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- goto captureProbe;
- }
- info.outputChannels = value;
- snd_pcm_close( phandle );
-
- captureProbe:
- stream = SND_PCM_STREAM_CAPTURE;
- snd_pcm_info_set_stream( pcminfo, stream );
-
- // Now try for capture unless default device (with subdev = -1)
- if ( subdevice != -1 ) {
- result = snd_ctl_pcm_info( chandle, pcminfo );
- snd_ctl_close( chandle );
- if ( result < 0 ) {
- // Device probably doesn't support capture.
- if ( info.outputChannels == 0 ) return info;
- goto probeParameters;
- }
- }
- else
- snd_ctl_close( chandle );
-
- result = snd_pcm_open( &phandle, name, stream, openMode | SND_PCM_NONBLOCK);
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- if ( info.outputChannels == 0 ) return info;
- goto probeParameters;
- }
-
- // The device is open ... fill the parameter structure.
- result = snd_pcm_hw_params_any( phandle, params );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::getDeviceInfo: snd_pcm_hw_params error for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- if ( info.outputChannels == 0 ) return info;
- goto probeParameters;
- }
-
- result = snd_pcm_hw_params_get_channels_max( params, &value );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::getDeviceInfo: error getting device (" << name << ") input channels, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- if ( info.outputChannels == 0 ) return info;
- goto probeParameters;
- }
- info.inputChannels = value;
- snd_pcm_close( phandle );
-
- // If device opens for both playback and capture, we determine the channels.
- if ( info.outputChannels > 0 && info.inputChannels > 0 )
- info.duplexChannels = (info.outputChannels > info.inputChannels) ? info.inputChannels : info.outputChannels;
-
- // ALSA doesn't provide default devices so we'll use the first available one.
- if ( device == 0 && info.outputChannels > 0 )
- info.isDefaultOutput = true;
- if ( device == 0 && info.inputChannels > 0 )
- info.isDefaultInput = true;
-
- probeParameters:
- // At this point, we just need to figure out the supported data
- // formats and sample rates. We'll proceed by opening the device in
- // the direction with the maximum number of channels, or playback if
- // they are equal. This might limit our sample rate options, but so
- // be it.
-
- if ( info.outputChannels >= info.inputChannels )
- stream = SND_PCM_STREAM_PLAYBACK;
- else
- stream = SND_PCM_STREAM_CAPTURE;
- snd_pcm_info_set_stream( pcminfo, stream );
-
- result = snd_pcm_open( &phandle, name, stream, openMode | SND_PCM_NONBLOCK);
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // The device is open ... fill the parameter structure.
- result = snd_pcm_hw_params_any( phandle, params );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::getDeviceInfo: snd_pcm_hw_params error for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Test our discrete set of sample rate values.
- info.sampleRates.clear();
- for ( unsigned int i=0; i<MAX_SAMPLE_RATES; i++ ) {
- if ( snd_pcm_hw_params_test_rate( phandle, params, SAMPLE_RATES[i], 0 ) == 0 ) {
- info.sampleRates.push_back( SAMPLE_RATES[i] );
-
- if ( !info.preferredSampleRate || ( SAMPLE_RATES[i] <= 48000 && SAMPLE_RATES[i] > info.preferredSampleRate ) )
- info.preferredSampleRate = SAMPLE_RATES[i];
- }
- }
- if ( info.sampleRates.size() == 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::getDeviceInfo: no supported sample rates found for device (" << name << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Probe the supported data formats ... we don't care about endian-ness just yet
- snd_pcm_format_t format;
- info.nativeFormats = 0;
- format = SND_PCM_FORMAT_S8;
- if ( snd_pcm_hw_params_test_format( phandle, params, format ) == 0 )
- info.nativeFormats |= RTAUDIO_SINT8;
- format = SND_PCM_FORMAT_S16;
- if ( snd_pcm_hw_params_test_format( phandle, params, format ) == 0 )
- info.nativeFormats |= RTAUDIO_SINT16;
- format = SND_PCM_FORMAT_S24;
- if ( snd_pcm_hw_params_test_format( phandle, params, format ) == 0 )
- info.nativeFormats |= RTAUDIO_SINT24;
- format = SND_PCM_FORMAT_S32;
- if ( snd_pcm_hw_params_test_format( phandle, params, format ) == 0 )
- info.nativeFormats |= RTAUDIO_SINT32;
- format = SND_PCM_FORMAT_FLOAT;
- if ( snd_pcm_hw_params_test_format( phandle, params, format ) == 0 )
- info.nativeFormats |= RTAUDIO_FLOAT32;
- format = SND_PCM_FORMAT_FLOAT64;
- if ( snd_pcm_hw_params_test_format( phandle, params, format ) == 0 )
- info.nativeFormats |= RTAUDIO_FLOAT64;
-
- // Check that we have at least one supported format
- if ( info.nativeFormats == 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::getDeviceInfo: pcm device (" << name << ") data format not supported by RtAudio.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Get the device name
- char *cardname;
- result = snd_card_get_name( card, &cardname );
- if ( result >= 0 ) {
- sprintf( name, "hw:%s,%d", cardname, subdevice );
- free( cardname );
- }
- info.name = name;
-
- // That's all ... close the device and return
- snd_pcm_close( phandle );
- info.probed = true;
- return info;
-}
-
-void RtApiAlsa :: saveDeviceInfo( void )
-{
- devices_.clear();
-
- unsigned int nDevices = getDeviceCount();
- devices_.resize( nDevices );
- for ( unsigned int i=0; i<nDevices; i++ )
- devices_[i] = getDeviceInfo( i );
-}
-
-bool RtApiAlsa :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options )
-
-{
-#if defined(__RTAUDIO_DEBUG__)
- snd_output_t *out;
- snd_output_stdio_attach(&out, stderr, 0);
-#endif
-
- // I'm not using the "plug" interface ... too much inconsistent behavior.
-
- unsigned nDevices = 0;
- int result, subdevice, card;
- char name[64];
- snd_ctl_t *chandle;
-
- if ( options && options->flags & RTAUDIO_ALSA_USE_DEFAULT )
- snprintf(name, sizeof(name), "%s", "default");
- else {
- // Count cards and devices
- card = -1;
- snd_card_next( &card );
- while ( card >= 0 ) {
- sprintf( name, "hw:%d", card );
- result = snd_ctl_open( &chandle, name, SND_CTL_NONBLOCK );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::probeDeviceOpen: control open, card = " << card << ", " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- subdevice = -1;
- while( 1 ) {
- result = snd_ctl_pcm_next_device( chandle, &subdevice );
- if ( result < 0 ) break;
- if ( subdevice < 0 ) break;
- if ( nDevices == device ) {
- sprintf( name, "hw:%d,%d", card, subdevice );
- snd_ctl_close( chandle );
- goto foundDevice;
- }
- nDevices++;
- }
- snd_ctl_close( chandle );
- snd_card_next( &card );
- }
-
- result = snd_ctl_open( &chandle, "default", SND_CTL_NONBLOCK );
- if ( result == 0 ) {
- if ( nDevices == device ) {
- strcpy( name, "default" );
- goto foundDevice;
- }
- nDevices++;
- }
-
- if ( nDevices == 0 ) {
- // This should not happen because a check is made before this function is called.
- errorText_ = "RtApiAlsa::probeDeviceOpen: no devices found!";
- return FAILURE;
- }
-
- if ( device >= nDevices ) {
- // This should not happen because a check is made before this function is called.
- errorText_ = "RtApiAlsa::probeDeviceOpen: device ID is invalid!";
- return FAILURE;
- }
- }
-
- foundDevice:
-
- // The getDeviceInfo() function will not work for a device that is
- // already open. Thus, we'll probe the system before opening a
- // stream and save the results for use by getDeviceInfo().
- if ( mode == OUTPUT || ( mode == INPUT && stream_.mode != OUTPUT ) ) // only do once
- this->saveDeviceInfo();
-
- snd_pcm_stream_t stream;
- if ( mode == OUTPUT )
- stream = SND_PCM_STREAM_PLAYBACK;
- else
- stream = SND_PCM_STREAM_CAPTURE;
-
- snd_pcm_t *phandle;
- int openMode = SND_PCM_ASYNC;
- result = snd_pcm_open( &phandle, name, stream, openMode );
- if ( result < 0 ) {
- if ( mode == OUTPUT )
- errorStream_ << "RtApiAlsa::probeDeviceOpen: pcm device (" << name << ") won't open for output.";
- else
- errorStream_ << "RtApiAlsa::probeDeviceOpen: pcm device (" << name << ") won't open for input.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Fill the parameter structure.
- snd_pcm_hw_params_t *hw_params;
- snd_pcm_hw_params_alloca( &hw_params );
- result = snd_pcm_hw_params_any( phandle, hw_params );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error getting pcm device (" << name << ") parameters, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
-#if defined(__RTAUDIO_DEBUG__)
- fprintf( stderr, "\nRtApiAlsa: dump hardware params just after device open:\n\n" );
- snd_pcm_hw_params_dump( hw_params, out );
-#endif
-
- // Set access ... check user preference.
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED ) {
- stream_.userInterleaved = false;
- result = snd_pcm_hw_params_set_access( phandle, hw_params, SND_PCM_ACCESS_RW_NONINTERLEAVED );
- if ( result < 0 ) {
- result = snd_pcm_hw_params_set_access( phandle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED );
- stream_.deviceInterleaved[mode] = true;
- }
- else
- stream_.deviceInterleaved[mode] = false;
- }
- else {
- stream_.userInterleaved = true;
- result = snd_pcm_hw_params_set_access( phandle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED );
- if ( result < 0 ) {
- result = snd_pcm_hw_params_set_access( phandle, hw_params, SND_PCM_ACCESS_RW_NONINTERLEAVED );
- stream_.deviceInterleaved[mode] = false;
- }
- else
- stream_.deviceInterleaved[mode] = true;
- }
-
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error setting pcm device (" << name << ") access, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Determine how to set the device format.
- stream_.userFormat = format;
- snd_pcm_format_t deviceFormat = SND_PCM_FORMAT_UNKNOWN;
-
- if ( format == RTAUDIO_SINT8 )
- deviceFormat = SND_PCM_FORMAT_S8;
- else if ( format == RTAUDIO_SINT16 )
- deviceFormat = SND_PCM_FORMAT_S16;
- else if ( format == RTAUDIO_SINT24 )
- deviceFormat = SND_PCM_FORMAT_S24;
- else if ( format == RTAUDIO_SINT32 )
- deviceFormat = SND_PCM_FORMAT_S32;
- else if ( format == RTAUDIO_FLOAT32 )
- deviceFormat = SND_PCM_FORMAT_FLOAT;
- else if ( format == RTAUDIO_FLOAT64 )
- deviceFormat = SND_PCM_FORMAT_FLOAT64;
-
- if ( snd_pcm_hw_params_test_format(phandle, hw_params, deviceFormat) == 0) {
- stream_.deviceFormat[mode] = format;
- goto setFormat;
- }
-
- // The user requested format is not natively supported by the device.
- deviceFormat = SND_PCM_FORMAT_FLOAT64;
- if ( snd_pcm_hw_params_test_format( phandle, hw_params, deviceFormat ) == 0 ) {
- stream_.deviceFormat[mode] = RTAUDIO_FLOAT64;
- goto setFormat;
- }
-
- deviceFormat = SND_PCM_FORMAT_FLOAT;
- if ( snd_pcm_hw_params_test_format(phandle, hw_params, deviceFormat ) == 0 ) {
- stream_.deviceFormat[mode] = RTAUDIO_FLOAT32;
- goto setFormat;
- }
-
- deviceFormat = SND_PCM_FORMAT_S32;
- if ( snd_pcm_hw_params_test_format(phandle, hw_params, deviceFormat ) == 0 ) {
- stream_.deviceFormat[mode] = RTAUDIO_SINT32;
- goto setFormat;
- }
-
- deviceFormat = SND_PCM_FORMAT_S24;
- if ( snd_pcm_hw_params_test_format(phandle, hw_params, deviceFormat ) == 0 ) {
- stream_.deviceFormat[mode] = RTAUDIO_SINT24;
- goto setFormat;
- }
-
- deviceFormat = SND_PCM_FORMAT_S16;
- if ( snd_pcm_hw_params_test_format(phandle, hw_params, deviceFormat ) == 0 ) {
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- goto setFormat;
- }
-
- deviceFormat = SND_PCM_FORMAT_S8;
- if ( snd_pcm_hw_params_test_format(phandle, hw_params, deviceFormat ) == 0 ) {
- stream_.deviceFormat[mode] = RTAUDIO_SINT8;
- goto setFormat;
- }
-
- // If we get here, no supported format was found.
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: pcm device " << device << " data format not supported by RtAudio.";
- errorText_ = errorStream_.str();
- return FAILURE;
-
- setFormat:
- result = snd_pcm_hw_params_set_format( phandle, hw_params, deviceFormat );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error setting pcm device (" << name << ") data format, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Determine whether byte-swaping is necessary.
- stream_.doByteSwap[mode] = false;
- if ( deviceFormat != SND_PCM_FORMAT_S8 ) {
- result = snd_pcm_format_cpu_endian( deviceFormat );
- if ( result == 0 )
- stream_.doByteSwap[mode] = true;
- else if (result < 0) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error getting pcm device (" << name << ") endian-ness, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
-
- // Set the sample rate.
- result = snd_pcm_hw_params_set_rate_near( phandle, hw_params, (unsigned int*) &sampleRate, 0 );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error setting sample rate on device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Determine the number of channels for this device. We support a possible
- // minimum device channel number > than the value requested by the user.
- stream_.nUserChannels[mode] = channels;
- unsigned int value;
- result = snd_pcm_hw_params_get_channels_max( hw_params, &value );
- unsigned int deviceChannels = value;
- if ( result < 0 || deviceChannels < channels + firstChannel ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: requested channel parameters not supported by device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- result = snd_pcm_hw_params_get_channels_min( hw_params, &value );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error getting minimum channels for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- deviceChannels = value;
- if ( deviceChannels < channels + firstChannel ) deviceChannels = channels + firstChannel;
- stream_.nDeviceChannels[mode] = deviceChannels;
-
- // Set the device channels.
- result = snd_pcm_hw_params_set_channels( phandle, hw_params, deviceChannels );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error setting channels for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Set the buffer (or period) size.
- int dir = 0;
- snd_pcm_uframes_t periodSize = *bufferSize;
- result = snd_pcm_hw_params_set_period_size_near( phandle, hw_params, &periodSize, &dir );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error setting period size for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- *bufferSize = periodSize;
-
- // Set the buffer number, which in ALSA is referred to as the "period".
- unsigned int periods = 0;
- if ( options && options->flags & RTAUDIO_MINIMIZE_LATENCY ) periods = 2;
- if ( options && options->numberOfBuffers > 0 ) periods = options->numberOfBuffers;
- if ( periods < 2 ) periods = 4; // a fairly safe default value
- result = snd_pcm_hw_params_set_periods_near( phandle, hw_params, &periods, &dir );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error setting periods for device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // If attempting to setup a duplex stream, the bufferSize parameter
- // MUST be the same in both directions!
- if ( stream_.mode == OUTPUT && mode == INPUT && *bufferSize != stream_.bufferSize ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: system error setting buffer size for duplex stream on device (" << name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- stream_.bufferSize = *bufferSize;
-
- // Install the hardware configuration
- result = snd_pcm_hw_params( phandle, hw_params );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error installing hardware configuration on device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
-#if defined(__RTAUDIO_DEBUG__)
- fprintf(stderr, "\nRtApiAlsa: dump hardware params after installation:\n\n");
- snd_pcm_hw_params_dump( hw_params, out );
-#endif
-
- // Set the software configuration to fill buffers with zeros and prevent device stopping on xruns.
- snd_pcm_sw_params_t *sw_params = NULL;
- snd_pcm_sw_params_alloca( &sw_params );
- snd_pcm_sw_params_current( phandle, sw_params );
- snd_pcm_sw_params_set_start_threshold( phandle, sw_params, *bufferSize );
- snd_pcm_sw_params_set_stop_threshold( phandle, sw_params, ULONG_MAX );
- snd_pcm_sw_params_set_silence_threshold( phandle, sw_params, 0 );
-
- // The following two settings were suggested by Theo Veenker
- //snd_pcm_sw_params_set_avail_min( phandle, sw_params, *bufferSize );
- //snd_pcm_sw_params_set_xfer_align( phandle, sw_params, 1 );
-
- // here are two options for a fix
- //snd_pcm_sw_params_set_silence_size( phandle, sw_params, ULONG_MAX );
- snd_pcm_uframes_t val;
- snd_pcm_sw_params_get_boundary( sw_params, &val );
- snd_pcm_sw_params_set_silence_size( phandle, sw_params, val );
-
- result = snd_pcm_sw_params( phandle, sw_params );
- if ( result < 0 ) {
- snd_pcm_close( phandle );
- errorStream_ << "RtApiAlsa::probeDeviceOpen: error installing software configuration on device (" << name << "), " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
-#if defined(__RTAUDIO_DEBUG__)
- fprintf(stderr, "\nRtApiAlsa: dump software params after installation:\n\n");
- snd_pcm_sw_params_dump( sw_params, out );
-#endif
-
- // Set flags for buffer conversion
- stream_.doConvertBuffer[mode] = false;
- if ( stream_.userFormat != stream_.deviceFormat[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.nUserChannels[mode] < stream_.nDeviceChannels[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.userInterleaved != stream_.deviceInterleaved[mode] &&
- stream_.nUserChannels[mode] > 1 )
- stream_.doConvertBuffer[mode] = true;
-
- // Allocate the ApiHandle if necessary and then save.
- AlsaHandle *apiInfo = 0;
- if ( stream_.apiHandle == 0 ) {
- try {
- apiInfo = (AlsaHandle *) new AlsaHandle;
- }
- catch ( std::bad_alloc& ) {
- errorText_ = "RtApiAlsa::probeDeviceOpen: error allocating AlsaHandle memory.";
- goto error;
- }
-
- if ( pthread_cond_init( &apiInfo->runnable_cv, NULL ) ) {
- errorText_ = "RtApiAlsa::probeDeviceOpen: error initializing pthread condition variable.";
- goto error;
- }
-
- stream_.apiHandle = (void *) apiInfo;
- apiInfo->handles[0] = 0;
- apiInfo->handles[1] = 0;
- }
- else {
- apiInfo = (AlsaHandle *) stream_.apiHandle;
- }
- apiInfo->handles[mode] = phandle;
- phandle = 0;
-
- // Allocate necessary internal buffers.
- unsigned long bufferBytes;
- bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
- stream_.userBuffer[mode] = (char *) calloc( bufferBytes, 1 );
- if ( stream_.userBuffer[mode] == NULL ) {
- errorText_ = "RtApiAlsa::probeDeviceOpen: error allocating user buffer memory.";
- goto error;
- }
-
- if ( stream_.doConvertBuffer[mode] ) {
-
- bool makeBuffer = true;
- bufferBytes = stream_.nDeviceChannels[mode] * formatBytes( stream_.deviceFormat[mode] );
- if ( mode == INPUT ) {
- if ( stream_.mode == OUTPUT && stream_.deviceBuffer ) {
- unsigned long bytesOut = stream_.nDeviceChannels[0] * formatBytes( stream_.deviceFormat[0] );
- if ( bufferBytes <= bytesOut ) makeBuffer = false;
- }
- }
-
- if ( makeBuffer ) {
- bufferBytes *= *bufferSize;
- if ( stream_.deviceBuffer ) free( stream_.deviceBuffer );
- stream_.deviceBuffer = (char *) calloc( bufferBytes, 1 );
- if ( stream_.deviceBuffer == NULL ) {
- errorText_ = "RtApiAlsa::probeDeviceOpen: error allocating device buffer memory.";
- goto error;
- }
- }
- }
-
- stream_.sampleRate = sampleRate;
- stream_.nBuffers = periods;
- stream_.device[mode] = device;
- stream_.state = STREAM_STOPPED;
-
- // Setup the buffer conversion information structure.
- if ( stream_.doConvertBuffer[mode] ) setConvertInfo( mode, firstChannel );
-
- // Setup thread if necessary.
- if ( stream_.mode == OUTPUT && mode == INPUT ) {
- // We had already set up an output stream.
- stream_.mode = DUPLEX;
- // Link the streams if possible.
- apiInfo->synchronized = false;
- if ( snd_pcm_link( apiInfo->handles[0], apiInfo->handles[1] ) == 0 )
- apiInfo->synchronized = true;
- else {
- errorText_ = "RtApiAlsa::probeDeviceOpen: unable to synchronize input and output devices.";
- error( RtAudioError::WARNING );
- }
- }
- else {
- stream_.mode = mode;
-
- // Setup callback thread.
- stream_.callbackInfo.object = (void *) this;
-
- // Set the thread attributes for joinable and realtime scheduling
- // priority (optional). The higher priority will only take affect
- // if the program is run as root or suid. Note, under Linux
- // processes with CAP_SYS_NICE privilege, a user can change
- // scheduling policy and priority (thus need not be root). See
- // POSIX "capabilities".
- pthread_attr_t attr;
- pthread_attr_init( &attr );
- pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE );
-
-#ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread)
- if ( options && options->flags & RTAUDIO_SCHEDULE_REALTIME ) {
- // We previously attempted to increase the audio callback priority
- // to SCHED_RR here via the attributes. However, while no errors
- // were reported in doing so, it did not work. So, now this is
- // done in the alsaCallbackHandler function.
- stream_.callbackInfo.doRealtime = true;
- int priority = options->priority;
- int min = sched_get_priority_min( SCHED_RR );
- int max = sched_get_priority_max( SCHED_RR );
- if ( priority < min ) priority = min;
- else if ( priority > max ) priority = max;
- stream_.callbackInfo.priority = priority;
- }
-#endif
-
- stream_.callbackInfo.isRunning = true;
- result = pthread_create( &stream_.callbackInfo.thread, &attr, alsaCallbackHandler, &stream_.callbackInfo );
- pthread_attr_destroy( &attr );
- if ( result ) {
- stream_.callbackInfo.isRunning = false;
- errorText_ = "RtApiAlsa::error creating callback thread!";
- goto error;
- }
- }
-
- return SUCCESS;
-
- error:
- if ( apiInfo ) {
- pthread_cond_destroy( &apiInfo->runnable_cv );
- if ( apiInfo->handles[0] ) snd_pcm_close( apiInfo->handles[0] );
- if ( apiInfo->handles[1] ) snd_pcm_close( apiInfo->handles[1] );
- delete apiInfo;
- stream_.apiHandle = 0;
- }
-
- if ( phandle) snd_pcm_close( phandle );
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.state = STREAM_CLOSED;
- return FAILURE;
-}
-
-void RtApiAlsa :: closeStream()
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiAlsa::closeStream(): no open stream to close!";
- error( RtAudioError::WARNING );
- return;
- }
-
- AlsaHandle *apiInfo = (AlsaHandle *) stream_.apiHandle;
- stream_.callbackInfo.isRunning = false;
- MUTEX_LOCK( &stream_.mutex );
- if ( stream_.state == STREAM_STOPPED ) {
- apiInfo->runnable = true;
- pthread_cond_signal( &apiInfo->runnable_cv );
- }
- MUTEX_UNLOCK( &stream_.mutex );
- pthread_join( stream_.callbackInfo.thread, NULL );
-
- if ( stream_.state == STREAM_RUNNING ) {
- stream_.state = STREAM_STOPPED;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX )
- snd_pcm_drop( apiInfo->handles[0] );
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX )
- snd_pcm_drop( apiInfo->handles[1] );
- }
-
- if ( apiInfo ) {
- pthread_cond_destroy( &apiInfo->runnable_cv );
- if ( apiInfo->handles[0] ) snd_pcm_close( apiInfo->handles[0] );
- if ( apiInfo->handles[1] ) snd_pcm_close( apiInfo->handles[1] );
- delete apiInfo;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.mode = UNINITIALIZED;
- stream_.state = STREAM_CLOSED;
-}
-
-void RtApiAlsa :: startStream()
-{
- // This method calls snd_pcm_prepare if the device isn't already in that state.
-
- verifyStream();
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiAlsa::startStream(): the stream is already running!";
- error( RtAudioError::WARNING );
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
-
- int result = 0;
- snd_pcm_state_t state;
- AlsaHandle *apiInfo = (AlsaHandle *) stream_.apiHandle;
- snd_pcm_t **handle = (snd_pcm_t **) apiInfo->handles;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- state = snd_pcm_state( handle[0] );
- if ( state != SND_PCM_STATE_PREPARED ) {
- result = snd_pcm_prepare( handle[0] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::startStream: error preparing output pcm device, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
- }
-
- if ( ( stream_.mode == INPUT || stream_.mode == DUPLEX ) && !apiInfo->synchronized ) {
- result = snd_pcm_drop(handle[1]); // fix to remove stale data received since device has been open
- state = snd_pcm_state( handle[1] );
- if ( state != SND_PCM_STATE_PREPARED ) {
- result = snd_pcm_prepare( handle[1] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::startStream: error preparing input pcm device, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
- }
-
- stream_.state = STREAM_RUNNING;
-
- unlock:
- apiInfo->runnable = true;
- pthread_cond_signal( &apiInfo->runnable_cv );
- MUTEX_UNLOCK( &stream_.mutex );
-
- if ( result >= 0 ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiAlsa :: stopStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiAlsa::stopStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- stream_.state = STREAM_STOPPED;
- MUTEX_LOCK( &stream_.mutex );
-
- int result = 0;
- AlsaHandle *apiInfo = (AlsaHandle *) stream_.apiHandle;
- snd_pcm_t **handle = (snd_pcm_t **) apiInfo->handles;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- if ( apiInfo->synchronized )
- result = snd_pcm_drop( handle[0] );
- else
- result = snd_pcm_drain( handle[0] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::stopStream: error draining output pcm device, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- if ( ( stream_.mode == INPUT || stream_.mode == DUPLEX ) && !apiInfo->synchronized ) {
- result = snd_pcm_drop( handle[1] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::stopStream: error stopping input pcm device, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- unlock:
- apiInfo->runnable = false; // fixes high CPU usage when stopped
- MUTEX_UNLOCK( &stream_.mutex );
-
- if ( result >= 0 ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiAlsa :: abortStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiAlsa::abortStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- stream_.state = STREAM_STOPPED;
- MUTEX_LOCK( &stream_.mutex );
-
- int result = 0;
- AlsaHandle *apiInfo = (AlsaHandle *) stream_.apiHandle;
- snd_pcm_t **handle = (snd_pcm_t **) apiInfo->handles;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- result = snd_pcm_drop( handle[0] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::abortStream: error aborting output pcm device, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- if ( ( stream_.mode == INPUT || stream_.mode == DUPLEX ) && !apiInfo->synchronized ) {
- result = snd_pcm_drop( handle[1] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::abortStream: error aborting input pcm device, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- unlock:
- apiInfo->runnable = false; // fixes high CPU usage when stopped
- MUTEX_UNLOCK( &stream_.mutex );
-
- if ( result >= 0 ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiAlsa :: callbackEvent()
-{
- AlsaHandle *apiInfo = (AlsaHandle *) stream_.apiHandle;
- if ( stream_.state == STREAM_STOPPED ) {
- MUTEX_LOCK( &stream_.mutex );
- while ( !apiInfo->runnable )
- pthread_cond_wait( &apiInfo->runnable_cv, &stream_.mutex );
-
- if ( stream_.state != STREAM_RUNNING ) {
- MUTEX_UNLOCK( &stream_.mutex );
- return;
- }
- MUTEX_UNLOCK( &stream_.mutex );
- }
-
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiAlsa::callbackEvent(): the stream is closed ... this shouldn't happen!";
- error( RtAudioError::WARNING );
- return;
- }
-
- int doStopStream = 0;
- RtAudioCallback callback = (RtAudioCallback) stream_.callbackInfo.callback;
- double streamTime = getStreamTime();
- RtAudioStreamStatus status = 0;
- if ( stream_.mode != INPUT && apiInfo->xrun[0] == true ) {
- status |= RTAUDIO_OUTPUT_UNDERFLOW;
- apiInfo->xrun[0] = false;
- }
- if ( stream_.mode != OUTPUT && apiInfo->xrun[1] == true ) {
- status |= RTAUDIO_INPUT_OVERFLOW;
- apiInfo->xrun[1] = false;
- }
- doStopStream = callback( stream_.userBuffer[0], stream_.userBuffer[1],
- stream_.bufferSize, streamTime, status, stream_.callbackInfo.userData );
-
- if ( doStopStream == 2 ) {
- abortStream();
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
-
- // The state might change while waiting on a mutex.
- if ( stream_.state == STREAM_STOPPED ) goto unlock;
-
- int result;
- char *buffer;
- int channels;
- snd_pcm_t **handle;
- snd_pcm_sframes_t frames;
- RtAudioFormat format;
- handle = (snd_pcm_t **) apiInfo->handles;
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
-
- // Setup parameters.
- if ( stream_.doConvertBuffer[1] ) {
- buffer = stream_.deviceBuffer;
- channels = stream_.nDeviceChannels[1];
- format = stream_.deviceFormat[1];
- }
- else {
- buffer = stream_.userBuffer[1];
- channels = stream_.nUserChannels[1];
- format = stream_.userFormat;
- }
-
- // Read samples from device in interleaved/non-interleaved format.
- if ( stream_.deviceInterleaved[1] )
- result = snd_pcm_readi( handle[1], buffer, stream_.bufferSize );
- else {
- void *bufs[channels];
- size_t offset = stream_.bufferSize * formatBytes( format );
- for ( int i=0; i<channels; i++ )
- bufs[i] = (void *) (buffer + (i * offset));
- result = snd_pcm_readn( handle[1], bufs, stream_.bufferSize );
- }
-
- if ( result < (int) stream_.bufferSize ) {
- // Either an error or overrun occured.
- if ( result == -EPIPE ) {
- snd_pcm_state_t state = snd_pcm_state( handle[1] );
- if ( state == SND_PCM_STATE_XRUN ) {
- apiInfo->xrun[1] = true;
- result = snd_pcm_prepare( handle[1] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::callbackEvent: error preparing device after overrun, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- }
- }
- else {
- errorStream_ << "RtApiAlsa::callbackEvent: error, current state is " << snd_pcm_state_name( state ) << ", " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- }
- }
- else {
- errorStream_ << "RtApiAlsa::callbackEvent: audio read error, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- }
- error( RtAudioError::WARNING );
- goto tryOutput;
- }
-
- // Do byte swapping if necessary.
- if ( stream_.doByteSwap[1] )
- byteSwapBuffer( buffer, stream_.bufferSize * channels, format );
-
- // Do buffer conversion if necessary.
- if ( stream_.doConvertBuffer[1] )
- convertBuffer( stream_.userBuffer[1], stream_.deviceBuffer, stream_.convertInfo[1] );
-
- // Check stream latency
- result = snd_pcm_delay( handle[1], &frames );
- if ( result == 0 && frames > 0 ) stream_.latency[1] = frames;
- }
-
- tryOutput:
-
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- // Setup parameters and do buffer conversion if necessary.
- if ( stream_.doConvertBuffer[0] ) {
- buffer = stream_.deviceBuffer;
- convertBuffer( buffer, stream_.userBuffer[0], stream_.convertInfo[0] );
- channels = stream_.nDeviceChannels[0];
- format = stream_.deviceFormat[0];
- }
- else {
- buffer = stream_.userBuffer[0];
- channels = stream_.nUserChannels[0];
- format = stream_.userFormat;
- }
-
- // Do byte swapping if necessary.
- if ( stream_.doByteSwap[0] )
- byteSwapBuffer(buffer, stream_.bufferSize * channels, format);
-
- // Write samples to device in interleaved/non-interleaved format.
- if ( stream_.deviceInterleaved[0] )
- result = snd_pcm_writei( handle[0], buffer, stream_.bufferSize );
- else {
- void *bufs[channels];
- size_t offset = stream_.bufferSize * formatBytes( format );
- for ( int i=0; i<channels; i++ )
- bufs[i] = (void *) (buffer + (i * offset));
- result = snd_pcm_writen( handle[0], bufs, stream_.bufferSize );
- }
-
- if ( result < (int) stream_.bufferSize ) {
- // Either an error or underrun occured.
- if ( result == -EPIPE ) {
- snd_pcm_state_t state = snd_pcm_state( handle[0] );
- if ( state == SND_PCM_STATE_XRUN ) {
- apiInfo->xrun[0] = true;
- result = snd_pcm_prepare( handle[0] );
- if ( result < 0 ) {
- errorStream_ << "RtApiAlsa::callbackEvent: error preparing device after underrun, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- }
- else
- errorText_ = "RtApiAlsa::callbackEvent: audio write error, underrun.";
- }
- else {
- errorStream_ << "RtApiAlsa::callbackEvent: error, current state is " << snd_pcm_state_name( state ) << ", " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- }
- }
- else {
- errorStream_ << "RtApiAlsa::callbackEvent: audio write error, " << snd_strerror( result ) << ".";
- errorText_ = errorStream_.str();
- }
- error( RtAudioError::WARNING );
- goto unlock;
- }
-
- // Check stream latency
- result = snd_pcm_delay( handle[0], &frames );
- if ( result == 0 && frames > 0 ) stream_.latency[0] = frames;
- }
-
- unlock:
- MUTEX_UNLOCK( &stream_.mutex );
-
- RtApi::tickStreamTime();
- if ( doStopStream == 1 ) this->stopStream();
-}
-
-static void *alsaCallbackHandler( void *ptr )
-{
- CallbackInfo *info = (CallbackInfo *) ptr;
- RtApiAlsa *object = (RtApiAlsa *) info->object;
- bool *isRunning = &info->isRunning;
-
-#ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread)
- if ( info->doRealtime ) {
- pthread_t tID = pthread_self(); // ID of this thread
- sched_param prio = { info->priority }; // scheduling priority of thread
- pthread_setschedparam( tID, SCHED_RR, &prio );
- }
-#endif
-
- while ( *isRunning == true ) {
- pthread_testcancel();
- object->callbackEvent();
- }
-
- pthread_exit( NULL );
-}
-
-//******************** End of __LINUX_ALSA__ *********************//
-#endif
-
-#if defined(__LINUX_PULSE__)
-
-// Code written by Peter Meerwald, pmeerw@pmeerw.net
-// and Tristan Matthews.
-
-#include <pulse/error.h>
-#include <pulse/simple.h>
-#include <cstdio>
-
-static const unsigned int SUPPORTED_SAMPLERATES[] = { 8000, 16000, 22050, 32000,
- 44100, 48000, 96000, 0};
-
-struct rtaudio_pa_format_mapping_t {
- RtAudioFormat rtaudio_format;
- pa_sample_format_t pa_format;
-};
-
-static const rtaudio_pa_format_mapping_t supported_sampleformats[] = {
- {RTAUDIO_SINT16, PA_SAMPLE_S16LE},
- {RTAUDIO_SINT32, PA_SAMPLE_S32LE},
- {RTAUDIO_FLOAT32, PA_SAMPLE_FLOAT32LE},
- {0, PA_SAMPLE_INVALID}};
-
-struct PulseAudioHandle {
- pa_simple *s_play;
- pa_simple *s_rec;
- pthread_t thread;
- pthread_cond_t runnable_cv;
- bool runnable;
- PulseAudioHandle() : s_play(0), s_rec(0), runnable(false) { }
-};
-
-RtApiPulse::~RtApiPulse()
-{
- if ( stream_.state != STREAM_CLOSED )
- closeStream();
-}
-
-unsigned int RtApiPulse::getDeviceCount( void )
-{
- return 1;
-}
-
-RtAudio::DeviceInfo RtApiPulse::getDeviceInfo( unsigned int /*device*/ )
-{
- RtAudio::DeviceInfo info;
- info.probed = true;
- info.name = "PulseAudio";
- info.outputChannels = 2;
- info.inputChannels = 2;
- info.duplexChannels = 2;
- info.isDefaultOutput = true;
- info.isDefaultInput = true;
-
- for ( const unsigned int *sr = SUPPORTED_SAMPLERATES; *sr; ++sr )
- info.sampleRates.push_back( *sr );
-
- info.preferredSampleRate = 48000;
- info.nativeFormats = RTAUDIO_SINT16 | RTAUDIO_SINT32 | RTAUDIO_FLOAT32;
-
- return info;
-}
-
-static void *pulseaudio_callback( void * user )
-{
- CallbackInfo *cbi = static_cast<CallbackInfo *>( user );
- RtApiPulse *context = static_cast<RtApiPulse *>( cbi->object );
- volatile bool *isRunning = &cbi->isRunning;
-
- while ( *isRunning ) {
- pthread_testcancel();
- context->callbackEvent();
- }
-
- pthread_exit( NULL );
-}
-
-void RtApiPulse::closeStream( void )
-{
- PulseAudioHandle *pah = static_cast<PulseAudioHandle *>( stream_.apiHandle );
-
- stream_.callbackInfo.isRunning = false;
- if ( pah ) {
- MUTEX_LOCK( &stream_.mutex );
- if ( stream_.state == STREAM_STOPPED ) {
- pah->runnable = true;
- pthread_cond_signal( &pah->runnable_cv );
- }
- MUTEX_UNLOCK( &stream_.mutex );
-
- pthread_join( pah->thread, 0 );
- if ( pah->s_play ) {
- pa_simple_flush( pah->s_play, NULL );
- pa_simple_free( pah->s_play );
- }
- if ( pah->s_rec )
- pa_simple_free( pah->s_rec );
-
- pthread_cond_destroy( &pah->runnable_cv );
- delete pah;
- stream_.apiHandle = 0;
- }
-
- if ( stream_.userBuffer[0] ) {
- free( stream_.userBuffer[0] );
- stream_.userBuffer[0] = 0;
- }
- if ( stream_.userBuffer[1] ) {
- free( stream_.userBuffer[1] );
- stream_.userBuffer[1] = 0;
- }
-
- stream_.state = STREAM_CLOSED;
- stream_.mode = UNINITIALIZED;
-}
-
-void RtApiPulse::callbackEvent( void )
-{
- PulseAudioHandle *pah = static_cast<PulseAudioHandle *>( stream_.apiHandle );
-
- if ( stream_.state == STREAM_STOPPED ) {
- MUTEX_LOCK( &stream_.mutex );
- while ( !pah->runnable )
- pthread_cond_wait( &pah->runnable_cv, &stream_.mutex );
-
- if ( stream_.state != STREAM_RUNNING ) {
- MUTEX_UNLOCK( &stream_.mutex );
- return;
- }
- MUTEX_UNLOCK( &stream_.mutex );
- }
-
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiPulse::callbackEvent(): the stream is closed ... "
- "this shouldn't happen!";
- error( RtAudioError::WARNING );
- return;
- }
-
- RtAudioCallback callback = (RtAudioCallback) stream_.callbackInfo.callback;
- double streamTime = getStreamTime();
- RtAudioStreamStatus status = 0;
- int doStopStream = callback( stream_.userBuffer[OUTPUT], stream_.userBuffer[INPUT],
- stream_.bufferSize, streamTime, status,
- stream_.callbackInfo.userData );
-
- if ( doStopStream == 2 ) {
- abortStream();
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
- void *pulse_in = stream_.doConvertBuffer[INPUT] ? stream_.deviceBuffer : stream_.userBuffer[INPUT];
- void *pulse_out = stream_.doConvertBuffer[OUTPUT] ? stream_.deviceBuffer : stream_.userBuffer[OUTPUT];
-
- if ( stream_.state != STREAM_RUNNING )
- goto unlock;
-
- int pa_error;
- size_t bytes;
- if (stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- if ( stream_.doConvertBuffer[OUTPUT] ) {
- convertBuffer( stream_.deviceBuffer,
- stream_.userBuffer[OUTPUT],
- stream_.convertInfo[OUTPUT] );
- bytes = stream_.nDeviceChannels[OUTPUT] * stream_.bufferSize *
- formatBytes( stream_.deviceFormat[OUTPUT] );
- } else
- bytes = stream_.nUserChannels[OUTPUT] * stream_.bufferSize *
- formatBytes( stream_.userFormat );
-
- if ( pa_simple_write( pah->s_play, pulse_out, bytes, &pa_error ) < 0 ) {
- errorStream_ << "RtApiPulse::callbackEvent: audio write error, " <<
- pa_strerror( pa_error ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- }
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX) {
- if ( stream_.doConvertBuffer[INPUT] )
- bytes = stream_.nDeviceChannels[INPUT] * stream_.bufferSize *
- formatBytes( stream_.deviceFormat[INPUT] );
- else
- bytes = stream_.nUserChannels[INPUT] * stream_.bufferSize *
- formatBytes( stream_.userFormat );
-
- if ( pa_simple_read( pah->s_rec, pulse_in, bytes, &pa_error ) < 0 ) {
- errorStream_ << "RtApiPulse::callbackEvent: audio read error, " <<
- pa_strerror( pa_error ) << ".";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- }
- if ( stream_.doConvertBuffer[INPUT] ) {
- convertBuffer( stream_.userBuffer[INPUT],
- stream_.deviceBuffer,
- stream_.convertInfo[INPUT] );
- }
- }
-
- unlock:
- MUTEX_UNLOCK( &stream_.mutex );
- RtApi::tickStreamTime();
-
- if ( doStopStream == 1 )
- stopStream();
-}
-
-void RtApiPulse::startStream( void )
-{
- PulseAudioHandle *pah = static_cast<PulseAudioHandle *>( stream_.apiHandle );
-
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiPulse::startStream(): the stream is not open!";
- error( RtAudioError::INVALID_USE );
- return;
- }
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiPulse::startStream(): the stream is already running!";
- error( RtAudioError::WARNING );
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
-
- stream_.state = STREAM_RUNNING;
-
- pah->runnable = true;
- pthread_cond_signal( &pah->runnable_cv );
- MUTEX_UNLOCK( &stream_.mutex );
-}
-
-void RtApiPulse::stopStream( void )
-{
- PulseAudioHandle *pah = static_cast<PulseAudioHandle *>( stream_.apiHandle );
-
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiPulse::stopStream(): the stream is not open!";
- error( RtAudioError::INVALID_USE );
- return;
- }
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiPulse::stopStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- stream_.state = STREAM_STOPPED;
- MUTEX_LOCK( &stream_.mutex );
-
- if ( pah && pah->s_play ) {
- int pa_error;
- if ( pa_simple_drain( pah->s_play, &pa_error ) < 0 ) {
- errorStream_ << "RtApiPulse::stopStream: error draining output device, " <<
- pa_strerror( pa_error ) << ".";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- }
-
- stream_.state = STREAM_STOPPED;
- MUTEX_UNLOCK( &stream_.mutex );
-}
-
-void RtApiPulse::abortStream( void )
-{
- PulseAudioHandle *pah = static_cast<PulseAudioHandle*>( stream_.apiHandle );
-
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiPulse::abortStream(): the stream is not open!";
- error( RtAudioError::INVALID_USE );
- return;
- }
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiPulse::abortStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- stream_.state = STREAM_STOPPED;
- MUTEX_LOCK( &stream_.mutex );
-
- if ( pah && pah->s_play ) {
- int pa_error;
- if ( pa_simple_flush( pah->s_play, &pa_error ) < 0 ) {
- errorStream_ << "RtApiPulse::abortStream: error flushing output device, " <<
- pa_strerror( pa_error ) << ".";
- errorText_ = errorStream_.str();
- MUTEX_UNLOCK( &stream_.mutex );
- error( RtAudioError::SYSTEM_ERROR );
- return;
- }
- }
-
- stream_.state = STREAM_STOPPED;
- MUTEX_UNLOCK( &stream_.mutex );
-}
-
-bool RtApiPulse::probeDeviceOpen( unsigned int device, StreamMode mode,
- unsigned int channels, unsigned int firstChannel,
- unsigned int sampleRate, RtAudioFormat format,
- unsigned int *bufferSize, RtAudio::StreamOptions *options )
-{
- PulseAudioHandle *pah = 0;
- unsigned long bufferBytes = 0;
- pa_sample_spec ss;
-
- if ( device != 0 ) return false;
- if ( mode != INPUT && mode != OUTPUT ) return false;
- if ( channels != 1 && channels != 2 ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: unsupported number of channels.";
- return false;
- }
- ss.channels = channels;
-
- if ( firstChannel != 0 ) return false;
-
- bool sr_found = false;
- for ( const unsigned int *sr = SUPPORTED_SAMPLERATES; *sr; ++sr ) {
- if ( sampleRate == *sr ) {
- sr_found = true;
- stream_.sampleRate = sampleRate;
- ss.rate = sampleRate;
- break;
- }
- }
- if ( !sr_found ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: unsupported sample rate.";
- return false;
- }
-
- bool sf_found = 0;
- for ( const rtaudio_pa_format_mapping_t *sf = supported_sampleformats;
- sf->rtaudio_format && sf->pa_format != PA_SAMPLE_INVALID; ++sf ) {
- if ( format == sf->rtaudio_format ) {
- sf_found = true;
- stream_.userFormat = sf->rtaudio_format;
- stream_.deviceFormat[mode] = stream_.userFormat;
- ss.format = sf->pa_format;
- break;
- }
- }
- if ( !sf_found ) { // Use internal data format conversion.
- stream_.userFormat = format;
- stream_.deviceFormat[mode] = RTAUDIO_FLOAT32;
- ss.format = PA_SAMPLE_FLOAT32LE;
- }
-
- // Set other stream parameters.
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED ) stream_.userInterleaved = false;
- else stream_.userInterleaved = true;
- stream_.deviceInterleaved[mode] = true;
- stream_.nBuffers = 1;
- stream_.doByteSwap[mode] = false;
- stream_.nUserChannels[mode] = channels;
- stream_.nDeviceChannels[mode] = channels + firstChannel;
- stream_.channelOffset[mode] = 0;
- std::string streamName = "RtAudio";
-
- // Set flags for buffer conversion.
- stream_.doConvertBuffer[mode] = false;
- if ( stream_.userFormat != stream_.deviceFormat[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.nUserChannels[mode] < stream_.nDeviceChannels[mode] )
- stream_.doConvertBuffer[mode] = true;
-
- // Allocate necessary internal buffers.
- bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
- stream_.userBuffer[mode] = (char *) calloc( bufferBytes, 1 );
- if ( stream_.userBuffer[mode] == NULL ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: error allocating user buffer memory.";
- goto error;
- }
- stream_.bufferSize = *bufferSize;
-
- if ( stream_.doConvertBuffer[mode] ) {
-
- bool makeBuffer = true;
- bufferBytes = stream_.nDeviceChannels[mode] * formatBytes( stream_.deviceFormat[mode] );
- if ( mode == INPUT ) {
- if ( stream_.mode == OUTPUT && stream_.deviceBuffer ) {
- unsigned long bytesOut = stream_.nDeviceChannels[0] * formatBytes( stream_.deviceFormat[0] );
- if ( bufferBytes <= bytesOut ) makeBuffer = false;
- }
- }
-
- if ( makeBuffer ) {
- bufferBytes *= *bufferSize;
- if ( stream_.deviceBuffer ) free( stream_.deviceBuffer );
- stream_.deviceBuffer = (char *) calloc( bufferBytes, 1 );
- if ( stream_.deviceBuffer == NULL ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: error allocating device buffer memory.";
- goto error;
- }
- }
- }
-
- stream_.device[mode] = device;
-
- // Setup the buffer conversion information structure.
- if ( stream_.doConvertBuffer[mode] ) setConvertInfo( mode, firstChannel );
-
- if ( !stream_.apiHandle ) {
- PulseAudioHandle *pah = new PulseAudioHandle;
- if ( !pah ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: error allocating memory for handle.";
- goto error;
- }
-
- stream_.apiHandle = pah;
- if ( pthread_cond_init( &pah->runnable_cv, NULL ) != 0 ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: error creating condition variable.";
- goto error;
- }
- }
- pah = static_cast<PulseAudioHandle *>( stream_.apiHandle );
-
- int error;
- if ( options && !options->streamName.empty() ) streamName = options->streamName;
- switch ( mode ) {
- case INPUT:
- pa_buffer_attr buffer_attr;
- buffer_attr.fragsize = bufferBytes;
- buffer_attr.maxlength = -1;
-
- pah->s_rec = pa_simple_new( NULL, streamName.c_str(), PA_STREAM_RECORD, NULL, "Record", &ss, NULL, &buffer_attr, &error );
- if ( !pah->s_rec ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: error connecting input to PulseAudio server.";
- goto error;
- }
- break;
- case OUTPUT:
- pah->s_play = pa_simple_new( NULL, streamName.c_str(), PA_STREAM_PLAYBACK, NULL, "Playback", &ss, NULL, NULL, &error );
- if ( !pah->s_play ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: error connecting output to PulseAudio server.";
- goto error;
- }
- break;
- default:
- goto error;
- }
-
- if ( stream_.mode == UNINITIALIZED )
- stream_.mode = mode;
- else if ( stream_.mode == mode )
- goto error;
- else
- stream_.mode = DUPLEX;
-
- if ( !stream_.callbackInfo.isRunning ) {
- stream_.callbackInfo.object = this;
- stream_.callbackInfo.isRunning = true;
- if ( pthread_create( &pah->thread, NULL, pulseaudio_callback, (void *)&stream_.callbackInfo) != 0 ) {
- errorText_ = "RtApiPulse::probeDeviceOpen: error creating thread.";
- goto error;
- }
- }
-
- stream_.state = STREAM_STOPPED;
- return true;
-
- error:
- if ( pah && stream_.callbackInfo.isRunning ) {
- pthread_cond_destroy( &pah->runnable_cv );
- delete pah;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- return FAILURE;
-}
-
-//******************** End of __LINUX_PULSE__ *********************//
-#endif
-
-#if defined(__LINUX_OSS__)
-
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/soundcard.h>
-#include <errno.h>
-#include <math.h>
-
-static void *ossCallbackHandler(void * ptr);
-
-// A structure to hold various information related to the OSS API
-// implementation.
-struct OssHandle {
- int id[2]; // device ids
- bool xrun[2];
- bool triggered;
- pthread_cond_t runnable;
-
- OssHandle()
- :triggered(false) { id[0] = 0; id[1] = 0; xrun[0] = false; xrun[1] = false; }
-};
-
-RtApiOss :: RtApiOss()
-{
- // Nothing to do here.
-}
-
-RtApiOss :: ~RtApiOss()
-{
- if ( stream_.state != STREAM_CLOSED ) closeStream();
-}
-
-unsigned int RtApiOss :: getDeviceCount( void )
-{
- int mixerfd = open( "/dev/mixer", O_RDWR, 0 );
- if ( mixerfd == -1 ) {
- errorText_ = "RtApiOss::getDeviceCount: error opening '/dev/mixer'.";
- error( RtAudioError::WARNING );
- return 0;
- }
-
- oss_sysinfo sysinfo;
- if ( ioctl( mixerfd, SNDCTL_SYSINFO, &sysinfo ) == -1 ) {
- close( mixerfd );
- errorText_ = "RtApiOss::getDeviceCount: error getting sysinfo, OSS version >= 4.0 is required.";
- error( RtAudioError::WARNING );
- return 0;
- }
-
- close( mixerfd );
- return sysinfo.numaudios;
-}
-
-RtAudio::DeviceInfo RtApiOss :: getDeviceInfo( unsigned int device )
-{
- RtAudio::DeviceInfo info;
- info.probed = false;
-
- int mixerfd = open( "/dev/mixer", O_RDWR, 0 );
- if ( mixerfd == -1 ) {
- errorText_ = "RtApiOss::getDeviceInfo: error opening '/dev/mixer'.";
- error( RtAudioError::WARNING );
- return info;
- }
-
- oss_sysinfo sysinfo;
- int result = ioctl( mixerfd, SNDCTL_SYSINFO, &sysinfo );
- if ( result == -1 ) {
- close( mixerfd );
- errorText_ = "RtApiOss::getDeviceInfo: error getting sysinfo, OSS version >= 4.0 is required.";
- error( RtAudioError::WARNING );
- return info;
- }
-
- unsigned nDevices = sysinfo.numaudios;
- if ( nDevices == 0 ) {
- close( mixerfd );
- errorText_ = "RtApiOss::getDeviceInfo: no devices found!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- if ( device >= nDevices ) {
- close( mixerfd );
- errorText_ = "RtApiOss::getDeviceInfo: device ID is invalid!";
- error( RtAudioError::INVALID_USE );
- return info;
- }
-
- oss_audioinfo ainfo;
- ainfo.dev = device;
- result = ioctl( mixerfd, SNDCTL_AUDIOINFO, &ainfo );
- close( mixerfd );
- if ( result == -1 ) {
- errorStream_ << "RtApiOss::getDeviceInfo: error getting device (" << ainfo.name << ") info.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Probe channels
- if ( ainfo.caps & PCM_CAP_OUTPUT ) info.outputChannels = ainfo.max_channels;
- if ( ainfo.caps & PCM_CAP_INPUT ) info.inputChannels = ainfo.max_channels;
- if ( ainfo.caps & PCM_CAP_DUPLEX ) {
- if ( info.outputChannels > 0 && info.inputChannels > 0 && ainfo.caps & PCM_CAP_DUPLEX )
- info.duplexChannels = (info.outputChannels > info.inputChannels) ? info.inputChannels : info.outputChannels;
- }
-
- // Probe data formats ... do for input
- unsigned long mask = ainfo.iformats;
- if ( mask & AFMT_S16_LE || mask & AFMT_S16_BE )
- info.nativeFormats |= RTAUDIO_SINT16;
- if ( mask & AFMT_S8 )
- info.nativeFormats |= RTAUDIO_SINT8;
- if ( mask & AFMT_S32_LE || mask & AFMT_S32_BE )
- info.nativeFormats |= RTAUDIO_SINT32;
- if ( mask & AFMT_FLOAT )
- info.nativeFormats |= RTAUDIO_FLOAT32;
- if ( mask & AFMT_S24_LE || mask & AFMT_S24_BE )
- info.nativeFormats |= RTAUDIO_SINT24;
-
- // Check that we have at least one supported format
- if ( info.nativeFormats == 0 ) {
- errorStream_ << "RtApiOss::getDeviceInfo: device (" << ainfo.name << ") data format not supported by RtAudio.";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- return info;
- }
-
- // Probe the supported sample rates.
- info.sampleRates.clear();
- if ( ainfo.nrates ) {
- for ( unsigned int i=0; i<ainfo.nrates; i++ ) {
- for ( unsigned int k=0; k<MAX_SAMPLE_RATES; k++ ) {
- if ( ainfo.rates[i] == SAMPLE_RATES[k] ) {
- info.sampleRates.push_back( SAMPLE_RATES[k] );
-
- if ( !info.preferredSampleRate || ( SAMPLE_RATES[k] <= 48000 && SAMPLE_RATES[k] > info.preferredSampleRate ) )
- info.preferredSampleRate = SAMPLE_RATES[k];
-
- break;
- }
- }
- }
- }
- else {
- // Check min and max rate values;
- for ( unsigned int k=0; k<MAX_SAMPLE_RATES; k++ ) {
- if ( ainfo.min_rate <= (int) SAMPLE_RATES[k] && ainfo.max_rate >= (int) SAMPLE_RATES[k] ) {
- info.sampleRates.push_back( SAMPLE_RATES[k] );
-
- if ( !info.preferredSampleRate || ( SAMPLE_RATES[k] <= 48000 && SAMPLE_RATES[k] > info.preferredSampleRate ) )
- info.preferredSampleRate = SAMPLE_RATES[k];
- }
- }
- }
-
- if ( info.sampleRates.size() == 0 ) {
- errorStream_ << "RtApiOss::getDeviceInfo: no supported sample rates found for device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- error( RtAudioError::WARNING );
- }
- else {
- info.probed = true;
- info.name = ainfo.name;
- }
-
- return info;
-}
-
-
-bool RtApiOss :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options )
-{
- int mixerfd = open( "/dev/mixer", O_RDWR, 0 );
- if ( mixerfd == -1 ) {
- errorText_ = "RtApiOss::probeDeviceOpen: error opening '/dev/mixer'.";
- return FAILURE;
- }
-
- oss_sysinfo sysinfo;
- int result = ioctl( mixerfd, SNDCTL_SYSINFO, &sysinfo );
- if ( result == -1 ) {
- close( mixerfd );
- errorText_ = "RtApiOss::probeDeviceOpen: error getting sysinfo, OSS version >= 4.0 is required.";
- return FAILURE;
- }
-
- unsigned nDevices = sysinfo.numaudios;
- if ( nDevices == 0 ) {
- // This should not happen because a check is made before this function is called.
- close( mixerfd );
- errorText_ = "RtApiOss::probeDeviceOpen: no devices found!";
- return FAILURE;
- }
-
- if ( device >= nDevices ) {
- // This should not happen because a check is made before this function is called.
- close( mixerfd );
- errorText_ = "RtApiOss::probeDeviceOpen: device ID is invalid!";
- return FAILURE;
- }
-
- oss_audioinfo ainfo;
- ainfo.dev = device;
- result = ioctl( mixerfd, SNDCTL_AUDIOINFO, &ainfo );
- close( mixerfd );
- if ( result == -1 ) {
- errorStream_ << "RtApiOss::getDeviceInfo: error getting device (" << ainfo.name << ") info.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Check if device supports input or output
- if ( ( mode == OUTPUT && !( ainfo.caps & PCM_CAP_OUTPUT ) ) ||
- ( mode == INPUT && !( ainfo.caps & PCM_CAP_INPUT ) ) ) {
- if ( mode == OUTPUT )
- errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") does not support output.";
- else
- errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") does not support input.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- int flags = 0;
- OssHandle *handle = (OssHandle *) stream_.apiHandle;
- if ( mode == OUTPUT )
- flags |= O_WRONLY;
- else { // mode == INPUT
- if (stream_.mode == OUTPUT && stream_.device[0] == device) {
- // We just set the same device for playback ... close and reopen for duplex (OSS only).
- close( handle->id[0] );
- handle->id[0] = 0;
- if ( !( ainfo.caps & PCM_CAP_DUPLEX ) ) {
- errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") does not support duplex mode.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- // Check that the number previously set channels is the same.
- if ( stream_.nUserChannels[0] != channels ) {
- errorStream_ << "RtApiOss::probeDeviceOpen: input/output channels must be equal for OSS duplex device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- flags |= O_RDWR;
- }
- else
- flags |= O_RDONLY;
- }
-
- // Set exclusive access if specified.
- if ( options && options->flags & RTAUDIO_HOG_DEVICE ) flags |= O_EXCL;
-
- // Try to open the device.
- int fd;
- fd = open( ainfo.devnode, flags, 0 );
- if ( fd == -1 ) {
- if ( errno == EBUSY )
- errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") is busy.";
- else
- errorStream_ << "RtApiOss::probeDeviceOpen: error opening device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // For duplex operation, specifically set this mode (this doesn't seem to work).
- /*
- if ( flags | O_RDWR ) {
- result = ioctl( fd, SNDCTL_DSP_SETDUPLEX, NULL );
- if ( result == -1) {
- errorStream_ << "RtApiOss::probeDeviceOpen: error setting duplex mode for device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- }
- */
-
- // Check the device channel support.
- stream_.nUserChannels[mode] = channels;
- if ( ainfo.max_channels < (int)(channels + firstChannel) ) {
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: the device (" << ainfo.name << ") does not support requested channel parameters.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Set the number of channels.
- int deviceChannels = channels + firstChannel;
- result = ioctl( fd, SNDCTL_DSP_CHANNELS, &deviceChannels );
- if ( result == -1 || deviceChannels < (int)(channels + firstChannel) ) {
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: error setting channel parameters on device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- stream_.nDeviceChannels[mode] = deviceChannels;
-
- // Get the data format mask
- int mask;
- result = ioctl( fd, SNDCTL_DSP_GETFMTS, &mask );
- if ( result == -1 ) {
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: error getting device (" << ainfo.name << ") data formats.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Determine how to set the device format.
- stream_.userFormat = format;
- int deviceFormat = -1;
- stream_.doByteSwap[mode] = false;
- if ( format == RTAUDIO_SINT8 ) {
- if ( mask & AFMT_S8 ) {
- deviceFormat = AFMT_S8;
- stream_.deviceFormat[mode] = RTAUDIO_SINT8;
- }
- }
- else if ( format == RTAUDIO_SINT16 ) {
- if ( mask & AFMT_S16_NE ) {
- deviceFormat = AFMT_S16_NE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- }
- else if ( mask & AFMT_S16_OE ) {
- deviceFormat = AFMT_S16_OE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- stream_.doByteSwap[mode] = true;
- }
- }
- else if ( format == RTAUDIO_SINT24 ) {
- if ( mask & AFMT_S24_NE ) {
- deviceFormat = AFMT_S24_NE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT24;
- }
- else if ( mask & AFMT_S24_OE ) {
- deviceFormat = AFMT_S24_OE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT24;
- stream_.doByteSwap[mode] = true;
- }
- }
- else if ( format == RTAUDIO_SINT32 ) {
- if ( mask & AFMT_S32_NE ) {
- deviceFormat = AFMT_S32_NE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT32;
- }
- else if ( mask & AFMT_S32_OE ) {
- deviceFormat = AFMT_S32_OE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT32;
- stream_.doByteSwap[mode] = true;
- }
- }
-
- if ( deviceFormat == -1 ) {
- // The user requested format is not natively supported by the device.
- if ( mask & AFMT_S16_NE ) {
- deviceFormat = AFMT_S16_NE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- }
- else if ( mask & AFMT_S32_NE ) {
- deviceFormat = AFMT_S32_NE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT32;
- }
- else if ( mask & AFMT_S24_NE ) {
- deviceFormat = AFMT_S24_NE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT24;
- }
- else if ( mask & AFMT_S16_OE ) {
- deviceFormat = AFMT_S16_OE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT16;
- stream_.doByteSwap[mode] = true;
- }
- else if ( mask & AFMT_S32_OE ) {
- deviceFormat = AFMT_S32_OE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT32;
- stream_.doByteSwap[mode] = true;
- }
- else if ( mask & AFMT_S24_OE ) {
- deviceFormat = AFMT_S24_OE;
- stream_.deviceFormat[mode] = RTAUDIO_SINT24;
- stream_.doByteSwap[mode] = true;
- }
- else if ( mask & AFMT_S8) {
- deviceFormat = AFMT_S8;
- stream_.deviceFormat[mode] = RTAUDIO_SINT8;
- }
- }
-
- if ( stream_.deviceFormat[mode] == 0 ) {
- // This really shouldn't happen ...
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") data format not supported by RtAudio.";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Set the data format.
- int temp = deviceFormat;
- result = ioctl( fd, SNDCTL_DSP_SETFMT, &deviceFormat );
- if ( result == -1 || deviceFormat != temp ) {
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: error setting data format on device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Attempt to set the buffer size. According to OSS, the minimum
- // number of buffers is two. The supposed minimum buffer size is 16
- // bytes, so that will be our lower bound. The argument to this
- // call is in the form 0xMMMMSSSS (hex), where the buffer size (in
- // bytes) is given as 2^SSSS and the number of buffers as 2^MMMM.
- // We'll check the actual value used near the end of the setup
- // procedure.
- int ossBufferBytes = *bufferSize * formatBytes( stream_.deviceFormat[mode] ) * deviceChannels;
- if ( ossBufferBytes < 16 ) ossBufferBytes = 16;
- int buffers = 0;
- if ( options ) buffers = options->numberOfBuffers;
- if ( options && options->flags & RTAUDIO_MINIMIZE_LATENCY ) buffers = 2;
- if ( buffers < 2 ) buffers = 3;
- temp = ((int) buffers << 16) + (int)( log10( (double)ossBufferBytes ) / log10( 2.0 ) );
- result = ioctl( fd, SNDCTL_DSP_SETFRAGMENT, &temp );
- if ( result == -1 ) {
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: error setting buffer size on device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- stream_.nBuffers = buffers;
-
- // Save buffer size (in sample frames).
- *bufferSize = ossBufferBytes / ( formatBytes(stream_.deviceFormat[mode]) * deviceChannels );
- stream_.bufferSize = *bufferSize;
-
- // Set the sample rate.
- int srate = sampleRate;
- result = ioctl( fd, SNDCTL_DSP_SPEED, &srate );
- if ( result == -1 ) {
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: error setting sample rate (" << sampleRate << ") on device (" << ainfo.name << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
-
- // Verify the sample rate setup worked.
- if ( abs( srate - sampleRate ) > 100 ) {
- close( fd );
- errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") does not support sample rate (" << sampleRate << ").";
- errorText_ = errorStream_.str();
- return FAILURE;
- }
- stream_.sampleRate = sampleRate;
-
- if ( mode == INPUT && stream_.mode == OUTPUT && stream_.device[0] == device) {
- // We're doing duplex setup here.
- stream_.deviceFormat[0] = stream_.deviceFormat[1];
- stream_.nDeviceChannels[0] = deviceChannels;
- }
-
- // Set interleaving parameters.
- stream_.userInterleaved = true;
- stream_.deviceInterleaved[mode] = true;
- if ( options && options->flags & RTAUDIO_NONINTERLEAVED )
- stream_.userInterleaved = false;
-
- // Set flags for buffer conversion
- stream_.doConvertBuffer[mode] = false;
- if ( stream_.userFormat != stream_.deviceFormat[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.nUserChannels[mode] < stream_.nDeviceChannels[mode] )
- stream_.doConvertBuffer[mode] = true;
- if ( stream_.userInterleaved != stream_.deviceInterleaved[mode] &&
- stream_.nUserChannels[mode] > 1 )
- stream_.doConvertBuffer[mode] = true;
-
- // Allocate the stream handles if necessary and then save.
- if ( stream_.apiHandle == 0 ) {
- try {
- handle = new OssHandle;
- }
- catch ( std::bad_alloc& ) {
- errorText_ = "RtApiOss::probeDeviceOpen: error allocating OssHandle memory.";
- goto error;
- }
-
- if ( pthread_cond_init( &handle->runnable, NULL ) ) {
- errorText_ = "RtApiOss::probeDeviceOpen: error initializing pthread condition variable.";
- goto error;
- }
-
- stream_.apiHandle = (void *) handle;
- }
- else {
- handle = (OssHandle *) stream_.apiHandle;
- }
- handle->id[mode] = fd;
-
- // Allocate necessary internal buffers.
- unsigned long bufferBytes;
- bufferBytes = stream_.nUserChannels[mode] * *bufferSize * formatBytes( stream_.userFormat );
- stream_.userBuffer[mode] = (char *) calloc( bufferBytes, 1 );
- if ( stream_.userBuffer[mode] == NULL ) {
- errorText_ = "RtApiOss::probeDeviceOpen: error allocating user buffer memory.";
- goto error;
- }
-
- if ( stream_.doConvertBuffer[mode] ) {
-
- bool makeBuffer = true;
- bufferBytes = stream_.nDeviceChannels[mode] * formatBytes( stream_.deviceFormat[mode] );
- if ( mode == INPUT ) {
- if ( stream_.mode == OUTPUT && stream_.deviceBuffer ) {
- unsigned long bytesOut = stream_.nDeviceChannels[0] * formatBytes( stream_.deviceFormat[0] );
- if ( bufferBytes <= bytesOut ) makeBuffer = false;
- }
- }
-
- if ( makeBuffer ) {
- bufferBytes *= *bufferSize;
- if ( stream_.deviceBuffer ) free( stream_.deviceBuffer );
- stream_.deviceBuffer = (char *) calloc( bufferBytes, 1 );
- if ( stream_.deviceBuffer == NULL ) {
- errorText_ = "RtApiOss::probeDeviceOpen: error allocating device buffer memory.";
- goto error;
- }
- }
- }
-
- stream_.device[mode] = device;
- stream_.state = STREAM_STOPPED;
-
- // Setup the buffer conversion information structure.
- if ( stream_.doConvertBuffer[mode] ) setConvertInfo( mode, firstChannel );
-
- // Setup thread if necessary.
- if ( stream_.mode == OUTPUT && mode == INPUT ) {
- // We had already set up an output stream.
- stream_.mode = DUPLEX;
- if ( stream_.device[0] == device ) handle->id[0] = fd;
- }
- else {
- stream_.mode = mode;
-
- // Setup callback thread.
- stream_.callbackInfo.object = (void *) this;
-
- // Set the thread attributes for joinable and realtime scheduling
- // priority. The higher priority will only take affect if the
- // program is run as root or suid.
- pthread_attr_t attr;
- pthread_attr_init( &attr );
- pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE );
-#ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread)
- if ( options && options->flags & RTAUDIO_SCHEDULE_REALTIME ) {
- struct sched_param param;
- int priority = options->priority;
- int min = sched_get_priority_min( SCHED_RR );
- int max = sched_get_priority_max( SCHED_RR );
- if ( priority < min ) priority = min;
- else if ( priority > max ) priority = max;
- param.sched_priority = priority;
- pthread_attr_setschedparam( &attr, &param );
- pthread_attr_setschedpolicy( &attr, SCHED_RR );
- }
- else
- pthread_attr_setschedpolicy( &attr, SCHED_OTHER );
-#else
- pthread_attr_setschedpolicy( &attr, SCHED_OTHER );
-#endif
-
- stream_.callbackInfo.isRunning = true;
- result = pthread_create( &stream_.callbackInfo.thread, &attr, ossCallbackHandler, &stream_.callbackInfo );
- pthread_attr_destroy( &attr );
- if ( result ) {
- stream_.callbackInfo.isRunning = false;
- errorText_ = "RtApiOss::error creating callback thread!";
- goto error;
- }
- }
-
- return SUCCESS;
-
- error:
- if ( handle ) {
- pthread_cond_destroy( &handle->runnable );
- if ( handle->id[0] ) close( handle->id[0] );
- if ( handle->id[1] ) close( handle->id[1] );
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- return FAILURE;
-}
-
-void RtApiOss :: closeStream()
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiOss::closeStream(): no open stream to close!";
- error( RtAudioError::WARNING );
- return;
- }
-
- OssHandle *handle = (OssHandle *) stream_.apiHandle;
- stream_.callbackInfo.isRunning = false;
- MUTEX_LOCK( &stream_.mutex );
- if ( stream_.state == STREAM_STOPPED )
- pthread_cond_signal( &handle->runnable );
- MUTEX_UNLOCK( &stream_.mutex );
- pthread_join( stream_.callbackInfo.thread, NULL );
-
- if ( stream_.state == STREAM_RUNNING ) {
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX )
- ioctl( handle->id[0], SNDCTL_DSP_HALT, 0 );
- else
- ioctl( handle->id[1], SNDCTL_DSP_HALT, 0 );
- stream_.state = STREAM_STOPPED;
- }
-
- if ( handle ) {
- pthread_cond_destroy( &handle->runnable );
- if ( handle->id[0] ) close( handle->id[0] );
- if ( handle->id[1] ) close( handle->id[1] );
- delete handle;
- stream_.apiHandle = 0;
- }
-
- for ( int i=0; i<2; i++ ) {
- if ( stream_.userBuffer[i] ) {
- free( stream_.userBuffer[i] );
- stream_.userBuffer[i] = 0;
- }
- }
-
- if ( stream_.deviceBuffer ) {
- free( stream_.deviceBuffer );
- stream_.deviceBuffer = 0;
- }
-
- stream_.mode = UNINITIALIZED;
- stream_.state = STREAM_CLOSED;
-}
-
-void RtApiOss :: startStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_RUNNING ) {
- errorText_ = "RtApiOss::startStream(): the stream is already running!";
- error( RtAudioError::WARNING );
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
-
- stream_.state = STREAM_RUNNING;
-
- // No need to do anything else here ... OSS automatically starts
- // when fed samples.
-
- MUTEX_UNLOCK( &stream_.mutex );
-
- OssHandle *handle = (OssHandle *) stream_.apiHandle;
- pthread_cond_signal( &handle->runnable );
-}
-
-void RtApiOss :: stopStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiOss::stopStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
-
- // The state might change while waiting on a mutex.
- if ( stream_.state == STREAM_STOPPED ) {
- MUTEX_UNLOCK( &stream_.mutex );
- return;
- }
-
- int result = 0;
- OssHandle *handle = (OssHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- // Flush the output with zeros a few times.
- char *buffer;
- int samples;
- RtAudioFormat format;
-
- if ( stream_.doConvertBuffer[0] ) {
- buffer = stream_.deviceBuffer;
- samples = stream_.bufferSize * stream_.nDeviceChannels[0];
- format = stream_.deviceFormat[0];
- }
- else {
- buffer = stream_.userBuffer[0];
- samples = stream_.bufferSize * stream_.nUserChannels[0];
- format = stream_.userFormat;
- }
-
- memset( buffer, 0, samples * formatBytes(format) );
- for ( unsigned int i=0; i<stream_.nBuffers+1; i++ ) {
- result = write( handle->id[0], buffer, samples * formatBytes(format) );
- if ( result == -1 ) {
- errorText_ = "RtApiOss::stopStream: audio write error.";
- error( RtAudioError::WARNING );
- }
- }
-
- result = ioctl( handle->id[0], SNDCTL_DSP_HALT, 0 );
- if ( result == -1 ) {
- errorStream_ << "RtApiOss::stopStream: system error stopping callback procedure on device (" << stream_.device[0] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- handle->triggered = false;
- }
-
- if ( stream_.mode == INPUT || ( stream_.mode == DUPLEX && handle->id[0] != handle->id[1] ) ) {
- result = ioctl( handle->id[1], SNDCTL_DSP_HALT, 0 );
- if ( result == -1 ) {
- errorStream_ << "RtApiOss::stopStream: system error stopping input callback procedure on device (" << stream_.device[0] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- unlock:
- stream_.state = STREAM_STOPPED;
- MUTEX_UNLOCK( &stream_.mutex );
-
- if ( result != -1 ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiOss :: abortStream()
-{
- verifyStream();
- if ( stream_.state == STREAM_STOPPED ) {
- errorText_ = "RtApiOss::abortStream(): the stream is already stopped!";
- error( RtAudioError::WARNING );
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
-
- // The state might change while waiting on a mutex.
- if ( stream_.state == STREAM_STOPPED ) {
- MUTEX_UNLOCK( &stream_.mutex );
- return;
- }
-
- int result = 0;
- OssHandle *handle = (OssHandle *) stream_.apiHandle;
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
- result = ioctl( handle->id[0], SNDCTL_DSP_HALT, 0 );
- if ( result == -1 ) {
- errorStream_ << "RtApiOss::abortStream: system error stopping callback procedure on device (" << stream_.device[0] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- handle->triggered = false;
- }
-
- if ( stream_.mode == INPUT || ( stream_.mode == DUPLEX && handle->id[0] != handle->id[1] ) ) {
- result = ioctl( handle->id[1], SNDCTL_DSP_HALT, 0 );
- if ( result == -1 ) {
- errorStream_ << "RtApiOss::abortStream: system error stopping input callback procedure on device (" << stream_.device[0] << ").";
- errorText_ = errorStream_.str();
- goto unlock;
- }
- }
-
- unlock:
- stream_.state = STREAM_STOPPED;
- MUTEX_UNLOCK( &stream_.mutex );
-
- if ( result != -1 ) return;
- error( RtAudioError::SYSTEM_ERROR );
-}
-
-void RtApiOss :: callbackEvent()
-{
- OssHandle *handle = (OssHandle *) stream_.apiHandle;
- if ( stream_.state == STREAM_STOPPED ) {
- MUTEX_LOCK( &stream_.mutex );
- pthread_cond_wait( &handle->runnable, &stream_.mutex );
- if ( stream_.state != STREAM_RUNNING ) {
- MUTEX_UNLOCK( &stream_.mutex );
- return;
- }
- MUTEX_UNLOCK( &stream_.mutex );
- }
-
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApiOss::callbackEvent(): the stream is closed ... this shouldn't happen!";
- error( RtAudioError::WARNING );
- return;
- }
-
- // Invoke user callback to get fresh output data.
- int doStopStream = 0;
- RtAudioCallback callback = (RtAudioCallback) stream_.callbackInfo.callback;
- double streamTime = getStreamTime();
- RtAudioStreamStatus status = 0;
- if ( stream_.mode != INPUT && handle->xrun[0] == true ) {
- status |= RTAUDIO_OUTPUT_UNDERFLOW;
- handle->xrun[0] = false;
- }
- if ( stream_.mode != OUTPUT && handle->xrun[1] == true ) {
- status |= RTAUDIO_INPUT_OVERFLOW;
- handle->xrun[1] = false;
- }
- doStopStream = callback( stream_.userBuffer[0], stream_.userBuffer[1],
- stream_.bufferSize, streamTime, status, stream_.callbackInfo.userData );
- if ( doStopStream == 2 ) {
- this->abortStream();
- return;
- }
-
- MUTEX_LOCK( &stream_.mutex );
-
- // The state might change while waiting on a mutex.
- if ( stream_.state == STREAM_STOPPED ) goto unlock;
-
- int result;
- char *buffer;
- int samples;
- RtAudioFormat format;
-
- if ( stream_.mode == OUTPUT || stream_.mode == DUPLEX ) {
-
- // Setup parameters and do buffer conversion if necessary.
- if ( stream_.doConvertBuffer[0] ) {
- buffer = stream_.deviceBuffer;
- convertBuffer( buffer, stream_.userBuffer[0], stream_.convertInfo[0] );
- samples = stream_.bufferSize * stream_.nDeviceChannels[0];
- format = stream_.deviceFormat[0];
- }
- else {
- buffer = stream_.userBuffer[0];
- samples = stream_.bufferSize * stream_.nUserChannels[0];
- format = stream_.userFormat;
- }
-
- // Do byte swapping if necessary.
- if ( stream_.doByteSwap[0] )
- byteSwapBuffer( buffer, samples, format );
-
- if ( stream_.mode == DUPLEX && handle->triggered == false ) {
- int trig = 0;
- ioctl( handle->id[0], SNDCTL_DSP_SETTRIGGER, &trig );
- result = write( handle->id[0], buffer, samples * formatBytes(format) );
- trig = PCM_ENABLE_INPUT|PCM_ENABLE_OUTPUT;
- ioctl( handle->id[0], SNDCTL_DSP_SETTRIGGER, &trig );
- handle->triggered = true;
- }
- else
- // Write samples to device.
- result = write( handle->id[0], buffer, samples * formatBytes(format) );
-
- if ( result == -1 ) {
- // We'll assume this is an underrun, though there isn't a
- // specific means for determining that.
- handle->xrun[0] = true;
- errorText_ = "RtApiOss::callbackEvent: audio write error.";
- error( RtAudioError::WARNING );
- // Continue on to input section.
- }
- }
-
- if ( stream_.mode == INPUT || stream_.mode == DUPLEX ) {
-
- // Setup parameters.
- if ( stream_.doConvertBuffer[1] ) {
- buffer = stream_.deviceBuffer;
- samples = stream_.bufferSize * stream_.nDeviceChannels[1];
- format = stream_.deviceFormat[1];
- }
- else {
- buffer = stream_.userBuffer[1];
- samples = stream_.bufferSize * stream_.nUserChannels[1];
- format = stream_.userFormat;
- }
-
- // Read samples from device.
- result = read( handle->id[1], buffer, samples * formatBytes(format) );
-
- if ( result == -1 ) {
- // We'll assume this is an overrun, though there isn't a
- // specific means for determining that.
- handle->xrun[1] = true;
- errorText_ = "RtApiOss::callbackEvent: audio read error.";
- error( RtAudioError::WARNING );
- goto unlock;
- }
-
- // Do byte swapping if necessary.
- if ( stream_.doByteSwap[1] )
- byteSwapBuffer( buffer, samples, format );
-
- // Do buffer conversion if necessary.
- if ( stream_.doConvertBuffer[1] )
- convertBuffer( stream_.userBuffer[1], stream_.deviceBuffer, stream_.convertInfo[1] );
- }
-
- unlock:
- MUTEX_UNLOCK( &stream_.mutex );
-
- RtApi::tickStreamTime();
- if ( doStopStream == 1 ) this->stopStream();
-}
-
-static void *ossCallbackHandler( void *ptr )
-{
- CallbackInfo *info = (CallbackInfo *) ptr;
- RtApiOss *object = (RtApiOss *) info->object;
- bool *isRunning = &info->isRunning;
-
- while ( *isRunning == true ) {
- pthread_testcancel();
- object->callbackEvent();
- }
-
- pthread_exit( NULL );
-}
-
-//******************** End of __LINUX_OSS__ *********************//
-#endif
-
-
-// *************************************************** //
-//
-// Protected common (OS-independent) RtAudio methods.
-//
-// *************************************************** //
-
-// This method can be modified to control the behavior of error
-// message printing.
-void RtApi :: error( RtAudioError::Type type )
-{
- errorStream_.str(""); // clear the ostringstream
-
- RtAudioErrorCallback errorCallback = (RtAudioErrorCallback) stream_.callbackInfo.errorCallback;
- if ( errorCallback ) {
- // abortStream() can generate new error messages. Ignore them. Just keep original one.
-
- if ( firstErrorOccurred_ )
- return;
-
- firstErrorOccurred_ = true;
- const std::string errorMessage = errorText_;
-
- if ( type != RtAudioError::WARNING && stream_.state != STREAM_STOPPED) {
- stream_.callbackInfo.isRunning = false; // exit from the thread
- abortStream();
- }
-
- errorCallback( type, errorMessage );
- firstErrorOccurred_ = false;
- return;
- }
-
- if ( type == RtAudioError::WARNING && showWarnings_ == true )
- std::cerr << '\n' << errorText_ << "\n\n";
- else if ( type != RtAudioError::WARNING )
- throw( RtAudioError( errorText_, type ) );
-}
-
-void RtApi :: verifyStream()
-{
- if ( stream_.state == STREAM_CLOSED ) {
- errorText_ = "RtApi:: a stream is not open!";
- error( RtAudioError::INVALID_USE );
- }
-}
-
-void RtApi :: clearStreamInfo()
-{
- stream_.mode = UNINITIALIZED;
- stream_.state = STREAM_CLOSED;
- stream_.sampleRate = 0;
- stream_.bufferSize = 0;
- stream_.nBuffers = 0;
- stream_.userFormat = 0;
- stream_.userInterleaved = true;
- stream_.streamTime = 0.0;
- stream_.apiHandle = 0;
- stream_.deviceBuffer = 0;
- stream_.callbackInfo.callback = 0;
- stream_.callbackInfo.userData = 0;
- stream_.callbackInfo.isRunning = false;
- stream_.callbackInfo.errorCallback = 0;
- for ( int i=0; i<2; i++ ) {
- stream_.device[i] = 11111;
- stream_.doConvertBuffer[i] = false;
- stream_.deviceInterleaved[i] = true;
- stream_.doByteSwap[i] = false;
- stream_.nUserChannels[i] = 0;
- stream_.nDeviceChannels[i] = 0;
- stream_.channelOffset[i] = 0;
- stream_.deviceFormat[i] = 0;
- stream_.latency[i] = 0;
- stream_.userBuffer[i] = 0;
- stream_.convertInfo[i].channels = 0;
- stream_.convertInfo[i].inJump = 0;
- stream_.convertInfo[i].outJump = 0;
- stream_.convertInfo[i].inFormat = 0;
- stream_.convertInfo[i].outFormat = 0;
- stream_.convertInfo[i].inOffset.clear();
- stream_.convertInfo[i].outOffset.clear();
- }
-}
-
-unsigned int RtApi :: formatBytes( RtAudioFormat format )
-{
- if ( format == RTAUDIO_SINT16 )
- return 2;
- else if ( format == RTAUDIO_SINT32 || format == RTAUDIO_FLOAT32 )
- return 4;
- else if ( format == RTAUDIO_FLOAT64 )
- return 8;
- else if ( format == RTAUDIO_SINT24 )
- return 3;
- else if ( format == RTAUDIO_SINT8 )
- return 1;
-
- errorText_ = "RtApi::formatBytes: undefined format.";
- error( RtAudioError::WARNING );
-
- return 0;
-}
-
-void RtApi :: setConvertInfo( StreamMode mode, unsigned int firstChannel )
-{
- if ( mode == INPUT ) { // convert device to user buffer
- stream_.convertInfo[mode].inJump = stream_.nDeviceChannels[1];
- stream_.convertInfo[mode].outJump = stream_.nUserChannels[1];
- stream_.convertInfo[mode].inFormat = stream_.deviceFormat[1];
- stream_.convertInfo[mode].outFormat = stream_.userFormat;
- }
- else { // convert user to device buffer
- stream_.convertInfo[mode].inJump = stream_.nUserChannels[0];
- stream_.convertInfo[mode].outJump = stream_.nDeviceChannels[0];
- stream_.convertInfo[mode].inFormat = stream_.userFormat;
- stream_.convertInfo[mode].outFormat = stream_.deviceFormat[0];
- }
-
- if ( stream_.convertInfo[mode].inJump < stream_.convertInfo[mode].outJump )
- stream_.convertInfo[mode].channels = stream_.convertInfo[mode].inJump;
- else
- stream_.convertInfo[mode].channels = stream_.convertInfo[mode].outJump;
-
- // Set up the interleave/deinterleave offsets.
- if ( stream_.deviceInterleaved[mode] != stream_.userInterleaved ) {
- if ( ( mode == OUTPUT && stream_.deviceInterleaved[mode] ) ||
- ( mode == INPUT && stream_.userInterleaved ) ) {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ ) {
- stream_.convertInfo[mode].inOffset.push_back( k * stream_.bufferSize );
- stream_.convertInfo[mode].outOffset.push_back( k );
- stream_.convertInfo[mode].inJump = 1;
- }
- }
- else {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ ) {
- stream_.convertInfo[mode].inOffset.push_back( k );
- stream_.convertInfo[mode].outOffset.push_back( k * stream_.bufferSize );
- stream_.convertInfo[mode].outJump = 1;
- }
- }
- }
- else { // no (de)interleaving
- if ( stream_.userInterleaved ) {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ ) {
- stream_.convertInfo[mode].inOffset.push_back( k );
- stream_.convertInfo[mode].outOffset.push_back( k );
- }
- }
- else {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ ) {
- stream_.convertInfo[mode].inOffset.push_back( k * stream_.bufferSize );
- stream_.convertInfo[mode].outOffset.push_back( k * stream_.bufferSize );
- stream_.convertInfo[mode].inJump = 1;
- stream_.convertInfo[mode].outJump = 1;
- }
- }
- }
-
- // Add channel offset.
- if ( firstChannel > 0 ) {
- if ( stream_.deviceInterleaved[mode] ) {
- if ( mode == OUTPUT ) {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ )
- stream_.convertInfo[mode].outOffset[k] += firstChannel;
- }
- else {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ )
- stream_.convertInfo[mode].inOffset[k] += firstChannel;
- }
- }
- else {
- if ( mode == OUTPUT ) {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ )
- stream_.convertInfo[mode].outOffset[k] += ( firstChannel * stream_.bufferSize );
- }
- else {
- for ( int k=0; k<stream_.convertInfo[mode].channels; k++ )
- stream_.convertInfo[mode].inOffset[k] += ( firstChannel * stream_.bufferSize );
- }
- }
- }
-}
-
-void RtApi :: convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info )
-{
- // This function does format conversion, input/output channel compensation, and
- // data interleaving/deinterleaving. 24-bit integers are assumed to occupy
- // the lower three bytes of a 32-bit integer.
-
- // Clear our device buffer when in/out duplex device channels are different
- if ( outBuffer == stream_.deviceBuffer && stream_.mode == DUPLEX &&
- ( stream_.nDeviceChannels[0] < stream_.nDeviceChannels[1] ) )
- memset( outBuffer, 0, stream_.bufferSize * info.outJump * formatBytes( info.outFormat ) );
-
- int j;
- if (info.outFormat == RTAUDIO_FLOAT64) {
- Float64 scale;
- Float64 *out = (Float64 *)outBuffer;
-
- if (info.inFormat == RTAUDIO_SINT8) {
- signed char *in = (signed char *)inBuffer;
- scale = 1.0 / 127.5;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float64) in[info.inOffset[j]];
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT16) {
- Int16 *in = (Int16 *)inBuffer;
- scale = 1.0 / 32767.5;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float64) in[info.inOffset[j]];
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT24) {
- Int24 *in = (Int24 *)inBuffer;
- scale = 1.0 / 8388607.5;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float64) (in[info.inOffset[j]].asInt());
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT32) {
- Int32 *in = (Int32 *)inBuffer;
- scale = 1.0 / 2147483647.5;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float64) in[info.inOffset[j]];
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT32) {
- Float32 *in = (Float32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float64) in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT64) {
- // Channel compensation and/or (de)interleaving only.
- Float64 *in = (Float64 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- }
- else if (info.outFormat == RTAUDIO_FLOAT32) {
- Float32 scale;
- Float32 *out = (Float32 *)outBuffer;
-
- if (info.inFormat == RTAUDIO_SINT8) {
- signed char *in = (signed char *)inBuffer;
- scale = (Float32) ( 1.0 / 127.5 );
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float32) in[info.inOffset[j]];
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT16) {
- Int16 *in = (Int16 *)inBuffer;
- scale = (Float32) ( 1.0 / 32767.5 );
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float32) in[info.inOffset[j]];
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT24) {
- Int24 *in = (Int24 *)inBuffer;
- scale = (Float32) ( 1.0 / 8388607.5 );
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float32) (in[info.inOffset[j]].asInt());
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT32) {
- Int32 *in = (Int32 *)inBuffer;
- scale = (Float32) ( 1.0 / 2147483647.5 );
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float32) in[info.inOffset[j]];
- out[info.outOffset[j]] += 0.5;
- out[info.outOffset[j]] *= scale;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT32) {
- // Channel compensation and/or (de)interleaving only.
- Float32 *in = (Float32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT64) {
- Float64 *in = (Float64 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Float32) in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- }
- else if (info.outFormat == RTAUDIO_SINT32) {
- Int32 *out = (Int32 *)outBuffer;
- if (info.inFormat == RTAUDIO_SINT8) {
- signed char *in = (signed char *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) in[info.inOffset[j]];
- out[info.outOffset[j]] <<= 24;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT16) {
- Int16 *in = (Int16 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) in[info.inOffset[j]];
- out[info.outOffset[j]] <<= 16;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT24) {
- Int24 *in = (Int24 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) in[info.inOffset[j]].asInt();
- out[info.outOffset[j]] <<= 8;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT32) {
- // Channel compensation and/or (de)interleaving only.
- Int32 *in = (Int32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT32) {
- Float32 *in = (Float32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) (in[info.inOffset[j]] * 2147483647.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT64) {
- Float64 *in = (Float64 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) (in[info.inOffset[j]] * 2147483647.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- }
- else if (info.outFormat == RTAUDIO_SINT24) {
- Int24 *out = (Int24 *)outBuffer;
- if (info.inFormat == RTAUDIO_SINT8) {
- signed char *in = (signed char *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) (in[info.inOffset[j]] << 16);
- //out[info.outOffset[j]] <<= 16;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT16) {
- Int16 *in = (Int16 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) (in[info.inOffset[j]] << 8);
- //out[info.outOffset[j]] <<= 8;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT24) {
- // Channel compensation and/or (de)interleaving only.
- Int24 *in = (Int24 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT32) {
- Int32 *in = (Int32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) (in[info.inOffset[j]] >> 8);
- //out[info.outOffset[j]] >>= 8;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT32) {
- Float32 *in = (Float32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) (in[info.inOffset[j]] * 8388607.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT64) {
- Float64 *in = (Float64 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int32) (in[info.inOffset[j]] * 8388607.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- }
- else if (info.outFormat == RTAUDIO_SINT16) {
- Int16 *out = (Int16 *)outBuffer;
- if (info.inFormat == RTAUDIO_SINT8) {
- signed char *in = (signed char *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int16) in[info.inOffset[j]];
- out[info.outOffset[j]] <<= 8;
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT16) {
- // Channel compensation and/or (de)interleaving only.
- Int16 *in = (Int16 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT24) {
- Int24 *in = (Int24 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int16) (in[info.inOffset[j]].asInt() >> 8);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT32) {
- Int32 *in = (Int32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int16) ((in[info.inOffset[j]] >> 16) & 0x0000ffff);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT32) {
- Float32 *in = (Float32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int16) (in[info.inOffset[j]] * 32767.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT64) {
- Float64 *in = (Float64 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (Int16) (in[info.inOffset[j]] * 32767.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- }
- else if (info.outFormat == RTAUDIO_SINT8) {
- signed char *out = (signed char *)outBuffer;
- if (info.inFormat == RTAUDIO_SINT8) {
- // Channel compensation and/or (de)interleaving only.
- signed char *in = (signed char *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = in[info.inOffset[j]];
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- if (info.inFormat == RTAUDIO_SINT16) {
- Int16 *in = (Int16 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (signed char) ((in[info.inOffset[j]] >> 8) & 0x00ff);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT24) {
- Int24 *in = (Int24 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (signed char) (in[info.inOffset[j]].asInt() >> 16);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_SINT32) {
- Int32 *in = (Int32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (signed char) ((in[info.inOffset[j]] >> 24) & 0x000000ff);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT32) {
- Float32 *in = (Float32 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (signed char) (in[info.inOffset[j]] * 127.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- else if (info.inFormat == RTAUDIO_FLOAT64) {
- Float64 *in = (Float64 *)inBuffer;
- for (unsigned int i=0; i<stream_.bufferSize; i++) {
- for (j=0; j<info.channels; j++) {
- out[info.outOffset[j]] = (signed char) (in[info.inOffset[j]] * 127.5 - 0.5);
- }
- in += info.inJump;
- out += info.outJump;
- }
- }
- }
-}
-
-//static inline uint16_t bswap_16(uint16_t x) { return (x>>8) | (x<<8); }
-//static inline uint32_t bswap_32(uint32_t x) { return (bswap_16(x&0xffff)<<16) | (bswap_16(x>>16)); }
-//static inline uint64_t bswap_64(uint64_t x) { return (((unsigned long long)bswap_32(x&0xffffffffull))<<32) | (bswap_32(x>>32)); }
-
-void RtApi :: byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format )
-{
- char val;
- char *ptr;
-
- ptr = buffer;
- if ( format == RTAUDIO_SINT16 ) {
- for ( unsigned int i=0; i<samples; i++ ) {
- // Swap 1st and 2nd bytes.
- val = *(ptr);
- *(ptr) = *(ptr+1);
- *(ptr+1) = val;
-
- // Increment 2 bytes.
- ptr += 2;
- }
- }
- else if ( format == RTAUDIO_SINT32 ||
- format == RTAUDIO_FLOAT32 ) {
- for ( unsigned int i=0; i<samples; i++ ) {
- // Swap 1st and 4th bytes.
- val = *(ptr);
- *(ptr) = *(ptr+3);
- *(ptr+3) = val;
-
- // Swap 2nd and 3rd bytes.
- ptr += 1;
- val = *(ptr);
- *(ptr) = *(ptr+1);
- *(ptr+1) = val;
-
- // Increment 3 more bytes.
- ptr += 3;
- }
- }
- else if ( format == RTAUDIO_SINT24 ) {
- for ( unsigned int i=0; i<samples; i++ ) {
- // Swap 1st and 3rd bytes.
- val = *(ptr);
- *(ptr) = *(ptr+2);
- *(ptr+2) = val;
-
- // Increment 2 more bytes.
- ptr += 2;
- }
- }
- else if ( format == RTAUDIO_FLOAT64 ) {
- for ( unsigned int i=0; i<samples; i++ ) {
- // Swap 1st and 8th bytes
- val = *(ptr);
- *(ptr) = *(ptr+7);
- *(ptr+7) = val;
-
- // Swap 2nd and 7th bytes
- ptr += 1;
- val = *(ptr);
- *(ptr) = *(ptr+5);
- *(ptr+5) = val;
-
- // Swap 3rd and 6th bytes
- ptr += 1;
- val = *(ptr);
- *(ptr) = *(ptr+3);
- *(ptr+3) = val;
-
- // Swap 4th and 5th bytes
- ptr += 1;
- val = *(ptr);
- *(ptr) = *(ptr+1);
- *(ptr+1) = val;
-
- // Increment 5 more bytes.
- ptr += 5;
- }
- }
-}
-
- // Indentation settings for Vim and Emacs
- //
- // Local Variables:
- // c-basic-offset: 2
- // indent-tabs-mode: nil
- // End:
- //
- // vim: et sts=2 sw=2
-
-#endif // RTAUDIO_ENABLED -GODOT-
diff --git a/thirdparty/rtaudio/RtAudio.h b/thirdparty/rtaudio/RtAudio.h
deleted file mode 100644
index aab109d907..0000000000
--- a/thirdparty/rtaudio/RtAudio.h
+++ /dev/null
@@ -1,1183 +0,0 @@
-// -GODOT- Start
-
-#ifdef RTAUDIO_ENABLED
-
-#if defined(OSX_ENABLED)
- #define __MACOSX_CORE__
-#elif defined(UNIX_ENABLED)
- #define __LINUX_ALSA__
-#elif defined(WINDOWS_ENABLED)
- #if defined(UWP_ENABLED)
- #define __RTAUDIO_DUMMY__
- #else
- #define __WINDOWS_DS__
- #endif
-#endif
-
-// -GODOT- End
-
-/************************************************************************/
-/*! \class RtAudio
- \brief Realtime audio i/o C++ classes.
-
- RtAudio provides a common API (Application Programming Interface)
- for realtime audio input/output across Linux (native ALSA, Jack,
- and OSS), Macintosh OS X (CoreAudio and Jack), and Windows
- (DirectSound, ASIO and WASAPI) operating systems.
-
- RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/
-
- RtAudio: realtime audio i/o C++ classes
- Copyright (c) 2001-2016 Gary P. Scavone
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- Any person wishing to distribute modifications to the Software is
- asked to send the modifications to the original developer so that
- they can be incorporated into the canonical version. This is,
- however, not a binding provision of this license.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-/************************************************************************/
-
-/*!
- \file RtAudio.h
- */
-
-#ifndef __RTAUDIO_H
-#define __RTAUDIO_H
-
-#define RTAUDIO_VERSION "4.1.2"
-
-#include <string>
-#include <vector>
-#include <exception>
-#include <iostream>
-
-/*! \typedef typedef unsigned long RtAudioFormat;
- \brief RtAudio data format type.
-
- Support for signed integers and floats. Audio data fed to/from an
- RtAudio stream is assumed to ALWAYS be in host byte order. The
- internal routines will automatically take care of any necessary
- byte-swapping between the host format and the soundcard. Thus,
- endian-ness is not a concern in the following format definitions.
-
- - \e RTAUDIO_SINT8: 8-bit signed integer.
- - \e RTAUDIO_SINT16: 16-bit signed integer.
- - \e RTAUDIO_SINT24: 24-bit signed integer.
- - \e RTAUDIO_SINT32: 32-bit signed integer.
- - \e RTAUDIO_FLOAT32: Normalized between plus/minus 1.0.
- - \e RTAUDIO_FLOAT64: Normalized between plus/minus 1.0.
-*/
-typedef unsigned long RtAudioFormat;
-static const RtAudioFormat RTAUDIO_SINT8 = 0x1; // 8-bit signed integer.
-static const RtAudioFormat RTAUDIO_SINT16 = 0x2; // 16-bit signed integer.
-static const RtAudioFormat RTAUDIO_SINT24 = 0x4; // 24-bit signed integer.
-static const RtAudioFormat RTAUDIO_SINT32 = 0x8; // 32-bit signed integer.
-static const RtAudioFormat RTAUDIO_FLOAT32 = 0x10; // Normalized between plus/minus 1.0.
-static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/minus 1.0.
-
-/*! \typedef typedef unsigned long RtAudioStreamFlags;
- \brief RtAudio stream option flags.
-
- The following flags can be OR'ed together to allow a client to
- make changes to the default stream behavior:
-
- - \e RTAUDIO_NONINTERLEAVED: Use non-interleaved buffers (default = interleaved).
- - \e RTAUDIO_MINIMIZE_LATENCY: Attempt to set stream parameters for lowest possible latency.
- - \e RTAUDIO_HOG_DEVICE: Attempt grab device for exclusive use.
- - \e RTAUDIO_ALSA_USE_DEFAULT: Use the "default" PCM device (ALSA only).
-
- By default, RtAudio streams pass and receive audio data from the
- client in an interleaved format. By passing the
- RTAUDIO_NONINTERLEAVED flag to the openStream() function, audio
- data will instead be presented in non-interleaved buffers. In
- this case, each buffer argument in the RtAudioCallback function
- will point to a single array of data, with \c nFrames samples for
- each channel concatenated back-to-back. For example, the first
- sample of data for the second channel would be located at index \c
- nFrames (assuming the \c buffer pointer was recast to the correct
- data type for the stream).
-
- Certain audio APIs offer a number of parameters that influence the
- I/O latency of a stream. By default, RtAudio will attempt to set
- these parameters internally for robust (glitch-free) performance
- (though some APIs, like Windows Direct Sound, make this difficult).
- By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream()
- function, internal stream settings will be influenced in an attempt
- to minimize stream latency, though possibly at the expense of stream
- performance.
-
- If the RTAUDIO_HOG_DEVICE flag is set, RtAudio will attempt to
- open the input and/or output stream device(s) for exclusive use.
- Note that this is not possible with all supported audio APIs.
-
- If the RTAUDIO_SCHEDULE_REALTIME flag is set, RtAudio will attempt
- to select realtime scheduling (round-robin) for the callback thread.
-
- If the RTAUDIO_ALSA_USE_DEFAULT flag is set, RtAudio will attempt to
- open the "default" PCM device when using the ALSA API. Note that this
- will override any specified input or output device id.
-*/
-typedef unsigned int RtAudioStreamFlags;
-static const RtAudioStreamFlags RTAUDIO_NONINTERLEAVED = 0x1; // Use non-interleaved buffers (default = interleaved).
-static const RtAudioStreamFlags RTAUDIO_MINIMIZE_LATENCY = 0x2; // Attempt to set stream parameters for lowest possible latency.
-static const RtAudioStreamFlags RTAUDIO_HOG_DEVICE = 0x4; // Attempt grab device and prevent use by others.
-static const RtAudioStreamFlags RTAUDIO_SCHEDULE_REALTIME = 0x8; // Try to select realtime scheduling for callback thread.
-static const RtAudioStreamFlags RTAUDIO_ALSA_USE_DEFAULT = 0x10; // Use the "default" PCM device (ALSA only).
-
-/*! \typedef typedef unsigned long RtAudioStreamStatus;
- \brief RtAudio stream status (over- or underflow) flags.
-
- Notification of a stream over- or underflow is indicated by a
- non-zero stream \c status argument in the RtAudioCallback function.
- The stream status can be one of the following two options,
- depending on whether the stream is open for output and/or input:
-
- - \e RTAUDIO_INPUT_OVERFLOW: Input data was discarded because of an overflow condition at the driver.
- - \e RTAUDIO_OUTPUT_UNDERFLOW: The output buffer ran low, likely producing a break in the output sound.
-*/
-typedef unsigned int RtAudioStreamStatus;
-static const RtAudioStreamStatus RTAUDIO_INPUT_OVERFLOW = 0x1; // Input data was discarded because of an overflow condition at the driver.
-static const RtAudioStreamStatus RTAUDIO_OUTPUT_UNDERFLOW = 0x2; // The output buffer ran low, likely causing a gap in the output sound.
-
-//! RtAudio callback function prototype.
-/*!
- All RtAudio clients must create a function of type RtAudioCallback
- to read and/or write data from/to the audio stream. When the
- underlying audio system is ready for new input or output data, this
- function will be invoked.
-
- \param outputBuffer For output (or duplex) streams, the client
- should write \c nFrames of audio sample frames into this
- buffer. This argument should be recast to the datatype
- specified when the stream was opened. For input-only
- streams, this argument will be NULL.
-
- \param inputBuffer For input (or duplex) streams, this buffer will
- hold \c nFrames of input audio sample frames. This
- argument should be recast to the datatype specified when the
- stream was opened. For output-only streams, this argument
- will be NULL.
-
- \param nFrames The number of sample frames of input or output
- data in the buffers. The actual buffer size in bytes is
- dependent on the data type and number of channels in use.
-
- \param streamTime The number of seconds that have elapsed since the
- stream was started.
-
- \param status If non-zero, this argument indicates a data overflow
- or underflow condition for the stream. The particular
- condition can be determined by comparison with the
- RtAudioStreamStatus flags.
-
- \param userData A pointer to optional data provided by the client
- when opening the stream (default = NULL).
-
- To continue normal stream operation, the RtAudioCallback function
- should return a value of zero. To stop the stream and drain the
- output buffer, the function should return a value of one. To abort
- the stream immediately, the client should return a value of two.
- */
-typedef int (*RtAudioCallback)( void *outputBuffer, void *inputBuffer,
- unsigned int nFrames,
- double streamTime,
- RtAudioStreamStatus status,
- void *userData );
-
-/************************************************************************/
-/*! \class RtAudioError
- \brief Exception handling class for RtAudio.
-
- The RtAudioError class is quite simple but it does allow errors to be
- "caught" by RtAudioError::Type. See the RtAudio documentation to know
- which methods can throw an RtAudioError.
-*/
-/************************************************************************/
-
-class RtAudioError : public std::exception
-{
- public:
- //! Defined RtAudioError types.
- enum Type {
- WARNING, /*!< A non-critical error. */
- DEBUG_WARNING, /*!< A non-critical error which might be useful for debugging. */
- UNSPECIFIED, /*!< The default, unspecified error type. */
- NO_DEVICES_FOUND, /*!< No devices found on system. */
- INVALID_DEVICE, /*!< An invalid device ID was specified. */
- MEMORY_ERROR, /*!< An error occured during memory allocation. */
- INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */
- INVALID_USE, /*!< The function was called incorrectly. */
- DRIVER_ERROR, /*!< A system driver error occured. */
- SYSTEM_ERROR, /*!< A system error occured. */
- THREAD_ERROR /*!< A thread error occured. */
- };
-
- //! The constructor.
- RtAudioError( const std::string& message, Type type = RtAudioError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
-
- //! The destructor.
- virtual ~RtAudioError( void ) throw() {}
-
- //! Prints thrown error message to stderr.
- virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
-
- //! Returns the thrown error message type.
- virtual const Type& getType(void) const throw() { return type_; }
-
- //! Returns the thrown error message string.
- virtual const std::string& getMessage(void) const throw() { return message_; }
-
- //! Returns the thrown error message as a c-style string.
- virtual const char* what( void ) const throw() { return message_.c_str(); }
-
- protected:
- std::string message_;
- Type type_;
-};
-
-//! RtAudio error callback function prototype.
-/*!
- \param type Type of error.
- \param errorText Error description.
- */
-typedef void (*RtAudioErrorCallback)( RtAudioError::Type type, const std::string &errorText );
-
-// **************************************************************** //
-//
-// RtAudio class declaration.
-//
-// RtAudio is a "controller" used to select an available audio i/o
-// interface. It presents a common API for the user to call but all
-// functionality is implemented by the class RtApi and its
-// subclasses. RtAudio creates an instance of an RtApi subclass
-// based on the user's API choice. If no choice is made, RtAudio
-// attempts to make a "logical" API selection.
-//
-// **************************************************************** //
-
-class RtApi;
-
-class RtAudio
-{
- public:
-
- //! Audio API specifier arguments.
- enum Api {
- UNSPECIFIED, /*!< Search for a working compiled API. */
- LINUX_ALSA, /*!< The Advanced Linux Sound Architecture API. */
- LINUX_PULSE, /*!< The Linux PulseAudio API. */
- LINUX_OSS, /*!< The Linux Open Sound System API. */
- UNIX_JACK, /*!< The Jack Low-Latency Audio Server API. */
- MACOSX_CORE, /*!< Macintosh OS-X Core Audio API. */
- WINDOWS_WASAPI, /*!< The Microsoft WASAPI API. */
- WINDOWS_ASIO, /*!< The Steinberg Audio Stream I/O API. */
- WINDOWS_DS, /*!< The Microsoft Direct Sound API. */
- RTAUDIO_DUMMY /*!< A compilable but non-functional API. */
- };
-
- //! The public device information structure for returning queried values.
- struct DeviceInfo {
- bool probed; /*!< true if the device capabilities were successfully probed. */
- std::string name; /*!< Character string device identifier. */
- unsigned int outputChannels; /*!< Maximum output channels supported by device. */
- unsigned int inputChannels; /*!< Maximum input channels supported by device. */
- unsigned int duplexChannels; /*!< Maximum simultaneous input/output channels supported by device. */
- bool isDefaultOutput; /*!< true if this is the default output device. */
- bool isDefaultInput; /*!< true if this is the default input device. */
- std::vector<unsigned int> sampleRates; /*!< Supported sample rates (queried from list of standard rates). */
- unsigned int preferredSampleRate; /*!< Preferred sample rate, eg. for WASAPI the system sample rate. */
- RtAudioFormat nativeFormats; /*!< Bit mask of supported data formats. */
-
- // Default constructor.
- DeviceInfo()
- :probed(false), outputChannels(0), inputChannels(0), duplexChannels(0),
- isDefaultOutput(false), isDefaultInput(false), preferredSampleRate(0), nativeFormats(0) {}
- };
-
- //! The structure for specifying input or ouput stream parameters.
- struct StreamParameters {
- unsigned int deviceId; /*!< Device index (0 to getDeviceCount() - 1). */
- unsigned int nChannels; /*!< Number of channels. */
- unsigned int firstChannel; /*!< First channel index on device (default = 0). */
-
- // Default constructor.
- StreamParameters()
- : deviceId(0), nChannels(0), firstChannel(0) {}
- };
-
- //! The structure for specifying stream options.
- /*!
- The following flags can be OR'ed together to allow a client to
- make changes to the default stream behavior:
-
- - \e RTAUDIO_NONINTERLEAVED: Use non-interleaved buffers (default = interleaved).
- - \e RTAUDIO_MINIMIZE_LATENCY: Attempt to set stream parameters for lowest possible latency.
- - \e RTAUDIO_HOG_DEVICE: Attempt grab device for exclusive use.
- - \e RTAUDIO_SCHEDULE_REALTIME: Attempt to select realtime scheduling for callback thread.
- - \e RTAUDIO_ALSA_USE_DEFAULT: Use the "default" PCM device (ALSA only).
-
- By default, RtAudio streams pass and receive audio data from the
- client in an interleaved format. By passing the
- RTAUDIO_NONINTERLEAVED flag to the openStream() function, audio
- data will instead be presented in non-interleaved buffers. In
- this case, each buffer argument in the RtAudioCallback function
- will point to a single array of data, with \c nFrames samples for
- each channel concatenated back-to-back. For example, the first
- sample of data for the second channel would be located at index \c
- nFrames (assuming the \c buffer pointer was recast to the correct
- data type for the stream).
-
- Certain audio APIs offer a number of parameters that influence the
- I/O latency of a stream. By default, RtAudio will attempt to set
- these parameters internally for robust (glitch-free) performance
- (though some APIs, like Windows Direct Sound, make this difficult).
- By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream()
- function, internal stream settings will be influenced in an attempt
- to minimize stream latency, though possibly at the expense of stream
- performance.
-
- If the RTAUDIO_HOG_DEVICE flag is set, RtAudio will attempt to
- open the input and/or output stream device(s) for exclusive use.
- Note that this is not possible with all supported audio APIs.
-
- If the RTAUDIO_SCHEDULE_REALTIME flag is set, RtAudio will attempt
- to select realtime scheduling (round-robin) for the callback thread.
- The \c priority parameter will only be used if the RTAUDIO_SCHEDULE_REALTIME
- flag is set. It defines the thread's realtime priority.
-
- If the RTAUDIO_ALSA_USE_DEFAULT flag is set, RtAudio will attempt to
- open the "default" PCM device when using the ALSA API. Note that this
- will override any specified input or output device id.
-
- The \c numberOfBuffers parameter can be used to control stream
- latency in the Windows DirectSound, Linux OSS, and Linux Alsa APIs
- only. A value of two is usually the smallest allowed. Larger
- numbers can potentially result in more robust stream performance,
- though likely at the cost of stream latency. The value set by the
- user is replaced during execution of the RtAudio::openStream()
- function by the value actually used by the system.
-
- The \c streamName parameter can be used to set the client name
- when using the Jack API. By default, the client name is set to
- RtApiJack. However, if you wish to create multiple instances of
- RtAudio with Jack, each instance must have a unique client name.
- */
- struct StreamOptions {
- RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT). */
- unsigned int numberOfBuffers; /*!< Number of stream buffers. */
- std::string streamName; /*!< A stream name (currently used only in Jack). */
- int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */
-
- // Default constructor.
- StreamOptions()
- : flags(0), numberOfBuffers(0), priority(0) {}
- };
-
- //! A static function to determine the current RtAudio version.
- static std::string getVersion( void ) throw();
-
- //! A static function to determine the available compiled audio APIs.
- /*!
- The values returned in the std::vector can be compared against
- the enumerated list values. Note that there can be more than one
- API compiled for certain operating systems.
- */
- static void getCompiledApi( std::vector<RtAudio::Api> &apis ) throw();
-
- //! The class constructor.
- /*!
- The constructor performs minor initialization tasks. An exception
- can be thrown if no API support is compiled.
-
- If no API argument is specified and multiple API support has been
- compiled, the default order of use is JACK, ALSA, OSS (Linux
- systems) and ASIO, DS (Windows systems).
- */
- RtAudio( RtAudio::Api api=UNSPECIFIED );
-
- //! The destructor.
- /*!
- If a stream is running or open, it will be stopped and closed
- automatically.
- */
- ~RtAudio() throw();
-
- //! Returns the audio API specifier for the current instance of RtAudio.
- RtAudio::Api getCurrentApi( void ) throw();
-
- //! A public function that queries for the number of audio devices available.
- /*!
- This function performs a system query of available devices each time it
- is called, thus supporting devices connected \e after instantiation. If
- a system error occurs during processing, a warning will be issued.
- */
- unsigned int getDeviceCount( void ) throw();
-
- //! Return an RtAudio::DeviceInfo structure for a specified device number.
- /*!
-
- Any device integer between 0 and getDeviceCount() - 1 is valid.
- If an invalid argument is provided, an RtAudioError (type = INVALID_USE)
- will be thrown. If a device is busy or otherwise unavailable, the
- structure member "probed" will have a value of "false" and all
- other members are undefined. If the specified device is the
- current default input or output device, the corresponding
- "isDefault" member will have a value of "true".
- */
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-
- //! A function that returns the index of the default output device.
- /*!
- If the underlying audio API does not provide a "default
- device", or if no devices are available, the return value will be
- 0. Note that this is a valid device identifier and it is the
- client's responsibility to verify that a device is available
- before attempting to open a stream.
- */
- unsigned int getDefaultOutputDevice( void ) throw();
-
- //! A function that returns the index of the default input device.
- /*!
- If the underlying audio API does not provide a "default
- device", or if no devices are available, the return value will be
- 0. Note that this is a valid device identifier and it is the
- client's responsibility to verify that a device is available
- before attempting to open a stream.
- */
- unsigned int getDefaultInputDevice( void ) throw();
-
- //! A public function for opening a stream with the specified parameters.
- /*!
- An RtAudioError (type = SYSTEM_ERROR) is thrown if a stream cannot be
- opened with the specified parameters or an error occurs during
- processing. An RtAudioError (type = INVALID_USE) is thrown if any
- invalid device ID or channel number parameters are specified.
-
- \param outputParameters Specifies output stream parameters to use
- when opening a stream, including a device ID, number of channels,
- and starting channel number. For input-only streams, this
- argument should be NULL. The device ID is an index value between
- 0 and getDeviceCount() - 1.
- \param inputParameters Specifies input stream parameters to use
- when opening a stream, including a device ID, number of channels,
- and starting channel number. For output-only streams, this
- argument should be NULL. The device ID is an index value between
- 0 and getDeviceCount() - 1.
- \param format An RtAudioFormat specifying the desired sample data format.
- \param sampleRate The desired sample rate (sample frames per second).
- \param *bufferFrames A pointer to a value indicating the desired
- internal buffer size in sample frames. The actual value
- used by the device is returned via the same pointer. A
- value of zero can be specified, in which case the lowest
- allowable value is determined.
- \param callback A client-defined function that will be invoked
- when input data is available and/or output data is needed.
- \param userData An optional pointer to data that can be accessed
- from within the callback function.
- \param options An optional pointer to a structure containing various
- global stream options, including a list of OR'ed RtAudioStreamFlags
- and a suggested number of stream buffers that can be used to
- control stream latency. More buffers typically result in more
- robust performance, though at a cost of greater latency. If a
- value of zero is specified, a system-specific median value is
- chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the
- lowest allowable value is used. The actual value used is
- returned via the structure argument. The parameter is API dependent.
- \param errorCallback A client-defined function that will be invoked
- when an error has occured.
- */
- void openStream( RtAudio::StreamParameters *outputParameters,
- RtAudio::StreamParameters *inputParameters,
- RtAudioFormat format, unsigned int sampleRate,
- unsigned int *bufferFrames, RtAudioCallback callback,
- void *userData = NULL, RtAudio::StreamOptions *options = NULL, RtAudioErrorCallback errorCallback = NULL );
-
- //! A function that closes a stream and frees any associated stream memory.
- /*!
- If a stream is not open, this function issues a warning and
- returns (no exception is thrown).
- */
- void closeStream( void ) throw();
-
- //! A function that starts a stream.
- /*!
- An RtAudioError (type = SYSTEM_ERROR) is thrown if an error occurs
- during processing. An RtAudioError (type = INVALID_USE) is thrown if a
- stream is not open. A warning is issued if the stream is already
- running.
- */
- void startStream( void );
-
- //! Stop a stream, allowing any samples remaining in the output queue to be played.
- /*!
- An RtAudioError (type = SYSTEM_ERROR) is thrown if an error occurs
- during processing. An RtAudioError (type = INVALID_USE) is thrown if a
- stream is not open. A warning is issued if the stream is already
- stopped.
- */
- void stopStream( void );
-
- //! Stop a stream, discarding any samples remaining in the input/output queue.
- /*!
- An RtAudioError (type = SYSTEM_ERROR) is thrown if an error occurs
- during processing. An RtAudioError (type = INVALID_USE) is thrown if a
- stream is not open. A warning is issued if the stream is already
- stopped.
- */
- void abortStream( void );
-
- //! Returns true if a stream is open and false if not.
- bool isStreamOpen( void ) const throw();
-
- //! Returns true if the stream is running and false if it is stopped or not open.
- bool isStreamRunning( void ) const throw();
-
- //! Returns the number of elapsed seconds since the stream was started.
- /*!
- If a stream is not open, an RtAudioError (type = INVALID_USE) will be thrown.
- */
- double getStreamTime( void );
-
- //! Set the stream time to a time in seconds greater than or equal to 0.0.
- /*!
- If a stream is not open, an RtAudioError (type = INVALID_USE) will be thrown.
- */
- void setStreamTime( double time );
-
- //! Returns the internal stream latency in sample frames.
- /*!
- The stream latency refers to delay in audio input and/or output
- caused by internal buffering by the audio system and/or hardware.
- For duplex streams, the returned value will represent the sum of
- the input and output latencies. If a stream is not open, an
- RtAudioError (type = INVALID_USE) will be thrown. If the API does not
- report latency, the return value will be zero.
- */
- long getStreamLatency( void );
-
- //! Returns actual sample rate in use by the stream.
- /*!
- On some systems, the sample rate used may be slightly different
- than that specified in the stream parameters. If a stream is not
- open, an RtAudioError (type = INVALID_USE) will be thrown.
- */
- unsigned int getStreamSampleRate( void );
-
- //! Specify whether warning messages should be printed to stderr.
- void showWarnings( bool value = true ) throw();
-
- protected:
-
- void openRtApi( RtAudio::Api api );
- RtApi *rtapi_;
-};
-
-// Operating system dependent thread functionality.
-#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__)
-
- #ifndef NOMINMAX
- #define NOMINMAX
- #endif
- #include <windows.h>
- #include <process.h>
-
- typedef uintptr_t ThreadHandle;
- typedef CRITICAL_SECTION StreamMutex;
-
-#elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)
- // Using pthread library for various flavors of unix.
- #include <pthread.h>
-
- typedef pthread_t ThreadHandle;
- typedef pthread_mutex_t StreamMutex;
-
-#else // Setup for "dummy" behavior
-
- #define __RTAUDIO_DUMMY__
- typedef int ThreadHandle;
- typedef int StreamMutex;
-
-#endif
-
-// This global structure type is used to pass callback information
-// between the private RtAudio stream structure and global callback
-// handling functions.
-struct CallbackInfo {
- void *object; // Used as a "this" pointer.
- ThreadHandle thread;
- void *callback;
- void *userData;
- void *errorCallback;
- void *apiInfo; // void pointer for API specific callback information
- bool isRunning;
- bool doRealtime;
- int priority;
-
- // Default constructor.
- CallbackInfo()
- :object(0), callback(0), userData(0), errorCallback(0), apiInfo(0), isRunning(false), doRealtime(false) {}
-};
-
-// **************************************************************** //
-//
-// RtApi class declaration.
-//
-// Subclasses of RtApi contain all API- and OS-specific code necessary
-// to fully implement the RtAudio API.
-//
-// Note that RtApi is an abstract base class and cannot be
-// explicitly instantiated. The class RtAudio will create an
-// instance of an RtApi subclass (RtApiOss, RtApiAlsa,
-// RtApiJack, RtApiCore, RtApiDs, or RtApiAsio).
-//
-// **************************************************************** //
-
-#pragma pack(push, 1)
-class S24 {
-
- protected:
- unsigned char c3[3];
-
- public:
- S24() {}
-
- S24& operator = ( const int& i ) {
- c3[0] = (i & 0x000000ff);
- c3[1] = (i & 0x0000ff00) >> 8;
- c3[2] = (i & 0x00ff0000) >> 16;
- return *this;
- }
-
- S24( const S24& v ) { *this = v; }
- S24( const double& d ) { *this = (int) d; }
- S24( const float& f ) { *this = (int) f; }
- S24( const signed short& s ) { *this = (int) s; }
- S24( const char& c ) { *this = (int) c; }
-
- int asInt() {
- int i = c3[0] | (c3[1] << 8) | (c3[2] << 16);
- if (i & 0x800000) i |= ~0xffffff;
- return i;
- }
-};
-#pragma pack(pop)
-
-#if defined( HAVE_GETTIMEOFDAY )
- #include <sys/time.h>
-#endif
-
-#include <sstream>
-
-class RtApi
-{
-public:
-
- RtApi();
- virtual ~RtApi();
- virtual RtAudio::Api getCurrentApi( void ) = 0;
- virtual unsigned int getDeviceCount( void ) = 0;
- virtual RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) = 0;
- virtual unsigned int getDefaultInputDevice( void );
- virtual unsigned int getDefaultOutputDevice( void );
- void openStream( RtAudio::StreamParameters *outputParameters,
- RtAudio::StreamParameters *inputParameters,
- RtAudioFormat format, unsigned int sampleRate,
- unsigned int *bufferFrames, RtAudioCallback callback,
- void *userData, RtAudio::StreamOptions *options,
- RtAudioErrorCallback errorCallback );
- virtual void closeStream( void );
- virtual void startStream( void ) = 0;
- virtual void stopStream( void ) = 0;
- virtual void abortStream( void ) = 0;
- long getStreamLatency( void );
- unsigned int getStreamSampleRate( void );
- virtual double getStreamTime( void );
- virtual void setStreamTime( double time );
- bool isStreamOpen( void ) const { return stream_.state != STREAM_CLOSED; }
- bool isStreamRunning( void ) const { return stream_.state == STREAM_RUNNING; }
- void showWarnings( bool value ) { showWarnings_ = value; }
-
-
-protected:
-
- static const unsigned int MAX_SAMPLE_RATES;
- static const unsigned int SAMPLE_RATES[];
-
- enum { FAILURE, SUCCESS };
-
- enum StreamState {
- STREAM_STOPPED,
- STREAM_STOPPING,
- STREAM_RUNNING,
- STREAM_CLOSED = -50
- };
-
- enum StreamMode {
- OUTPUT,
- INPUT,
- DUPLEX,
- UNINITIALIZED = -75
- };
-
- // A protected structure used for buffer conversion.
- struct ConvertInfo {
- int channels;
- int inJump, outJump;
- RtAudioFormat inFormat, outFormat;
- std::vector<int> inOffset;
- std::vector<int> outOffset;
- };
-
- // A protected structure for audio streams.
- struct RtApiStream {
- unsigned int device[2]; // Playback and record, respectively.
- void *apiHandle; // void pointer for API specific stream handle information
- StreamMode mode; // OUTPUT, INPUT, or DUPLEX.
- StreamState state; // STOPPED, RUNNING, or CLOSED
- char *userBuffer[2]; // Playback and record, respectively.
- char *deviceBuffer;
- bool doConvertBuffer[2]; // Playback and record, respectively.
- bool userInterleaved;
- bool deviceInterleaved[2]; // Playback and record, respectively.
- bool doByteSwap[2]; // Playback and record, respectively.
- unsigned int sampleRate;
- unsigned int bufferSize;
- unsigned int nBuffers;
- unsigned int nUserChannels[2]; // Playback and record, respectively.
- unsigned int nDeviceChannels[2]; // Playback and record channels, respectively.
- unsigned int channelOffset[2]; // Playback and record, respectively.
- unsigned long latency[2]; // Playback and record, respectively.
- RtAudioFormat userFormat;
- RtAudioFormat deviceFormat[2]; // Playback and record, respectively.
- StreamMutex mutex;
- CallbackInfo callbackInfo;
- ConvertInfo convertInfo[2];
- double streamTime; // Number of elapsed seconds since the stream started.
-
-#if defined(HAVE_GETTIMEOFDAY)
- struct timeval lastTickTimestamp;
-#endif
-
- RtApiStream()
- :apiHandle(0), deviceBuffer(0) { device[0] = 11111; device[1] = 11111; }
- };
-
- typedef S24 Int24;
- typedef signed short Int16;
- typedef signed int Int32;
- typedef float Float32;
- typedef double Float64;
-
- std::ostringstream errorStream_;
- std::string errorText_;
- bool showWarnings_;
- RtApiStream stream_;
- bool firstErrorOccurred_;
-
- /*!
- Protected, api-specific method that attempts to open a device
- with the given parameters. This function MUST be implemented by
- all subclasses. If an error is encountered during the probe, a
- "warning" message is reported and FAILURE is returned. A
- successful probe is indicated by a return value of SUCCESS.
- */
- virtual bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-
- //! A protected function used to increment the stream time.
- void tickStreamTime( void );
-
- //! Protected common method to clear an RtApiStream structure.
- void clearStreamInfo();
-
- /*!
- Protected common method that throws an RtAudioError (type =
- INVALID_USE) if a stream is not open.
- */
- void verifyStream( void );
-
- //! Protected common error method to allow global control over error handling.
- void error( RtAudioError::Type type );
-
- /*!
- Protected method used to perform format, channel number, and/or interleaving
- conversions between the user and device buffers.
- */
- void convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info );
-
- //! Protected common method used to perform byte-swapping on buffers.
- void byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format );
-
- //! Protected common method that returns the number of bytes for a given format.
- unsigned int formatBytes( RtAudioFormat format );
-
- //! Protected common method that sets up the parameters for buffer conversion.
- void setConvertInfo( StreamMode mode, unsigned int firstChannel );
-};
-
-// **************************************************************** //
-//
-// Inline RtAudio definitions.
-//
-// **************************************************************** //
-
-inline RtAudio::Api RtAudio :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
-inline unsigned int RtAudio :: getDeviceCount( void ) throw() { return rtapi_->getDeviceCount(); }
-inline RtAudio::DeviceInfo RtAudio :: getDeviceInfo( unsigned int device ) { return rtapi_->getDeviceInfo( device ); }
-inline unsigned int RtAudio :: getDefaultInputDevice( void ) throw() { return rtapi_->getDefaultInputDevice(); }
-inline unsigned int RtAudio :: getDefaultOutputDevice( void ) throw() { return rtapi_->getDefaultOutputDevice(); }
-inline void RtAudio :: closeStream( void ) throw() { return rtapi_->closeStream(); }
-inline void RtAudio :: startStream( void ) { return rtapi_->startStream(); }
-inline void RtAudio :: stopStream( void ) { return rtapi_->stopStream(); }
-inline void RtAudio :: abortStream( void ) { return rtapi_->abortStream(); }
-inline bool RtAudio :: isStreamOpen( void ) const throw() { return rtapi_->isStreamOpen(); }
-inline bool RtAudio :: isStreamRunning( void ) const throw() { return rtapi_->isStreamRunning(); }
-inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); }
-inline unsigned int RtAudio :: getStreamSampleRate( void ) { return rtapi_->getStreamSampleRate(); }
-inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); }
-inline void RtAudio :: setStreamTime( double time ) { return rtapi_->setStreamTime( time ); }
-inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); }
-
-// RtApi Subclass prototypes.
-
-#if defined(__MACOSX_CORE__)
-
-#include <CoreAudio/AudioHardware.h>
-
-class RtApiCore: public RtApi
-{
-public:
-
- RtApiCore();
- ~RtApiCore();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::MACOSX_CORE; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- unsigned int getDefaultOutputDevice( void );
- unsigned int getDefaultInputDevice( void );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
- // This function is intended for internal use only. It must be
- // public because it is called by the internal callback handler,
- // which is not a member of RtAudio. External use of this function
- // will most likely produce highly undesireable results!
- bool callbackEvent( AudioDeviceID deviceId,
- const AudioBufferList *inBufferList,
- const AudioBufferList *outBufferList );
-
- private:
-
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- static const char* getErrorCode( OSStatus code );
-};
-
-#endif
-
-#if defined(__UNIX_JACK__)
-
-class RtApiJack: public RtApi
-{
-public:
-
- RtApiJack();
- ~RtApiJack();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
- // This function is intended for internal use only. It must be
- // public because it is called by the internal callback handler,
- // which is not a member of RtAudio. External use of this function
- // will most likely produce highly undesireable results!
- bool callbackEvent( unsigned long nframes );
-
- private:
-
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-};
-
-#endif
-
-#if defined(__WINDOWS_ASIO__)
-
-class RtApiAsio: public RtApi
-{
-public:
-
- RtApiAsio();
- ~RtApiAsio();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_ASIO; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
- // This function is intended for internal use only. It must be
- // public because it is called by the internal callback handler,
- // which is not a member of RtAudio. External use of this function
- // will most likely produce highly undesireable results!
- bool callbackEvent( long bufferIndex );
-
- private:
-
- std::vector<RtAudio::DeviceInfo> devices_;
- void saveDeviceInfo( void );
- bool coInitialized_;
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-};
-
-#endif
-
-#if defined(__WINDOWS_DS__)
-
-class RtApiDs: public RtApi
-{
-public:
-
- RtApiDs();
- ~RtApiDs();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_DS; }
- unsigned int getDeviceCount( void );
- unsigned int getDefaultOutputDevice( void );
- unsigned int getDefaultInputDevice( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
- // This function is intended for internal use only. It must be
- // public because it is called by the internal callback handler,
- // which is not a member of RtAudio. External use of this function
- // will most likely produce highly undesireable results!
- void callbackEvent( void );
-
- private:
-
- bool coInitialized_;
- bool buffersRolling;
- long duplexPrerollBytes;
- std::vector<struct DsDevice> dsDevices;
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-};
-
-#endif
-
-#if defined(__WINDOWS_WASAPI__)
-
-struct IMMDeviceEnumerator;
-
-class RtApiWasapi : public RtApi
-{
-public:
- RtApiWasapi();
- ~RtApiWasapi();
-
- RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_WASAPI; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- unsigned int getDefaultOutputDevice( void );
- unsigned int getDefaultInputDevice( void );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
-
-private:
- bool coInitialized_;
- IMMDeviceEnumerator* deviceEnumerator_;
-
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int* bufferSize,
- RtAudio::StreamOptions* options );
-
- static DWORD WINAPI runWasapiThread( void* wasapiPtr );
- static DWORD WINAPI stopWasapiThread( void* wasapiPtr );
- static DWORD WINAPI abortWasapiThread( void* wasapiPtr );
- void wasapiThread();
-};
-
-#endif
-
-#if defined(__LINUX_ALSA__)
-
-class RtApiAlsa: public RtApi
-{
-public:
-
- RtApiAlsa();
- ~RtApiAlsa();
- RtAudio::Api getCurrentApi() { return RtAudio::LINUX_ALSA; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
-
- // This function is intended for internal use only. It must be
- // public because it is called by the internal callback handler,
- // which is not a member of RtAudio. External use of this function
- // will most likely produce highly undesireable results!
- void callbackEvent( void );
-
- private:
-
- std::vector<RtAudio::DeviceInfo> devices_;
- void saveDeviceInfo( void );
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-};
-
-#endif
-
-#if defined(__LINUX_PULSE__)
-
-class RtApiPulse: public RtApi
-{
-public:
- ~RtApiPulse();
- RtAudio::Api getCurrentApi() { return RtAudio::LINUX_PULSE; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
-
- // This function is intended for internal use only. It must be
- // public because it is called by the internal callback handler,
- // which is not a member of RtAudio. External use of this function
- // will most likely produce highly undesireable results!
- void callbackEvent( void );
-
- private:
-
- std::vector<RtAudio::DeviceInfo> devices_;
- void saveDeviceInfo( void );
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-};
-
-#endif
-
-#if defined(__LINUX_OSS__)
-
-class RtApiOss: public RtApi
-{
-public:
-
- RtApiOss();
- ~RtApiOss();
- RtAudio::Api getCurrentApi() { return RtAudio::LINUX_OSS; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
-
- // This function is intended for internal use only. It must be
- // public because it is called by the internal callback handler,
- // which is not a member of RtAudio. External use of this function
- // will most likely produce highly undesireable results!
- void callbackEvent( void );
-
- private:
-
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-};
-
-#endif
-
-#if defined(__RTAUDIO_DUMMY__)
-
-class RtApiDummy: public RtApi
-{
-public:
-
- RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( RtAudioError::WARNING ); }
- RtAudio::Api getCurrentApi( void ) { return RtAudio::RTAUDIO_DUMMY; }
- unsigned int getDeviceCount( void ) { return 0; }
- RtAudio::DeviceInfo getDeviceInfo( unsigned int /*device*/ ) { RtAudio::DeviceInfo info; return info; }
- void closeStream( void ) {}
- void startStream( void ) {}
- void stopStream( void ) {}
- void abortStream( void ) {}
-
- private:
-
- bool probeDeviceOpen( unsigned int /*device*/, StreamMode /*mode*/, unsigned int /*channels*/,
- unsigned int /*firstChannel*/, unsigned int /*sampleRate*/,
- RtAudioFormat /*format*/, unsigned int * /*bufferSize*/,
- RtAudio::StreamOptions * /*options*/ ) { return false; }
-};
-
-#endif
-
-#endif
-
-// Indentation settings for Vim and Emacs
-//
-// Local Variables:
-// c-basic-offset: 2
-// indent-tabs-mode: nil
-// End:
-//
-// vim: et sts=2 sw=2
-
-#endif // RTAUDIO_ENABLED -GODOT-
diff --git a/thirdparty/tinyexr/tinyexr.h b/thirdparty/tinyexr/tinyexr.h
index b3a7ee00c2..3c19391850 100644
--- a/thirdparty/tinyexr/tinyexr.h
+++ b/thirdparty/tinyexr/tinyexr.h
@@ -274,6 +274,12 @@ extern int LoadEXR(float **out_rgba, int *width, int *height,
const char *filename, const char **err);
// @deprecated { to be removed. }
+// Simple wrapper API for ParseEXRHeaderFromFile.
+// checking given file is a EXR file(by just look up header)
+// @return TINYEXR_SUCCEES for EXR image, TINYEXR_ERROR_INVALID_HEADER for others
+extern int IsEXR(const char *filename);
+
+// @deprecated { to be removed. }
// Saves single-frame OpenEXR image. Assume EXR image contains RGB(A) channels.
// components must be 1(Grayscale), 3(RGB) or 4(RGBA).
// Input image format is: `float x width x height`, or `float x RGB(A) x width x
@@ -6998,6 +7004,10 @@ static void swap2(unsigned short *val) {
#endif
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
static void cpy4(int *dst_val, const int *src_val) {
unsigned char *dst = reinterpret_cast<unsigned char *>(dst_val);
const unsigned char *src = reinterpret_cast<const unsigned char *>(src_val);
@@ -7028,6 +7038,10 @@ static void cpy4(float *dst_val, const float *src_val) {
dst[3] = src[3];
}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
static void swap4(unsigned int *val) {
#ifdef MINIZ_LITTLE_ENDIAN
(void)val;
@@ -8840,7 +8854,8 @@ static bool getCode(int po, int rlc, long long &c, int &lc, const char *&in,
if (out + cs > oe) return false;
// Bounds check for safety
- if ((out - 1) <= ob) return false;
+ // Issue 100.
+ if ((out - 1) < ob) return false;
unsigned short s = out[-1];
while (cs-- > 0) *out++ = s;
@@ -10721,6 +10736,15 @@ static int DecodeChunk(EXRImage *exr_image, const EXRHeader *exr_header,
int data_width = exr_header->data_window[2] - exr_header->data_window[0] + 1;
int data_height = exr_header->data_window[3] - exr_header->data_window[1] + 1;
+ if ((data_width < 0) || (data_height < 0)) {
+ if (err) {
+ std::stringstream ss;
+ ss << "Invalid data width or data height: " << data_width << ", " << data_height << std::endl;
+ (*err) += ss.str();
+ }
+ return TINYEXR_ERROR_INVALID_DATA;
+ }
+
size_t num_blocks = offsets.size();
std::vector<size_t> channel_offset_list;
@@ -10816,6 +10840,17 @@ static int DecodeChunk(EXRImage *exr_image, const EXRHeader *exr_header,
}
} else { // scanline format
+ // Don't allow too large image(256GB * pixel_data_size or more). Workaround for #104.
+ size_t data_len = size_t(data_width) * size_t(data_height) * size_t(num_channels);
+ if ((data_len == 0) || (data_len >= 0x4000000000)) {
+ if (err) {
+ std::stringstream ss;
+ ss << "Image data size is zero or too large: width = " << data_width << ", height = " << data_height << ", channels = " << num_channels << std::endl;
+ (*err) += ss.str();
+ }
+ return TINYEXR_ERROR_INVALID_DATA;
+ }
+
exr_image->images = tinyexr::AllocateImage(
num_channels, exr_header->channels, exr_header->requested_pixel_types,
data_width, data_height);
@@ -11155,7 +11190,6 @@ int LoadEXR(float **out_rgba, int *width, int *height, const char *filename,
static_cast<size_t>(exr_image.height)));
if (exr_header.tiled) {
- // todo.implement this
for (int it = 0; it < exr_image.num_tiles; it++) {
for (int j = 0; j < exr_header.tile_size_y; j++) {
@@ -11284,6 +11318,17 @@ int LoadEXR(float **out_rgba, int *width, int *height, const char *filename,
return TINYEXR_SUCCESS;
}
+int IsEXR(const char *filename) {
+ EXRVersion exr_version;
+
+ int ret = ParseEXRVersionFromFile(&exr_version, filename);
+ if (ret != TINYEXR_SUCCESS) {
+ return TINYEXR_ERROR_INVALID_HEADER;
+ }
+
+ return TINYEXR_SUCCESS;
+}
+
int ParseEXRHeaderFromMemory(EXRHeader *exr_header, const EXRVersion *version,
const unsigned char *memory, size_t size,
const char **err) {
@@ -11380,75 +11425,128 @@ int LoadEXRFromMemory(float **out_rgba, int *width, int *height,
}
}
- if (idxR == -1) {
- tinyexr::SetErrorMessage("R channel not found", err);
-
- // @todo { free exr_image }
- return TINYEXR_ERROR_INVALID_DATA;
- }
-
- if (idxG == -1) {
- tinyexr::SetErrorMessage("G channel not found", err);
- // @todo { free exr_image }
- return TINYEXR_ERROR_INVALID_DATA;
- }
+ // TODO(syoyo): Refactor removing same code as used in LoadEXR().
+ if (exr_header.num_channels == 1) {
+ // Grayscale channel only.
- if (idxB == -1) {
- tinyexr::SetErrorMessage("B channel not found", err);
- // @todo { free exr_image }
- return TINYEXR_ERROR_INVALID_DATA;
- }
+ (*out_rgba) = reinterpret_cast<float *>(
+ malloc(4 * sizeof(float) * static_cast<size_t>(exr_image.width) *
+ static_cast<size_t>(exr_image.height)));
- (*out_rgba) = reinterpret_cast<float *>(
- malloc(4 * sizeof(float) * static_cast<size_t>(exr_image.width) *
- static_cast<size_t>(exr_image.height)));
+ if (exr_header.tiled) {
- if (exr_header.tiled) {
- for (int it = 0; it < exr_image.num_tiles; it++) {
- for (int j = 0; j < exr_header.tile_size_y; j++)
- for (int i = 0; i < exr_header.tile_size_x; i++) {
- const int ii =
- exr_image.tiles[it].offset_x * exr_header.tile_size_x + i;
- const int jj =
- exr_image.tiles[it].offset_y * exr_header.tile_size_y + j;
- const int idx = ii + jj * exr_image.width;
+ for (int it = 0; it < exr_image.num_tiles; it++) {
+ for (int j = 0; j < exr_header.tile_size_y; j++) {
+ for (int i = 0; i < exr_header.tile_size_x; i++) {
+ const int ii =
+ exr_image.tiles[it].offset_x * exr_header.tile_size_x + i;
+ const int jj =
+ exr_image.tiles[it].offset_y * exr_header.tile_size_y + j;
+ const int idx = ii + jj * exr_image.width;
- // out of region check.
- if (ii >= exr_image.width) {
- continue;
- }
- if (jj >= exr_image.height) {
- continue;
- }
- const int srcIdx = i + j * exr_header.tile_size_x;
- unsigned char **src = exr_image.tiles[it].images;
- (*out_rgba)[4 * idx + 0] =
- reinterpret_cast<float **>(src)[idxR][srcIdx];
- (*out_rgba)[4 * idx + 1] =
- reinterpret_cast<float **>(src)[idxG][srcIdx];
- (*out_rgba)[4 * idx + 2] =
- reinterpret_cast<float **>(src)[idxB][srcIdx];
- if (idxA != -1) {
+ // out of region check.
+ if (ii >= exr_image.width) {
+ continue;
+ }
+ if (jj >= exr_image.height) {
+ continue;
+ }
+ const int srcIdx = i + j * exr_header.tile_size_x;
+ unsigned char **src = exr_image.tiles[it].images;
+ (*out_rgba)[4 * idx + 0] =
+ reinterpret_cast<float **>(src)[0][srcIdx];
+ (*out_rgba)[4 * idx + 1] =
+ reinterpret_cast<float **>(src)[0][srcIdx];
+ (*out_rgba)[4 * idx + 2] =
+ reinterpret_cast<float **>(src)[0][srcIdx];
(*out_rgba)[4 * idx + 3] =
- reinterpret_cast<float **>(src)[idxA][srcIdx];
- } else {
- (*out_rgba)[4 * idx + 3] = 1.0;
+ reinterpret_cast<float **>(src)[0][srcIdx];
}
}
+ }
+ } else {
+ for (int i = 0; i < exr_image.width * exr_image.height; i++) {
+ const float val = reinterpret_cast<float **>(exr_image.images)[0][i];
+ (*out_rgba)[4 * i + 0] = val;
+ (*out_rgba)[4 * i + 1] = val;
+ (*out_rgba)[4 * i + 2] = val;
+ (*out_rgba)[4 * i + 3] = val;
+ }
}
+
} else {
- for (int i = 0; i < exr_image.width * exr_image.height; i++) {
- (*out_rgba)[4 * i + 0] =
- reinterpret_cast<float **>(exr_image.images)[idxR][i];
- (*out_rgba)[4 * i + 1] =
- reinterpret_cast<float **>(exr_image.images)[idxG][i];
- (*out_rgba)[4 * i + 2] =
- reinterpret_cast<float **>(exr_image.images)[idxB][i];
- if (idxA != -1) {
- (*out_rgba)[4 * i + 3] =
- reinterpret_cast<float **>(exr_image.images)[idxA][i];
- } else {
- (*out_rgba)[4 * i + 3] = 1.0;
+ // TODO(syoyo): Support non RGBA image.
+
+ if (idxR == -1) {
+ tinyexr::SetErrorMessage("R channel not found", err);
+
+ // @todo { free exr_image }
+ return TINYEXR_ERROR_INVALID_DATA;
+ }
+
+ if (idxG == -1) {
+ tinyexr::SetErrorMessage("G channel not found", err);
+ // @todo { free exr_image }
+ return TINYEXR_ERROR_INVALID_DATA;
+ }
+
+ if (idxB == -1) {
+ tinyexr::SetErrorMessage("B channel not found", err);
+ // @todo { free exr_image }
+ return TINYEXR_ERROR_INVALID_DATA;
+ }
+
+ (*out_rgba) = reinterpret_cast<float *>(
+ malloc(4 * sizeof(float) * static_cast<size_t>(exr_image.width) *
+ static_cast<size_t>(exr_image.height)));
+
+ if (exr_header.tiled) {
+ for (int it = 0; it < exr_image.num_tiles; it++) {
+ for (int j = 0; j < exr_header.tile_size_y; j++)
+ for (int i = 0; i < exr_header.tile_size_x; i++) {
+ const int ii =
+ exr_image.tiles[it].offset_x * exr_header.tile_size_x + i;
+ const int jj =
+ exr_image.tiles[it].offset_y * exr_header.tile_size_y + j;
+ const int idx = ii + jj * exr_image.width;
+
+ // out of region check.
+ if (ii >= exr_image.width) {
+ continue;
+ }
+ if (jj >= exr_image.height) {
+ continue;
+ }
+ const int srcIdx = i + j * exr_header.tile_size_x;
+ unsigned char **src = exr_image.tiles[it].images;
+ (*out_rgba)[4 * idx + 0] =
+ reinterpret_cast<float **>(src)[idxR][srcIdx];
+ (*out_rgba)[4 * idx + 1] =
+ reinterpret_cast<float **>(src)[idxG][srcIdx];
+ (*out_rgba)[4 * idx + 2] =
+ reinterpret_cast<float **>(src)[idxB][srcIdx];
+ if (idxA != -1) {
+ (*out_rgba)[4 * idx + 3] =
+ reinterpret_cast<float **>(src)[idxA][srcIdx];
+ } else {
+ (*out_rgba)[4 * idx + 3] = 1.0;
+ }
+ }
+ }
+ } else {
+ for (int i = 0; i < exr_image.width * exr_image.height; i++) {
+ (*out_rgba)[4 * i + 0] =
+ reinterpret_cast<float **>(exr_image.images)[idxR][i];
+ (*out_rgba)[4 * i + 1] =
+ reinterpret_cast<float **>(exr_image.images)[idxG][i];
+ (*out_rgba)[4 * i + 2] =
+ reinterpret_cast<float **>(exr_image.images)[idxB][i];
+ if (idxA != -1) {
+ (*out_rgba)[4 * i + 3] =
+ reinterpret_cast<float **>(exr_image.images)[idxA][i];
+ } else {
+ (*out_rgba)[4 * i + 3] = 1.0;
+ }
}
}
}
diff --git a/version.py b/version.py
index 17be155464..3d7def727d 100644
--- a/version.py
+++ b/version.py
@@ -1,6 +1,7 @@
short_name = "godot"
name = "Godot Engine"
major = 3
-minor = 1
-status = "beta"
+minor = 2
+status = "dev"
module_config = ""
+year = 2019